diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-03-17 19:37:07 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-24 17:57:31 -0400 |
commit | abf33038ffa65097939d86d2a90f93adc6115aa0 (patch) | |
tree | 7f43d67974e0f1c0757b7ada535b33eece559bee /arch | |
parent | 286cd49456ef980c4b9904064ef34c36017b8351 (diff) |
xen: use appropriate pte types
Convert Xen pagetable handling to use appropriate *val_t types.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/xen/mmu.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 2a054ef2a3da..363f7a3b67fb 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -214,35 +214,35 @@ void xen_pmd_clear(pmd_t *pmdp) | |||
214 | xen_set_pmd(pmdp, __pmd(0)); | 214 | xen_set_pmd(pmdp, __pmd(0)); |
215 | } | 215 | } |
216 | 216 | ||
217 | unsigned long long xen_pte_val(pte_t pte) | 217 | pteval_t xen_pte_val(pte_t pte) |
218 | { | 218 | { |
219 | unsigned long long ret = 0; | 219 | pteval_t ret = 0; |
220 | 220 | ||
221 | if (pte.pte_low) { | 221 | if (pte.pte_low) { |
222 | ret = ((unsigned long long)pte.pte_high << 32) | pte.pte_low; | 222 | ret = ((pteval_t)pte.pte_high << 32) | pte.pte_low; |
223 | ret = machine_to_phys(XMADDR(ret)).paddr | 1; | 223 | ret = machine_to_phys(XMADDR(ret)).paddr | 1; |
224 | } | 224 | } |
225 | 225 | ||
226 | return ret; | 226 | return ret; |
227 | } | 227 | } |
228 | 228 | ||
229 | unsigned long long xen_pmd_val(pmd_t pmd) | 229 | pmdval_t xen_pmd_val(pmd_t pmd) |
230 | { | 230 | { |
231 | unsigned long long ret = pmd.pmd; | 231 | pmdval_t ret = pmd.pmd; |
232 | if (ret) | 232 | if (ret) |
233 | ret = machine_to_phys(XMADDR(ret)).paddr | 1; | 233 | ret = machine_to_phys(XMADDR(ret)).paddr | 1; |
234 | return ret; | 234 | return ret; |
235 | } | 235 | } |
236 | 236 | ||
237 | unsigned long long xen_pgd_val(pgd_t pgd) | 237 | pgdval_t xen_pgd_val(pgd_t pgd) |
238 | { | 238 | { |
239 | unsigned long long ret = pgd.pgd; | 239 | pgdval_t ret = pgd.pgd; |
240 | if (ret) | 240 | if (ret) |
241 | ret = machine_to_phys(XMADDR(ret)).paddr | 1; | 241 | ret = machine_to_phys(XMADDR(ret)).paddr | 1; |
242 | return ret; | 242 | return ret; |
243 | } | 243 | } |
244 | 244 | ||
245 | pte_t xen_make_pte(unsigned long long pte) | 245 | pte_t xen_make_pte(pteval_t pte) |
246 | { | 246 | { |
247 | if (pte & _PAGE_PRESENT) { | 247 | if (pte & _PAGE_PRESENT) { |
248 | pte = phys_to_machine(XPADDR(pte)).maddr; | 248 | pte = phys_to_machine(XPADDR(pte)).maddr; |
@@ -252,7 +252,7 @@ pte_t xen_make_pte(unsigned long long pte) | |||
252 | return (pte_t){ .pte = pte }; | 252 | return (pte_t){ .pte = pte }; |
253 | } | 253 | } |
254 | 254 | ||
255 | pmd_t xen_make_pmd(unsigned long long pmd) | 255 | pmd_t xen_make_pmd(pmdval_t pmd) |
256 | { | 256 | { |
257 | if (pmd & 1) | 257 | if (pmd & 1) |
258 | pmd = phys_to_machine(XPADDR(pmd)).maddr; | 258 | pmd = phys_to_machine(XPADDR(pmd)).maddr; |
@@ -260,7 +260,7 @@ pmd_t xen_make_pmd(unsigned long long pmd) | |||
260 | return (pmd_t){ pmd }; | 260 | return (pmd_t){ pmd }; |
261 | } | 261 | } |
262 | 262 | ||
263 | pgd_t xen_make_pgd(unsigned long long pgd) | 263 | pgd_t xen_make_pgd(pgdval_t pgd) |
264 | { | 264 | { |
265 | if (pgd & _PAGE_PRESENT) | 265 | if (pgd & _PAGE_PRESENT) |
266 | pgd = phys_to_machine(XPADDR(pgd)).maddr; | 266 | pgd = phys_to_machine(XPADDR(pgd)).maddr; |
@@ -273,9 +273,9 @@ void xen_set_pte(pte_t *ptep, pte_t pte) | |||
273 | *ptep = pte; | 273 | *ptep = pte; |
274 | } | 274 | } |
275 | 275 | ||
276 | unsigned long xen_pte_val(pte_t pte) | 276 | pteval_t xen_pte_val(pte_t pte) |
277 | { | 277 | { |
278 | unsigned long ret = pte.pte_low; | 278 | pteval_t ret = pte.pte_low; |
279 | 279 | ||
280 | if (ret & _PAGE_PRESENT) | 280 | if (ret & _PAGE_PRESENT) |
281 | ret = machine_to_phys(XMADDR(ret)).paddr; | 281 | ret = machine_to_phys(XMADDR(ret)).paddr; |
@@ -283,15 +283,15 @@ unsigned long xen_pte_val(pte_t pte) | |||
283 | return ret; | 283 | return ret; |
284 | } | 284 | } |
285 | 285 | ||
286 | unsigned long xen_pgd_val(pgd_t pgd) | 286 | pgdval_t xen_pgd_val(pgd_t pgd) |
287 | { | 287 | { |
288 | unsigned long ret = pgd.pgd; | 288 | pteval_t ret = pgd.pgd; |
289 | if (ret) | 289 | if (ret) |
290 | ret = machine_to_phys(XMADDR(ret)).paddr | 1; | 290 | ret = machine_to_phys(XMADDR(ret)).paddr | 1; |
291 | return ret; | 291 | return ret; |
292 | } | 292 | } |
293 | 293 | ||
294 | pte_t xen_make_pte(unsigned long pte) | 294 | pte_t xen_make_pte(pteval_t pte) |
295 | { | 295 | { |
296 | if (pte & _PAGE_PRESENT) { | 296 | if (pte & _PAGE_PRESENT) { |
297 | pte = phys_to_machine(XPADDR(pte)).maddr; | 297 | pte = phys_to_machine(XPADDR(pte)).maddr; |
@@ -301,7 +301,7 @@ pte_t xen_make_pte(unsigned long pte) | |||
301 | return (pte_t){ pte }; | 301 | return (pte_t){ pte }; |
302 | } | 302 | } |
303 | 303 | ||
304 | pgd_t xen_make_pgd(unsigned long pgd) | 304 | pgd_t xen_make_pgd(pgdval_t pgd) |
305 | { | 305 | { |
306 | if (pgd & _PAGE_PRESENT) | 306 | if (pgd & _PAGE_PRESENT) |
307 | pgd = phys_to_machine(XPADDR(pgd)).maddr; | 307 | pgd = phys_to_machine(XPADDR(pgd)).maddr; |