vserver 1.9.5.x5
[linux-2.6.git] / arch / sparc / mm / sun4c.c
index b56b67b..6f91a3e 100644 (file)
@@ -379,7 +379,7 @@ extern unsigned long invalid_segment_patch1, invalid_segment_patch1_ff;
 extern unsigned long invalid_segment_patch2, invalid_segment_patch2_ff;
 extern unsigned long invalid_segment_patch1_1ff, invalid_segment_patch2_1ff;
 extern unsigned long num_context_patch1, num_context_patch1_16;
-extern unsigned long num_context_patch2, num_context_patch2_16;
+extern unsigned long num_context_patch2_16;
 extern unsigned long vac_linesize_patch, vac_linesize_patch_32;
 extern unsigned long vac_hwflush_patch1, vac_hwflush_patch1_on;
 extern unsigned long vac_hwflush_patch2, vac_hwflush_patch2_on;
@@ -511,7 +511,8 @@ void __init sun4c_probe_memerr_reg(void)
                node = prom_searchsiblings(prom_root_node, "memory-error");
                if (!node)
                        return;
-               prom_getproperty(node, "reg", (char *)regs, sizeof(regs));
+               if (prom_getproperty(node, "reg", (char *)regs, sizeof(regs)) <= 0)
+                       return;
                /* hmm I think regs[0].which_io is zero here anyways */
                sun4c_memerr_reg = ioremap(regs[0].phys_addr, regs[0].reg_size);
        }
@@ -2114,7 +2115,7 @@ void __init sun4c_paging_init(void)
                zones_size[ZONE_HIGHMEM] = npages;
                zholes_size[ZONE_HIGHMEM] = npages - calc_highpages();
 
-               free_area_init_node(0, &contig_page_data, NULL, zones_size,
+               free_area_init_node(0, &contig_page_data, zones_size,
                                    pfn_base, zholes_size);
                mem_map = contig_page_data.node_mem_map;
        }
@@ -2225,6 +2226,7 @@ void __init ld_mmu_sun4c(void)
        BTFIXUPSET_CALL(free_pgd_fast, sun4c_free_pgd_fast, BTFIXUPCALL_NORM);
        BTFIXUPSET_CALL(get_pgd_fast, sun4c_get_pgd_fast, BTFIXUPCALL_NORM);
 
+       BTFIXUPSET_HALF(pte_readi, _SUN4C_PAGE_READ);
        BTFIXUPSET_HALF(pte_writei, _SUN4C_PAGE_WRITE);
        BTFIXUPSET_HALF(pte_dirtyi, _SUN4C_PAGE_MODIFIED);
        BTFIXUPSET_HALF(pte_youngi, _SUN4C_PAGE_ACCESSED);