alistair23-linux/arch/powerpc/kernel
Gautham R Shenoy b282b6f8a8 [PATCH] Change cpu_up and co from __devinit to __cpuinit
Compiling the kernel with CONFIG_HOTPLUG = y and CONFIG_HOTPLUG_CPU = n
with CONFIG_RELOCATABLE = y generates the following modpost warnings

WARNING: vmlinux - Section mismatch: reference to .init.data: from
.text between '_cpu_up' (at offset 0xc0141b7d) and 'cpu_up'
WARNING: vmlinux - Section mismatch: reference to .init.data: from
.text between '_cpu_up' (at offset 0xc0141b9c) and 'cpu_up'
WARNING: vmlinux - Section mismatch: reference to .init.text:__cpu_up
from .text between '_cpu_up' (at offset 0xc0141bd8) and 'cpu_up'
WARNING: vmlinux - Section mismatch: reference to .init.data: from
.text between '_cpu_up' (at offset 0xc0141c05) and 'cpu_up'
WARNING: vmlinux - Section mismatch: reference to .init.data: from
.text between '_cpu_up' (at offset 0xc0141c26) and 'cpu_up'
WARNING: vmlinux - Section mismatch: reference to .init.data: from
.text between '_cpu_up' (at offset 0xc0141c37) and 'cpu_up'

This is because cpu_up, _cpu_up and __cpu_up (in some architectures) are
defined as __devinit
AND
__cpu_up calls some __cpuinit functions.

Since __cpuinit would map to __init with this kind of a configuration,
we get a .text refering .init.data warning.

This patch solves the problem by converting all of __cpu_up, _cpu_up
and cpu_up from __devinit to __cpuinit. The approach is justified since
the callers of cpu_up are either dependent on CONFIG_HOTPLUG_CPU or
are of __init type.

Thus when CONFIG_HOTPLUG_CPU=y, all these cpu up functions would land up
in .text section, and when CONFIG_HOTPLUG_CPU=n, all these functions would
land up in .init section.

