mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
kdb: Remove unused flags stack
kdb_restore_flags() and kdb_save_flags() were added in 2010 by
commit 5d5314d679
("kdb: core for kgdb back end (1 of 2)")
but have remained unused.
Remove them, and their associated storage.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20250112012049.319515-1-linux@treblig.org
Signed-off-by: Daniel Thompson (RISCstar) <danielt@kernel.org>
This commit is contained in:
parent
36975ec3a2
commit
6beaa75cd2
2 changed files with 0 additions and 21 deletions
|
@ -140,9 +140,6 @@ extern const char *kdb_diemsg;
|
||||||
|
|
||||||
extern unsigned int kdb_flags; /* Global flags, see kdb_state for per cpu state */
|
extern unsigned int kdb_flags; /* Global flags, see kdb_state for per cpu state */
|
||||||
|
|
||||||
extern void kdb_save_flags(void);
|
|
||||||
extern void kdb_restore_flags(void);
|
|
||||||
|
|
||||||
#define KDB_FLAG(flag) (kdb_flags & KDB_FLAG_##flag)
|
#define KDB_FLAG(flag) (kdb_flags & KDB_FLAG_##flag)
|
||||||
#define KDB_FLAG_SET(flag) ((void)(kdb_flags |= KDB_FLAG_##flag))
|
#define KDB_FLAG_SET(flag) ((void)(kdb_flags |= KDB_FLAG_##flag))
|
||||||
#define KDB_FLAG_CLEAR(flag) ((void)(kdb_flags &= ~KDB_FLAG_##flag))
|
#define KDB_FLAG_CLEAR(flag) ((void)(kdb_flags &= ~KDB_FLAG_##flag))
|
||||||
|
|
|
@ -536,21 +536,3 @@ bool kdb_task_state(const struct task_struct *p, const char *mask)
|
||||||
|
|
||||||
return strchr(mask, state);
|
return strchr(mask, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Maintain a small stack of kdb_flags to allow recursion without disturbing
|
|
||||||
* the global kdb state.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static int kdb_flags_stack[4], kdb_flags_index;
|
|
||||||
|
|
||||||
void kdb_save_flags(void)
|
|
||||||
{
|
|
||||||
BUG_ON(kdb_flags_index >= ARRAY_SIZE(kdb_flags_stack));
|
|
||||||
kdb_flags_stack[kdb_flags_index++] = kdb_flags;
|
|
||||||
}
|
|
||||||
|
|
||||||
void kdb_restore_flags(void)
|
|
||||||
{
|
|
||||||
BUG_ON(kdb_flags_index <= 0);
|
|
||||||
kdb_flags = kdb_flags_stack[--kdb_flags_index];
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue