lkml.org 
[lkml]   [2000]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] 2.4.0-test2: %cr4 in a register dump (a cosmetic update)
Hi,

As I was pointed out, there is a redundant newline in the printout in the
original patch. Here is an updated one.

Maciej

--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +

diff -u --recursive --new-file linux-2.4-test1.macro/arch/i386/kernel/process.c linux-2.4-test1/arch/i386/kernel/process.c
--- linux-2.4-test1.macro/arch/i386/kernel/process.c Fri May 26 22:24:15 2000
+++ linux-2.4-test1/arch/i386/kernel/process.c Tue May 30 00:54:34 2000
@@ -342,7 +342,7 @@

void show_regs(struct pt_regs * regs)
{
- long cr0 = 0L, cr2 = 0L, cr3 = 0L;
+ long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L;

printk("\n");
printk("EIP: %04x:[<%08lx>]",0xffff & regs->xcs,regs->eip);
@@ -359,7 +359,15 @@
__asm__("movl %%cr0, %0": "=r" (cr0));
__asm__("movl %%cr2, %0": "=r" (cr2));
__asm__("movl %%cr3, %0": "=r" (cr3));
- printk("CR0: %08lx CR2: %08lx CR3: %08lx\n", cr0, cr2, cr3);
+ printk("CR0: %08lx CR2: %08lx CR3: %08lx", cr0, cr2, cr3);
+ if (current_cpu_data.x86_capability &
+ (X86_FEATURE_VME | X86_FEATURE_DE | X86_FEATURE_PSE |
+ X86_FEATURE_TSC | X86_FEATURE_PAE | X86_FEATURE_MCE |
+ X86_FEATURE_PGE | X86_FEATURE_FXSR | X86_FEATURE_XMM)) {
+ __asm__("movl %%cr4, %0": "=r" (cr4));
+ printk(" CR4: %08lx", cr4);
+ }
+ printk("\n");
}

/*

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.054 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site