Merge branch 'locking-arch-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / arch / sparc / kernel / smp_64.c
index f7ba87543e5ff092e723a14cf6df8403e343ac4c..302c476413d5c5eaeb29fd5cedd529f86de2d30f 100644 (file)
@@ -1138,7 +1138,7 @@ static unsigned long penguins_are_doing_time;
 
 void smp_capture(void)
 {
-       int result = atomic_add_ret(1, &smp_capture_depth);
+       int result = atomic_add_return(1, &smp_capture_depth);
 
        if (result == 1) {
                int ncpus = num_online_cpus();
@@ -1467,6 +1467,13 @@ static void __init pcpu_populate_pte(unsigned long addr)
        pud_t *pud;
        pmd_t *pmd;
 
+       if (pgd_none(*pgd)) {
+               pud_t *new;
+
+               new = __alloc_bootmem(PAGE_SIZE, PAGE_SIZE, PAGE_SIZE);
+               pgd_populate(&init_mm, pgd, new);
+       }
+
        pud = pud_offset(pgd, addr);
        if (pud_none(*pud)) {
                pmd_t *new;