All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arc: kernel: kgdb: add default implementation for kgdb_roundup_cpus()
@ 2013-10-24  3:50 Chen Gang
  2013-10-28 13:55 ` Vineet Gupta
  0 siblings, 1 reply; 3+ messages in thread
From: Chen Gang @ 2013-10-24  3:50 UTC (permalink / raw)
  To: vgupta, jason.wessel, mjonker; +Cc: linux-kernel

arc supports kgdb, but need update -- add function kgdb_roundup_cpus(),
or can not pass compiling. At present, add the simple generic one just
like other architectures(e.g. tile, mips ...).

The related error (with allmodconfig):

  kernel/built-in.o: In function `kgdb_cpu_enter':
  kernel/debug/debug_core.c:580: undefined reference to `kgdb_roundup_cpus'


Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 arch/arc/kernel/kgdb.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/arch/arc/kernel/kgdb.c b/arch/arc/kernel/kgdb.c
index a7698fb..a2ff5c5 100644
--- a/arch/arc/kernel/kgdb.c
+++ b/arch/arc/kernel/kgdb.c
@@ -196,6 +196,18 @@ void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip)
 	instruction_pointer(regs) = ip;
 }
 
+static void kgdb_call_nmi_hook(void *ignored)
+{
+	kgdb_nmicallback(raw_smp_processor_id(), NULL);
+}
+
+void kgdb_roundup_cpus(unsigned long flags)
+{
+	local_irq_enable();
+	smp_call_function(kgdb_call_nmi_hook, NULL, 0);
+	local_irq_disable();
+}
+
 struct kgdb_arch arch_kgdb_ops = {
 	/* breakpoint instruction: TRAP_S 0x3 */
 #ifdef CONFIG_CPU_BIG_ENDIAN
-- 
1.7.7.6

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

* Re: [PATCH] arc: kernel: kgdb: add default implementation for kgdb_roundup_cpus()
  2013-10-24  3:50 [PATCH] arc: kernel: kgdb: add default implementation for kgdb_roundup_cpus() Chen Gang
@ 2013-10-28 13:55 ` Vineet Gupta
  2013-10-29  1:08   ` Chen Gang
  0 siblings, 1 reply; 3+ messages in thread
From: Vineet Gupta @ 2013-10-28 13:55 UTC (permalink / raw)
  To: Chen Gang, jason.wessel, Mischa.Jonker; +Cc: linux-kernel

On 10/24/2013 09:21 AM, Chen Gang wrote:
> arc supports kgdb, but need update -- add function kgdb_roundup_cpus(),
> or can not pass compiling. At present, add the simple generic one just
> like other architectures(e.g. tile, mips ...).
>
> The related error (with allmodconfig):
>
>   kernel/built-in.o: In function `kgdb_cpu_enter':
>   kernel/debug/debug_core.c:580: undefined reference to `kgdb_roundup_cpus'
>
>
> Signed-off-by: Chen Gang <gang.chen@asianux.com>

Applied for 3.13.

Thx,
-Vineet

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

* Re: [PATCH] arc: kernel: kgdb: add default implementation for kgdb_roundup_cpus()
  2013-10-28 13:55 ` Vineet Gupta
@ 2013-10-29  1:08   ` Chen Gang
  0 siblings, 0 replies; 3+ messages in thread
From: Chen Gang @ 2013-10-29  1:08 UTC (permalink / raw)
  To: Vineet Gupta; +Cc: jason.wessel, Mischa.Jonker, linux-kernel

On 10/28/2013 09:55 PM, Vineet Gupta wrote:
> On 10/24/2013 09:21 AM, Chen Gang wrote:
>> arc supports kgdb, but need update -- add function kgdb_roundup_cpus(),
>> or can not pass compiling. At present, add the simple generic one just
>> like other architectures(e.g. tile, mips ...).
>>
>> The related error (with allmodconfig):
>>
>>   kernel/built-in.o: In function `kgdb_cpu_enter':
>>   kernel/debug/debug_core.c:580: undefined reference to `kgdb_roundup_cpus'
>>
>>
>> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> 
> Applied for 3.13.
> 


Thanks.
-- 
Chen Gang

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

end of thread, other threads:[~2013-10-29  1:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-24  3:50 [PATCH] arc: kernel: kgdb: add default implementation for kgdb_roundup_cpus() Chen Gang
2013-10-28 13:55 ` Vineet Gupta
2013-10-29  1:08   ` Chen Gang

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.