arm64: enable processor debug state for secondary cpus
PATCH 1/1 arm64: enable processor debug state for secondary cpus
From: Vijaya Kumar K <[email protected]>
processor debug state PSTATE.D is unmasked in smp call clear_os_lock for secondary cpus. So debug state is still masked in normal kernel context. With this patch, unmask debug state on secondary boot for the cpus in normal kernel context. Now kgdb tests passed with multicore.
--- arch/arm64/kernel/debug-monitors.c | 7 +++---- arch/arm64/kernel/smp.c | 1 + 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm64/kernel/debug-monitors.c +3 -4
@@ -137,8 +137,6 @@ void disable_debug_monitors(enum debug_el el)static void clear_os_lock (void *unused) { asmvolatile ("msr oslar_el1, %0" : :"r" (0 )); -isb (); -local_dbg_enable (); } static int os_lock_notify(struct notifier_block *self,
@@ -157,8 +155,9 @@ static struct notifier_block os_lock_nb = {static int debug_monitors_init (void ) {/* Clear the OS lock. */ -smp_call_function (clear_os_lock,NULL ,1 ); -clear_os_lock (NULL ); +on_each_cpu (clear_os_lock,NULL ,1 ); +isb (); +local_dbg_enable ();/* Register hotplug handler. */ register_cpu_notifier (&os_lock_nb);
arch/arm64/kernel/smp.c +1 -0
@@ -160,6 +160,7 @@ asmlinkage void secondary_start_kernel(void)set_cpu_online (cpu, true);complete (&cpu_running); +local_dbg_enable ();local_irq_enable ();local_async_enable ();
Signature · 1 line
1.7.9.5
Catalin Marinas
maintainerPATCH 1/1 arm64: enable processor debug state for secondary cpus
Quoted 10 lines · vijay.kilari at gmail.com
From: Vijaya Kumar K <[email protected]>
processor debug state PSTATE.D is unmasked in smp call
clear_os_lockfor secondary cpus. So debug state is still masked in normal kernel context. With this patch, unmask debug state on secondary boot for the cpus in normal kernel context. Now kgdb tests passed with multicore.Signed-off-by Vijaya Kumar K <[email protected]>Acked-by Will Deacon <[email protected]>
Thanks. Applied.
The whole series should appear in -next sometime after -rc4.
Signature · 1 line
Catalin