summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2008-12-30 02:24:45 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2008-12-30 02:24:45 +1100
commit257d8bc7876586cacc516d322f857150b6a0d79f (patch)
treeebd39ef8e48754e8cf8c5dafc5c41eb3cab20248
parent6dde7fc0e5ef62c51fbc26364a7a6984d20ea289 (diff)
Revert "cpumask: add sysfs displays for configured and disabled cpu maps"
This reverts commit e057d7aea9d8f2a46cd440d8bfb72245d4e72d79.
-rw-r--r--drivers/base/cpu.c44
-rw-r--r--include/linux/smp.h3
2 files changed, 0 insertions, 47 deletions
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index 2aef96f20b30..4259072f5bd0 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -128,54 +128,10 @@ print_cpus_func(online);
print_cpus_func(possible);
print_cpus_func(present);
-/*
- * Print values for NR_CPUS and offlined cpus
- */
-static ssize_t print_cpus_kernel_max(struct sysdev_class *class, char *buf)
-{
- int n = snprintf(buf, PAGE_SIZE-2, "%d\n", CONFIG_NR_CPUS - 1);
- return n;
-}
-static SYSDEV_CLASS_ATTR(kernel_max, 0444, print_cpus_kernel_max, NULL);
-
-/* arch-optional setting to enable display of offline cpus >= nr_cpu_ids */
-unsigned int total_cpus;
-
-static ssize_t print_cpus_offline(struct sysdev_class *class, char *buf)
-{
- int n = 0, len = PAGE_SIZE-2;
- cpumask_var_t offline;
-
- /* display offline cpus < nr_cpu_ids */
- if (!alloc_cpumask_var(&offline, GFP_KERNEL))
- return -ENOMEM;
- cpumask_complement(offline, cpu_online_mask);
- n = cpulist_scnprintf(buf, len, offline);
- free_cpumask_var(offline);
-
- /* display offline cpus >= nr_cpu_ids */
- if (total_cpus && nr_cpu_ids < total_cpus) {
- if (n && n < len)
- buf[n++] = ',';
-
- if (nr_cpu_ids == total_cpus-1)
- n += snprintf(&buf[n], len - n, "%d", nr_cpu_ids);
- else
- n += snprintf(&buf[n], len - n, "%d-%d",
- nr_cpu_ids, total_cpus-1);
- }
-
- n += snprintf(&buf[n], len - n, "\n");
- return n;
-}
-static SYSDEV_CLASS_ATTR(offline, 0444, print_cpus_offline, NULL);
-
static struct sysdev_class_attribute *cpu_state_attr[] = {
&attr_online_map,
&attr_possible_map,
&attr_present_map,
- &attr_kernel_max,
- &attr_offline,
};
static int cpu_states_init(void)
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 2f85f3b04bc4..6e7ba16ff454 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -21,9 +21,6 @@ struct call_single_data {
u16 priv;
};
-/* total number of cpus in this system (may exceed NR_CPUS) */
-extern unsigned int total_cpus;
-
#ifdef CONFIG_SMP
#include <linux/preempt.h>