diff options
Diffstat (limited to 'arch/x86/include/asm/xen/page.h')
-rw-r--r-- | arch/x86/include/asm/xen/page.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/x86/include/asm/xen/page.h b/arch/x86/include/asm/xen/page.h index 018a0a40079..bf5f7d32bd0 100644 --- a/arch/x86/include/asm/xen/page.h +++ b/arch/x86/include/asm/xen/page.h | |||
@@ -112,13 +112,9 @@ static inline xpaddr_t machine_to_phys(xmaddr_t machine) | |||
112 | */ | 112 | */ |
113 | static inline unsigned long mfn_to_local_pfn(unsigned long mfn) | 113 | static inline unsigned long mfn_to_local_pfn(unsigned long mfn) |
114 | { | 114 | { |
115 | extern unsigned long max_mapnr; | ||
116 | unsigned long pfn = mfn_to_pfn(mfn); | 115 | unsigned long pfn = mfn_to_pfn(mfn); |
117 | if ((pfn < max_mapnr) | 116 | if (get_phys_to_machine(pfn) != mfn) |
118 | && !xen_feature(XENFEAT_auto_translated_physmap) | 117 | return -1; /* force !pfn_valid() */ |
119 | && (get_phys_to_machine(pfn) != mfn)) | ||
120 | return max_mapnr; /* force !pfn_valid() */ | ||
121 | /* XXX fixme; not true with sparsemem */ | ||
122 | return pfn; | 118 | return pfn; |
123 | } | 119 | } |
124 | 120 | ||