direct-io.hg
changeset 4012:cd6a629317ea
bitkeeper revision 1.1236.13.1 (422db1bdZ6ZohI27rSF1Yo3Q91_REw)
Return mfn of m2p table correctly.
Return mfn of m2p table correctly.
author | iap10@freefall.cl.cam.ac.uk |
---|---|
date | Tue Mar 08 14:07:57 2005 +0000 (2005-03-08) |
parents | 205e127344e9 |
children | cb6267631f70 |
files | linux-2.6.10-xen-sparse/drivers/xen/privcmd/privcmd.c linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/page.h |
line diff
1.1 --- a/linux-2.6.10-xen-sparse/drivers/xen/privcmd/privcmd.c Mon Mar 07 17:49:21 2005 +0000 1.2 +++ b/linux-2.6.10-xen-sparse/drivers/xen/privcmd/privcmd.c Tue Mar 08 14:07:57 2005 +0000 1.3 @@ -177,7 +177,7 @@ static int privcmd_ioctl(struct inode *i 1.4 unsigned long m2pv = (unsigned long)machine_to_phys_mapping; 1.5 pgd_t *pgd = pgd_offset_k(m2pv); 1.6 pmd_t *pmd = pmd_offset(pgd, m2pv); 1.7 - unsigned long m2p_start_mfn = pmd_val(*pmd) >> PAGE_SHIFT; 1.8 + unsigned long m2p_start_mfn = pmd_val_ma(*pmd) >> PAGE_SHIFT; 1.9 ret = put_user(m2p_start_mfn, (unsigned long *)data) ? -EFAULT: 0; 1.10 } 1.11 break;
2.1 --- a/linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/page.h Mon Mar 07 17:49:21 2005 +0000 2.2 +++ b/linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/page.h Tue Mar 08 14:07:57 2005 +0000 2.3 @@ -110,6 +110,7 @@ static inline unsigned long pmd_val(pmd_ 2.4 if (ret) ret = machine_to_phys(ret); 2.5 return ret; 2.6 } 2.7 +#define pmd_val_ma(x) ((x).pmd) 2.8 #define pgd_val(x) ({ BUG(); (unsigned long)0; }) 2.9 #define pgprot_val(x) ((x).pgprot) 2.10