Skip to content

Commit 4050577

Browse files
committed
Merge tag 'kgdb-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux
Pull kgdb updates from Daniel Thompson: "A very small set of changes this kernel cycle. Two cleanups, one switches to kmap_local_page() (from kmap_atomic()) and the other removes a bit of dead code" * tag 'kgdb-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux: kdb: Remove unused flags stack kdb: use kmap_local_page()
2 parents fd56e51 + 6beaa75 commit 4050577

File tree

2 files changed

+3
-24
lines changed

2 files changed

+3
-24
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: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ int kdb_putarea_size(unsigned long addr, void *res, size_t size)
305305

306306
/*
307307
* kdb_getphys - Read data from a physical address. Validate the
308-
* address is in range, use kmap_atomic() to get data
308+
* address is in range, use kmap_local_page() to get data
309309
* similar to kdb_getarea() - but for phys addresses
310310
* Inputs:
311311
* res Pointer to the word to receive the result
@@ -324,9 +324,9 @@ static int kdb_getphys(void *res, unsigned long addr, size_t size)
324324
if (!pfn_valid(pfn))
325325
return 1;
326326
page = pfn_to_page(pfn);
327-
vaddr = kmap_atomic(page);
327+
vaddr = kmap_local_page(page);
328328
memcpy(res, vaddr + (addr & (PAGE_SIZE - 1)), size);
329-
kunmap_atomic(vaddr);
329+
kunmap_local(vaddr);
330330

331331
return 0;
332332
}
@@ -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)