aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/pci_sun4v_asm.S
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-02-10 03:08:26 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 04:12:15 -0500
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 @@
12 */ 12 */
13 .globl pci_sun4v_devino_to_sysino 13 .globl pci_sun4v_devino_to_sysino
14pci_sun4v_devino_to_sysino: 14pci_sun4v_devino_to_sysino:
15 mov %o1, %o2 15 mov HV_FAST_INTR_DEVINO2SYSINO, %o5
16 mov %o0, %o1
17 mov HV_FAST_INTR_DEVINO2SYSINO, %o0
18 ta HV_FAST_TRAP 16 ta HV_FAST_TRAP
19 retl 17 retl
20 mov %o1, %o0 18 mov %o1, %o0
@@ -29,12 +27,7 @@ pci_sun4v_devino_to_sysino:
29 */ 27 */
30 .globl pci_sun4v_iommu_map 28 .globl pci_sun4v_iommu_map
31pci_sun4v_iommu_map: 29pci_sun4v_iommu_map:
32 mov %o4, %o5 30 mov HV_FAST_PCI_IOMMU_MAP, %o5
33 mov %o3, %o4
34 mov %o2, %o3
35 mov %o1, %o2
36 mov %o0, %o1
37 mov HV_FAST_PCI_IOMMU_MAP, %o0
38 ta HV_FAST_TRAP 31 ta HV_FAST_TRAP
39 retl 32 retl
40 mov %o1, %o0 33 mov %o1, %o0
@@ -47,15 +40,29 @@ pci_sun4v_iommu_map:
47 */ 40 */
48 .globl pci_sun4v_iommu_demap 41 .globl pci_sun4v_iommu_demap
49pci_sun4v_iommu_demap: 42pci_sun4v_iommu_demap:
50 mov %o2, %o3 43 mov HV_FAST_PCI_IOMMU_DEMAP, %o5
51 mov %o1, %o2
52 mov %o0, %o1
53 mov HV_FAST_PCI_IOMMU_DEMAP, %o0
54 ta HV_FAST_TRAP 44 ta HV_FAST_TRAP
55 retl 45 retl
56 mov %o1, %o0 46 mov %o1, %o0
57 47
58 /* %o0: devhandle 48 /* %o0: devhandle
49 * %o1: tsbid
50 * %o2: &io_attributes
51 * %o3: &real_address
52 *
53 * returns %o0: status
54 */
55 .globl pci_sun4v_iommu_getmap
56pci_sun4v_iommu_getmap:
57 mov %o2, %o4
58 mov HV_FAST_PCI_IOMMU_GETMAP, %o5
59 ta HV_FAST_TRAP
60 stx %o1, [%o4]
61 stx %o2, [%o3]
62 retl
63 mov %o0, %o0
64
65 /* %o0: devhandle
59 * %o1: pci_device 66 * %o1: pci_device
60 * %o2: pci_config_offset 67 * %o2: pci_config_offset
61 * %o3: size 68 * %o3: size
@@ -67,11 +74,7 @@ pci_sun4v_iommu_demap:
67 */ 74 */
68 .globl pci_sun4v_config_get 75 .globl pci_sun4v_config_get
69pci_sun4v_config_get: 76pci_sun4v_config_get:
70 mov %o3, %o4 77 mov HV_FAST_PCI_CONFIG_GET, %o5
71 mov %o2, %o3
72 mov %o1, %o2
73 mov %o0, %o1
74 mov HV_FAST_PCI_CONFIG_GET, %o0
75 ta HV_FAST_TRAP 78 ta HV_FAST_TRAP
76 brnz,a,pn %o1, 1f 79 brnz,a,pn %o1, 1f
77 mov -1, %o2 80 mov -1, %o2
@@ -91,14 +94,9 @@ pci_sun4v_config_get:
91 */ 94 */
92 .globl pci_sun4v_config_put 95 .globl pci_sun4v_config_put
93pci_sun4v_config_put: 96pci_sun4v_config_put:
94 mov %o3, %o4 97 mov HV_FAST_PCI_CONFIG_PUT, %o5
95 mov %o2, %o3
96 mov %o1, %o2
97 mov %o0, %o1
98 mov HV_FAST_PCI_CONFIG_PUT, %o0
99 ta HV_FAST_TRAP 98 ta HV_FAST_TRAP
100 brnz,a,pn %o1, 1f 99 brnz,a,pn %o1, 1f
101 mov -1, %o1 100 mov -1, %o1
1021: retl 1011: retl
103 mov %o1, %o0 102 mov %o1, %o0
104