From 46cf9e213941811f7a252471bb72ab53313ae7a8 Mon Sep 17 00:00:00 2001 From: Peter Chubb Date: Tue, 23 Aug 2005 20:07:00 -0700 Subject: [PATCH] --- yaml --- r: 8531 b: refs/heads/master c: 6cf07a8cc86a0b471466c7fe45892f7ef434015b h: refs/heads/master i: 8529: 2657b7de2438e69463aa0a50b359484db820a10b 8527: 9fce484545a48a044627e13c791ab71c992f4b98 v: v3 --- [refs] | 2 +- trunk/arch/ia64/mm/init.c | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index e8a1ec086714..69f8dcc20606 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 714d2dc14914f0f7bb008effe830c99eb47c75df +refs/heads/master: 6cf07a8cc86a0b471466c7fe45892f7ef434015b diff --git a/trunk/arch/ia64/mm/init.c b/trunk/arch/ia64/mm/init.c index 65f9958db9f0..1281c609ee98 100644 --- a/trunk/arch/ia64/mm/init.c +++ b/trunk/arch/ia64/mm/init.c @@ -382,13 +382,22 @@ ia64_mmu_init (void *my_cpu_data) if (impl_va_bits < 51 || impl_va_bits > 61) panic("CPU has bogus IMPL_VA_MSB value of %lu!\n", impl_va_bits - 1); + /* + * mapped_space_bits - PAGE_SHIFT is the total number of ptes we need, + * which must fit into "vmlpt_bits - pte_bits" slots. Second half of + * the test makes sure that our mapped space doesn't overlap the + * unimplemented hole in the middle of the region. + */ + if ((mapped_space_bits - PAGE_SHIFT > vmlpt_bits - pte_bits) || + (mapped_space_bits > impl_va_bits - 1)) + panic("Cannot build a big enough virtual-linear page table" + " to cover mapped address space.\n" + " Try using a smaller page size.\n"); + /* place the VMLPT at the end of each page-table mapped region: */ pta = POW2(61) - POW2(vmlpt_bits); - if (POW2(mapped_space_bits) >= pta) - panic("mm/init: overlap between virtually mapped linear page table and " - "mapped kernel space!"); /* * Set the (virtually mapped linear) page table address. Bit * 8 selects between the short and long format, bits 2-7 the