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)