aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Mosberger <davidm@hpl.hp.com>2005-03-31 00:15:46 -0800
committerTony Luck <tony.luck@intel.com>2005-03-31 00:15:46 -0800
commit1f892e799c51bb4395f15c9b10e6d0355309e468 (patch)
tree28d9a68623d68e095da865170c60bfed7b70bc41
parentacaf240e91e52280da508b38a5d2da8a55583545 (diff)
downloadhistory-1f892e799c51bb4395f15c9b10e6d0355309e468.tar.gz
[IA64] Initialize ar.k7 to empty_zero_page early on.
Without this initialization, early TLB misses to any user-regions will cause the TLB miss handlers to go down in flames. Normally, no such early TLB misses occur, but aggressive use of lfetch.fault can trigger it easily (e.g., when using lfetch.fault for the prefetch()/prefetchw() macros we get an early miss for address 0 due to a prefetch in find_pid()). Signed-off-by: David Mosberger-Tang <davidm@hpl.hp.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
-rw-r--r--arch/ia64/kernel/setup.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index 9891effcf4c3cb..f05650c801d2a4 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -646,6 +646,15 @@ cpu_init (void)
ia64_set_kr(IA64_KR_FPU_OWNER, 0);
/*
+ * Initialize the page-table base register to a global
+ * directory with all zeroes. This ensure that we can handle
+ * TLB-misses to user address-space even before we created the
+ * first user address-space. This may happen, e.g., due to
+ * aggressive use of lfetch.fault.
+ */
+ ia64_set_kr(IA64_KR_PT_BASE, __pa(ia64_imva(empty_zero_page)));
+
+ /*
* Initialize default control register to defer all speculative faults. The
* kernel MUST NOT depend on a particular setting of these bits (in other words,
* the kernel must have recovery code for all speculative accesses). Turn on