Commit fefbbc73 authored by David S. Miller's avatar David S. Miller

sparc64: Use ENTRY/ENDPROC in PCI SUN4V asm.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 687124dd
/* pci_sun4v_asm: Hypervisor calls for PCI support. /* pci_sun4v_asm: Hypervisor calls for PCI support.
* *
* Copyright (C) 2006 David S. Miller <davem@davemloft.net> * Copyright (C) 2006, 2008 David S. Miller <davem@davemloft.net>
*/ */
#include <linux/linkage.h>
#include <asm/hypervisor.h> #include <asm/hypervisor.h>
/* %o0: devhandle /* %o0: devhandle
...@@ -14,8 +15,7 @@ ...@@ -14,8 +15,7 @@
* returns %o0: -status if status was non-zero, else * returns %o0: -status if status was non-zero, else
* %o0: num pages mapped * %o0: num pages mapped
*/ */
.globl pci_sun4v_iommu_map ENTRY(pci_sun4v_iommu_map)
pci_sun4v_iommu_map:
mov %o5, %g1 mov %o5, %g1
mov HV_FAST_PCI_IOMMU_MAP, %o5 mov HV_FAST_PCI_IOMMU_MAP, %o5
ta HV_FAST_TRAP ta HV_FAST_TRAP
...@@ -24,6 +24,7 @@ pci_sun4v_iommu_map: ...@@ -24,6 +24,7 @@ pci_sun4v_iommu_map:
mov %o1, %o0 mov %o1, %o0
1: retl 1: retl
nop nop
ENDPROC(pci_sun4v_iommu_map)
/* %o0: devhandle /* %o0: devhandle
* %o1: tsbid * %o1: tsbid
...@@ -31,12 +32,12 @@ pci_sun4v_iommu_map: ...@@ -31,12 +32,12 @@ pci_sun4v_iommu_map:
* *
* returns %o0: num ttes demapped * returns %o0: num ttes demapped
*/ */
.globl pci_sun4v_iommu_demap ENTRY(pci_sun4v_iommu_demap)
pci_sun4v_iommu_demap:
mov HV_FAST_PCI_IOMMU_DEMAP, %o5 mov HV_FAST_PCI_IOMMU_DEMAP, %o5
ta HV_FAST_TRAP ta HV_FAST_TRAP
retl retl
mov %o1, %o0 mov %o1, %o0
ENDPROC(pci_sun4v_iommu_demap)
/* %o0: devhandle /* %o0: devhandle
* %o1: tsbid * %o1: tsbid
...@@ -45,8 +46,7 @@ pci_sun4v_iommu_demap: ...@@ -45,8 +46,7 @@ pci_sun4v_iommu_demap:
* *
* returns %o0: status * returns %o0: status
*/ */
.globl pci_sun4v_iommu_getmap ENTRY(pci_sun4v_iommu_getmap)
pci_sun4v_iommu_getmap:
mov %o2, %o4 mov %o2, %o4
mov HV_FAST_PCI_IOMMU_GETMAP, %o5 mov HV_FAST_PCI_IOMMU_GETMAP, %o5
ta HV_FAST_TRAP ta HV_FAST_TRAP
...@@ -54,6 +54,7 @@ pci_sun4v_iommu_getmap: ...@@ -54,6 +54,7 @@ pci_sun4v_iommu_getmap:
stx %o2, [%o3] stx %o2, [%o3]
retl retl
mov %o0, %o0 mov %o0, %o0
ENDPROC(pci_sun4v_iommu_getmap)
/* %o0: devhandle /* %o0: devhandle
* %o1: pci_device * %o1: pci_device
...@@ -65,14 +66,14 @@ pci_sun4v_iommu_getmap: ...@@ -65,14 +66,14 @@ pci_sun4v_iommu_getmap:
* If there is an error, the data will be returned * If there is an error, the data will be returned
* as all 1's. * as all 1's.
*/ */
.globl pci_sun4v_config_get ENTRY(pci_sun4v_config_get)
pci_sun4v_config_get:
mov HV_FAST_PCI_CONFIG_GET, %o5 mov HV_FAST_PCI_CONFIG_GET, %o5
ta HV_FAST_TRAP ta HV_FAST_TRAP
brnz,a,pn %o1, 1f brnz,a,pn %o1, 1f
mov -1, %o2 mov -1, %o2
1: retl 1: retl
mov %o2, %o0 mov %o2, %o0
ENDPROC(pci_sun4v_config_get)
/* %o0: devhandle /* %o0: devhandle
* %o1: pci_device * %o1: pci_device
...@@ -85,14 +86,14 @@ pci_sun4v_config_get: ...@@ -85,14 +86,14 @@ pci_sun4v_config_get:
* status will be zero if the operation completed * status will be zero if the operation completed
* successfully, else -1 if not * successfully, else -1 if not
*/ */
.globl pci_sun4v_config_put ENTRY(pci_sun4v_config_put)
pci_sun4v_config_put:
mov HV_FAST_PCI_CONFIG_PUT, %o5 mov HV_FAST_PCI_CONFIG_PUT, %o5
ta HV_FAST_TRAP ta HV_FAST_TRAP
brnz,a,pn %o1, 1f brnz,a,pn %o1, 1f
mov -1, %o1 mov -1, %o1
1: retl 1: retl
mov %o1, %o0 mov %o1, %o0
ENDPROC(pci_sun4v_config_put)
/* %o0: devhandle /* %o0: devhandle
* %o1: msiqid * %o1: msiqid
...@@ -104,12 +105,12 @@ pci_sun4v_config_put: ...@@ -104,12 +105,12 @@ pci_sun4v_config_put:
* status will be zero if the operation completed * status will be zero if the operation completed
* successfully, else -1 if not * successfully, else -1 if not
*/ */
.globl pci_sun4v_msiq_conf ENTRY(pci_sun4v_msiq_conf)
pci_sun4v_msiq_conf:
mov HV_FAST_PCI_MSIQ_CONF, %o5 mov HV_FAST_PCI_MSIQ_CONF, %o5
ta HV_FAST_TRAP ta HV_FAST_TRAP
retl retl
mov %o0, %o0 mov %o0, %o0
ENDPROC(pci_sun4v_msiq_conf)
/* %o0: devhandle /* %o0: devhandle
* %o1: msiqid * %o1: msiqid
...@@ -118,8 +119,7 @@ pci_sun4v_msiq_conf: ...@@ -118,8 +119,7 @@ pci_sun4v_msiq_conf:
* *
* returns %o0: status * returns %o0: status
*/ */
.globl pci_sun4v_msiq_info ENTRY(pci_sun4v_msiq_info)
pci_sun4v_msiq_info:
mov %o2, %o4 mov %o2, %o4
mov HV_FAST_PCI_MSIQ_INFO, %o5 mov HV_FAST_PCI_MSIQ_INFO, %o5
ta HV_FAST_TRAP ta HV_FAST_TRAP
...@@ -127,6 +127,7 @@ pci_sun4v_msiq_info: ...@@ -127,6 +127,7 @@ pci_sun4v_msiq_info:
stx %o2, [%o3] stx %o2, [%o3]
retl retl
mov %o0, %o0 mov %o0, %o0
ENDPROC(pci_sun4v_msiq_info)
/* %o0: devhandle /* %o0: devhandle
* %o1: msiqid * %o1: msiqid
...@@ -134,13 +135,13 @@ pci_sun4v_msiq_info: ...@@ -134,13 +135,13 @@ pci_sun4v_msiq_info:
* *
* returns %o0: status * returns %o0: status
*/ */
.globl pci_sun4v_msiq_getvalid ENTRY(pci_sun4v_msiq_getvalid)
pci_sun4v_msiq_getvalid:
mov HV_FAST_PCI_MSIQ_GETVALID, %o5 mov HV_FAST_PCI_MSIQ_GETVALID, %o5
ta HV_FAST_TRAP ta HV_FAST_TRAP
stx %o1, [%o2] stx %o1, [%o2]
retl retl
mov %o0, %o0 mov %o0, %o0
ENDPROC(pci_sun4v_msiq_getvalid)
/* %o0: devhandle /* %o0: devhandle
* %o1: msiqid * %o1: msiqid
...@@ -148,12 +149,12 @@ pci_sun4v_msiq_getvalid: ...@@ -148,12 +149,12 @@ pci_sun4v_msiq_getvalid:
* *
* returns %o0: status * returns %o0: status
*/ */
.globl pci_sun4v_msiq_setvalid ENTRY(pci_sun4v_msiq_setvalid)
pci_sun4v_msiq_setvalid:
mov HV_FAST_PCI_MSIQ_SETVALID, %o5 mov HV_FAST_PCI_MSIQ_SETVALID, %o5
ta HV_FAST_TRAP ta HV_FAST_TRAP
retl retl
mov %o0, %o0 mov %o0, %o0
ENDPROC(pci_sun4v_msiq_setvalid)
/* %o0: devhandle /* %o0: devhandle
* %o1: msiqid * %o1: msiqid
...@@ -161,13 +162,13 @@ pci_sun4v_msiq_setvalid: ...@@ -161,13 +162,13 @@ pci_sun4v_msiq_setvalid:
* *
* returns %o0: status * returns %o0: status
*/ */
.globl pci_sun4v_msiq_getstate ENTRY(pci_sun4v_msiq_getstate)
pci_sun4v_msiq_getstate:
mov HV_FAST_PCI_MSIQ_GETSTATE, %o5 mov HV_FAST_PCI_MSIQ_GETSTATE, %o5
ta HV_FAST_TRAP ta HV_FAST_TRAP
stx %o1, [%o2] stx %o1, [%o2]
retl retl
mov %o0, %o0 mov %o0, %o0
ENDPROC(pci_sun4v_msiq_getstate)
/* %o0: devhandle /* %o0: devhandle
* %o1: msiqid * %o1: msiqid
...@@ -175,12 +176,12 @@ pci_sun4v_msiq_getstate: ...@@ -175,12 +176,12 @@ pci_sun4v_msiq_getstate:
* *
* returns %o0: status * returns %o0: status
*/ */
.globl pci_sun4v_msiq_setstate ENTRY(pci_sun4v_msiq_setstate)
pci_sun4v_msiq_setstate:
mov HV_FAST_PCI_MSIQ_SETSTATE, %o5 mov HV_FAST_PCI_MSIQ_SETSTATE, %o5
ta HV_FAST_TRAP ta HV_FAST_TRAP
retl retl
mov %o0, %o0 mov %o0, %o0
ENDPROC(pci_sun4v_msiq_setstate)
/* %o0: devhandle /* %o0: devhandle
* %o1: msiqid * %o1: msiqid
...@@ -188,13 +189,13 @@ pci_sun4v_msiq_setstate: ...@@ -188,13 +189,13 @@ pci_sun4v_msiq_setstate:
* *
* returns %o0: status * returns %o0: status
*/ */
.globl pci_sun4v_msiq_gethead ENTRY(pci_sun4v_msiq_gethead)
pci_sun4v_msiq_gethead:
mov HV_FAST_PCI_MSIQ_GETHEAD, %o5 mov HV_FAST_PCI_MSIQ_GETHEAD, %o5
ta HV_FAST_TRAP ta HV_FAST_TRAP
stx %o1, [%o2] stx %o1, [%o2]
retl retl
mov %o0, %o0 mov %o0, %o0
ENDPROC(pci_sun4v_msiq_gethead)
/* %o0: devhandle /* %o0: devhandle
* %o1: msiqid * %o1: msiqid
...@@ -202,12 +203,12 @@ pci_sun4v_msiq_gethead: ...@@ -202,12 +203,12 @@ pci_sun4v_msiq_gethead:
* *
* returns %o0: status * returns %o0: status
*/ */
.globl pci_sun4v_msiq_sethead ENTRY(pci_sun4v_msiq_sethead)
pci_sun4v_msiq_sethead:
mov HV_FAST_PCI_MSIQ_SETHEAD, %o5 mov HV_FAST_PCI_MSIQ_SETHEAD, %o5
ta HV_FAST_TRAP ta HV_FAST_TRAP
retl retl
mov %o0, %o0 mov %o0, %o0
ENDPROC(pci_sun4v_msiq_sethead)
/* %o0: devhandle /* %o0: devhandle
* %o1: msiqid * %o1: msiqid
...@@ -215,13 +216,13 @@ pci_sun4v_msiq_sethead: ...@@ -215,13 +216,13 @@ pci_sun4v_msiq_sethead:
* *
* returns %o0: status * returns %o0: status
*/ */
.globl pci_sun4v_msiq_gettail ENTRY(pci_sun4v_msiq_gettail)
pci_sun4v_msiq_gettail:
mov HV_FAST_PCI_MSIQ_GETTAIL, %o5 mov HV_FAST_PCI_MSIQ_GETTAIL, %o5
ta HV_FAST_TRAP ta HV_FAST_TRAP
stx %o1, [%o2] stx %o1, [%o2]
retl retl
mov %o0, %o0 mov %o0, %o0
ENDPROC(pci_sun4v_msiq_gettail)
/* %o0: devhandle /* %o0: devhandle
* %o1: msinum * %o1: msinum
...@@ -229,13 +230,13 @@ pci_sun4v_msiq_gettail: ...@@ -229,13 +230,13 @@ pci_sun4v_msiq_gettail:
* *
* returns %o0: status * returns %o0: status
*/ */
.globl pci_sun4v_msi_getvalid ENTRY(pci_sun4v_msi_getvalid)
pci_sun4v_msi_getvalid:
mov HV_FAST_PCI_MSI_GETVALID, %o5 mov HV_FAST_PCI_MSI_GETVALID, %o5
ta HV_FAST_TRAP ta HV_FAST_TRAP
stx %o1, [%o2] stx %o1, [%o2]
retl retl
mov %o0, %o0 mov %o0, %o0
ENDPROC(pci_sun4v_msi_getvalid)
/* %o0: devhandle /* %o0: devhandle
* %o1: msinum * %o1: msinum
...@@ -243,12 +244,12 @@ pci_sun4v_msi_getvalid: ...@@ -243,12 +244,12 @@ pci_sun4v_msi_getvalid:
* *
* returns %o0: status * returns %o0: status
*/ */
.globl pci_sun4v_msi_setvalid ENTRY(pci_sun4v_msi_setvalid)
pci_sun4v_msi_setvalid:
mov HV_FAST_PCI_MSI_SETVALID, %o5 mov HV_FAST_PCI_MSI_SETVALID, %o5
ta HV_FAST_TRAP ta HV_FAST_TRAP
retl retl
mov %o0, %o0 mov %o0, %o0
ENDPROC(pci_sun4v_msi_setvalid)
/* %o0: devhandle /* %o0: devhandle
* %o1: msinum * %o1: msinum
...@@ -256,13 +257,13 @@ pci_sun4v_msi_setvalid: ...@@ -256,13 +257,13 @@ pci_sun4v_msi_setvalid:
* *
* returns %o0: status * returns %o0: status
*/ */
.globl pci_sun4v_msi_getmsiq ENTRY(pci_sun4v_msi_getmsiq)
pci_sun4v_msi_getmsiq:
mov HV_FAST_PCI_MSI_GETMSIQ, %o5 mov HV_FAST_PCI_MSI_GETMSIQ, %o5
ta HV_FAST_TRAP ta HV_FAST_TRAP
stx %o1, [%o2] stx %o1, [%o2]
retl retl
mov %o0, %o0 mov %o0, %o0
ENDPROC(pci_sun4v_msi_getmsiq)
/* %o0: devhandle /* %o0: devhandle
* %o1: msinum * %o1: msinum
...@@ -271,12 +272,12 @@ pci_sun4v_msi_getmsiq: ...@@ -271,12 +272,12 @@ pci_sun4v_msi_getmsiq:
* *
* returns %o0: status * returns %o0: status
*/ */
.globl pci_sun4v_msi_setmsiq ENTRY(pci_sun4v_msi_setmsiq)
pci_sun4v_msi_setmsiq:
mov HV_FAST_PCI_MSI_SETMSIQ, %o5 mov HV_FAST_PCI_MSI_SETMSIQ, %o5
ta HV_FAST_TRAP ta HV_FAST_TRAP
retl retl
mov %o0, %o0 mov %o0, %o0
ENDPROC(pci_sun4v_msi_setmsiq)
/* %o0: devhandle /* %o0: devhandle
* %o1: msinum * %o1: msinum
...@@ -284,13 +285,13 @@ pci_sun4v_msi_setmsiq: ...@@ -284,13 +285,13 @@ pci_sun4v_msi_setmsiq:
* *
* returns %o0: status * returns %o0: status
*/ */
.globl pci_sun4v_msi_getstate ENTRY(pci_sun4v_msi_getstate)
pci_sun4v_msi_getstate:
mov HV_FAST_PCI_MSI_GETSTATE, %o5 mov HV_FAST_PCI_MSI_GETSTATE, %o5
ta HV_FAST_TRAP ta HV_FAST_TRAP
stx %o1, [%o2] stx %o1, [%o2]
retl retl
mov %o0, %o0 mov %o0, %o0
ENDPROC(pci_sun4v_msi_getstate)
/* %o0: devhandle /* %o0: devhandle
* %o1: msinum * %o1: msinum
...@@ -298,12 +299,12 @@ pci_sun4v_msi_getstate: ...@@ -298,12 +299,12 @@ pci_sun4v_msi_getstate:
* *
* returns %o0: status * returns %o0: status
*/ */
.globl pci_sun4v_msi_setstate ENTRY(pci_sun4v_msi_setstate)
pci_sun4v_msi_setstate:
mov HV_FAST_PCI_MSI_SETSTATE, %o5 mov HV_FAST_PCI_MSI_SETSTATE, %o5
ta HV_FAST_TRAP ta HV_FAST_TRAP
retl retl
mov %o0, %o0 mov %o0, %o0
ENDPROC(pci_sun4v_msi_setstate)
/* %o0: devhandle /* %o0: devhandle
* %o1: msinum * %o1: msinum
...@@ -311,13 +312,13 @@ pci_sun4v_msi_setstate: ...@@ -311,13 +312,13 @@ pci_sun4v_msi_setstate:
* *
* returns %o0: status * returns %o0: status
*/ */
.globl pci_sun4v_msg_getmsiq ENTRY(pci_sun4v_msg_getmsiq)
pci_sun4v_msg_getmsiq:
mov HV_FAST_PCI_MSG_GETMSIQ, %o5 mov HV_FAST_PCI_MSG_GETMSIQ, %o5
ta HV_FAST_TRAP ta HV_FAST_TRAP
stx %o1, [%o2] stx %o1, [%o2]
retl retl
mov %o0, %o0 mov %o0, %o0
ENDPROC(pci_sun4v_msg_getmsiq)
/* %o0: devhandle /* %o0: devhandle
* %o1: msinum * %o1: msinum
...@@ -325,12 +326,12 @@ pci_sun4v_msg_getmsiq: ...@@ -325,12 +326,12 @@ pci_sun4v_msg_getmsiq:
* *
* returns %o0: status * returns %o0: status
*/ */
.globl pci_sun4v_msg_setmsiq ENTRY(pci_sun4v_msg_setmsiq)
pci_sun4v_msg_setmsiq:
mov HV_FAST_PCI_MSG_SETMSIQ, %o5 mov HV_FAST_PCI_MSG_SETMSIQ, %o5
ta HV_FAST_TRAP ta HV_FAST_TRAP
retl retl
mov %o0, %o0 mov %o0, %o0
ENDPROC(pci_sun4v_msg_setmsiq)
/* %o0: devhandle /* %o0: devhandle
* %o1: msinum * %o1: msinum
...@@ -338,13 +339,13 @@ pci_sun4v_msg_setmsiq: ...@@ -338,13 +339,13 @@ pci_sun4v_msg_setmsiq:
* *
* returns %o0: status * returns %o0: status
*/ */
.globl pci_sun4v_msg_getvalid ENTRY(pci_sun4v_msg_getvalid)
pci_sun4v_msg_getvalid:
mov HV_FAST_PCI_MSG_GETVALID, %o5 mov HV_FAST_PCI_MSG_GETVALID, %o5
ta HV_FAST_TRAP ta HV_FAST_TRAP
stx %o1, [%o2] stx %o1, [%o2]
retl retl
mov %o0, %o0 mov %o0, %o0
ENDPROC(pci_sun4v_msg_getvalid)
/* %o0: devhandle /* %o0: devhandle
* %o1: msinum * %o1: msinum
...@@ -352,10 +353,10 @@ pci_sun4v_msg_getvalid: ...@@ -352,10 +353,10 @@ pci_sun4v_msg_getvalid:
* *
* returns %o0: status * returns %o0: status
*/ */
.globl pci_sun4v_msg_setvalid ENTRY(pci_sun4v_msg_setvalid)
pci_sun4v_msg_setvalid:
mov HV_FAST_PCI_MSG_SETVALID, %o5 mov HV_FAST_PCI_MSG_SETVALID, %o5
ta HV_FAST_TRAP ta HV_FAST_TRAP
retl retl
mov %o0, %o0 mov %o0, %o0
ENDPROC(pci_sun4v_msg_setvalid)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment