]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/mm/tlb_32.c
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
[linux-2.6-omap-h63xx.git] / arch / powerpc / mm / tlb_32.c
index ad580f3742e5cf187bfe65cf6f7c1f948d3ff558..06c7e77e097ab2ba56a824a9fa930fa55c8c3498 100644 (file)
@@ -11,7 +11,6 @@
  *  Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
  *  and Cort Dougan (PReP) (cort@cs.nmt.edu)
  *    Copyright (C) 1996 Paul Mackerras
- *  Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
  *
  *  Derived from "arch/i386/mm/init.c"
  *    Copyright (C) 1991, 1992, 1993, 1994  Linus Torvalds
@@ -23,7 +22,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/init.h>
@@ -42,7 +40,7 @@ void flush_hash_entry(struct mm_struct *mm, pte_t *ptep, unsigned long addr)
 
        if (Hash != 0) {
                ptephys = __pa(ptep) & PAGE_MASK;
-               flush_hash_pages(mm->context, addr, ptephys, 1);
+               flush_hash_pages(mm->context.id, addr, ptephys, 1);
        }
 }
 
@@ -102,7 +100,7 @@ static void flush_range(struct mm_struct *mm, unsigned long start,
        pmd_t *pmd;
        unsigned long pmd_end;
        int count;
-       unsigned int ctx = mm->context;
+       unsigned int ctx = mm->context.id;
 
        if (Hash == 0) {
                _tlbia();
@@ -112,7 +110,7 @@ static void flush_range(struct mm_struct *mm, unsigned long start,
        if (start >= end)
                return;
        end = (end - 1) | ~PAGE_MASK;
-       pmd = pmd_offset(pgd_offset(mm, start), start);
+       pmd = pmd_offset(pud_offset(pgd_offset(mm, start), start), start);
        for (;;) {
                pmd_end = ((start + PGDIR_SIZE) & PGDIR_MASK) - 1;
                if (pmd_end > end)
@@ -170,9 +168,9 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr)
                return;
        }
        mm = (vmaddr < TASK_SIZE)? vma->vm_mm: &init_mm;
-       pmd = pmd_offset(pgd_offset(mm, vmaddr), vmaddr);
+       pmd = pmd_offset(pud_offset(pgd_offset(mm, vmaddr), vmaddr), vmaddr);
        if (!pmd_none(*pmd))
-               flush_hash_pages(mm->context, vmaddr, pmd_val(*pmd), 1);
+               flush_hash_pages(mm->context.id, vmaddr, pmd_val(*pmd), 1);
        FINISH_FLUSH;
 }