RE: [Kgdb-bugreport] [PATCH 09/37] kgdb,blackfin: Add in kgdb_arch_set_pc for blackfin

From: Zhang, Sonic
Date: Wed Jan 06 2010 - 22:46:23 EST


Jason,

I tried your latest update of this patch, it works well. So I am OK with
it.

And I will try your generic CPU switch code on blackfin.


Sonic


-----Original Message-----
From: Jason Wessel [mailto:jason.wessel@xxxxxxxxxxxxx]
Sent: Thursday, January 07, 2010 3:44 AM
To: Sonic Zhang
Cc: Zhang, Sonic; Mike Frysinger; kgdb-bugreport@xxxxxxxxxxxxxxxxxxxxx;
linux-kernel@xxxxxxxxxxxxxxx; mingo@xxxxxxx
Subject: Re: [Kgdb-bugreport] [PATCH 09/37] kgdb,blackfin: Add in
kgdb_arch_set_pc for blackfin

Sonic Zhang wrote:
> I have to recall my last wrong patch.
>
> In blackfin, kgdb is running in delayed exception IRQ5 other than in
> exception IRQ3 directly. Register reti other than retx in pt_regs is
> the kgdb return address. So, don't put PC in gdb_regs into retx.
>
> Sonic Zhang
>
> Index: arch/blackfin/kernel/kgdb.c
> ============================
> --- arch/blackfin/kernel/kgdb.c (revision 8105)
> +++ arch/blackfin/kernel/kgdb.c (revision 8106)
> @@ -147,7 +147,7 @@
> regs->lb1 = gdb_regs[BFIN_LB1];
> regs->usp = gdb_regs[BFIN_USP];
> regs->syscfg = gdb_regs[BFIN_SYSCFG];
> - regs->retx = gdb_regs[BFIN_PC];
> + regs->retx = gdb_regs[BFIN_RETX];
> regs->retn = gdb_regs[BFIN_RETN];
> regs->rete = gdb_regs[BFIN_RETE];
> regs->pc = gdb_regs[BFIN_PC];
>
>

Sonic,

I pulled in this patch, and made the changes the Mike talked about with
respect to cleaning up the arch specific kgdb.c for blackfin. See the
attached patch.

Your patch and the one here will go into kgdb-next and onto linux-next.

At some point you sent a patch for cpu switching that was blackfin
specific. There is new generic code in the debug core for doing this
without exiting the debug context. At some point you should test this
and figure out if something further needs to be done that is blackfin
specific.

Thanks,
Jason.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/