patch-2.4.21 linux-2.4.21/arch/s390x/mm/init.c

Next file: linux-2.4.21/arch/sh/config.in
Previous file: linux-2.4.21/arch/s390x/lib/uaccess.S
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/arch/s390x/mm/init.c linux-2.4.21/arch/s390x/mm/init.c
@@ -40,6 +40,7 @@
 mmu_gather_t mmu_gathers[NR_CPUS];
 
 static unsigned long totalram_pages;
+extern unsigned long memory_size;
 
 pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((__aligned__(PAGE_SIZE)));
 char  empty_zero_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE)));
@@ -233,6 +234,11 @@
                                         continue;
                                 }
                                 set_pte(pt_dir, pte);
+				if (address < memory_size ) /* do not set storage
+							       key outside the storage
+							       or die */
+					set_access_key(pte); /* switch to our
+								access key */
                                 address += PAGE_SIZE;
                         }
                 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)