Skip to content

Commit 6beaa75

Browse files
Dr. David Alan Gilbertdaniel-thompson
authored andcommitted
kdb: Remove unused flags stack
kdb_restore_flags() and kdb_save_flags() were added in 2010 by commit 5d5314d ("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 <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Thompson (RISCstar) <[email protected]>
1 parent 36975ec commit 6beaa75

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

include/linux/kdb.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,6 @@ extern const char *kdb_diemsg;
140140

141141
extern unsigned int kdb_flags; /* Global flags, see kdb_state for per cpu state */
142142

143-
extern void kdb_save_flags(void);
144-
extern void kdb_restore_flags(void);
145-
146143
#define KDB_FLAG(flag) (kdb_flags & KDB_FLAG_##flag)
147144
#define KDB_FLAG_SET(flag) ((void)(kdb_flags |= KDB_FLAG_##flag))
148145
#define KDB_FLAG_CLEAR(flag) ((void)(kdb_flags &= ~KDB_FLAG_##flag))

kernel/debug/kdb/kdb_support.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -536,21 +536,3 @@ bool kdb_task_state(const struct task_struct *p, const char *mask)
536536

537537
return strchr(mask, state);
538538
}
539-
540-
/* Maintain a small stack of kdb_flags to allow recursion without disturbing
541-
* the global kdb state.
542-
*/
543-
544-
static int kdb_flags_stack[4], kdb_flags_index;
545-
546-
void 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-
552-
void kdb_restore_flags(void)
553-
{
554-
BUG_ON(kdb_flags_index <= 0);
555-
kdb_flags = kdb_flags_stack[--kdb_flags_index];
556-
}

0 commit comments

Comments
 (0)