summaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/tsb.S
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-03-02 07:42:18 +0100
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 10:14:13 +0100
commit45f791eb0f03e760183d30d3f1f18dc2b8e902fe (patch)
tree05ef47c68b45202106b70c1f28d4935a2c6115fb /arch/sparc64/kernel/tsb.S
parent[SPARC64]: Fix typo in SUN4V D-TLB miss handler. (diff)
downloadlinux-45f791eb0f03e760183d30d3f1f18dc2b8e902fe.tar.xz
linux-45f791eb0f03e760183d30d3f1f18dc2b8e902fe.zip
[SPARC64]: Fix _PAGE_EXEC handling.
First of all, use the known _PAGE_EXEC_{4U,4V} value instead of loading _PAGE_EXEC from memory. We either know which one to use by context, or we can code patch the test. Next, we need to check executability of a PTE in the generic TSB miss handler. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/tsb.S')
-rw-r--r--arch/sparc64/kernel/tsb.S9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/tsb.S b/arch/sparc64/kernel/tsb.S
index cc225c0563c3..563852bf3594 100644
--- a/arch/sparc64/kernel/tsb.S
+++ b/arch/sparc64/kernel/tsb.S
@@ -103,6 +103,15 @@ tsb_dtlb_load:
mov %g5, %g3
tsb_itlb_load:
+ /* Executable bit must be set. */
+661: andcc %g5, _PAGE_EXEC_4U, %g0
+ .section .sun4v_1insn_patch, "ax"
+ .word 661b
+ andcc %g5, _PAGE_EXEC_4V, %g0
+ .previous
+
+ be,pn %xcc, tsb_do_fault
+ nop
661: stxa %g5, [%g0] ASI_ITLB_DATA_IN
retry