x86: make mtrr code could use debugpat
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 x86: make mtrr code could use debugpat
Impact: cleanup
only print out get_mtrr when debugpat
--- arch/x86/kernel/cpu/mtrr/generic.c | 9 ++++++--- arch/x86/kernel/cpu/mtrr/mtrr.h | 4 ++++ arch/x86/mm/pat.c | 6 +++--- 3 files changed, 13 insertions(+), 6 deletions(-)
arch/x86/kernel/cpu/mtrr/generic.c +6 -3
@@ -462,9 +462,12 @@ static void generic_get_mtrr(unsigned in *base = base_hi << (32 -PAGE_SHIFT ) | base_lo >>PAGE_SHIFT ; *type = base_lo &0xff ; -printk (KERN_DEBUG " get_mtrr: cpu%d reg%02d base=%010lx size=%010lx %s\n" , - cpu, reg, *base, *size, -mtrr_attrib_to_str (*type &0xff )); +#ifdef CONFIG_X86_PAT +if (debugpat) +printk (KERN_DEBUG " get_mtrr: cpu%d reg%02d base=%010lx size=%010lx %s\n" , + cpu, reg, *base, *size, +mtrr_attrib_to_str (*type &0xff )); +#endif out_put_cpu:put_cpu (); }
arch/x86/kernel/cpu/mtrr/mtrr.h +4 -0
@@ -92,3 +92,7 @@ int centaur_init_mtrr(void);extern int changed_by_mtrr_cleanup;extern int mtrr_cleanup (unsigned address_bits); + +#if CONFIG_X86_PAT +extern int debugpat; +#endif
arch/x86/mm/pat.c +3 -3
@@ -51,17 +51,17 @@ static inline void pat_disable(const cha#endif -static int debug_enable; +int debugpat;static int __init pat_debug_setup (char *str) { - debug_enable =1 ; + debugpat =1 ;return 0 ; }__setup ("debugpat" , pat_debug_setup); #define dprintk(fmt, arg...) \ - do { if (debug_enable) printk(KERN_INFO fmt, ##arg); } while (0) + do { if (debugpat) printk(KERN_INFO fmt, ##arg); } while (0)static u64 __read_mostly boot_pat_state;
Quoted 2 lines · Yinghai Lu
only print out
get_mtrrwhen debugpat
Is that get_mtrr message really so interesting that it needs to be printed out at all? Even with debugpat?
Linus
Quoted 7 lines · Linus Torvalds
Quoted 1 line · Yinghai Lu
only print out
get_mtrrwhen debugpatIs that
get_mtrrmessage really so interesting that it needs to be printed out at all? Even with debugpat?
it seems some new X server try to touch MTRR at the first, and then try to use pci_mmap_page_range().
YH
Quoted 6 lines · Linus Torvalds
Quoted 1 line · Yinghai Lu
only print out
get_mtrrwhen debugpatIs that
get_mtrrmessage really so interesting that it needs to be printed out at all? Even with debugpat?
or you pick the one in tip/master that remove those line.
YH
Quoted 8 lines · Yinghai Lu
Quoted 4 lines · Linus Torvalds
Quoted 1 line · Yinghai Lu
only print out
get_mtrrwhen debugpatIs that
get_mtrrmessage really so interesting that it needs to be printed out at all? Even with debugpat?or you pick the one in tip/master that remove those line.
should be in tip/x86/urgent
YH
Quoted 6 lines · Linus Torvalds
Quoted 2 lines · Yinghai Lu
only print out
get_mtrrwhen debugpatIs that
get_mtrrmessage really so interesting that it needs to be printed out at all? Even with debugpat?
With debugpat it's probably interesting - i think only a very small fraction of users will enable it, and if they do we really want to track all MTRR state.
Since old MTRR state gets destroyed by new settings we better have a clear idea how the BIOS set it, that might give us clues about quirks, etc.
Based on MTRR bugreport patterns i was the one who asked Yinghai during the development cycle to add more debugging there - so i'm to blame for those printouts. We had several cases where it would have been useful had we known the precise history of MTRR settings.
I was under the impression that KERN_DEBUG would only show up on the console if 'debug' is passed in on the boot command line - but your bootlog didnt have 'debug' in it and i guess having it so frequently in the dmesg is confusing as well. It might even be there for every Xorg startup.
Anyway ... the x86/urgent pull request i sent removes the printk altogether.
Ingo
Quoted 22 lines · Ingo Molnar
Quoted 6 lines · Linus Torvalds
Quoted 2 lines · Yinghai Lu
only print out
get_mtrrwhen debugpatIs that
get_mtrrmessage really so interesting that it needs to be printed out at all? Even with debugpat?With debugpat it's probably interesting - i think only a very small fraction of users will enable it, and if they do we really want to track all MTRR state.
Since old MTRR state gets destroyed by new settings we better have a clear idea how the BIOS set it, that might give us clues about quirks, etc.
Based on MTRR bugreport patterns i was the one who asked Yinghai during the development cycle to add more debugging there - so i'm to blame for those printouts. We had several cases where it would have been useful had we known the precise history of MTRR settings.
Quoted 9 lines
I was under the impression that
KERN_DEBUGwould only show up on the console if 'debug' is passed in on the boot command line - but your bootlog didnt have 'debug' in it and i guess having it so frequently in the dmesg is confusing as well. It might even be there for every Xorg startup.Anyway ... the x86/urgent pull request i sent removes the printk altogether.
Thanks for removing those annoying lines.
--
JSR
Quoted 22 lines · Ingo Molnar
Quoted 6 lines · Linus Torvalds
Quoted 2 lines · Yinghai Lu
only print out
get_mtrrwhen debugpatIs that
get_mtrrmessage really so interesting that it needs to be printed out at all? Even with debugpat?With debugpat it's probably interesting - i think only a very small fraction of users will enable it, and if they do we really want to track all MTRR state.
Since old MTRR state gets destroyed by new settings we better have a clear idea how the BIOS set it, that might give us clues about quirks, etc.
Based on MTRR bugreport patterns i was the one who asked Yinghai during the development cycle to add more debugging there - so i'm to blame for those printouts. We had several cases where it would have been useful had we known the precise history of MTRR settings.
Quoted 6 lines
I was under the impression that
KERN_DEBUGwould only show up on the console if 'debug' is passed in on the boot command line - but your bootlog didnt have 'debug' in it and i guess having it so frequently in the dmesg is confusing as well. It might even be there for every Xorg startup.
If you still want to debug it, use some special parameters at command line to avoid annoyance to others.
These debug messages really screwed up my life from last month.
--
JSR
Quoted 30 lines · Jaswinder Singh Rajput
Quoted 22 lines · Ingo Molnar
Quoted 6 lines · Linus Torvalds
Quoted 2 lines · Yinghai Lu
only print out
get_mtrrwhen debugpatIs that
get_mtrrmessage really so interesting that it needs to be printed out at all? Even with debugpat?With debugpat it's probably interesting - i think only a very small fraction of users will enable it, and if they do we really want to track all MTRR state.
Since old MTRR state gets destroyed by new settings we better have a clear idea how the BIOS set it, that might give us clues about quirks, etc.
Based on MTRR bugreport patterns i was the one who asked Yinghai during the development cycle to add more debugging there - so i'm to blame for those printouts. We had several cases where it would have been useful had we known the precise history of MTRR settings.
Quoted 6 lines
I was under the impression that
KERN_DEBUGwould only show up on the console if 'debug' is passed in on the boot command line - but your bootlog didnt have 'debug' in it and i guess having it so frequently in the dmesg is confusing as well. It might even be there for every Xorg startup.
Quoted 5 lines
If you still want to debug it, use some special parameters at command line to avoid annoyance to others.
These debug messages really screwed up my life from last month.
If you surprise how these debug messages screwed up my life, so here is some clues:
1. I pointed to remove or suppress these messages and Ingo, Andrew and then later on Thomas become upset with me.
2. And because of their upset, I need to delete more than 100 of my patches and delete many development trees in last few weeks.
--
JSR