alistair23-linux/arch/mips/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
..
apm.c [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
asm-offsets.c [MIPS] 16K & 64K page size fixes 2006-11-01 17:46:09 +00:00
binfmt_elfn32.c [PATCH] elf: Always define elf_addr_t in linux/elf.h 2006-12-07 08:39:38 -08:00
binfmt_elfo32.c [PATCH] elf: Always define elf_addr_t in linux/elf.h 2006-12-07 08:39:38 -08:00
branch.c
cpu-bugs64.c
cpu-probe.c [MIPS] Don't print presence of WAIT instruction on bootup. 2006-11-30 01:14:44 +00:00
entry.S [MIPS] SMTC: Fix crash if # of TC's > # of VPE's after pt_regs irq cleanup. 2006-11-01 17:46:09 +00:00
gdb-low.S
gdb-stub.c
genex.S [MIPS] Fast path for rdhwr emulation for TLS 2006-11-30 01:14:44 +00:00
head.S [MIPS] Qemu now has an ELF loader. 2006-12-09 01:04:00 +00:00
i8253.c
i8259.c [MIPS] Import updates from i386's i8259.c 2006-12-06 20:16:09 +00:00
init_task.c
irix5sys.S
irixelf.c [PATCH] add process_session() helper routine 2006-12-08 08:28:51 -08:00
irixinv.c
irixioctl.c
irixsig.c
irq-msc01.c [MIPS] use generic_handle_irq, handle_level_irq, handle_percpu_irq 2006-11-30 01:14:46 +00:00
irq-mv6434x.c [MIPS] Compile __do_IRQ() when really needed 2006-12-06 20:16:08 +00:00
irq-rm7000.c [MIPS] Compile __do_IRQ() when really needed 2006-12-06 20:16:08 +00:00
irq-rm9000.c [MIPS] Compile __do_IRQ() when really needed 2006-12-06 20:16:08 +00:00
irq.c [MIPS] genirq: use name instead of typename 2006-12-06 20:16:08 +00:00
irq_cpu.c [MIPS] Compile __do_IRQ() when really needed 2006-12-06 20:16:08 +00:00
kspd.c [PATCH] fdtable: Make fdarray and fdsets equal in size 2006-12-10 09:57:22 -08:00
linux32.c [MIPS] Fix N32 SysV IPC routines 2007-01-10 20:02:24 +00:00
machine_kexec.c [MIPS] Add support for kexec 2006-11-30 01:14:44 +00:00
Makefile [MIPS] Remove duplicate ISA DMA code for 0 DMA channel case. 2006-11-30 01:14:51 +00:00
mips-mt.c
mips_ksyms.c [MIPS] csum_partial and copy in parallel 2007-01-08 21:41:04 +00:00
module.c [MIPS] Load modules to CKSEG0 if CONFIG_BUILD_ELF64=n 2006-11-30 01:14:44 +00:00
proc.c
process.c
ptrace.c
ptrace32.c
r4k_fpu.S
r4k_switch.S [MIPS] 16K & 64K page size fixes 2006-11-01 17:46:09 +00:00
r2300_fpu.S
r2300_switch.S
r6000_fpu.S
relocate_kernel.S [MIPS] Add support for kexec 2006-11-30 01:14:44 +00:00
reset.c [MIPS] Export pm_power_off 2006-12-10 21:52:11 +00:00
rtlx.c [PATCH] struct path: convert mips 2006-12-08 08:28:47 -08:00
scall32-o32.S [MIPS] Add support for kexec 2006-11-30 01:14:44 +00:00
scall64-64.S [MIPS] Add support for kexec 2006-11-30 01:14:44 +00:00
scall64-n32.S [MIPS] Fix N32 SysV IPC routines 2007-01-10 20:02:24 +00:00
scall64-o32.S [MIPS] Add support for kexec 2006-11-30 01:14:44 +00:00
semaphore.c
setup.c [MIPS] setup.c: clean up initrd related code 2006-11-30 01:14:42 +00:00
signal-common.h
signal.c
signal32.c
signal_n32.c [MIPS] Fix double inclusions 2006-11-30 01:14:47 +00:00
smp-mt.c [MIPS] use generic_handle_irq, handle_level_irq, handle_percpu_irq 2006-11-30 01:14:46 +00:00
smp.c [PATCH] Change cpu_up and co from __devinit to __cpuinit 2007-01-11 18:18:20 -08:00
smtc-asm.S [MIPS] SMTC: Fix crash if # of TC's > # of VPE's after pt_regs irq cleanup. 2006-11-01 17:46:09 +00:00
smtc-proc.c
smtc.c [MIPS] use generic_handle_irq, handle_level_irq, handle_percpu_irq 2006-11-30 01:14:46 +00:00
stacktrace.c
syscall.c
sysirix.c [PATCH] struct path: convert mips 2006-12-08 08:28:47 -08:00
time.c [MIPS] PNX8550: Fix system timer support 2007-01-08 21:41:04 +00:00
topology.c [MIPS] Do topology_init even on uniprocessor kernels. 2006-11-29 16:21:34 +00:00
traps.c [MIPS] Use conditional traps for BUG_ON on MIPS II and better. 2006-11-30 01:14:50 +00:00
unaligned.c
vmlinux.lds.S [MIPS] Discard .exit.text and .exit.data at runtime. 2006-12-12 01:46:24 +00:00
vpe.c [PATCH] struct path: convert mips 2006-12-08 08:28:47 -08:00