kgdb patches for 5.15
Changes for kgdb/kdb this cycle are dominated by a change from Sumit that removes as small (256K) private heap from kdb. This is change I've hoped for ever since I discovered how few users of this heap remained in the kernel, so many thanks to Sumit for hunting these down. Other change is an incremental step towards SPDX headers. Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org> -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEELzVBU1D3lWq6cKzwfOMlXTn3iKEFAmE2OuUACgkQfOMlXTn3 iKEcTQ/7BiMPnSzPeh7srNIG1a7/ig8CUtu+qMsrU50BUvCBzhas3+fGbzlZHV4p GwCGTuRDWhVJjntpCkLYroSSF0h/AhN68pxqUx6EJUWEYMGuuMBuVtAdXYMSYbse MW+Jw6Tec2fWPyw6lyWd0vwOKLzhf/pC8axbmGESzgdmZrsWeA4XEeF5XRHsHyJf pL4GvBXN/mzH2TSQNQmSgda5VLnK3m6B66tlT17mywG8QTKwID8I4LXs9doNwqeW 6fkwJswAsCa+nO1GjMsRcA8HoUd7mtqLCYbjZzFVQdFJ6kF9eBKSPvgbaqr6oNvv t6VBfm908+fM4/4yEQSuwVPT32IPe7I/Bk+aUqnSpPiXU8v75u0lIfB929O/DS07 X+NjqpXN7v6mEpLAFgWhqPyzTODw40OhpOi1uf9jzPB/OSNm9y1zs21FJQSx6KGa AahMHrRoeZwlxNdD/2RBf9pQCSBWF5R1DyIye2iQX+e/jrvTXHMCK33tpcbcE9Cl bMVqnnJ4Pnmul6hAAf9WlJduIrACV1Oq1iQrtXWE3wdFZdQuvqKvwHUK/Zko+O0f cdW6neyW7Slo+8q2qXuEE0Bp+Ae61oZTrGIdfj29ZdXwp0+sBzcA5CFO7MKPJllV yEq41Bxc3cgJPcsFMZWSaHcEAI5fq1iBmquVdCA0/vYbP9dsO1U= =iMIF -----END PGP SIGNATURE----- Merge tag 'kgdb-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux Pull kgdb updates from Daniel Thompson: "Changes for kgdb/kdb this cycle are dominated by a change from Sumit that removes as small (256K) private heap from kdb. This is change I've hoped for ever since I discovered how few users of this heap remained in the kernel, so many thanks to Sumit for hunting these down. The other change is an incremental step towards SPDX headers" * tag 'kgdb-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux: kernel: debug: Convert to SPDX identifier kdb: Rename members of struct kdbtab_t kdb: Simplify kdb_defcmd macro logic kdb: Get rid of redundant kdb_register_flags() kdb: Rename struct defcmd_set to struct kdb_macro kdb: Get rid of custom debug heap allocator
This commit is contained in:
commit
996fe06160
10 changed files with 387 additions and 728 deletions
|
|
@ -13,6 +13,8 @@
|
|||
* Copyright (C) 2009 Jason Wessel <jason.wessel@windriver.com>
|
||||
*/
|
||||
|
||||
#include <linux/list.h>
|
||||
|
||||
/* Shifted versions of the command enable bits are be used if the command
|
||||
* has no arguments (see kdb_check_flags). This allows commands, such as
|
||||
* go, to have different permissions depending upon whether it is called
|
||||
|
|
@ -64,6 +66,17 @@ typedef enum {
|
|||
|
||||
typedef int (*kdb_func_t)(int, const char **);
|
||||
|
||||
/* The KDB shell command table */
|
||||
typedef struct _kdbtab {
|
||||
char *name; /* Command name */
|
||||
kdb_func_t func; /* Function to execute command */
|
||||
char *usage; /* Usage String for this command */
|
||||
char *help; /* Help message for this command */
|
||||
short minlen; /* Minimum legal # cmd chars required */
|
||||
kdb_cmdflags_t flags; /* Command behaviour flags */
|
||||
struct list_head list_node; /* Command list */
|
||||
} kdbtab_t;
|
||||
|
||||
#ifdef CONFIG_KGDB_KDB
|
||||
#include <linux/init.h>
|
||||
#include <linux/sched.h>
|
||||
|
|
@ -193,19 +206,13 @@ static inline const char *kdb_walk_kallsyms(loff_t *pos)
|
|||
#endif /* ! CONFIG_KALLSYMS */
|
||||
|
||||
/* Dynamic kdb shell command registration */
|
||||
extern int kdb_register(char *, kdb_func_t, char *, char *, short);
|
||||
extern int kdb_register_flags(char *, kdb_func_t, char *, char *,
|
||||
short, kdb_cmdflags_t);
|
||||
extern int kdb_unregister(char *);
|
||||
extern int kdb_register(kdbtab_t *cmd);
|
||||
extern void kdb_unregister(kdbtab_t *cmd);
|
||||
#else /* ! CONFIG_KGDB_KDB */
|
||||
static inline __printf(1, 2) int kdb_printf(const char *fmt, ...) { return 0; }
|
||||
static inline void kdb_init(int level) {}
|
||||
static inline int kdb_register(char *cmd, kdb_func_t func, char *usage,
|
||||
char *help, short minlen) { return 0; }
|
||||
static inline int kdb_register_flags(char *cmd, kdb_func_t func, char *usage,
|
||||
char *help, short minlen,
|
||||
kdb_cmdflags_t flags) { return 0; }
|
||||
static inline int kdb_unregister(char *cmd) { return 0; }
|
||||
static inline int kdb_register(kdbtab_t *cmd) { return 0; }
|
||||
static inline void kdb_unregister(kdbtab_t *cmd) {}
|
||||
#endif /* CONFIG_KGDB_KDB */
|
||||
enum {
|
||||
KDB_NOT_INITIALIZED,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue