Ensure that machine / physical addresses are treated as vm_paddr_t

MFC after:	1 month
This commit is contained in:
Kip Macy 2008-08-17 23:39:22 +00:00
parent fc715e2309
commit 1c8e9487bf
2 changed files with 5 additions and 5 deletions

View File

@ -57,7 +57,7 @@ char *xen_setbootenv(char *cmd_line);
int xen_boothowto(char *envp);
void _xen_machphys_update(unsigned long, unsigned long, char *file, int line);
void _xen_machphys_update(vm_paddr_t, vm_paddr_t, char *file, int line);
#ifdef INVARIANTS
#define xen_machphys_update(a, b) _xen_machphys_update((a), (b), __FILE__, __LINE__)

View File

@ -69,8 +69,8 @@ extern xen_pfn_t *xen_machine_phys;
#endif
#define PFNTOMFN(i) (xen_phys_machine[((xen_pfn_t)i)])
#define MFNTOPFN(i) (xen_machine_phys[((xen_pfn_t)i)])
#define PFNTOMFN(i) (xen_phys_machine[(i)])
#define MFNTOPFN(i) ((vm_paddr_t)xen_machine_phys[(i)])
#define VTOP(x) ((uintptr_t)(((uint8_t *)(x)) - KERNBASE))
#define PTOV(x) ((x) + KERNBASE)
@ -81,8 +81,8 @@ extern xen_pfn_t *xen_machine_phys;
#define VTOMFN(va) (vtomach(va) >> PAGE_SHIFT)
#define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
#define phystomach(pa) (PFNTOMFN((pa) >> PAGE_SHIFT) << PAGE_SHIFT)
#define machtophys(ma) (MFNTOPFN((ma) >> PAGE_SHIFT) << PAGE_SHIFT)
#define phystomach(pa) (((vm_paddr_t)(PFNTOMFN((pa) >> PAGE_SHIFT))) << PAGE_SHIFT)
#define machtophys(ma) (((vm_paddr_t)(MFNTOPFN((ma) >> PAGE_SHIFT))) << PAGE_SHIFT)
void xpq_init(void);