ARM: Allow SMP kernels to boot on UP systems
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 4 Sep 2010 09:47:48 +0000 (10:47 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 4 Oct 2010 19:23:36 +0000 (20:23 +0100)
commitf00ec48fadf5e37e7889f14cff900aa70d18b644
tree421cbce97167a78532aa825624f380caade3c0d2
parent067173526c3bbc2eaeefcf6b7b2a9d998b9e8042
ARM: Allow SMP kernels to boot on UP systems

UP systems do not implement all the instructions that SMP systems have,
so in order to boot a SMP kernel on a UP system, we need to rewrite
parts of the kernel.

Do this using an 'alternatives' scheme, where the kernel code and data
is modified prior to initialization to replace the SMP instructions,
thereby rendering the problematical code ineffectual.  We use the linker
to generate a list of 32-bit word locations and their replacement values,
and run through these replacements when we detect a UP system.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 files changed:
arch/arm/Kconfig
arch/arm/include/asm/assembler.h
arch/arm/include/asm/smp_mpidr.h
arch/arm/include/asm/smp_plat.h
arch/arm/include/asm/tlbflush.h
arch/arm/kernel/entry-armv.S
arch/arm/kernel/head.S
arch/arm/kernel/setup.c
arch/arm/kernel/vmlinux.lds.S
arch/arm/mm/cache-v7.S
arch/arm/mm/mmu.c
arch/arm/mm/proc-v6.S
arch/arm/mm/proc-v7.S
arch/arm/mm/tlb-v7.S