History

kdb: Remove unused flags stack

kdb_restore_flags() and kdb_save_flags() were added in 2010 by commit 5d5314d6795f ("kdb: core for kgdb back end (1 of 2)") but have remained unused. Remove them, and their associated storage.

Dr. David Alan Gilbert committed 1 year ago

Commit 6beaa751 parent 36975ec2 files · +0 −21Browse files

Showing the changes to kernel/debug (1 of 2 files). Show all

Unified · Split

kernel/debug/kdb/kdb_support.c+0−18
@@ -536,21 +536,3 @@ bool kdb_task_state(const struct task_struct *p, const char *mask) · 535 unmodified lines
536 536
537 return strchr(mask, state);537 return strchr(mask, state);
538}538}
539
540/* Maintain a small stack of kdb_flags to allow recursion without disturbing
541 * the global kdb state.
542 */
543
544static int kdb_flags_stack[4], kdb_flags_index;
545
546void kdb_save_flags(void)
547{
548 BUG_ON(kdb_flags_index >= ARRAY_SIZE(kdb_flags_stack));
549 kdb_flags_stack[kdb_flags_index++] = kdb_flags;
550}
551
552void kdb_restore_flags(void)
553{
554 BUG_ON(kdb_flags_index <= 0);
555 kdb_flags = kdb_flags_stack[--kdb_flags_index];
556}