linux-stable-rt/arch/m32r/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
..
Makefile [PATCH] m32r: Support M32104UT target platform 2006-01-06 08:33:43 -08:00
align.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
asm-offsets.c kbuild: frv,m32r,sparc64 introduce fake asm-offsets.h file 2005-09-09 22:47:53 +02:00
entry.S [PATCH] m32r: fix ace_handler to pass full 32-bit address 2006-12-08 08:28:37 -08:00
head.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
init_task.c [PATCH] nsproxy: move init_nsproxy into kernel/nsproxy.c 2006-10-02 07:57:20 -07:00
io_m32104ut.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
io_m32700ut.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
io_mappi.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
io_mappi2.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
io_mappi3.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
io_oaks32r.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
io_opsput.c [PATCH] m32r: bootloader support for OPSPUT platform 2006-12-08 08:28:37 -08:00
io_usrv.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
irq.c [PATCH] m32r pt_regs fixes 2006-10-07 10:51:15 -07:00
m32r_ksyms.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
module.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
process.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
ptrace.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
semaphore.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
setup.c [PATCH] initrd: remove unused false condition for initrd_start 2006-12-07 08:39:38 -08:00
setup_m32104ut.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
setup_m32700ut.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
setup_mappi.c [PATCH] m32r: NULL noise removal 2006-10-11 11:17:06 -07:00
setup_mappi2.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
setup_mappi3.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
setup_oaks32r.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
setup_opsput.c [PATCH] m32r: bootloader support for OPSPUT platform 2006-12-08 08:28:37 -08:00
setup_usrv.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
signal.c [PATCH] Add include/linux/freezer.h and move definitions from sched.h 2006-12-07 08:39:27 -08:00
smp.c [PATCH] m32r: NULL noise removal 2006-10-11 11:17:06 -07:00
smpboot.c [PATCH] Change cpu_up and co from __devinit to __cpuinit 2007-01-11 18:18:20 -08:00
sys_m32r.c [PATCH] m32r: more __user annotations 2006-10-11 11:17:06 -07:00
time.c [PATCH] m32r pt_regs fixes 2006-10-07 10:51:15 -07:00
traps.c [PATCH] m32r: NULL noise removal 2006-10-11 11:17:06 -07:00
vmlinux.lds.S [PATCH] vmlinux.lds: consolidate initcall sections 2006-10-27 15:34:51 -07:00