aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/misctrap.S
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-04-28 03:47:20 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-28 03:47:20 -0400
commit6eda3a75928a3dc1072dfffd228ab818869d83ad (patch)
tree56e44907f23134273fe383424c69df4d62c6544c /arch/sparc64/kernel/misctrap.S
parent194f1a68b93e959ede6ec363db4714e630bdbb6a (diff)
sparc64: Split entry.S up into seperate files.
entry.S was a hodge-podge of several totally unrelated sets of assembler routines, ranging from FPU trap handlers to hypervisor call functions. Split it up into topic-sized pieces. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/misctrap.S')
-rw-r--r--arch/sparc64/kernel/misctrap.S87
1 files changed, 87 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/misctrap.S b/arch/sparc64/kernel/misctrap.S
new file mode 100644
index 000000000000..b257497ddde1
--- /dev/null
+++ b/arch/sparc64/kernel/misctrap.S
@@ -0,0 +1,87 @@
1 .type __do_privact,#function
2__do_privact:
3 mov TLB_SFSR, %g3
4 stxa %g0, [%g3] ASI_DMMU ! Clear FaultValid bit
5 membar #Sync
6 sethi %hi(109f), %g7
7 ba,pt %xcc, etrap
8109: or %g7, %lo(109b), %g7
9 call do_privact
10 add %sp, PTREGS_OFF, %o0
11 ba,pt %xcc, rtrap
12 nop
13 .size __do_privact,.-__do_privact
14
15 .type do_mna,#function
16do_mna:
17 rdpr %tl, %g3
18 cmp %g3, 1
19
20 /* Setup %g4/%g5 now as they are used in the
21 * winfixup code.
22 */
23 mov TLB_SFSR, %g3
24 mov DMMU_SFAR, %g4
25 ldxa [%g4] ASI_DMMU, %g4
26 ldxa [%g3] ASI_DMMU, %g5
27 stxa %g0, [%g3] ASI_DMMU ! Clear FaultValid bit
28 membar #Sync
29 bgu,pn %icc, winfix_mna
30 rdpr %tpc, %g3
31
321: sethi %hi(109f), %g7
33 ba,pt %xcc, etrap
34109: or %g7, %lo(109b), %g7
35 mov %l4, %o1
36 mov %l5, %o2
37 call mem_address_unaligned
38 add %sp, PTREGS_OFF, %o0
39 ba,pt %xcc, rtrap
40 nop
41 .size do_mna,.-do_mna
42
43 .type do_lddfmna,#function
44do_lddfmna:
45 sethi %hi(109f), %g7
46 mov TLB_SFSR, %g4
47 ldxa [%g4] ASI_DMMU, %g5
48 stxa %g0, [%g4] ASI_DMMU ! Clear FaultValid bit
49 membar #Sync
50 mov DMMU_SFAR, %g4
51 ldxa [%g4] ASI_DMMU, %g4
52 ba,pt %xcc, etrap
53109: or %g7, %lo(109b), %g7
54 mov %l4, %o1
55 mov %l5, %o2
56 call handle_lddfmna
57 add %sp, PTREGS_OFF, %o0
58 ba,pt %xcc, rtrap
59 nop
60 .size do_lddfmna,.-do_lddfmna
61
62 .type do_stdfmna,#function
63do_stdfmna:
64 sethi %hi(109f), %g7
65 mov TLB_SFSR, %g4
66 ldxa [%g4] ASI_DMMU, %g5
67 stxa %g0, [%g4] ASI_DMMU ! Clear FaultValid bit
68 membar #Sync
69 mov DMMU_SFAR, %g4
70 ldxa [%g4] ASI_DMMU, %g4
71 ba,pt %xcc, etrap
72109: or %g7, %lo(109b), %g7
73 mov %l4, %o1
74 mov %l5, %o2
75 call handle_stdfmna
76 add %sp, PTREGS_OFF, %o0
77 ba,pt %xcc, rtrap
78 nop
79 .size do_stdfmna,.-do_stdfmna
80
81 .type breakpoint_trap,#function
82breakpoint_trap:
83 call sparc_breakpoint
84 add %sp, PTREGS_OFF, %o0
85 ba,pt %xcc, rtrap
86 nop
87 .size breakpoint_trap,.-breakpoint_trap