~ [ 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 ] ~

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