Skip to contentSkip to conversation

x86: make dump_pagetable() static

PATCH Applied Adrian Bunk 5 participants 6 messages Feb 13, 2008 – Feb 14, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: make dump_pagetable() static

dump_pagetable() can now become static.

---

 arch/x86/mm/fault.c      |    2 +-
 include/asm-x86/kdebug.h |    1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

fe111b005768f97b9f83af7ad4014a77e7adc249 diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 621afb6..fdc6674 100644

arch/x86/mm/fault.c +1 -1
@@ -186,7 +186,7 @@ static int bad_address(void *p)
 }
 #endif
 
-void dump_pagetable(unsigned long address)
+static void dump_pagetable(unsigned long address)
 {
 #ifdef CONFIG_X86_32
 	__typeof__(pte_val(__pte(0))) page;
include/asm-x86/kdebug.h +0 -1
index dd442a1..99dcbaf 100644
@@ -31,7 +31,6 @@ extern void show_trace(struct task_struct *t, struct pt_regs *regs,
 			unsigned long *sp, unsigned long bp);
 extern void __show_regs(struct pt_regs *regs);
 extern void show_regs(struct pt_regs *regs);
-extern void dump_pagetable(unsigned long);
 extern unsigned long oops_begin(void);
 extern void oops_end(unsigned long, struct pt_regs *, int signr);
 
#1 lore raw
Quoted 4 lines · Adrian Bunk

dump_pagetable() can now become static.

I believe Andi Kleen wanted this kept global to make it easy to use when adding debugging code elsewhere.

Cheers,

Harvey

#2 lore raw
Quoted 8 lines · Harvey Harrison
Quoted 4 lines · Adrian Bunk

dump_pagetable() can now become static.

I believe Andi Kleen wanted this kept global to make it easy to use when adding debugging code elsewhere.

That's not a reason as long as his code isn't in the tree (and he anyway has to patch the kernel for using it).

Quoted 3 lines

Cheers,

Harvey

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
Applied
#3 lore raw
Quoted 5 lines · Adrian Bunk
Quoted 4 lines · Harvey Harrison
Quoted 3 lines · Adrian Bunk

dump_pagetable() can now become static.

thanks, applied.

Quoted 5 lines
Quoted 2 lines

I believe Andi Kleen wanted this kept global to make it easy to use when adding debugging code elsewhere.

That's not a reason as long as his code isn't in the tree (and he anyway has to patch the kernel for using it).

correct. There's also a new CONFIG_X86_PTDUMP=y pagetable dumping debug feature now in x86.git#mm that produces much nicer output.

Arjan: i it might be nice to make the new pagetable dumper triggerable from a SysRq - could you try the kernel/time/timer_list.c's SEQ_printf() trick to make the dumping dual-purpose? [so that it printk()'s if it should dump to the console and seq_printf()'s if it should dump via /proc]

Ingo

#4 lore raw
In reply to Adrian Bunk
Quoted 11 lines · Adrian Bunk
Quoted 7 lines · Harvey Harrison
Quoted 4 lines · Adrian Bunk

dump_pagetable() can now become static.

I believe Andi Kleen wanted this kept global to make it easy to use when adding debugging code elsewhere.

That's not a reason as long as his code isn't in the tree (and he anyway has to patch the kernel for using it).

It was originally needed for the old cpa patchkit which dumped the page tables when it detected an internal inconsistency with the reference counts.

I think something like this would still make sense in a few cases, although there are no reference counts to check anymore currently.

-Andi