summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorKanoj Sarcar <kanoj@engr.sgi.com>2000-03-16 04:04:32 +0000
committerKanoj Sarcar <kanoj@engr.sgi.com>2000-03-16 04:04:32 +0000
commitf91ca86d6e89dddf17baf2f79936ed3cf2feb5ac (patch)
treeb22de9cabd6178b0a40486c617d2da8311a8bbca /arch
parentb64bbed64fa5444942bed0a937173e52b589ed87 (diff)
The fast tlb handlers [x]tlb_refill_debug blindly look at pgd/pmd/ptes.
So, _all_ page tables in the system _must_ be 2 pages, including empty_bad_page_table. And, the invalid page table _must_ be initialized to all invalid entries, so that even if the fast handler picks something up from an unallocated pmd/ptetable, the processor takes a mm fault.
Diffstat (limited to 'arch')
-rw-r--r--arch/mips64/kernel/head.S2
-rw-r--r--arch/mips64/mm/init.c3
-rw-r--r--arch/mips64/sgi-ip27/ip27-memory.c1
3 files changed, 4 insertions, 2 deletions
diff --git a/arch/mips64/kernel/head.S b/arch/mips64/kernel/head.S
index 3dae9b52c..0928b2b09 100644
--- a/arch/mips64/kernel/head.S
+++ b/arch/mips64/kernel/head.S
@@ -81,5 +81,5 @@ NESTED(kernel_entry, 16, sp) # kernel entry point
page swapper_pg_dir, 1
page invalid_pte_table, 1
page invalid_pmd_table, 1
+ page empty_bad_page_table, 1
page empty_bad_page
- page empty_bad_page_table
diff --git a/arch/mips64/mm/init.c b/arch/mips64/mm/init.c
index ae17a6d91..42dece549 100644
--- a/arch/mips64/mm/init.c
+++ b/arch/mips64/mm/init.c
@@ -252,7 +252,7 @@ extern inline void pte_init(unsigned long page)
bp = pte_val(BAD_PAGE);
p = (unsigned long *) page;
- end = p + PTRS_PER_PTE;
+ end = p + (2 * PTRS_PER_PTE);
while (p < end) {
p[0] = p[1] = p[2] = p[3] =
@@ -348,6 +348,7 @@ void __init paging_init(void)
/* Initialize the entire pgd. */
pgd_init((unsigned long)swapper_pg_dir);
pmd_init((unsigned long)invalid_pmd_table);
+ memset((void *)invalid_pte_table, 0, sizeof(pte_t) * 2 * PTRS_PER_PTE);
max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
low = max_low_pfn;
diff --git a/arch/mips64/sgi-ip27/ip27-memory.c b/arch/mips64/sgi-ip27/ip27-memory.c
index 88ea07dc8..eb5ac3c87 100644
--- a/arch/mips64/sgi-ip27/ip27-memory.c
+++ b/arch/mips64/sgi-ip27/ip27-memory.c
@@ -274,6 +274,7 @@ void __init paging_init(void)
/* Initialize the entire pgd. */
pgd_init((unsigned long)swapper_pg_dir);
pmd_init((unsigned long)invalid_pmd_table);
+ memset((void *)invalid_pte_table, 0, sizeof(pte_t) * 2 * PTRS_PER_PTE);
for (node = 0; node < numnodes; node++) {
pfn_t start_pfn = slot_getbasepfn(node, 0);