Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283318
b: refs/heads/master
c: 9f13a1f
h: refs/heads/master
v: v3
  • Loading branch information
Ben Hutchings authored and Linus Torvalds committed Jan 11, 2012
1 parent 53f6ca2 commit 83c3882
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 024f78462c3da710642a54939888a92e28704653
refs/heads/master: 9f13a1fd452f11c18004ba2422a6384b424ec8a9
1 change: 1 addition & 0 deletions trunk/arch/frv/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ config FRV
select HAVE_GENERIC_HARDIRQS
select GENERIC_IRQ_SHOW
select ARCH_HAVE_NMI_SAFE_CMPXCHG
select GENERIC_CPU_DEVICES

config ZONE_DMA
bool
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/h8300/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ config H8300
select HAVE_IDE
select HAVE_GENERIC_HARDIRQS
select GENERIC_IRQ_SHOW
select GENERIC_CPU_DEVICES

config SYMBOL_PREFIX
string
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/m68k/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ config M68K
select HAVE_GENERIC_HARDIRQS
select GENERIC_IRQ_SHOW
select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS
select GENERIC_CPU_DEVICES

config RWSEM_GENERIC_SPINLOCK
bool
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/microblaze/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ config MICROBLAZE
select GENERIC_IRQ_PROBE
select GENERIC_IRQ_SHOW
select GENERIC_PCI_IOMAP
select GENERIC_CPU_DEVICES

config SWAP
def_bool n
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/openrisc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ config OPENRISC
select GENERIC_IRQ_PROBE
select GENERIC_IRQ_SHOW
select GENERIC_IOMAP
select GENERIC_CPU_DEVICES

config MMU
def_bool y
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/score/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ config SCORE
select HAVE_MEMBLOCK
select HAVE_MEMBLOCK_NODE_MAP
select ARCH_DISCARD_MEMBLOCK
select GENERIC_CPU_DEVICES

choice
prompt "System type"
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/um/Kconfig.common
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ config UML
default y
select HAVE_GENERIC_HARDIRQS
select GENERIC_IRQ_SHOW
select GENERIC_CPU_DEVICES

config MMU
bool
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/xtensa/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ config XTENSA
select HAVE_IDE
select HAVE_GENERIC_HARDIRQS
select GENERIC_IRQ_SHOW
select GENERIC_CPU_DEVICES
help
Xtensa processors are 32-bit RISC machines designed by Tensilica
primarily for embedded systems. These processors are both
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/base/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ config SYS_HYPERVISOR
bool
default n

config GENERIC_CPU_DEVICES
bool
default n

source "drivers/base/regmap/Kconfig"

config DMA_SHARED_BUFFER
Expand Down
19 changes: 19 additions & 0 deletions trunk/drivers/base/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/device.h>
#include <linux/node.h>
#include <linux/gfp.h>
#include <linux/percpu.h>

#include "base.h"

Expand Down Expand Up @@ -275,11 +276,29 @@ bool cpu_is_hotpluggable(unsigned cpu)
}
EXPORT_SYMBOL_GPL(cpu_is_hotpluggable);

#ifdef CONFIG_GENERIC_CPU_DEVICES
static DEFINE_PER_CPU(struct cpu, cpu_devices);
#endif

static void __init cpu_dev_register_generic(void)
{
#ifdef CONFIG_GENERIC_CPU_DEVICES
int i;

for_each_possible_cpu(i) {
if (register_cpu(&per_cpu(cpu_devices, i), i))
panic("Failed to register CPU device");
}
#endif
}

void __init cpu_dev_init(void)
{
if (subsys_system_register(&cpu_subsys, cpu_root_attr_groups))
panic("Failed to register CPU subsystem");

cpu_dev_register_generic();

#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT)
sched_create_sysfs_power_savings_entries(cpu_subsys.dev_root);
#endif
Expand Down

0 comments on commit 83c3882

Please sign in to comment.