summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Schnelle <svens@stackframe.org>2019-04-18 11:33:13 +0200
committerHelge Deller <deller@gmx.de>2019-05-03 23:47:40 +0200
commit6b1370ae392b79ac3e2d053205f4107d4a55c102 (patch)
tree2aad8bf1c95b7299b90e40594afeda0a2bec33e1
parent75da60ff53fb030e12ac83cdef1da0464b289d1a (diff)
downloadlinux-6b1370ae392b79ac3e2d053205f4107d4a55c102.tar.gz
linux-6b1370ae392b79ac3e2d053205f4107d4a55c102.tar.bz2
linux-6b1370ae392b79ac3e2d053205f4107d4a55c102.zip
parisc: enable wide mode early
The idle task might have been allocated above 4GB. With the current code we cannot access that memory because the CPU is still running in narrow mode. This was found on a J5000 machine and the patch is required to enable SPARSEMEM on that machine. Signed-off-by: Sven Schnelle <svens@stackframe.org> Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r--arch/parisc/kernel/head.S13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S
index fbb4e43fda05..fefaba2097b5 100644
--- a/arch/parisc/kernel/head.S
+++ b/arch/parisc/kernel/head.S
@@ -329,6 +329,19 @@ smp_slave_stext:
mtsp %r0,%sr6
mtsp %r0,%sr7
+#ifdef CONFIG_64BIT
+ /*
+ * Enable Wide mode early, in case the task_struct for the idle
+ * task in smp_init_current_idle_task was allocated above 4GB.
+ */
+1: mfia %rp /* clear upper part of pcoq */
+ ldo 2f-1b(%rp),%rp
+ depdi 0,31,32,%rp
+ bv (%rp)
+ ssm PSW_SM_W,%r0
+2:
+#endif
+
/* Initialize the SP - monarch sets up smp_init_current_idle_task */
load32 PA(smp_init_current_idle_task),%sp
LDREG 0(%sp),%sp /* load task address */