android_kernel_xiaomi_sm8350/arch/mips
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
..
arc Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
au1000 [MIPS] Alchemy: Fix PCI-memory access 2007-01-10 20:02:24 +00:00
basler/excite [MIPS] Complete fixes after removal of pt_regs argument to int handlers. 2006-10-08 02:38:28 +01:00
boot
cobalt [MIPS] Rewrite GALILEO_INL/GALILEO_OUTL to GT_READ/GT_WRITE 2006-11-30 01:14:43 +00:00
configs [MIPS] Malta: Resurrect MTD support for onboard flash. 2006-12-12 01:46:24 +00:00
ddb5xxx [MIPS] IRQ cleanups 2006-11-30 01:14:46 +00:00
dec [MIPS] *-berr: Header inclusions for DEC bus error handlers 2006-12-06 20:16:09 +00:00
emma2rh [MIPS] Compile __do_IRQ() when really needed 2006-12-06 20:16:08 +00:00
gt64120 [MIPS] IRQ cleanups 2006-11-30 01:14:46 +00:00
jazz [MIPS] Compile __do_IRQ() when really needed 2006-12-06 20:16:08 +00:00
jmr3927 [MIPS] mips HPT cleanup: make clocksource_mips public 2006-11-30 01:14:49 +00:00
kernel [PATCH] Change cpu_up and co from __devinit to __cpuinit 2007-01-11 18:18:20 -08:00
lasat [PATCH] sysctl: remove unused "context" param 2006-12-10 09:55:41 -08:00
lib [MIPS] csum_partial and copy in parallel 2007-01-08 21:41:04 +00:00
lib-32 [MIPS] Unify csum_partial.S 2006-12-04 22:43:13 +00:00
lib-64 [MIPS] Unify csum_partial.S 2006-12-04 22:43:13 +00:00
math-emu [MIPS] Make sure cpu_has_fpu is used only in atomic context 2006-10-09 23:20:48 +01:00
mips-boards [MIPS] Fix build errors on SEAD 2007-01-08 21:41:04 +00:00
mm [MIPS] TX49: Fix use of CDEX build_store_reg() 2007-01-08 21:41:04 +00:00
momentum [MIPS] Compile __do_IRQ() when really needed 2006-12-06 20:16:08 +00:00
oprofile [MIPS] Oprofile: kernel support for the R10000. 2006-11-30 01:14:45 +00:00
pci [MIPS] pnx8550: Fix write_config_byte() PCI config space accessor 2007-01-08 21:41:04 +00:00
philips/pnx8550 [MIPS] PNX8550: Fix system timer initialization 2007-01-10 20:02:23 +00:00
pmc-sierra [MIPS] mips hpt cleanup: get rid of mips_hpt_init 2006-11-30 01:14:46 +00:00
qemu [MIPS] Complete fixes after removal of pt_regs argument to int handlers. 2006-10-08 02:38:28 +01:00
sgi-ip22 [MIPS] Compile __do_IRQ() when really needed 2006-12-06 20:16:08 +00:00
sgi-ip27 [MIPS] Compile __do_IRQ() when really needed 2006-12-06 20:16:08 +00:00
sgi-ip32 [MIPS] IRQ cleanups 2006-11-30 01:14:46 +00:00
sibyte [MIPS] SWARM: Fix a typo in #error directives 2006-12-04 22:43:13 +00:00
sni [MIPS] IRQ cleanups 2006-11-30 01:14:46 +00:00
tx4927 [MIPS] Add GENERIC_HARDIRQS_NO__DO_IRQ for i8259 users 2006-12-09 01:04:00 +00:00
tx4938 [MIPS] Compile __do_IRQ() when really needed 2006-12-06 20:16:08 +00:00
vr41xx [MIPS] Add GENERIC_HARDIRQS_NO__DO_IRQ for i8259 users 2006-12-09 01:04:00 +00:00
defconfig [MIPS] Rename SNI_RM200_PCI to just SNI_RM preparing for more RM machines 2006-12-09 01:03:58 +00:00
Kconfig [PATCH] add STB810 support (Philips PNX8550-based) 2006-12-09 01:04:00 +00:00
Kconfig.debug [MIPS] TRACE_IRQFLAGS_SUPPORT support. 2006-07-13 21:26:09 +01:00
Makefile [PATCH] add STB810 support (Philips PNX8550-based) 2006-12-09 01:04:00 +00:00