]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/mm/stab.c
Pull apm-freeze-fix into release branch
[linux-2.6-omap-h63xx.git] / arch / powerpc / mm / stab.c
index 91d25fb27f8940973fe15d67ff6f76a3c28acaa2..50448d5de9d247c9657c66a85e76f225483fc4f4 100644 (file)
@@ -12,7 +12,6 @@
  *      2 of the License, or (at your option) any later version.
  */
 
-#include <linux/config.h>
 #include <asm/pgtable.h>
 #include <asm/mmu.h>
 #include <asm/mmu_context.h>
@@ -21,6 +20,7 @@
 #include <asm/lmb.h>
 #include <asm/abs_addr.h>
 #include <asm/firmware.h>
+#include <asm/iseries/hv_call.h>
 
 struct stab_entry {
        unsigned long esid_data;
@@ -56,7 +56,7 @@ static int make_ste(unsigned long stab, unsigned long esid, unsigned long vsid)
                for (entry = 0; entry < 8; entry++, ste++) {
                        if (!(ste->esid_data & STE_ESID_V)) {
                                ste->vsid_data = vsid_data;
-                               asm volatile("eieio":::"memory");
+                               eieio();
                                ste->esid_data = esid_data;
                                return (global_entry | entry);
                        }
@@ -102,7 +102,7 @@ static int make_ste(unsigned long stab, unsigned long esid, unsigned long vsid)
        asm volatile("sync" : : : "memory");    /* Order update */
 
        castout_ste->vsid_data = vsid_data;
-       asm volatile("eieio" : : : "memory");   /* Order update */
+       eieio();                                /* Order update */
        castout_ste->esid_data = esid_data;
 
        asm volatile("slbie  %0" : : "r" (old_esid << SID_SHIFT));
@@ -123,12 +123,12 @@ static int __ste_allocate(unsigned long ea, struct mm_struct *mm)
 
        /* Kernel or user address? */
        if (is_kernel_addr(ea)) {
-               vsid = get_kernel_vsid(ea);
+               vsid = get_kernel_vsid(ea, MMU_SEGSIZE_256M);
        } else {
                if ((ea >= TASK_SIZE_USER64) || (! mm))
                        return 1;
 
-               vsid = get_vsid(mm->context.id, ea);
+               vsid = get_vsid(mm->context.id, ea, MMU_SEGSIZE_256M);
        }
 
        stab_entry = make_ste(get_paca()->stab_addr, GET_ESID(ea), vsid);
@@ -200,10 +200,6 @@ void switch_stab(struct task_struct *tsk, struct mm_struct *mm)
 
        __get_cpu_var(stab_cache_ptr) = 0;
 
-#ifdef CONFIG_PPC_64K_PAGES
-       get_paca()->pgdir = mm->pgd;
-#endif /* CONFIG_PPC_64K_PAGES */
-
        /* Now preload some entries for the new task */
        if (test_tsk_thread_flag(tsk, TIF_32BIT))
                unmapped_base = TASK_UNMAPPED_BASE_USER32;
@@ -232,14 +228,14 @@ void switch_stab(struct task_struct *tsk, struct mm_struct *mm)
  * the first (bolted) segment, so that do_stab_bolted won't get a
  * recursive segment miss on the segment table itself.
  */
-void stabs_alloc(void)
+void __init stabs_alloc(void)
 {
        int cpu;
 
        if (cpu_has_feature(CPU_FTR_SLB))
                return;
 
-       for_each_cpu(cpu) {
+       for_each_possible_cpu(cpu) {
                unsigned long newstab;
 
                if (cpu == 0)
@@ -266,7 +262,7 @@ void stabs_alloc(void)
  */
 void stab_initialize(unsigned long stab)
 {
-       unsigned long vsid = get_kernel_vsid(PAGE_OFFSET);
+       unsigned long vsid = get_kernel_vsid(PAGE_OFFSET, MMU_SEGSIZE_256M);
        unsigned long stabreal;
 
        asm volatile("isync; slbia; isync":::"memory");