diff options
Diffstat (limited to 'arch/ppc/mm/pgtable.c')
-rw-r--r-- | arch/ppc/mm/pgtable.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c index 6ea9185fd120..706bca8eb144 100644 --- a/arch/ppc/mm/pgtable.c +++ b/arch/ppc/mm/pgtable.c | |||
@@ -39,7 +39,7 @@ unsigned long ioremap_base; | |||
39 | unsigned long ioremap_bot; | 39 | unsigned long ioremap_bot; |
40 | int io_bat_index; | 40 | int io_bat_index; |
41 | 41 | ||
42 | #if defined(CONFIG_6xx) || defined(CONFIG_POWER3) | 42 | #if defined(CONFIG_6xx) |
43 | #define HAVE_BATS 1 | 43 | #define HAVE_BATS 1 |
44 | #endif | 44 | #endif |
45 | 45 | ||
@@ -368,7 +368,7 @@ void __init io_block_mapping(unsigned long virt, phys_addr_t phys, | |||
368 | * the PTE pointer is unmodified if PTE is not found. | 368 | * the PTE pointer is unmodified if PTE is not found. |
369 | */ | 369 | */ |
370 | int | 370 | int |
371 | get_pteptr(struct mm_struct *mm, unsigned long addr, pte_t **ptep) | 371 | get_pteptr(struct mm_struct *mm, unsigned long addr, pte_t **ptep, pmd_t **pmdp) |
372 | { | 372 | { |
373 | pgd_t *pgd; | 373 | pgd_t *pgd; |
374 | pmd_t *pmd; | 374 | pmd_t *pmd; |
@@ -383,6 +383,8 @@ get_pteptr(struct mm_struct *mm, unsigned long addr, pte_t **ptep) | |||
383 | if (pte) { | 383 | if (pte) { |
384 | retval = 1; | 384 | retval = 1; |
385 | *ptep = pte; | 385 | *ptep = pte; |
386 | if (pmdp) | ||
387 | *pmdp = pmd; | ||
386 | /* XXX caller needs to do pte_unmap, yuck */ | 388 | /* XXX caller needs to do pte_unmap, yuck */ |
387 | } | 389 | } |
388 | } | 390 | } |
@@ -420,7 +422,7 @@ unsigned long iopa(unsigned long addr) | |||
420 | mm = &init_mm; | 422 | mm = &init_mm; |
421 | 423 | ||
422 | pa = 0; | 424 | pa = 0; |
423 | if (get_pteptr(mm, addr, &pte)) { | 425 | if (get_pteptr(mm, addr, &pte, NULL)) { |
424 | pa = (pte_val(*pte) & PAGE_MASK) | (addr & ~PAGE_MASK); | 426 | pa = (pte_val(*pte) & PAGE_MASK) | (addr & ~PAGE_MASK); |
425 | pte_unmap(pte); | 427 | pte_unmap(pte); |
426 | } | 428 | } |