All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] arm64: enable processor debug state for secondary cpus
@ 2014-02-21  5:13 vijay.kilari at gmail.com
  2014-02-21 11:36 ` Catalin Marinas
  0 siblings, 1 reply; 2+ messages in thread
From: vijay.kilari at gmail.com @ 2014-02-21  5:13 UTC (permalink / raw)
  To: linux-arm-kernel

From: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>

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.

Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
Acked-by: Will Deacon <will.deacon@arm.com>
---
 arch/arm64/kernel/debug-monitors.c |    7 +++----
 arch/arm64/kernel/smp.c            |    1 +
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c
index 1a8127d..13f87de 100644
--- a/arch/arm64/kernel/debug-monitors.c
+++ b/arch/arm64/kernel/debug-monitors.c
@@ -137,8 +137,6 @@ void disable_debug_monitors(enum debug_el el)
 static void clear_os_lock(void *unused)
 {
 	asm volatile("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);
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index 7cfb92a..5070dc3 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -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();
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 1/1] arm64: enable processor debug state for secondary cpus
  2014-02-21  5:13 [PATCH 1/1] arm64: enable processor debug state for secondary cpus vijay.kilari at gmail.com
@ 2014-02-21 11:36 ` Catalin Marinas
  0 siblings, 0 replies; 2+ messages in thread
From: Catalin Marinas @ 2014-02-21 11:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 21, 2014 at 05:13:49AM +0000, vijay.kilari at gmail.com wrote:
> From: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
> 
> 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.
> 
> Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
> Acked-by: Will Deacon <will.deacon@arm.com>

Thanks. Applied.

The whole series should appear in -next sometime after -rc4.

-- 
Catalin

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-21 11:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-21  5:13 [PATCH 1/1] arm64: enable processor debug state for secondary cpus vijay.kilari at gmail.com
2014-02-21 11:36 ` Catalin Marinas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.