android_kernel_xiaomi_sm8350/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
vdso64
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
compat_audit.c
cpu_setup_6xx.S
cpu_setup_ppc970.S
cputable.c [POWERPC] Fix 440SPe CPU table entry 2006-12-08 02:45:38 -06:00
crash_dump.c
crash.c [PATCH] Kexec / Kdump: Unify elf note code 2006-12-07 08:39:46 -08:00
dma_64.c
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
head_booke.h
head_fsl_booke.S
ibmebus.c
idle_6xx.S
idle_power4.S
idle.c
init_task.c
io.c
iomap.c
iommu.c
irq.c
kprobes.c
l2cr_6xx.S
legacy_serial.c
lparcfg.c
lparmap.c
machine_kexec_32.c
machine_kexec_64.c
machine_kexec.c
Makefile [POWERPC] iSeries: head_64.o needs to depend on lparmap.s 2006-12-08 17:21:06 +11:00
misc_32.S
misc_64.S
misc.S
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
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
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
prom.c [POWERPC] Support ibm,dynamic-reconfiguration-memory nodes 2006-12-11 13:49:49 +11:00
ptrace32.c
ptrace-common.h
ptrace.c
rtas_flash.c [PATCH] struct path: convert powerpc 2006-12-08 08:28:48 -08:00
rtas_pci.c
rtas-proc.c
rtas-rtc.c
rtas.c [POWERPC] Add rtas_service_present() helper 2006-12-08 17:10:22 +11:00
semaphore.c
setup_32.c
setup_64.c
setup-common.c
setup.h
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
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
syscalls.c
sysfs.c [POWERPC] Add SPURR SPR to sysfs 2006-12-09 11:39:06 +11:00
systbl.S
tau_6xx.c
time.c
traps.c [POWERPC] Generic BUG for powerpc 2006-12-11 16:35:07 +11:00
udbg_16550.c
udbg.c
vdso.c
vecemu.c
vector.S
vio.c
vmlinux.lds.S [POWERPC] Generic BUG for powerpc 2006-12-11 16:35:07 +11:00