alistair23-linux/arch/powerpc
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
..
boot [POWERPC] Fix mpc52xx fdt to use correct device_type for sound devices 2007-01-09 17:03:02 +11:00
configs [POWERPC] Add legacy iSeries to ppc64_defconfig 2007-01-09 17:03:02 +11:00
kernel [PATCH] Change cpu_up and co from __devinit to __cpuinit 2007-01-11 18:18:20 -08:00
lib [POWERPC] Disallow kprobes on emulate_step and branch_taken 2006-11-01 15:14:12 +11:00
math-emu [POWERPC] ppc math-emu needs -fno-builtin-fabs for math.c and fabs.c 2006-09-26 15:24:35 +10:00
mm [POWERPC] Fix bogus BUG_ON() in in hugetlb_get_unmapped_area() 2007-01-09 17:03:01 +11:00
oprofile [POWERPC] ps3: multiplatform build fixes 2006-12-04 20:41:16 +11:00
platforms [POWERPC] Fix bugs in the hypervisor call stats code 2007-01-09 17:03:03 +11:00
sysdev [POWERPC] Don't include powerpc/sysdev/rom.o for arch/ppc builds 2007-01-09 17:03:02 +11:00
xmon [POWERPC] Generic BUG for powerpc 2006-12-11 16:35:07 +11:00
.gitignore [POWERPC] Add files build to .gitignore 2006-12-04 20:41:29 +11:00
Kconfig [POWERPC] disable PReP and EFIKA during make oldconfig 2007-01-09 17:03:02 +11:00
Kconfig.debug [POWERPC] Allow CONFIG_BOOTX_TEXT on iSeries 2006-12-04 20:41:58 +11:00
Makefile [POWERPC] Create a "wrapper" script and use it in arch/powerpc/boot 2006-09-28 14:30:02 +10:00