diff options
author | Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com> | 2014-02-21 00:13:49 -0500 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2014-02-26 06:16:27 -0500 |
commit | d8ed442a009ecfe155b57d58f231db3d6084633d (patch) | |
tree | 44cc671e1c1893218bb1823ab7c13b8f4bbf7379 /arch/arm64 | |
parent | 9529247db9ecfc5a723e17093614e7437ab0d5bd (diff) |
arm64: enable processor debug state for secondary cpus
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>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/kernel/debug-monitors.c | 7 | ||||
-rw-r--r-- | 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 1a8127da625b..13f87def8ea1 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) | |||
137 | static void clear_os_lock(void *unused) | 137 | static void clear_os_lock(void *unused) |
138 | { | 138 | { |
139 | asm volatile("msr oslar_el1, %0" : : "r" (0)); | 139 | asm volatile("msr oslar_el1, %0" : : "r" (0)); |
140 | isb(); | ||
141 | local_dbg_enable(); | ||
142 | } | 140 | } |
143 | 141 | ||
144 | static int os_lock_notify(struct notifier_block *self, | 142 | static int os_lock_notify(struct notifier_block *self, |
@@ -157,8 +155,9 @@ static struct notifier_block os_lock_nb = { | |||
157 | static int debug_monitors_init(void) | 155 | static int debug_monitors_init(void) |
158 | { | 156 | { |
159 | /* Clear the OS lock. */ | 157 | /* Clear the OS lock. */ |
160 | smp_call_function(clear_os_lock, NULL, 1); | 158 | on_each_cpu(clear_os_lock, NULL, 1); |
161 | clear_os_lock(NULL); | 159 | isb(); |
160 | local_dbg_enable(); | ||
162 | 161 | ||
163 | /* Register hotplug handler. */ | 162 | /* Register hotplug handler. */ |
164 | register_cpu_notifier(&os_lock_nb); | 163 | register_cpu_notifier(&os_lock_nb); |
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index 7cfb92a4ab66..5070dc3b65d2 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c | |||
@@ -160,6 +160,7 @@ asmlinkage void secondary_start_kernel(void) | |||
160 | set_cpu_online(cpu, true); | 160 | set_cpu_online(cpu, true); |
161 | complete(&cpu_running); | 161 | complete(&cpu_running); |
162 | 162 | ||
163 | local_dbg_enable(); | ||
163 | local_irq_enable(); | 164 | local_irq_enable(); |
164 | local_async_enable(); | 165 | local_async_enable(); |
165 | 166 | ||