aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/frv/Kconfig1
-rw-r--r--arch/h8300/Kconfig1
-rw-r--r--arch/m68k/Kconfig1
-rw-r--r--arch/microblaze/Kconfig1
-rw-r--r--arch/openrisc/Kconfig1
-rw-r--r--arch/score/Kconfig1
-rw-r--r--arch/um/Kconfig.common1
-rw-r--r--arch/xtensa/Kconfig1
-rw-r--r--drivers/base/Kconfig4
-rw-r--r--drivers/base/cpu.c19
10 files changed, 31 insertions, 0 deletions
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig
index bbbf7927f238..a685910d2d5c 100644
--- a/arch/frv/Kconfig
+++ b/arch/frv/Kconfig
@@ -8,6 +8,7 @@ config FRV
8 select HAVE_GENERIC_HARDIRQS 8 select HAVE_GENERIC_HARDIRQS
9 select GENERIC_IRQ_SHOW 9 select GENERIC_IRQ_SHOW
10 select ARCH_HAVE_NMI_SAFE_CMPXCHG 10 select ARCH_HAVE_NMI_SAFE_CMPXCHG
11 select GENERIC_CPU_DEVICES
11 12
12config ZONE_DMA 13config ZONE_DMA
13 bool 14 bool
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
index d1f377f5d3b6..56e890df5053 100644
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
@@ -4,6 +4,7 @@ config H8300
4 select HAVE_IDE 4 select HAVE_IDE
5 select HAVE_GENERIC_HARDIRQS 5 select HAVE_GENERIC_HARDIRQS
6 select GENERIC_IRQ_SHOW 6 select GENERIC_IRQ_SHOW
7 select GENERIC_CPU_DEVICES
7 8
8config SYMBOL_PREFIX 9config SYMBOL_PREFIX
9 string 10 string
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 99c363617f27..ae413d4a8bb7 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -6,6 +6,7 @@ config M68K
6 select HAVE_GENERIC_HARDIRQS 6 select HAVE_GENERIC_HARDIRQS
7 select GENERIC_IRQ_SHOW 7 select GENERIC_IRQ_SHOW
8 select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS 8 select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS
9 select GENERIC_CPU_DEVICES
9 10
10config RWSEM_GENERIC_SPINLOCK 11config RWSEM_GENERIC_SPINLOCK
11 bool 12 bool
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index f0eead74fff6..74f23a460ba2 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -18,6 +18,7 @@ config MICROBLAZE
18 select GENERIC_IRQ_PROBE 18 select GENERIC_IRQ_PROBE
19 select GENERIC_IRQ_SHOW 19 select GENERIC_IRQ_SHOW
20 select GENERIC_PCI_IOMAP 20 select GENERIC_PCI_IOMAP
21 select GENERIC_CPU_DEVICES
21 22
22config SWAP 23config SWAP
23 def_bool n 24 def_bool n
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig
index 081a54f1a93d..bc428b5f126c 100644
--- a/arch/openrisc/Kconfig
+++ b/arch/openrisc/Kconfig
@@ -15,6 +15,7 @@ config OPENRISC
15 select GENERIC_IRQ_PROBE 15 select GENERIC_IRQ_PROBE
16 select GENERIC_IRQ_SHOW 16 select GENERIC_IRQ_SHOW
17 select GENERIC_IOMAP 17 select GENERIC_IOMAP
18 select GENERIC_CPU_DEVICES
18 19
19config MMU 20config MMU
20 def_bool y 21 def_bool y
diff --git a/arch/score/Kconfig b/arch/score/Kconfig
index 3df65d39abc1..4b285779ac05 100644
--- a/arch/score/Kconfig
+++ b/arch/score/Kconfig
@@ -8,6 +8,7 @@ config SCORE
8 select HAVE_MEMBLOCK 8 select HAVE_MEMBLOCK
9 select HAVE_MEMBLOCK_NODE_MAP 9 select HAVE_MEMBLOCK_NODE_MAP
10 select ARCH_DISCARD_MEMBLOCK 10 select ARCH_DISCARD_MEMBLOCK
11 select GENERIC_CPU_DEVICES
11 12
12choice 13choice
13 prompt "System type" 14 prompt "System type"
diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common
index a9234838e8a2..b37ae706af3e 100644
--- a/arch/um/Kconfig.common
+++ b/arch/um/Kconfig.common
@@ -8,6 +8,7 @@ config UML
8 default y 8 default y
9 select HAVE_GENERIC_HARDIRQS 9 select HAVE_GENERIC_HARDIRQS
10 select GENERIC_IRQ_SHOW 10 select GENERIC_IRQ_SHOW
11 select GENERIC_CPU_DEVICES
11 12
12config MMU 13config MMU
13 bool 14 bool
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index c346ccdce0df..8a3f8351f438 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -9,6 +9,7 @@ config XTENSA
9 select HAVE_IDE 9 select HAVE_IDE
10 select HAVE_GENERIC_HARDIRQS 10 select HAVE_GENERIC_HARDIRQS
11 select GENERIC_IRQ_SHOW 11 select GENERIC_IRQ_SHOW
12 select GENERIC_CPU_DEVICES
12 help 13 help
13 Xtensa processors are 32-bit RISC machines designed by Tensilica 14 Xtensa processors are 32-bit RISC machines designed by Tensilica
14 primarily for embedded systems. These processors are both 15 primarily for embedded systems. These processors are both
diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
index e95c67edb2cb..fcbec8ac134d 100644
--- a/drivers/base/Kconfig
+++ b/drivers/base/Kconfig
@@ -172,6 +172,10 @@ config SYS_HYPERVISOR
172 bool 172 bool
173 default n 173 default n
174 174
175config GENERIC_CPU_DEVICES
176 bool
177 default n
178
175source "drivers/base/regmap/Kconfig" 179source "drivers/base/regmap/Kconfig"
176 180
177config DMA_SHARED_BUFFER 181config DMA_SHARED_BUFFER
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index bba70d08be6a..db87e78d7459 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -11,6 +11,7 @@
11#include <linux/device.h> 11#include <linux/device.h>
12#include <linux/node.h> 12#include <linux/node.h>
13#include <linux/gfp.h> 13#include <linux/gfp.h>
14#include <linux/percpu.h>
14 15
15#include "base.h" 16#include "base.h"
16 17
@@ -275,11 +276,29 @@ bool cpu_is_hotpluggable(unsigned cpu)
275} 276}
276EXPORT_SYMBOL_GPL(cpu_is_hotpluggable); 277EXPORT_SYMBOL_GPL(cpu_is_hotpluggable);
277 278
279#ifdef CONFIG_GENERIC_CPU_DEVICES
280static DEFINE_PER_CPU(struct cpu, cpu_devices);
281#endif
282
283static void __init cpu_dev_register_generic(void)
284{
285#ifdef CONFIG_GENERIC_CPU_DEVICES
286 int i;
287
288 for_each_possible_cpu(i) {
289 if (register_cpu(&per_cpu(cpu_devices, i), i))
290 panic("Failed to register CPU device");
291 }
292#endif
293}
294
278void __init cpu_dev_init(void) 295void __init cpu_dev_init(void)
279{ 296{
280 if (subsys_system_register(&cpu_subsys, cpu_root_attr_groups)) 297 if (subsys_system_register(&cpu_subsys, cpu_root_attr_groups))
281 panic("Failed to register CPU subsystem"); 298 panic("Failed to register CPU subsystem");
282 299
300 cpu_dev_register_generic();
301
283#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT) 302#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT)
284 sched_create_sysfs_power_savings_entries(cpu_subsys.dev_root); 303 sched_create_sysfs_power_savings_entries(cpu_subsys.dev_root);
285#endif 304#endif