Message ID | 20160330184930.GA25233@ravnborg.org |
---|---|
State | Superseded |
Delegated to: | David Miller |
Headers | show |
On Wed, Mar 30, 2016 at 08:49:30PM +0200, Sam Ravnborg wrote: > >From ae7ae09c77621331f8aa18f2281f74640fcc39f2 Mon Sep 17 00:00:00 2001 > From: Sam Ravnborg <sam@ravnborg.org> > Date: Wed, 30 Mar 2016 20:39:11 +0200 > Subject: [PATCH 1/1] sparc32: fix trap number in call to kgdb_handle_exception > > While browsing this code for other reasons this disprecancy > was noticed. It looks like the code originates from sparc64. > > The trap number is in the generic code only used as argument > to a few methods that for sparc is simple stub functions. > So the trap number is not used, thus this patch does not > have any functional impact. > > Signed-off-by: Sam Ravnborg <sam@ravnborg.org> > --- > > I was tempted to modify kgdb_trap to take the trap number > as argument, like we do for sparc64. > But in first try I did the minimal fix. > > If you prefer I will redo the patch so we pass the > trap number in %o1 and pt_regs in %o2 like > we do on sparc64. Scrap this patch. I ended up doing as I suggested above. Needs to sort out a toolchain issue so I at least have done a test build before I submit it. Sam -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Sam Ravnborg <sam@ravnborg.org> Date: Thu, 31 Mar 2016 07:19:41 +0200 > On Wed, Mar 30, 2016 at 08:49:30PM +0200, Sam Ravnborg wrote: >> >From ae7ae09c77621331f8aa18f2281f74640fcc39f2 Mon Sep 17 00:00:00 2001 >> From: Sam Ravnborg <sam@ravnborg.org> >> Date: Wed, 30 Mar 2016 20:39:11 +0200 >> Subject: [PATCH 1/1] sparc32: fix trap number in call to kgdb_handle_exception >> >> While browsing this code for other reasons this disprecancy >> was noticed. It looks like the code originates from sparc64. >> >> The trap number is in the generic code only used as argument >> to a few methods that for sparc is simple stub functions. >> So the trap number is not used, thus this patch does not >> have any functional impact. >> >> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> >> --- >> >> I was tempted to modify kgdb_trap to take the trap number >> as argument, like we do for sparc64. >> But in first try I did the minimal fix. >> >> If you prefer I will redo the patch so we pass the >> trap number in %o1 and pt_regs in %o2 like >> we do on sparc64. > Scrap this patch. > > I ended up doing as I suggested above. Needs to sort out a toolchain issue > so I at least have done a test build before I submit it. Ok. -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/sparc/kernel/kgdb_32.c b/arch/sparc/kernel/kgdb_32.c index dcf2108..a5774e0 100644 --- a/arch/sparc/kernel/kgdb_32.c +++ b/arch/sparc/kernel/kgdb_32.c @@ -147,7 +147,7 @@ asmlinkage void kgdb_trap(struct pt_regs *regs) flushw_all(); local_irq_save(flags); - kgdb_handle_exception(0x172, SIGTRAP, 0, regs); + kgdb_handle_exception(0xfd, SIGTRAP, 0, regs); local_irq_restore(flags); }