diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-22 11:08:05 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-22 11:08:05 -0800 |
commit | 899cbb0e53c6b66c3fb98d8745aa4b0b41cd94f2 (patch) | |
tree | 58e4eaecbd48b077916c7a513ae4b9adefda71bf /kernel/debug/kdb/kdb_private.h | |
parent | 54ab35d6bbc0d3175b0a74282c3365c80a43a93c (diff) | |
parent | f11e2bc682cc197e33bfd118178cadb61326dc0e (diff) |
Merge tag 'kgdb-5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux
Pull kgdb updates from Daniel Thompson:
"Another fairly small set of changes of changes this cycle. The most
significant functional change is a fix to better manage the flags when
allocating memory.
Additionally there is the removal of some unused code (which is
slightly more dramatic than it sounds given it means there are now no
tasklets in kgdb) together with a tidy up of the debug prints and some
spelling corrections for the documentation"
* tag 'kgdb-5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux:
kgdb: Remove kgdb_schedule_breakpoint()
kdb: Make memory allocations more robust
kdb: kdb_support: Fix debugging information problem
kernel: debug: fix typo issue
kgdb: rectify kernel-doc for kgdb_unregister_io_module()
Diffstat (limited to 'kernel/debug/kdb/kdb_private.h')
-rw-r--r-- | kernel/debug/kdb/kdb_private.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/kernel/debug/kdb/kdb_private.h b/kernel/debug/kdb/kdb_private.h index a4281fb99299..6cb92f7bbbd0 100644 --- a/kernel/debug/kdb/kdb_private.h +++ b/kernel/debug/kdb/kdb_private.h @@ -230,7 +230,7 @@ extern struct task_struct *kdb_curr_task(int); #define kdb_task_has_cpu(p) (task_curr(p)) -#define GFP_KDB (in_interrupt() ? GFP_ATOMIC : GFP_KERNEL) +#define GFP_KDB (in_dbg_master() ? GFP_ATOMIC : GFP_KERNEL) extern void *debug_kmalloc(size_t size, gfp_t flags); extern void debug_kfree(void *); @@ -254,4 +254,14 @@ extern char kdb_prompt_str[]; #define KDB_WORD_SIZE ((int)sizeof(unsigned long)) #endif /* CONFIG_KGDB_KDB */ + +#define kdb_func_printf(format, args...) \ + kdb_printf("%s: " format, __func__, ## args) + +#define kdb_dbg_printf(mask, format, args...) \ + do { \ + if (KDB_DEBUG(mask)) \ + kdb_func_printf(format, ## args); \ + } while (0) + #endif /* !_KDBPRIVATE_H */ |