~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/sparc/kernel/hvcalls.S

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/sparc/kernel/hvcalls.S (Version linux-6.12-rc7) and /arch/sparc/kernel/hvcalls.S (Version linux-4.15.18)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2         /* %o0: devhandle                           2         /* %o0: devhandle
  3          * %o1: devino                              3          * %o1: devino
  4          *                                          4          *
  5          * returns %o0: sysino                      5          * returns %o0: sysino
  6          */                                         6          */
  7 ENTRY(sun4v_devino_to_sysino)                       7 ENTRY(sun4v_devino_to_sysino)
  8         mov     HV_FAST_INTR_DEVINO2SYSINO, %o      8         mov     HV_FAST_INTR_DEVINO2SYSINO, %o5
  9         ta      HV_FAST_TRAP                        9         ta      HV_FAST_TRAP
 10         retl                                       10         retl
 11          mov    %o1, %o0                           11          mov    %o1, %o0
 12 ENDPROC(sun4v_devino_to_sysino)                    12 ENDPROC(sun4v_devino_to_sysino)
 13                                                    13 
 14         /* %o0: sysino                             14         /* %o0: sysino
 15          *                                         15          *
 16          * returns %o0: intr_enabled (HV_INTR_     16          * returns %o0: intr_enabled (HV_INTR_{DISABLED,ENABLED})
 17          */                                        17          */
 18 ENTRY(sun4v_intr_getenabled)                       18 ENTRY(sun4v_intr_getenabled)
 19         mov     HV_FAST_INTR_GETENABLED, %o5       19         mov     HV_FAST_INTR_GETENABLED, %o5
 20         ta      HV_FAST_TRAP                       20         ta      HV_FAST_TRAP
 21         retl                                       21         retl
 22          mov    %o1, %o0                           22          mov    %o1, %o0
 23 ENDPROC(sun4v_intr_getenabled)                     23 ENDPROC(sun4v_intr_getenabled)
 24                                                    24 
 25         /* %o0: sysino                             25         /* %o0: sysino
 26          * %o1: intr_enabled (HV_INTR_{DISABLE     26          * %o1: intr_enabled (HV_INTR_{DISABLED,ENABLED})
 27          */                                        27          */
 28 ENTRY(sun4v_intr_setenabled)                       28 ENTRY(sun4v_intr_setenabled)
 29         mov     HV_FAST_INTR_SETENABLED, %o5       29         mov     HV_FAST_INTR_SETENABLED, %o5
 30         ta      HV_FAST_TRAP                       30         ta      HV_FAST_TRAP
 31         retl                                       31         retl
 32          nop                                       32          nop
 33 ENDPROC(sun4v_intr_setenabled)                     33 ENDPROC(sun4v_intr_setenabled)
 34                                                    34 
 35         /* %o0: sysino                             35         /* %o0: sysino
 36          *                                         36          *
 37          * returns %o0: intr_state (HV_INTR_ST     37          * returns %o0: intr_state (HV_INTR_STATE_*)
 38          */                                        38          */
 39 ENTRY(sun4v_intr_getstate)                         39 ENTRY(sun4v_intr_getstate)
 40         mov     HV_FAST_INTR_GETSTATE, %o5         40         mov     HV_FAST_INTR_GETSTATE, %o5
 41         ta      HV_FAST_TRAP                       41         ta      HV_FAST_TRAP
 42         retl                                       42         retl
 43          mov    %o1, %o0                           43          mov    %o1, %o0
 44 ENDPROC(sun4v_intr_getstate)                       44 ENDPROC(sun4v_intr_getstate)
 45                                                    45 
 46         /* %o0: sysino                             46         /* %o0: sysino
 47          * %o1: intr_state (HV_INTR_STATE_*)       47          * %o1: intr_state (HV_INTR_STATE_*)
 48          */                                        48          */
 49 ENTRY(sun4v_intr_setstate)                         49 ENTRY(sun4v_intr_setstate)
 50         mov     HV_FAST_INTR_SETSTATE, %o5         50         mov     HV_FAST_INTR_SETSTATE, %o5
 51         ta      HV_FAST_TRAP                       51         ta      HV_FAST_TRAP
 52         retl                                       52         retl
 53          nop                                       53          nop
 54 ENDPROC(sun4v_intr_setstate)                       54 ENDPROC(sun4v_intr_setstate)
 55                                                    55 
 56         /* %o0: sysino                             56         /* %o0: sysino
 57          *                                         57          *
 58          * returns %o0: cpuid                      58          * returns %o0: cpuid
 59          */                                        59          */
 60 ENTRY(sun4v_intr_gettarget)                        60 ENTRY(sun4v_intr_gettarget)
 61         mov     HV_FAST_INTR_GETTARGET, %o5        61         mov     HV_FAST_INTR_GETTARGET, %o5
 62         ta      HV_FAST_TRAP                       62         ta      HV_FAST_TRAP
 63         retl                                       63         retl
 64          mov    %o1, %o0                           64          mov    %o1, %o0
 65 ENDPROC(sun4v_intr_gettarget)                      65 ENDPROC(sun4v_intr_gettarget)
 66                                                    66 
 67         /* %o0: sysino                             67         /* %o0: sysino
 68          * %o1: cpuid                              68          * %o1: cpuid
 69          */                                        69          */
 70 ENTRY(sun4v_intr_settarget)                        70 ENTRY(sun4v_intr_settarget)
 71         mov     HV_FAST_INTR_SETTARGET, %o5        71         mov     HV_FAST_INTR_SETTARGET, %o5
 72         ta      HV_FAST_TRAP                       72         ta      HV_FAST_TRAP
 73         retl                                       73         retl
 74          nop                                       74          nop
 75 ENDPROC(sun4v_intr_settarget)                      75 ENDPROC(sun4v_intr_settarget)
 76                                                    76 
 77         /* %o0: cpuid                              77         /* %o0: cpuid
 78          * %o1: pc                                 78          * %o1: pc
 79          * %o2: rtba                               79          * %o2: rtba
 80          * %o3: arg0                               80          * %o3: arg0
 81          *                                         81          *
 82          * returns %o0: status                     82          * returns %o0: status
 83          */                                        83          */
 84 ENTRY(sun4v_cpu_start)                             84 ENTRY(sun4v_cpu_start)
 85         mov     HV_FAST_CPU_START, %o5             85         mov     HV_FAST_CPU_START, %o5
 86         ta      HV_FAST_TRAP                       86         ta      HV_FAST_TRAP
 87         retl                                       87         retl
 88          nop                                       88          nop
 89 ENDPROC(sun4v_cpu_start)                           89 ENDPROC(sun4v_cpu_start)
 90                                                    90 
 91         /* %o0: cpuid                              91         /* %o0: cpuid
 92          *                                         92          *
 93          * returns %o0: status                     93          * returns %o0: status
 94          */                                        94          */
 95 ENTRY(sun4v_cpu_stop)                              95 ENTRY(sun4v_cpu_stop)
 96         mov     HV_FAST_CPU_STOP, %o5              96         mov     HV_FAST_CPU_STOP, %o5
 97         ta      HV_FAST_TRAP                       97         ta      HV_FAST_TRAP
 98         retl                                       98         retl
 99          nop                                       99          nop