Tested on a i386 SMP machine running linux-2.6.20-rc3-mm1.

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2007-01-11 18:18:20 -08:00
..
vdso32 [POWERPC] Support feature fixups in vdso's 2006-10-25 11:54:07 +10:00
vdso64 [POWERPC] Cell timebase bug workaround 2006-10-25 11:54:18 +10:00
align.c
asm-offsets.c [POWERPC] Fix manual assembly WARN_ON() in enter_rtas(). 2007-01-09 17:03:02 +11:00
audit.c
binfmt_elf32.c
btext.c [POWERPC] Fix various offb issues 2006-11-01 14:52:48 +11:00
compat_audit.c
cpu_setup_6xx.S
cpu_setup_ppc970.S [POWERPC] powerpc: Enable DEEPNAP power savings mode on 970MP 2006-10-16 16:32:25 +10:00
cputable.c [POWERPC] Fix 440SPe CPU table entry 2006-12-08 02:45:38 -06:00
crash.c [PATCH] Kexec / Kdump: Unify elf note code 2006-12-07 08:39:46 -08:00
crash_dump.c
dma_64.c [POWERPC] Make direct DMA use node local allocations 2006-12-04 20:38:59 +11:00
entry_32.S
entry_64.S [POWERPC] Fix manual assembly WARN_ON() in enter_rtas(). 2007-01-09 17:03:02 +11:00
firmware.c
fpu.S
head_4xx.S
head_8xx.S
head_32.S [POWERPC] Add support for FP emulation for the e300c2 core 2006-12-08 02:43:30 -06:00
head_44x.S
head_64.S [POWERPC] iSeries: Eliminate "exceeds stub group size" warnings 2006-12-04 20:41:31 +11:00
head_booke.h
head_fsl_booke.S
ibmebus.c [POWERPC] Replace kmalloc+memset with kzalloc 2006-12-04 20:42:09 +11:00
idle.c [POWERPC] cell: use ppc_md->power_save instead of cbe_idle_loop 2006-10-25 14:20:22 +10:00
idle_6xx.S
idle_power4.S [POWERPC] Lazy interrupt disabling for 64-bit machines 2006-10-16 16:31:36 +10:00
init_task.c [PATCH] nsproxy: move init_nsproxy into kernel/nsproxy.c 2006-10-02 07:57:20 -07:00
io.c [POWERPC] Merge 32 and 64 bits asm-powerpc/io.h 2006-12-04 20:39:05 +11:00
iomap.c [POWERPC] Merge 32 and 64 bits asm-powerpc/io.h 2006-12-04 20:39:05 +11:00
iommu.c [POWERPC] Refactor 64 bits DMA operations 2006-12-04 20:38:40 +11:00
irq.c [POWERPC] Make soft_enabled irqs preempt safe 2006-12-04 20:39:20 +11:00
kprobes.c [PATCH] kprobes: enable booster on the preemptible kernel 2006-12-07 08:39:38 -08:00
l2cr_6xx.S
legacy_serial.c
lparcfg.c
lparmap.c
machine_kexec.c
machine_kexec_32.c
machine_kexec_64.c
Makefile [POWERPC] iSeries: head_64.o needs to depend on lparmap.s 2006-12-08 17:21:06 +11:00
misc.S
misc_32.S [POWERPC] Consolidate feature fixup code 2006-10-25 11:42:10 +10:00
misc_64.S [POWERPC] Consolidate feature fixup code 2006-10-25 11:42:10 +10:00
module_32.c [POWERPC] Generic BUG for powerpc 2006-12-11 16:35:07 +11:00
module_64.c [POWERPC] Generic BUG for powerpc 2006-12-11 16:35:07 +11:00
nvram_64.c [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
of_device.c [POWERPC] of_device_register: propagate device_create_file return code 2006-12-08 02:23:07 -06:00
of_platform.c [POWERPC] powerpc: add scanning of ebc bus to of_platform 2006-12-19 15:35:40 +01:00
paca.c
pci_32.c [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
pci_64.c [POWERPC] Fix PCI device channel state initialization 2006-12-20 16:37:49 +11:00
pci_dn.c
pmc.c [POWERPC] Fix oprofile support for e500 in arch/powerpc 2006-11-01 14:52:48 +11:00
ppc32.h
ppc_ksyms.c [POWERPC] Only export __mtdcr/__mfdcr if CONFIG_PPC_DCR is set 2006-12-10 23:15:47 -06:00
proc_ppc64.c [PATCH] struct path: convert powerpc 2006-12-08 08:28:48 -08:00
process.c [POWERPC] Better check in show_instructions 2006-10-16 15:53:30 +10:00
prom.c [POWERPC] Support ibm,dynamic-reconfiguration-memory nodes 2006-12-11 13:49:49 +11:00
prom_init.c [POWERPC] Support ibm,dynamic-reconfiguration-memory nodes 2006-12-11 13:49:49 +11:00
prom_parse.c [POWERPC] Workaround oldworld OF bug with IRQs & P2P bridges 2006-12-20 16:37:47 +11:00
ptrace-common.h
ptrace.c
ptrace32.c
rtas-proc.c
rtas-rtc.c
rtas.c [POWERPC] Add rtas_service_present() helper 2006-12-08 17:10:22 +11:00
rtas_flash.c [PATCH] struct path: convert powerpc 2006-12-08 08:28:48 -08:00
rtas_pci.c [POWERPC] Merge 32 and 64 bits asm-powerpc/io.h 2006-12-04 20:39:05 +11:00
semaphore.c
setup-common.c [POWERPC] Fix xmon=off and cleanup xmon initialisation 2006-10-04 14:52:22 +10:00
setup.h
setup_32.c [POWERPC] Distinguish POWER6 partition modes and tell userspace 2006-12-04 20:40:16 +11:00
setup_64.c [POWERPC] Distinguish POWER6 partition modes and tell userspace 2006-12-04 20:40:16 +11:00
signal_32.c [POWERPC] Fix register save area alignment for swapcontext syscall 2006-12-20 16:37:49 +11:00
signal_64.c
smp-tbsync.c [POWERPC] Replace kmalloc+memset with kzalloc 2006-12-04 20:42:09 +11:00
smp.c [PATCH] Change cpu_up and co from __devinit to __cpuinit 2007-01-11 18:18:20 -08:00
swsusp_32.S
sys_ppc32.c [POWERPC] fix missing #include in sys_ppc32.c 2006-12-04 20:41:19 +11:00
syscalls.c [PATCH] namespaces: utsname: switch to using uts namespaces 2006-10-02 07:57:21 -07:00
sysfs.c [POWERPC] Add SPURR SPR to sysfs 2006-12-09 11:39:06 +11:00
systbl.S
tau_6xx.c
time.c [POWERPC] iSeries: fix time.c for combined build 2006-12-04 20:39:15 +11:00
traps.c [POWERPC] Generic BUG for powerpc 2006-12-11 16:35:07 +11:00
udbg.c
udbg_16550.c
vdso.c [PATCH] slab: remove SLAB_KERNEL 2006-12-07 08:39:24 -08:00
vecemu.c
vector.S
vio.c [POWERPC] Refactor 64 bits DMA operations 2006-12-04 20:38:40 +11:00
vmlinux.lds.S [POWERPC] Generic BUG for powerpc 2006-12-11 16:35:07 +11:00