~ [ 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.10.17)


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