Skip to content

Hacks to allow booting ARM SMP kernel on UP ARMv7

Tony Lindgren linux-arm-kernel linux-omap 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 4 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 4 patches the cover letter announces are in this archive.

Reviews trailers per patch

PatchSantosh Shilimkar
SeriesA-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] Hacks to allow booting ARM SMP kernel on UP ARMv7
Quoted 9 lines · Tony Lindgren
Quoted 8 lines · Russell King - ARM Linux

Here's my latest patch (which is combined from two patches.)

Tony, could you follow up with patches for anything which is still required - I think there's two things you've addressed which this currently misses:

1. not initializing twd_base (I'm not convinced this is safe - rather making smp_prepare_cpus() return early is probably a better idea.)

Looks like the omap spefific fix needed now is for the localtimer, and that can be now checked with cpu_is_omap44xx() as Santosh suggested earlier. Will post that shortly.

Quoted 4 lines
Quoted 4 lines

2. __flush_icache_all()

Note that (2) seems to be complicated by the instruction only being available on ARMv7 and later.

This is still open and needs to be fixed somehow..

Then the following patch is needed to fix compile if CONFIG_SMP is not set.

Other than that, things are actually quite close to working. Will post three more patches as a reply to this mail that allow me to boot to shell with the same SMP kernel binary on omap2, 3 & 4 more or less.

Need to track down some .config file strangeness though tomorrow to figure out what is causing the WARNING: at mm/percpu-vm.c:320 pcpu_alloc messages again.

Regards,

Tony

From: Tony Lindgren <[email protected]>
Date: Tue, 7 Sep 2010 19:09:57 -0700
Subject: [PATCH] ARM: Fix smp_on_up compile when CONFIG_SMP is not set

Fix undefined reference to smp_init_cpus()
and error for the discarded section:

ld:arch/arm/kernel/vmlinux.lds:517: syntax error

arch/arm/kernel/setup.c +2 -0
index fe94467..5a82c39 100644
@@ -825,8 +825,10 @@ void __init setup_arch(char **cmdline_p)
 	paging_init(mdesc);
 	request_standard_resources(&meminfo, mdesc);
 
+#ifdef CONFIG_SMP
 	if (is_smp())
 		smp_init_cpus();
+#endif
 	reserve_crashkernel();
 
 	cpu_init();
arch/arm/kernel/vmlinux.lds.S +1 -1
index 53cb57e..b721e8b 100644
@@ -244,7 +244,7 @@ SECTIONS
 	DISCARDS
 
 #ifndef CONFIG_SMP_ON_UP
-	/DISCARD/ {
+	/DISCARD/ : {
 		*(.smpalt.init)
 	}
 #endif