100 ENDPROC(sun4v_cpu_stop)                           100 ENDPROC(sun4v_cpu_stop)
101                                                   101 
102         /* returns %o0: status  */                102         /* returns %o0: status  */
103 ENTRY(sun4v_cpu_yield)                            103 ENTRY(sun4v_cpu_yield)
104         mov     HV_FAST_CPU_YIELD, %o5            104         mov     HV_FAST_CPU_YIELD, %o5
105         ta      HV_FAST_TRAP                      105         ta      HV_FAST_TRAP
106         retl                                      106         retl
107          nop                                      107          nop
108 ENDPROC(sun4v_cpu_yield)                          108 ENDPROC(sun4v_cpu_yield)
109                                                   109 
110         /* %o0: cpuid                             110         /* %o0: cpuid
111          *                                        111          *
112          * returns %o0: status                    112          * returns %o0: status
113          */                                       113          */
114 ENTRY(sun4v_cpu_poke)                             114 ENTRY(sun4v_cpu_poke)
115         mov     HV_FAST_CPU_POKE, %o5             115         mov     HV_FAST_CPU_POKE, %o5
116         ta      HV_FAST_TRAP                      116         ta      HV_FAST_TRAP
117         retl                                      117         retl
118          nop                                      118          nop
119 ENDPROC(sun4v_cpu_poke)                           119 ENDPROC(sun4v_cpu_poke)
120                                                   120 
121         /* %o0: type                              121         /* %o0: type
122          * %o1: queue paddr                       122          * %o1: queue paddr
123          * %o2: num queue entries                 123          * %o2: num queue entries
124          *                                        124          *
125          * returns %o0: status                    125          * returns %o0: status
126          */                                       126          */
127 ENTRY(sun4v_cpu_qconf)                            127 ENTRY(sun4v_cpu_qconf)
128         mov     HV_FAST_CPU_QCONF, %o5            128         mov     HV_FAST_CPU_QCONF, %o5
129         ta      HV_FAST_TRAP                      129         ta      HV_FAST_TRAP
130         retl                                      130         retl
131          nop                                      131          nop
132 ENDPROC(sun4v_cpu_qconf)                          132 ENDPROC(sun4v_cpu_qconf)
133                                                   133 
134         /* %o0: num cpus in cpu list              134         /* %o0: num cpus in cpu list
135          * %o1: cpu list paddr                    135          * %o1: cpu list paddr
136          * %o2: mondo block paddr                 136          * %o2: mondo block paddr
137          *                                        137          *
138          * returns %o0: status                    138          * returns %o0: status
139          */                                       139          */
140 ENTRY(sun4v_cpu_mondo_send)                       140 ENTRY(sun4v_cpu_mondo_send)
141         mov     HV_FAST_CPU_MONDO_SEND, %o5       141         mov     HV_FAST_CPU_MONDO_SEND, %o5
142         ta      HV_FAST_TRAP                      142         ta      HV_FAST_TRAP
143         retl                                      143         retl
144          nop                                      144          nop
145 ENDPROC(sun4v_cpu_mondo_send)                     145 ENDPROC(sun4v_cpu_mondo_send)
146                                                   146 
147         /* %o0: CPU ID                            147         /* %o0: CPU ID
148          *                                        148          *
149          * returns %o0: -status if status non-    149          * returns %o0: -status if status non-zero, else
150          *         %o0: cpu state as HV_CPU_ST    150          *         %o0: cpu state as HV_CPU_STATE_*
151          */                                       151          */
152 ENTRY(sun4v_cpu_state)                            152 ENTRY(sun4v_cpu_state)
153         mov     HV_FAST_CPU_STATE, %o5            153         mov     HV_FAST_CPU_STATE, %o5
154         ta      HV_FAST_TRAP                      154         ta      HV_FAST_TRAP
155         brnz,pn %o0, 1f                           155         brnz,pn %o0, 1f
156          sub    %g0, %o0, %o0                     156          sub    %g0, %o0, %o0
157         mov     %o1, %o0                          157         mov     %o1, %o0
158 1:      retl                                      158 1:      retl
159          nop                                      159          nop
160 ENDPROC(sun4v_cpu_state)                          160 ENDPROC(sun4v_cpu_state)
161                                                   161 
162         /* %o0: virtual address                   162         /* %o0: virtual address
163          * %o1: must be zero                      163          * %o1: must be zero
164          * %o2: TTE                               164          * %o2: TTE
165          * %o3: HV_MMU_* flags                    165          * %o3: HV_MMU_* flags
166          *                                        166          *
167          * returns %o0: status                    167          * returns %o0: status
168          */                                       168          */
169 ENTRY(sun4v_mmu_map_perm_addr)                    169 ENTRY(sun4v_mmu_map_perm_addr)
170         mov     HV_FAST_MMU_MAP_PERM_ADDR, %o5    170         mov     HV_FAST_MMU_MAP_PERM_ADDR, %o5
171         ta      HV_FAST_TRAP                      171         ta      HV_FAST_TRAP
172         retl                                      172         retl
173          nop                                      173          nop
174 ENDPROC(sun4v_mmu_map_perm_addr)                  174 ENDPROC(sun4v_mmu_map_perm_addr)
175                                                   175 
176         /* %o0: number of TSB descriptions        176         /* %o0: number of TSB descriptions
177          * %o1: TSB descriptions real address     177          * %o1: TSB descriptions real address
178          *                                        178          *
179          * returns %o0: status                    179          * returns %o0: status
180          */                                       180          */
181 ENTRY(sun4v_mmu_tsb_ctx0)                         181 ENTRY(sun4v_mmu_tsb_ctx0)
182         mov     HV_FAST_MMU_TSB_CTX0, %o5         182         mov     HV_FAST_MMU_TSB_CTX0, %o5
183         ta      HV_FAST_TRAP                      183         ta      HV_FAST_TRAP
184         retl                                      184         retl
185          nop                                      185          nop
186 ENDPROC(sun4v_mmu_tsb_ctx0)                       186 ENDPROC(sun4v_mmu_tsb_ctx0)
187                                                   187 
188         /* %o0: API group number                  188         /* %o0: API group number
189          * %o1: pointer to unsigned long major    189          * %o1: pointer to unsigned long major number storage
190          * %o2: pointer to unsigned long minor    190          * %o2: pointer to unsigned long minor number storage
191          *                                        191          *
192          * returns %o0: status                    192          * returns %o0: status
193          */                                       193          */
194 ENTRY(sun4v_get_version)                          194 ENTRY(sun4v_get_version)
195         mov     HV_CORE_GET_VER, %o5              195         mov     HV_CORE_GET_VER, %o5
196         mov     %o1, %o3                          196         mov     %o1, %o3
197         mov     %o2, %o4                          197         mov     %o2, %o4
198         ta      HV_CORE_TRAP                      198         ta      HV_CORE_TRAP
199         stx     %o1, [%o3]                        199         stx     %o1, [%o3]
200         retl                                      200         retl
201          stx    %o2, [%o4]                        201          stx    %o2, [%o4]
202 ENDPROC(sun4v_get_version)                        202 ENDPROC(sun4v_get_version)
203                                                   203 
204         /* %o0: API group number                  204         /* %o0: API group number
205          * %o1: desired major number              205          * %o1: desired major number
206          * %o2: desired minor number              206          * %o2: desired minor number
207          * %o3: pointer to unsigned long actua    207          * %o3: pointer to unsigned long actual minor number storage
208          *                                        208          *
209          * returns %o0: status                    209          * returns %o0: status
210          */                                       210          */
211 ENTRY(sun4v_set_version)                          211 ENTRY(sun4v_set_version)
212         mov     HV_CORE_SET_VER, %o5              212         mov     HV_CORE_SET_VER, %o5
213         mov     %o3, %o4                          213         mov     %o3, %o4
214         ta      HV_CORE_TRAP                      214         ta      HV_CORE_TRAP
215         retl                                      215         retl
216          stx    %o1, [%o4]                        216          stx    %o1, [%o4]
217 ENDPROC(sun4v_set_version)                        217 ENDPROC(sun4v_set_version)
218                                                   218 
219         /* %o0: pointer to unsigned long time     219         /* %o0: pointer to unsigned long time
220          *                                        220          *
221          * returns %o0: status                    221          * returns %o0: status
222          */                                       222          */
223 ENTRY(sun4v_tod_get)                              223 ENTRY(sun4v_tod_get)
224         mov     %o0, %o4                          224         mov     %o0, %o4
225         mov     HV_FAST_TOD_GET, %o5              225         mov     HV_FAST_TOD_GET, %o5
226         ta      HV_FAST_TRAP                      226         ta      HV_FAST_TRAP
227         stx     %o1, [%o4]                        227         stx     %o1, [%o4]
228         retl                                      228         retl
229          nop                                      229          nop
230 ENDPROC(sun4v_tod_get)                            230 ENDPROC(sun4v_tod_get)
231                                                   231 
232         /* %o0: time                              232         /* %o0: time
233          *                                        233          *
234          * returns %o0: status                    234          * returns %o0: status
235          */                                       235          */
236 ENTRY(sun4v_tod_set)                              236 ENTRY(sun4v_tod_set)
237         mov     HV_FAST_TOD_SET, %o5              237         mov     HV_FAST_TOD_SET, %o5
238         ta      HV_FAST_TRAP                      238         ta      HV_FAST_TRAP
239         retl                                      239         retl
240          nop                                      240          nop
241 ENDPROC(sun4v_tod_set)                            241 ENDPROC(sun4v_tod_set)
242                                                   242 
243         /* %o0: pointer to unsigned long statu    243         /* %o0: pointer to unsigned long status
244          *                                        244          *
245          * returns %o0: signed character          245          * returns %o0: signed character
246          */                                       246          */
247 ENTRY(sun4v_con_getchar)                          247 ENTRY(sun4v_con_getchar)
248         mov     %o0, %o4                          248         mov     %o0, %o4
249         mov     HV_FAST_CONS_GETCHAR, %o5         249         mov     HV_FAST_CONS_GETCHAR, %o5
250         clr     %o0                               250         clr     %o0
251         clr     %o1                               251         clr     %o1
252         ta      HV_FAST_TRAP                      252         ta      HV_FAST_TRAP
253         stx     %o0, [%o4]                        253         stx     %o0, [%o4]
254         retl                                      254         retl
255          sra    %o1, 0, %o0                       255          sra    %o1, 0, %o0
256 ENDPROC(sun4v_con_getchar)                        256 ENDPROC(sun4v_con_getchar)
257                                                   257 
258         /* %o0: signed long character             258         /* %o0: signed long character
259          *                                        259          *
260          * returns %o0: status                    260          * returns %o0: status
261          */                                       261          */
262 ENTRY(sun4v_con_putchar)                          262 ENTRY(sun4v_con_putchar)
263         mov     HV_FAST_CONS_PUTCHAR, %o5         263         mov     HV_FAST_CONS_PUTCHAR, %o5
264         ta      HV_FAST_TRAP                      264         ta      HV_FAST_TRAP
265         retl                                      265         retl
266          sra    %o0, 0, %o0                       266          sra    %o0, 0, %o0
267 ENDPROC(sun4v_con_putchar)                        267 ENDPROC(sun4v_con_putchar)
268                                                   268 
269         /* %o0: buffer real address               269         /* %o0: buffer real address
270          * %o1: buffer size                       270          * %o1: buffer size
271          * %o2: pointer to unsigned long bytes    271          * %o2: pointer to unsigned long bytes_read
272          *                                        272          *
273          * returns %o0: status                    273          * returns %o0: status
274          */                                       274          */
275 ENTRY(sun4v_con_read)                             275 ENTRY(sun4v_con_read)
276         mov     %o2, %o4                          276         mov     %o2, %o4
277         mov     HV_FAST_CONS_READ, %o5            277         mov     HV_FAST_CONS_READ, %o5
278         ta      HV_FAST_TRAP                      278         ta      HV_FAST_TRAP
279         brnz    %o0, 1f                           279         brnz    %o0, 1f
280          cmp    %o1, -1         /* break */       280          cmp    %o1, -1         /* break */
281         be,a,pn %icc, 1f                          281         be,a,pn %icc, 1f
282          mov    %o1, %o0                          282          mov    %o1, %o0
283         cmp     %o1, -2         /* hup */         283         cmp     %o1, -2         /* hup */
284         be,a,pn %icc, 1f                          284         be,a,pn %icc, 1f
285          mov    %o1, %o0                          285          mov    %o1, %o0
286         stx     %o1, [%o4]                        286         stx     %o1, [%o4]
287 1:      retl                                      287 1:      retl
288          nop                                      288          nop
289 ENDPROC(sun4v_con_read)                           289 ENDPROC(sun4v_con_read)
290                                                   290 
291         /* %o0: buffer real address               291         /* %o0: buffer real address
292          * %o1: buffer size                       292          * %o1: buffer size
293          * %o2: pointer to unsigned long bytes    293          * %o2: pointer to unsigned long bytes_written
294          *                                        294          *
295          * returns %o0: status                    295          * returns %o0: status
296          */                                       296          */
297 ENTRY(sun4v_con_write)                            297 ENTRY(sun4v_con_write)
298         mov     %o2, %o4                          298         mov     %o2, %o4
299         mov     HV_FAST_CONS_WRITE, %o5           299         mov     HV_FAST_CONS_WRITE, %o5
300         ta      HV_FAST_TRAP                      300         ta      HV_FAST_TRAP
301         stx     %o1, [%o4]                        301         stx     %o1, [%o4]
302         retl                                      302         retl
303          nop                                      303          nop
304 ENDPROC(sun4v_con_write)                          304 ENDPROC(sun4v_con_write)
305                                                   305 
306         /* %o0: soft state                        306         /* %o0: soft state
307          * %o1: address of description string     307          * %o1: address of description string
308          *                                        308          *
309          * returns %o0: status                    309          * returns %o0: status
310          */                                       310          */
311 ENTRY(sun4v_mach_set_soft_state)                  311 ENTRY(sun4v_mach_set_soft_state)
312         mov     HV_FAST_MACH_SET_SOFT_STATE, %    312         mov     HV_FAST_MACH_SET_SOFT_STATE, %o5
313         ta      HV_FAST_TRAP                      313         ta      HV_FAST_TRAP
314         retl                                      314         retl
315          nop                                      315          nop
316 ENDPROC(sun4v_mach_set_soft_state)                316 ENDPROC(sun4v_mach_set_soft_state)
317                                                   317 
318         /* %o0: exit code                         318         /* %o0: exit code
319          *                                        319          *
320          * Does not return.                       320          * Does not return.
321          */                                       321          */
322 ENTRY(sun4v_mach_exit)                            322 ENTRY(sun4v_mach_exit)
323         mov     HV_FAST_MACH_EXIT, %o5            323         mov     HV_FAST_MACH_EXIT, %o5
324         ta      HV_FAST_TRAP                      324         ta      HV_FAST_TRAP
325         retl                                      325         retl
326          nop                                      326          nop
327 ENDPROC(sun4v_mach_exit)                          327 ENDPROC(sun4v_mach_exit)
328                                                   328 
329         /* %o0: buffer real address               329         /* %o0: buffer real address
330          * %o1: buffer length                     330          * %o1: buffer length
331          * %o2: pointer to unsigned long real_    331          * %o2: pointer to unsigned long real_buf_len
332          *                                        332          *
333          * returns %o0: status                    333          * returns %o0: status
334          */                                       334          */
335 ENTRY(sun4v_mach_desc)                            335 ENTRY(sun4v_mach_desc)
336         mov     %o2, %o4                          336         mov     %o2, %o4
337         mov     HV_FAST_MACH_DESC, %o5            337         mov     HV_FAST_MACH_DESC, %o5
338         ta      HV_FAST_TRAP                      338         ta      HV_FAST_TRAP
339         stx     %o1, [%o4]                        339         stx     %o1, [%o4]
340         retl                                      340         retl
341          nop                                      341          nop
342 ENDPROC(sun4v_mach_desc)                          342 ENDPROC(sun4v_mach_desc)
343                                                   343 
344         /* %o0: new timeout in milliseconds       344         /* %o0: new timeout in milliseconds
345          * %o1: pointer to unsigned long orig_    345          * %o1: pointer to unsigned long orig_timeout
346          *                                        346          *
347          * returns %o0: status                    347          * returns %o0: status
348          */                                       348          */
349 ENTRY(sun4v_mach_set_watchdog)                    349 ENTRY(sun4v_mach_set_watchdog)
350         mov     %o1, %o4                          350         mov     %o1, %o4
351         mov     HV_FAST_MACH_SET_WATCHDOG, %o5    351         mov     HV_FAST_MACH_SET_WATCHDOG, %o5
352         ta      HV_FAST_TRAP                      352         ta      HV_FAST_TRAP
353         brnz,a,pn %o4, 0f                         353         brnz,a,pn %o4, 0f
354         stx     %o1, [%o4]                        354         stx     %o1, [%o4]
355 0:      retl                                      355 0:      retl
356          nop                                      356          nop
357 ENDPROC(sun4v_mach_set_watchdog)                  357 ENDPROC(sun4v_mach_set_watchdog)
358 EXPORT_SYMBOL(sun4v_mach_set_watchdog)            358 EXPORT_SYMBOL(sun4v_mach_set_watchdog)
359                                                   359 
360         /* No inputs and does not return.  */     360         /* No inputs and does not return.  */
361 ENTRY(sun4v_mach_sir)                             361 ENTRY(sun4v_mach_sir)
362         mov     %o1, %o4                          362         mov     %o1, %o4
363         mov     HV_FAST_MACH_SIR, %o5             363         mov     HV_FAST_MACH_SIR, %o5
364         ta      HV_FAST_TRAP                      364         ta      HV_FAST_TRAP
365         stx     %o1, [%o4]                        365         stx     %o1, [%o4]
366         retl                                      366         retl
367          nop                                      367          nop
368 ENDPROC(sun4v_mach_sir)                           368 ENDPROC(sun4v_mach_sir)
369                                                   369 
370         /* %o0: channel                           370         /* %o0: channel
371          * %o1: ra                                371          * %o1: ra
372          * %o2: num_entries                       372          * %o2: num_entries
373          *                                        373          *
374          * returns %o0: status                    374          * returns %o0: status
375          */                                       375          */
376 ENTRY(sun4v_ldc_tx_qconf)                         376 ENTRY(sun4v_ldc_tx_qconf)
377         mov     HV_FAST_LDC_TX_QCONF, %o5         377         mov     HV_FAST_LDC_TX_QCONF, %o5
378         ta      HV_FAST_TRAP                      378         ta      HV_FAST_TRAP
379         retl                                      379         retl
380          nop                                      380          nop
381 ENDPROC(sun4v_ldc_tx_qconf)                       381 ENDPROC(sun4v_ldc_tx_qconf)
382                                                   382 
383         /* %o0: channel                           383         /* %o0: channel
384          * %o1: pointer to unsigned long ra       384          * %o1: pointer to unsigned long ra
385          * %o2: pointer to unsigned long num_e    385          * %o2: pointer to unsigned long num_entries
386          *                                        386          *
387          * returns %o0: status                    387          * returns %o0: status
388          */                                       388          */
389 ENTRY(sun4v_ldc_tx_qinfo)                         389 ENTRY(sun4v_ldc_tx_qinfo)
390         mov     %o1, %g1                          390         mov     %o1, %g1
391         mov     %o2, %g2                          391         mov     %o2, %g2
392         mov     HV_FAST_LDC_TX_QINFO, %o5         392         mov     HV_FAST_LDC_TX_QINFO, %o5
393         ta      HV_FAST_TRAP                      393         ta      HV_FAST_TRAP
394         stx     %o1, [%g1]                        394         stx     %o1, [%g1]
395         stx     %o2, [%g2]                        395         stx     %o2, [%g2]
396         retl                                      396         retl
397          nop                                      397          nop
398 ENDPROC(sun4v_ldc_tx_qinfo)                       398 ENDPROC(sun4v_ldc_tx_qinfo)
399                                                   399 
400         /* %o0: channel                           400         /* %o0: channel
401          * %o1: pointer to unsigned long head_    401          * %o1: pointer to unsigned long head_off
402          * %o2: pointer to unsigned long tail_    402          * %o2: pointer to unsigned long tail_off
403          * %o2: pointer to unsigned long chan_    403          * %o2: pointer to unsigned long chan_state
404          *                                        404          *
405          * returns %o0: status                    405          * returns %o0: status
406          */                                       406          */
407 ENTRY(sun4v_ldc_tx_get_state)                     407 ENTRY(sun4v_ldc_tx_get_state)
408         mov     %o1, %g1                          408         mov     %o1, %g1
409         mov     %o2, %g2                          409         mov     %o2, %g2
410         mov     %o3, %g3                          410         mov     %o3, %g3
411         mov     HV_FAST_LDC_TX_GET_STATE, %o5     411         mov     HV_FAST_LDC_TX_GET_STATE, %o5
412         ta      HV_FAST_TRAP                      412         ta      HV_FAST_TRAP
413         stx     %o1, [%g1]                        413         stx     %o1, [%g1]
414         stx     %o2, [%g2]                        414         stx     %o2, [%g2]
415         stx     %o3, [%g3]                        415         stx     %o3, [%g3]
416         retl                                      416         retl
417          nop                                      417          nop
418 ENDPROC(sun4v_ldc_tx_get_state)                   418 ENDPROC(sun4v_ldc_tx_get_state)
419                                                   419 
420         /* %o0: channel                           420         /* %o0: channel
421          * %o1: tail_off                          421          * %o1: tail_off
422          *                                        422          *
423          * returns %o0: status                    423          * returns %o0: status
424          */                                       424          */
425 ENTRY(sun4v_ldc_tx_set_qtail)                     425 ENTRY(sun4v_ldc_tx_set_qtail)
426         mov     HV_FAST_LDC_TX_SET_QTAIL, %o5     426         mov     HV_FAST_LDC_TX_SET_QTAIL, %o5
427         ta      HV_FAST_TRAP                      427         ta      HV_FAST_TRAP
428         retl                                      428         retl
429          nop                                      429          nop
430 ENDPROC(sun4v_ldc_tx_set_qtail)                   430 ENDPROC(sun4v_ldc_tx_set_qtail)
431                                                   431 
432         /* %o0: channel                           432         /* %o0: channel
433          * %o1: ra                                433          * %o1: ra
434          * %o2: num_entries                       434          * %o2: num_entries
435          *                                        435          *
436          * returns %o0: status                    436          * returns %o0: status
437          */                                       437          */
438 ENTRY(sun4v_ldc_rx_qconf)                         438 ENTRY(sun4v_ldc_rx_qconf)
439         mov     HV_FAST_LDC_RX_QCONF, %o5         439         mov     HV_FAST_LDC_RX_QCONF, %o5
440         ta      HV_FAST_TRAP                      440         ta      HV_FAST_TRAP
441         retl                                      441         retl
442          nop                                      442          nop
443 ENDPROC(sun4v_ldc_rx_qconf)                       443 ENDPROC(sun4v_ldc_rx_qconf)
444                                                   444 
445         /* %o0: channel                           445         /* %o0: channel
446          * %o1: pointer to unsigned long ra       446          * %o1: pointer to unsigned long ra
447          * %o2: pointer to unsigned long num_e    447          * %o2: pointer to unsigned long num_entries
448          *                                        448          *
449          * returns %o0: status                    449          * returns %o0: status
450          */                                       450          */
451 ENTRY(sun4v_ldc_rx_qinfo)                         451 ENTRY(sun4v_ldc_rx_qinfo)
452         mov     %o1, %g1                          452         mov     %o1, %g1
453         mov     %o2, %g2                          453         mov     %o2, %g2
454         mov     HV_FAST_LDC_RX_QINFO, %o5         454         mov     HV_FAST_LDC_RX_QINFO, %o5
455         ta      HV_FAST_TRAP                      455         ta      HV_FAST_TRAP
456         stx     %o1, [%g1]                        456         stx     %o1, [%g1]
457         stx     %o2, [%g2]                        457         stx     %o2, [%g2]
458         retl                                      458         retl
459          nop                                      459          nop
460 ENDPROC(sun4v_ldc_rx_qinfo)                       460 ENDPROC(sun4v_ldc_rx_qinfo)
461                                                   461 
462         /* %o0: channel                           462         /* %o0: channel
463          * %o1: pointer to unsigned long head_    463          * %o1: pointer to unsigned long head_off
464          * %o2: pointer to unsigned long tail_    464          * %o2: pointer to unsigned long tail_off
465          * %o2: pointer to unsigned long chan_    465          * %o2: pointer to unsigned long chan_state
466          *                                        466          *
467          * returns %o0: status                    467          * returns %o0: status
468          */                                       468          */
469 ENTRY(sun4v_ldc_rx_get_state)                     469 ENTRY(sun4v_ldc_rx_get_state)
470         mov     %o1, %g1                          470         mov     %o1, %g1
471         mov     %o2, %g2                          471         mov     %o2, %g2
472         mov     %o3, %g3                          472         mov     %o3, %g3
473         mov     HV_FAST_LDC_RX_GET_STATE, %o5     473         mov     HV_FAST_LDC_RX_GET_STATE, %o5
474         ta      HV_FAST_TRAP                      474         ta      HV_FAST_TRAP
475         stx     %o1, [%g1]                        475         stx     %o1, [%g1]
476         stx     %o2, [%g2]                        476         stx     %o2, [%g2]
477         stx     %o3, [%g3]                        477         stx     %o3, [%g3]
478         retl                                      478         retl
479          nop                                      479          nop
480 ENDPROC(sun4v_ldc_rx_get_state)                   480 ENDPROC(sun4v_ldc_rx_get_state)
481                                                   481 
482         /* %o0: channel                           482         /* %o0: channel
483          * %o1: head_off                          483          * %o1: head_off
484          *                                        484          *
485          * returns %o0: status                    485          * returns %o0: status
486          */                                       486          */
487 ENTRY(sun4v_ldc_rx_set_qhead)                     487 ENTRY(sun4v_ldc_rx_set_qhead)
488         mov     HV_FAST_LDC_RX_SET_QHEAD, %o5     488         mov     HV_FAST_LDC_RX_SET_QHEAD, %o5
489         ta      HV_FAST_TRAP                      489         ta      HV_FAST_TRAP
490         retl                                      490         retl
491          nop                                      491          nop
492 ENDPROC(sun4v_ldc_rx_set_qhead)                   492 ENDPROC(sun4v_ldc_rx_set_qhead)
493                                                   493 
494         /* %o0: channel                           494         /* %o0: channel
495          * %o1: ra                                495          * %o1: ra
496          * %o2: num_entries                       496          * %o2: num_entries
497          *                                        497          *
498          * returns %o0: status                    498          * returns %o0: status
499          */                                       499          */
500 ENTRY(sun4v_ldc_set_map_table)                    500 ENTRY(sun4v_ldc_set_map_table)
501         mov     HV_FAST_LDC_SET_MAP_TABLE, %o5    501         mov     HV_FAST_LDC_SET_MAP_TABLE, %o5
502         ta      HV_FAST_TRAP                      502         ta      HV_FAST_TRAP
503         retl                                      503         retl
504          nop                                      504          nop
505 ENDPROC(sun4v_ldc_set_map_table)                  505 ENDPROC(sun4v_ldc_set_map_table)
506                                                   506 
507         /* %o0: channel                           507         /* %o0: channel
508          * %o1: pointer to unsigned long ra       508          * %o1: pointer to unsigned long ra
509          * %o2: pointer to unsigned long num_e    509          * %o2: pointer to unsigned long num_entries
510          *                                        510          *
511          * returns %o0: status                    511          * returns %o0: status
512          */                                       512          */
513 ENTRY(sun4v_ldc_get_map_table)                    513 ENTRY(sun4v_ldc_get_map_table)
514         mov     %o1, %g1                          514         mov     %o1, %g1
515         mov     %o2, %g2                          515         mov     %o2, %g2
516         mov     HV_FAST_LDC_GET_MAP_TABLE, %o5    516         mov     HV_FAST_LDC_GET_MAP_TABLE, %o5
517         ta      HV_FAST_TRAP                      517         ta      HV_FAST_TRAP
518         stx     %o1, [%g1]                        518         stx     %o1, [%g1]
519         stx     %o2, [%g2]                        519         stx     %o2, [%g2]
520         retl                                      520         retl
521          nop                                      521          nop
522 ENDPROC(sun4v_ldc_get_map_table)                  522 ENDPROC(sun4v_ldc_get_map_table)
523                                                   523 
524         /* %o0: channel                           524         /* %o0: channel
525          * %o1: dir_code                          525          * %o1: dir_code
526          * %o2: tgt_raddr                         526          * %o2: tgt_raddr
527          * %o3: lcl_raddr                         527          * %o3: lcl_raddr
528          * %o4: len                               528          * %o4: len
529          * %o5: pointer to unsigned long actua    529          * %o5: pointer to unsigned long actual_len
530          *                                        530          *
531          * returns %o0: status                    531          * returns %o0: status
532          */                                       532          */
533 ENTRY(sun4v_ldc_copy)                             533 ENTRY(sun4v_ldc_copy)
534         mov     %o5, %g1                          534         mov     %o5, %g1
535         mov     HV_FAST_LDC_COPY, %o5             535         mov     HV_FAST_LDC_COPY, %o5
536         ta      HV_FAST_TRAP                      536         ta      HV_FAST_TRAP
537         stx     %o1, [%g1]                        537         stx     %o1, [%g1]
538         retl                                      538         retl
539          nop                                      539          nop
540 ENDPROC(sun4v_ldc_copy)                           540 ENDPROC(sun4v_ldc_copy)
541                                                   541 
542         /* %o0: channel                           542         /* %o0: channel
543          * %o1: cookie                            543          * %o1: cookie
544          * %o2: pointer to unsigned long ra       544          * %o2: pointer to unsigned long ra
545          * %o3: pointer to unsigned long perm     545          * %o3: pointer to unsigned long perm
546          *                                        546          *
547          * returns %o0: status                    547          * returns %o0: status
548          */                                       548          */
549 ENTRY(sun4v_ldc_mapin)                            549 ENTRY(sun4v_ldc_mapin)
550         mov     %o2, %g1                          550         mov     %o2, %g1
551         mov     %o3, %g2                          551         mov     %o3, %g2
552         mov     HV_FAST_LDC_MAPIN, %o5            552         mov     HV_FAST_LDC_MAPIN, %o5
553         ta      HV_FAST_TRAP                      553         ta      HV_FAST_TRAP
554         stx     %o1, [%g1]                        554         stx     %o1, [%g1]
555         stx     %o2, [%g2]                        555         stx     %o2, [%g2]
556         retl                                      556         retl
557          nop                                      557          nop
558 ENDPROC(sun4v_ldc_mapin)                          558 ENDPROC(sun4v_ldc_mapin)
559                                                   559 
560         /* %o0: ra                                560         /* %o0: ra
561          *                                        561          *
562          * returns %o0: status                    562          * returns %o0: status
563          */                                       563          */
564 ENTRY(sun4v_ldc_unmap)                            564 ENTRY(sun4v_ldc_unmap)
565         mov     HV_FAST_LDC_UNMAP, %o5            565         mov     HV_FAST_LDC_UNMAP, %o5
566         ta      HV_FAST_TRAP                      566         ta      HV_FAST_TRAP
567         retl                                      567         retl
568          nop                                      568          nop
569 ENDPROC(sun4v_ldc_unmap)                          569 ENDPROC(sun4v_ldc_unmap)
570                                                   570 
571         /* %o0: channel                           571         /* %o0: channel
572          * %o1: cookie                            572          * %o1: cookie
573          * %o2: mte_cookie                        573          * %o2: mte_cookie
574          *                                        574          *
575          * returns %o0: status                    575          * returns %o0: status
576          */                                       576          */
577 ENTRY(sun4v_ldc_revoke)                           577 ENTRY(sun4v_ldc_revoke)
578         mov     HV_FAST_LDC_REVOKE, %o5           578         mov     HV_FAST_LDC_REVOKE, %o5
579         ta      HV_FAST_TRAP                      579         ta      HV_FAST_TRAP
580         retl                                      580         retl
581          nop                                      581          nop
582 ENDPROC(sun4v_ldc_revoke)                         582 ENDPROC(sun4v_ldc_revoke)
583                                                   583 
584         /* %o0: device handle                     584         /* %o0: device handle
585          * %o1: device INO                        585          * %o1: device INO
586          * %o2: pointer to unsigned long cooki    586          * %o2: pointer to unsigned long cookie
587          *                                        587          *
588          * returns %o0: status                    588          * returns %o0: status
589          */                                       589          */
590 ENTRY(sun4v_vintr_get_cookie)                     590 ENTRY(sun4v_vintr_get_cookie)
591         mov     %o2, %g1                          591         mov     %o2, %g1
592         mov     HV_FAST_VINTR_GET_COOKIE, %o5     592         mov     HV_FAST_VINTR_GET_COOKIE, %o5
593         ta      HV_FAST_TRAP                      593         ta      HV_FAST_TRAP
594         stx     %o1, [%g1]                        594         stx     %o1, [%g1]
595         retl                                      595         retl
596          nop                                      596          nop
597 ENDPROC(sun4v_vintr_get_cookie)                   597 ENDPROC(sun4v_vintr_get_cookie)
598                                                   598 
599         /* %o0: device handle                     599         /* %o0: device handle
600          * %o1: device INO                        600          * %o1: device INO
601          * %o2: cookie                            601          * %o2: cookie
602          *                                        602          *
603          * returns %o0: status                    603          * returns %o0: status
604          */                                       604          */
605 ENTRY(sun4v_vintr_set_cookie)                     605 ENTRY(sun4v_vintr_set_cookie)
606         mov     HV_FAST_VINTR_SET_COOKIE, %o5     606         mov     HV_FAST_VINTR_SET_COOKIE, %o5
607         ta      HV_FAST_TRAP                      607         ta      HV_FAST_TRAP
608         retl                                      608         retl
609          nop                                      609          nop
610 ENDPROC(sun4v_vintr_set_cookie)                   610 ENDPROC(sun4v_vintr_set_cookie)
611                                                   611 
612         /* %o0: device handle                     612         /* %o0: device handle
613          * %o1: device INO                        613          * %o1: device INO
614          * %o2: pointer to unsigned long valid    614          * %o2: pointer to unsigned long valid_state
615          *                                        615          *
616          * returns %o0: status                    616          * returns %o0: status
617          */                                       617          */
618 ENTRY(sun4v_vintr_get_valid)                      618 ENTRY(sun4v_vintr_get_valid)
619         mov     %o2, %g1                          619         mov     %o2, %g1
620         mov     HV_FAST_VINTR_GET_VALID, %o5      620         mov     HV_FAST_VINTR_GET_VALID, %o5
621         ta      HV_FAST_TRAP                      621         ta      HV_FAST_TRAP
622         stx     %o1, [%g1]                        622         stx     %o1, [%g1]
623         retl                                      623         retl
624          nop                                      624          nop
625 ENDPROC(sun4v_vintr_get_valid)                    625 ENDPROC(sun4v_vintr_get_valid)
626                                                   626 
627         /* %o0: device handle                     627         /* %o0: device handle
628          * %o1: device INO                        628          * %o1: device INO
629          * %o2: valid_state                       629          * %o2: valid_state
630          *                                        630          *
631          * returns %o0: status                    631          * returns %o0: status
632          */                                       632          */
633 ENTRY(sun4v_vintr_set_valid)                      633 ENTRY(sun4v_vintr_set_valid)
634         mov     HV_FAST_VINTR_SET_VALID, %o5      634         mov     HV_FAST_VINTR_SET_VALID, %o5
635         ta      HV_FAST_TRAP                      635         ta      HV_FAST_TRAP
636         retl                                      636         retl
637          nop                                      637          nop
638 ENDPROC(sun4v_vintr_set_valid)                    638 ENDPROC(sun4v_vintr_set_valid)
639                                                   639 
640         /* %o0: device handle                     640         /* %o0: device handle
641          * %o1: device INO                        641          * %o1: device INO
642          * %o2: pointer to unsigned long state    642          * %o2: pointer to unsigned long state
643          *                                        643          *
644          * returns %o0: status                    644          * returns %o0: status
645          */                                       645          */
646 ENTRY(sun4v_vintr_get_state)                      646 ENTRY(sun4v_vintr_get_state)
647         mov     %o2, %g1                          647         mov     %o2, %g1
648         mov     HV_FAST_VINTR_GET_STATE, %o5      648         mov     HV_FAST_VINTR_GET_STATE, %o5
649         ta      HV_FAST_TRAP                      649         ta      HV_FAST_TRAP
650         stx     %o1, [%g1]                        650         stx     %o1, [%g1]
651         retl                                      651         retl
652          nop                                      652          nop
653 ENDPROC(sun4v_vintr_get_state)                    653 ENDPROC(sun4v_vintr_get_state)
654                                                   654 
655         /* %o0: device handle                     655         /* %o0: device handle
656          * %o1: device INO                        656          * %o1: device INO
657          * %o2: state                             657          * %o2: state
658          *                                        658          *
659          * returns %o0: status                    659          * returns %o0: status
660          */                                       660          */
661 ENTRY(sun4v_vintr_set_state)                      661 ENTRY(sun4v_vintr_set_state)
662         mov     HV_FAST_VINTR_SET_STATE, %o5      662         mov     HV_FAST_VINTR_SET_STATE, %o5
663         ta      HV_FAST_TRAP                      663         ta      HV_FAST_TRAP
664         retl                                      664         retl
665          nop                                      665          nop
666 ENDPROC(sun4v_vintr_set_state)                    666 ENDPROC(sun4v_vintr_set_state)
667                                                   667 
668         /* %o0: device handle                     668         /* %o0: device handle
669          * %o1: device INO                        669          * %o1: device INO
670          * %o2: pointer to unsigned long cpuid    670          * %o2: pointer to unsigned long cpuid
671          *                                        671          *
672          * returns %o0: status                    672          * returns %o0: status
673          */                                       673          */
674 ENTRY(sun4v_vintr_get_target)                     674 ENTRY(sun4v_vintr_get_target)
675         mov     %o2, %g1                          675         mov     %o2, %g1
676         mov     HV_FAST_VINTR_GET_TARGET, %o5     676         mov     HV_FAST_VINTR_GET_TARGET, %o5
677         ta      HV_FAST_TRAP                      677         ta      HV_FAST_TRAP
678         stx     %o1, [%g1]                        678         stx     %o1, [%g1]
679         retl                                      679         retl
680          nop                                      680          nop
681 ENDPROC(sun4v_vintr_get_target)                   681 ENDPROC(sun4v_vintr_get_target)
682                                                   682 
683         /* %o0: device handle                     683         /* %o0: device handle
684          * %o1: device INO                        684          * %o1: device INO
685          * %o2: cpuid                             685          * %o2: cpuid
686          *                                        686          *
687          * returns %o0: status                    687          * returns %o0: status
688          */                                       688          */
689 ENTRY(sun4v_vintr_set_target)                     689 ENTRY(sun4v_vintr_set_target)
690         mov     HV_FAST_VINTR_SET_TARGET, %o5     690         mov     HV_FAST_VINTR_SET_TARGET, %o5
691         ta      HV_FAST_TRAP                      691         ta      HV_FAST_TRAP
692         retl                                      692         retl
693          nop                                      693          nop
694 ENDPROC(sun4v_vintr_set_target)                   694 ENDPROC(sun4v_vintr_set_target)
695                                                   695 
696         /* %o0: NCS sub-function                  696         /* %o0: NCS sub-function
697          * %o1: sub-function arg real-address     697          * %o1: sub-function arg real-address
698          * %o2: sub-function arg size             698          * %o2: sub-function arg size
699          *                                        699          *
700          * returns %o0: status                    700          * returns %o0: status
701          */                                       701          */
702 ENTRY(sun4v_ncs_request)                          702 ENTRY(sun4v_ncs_request)
703         mov     HV_FAST_NCS_REQUEST, %o5          703         mov     HV_FAST_NCS_REQUEST, %o5
704         ta      HV_FAST_TRAP                      704         ta      HV_FAST_TRAP
705         retl                                      705         retl
706          nop                                      706          nop
707 ENDPROC(sun4v_ncs_request)                        707 ENDPROC(sun4v_ncs_request)
708                                                   708 
709 ENTRY(sun4v_svc_send)                             709 ENTRY(sun4v_svc_send)
710         save    %sp, -192, %sp                    710         save    %sp, -192, %sp
711         mov     %i0, %o0                          711         mov     %i0, %o0
712         mov     %i1, %o1                          712         mov     %i1, %o1
713         mov     %i2, %o2                          713         mov     %i2, %o2
714         mov     HV_FAST_SVC_SEND, %o5             714         mov     HV_FAST_SVC_SEND, %o5
715         ta      HV_FAST_TRAP                      715         ta      HV_FAST_TRAP
716         stx     %o1, [%i3]                        716         stx     %o1, [%i3]
717         ret                                       717         ret
718         restore                                   718         restore
719 ENDPROC(sun4v_svc_send)                           719 ENDPROC(sun4v_svc_send)
720                                                   720 
721 ENTRY(sun4v_svc_recv)                             721 ENTRY(sun4v_svc_recv)
722         save    %sp, -192, %sp                    722         save    %sp, -192, %sp
723         mov     %i0, %o0                          723         mov     %i0, %o0
724         mov     %i1, %o1                          724         mov     %i1, %o1
725         mov     %i2, %o2                          725         mov     %i2, %o2
726         mov     HV_FAST_SVC_RECV, %o5             726         mov     HV_FAST_SVC_RECV, %o5
727         ta      HV_FAST_TRAP                      727         ta      HV_FAST_TRAP
728         stx     %o1, [%i3]                        728         stx     %o1, [%i3]
729         ret                                       729         ret
730         restore                                   730         restore
731 ENDPROC(sun4v_svc_recv)                           731 ENDPROC(sun4v_svc_recv)
732                                                   732 
733 ENTRY(sun4v_svc_getstatus)                        733 ENTRY(sun4v_svc_getstatus)
734         mov     HV_FAST_SVC_GETSTATUS, %o5        734         mov     HV_FAST_SVC_GETSTATUS, %o5
735         mov     %o1, %o4                          735         mov     %o1, %o4
736         ta      HV_FAST_TRAP                      736         ta      HV_FAST_TRAP
737         stx     %o1, [%o4]                        737         stx     %o1, [%o4]
738         retl                                      738         retl
739          nop                                      739          nop
740 ENDPROC(sun4v_svc_getstatus)                      740 ENDPROC(sun4v_svc_getstatus)
741                                                   741 
742 ENTRY(sun4v_svc_setstatus)                        742 ENTRY(sun4v_svc_setstatus)
743         mov     HV_FAST_SVC_SETSTATUS, %o5        743         mov     HV_FAST_SVC_SETSTATUS, %o5
744         ta      HV_FAST_TRAP                      744         ta      HV_FAST_TRAP
745         retl                                      745         retl
746          nop                                      746          nop
747 ENDPROC(sun4v_svc_setstatus)                      747 ENDPROC(sun4v_svc_setstatus)
748                                                   748 
749 ENTRY(sun4v_svc_clrstatus)                        749 ENTRY(sun4v_svc_clrstatus)
750         mov     HV_FAST_SVC_CLRSTATUS, %o5        750         mov     HV_FAST_SVC_CLRSTATUS, %o5
751         ta      HV_FAST_TRAP                      751         ta      HV_FAST_TRAP
752         retl                                      752         retl
753          nop                                      753          nop
754 ENDPROC(sun4v_svc_clrstatus)                      754 ENDPROC(sun4v_svc_clrstatus)
755                                                   755 
756 ENTRY(sun4v_mmustat_conf)                         756 ENTRY(sun4v_mmustat_conf)
757         mov     %o1, %o4                          757         mov     %o1, %o4
758         mov     HV_FAST_MMUSTAT_CONF, %o5         758         mov     HV_FAST_MMUSTAT_CONF, %o5
759         ta      HV_FAST_TRAP                      759         ta      HV_FAST_TRAP
760         stx     %o1, [%o4]                        760         stx     %o1, [%o4]
761         retl                                      761         retl
762          nop                                      762          nop
763 ENDPROC(sun4v_mmustat_conf)                       763 ENDPROC(sun4v_mmustat_conf)
764                                                   764 
765 ENTRY(sun4v_mmustat_info)                         765 ENTRY(sun4v_mmustat_info)
766         mov     %o0, %o4                          766         mov     %o0, %o4
767         mov     HV_FAST_MMUSTAT_INFO, %o5         767         mov     HV_FAST_MMUSTAT_INFO, %o5
768         ta      HV_FAST_TRAP                      768         ta      HV_FAST_TRAP
769         stx     %o1, [%o4]                        769         stx     %o1, [%o4]
770         retl                                      770         retl
771          nop                                      771          nop
772 ENDPROC(sun4v_mmustat_info)                       772 ENDPROC(sun4v_mmustat_info)
773                                                   773 
774 ENTRY(sun4v_mmu_demap_all)                        774 ENTRY(sun4v_mmu_demap_all)
775         clr     %o0                               775         clr     %o0
776         clr     %o1                               776         clr     %o1
777         mov     HV_MMU_ALL, %o2                   777         mov     HV_MMU_ALL, %o2
778         mov     HV_FAST_MMU_DEMAP_ALL, %o5        778         mov     HV_FAST_MMU_DEMAP_ALL, %o5
779         ta      HV_FAST_TRAP                      779         ta      HV_FAST_TRAP
780         retl                                      780         retl
781          nop                                      781          nop
782 ENDPROC(sun4v_mmu_demap_all)                      782 ENDPROC(sun4v_mmu_demap_all)
783                                                   783 
784 ENTRY(sun4v_niagara_getperf)                      784 ENTRY(sun4v_niagara_getperf)
785         mov     %o0, %o4                          785         mov     %o0, %o4
786         mov     HV_FAST_GET_PERFREG, %o5          786         mov     HV_FAST_GET_PERFREG, %o5
787         ta      HV_FAST_TRAP                      787         ta      HV_FAST_TRAP
788         stx     %o1, [%o4]                        788         stx     %o1, [%o4]
789         retl                                      789         retl
790          nop                                      790          nop
791 ENDPROC(sun4v_niagara_getperf)                    791 ENDPROC(sun4v_niagara_getperf)
792 EXPORT_SYMBOL(sun4v_niagara_getperf)              792 EXPORT_SYMBOL(sun4v_niagara_getperf)
793                                                   793 
794 ENTRY(sun4v_niagara_setperf)                      794 ENTRY(sun4v_niagara_setperf)
795         mov     HV_FAST_SET_PERFREG, %o5          795         mov     HV_FAST_SET_PERFREG, %o5
796         ta      HV_FAST_TRAP                      796         ta      HV_FAST_TRAP
797         retl                                      797         retl
798          nop                                      798          nop
799 ENDPROC(sun4v_niagara_setperf)                    799 ENDPROC(sun4v_niagara_setperf)
800 EXPORT_SYMBOL(sun4v_niagara_setperf)              800 EXPORT_SYMBOL(sun4v_niagara_setperf)
801                                                   801 
802 ENTRY(sun4v_niagara2_getperf)                     802 ENTRY(sun4v_niagara2_getperf)
803         mov     %o0, %o4                          803         mov     %o0, %o4
804         mov     HV_FAST_N2_GET_PERFREG, %o5       804         mov     HV_FAST_N2_GET_PERFREG, %o5
805         ta      HV_FAST_TRAP                      805         ta      HV_FAST_TRAP
806         stx     %o1, [%o4]                        806         stx     %o1, [%o4]
807         retl                                      807         retl
808          nop                                      808          nop
809 ENDPROC(sun4v_niagara2_getperf)                   809 ENDPROC(sun4v_niagara2_getperf)
810 EXPORT_SYMBOL(sun4v_niagara2_getperf)             810 EXPORT_SYMBOL(sun4v_niagara2_getperf)
811                                                   811 
812 ENTRY(sun4v_niagara2_setperf)                     812 ENTRY(sun4v_niagara2_setperf)
813         mov     HV_FAST_N2_SET_PERFREG, %o5       813         mov     HV_FAST_N2_SET_PERFREG, %o5
814         ta      HV_FAST_TRAP                      814         ta      HV_FAST_TRAP
815         retl                                      815         retl
816          nop                                      816          nop
817 ENDPROC(sun4v_niagara2_setperf)                   817 ENDPROC(sun4v_niagara2_setperf)
818 EXPORT_SYMBOL(sun4v_niagara2_setperf)             818 EXPORT_SYMBOL(sun4v_niagara2_setperf)
819                                                   819 
820 ENTRY(sun4v_reboot_data_set)                      820 ENTRY(sun4v_reboot_data_set)
821         mov     HV_FAST_REBOOT_DATA_SET, %o5      821         mov     HV_FAST_REBOOT_DATA_SET, %o5
822         ta      HV_FAST_TRAP                      822         ta      HV_FAST_TRAP
823         retl                                      823         retl
824          nop                                      824          nop
825 ENDPROC(sun4v_reboot_data_set)                    825 ENDPROC(sun4v_reboot_data_set)
826                                                   826 
827 ENTRY(sun4v_vt_get_perfreg)                       827 ENTRY(sun4v_vt_get_perfreg)
828         mov     %o1, %o4                          828         mov     %o1, %o4
829         mov     HV_FAST_VT_GET_PERFREG, %o5       829         mov     HV_FAST_VT_GET_PERFREG, %o5
830         ta      HV_FAST_TRAP                      830         ta      HV_FAST_TRAP
831         stx     %o1, [%o4]                        831         stx     %o1, [%o4]
832         retl                                      832         retl
833          nop                                      833          nop
834 ENDPROC(sun4v_vt_get_perfreg)                     834 ENDPROC(sun4v_vt_get_perfreg)
835                                                   835 
836 ENTRY(sun4v_vt_set_perfreg)                       836 ENTRY(sun4v_vt_set_perfreg)
837         mov     HV_FAST_VT_SET_PERFREG, %o5       837         mov     HV_FAST_VT_SET_PERFREG, %o5
838         ta      HV_FAST_TRAP                      838         ta      HV_FAST_TRAP
839         retl                                      839         retl
840          nop                                      840          nop
841 ENDPROC(sun4v_vt_set_perfreg)                     841 ENDPROC(sun4v_vt_set_perfreg)
842                                                   842 
843 ENTRY(sun4v_t5_get_perfreg)                       843 ENTRY(sun4v_t5_get_perfreg)
844         mov     %o1, %o4                          844         mov     %o1, %o4
845         mov     HV_FAST_T5_GET_PERFREG, %o5       845         mov     HV_FAST_T5_GET_PERFREG, %o5
846         ta      HV_FAST_TRAP                      846         ta      HV_FAST_TRAP
847         stx     %o1, [%o4]                        847         stx     %o1, [%o4]
848         retl                                      848         retl
849          nop                                      849          nop
850 ENDPROC(sun4v_t5_get_perfreg)                     850 ENDPROC(sun4v_t5_get_perfreg)
851                                                   851 
852 ENTRY(sun4v_t5_set_perfreg)                       852 ENTRY(sun4v_t5_set_perfreg)
853         mov     HV_FAST_T5_SET_PERFREG, %o5       853         mov     HV_FAST_T5_SET_PERFREG, %o5
854         ta      HV_FAST_TRAP                      854         ta      HV_FAST_TRAP
855         retl                                      855         retl
856          nop                                      856          nop
857 ENDPROC(sun4v_t5_set_perfreg)                     857 ENDPROC(sun4v_t5_set_perfreg)
858                                                   858 
859 ENTRY(sun4v_m7_get_perfreg)                       859 ENTRY(sun4v_m7_get_perfreg)
860         mov     %o1, %o4                          860         mov     %o1, %o4
861         mov     HV_FAST_M7_GET_PERFREG, %o5       861         mov     HV_FAST_M7_GET_PERFREG, %o5
862         ta      HV_FAST_TRAP                      862         ta      HV_FAST_TRAP
863         stx     %o1, [%o4]                        863         stx     %o1, [%o4]
864         retl                                      864         retl
865         nop                                       865         nop
866 ENDPROC(sun4v_m7_get_perfreg)                     866 ENDPROC(sun4v_m7_get_perfreg)
867                                                   867 
868 ENTRY(sun4v_m7_set_perfreg)                       868 ENTRY(sun4v_m7_set_perfreg)
869         mov     HV_FAST_M7_SET_PERFREG, %o5       869         mov     HV_FAST_M7_SET_PERFREG, %o5
870         ta      HV_FAST_TRAP                      870         ta      HV_FAST_TRAP
871         retl                                      871         retl
872         nop                                       872         nop
873 ENDPROC(sun4v_m7_set_perfreg)                     873 ENDPROC(sun4v_m7_set_perfreg)
874                                                << 
875         /* %o0: address of CCB array           << 
876          * %o1: size (in bytes) of CCB array   << 
877          * %o2: flags                          << 
878          * %o3: reserved                       << 
879          *                                     << 
880          * returns:                            << 
881          * %o0: status                         << 
882          * %o1: size (in bytes) of the CCB arr << 
883          * %o2: status data                    << 
884          * %o3: reserved                       << 
885          */                                    << 
886 ENTRY(sun4v_ccb_submit)                        << 
887         mov     %o5, %g1                       << 
888         mov     HV_CCB_SUBMIT, %o5             << 
889         ta      HV_FAST_TRAP                   << 
890         stx     %o1, [%o4]                     << 
891         retl                                   << 
892          stx    %o2, [%g1]                     << 
893 ENDPROC(sun4v_ccb_submit)                      << 
894 EXPORT_SYMBOL(sun4v_ccb_submit)                << 
895                                                << 
896         /* %o0: completion area ra for the ccb << 
897          *                                     << 
898          * returns:                            << 
899          * %o0: status                         << 
900          * %o1: CCB state                      << 
901          * %o2: position                       << 
902          * %o3: dax unit                       << 
903          * %o4: queue                          << 
904          */                                    << 
905 ENTRY(sun4v_ccb_info)                          << 
906         mov     %o1, %g1                       << 
907         mov     HV_CCB_INFO, %o5               << 
908         ta      HV_FAST_TRAP                   << 
909         sth     %o1, [%g1 + CCB_INFO_OFFSET_CC << 
910         sth     %o2, [%g1 + CCB_INFO_OFFSET_QU << 
911         sth     %o3, [%g1 + CCB_INFO_OFFSET_DA << 
912         retl                                   << 
913          sth    %o4, [%g1 + CCB_INFO_OFFSET_QU << 
914 ENDPROC(sun4v_ccb_info)                        << 
915 EXPORT_SYMBOL(sun4v_ccb_info)                  << 
916                                                << 
917         /* %o0: completion area ra for the ccb << 
918          *                                     << 
919          * returns:                            << 
920          * %o0: status                         << 
921          * %o1: result of the kill             << 
922          */                                    << 
923 ENTRY(sun4v_ccb_kill)                          << 
924         mov     %o1, %g1                       << 
925         mov     HV_CCB_KILL, %o5               << 
926         ta      HV_FAST_TRAP                   << 
927         retl                                   << 
928          sth    %o1, [%g1]                     << 
929 ENDPROC(sun4v_ccb_kill)                        << 
930 EXPORT_SYMBOL(sun4v_ccb_kill)                  << 
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php