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
Hi Viresh,
On 10 February 2014 20:49, Viresh Kumar viresh.kumar@linaro.org wrote:
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..
I tested this scenario with the latest linux-next kernel with the subject patch applied and thumb-2 mode enabled. I could successfully hotplug in/out CPU1 a couple of times. However, if done back to back it hangs (without any crash dump even with low level debug enabled). Is this the same behavior that you observe?
On 13 February 2014 14:11, Sachin Kamat sachin.kamat@linaro.org wrote:
I tested this scenario with the latest linux-next kernel with the subject patch applied and thumb-2 mode enabled. I could successfully hotplug in/out CPU1 a couple of times. However, if done back to back it hangs (without any crash dump even with low level debug enabled). Is this the same behavior that you observe?
Hmm.. Not at all..
I just tested this on latest linux-next: d24511f ARM: EXYNOS: Fix hotplug when CPUs are booted in HYP mode fb4a940 Add linux-next specific files for 20140213 b816300 Merge branch 'akpm/master'
With $subject patch applied (attached too)..
And this is what I get on a ubuntu system (attaching my .config as well which I made from exynos_defconfig+THUMB2)..
oot@linaro-developer:/home/linaro# echo 0 > /sys/devices/system/cpu/cpu1/online [ 135.320091] Unable to handle kernel paging request at virtual address c0670a98 [ 135.320097] CPU1: shutdown [ 135.320112] pgd = ed7dc000 [ 135.320168] [c0670a98] *pgd=4061141e(bad) [ 135.320210] Internal error: Oops: 8000000d [#1] PREEMPT SMP THUMB2 [ 135.320239] Modules linked in: [ 135.320309] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.14.0-rc2-next-20140213-00001-gd24511f #182 [ 135.320356] task: ee096580 ti: ee0d2000 task.ti: ee0d2000 [ 135.320390] PC is at 0xc0670a98 [ 135.320457] LR is at exynos_cpu_die+0x4f/0xc4 [ 135.320530] pc : [<c0670a98>] lr : [<c026d45b>] psr: 60070093 [ 135.320530] sp : ee0d3fc0 ip : 00000001 fp : ee0d2000 [ 135.320566] r10: ee0d2000 r9 : c041f8d9 r8 : 00000001 [ 135.320616] r7 : 00000000 r6 : f8182080 r5 : c03efd30 r4 : c03efb54 [ 135.320665] r3 : 02000002 r2 : 00000000 r1 : 701fe00a r0 : 00000001 [ 135.320713] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel [ 135.320761] Control: 50c53879 Table: 4000406a DAC: 00000015 [ 135.320802] Process swapper/1 (pid: 0, stack limit = 0xee0d2240) [ 135.320844] Stack: (0xee0d3fc0 to 0xee0d4000) [ 135.320952] 3fc0: 00000001 00000001 c0276bb0 00000001 c03ec480 c0276bb0 c041f8d9 c026d3d7 [ 135.321063] 3fe0: ee0d2000 c003ab09 c00084b1 c041fe38 00000000 400084c9 bffeffff ffffffff [ 135.321180] [<c026d45b>] (exynos_cpu_die) from [<c026d3d7>] (cpu_die+0x27/0x5c) [ 135.321296] [<c026d3d7>] (cpu_die) from [<c003ab09>] (cpu_startup_entry+0xb5/0xec) [ 135.321383] [<c003ab09>] (cpu_startup_entry) from [<400084c9>] (0x400084c9) [ 135.321464] Code: dd95f42e 6f4a38c6 dbeebfc7 93b9ebd1 (475e59fa) [ 135.321495] ---[ end trace 8a3306598cba855b ]--- [ 135.321532] Kernel panic - not syncing: Attempted to kill the idle task! [ 135.474813] CPU0: stopping [ 135.477505] CPU: 0 PID: 1910 Comm: bash Tainted: G D 3.14.0-rc2-next-20140213-00001-gd24511f #182 [ 135.487246] [<c0011175>] (unwind_backtrace) from [<c000ee93>] (show_stack+0xb/0xc) [ 135.494789] [<c000ee93>] (show_stack) from [<c026f8ff>] (dump_stack+0x4b/0x80) [ 135.501989] [<c026f8ff>] (dump_stack) from [<c00108af>] (handle_IPI+0xcb/0xf4) [ 135.509192] [<c00108af>] (handle_IPI) from [<c000842d>] (gic_handle_irq+0x4d/0x54) [ 135.516745] [<c000842d>] (gic_handle_irq) from [<c000f69b>] (__irq_svc+0x3b/0x80) [ 135.524204] Exception stack(0xed011dd0 to 0xed011e18) [ 135.529236] 1dc0: 00000000 ee7c1354 00000000 00000000 [ 135.537401] 1de0: 0000000e 00000001 c03f2864 c0422f48 00000000 00000000 00000000 60070013 [ 135.545559] 1e00: 00000020 ed011e18 c0040919 c0040ec0 40070033 ffffffff [ 135.552158] [<c000f69b>] (__irq_svc) from [<c0040ec0>] (vprintk_emit+0x14c/0x358) [ 135.559624] [<c0040ec0>] (vprintk_emit) from [<c026e195>] (printk+0x21/0x2c) [ 135.566651] [<c026e195>] (printk) from [<c0010553>] (__cpu_die+0x1f/0x58) [ 135.573421] [<c0010553>] (__cpu_die) from [<c026d5e5>] (_cpu_down+0xa9/0x194) [ 135.580539] [<c026d5e5>] (_cpu_down) from [<c026d6e5>] (cpu_down+0x15/0x28) [ 135.587484] [<c026d6e5>] (cpu_down) from [<c0180c49>] (device_offline+0x4d/0x74) [ 135.594863] [<c0180c49>] (device_offline) from [<c0180ced>] (online_store+0x29/0x44) [ 135.602592] [<c0180ced>] (online_store) from [<c017f7ff>] (dev_attr_store+0xb/0x14) [ 135.610232] [<c017f7ff>] (dev_attr_store) from [<c00bcc35>] (sysfs_kf_write+0x21/0x24) [ 135.618129] [<c00bcc35>] (sysfs_kf_write) from [<c00bc6dd>] (kernfs_fop_write+0x8d/0x110) [ 135.626288] [<c00bc6dd>] (kernfs_fop_write) from [<c0080cc9>] (vfs_write+0x69/0x100) [ 135.634012] [<c0080cc9>] (vfs_write) from [<c0080f45>] (SyS_write+0x29/0x4c) [ 135.641039] [<c0080f45>] (SyS_write) from [<c000cbe1>] (ret_fast_syscall+0x1/0x46)
Hi Viresh,
On 13 February 2014 14:27, Viresh Kumar viresh.kumar@linaro.org wrote:
On 13 February 2014 14:11, Sachin Kamat sachin.kamat@linaro.org wrote:
I tested this scenario with the latest linux-next kernel with the subject patch applied and thumb-2 mode enabled. I could successfully hotplug in/out CPU1 a couple of times. However, if done back to back it hangs (without any crash dump even with low level debug enabled). Is this the same behavior that you observe?
Hmm.. Not at all..
I just tested this on latest linux-next: d24511f ARM: EXYNOS: Fix hotplug when CPUs are booted in HYP mode fb4a940 Add linux-next specific files for 20140213 b816300 Merge branch 'akpm/master'
With $subject patch applied (attached too)..
And this is what I get on a ubuntu system (attaching my .config as well which I made from exynos_defconfig+THUMB2)..
With your attached patch, I too observe a similar crash with the above mentioned configuration (exynos_defconfig + THUMB2).
On 13 February 2014 15:48, Sachin Kamat sachin.kamat@linaro.org wrote:
Hi Viresh,
On 13 February 2014 14:27, Viresh Kumar viresh.kumar@linaro.org wrote:
On 13 February 2014 14:11, Sachin Kamat sachin.kamat@linaro.org wrote:
I tested this scenario with the latest linux-next kernel with the subject patch applied and thumb-2 mode enabled. I could successfully hotplug in/out CPU1 a couple of times. However, if done back to back it hangs (without any crash dump even with low level debug enabled). Is this the same behavior that you observe?
Hmm.. Not at all..
I just tested this on latest linux-next: d24511f ARM: EXYNOS: Fix hotplug when CPUs are booted in HYP mode fb4a940 Add linux-next specific files for 20140213 b816300 Merge branch 'akpm/master'
With $subject patch applied (attached too)..
And this is what I get on a ubuntu system (attaching my .config as well which I made from exynos_defconfig+THUMB2)..
With your attached patch, I too observe a similar crash with the above mentioned configuration (exynos_defconfig + THUMB2).
Inderpal,
We need your help now :)
linaro-kernel@lists.linaro.org