summaryrefslogtreecommitdiff
path: root/arch/sparc64/kernel/pci_sun4v_asm.S
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-02-10 00:08:26 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 01:12:15 -0800
commit18397944642cbca7fcd4a109b43ed5b4652e95b9 (patch)
tree6848d3e67b789b30064f488bd3273ed5ebee4f99 /arch/sparc64/kernel/pci_sun4v_asm.S
parent164c220fa3947abbada65329d168f421b461a2a7 (diff)
[SPARC64]: First cut at SUN4V PCI IOMMU handling.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/pci_sun4v_asm.S')
-rw-r--r--arch/sparc64/kernel/pci_sun4v_asm.S46
1 files changed, 22 insertions, 24 deletions
diff --git a/arch/sparc64/kernel/pci_sun4v_asm.S b/arch/sparc64/kernel/pci_sun4v_asm.S
index 2f1147146abe..4a12341dd5d3 100644
--- a/arch/sparc64/kernel/pci_sun4v_asm.S
+++ b/arch/sparc64/kernel/pci_sun4v_asm.S
@@ -12,9 +12,7 @@
*/
.globl pci_sun4v_devino_to_sysino
pci_sun4v_devino_to_sysino:
- mov %o1, %o2
- mov %o0, %o1
- mov HV_FAST_INTR_DEVINO2SYSINO, %o0
+ mov HV_FAST_INTR_DEVINO2SYSINO, %o5
ta HV_FAST_TRAP
retl
mov %o1, %o0
@@ -29,12 +27,7 @@ pci_sun4v_devino_to_sysino:
*/
.globl pci_sun4v_iommu_map
pci_sun4v_iommu_map:
- mov %o4, %o5
- mov %o3, %o4
- mov %o2, %o3
- mov %o1, %o2
- mov %o0, %o1
- mov HV_FAST_PCI_IOMMU_MAP, %o0
+ mov HV_FAST_PCI_IOMMU_MAP, %o5
ta HV_FAST_TRAP
retl
mov %o1, %o0
@@ -47,15 +40,29 @@ pci_sun4v_iommu_map:
*/
.globl pci_sun4v_iommu_demap
pci_sun4v_iommu_demap:
- mov %o2, %o3
- mov %o1, %o2
- mov %o0, %o1
- mov HV_FAST_PCI_IOMMU_DEMAP, %o0
+ mov HV_FAST_PCI_IOMMU_DEMAP, %o5
ta HV_FAST_TRAP
retl
mov %o1, %o0
/* %o0: devhandle
+ * %o1: tsbid
+ * %o2: &io_attributes
+ * %o3: &real_address
+ *
+ * returns %o0: status
+ */
+ .globl pci_sun4v_iommu_getmap
+pci_sun4v_iommu_getmap:
+ mov %o2, %o4
+ mov HV_FAST_PCI_IOMMU_GETMAP, %o5
+ ta HV_FAST_TRAP
+ stx %o1, [%o4]
+ stx %o2, [%o3]
+ retl
+ mov %o0, %o0
+
+ /* %o0: devhandle
* %o1: pci_device
* %o2: pci_config_offset
* %o3: size
@@ -67,11 +74,7 @@ pci_sun4v_iommu_demap:
*/
.globl pci_sun4v_config_get
pci_sun4v_config_get:
- mov %o3, %o4
- mov %o2, %o3
- mov %o1, %o2
- mov %o0, %o1
- mov HV_FAST_PCI_CONFIG_GET, %o0
+ mov HV_FAST_PCI_CONFIG_GET, %o5
ta HV_FAST_TRAP
brnz,a,pn %o1, 1f
mov -1, %o2
@@ -91,14 +94,9 @@ pci_sun4v_config_get:
*/
.globl pci_sun4v_config_put
pci_sun4v_config_put:
- mov %o3, %o4
- mov %o2, %o3
- mov %o1, %o2
- mov %o0, %o1
- mov HV_FAST_PCI_CONFIG_PUT, %o0
+ mov HV_FAST_PCI_CONFIG_PUT, %o5
ta HV_FAST_TRAP
brnz,a,pn %o1, 1f
mov -1, %o1
1: retl
mov %o1, %o0
-