ia64/xen-unstable

changeset 8796:40c309827ee5

Add m2p translation to read_cr3 on x86_64.

From: Jan Beulich <JBeulich@novell.com>
From: Nakajima, Jun <jun.nakajima@intel.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Wed Feb 08 15:58:01 2006 +0000 (2006-02-08)
parents c83c242916ea
children a3d554557d48
files linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/system.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/system.h	Wed Feb 08 15:45:11 2006 +0000
     1.2 +++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/system.h	Wed Feb 08 15:58:01 2006 +0000
     1.3 @@ -179,12 +179,11 @@ static inline void write_cr0(unsigned lo
     1.4  	asm volatile("movq %0,%%cr0" :: "r" (val));
     1.5  } 
     1.6  
     1.7 -static inline unsigned long read_cr3(void)
     1.8 -{ 
     1.9 -	unsigned long cr3;
    1.10 -	asm("movq %%cr3,%0" : "=r" (cr3));
    1.11 -	return cr3;
    1.12 -} 
    1.13 +#define read_cr3() ({ \
    1.14 +	unsigned long __dummy; \
    1.15 +	asm("movq %%cr3,%0" : "=r" (__dummy)); \
    1.16 +	return machine_to_phys(__dummy); \
    1.17 +})
    1.18  
    1.19  static inline unsigned long read_cr4(void)
    1.20  {