Getting rid of mainline and getting Linaro list in..
On Tue, May 7, 2013 at 11:21 AM, giridhar.maruthy@linaro.org wrote:
From: Giridhar Maruthy giridhar.maruthy@linaro.org
In intial boot-up, u-boot commit "3d28a181aab5e... arndale5250: Boot in Hyp mode and enable architected timers" puts the CPUs in HYP mode.
Hence, the CPUs need to be put in HYP mode when they are hot plugged out and plugged in back.
This patch is almost same as above u-boot patch, it additionally takes care if the kernel is compiled with thumb-2 option.
Signed-off-by: Giridhar Maruthy giridhar.m@samsung.com Signed-off-by: Inderpal Singh inderpal.singh@linaro.org
arch/arm/mach-exynos/headsmp.S | 114 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+)
I have been using this patch recently on mainline kernel and LNG kernel to get CPU hotplug working. Recently we saw crashes in LNG kernel even if this patch was in and found that this patch doesn't work well in case CONFIG_THUMB2_KERNEL is enabled in kernel. LNG kernels have that enabled by default..
[ 126.028362] IRQ153 no longer affine to CPU1 [ 126.028732] CPU1: shutdown [ 126.028771] Internal error: Oops - undefined instruction: 0 [#1] PREEMPT SMP THUMB2 [ 126.028796] Modules linked in: [ 126.028846] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.12.9-00184-g0e7f8d5 #35 [ 126.028878] task: ef09e080 ti: ef0be000 task.ti: ef0be000 [ 126.028905] PC is at 0xc065e6ae [ 126.028958] LR is at exynos_cpu_die+0x4f/0xc4 [ 126.029014] pc : [<c065e6ae>] lr : [<c025b06f>] psr: 60070093 [ 126.029014] sp : ef0bffc8 ip : 00000001 fp : 00000000 [ 126.029043] r10: 00000000 r9 : 00000001 r8 : c03fc98f [ 126.029081] r7 : 00000000 r6 : f8182080 r5 : c03cfc60 r4 : c03cfa9c [ 126.029118] r3 : 02000002 r2 : 00000000 r1 : 701fe00a r0 : 00000001 [ 126.029151] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel [ 126.029186] Control: 50c53879 Table: 4000406a DAC: 00000015 [ 126.029219] Process swapper/1 (pid: 0, stack limit = 0xef0be240) [ 126.029248] Stack: (0xef0bffc8 to 0xef0c0000) [ 126.029309] ffc0: 00000001 00000001 c02629a4 00000001 c03cc44c c02629a4 [ 126.029385] ffe0: c03fc98f c025aff7 ef0be000 c003e435 c03fccf8 400084c9 ffffffff ffffbfff [ 126.029505] [<c025b06f>] (exynos_cpu_die+0x4f/0xc4) from [<c025aff7>] (cpu_die+0x27/0x50) [ 126.029639] [<c025aff7>] (cpu_die+0x27/0x50) from [<c003e435>] (cpu_startup_entry+0xbd/0xe8) [ 126.029750] [<c003e435>] (cpu_startup_entry+0xbd/0xe8) from [<400084c9>] (0x400084c9) [ 126.029809] Code: 00000000 00005000 00000000 ffff0000 (0000ffff) [ 126.029838] ---[ end trace fbec164dd7bcae1c ]--- [ 126.029868] Kernel panic - not syncing: Attempted to kill the idle task! [ 126.173782] CPU0: stopping [ 126.176429] CPU: 0 PID: 1962 Comm: bash Tainted: G D 3.12.9-00184-g0e7f8d5 #35 [ 126.184394] [<c00110ad>] (unwind_backtrace+0x1/0x98) from [<c000ee53>] (show_stack+0xb/0xc) [ 126.192584] [<c000ee53>] (show_stack+0xb/0xc) from [<c025d613>] (dump_stack+0x4b/0x7c) [ 126.200354] [<c025d613>] (dump_stack+0x4b/0x7c) from [<c00107c3>] (handle_IPI+0xa3/0xc4) [ 126.208295] [<c00107c3>] (handle_IPI+0xa3/0xc4) from [<c000842d>] (gic_handle_irq+0x4d/0x54) [ 126.216582] [<c000842d>] (gic_handle_irq+0x4d/0x54) from [<c000f65b>] (__irq_svc+0x3b/0x80) [ 126.224775] Exception stack(0xee05fde8 to 0xee05fe30) [ 126.229727] fde0: 00000000 c1462390 ee05fe28 00000000 0000000e 00000001 [ 126.237759] fe00: c03d37ac c03ffb18 00000000 00000000 00000000 60070013 00000020 ee05fe30 [ 126.245785] fe20: c003cf41 c003d558 40070033 ffffffff [ 126.250748] [<c000f65b>] (__irq_svc+0x3b/0x80) from [<c003d558>] (vprintk_emit+0x158/0x370) [ 126.258947] [<c003d558>] (vprintk_emit+0x158/0x370) from [<c025bbdd>] (printk+0x21/0x2c) [ 126.266887] [<c025bbdd>] (printk+0x21/0x2c) from [<c00104e3>] (__cpu_die+0x1f/0x58) [ 126.274402] [<c00104e3>] (__cpu_die+0x1f/0x58) from [<c025b1f7>] (_cpu_down+0xa7/0x198) [ 126.282260] [<c025b1f7>] (_cpu_down+0xa7/0x198) from [<c025b2fd>] (cpu_down+0x15/0x28) [ 126.290036] [<c025b2fd>] (cpu_down+0x15/0x28) from [<c017571d>] (device_offline+0x4d/0x74) [ 126.298150] [<c017571d>] (device_offline+0x4d/0x74) from [<c01757c1>] (online_store+0x29/0x44) [ 126.306605] [<c01757c1>] (online_store+0x29/0x44) from [<c01741cb>] (dev_attr_store+0xb/0x14) [ 126.314978] [<c01741cb>] (dev_attr_store+0xb/0x14) from [<c00b64c5>] (sysfs_write_file+0xe5/0x10c) [ 126.323775] [<c00b64c5>] (sysfs_write_file+0xe5/0x10c) from [<c007c2b9>] (vfs_write+0x6d/0x104) [ 126.332312] [<c007c2b9>] (vfs_write+0x6d/0x104) from [<c007c53d>] (SyS_write+0x29/0x4c) [ 126.340170] [<c007c53d>] (SyS_write+0x29/0x4c) from [<c000cba1>] (ret_fast_syscall+0x1/0x46)
Don't know why we need that for though (i.e. the config option)..
-- viresh