Linux Audio

Check our new training course

Loading...
v6.8
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/* n2_asm.S: Hypervisor calls for NCS support.
 3 *
 4 * Copyright (C) 2009 David S. Miller <davem@davemloft.net>
 5 */
 6
 7#include <linux/linkage.h>
 8#include <asm/hypervisor.h>
 9#include "n2_core.h"
10
11	/* o0: queue type
12	 * o1: RA of queue
13	 * o2: num entries in queue
14	 * o3: address of queue handle return
15	 */
16ENTRY(sun4v_ncs_qconf)
17	mov	HV_FAST_NCS_QCONF, %o5
18	ta	HV_FAST_TRAP
19	stx	%o1, [%o3]
20	retl
21	 nop
22ENDPROC(sun4v_ncs_qconf)
23
24	/* %o0: queue handle
25	 * %o1: address of queue type return
26	 * %o2: address of queue base address return
27	 * %o3: address of queue num entries return
28	 */
29ENTRY(sun4v_ncs_qinfo)
30	mov	%o1, %g1
31	mov	%o2, %g2
32	mov	%o3, %g3
33	mov	HV_FAST_NCS_QINFO, %o5
34	ta	HV_FAST_TRAP
35	stx	%o1, [%g1]
36	stx	%o2, [%g2]
37	stx	%o3, [%g3]
38	retl
39	 nop
40ENDPROC(sun4v_ncs_qinfo)
41
42	/* %o0: queue handle
43	 * %o1: address of head offset return
44	 */
45ENTRY(sun4v_ncs_gethead)
46	mov	%o1, %o2
47	mov	HV_FAST_NCS_GETHEAD, %o5
48	ta	HV_FAST_TRAP
49	stx	%o1, [%o2]
50	retl
51	 nop
52ENDPROC(sun4v_ncs_gethead)
53
54	/* %o0: queue handle
55	 * %o1: address of tail offset return
56	 */
57ENTRY(sun4v_ncs_gettail)
58	mov	%o1, %o2
59	mov	HV_FAST_NCS_GETTAIL, %o5
60	ta	HV_FAST_TRAP
61	stx	%o1, [%o2]
62	retl
63	 nop
64ENDPROC(sun4v_ncs_gettail)
65
66	/* %o0: queue handle
67	 * %o1: new tail offset
68	 */
69ENTRY(sun4v_ncs_settail)
70	mov	HV_FAST_NCS_SETTAIL, %o5
71	ta	HV_FAST_TRAP
72	retl
73	 nop
74ENDPROC(sun4v_ncs_settail)
75
76	/* %o0: queue handle
77	 * %o1: address of devino return
78	 */
79ENTRY(sun4v_ncs_qhandle_to_devino)
80	mov	%o1, %o2
81	mov	HV_FAST_NCS_QHANDLE_TO_DEVINO, %o5
82	ta	HV_FAST_TRAP
83	stx	%o1, [%o2]
84	retl
85	 nop
86ENDPROC(sun4v_ncs_qhandle_to_devino)
87
88	/* %o0: queue handle
89	 * %o1: new head offset
90	 */
91ENTRY(sun4v_ncs_sethead_marker)
92	mov	HV_FAST_NCS_SETHEAD_MARKER, %o5
93	ta	HV_FAST_TRAP
94	retl
95	 nop
96ENDPROC(sun4v_ncs_sethead_marker)
v3.15
 
 1/* n2_asm.S: Hypervisor calls for NCS support.
 2 *
 3 * Copyright (C) 2009 David S. Miller <davem@davemloft.net>
 4 */
 5
 6#include <linux/linkage.h>
 7#include <asm/hypervisor.h>
 8#include "n2_core.h"
 9
10	/* o0: queue type
11	 * o1: RA of queue
12	 * o2: num entries in queue
13	 * o3: address of queue handle return
14	 */
15ENTRY(sun4v_ncs_qconf)
16	mov	HV_FAST_NCS_QCONF, %o5
17	ta	HV_FAST_TRAP
18	stx	%o1, [%o3]
19	retl
20	 nop
21ENDPROC(sun4v_ncs_qconf)
22
23	/* %o0: queue handle
24	 * %o1: address of queue type return
25	 * %o2: address of queue base address return
26	 * %o3: address of queue num entries return
27	 */
28ENTRY(sun4v_ncs_qinfo)
29	mov	%o1, %g1
30	mov	%o2, %g2
31	mov	%o3, %g3
32	mov	HV_FAST_NCS_QINFO, %o5
33	ta	HV_FAST_TRAP
34	stx	%o1, [%g1]
35	stx	%o2, [%g2]
36	stx	%o3, [%g3]
37	retl
38	 nop
39ENDPROC(sun4v_ncs_qinfo)
40
41	/* %o0: queue handle
42	 * %o1: address of head offset return
43	 */
44ENTRY(sun4v_ncs_gethead)
45	mov	%o1, %o2
46	mov	HV_FAST_NCS_GETHEAD, %o5
47	ta	HV_FAST_TRAP
48	stx	%o1, [%o2]
49	retl
50	 nop
51ENDPROC(sun4v_ncs_gethead)
52
53	/* %o0: queue handle
54	 * %o1: address of tail offset return
55	 */
56ENTRY(sun4v_ncs_gettail)
57	mov	%o1, %o2
58	mov	HV_FAST_NCS_GETTAIL, %o5
59	ta	HV_FAST_TRAP
60	stx	%o1, [%o2]
61	retl
62	 nop
63ENDPROC(sun4v_ncs_gettail)
64
65	/* %o0: queue handle
66	 * %o1: new tail offset
67	 */
68ENTRY(sun4v_ncs_settail)
69	mov	HV_FAST_NCS_SETTAIL, %o5
70	ta	HV_FAST_TRAP
71	retl
72	 nop
73ENDPROC(sun4v_ncs_settail)
74
75	/* %o0: queue handle
76	 * %o1: address of devino return
77	 */
78ENTRY(sun4v_ncs_qhandle_to_devino)
79	mov	%o1, %o2
80	mov	HV_FAST_NCS_QHANDLE_TO_DEVINO, %o5
81	ta	HV_FAST_TRAP
82	stx	%o1, [%o2]
83	retl
84	 nop
85ENDPROC(sun4v_ncs_qhandle_to_devino)
86
87	/* %o0: queue handle
88	 * %o1: new head offset
89	 */
90ENTRY(sun4v_ncs_sethead_marker)
91	mov	HV_FAST_NCS_SETHEAD_MARKER, %o5
92	ta	HV_FAST_TRAP
93	retl
94	 nop
95ENDPROC(sun4v_ncs_sethead_marker)