Add debugger entry points for M68K
Subsystems (2)
PATCH 27/31 Add debugger entry points for M68K
This patch series adds an export which can be set by system debuggers to direct the hard lockup and soft lockup detector to trigger a breakpoint exception and enter a debugger if one is active. It is assumed that if someone sets this variable, then an breakpoint handler of some sort will be actively loaded or registered via the notify die handler chain.
This addition is extremely useful for debugging hard and soft lockups real time and quickly from a console debugger.
--- arch/m68k/include/asm/kdebug.h | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 arch/m68k/include/asm/kdebug.h
arch/m68k/include/asm/kdebug.h new file +4 -0
@@ -0,0 +1,4 @@ + +static inline void arch_breakpoint (void ) +{ +}
Signature · 1 line
1.8.3.1
Geert Uytterhoeven
maintainerHi Jeffrey,
CC linux-arch
Quoted 8 lines · Jeffrey Merkey
This patch series adds an export which can be set by system debuggers to direct the hard lockup and soft lockup detector to trigger a breakpoint exception and enter a debugger if one is active. It is assumed that if someone sets this variable, then an breakpoint handler of some sort will be actively loaded or registered via the notify die handler chain.
This addition is extremely useful for debugging hard and soft lockups real time and quickly from a console debugger.
As there's no cover letter, I'm giving my (mostly general) comments in a reply to this patch.
Quoted 12 lines
Signed-off-by Jeffrey Merkey <[email protected]>--- arch/m68k/include/asm/kdebug.h | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 arch/m68k/include/asm/kdebug.harch/m68k/include/asm/kdebug.h new file +0
-0
arch/m68k/include/asm/kdebug.h line 4
Quoted 4 lines
arch/m68k/include/asm/kdebug.h new file +4
-0@@ -0,0 +1,4 @@ + +static inline void arch_breakpoint (void ) +{ +}
No include guards in the newly added header files?
This new file will conflict with arch/m68k/include/asm/Kbuild, which has:
generic-y += kdebug.h
What about putting the dummy arch_breakpoint() in include/asm-generic/kdebug.h instead, like
#ifndef arch_breakpoint
static inline void arch_breakpoint(void)
{
}
#endifArchitectures providing their own version have to #define arch_breakpoint.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 62 lines · Geert Uytterhoeven
Hi Jeffrey,
CC linux-arch
Quoted 8 lines · Jeffrey Merkey
This patch series adds an export which can be set by system debuggers to direct the hard lockup and soft lockup detector to trigger a breakpoint exception and enter a debugger if one is active. It is assumed that if someone sets this variable, then an breakpoint handler of some sort will be actively loaded or registered via the notify die handler chain.
This addition is extremely useful for debugging hard and soft lockups real time and quickly from a console debugger.
As there's no cover letter, I'm giving my (mostly general) comments in a reply to this patch.
Quoted 13 lines
Signed-off-by Jeffrey Merkey <[email protected]>--- arch/m68k/include/asm/kdebug.h | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 arch/m68k/include/asm/kdebug.harch/m68k/include/asm/kdebug.h new file +0
-0arch/m68k/include/asm/kdebug.h line 4
Quoted 4 lines
arch/m68k/include/asm/kdebug.h new file +4
-0@@ -0,0 +1,4 @@ + +static inline void arch_breakpoint (void ) +{ +}No include guards in the newly added header files?
This new file will conflict with
arch/m68k/include/asm/Kbuild, which has:generic-y += kdebug.hWhat about putting the dummy
arch_breakpoint()ininclude/asm-generic/kdebug.h
instead, like#ifndef arch_breakpoint static inline void arch_breakpoint(void) { } #endifArchitectures providing their own version have to #define
arch_breakpoint.Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
Quoted 6 lines
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
That's a great idea and suggestion. I'll move it to the asm-generic directory and files and look it implementing it as a macro. This suggestion is added to the list of changes for the next version of this patch series.
:-)
Jeff
Quoted 62 lines · Geert Uytterhoeven
Hi Jeffrey,
CC linux-arch
Quoted 8 lines · Jeffrey Merkey
This patch series adds an export which can be set by system debuggers to direct the hard lockup and soft lockup detector to trigger a breakpoint exception and enter a debugger if one is active. It is assumed that if someone sets this variable, then an breakpoint handler of some sort will be actively loaded or registered via the notify die handler chain.
This addition is extremely useful for debugging hard and soft lockups real time and quickly from a console debugger.
As there's no cover letter, I'm giving my (mostly general) comments in a reply to this patch.
Quoted 13 lines
Signed-off-by Jeffrey Merkey <[email protected]>--- arch/m68k/include/asm/kdebug.h | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 arch/m68k/include/asm/kdebug.harch/m68k/include/asm/kdebug.h new file +0
-0arch/m68k/include/asm/kdebug.h line 4
Quoted 4 lines
arch/m68k/include/asm/kdebug.h new file +4
-0@@ -0,0 +1,4 @@ + +static inline void arch_breakpoint (void ) +{ +}No include guards in the newly added header files?
This new file will conflict with
arch/m68k/include/asm/Kbuild, which has:generic-y += kdebug.hWhat about putting the dummy
arch_breakpoint()ininclude/asm-generic/kdebug.h
instead, like#ifndef arch_breakpoint static inline void arch_breakpoint(void) { } #endifArchitectures providing their own version have to #define
arch_breakpoint.Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
Quoted 6 lines
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
That's a great idea and suggestion. I'll move it to the asm-generic directory and files and look it implementing it as a macro. This suggestion is added to the list of changes for the next version of this patch series.
:-)
Jeff
kbuild test robot
build botreproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree…
Hi Jeffrey,
[auto build test ERROR on v4.5-rc1]
[also build test ERROR on next-20160128]
[cannot apply to tip/x86/core]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
url: https://github.com/0day-ci/linux/commits/Jeffrey-Merkey/Add-hard-soft-lockup-debugger-entry-points/20160129-035852 config: m68k-sun3_defconfig (attached as .config)
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=m68k
All error/warnings (new ones prefixed by >>):
In file included from kernel/notifier.c:1:0:
>> include/linux/kdebug.h:20:16: warning: 'enum die_val' declared inside parameter list
struct pt_regs *regs, long err, int trap, int sig);
^
>> include/linux/kdebug.h:20:16: warning: its scope is only this definition or declaration, which is probably not what you want
>> kernel/notifier.c:537:16: warning: 'enum die_val' declared inside parameter list
struct pt_regs *regs, long err, int trap, int sig)
^
>> kernel/notifier.c:536:37: error: parameter 1 ('val') has incomplete type
int notrace notify_die(enum die_val val, const char *str,
^
kernel/notifier.c: In function 'notify_die':
>> kernel/notifier.c:550:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^vim +20 include/linux/kdebug.h
1eeb66a1 Christoph Hellwig 2007-05-08 4 #include <asm/kdebug.h>
1eeb66a1 Christoph Hellwig 2007-05-08 5
fe9844d5 Andrew Morton 2007-07-31 6 struct notifier_block;
fe9844d5 Andrew Morton 2007-07-31 7
1eeb66a1 Christoph Hellwig 2007-05-08 8 struct die_args {
1eeb66a1 Christoph Hellwig 2007-05-08 9 struct pt_regs *regs;
1eeb66a1 Christoph Hellwig 2007-05-08 10 const char *str;
1eeb66a1 Christoph Hellwig 2007-05-08 11 long err;
1eeb66a1 Christoph Hellwig 2007-05-08 12 int trapnr;
1eeb66a1 Christoph Hellwig 2007-05-08 13 int signr;
1eeb66a1 Christoph Hellwig 2007-05-08 14 };
1eeb66a1 Christoph Hellwig 2007-05-08 15
1eeb66a1 Christoph Hellwig 2007-05-08 16 int register_die_notifier(struct notifier_block *nb);
1eeb66a1 Christoph Hellwig 2007-05-08 17 int unregister_die_notifier(struct notifier_block *nb);
1eeb66a1 Christoph Hellwig 2007-05-08 18
1eeb66a1 Christoph Hellwig 2007-05-08 19 int notify_die(enum die_val val, const char *str,1eeb66a1 Christoph Hellwig 2007-05-08 @20 struct pt_regs *regs, long err, int trap, int sig);1eeb66a1 Christoph Hellwig 2007-05-08 211eeb66a1 Christoph Hellwig 2007-05-08 22 #endif /* _LINUX_KDEBUG_H */
:::::: The code at line 20 was first introduced by commit
:::::: 1eeb66a1bb973534dc3d064920a5ca683823372e move die notifier handling to common code
:::::: TO: Christoph Hellwig <[email protected]>
:::::: CC: Linus Torvalds <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation