* Re: [PATCH 27/31] Add debugger entry points for M68K
2016-01-28 19:47 [PATCH 27/31] Add debugger entry points for M68K Jeffrey Merkey
@ 2016-01-28 20:40 ` Geert Uytterhoeven
2016-01-28 20:43 ` Jeffrey Merkey
2016-01-28 21:24 ` kbuild test robot
1 sibling, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2016-01-28 20:40 UTC (permalink / raw)
To: Jeffrey Merkey
Cc: linux-kernel@vger.kernel.org, linux.mdb, linux-m68k, Linux-Arch
Hi Jeffrey,
CC linux-arch
On Thu, Jan 28, 2016 at 8:47 PM, Jeffrey Merkey <jeffmerkey@gmail.com> wrote:
> 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.
> Signed-off-by: Jeffrey Merkey <jeffmerkey@gmail.com>
> ---
> arch/m68k/include/asm/kdebug.h | 4 ++++
> 1 file changed, 4 insertions(+)
> create mode 100644 arch/m68k/include/asm/kdebug.h
>
> diff --git a/arch/m68k/include/asm/kdebug.h b/arch/m68k/include/asm/kdebug.h
> new file mode 100644
> index 0000000..5d09de1
> --- /dev/null
> +++ b/arch/m68k/include/asm/kdebug.h
> @@ -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)
{
}
#endif
Architectures providing their own version have to #define arch_breakpoint.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 27/31] Add debugger entry points for M68K
2016-01-28 19:47 [PATCH 27/31] Add debugger entry points for M68K Jeffrey Merkey
2016-01-28 20:40 ` Geert Uytterhoeven
@ 2016-01-28 21:24 ` kbuild test robot
1 sibling, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2016-01-28 21:24 UTC (permalink / raw)
To: Jeffrey Merkey; +Cc: kbuild-all, linux-kernel, geert, linux.mdb, linux-m68k
[-- Attachment #1: Type: text/plain, Size: 3210 bytes --]
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 21
1eeb66a1 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 <hch@lst.de>
:::::: CC: Linus Torvalds <torvalds@woody.linux-foundation.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 11218 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread