Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /* n2_asm.S: Hypervisor calls for NCS support.
0003  *
0004  * Copyright (C) 2009 David S. Miller <davem@davemloft.net>
0005  */
0006 
0007 #include <linux/linkage.h>
0008 #include <asm/hypervisor.h>
0009 #include "n2_core.h"
0010 
0011     /* o0: queue type
0012      * o1: RA of queue
0013      * o2: num entries in queue
0014      * o3: address of queue handle return
0015      */
0016 ENTRY(sun4v_ncs_qconf)
0017     mov HV_FAST_NCS_QCONF, %o5
0018     ta  HV_FAST_TRAP
0019     stx %o1, [%o3]
0020     retl
0021      nop
0022 ENDPROC(sun4v_ncs_qconf)
0023 
0024     /* %o0: queue handle
0025      * %o1: address of queue type return
0026      * %o2: address of queue base address return
0027      * %o3: address of queue num entries return
0028      */
0029 ENTRY(sun4v_ncs_qinfo)
0030     mov %o1, %g1
0031     mov %o2, %g2
0032     mov %o3, %g3
0033     mov HV_FAST_NCS_QINFO, %o5
0034     ta  HV_FAST_TRAP
0035     stx %o1, [%g1]
0036     stx %o2, [%g2]
0037     stx %o3, [%g3]
0038     retl
0039      nop
0040 ENDPROC(sun4v_ncs_qinfo)
0041 
0042     /* %o0: queue handle
0043      * %o1: address of head offset return
0044      */
0045 ENTRY(sun4v_ncs_gethead)
0046     mov %o1, %o2
0047     mov HV_FAST_NCS_GETHEAD, %o5
0048     ta  HV_FAST_TRAP
0049     stx %o1, [%o2]
0050     retl
0051      nop
0052 ENDPROC(sun4v_ncs_gethead)
0053 
0054     /* %o0: queue handle
0055      * %o1: address of tail offset return
0056      */
0057 ENTRY(sun4v_ncs_gettail)
0058     mov %o1, %o2
0059     mov HV_FAST_NCS_GETTAIL, %o5
0060     ta  HV_FAST_TRAP
0061     stx %o1, [%o2]
0062     retl
0063      nop
0064 ENDPROC(sun4v_ncs_gettail)
0065 
0066     /* %o0: queue handle
0067      * %o1: new tail offset
0068      */
0069 ENTRY(sun4v_ncs_settail)
0070     mov HV_FAST_NCS_SETTAIL, %o5
0071     ta  HV_FAST_TRAP
0072     retl
0073      nop
0074 ENDPROC(sun4v_ncs_settail)
0075 
0076     /* %o0: queue handle
0077      * %o1: address of devino return
0078      */
0079 ENTRY(sun4v_ncs_qhandle_to_devino)
0080     mov %o1, %o2
0081     mov HV_FAST_NCS_QHANDLE_TO_DEVINO, %o5
0082     ta  HV_FAST_TRAP
0083     stx %o1, [%o2]
0084     retl
0085      nop
0086 ENDPROC(sun4v_ncs_qhandle_to_devino)
0087 
0088     /* %o0: queue handle
0089      * %o1: new head offset
0090      */
0091 ENTRY(sun4v_ncs_sethead_marker)
0092     mov HV_FAST_NCS_SETHEAD_MARKER, %o5
0093     ta  HV_FAST_TRAP
0094     retl
0095      nop
0096 ENDPROC(sun4v_ncs_sethead_marker)