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

Next file: linux-2.4.21/arch/s390x/kernel/debug.c
Previous file: linux-2.4.21/arch/s390/lib/uaccess.S
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/arch/s390/mm/init.c linux-2.4.21/arch/s390/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)));
@@ -153,6 +154,11 @@
                         if (address >= end_mem)
                                 pte_clear(&pte);
                         set_pte(pg_table, 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)