aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen/enlighten.c
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2008-07-28 17:32:09 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-31 11:10:35 -0400
commit169ad16bb87c10a3f7c108bb7008ebc0270f617a (patch)
tree5c12745e3ddb98432ecb44bb629ae9c4e34f7c16 /arch/x86/xen/enlighten.c
parentcef43bf6b3afd819f7cdcba356af0e8220fb3789 (diff)
xen_alloc_ptpage: cast PFN_PHYS() argument to unsigned long
Currently paravirt_ops alloc_p*() uses u32 for the pfn args. We should change that later, but while the pfn parameter is still u32, we need to cast the PFN_PHYS() argument at xen_alloc_ptpage() to unsigned long, otherwise it will lose bits on the shift. I think PFN_PHYS() should behave better when fed with smaller integers, but a cast to unsigned long won't be enough for all cases on 32-bit PAE, and a cast to u64 would be overkill for most users of PFN_PHYS(). We could have two different flavors of PFN_PHYS: one for low pages only (unsigned long) and another that works for any page (u64)), but while we don't have it, we will need the cast to unsigned long on xen_alloc_ptpage(). Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/xen/enlighten.c')
-rw-r--r--arch/x86/xen/enlighten.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 04ec69e4d02e..53afa14eb314 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -822,7 +822,7 @@ static void xen_alloc_ptpage(struct mm_struct *mm, u32 pfn, unsigned level)
822 SetPagePinned(page); 822 SetPagePinned(page);
823 823
824 if (!PageHighMem(page)) { 824 if (!PageHighMem(page)) {
825 make_lowmem_page_readonly(__va(PFN_PHYS(pfn))); 825 make_lowmem_page_readonly(__va(PFN_PHYS((unsigned long)pfn)));
826 if (level == PT_PTE) 826 if (level == PT_PTE)
827 pin_pagetable_pfn(MMUEXT_PIN_L1_TABLE, pfn); 827 pin_pagetable_pfn(MMUEXT_PIN_L1_TABLE, pfn);
828 } else 828 } else