diff options
-rw-r--r-- | arch/ia64/sn/kernel/bte.c | 17 | ||||
-rw-r--r-- | include/asm-ia64/sn/bte.h | 23 |
2 files changed, 25 insertions, 15 deletions
diff --git a/arch/ia64/sn/kernel/bte.c b/arch/ia64/sn/kernel/bte.c index dd73c0cb754b..1f11db470d90 100644 --- a/arch/ia64/sn/kernel/bte.c +++ b/arch/ia64/sn/kernel/bte.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. | 6 | * Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | 9 | #include <linux/config.h> |
@@ -186,18 +186,13 @@ retry_bteop: | |||
186 | 186 | ||
187 | /* Initialize the notification to a known value. */ | 187 | /* Initialize the notification to a known value. */ |
188 | *bte->most_rcnt_na = BTE_WORD_BUSY; | 188 | *bte->most_rcnt_na = BTE_WORD_BUSY; |
189 | notif_phys_addr = TO_PHYS(ia64_tpa((unsigned long)bte->most_rcnt_na)); | 189 | notif_phys_addr = (u64)bte->most_rcnt_na; |
190 | 190 | ||
191 | if (is_shub2()) { | ||
192 | src = SH2_TIO_PHYS_TO_DMA(src); | ||
193 | dest = SH2_TIO_PHYS_TO_DMA(dest); | ||
194 | notif_phys_addr = SH2_TIO_PHYS_TO_DMA(notif_phys_addr); | ||
195 | } | ||
196 | /* Set the source and destination registers */ | 191 | /* Set the source and destination registers */ |
197 | BTE_PRINTKV(("IBSA = 0x%lx)\n", (TO_PHYS(src)))); | 192 | BTE_PRINTKV(("IBSA = 0x%lx)\n", src)); |
198 | BTE_SRC_STORE(bte, TO_PHYS(src)); | 193 | BTE_SRC_STORE(bte, src); |
199 | BTE_PRINTKV(("IBDA = 0x%lx)\n", (TO_PHYS(dest)))); | 194 | BTE_PRINTKV(("IBDA = 0x%lx)\n", dest)); |
200 | BTE_DEST_STORE(bte, TO_PHYS(dest)); | 195 | BTE_DEST_STORE(bte, dest); |
201 | 196 | ||
202 | /* Set the notification register */ | 197 | /* Set the notification register */ |
203 | BTE_PRINTKV(("IBNA = 0x%lx)\n", notif_phys_addr)); | 198 | BTE_PRINTKV(("IBNA = 0x%lx)\n", notif_phys_addr)); |
diff --git a/include/asm-ia64/sn/bte.h b/include/asm-ia64/sn/bte.h index f50da3d91d07..01e5b4103235 100644 --- a/include/asm-ia64/sn/bte.h +++ b/include/asm-ia64/sn/bte.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. | 6 | * Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | 9 | ||
@@ -100,13 +100,28 @@ | |||
100 | #define BTE_LNSTAT_STORE(_bte, _x) \ | 100 | #define BTE_LNSTAT_STORE(_bte, _x) \ |
101 | HUB_S(_bte->bte_base_addr, (_x)) | 101 | HUB_S(_bte->bte_base_addr, (_x)) |
102 | #define BTE_SRC_STORE(_bte, _x) \ | 102 | #define BTE_SRC_STORE(_bte, _x) \ |
103 | HUB_S(_bte->bte_source_addr, (_x)) | 103 | ({ \ |
104 | u64 __addr = ((_x) & ~AS_MASK); \ | ||
105 | if (is_shub2()) \ | ||
106 | __addr = SH2_TIO_PHYS_TO_DMA(__addr); \ | ||
107 | HUB_S(_bte->bte_source_addr, __addr); \ | ||
108 | }) | ||
104 | #define BTE_DEST_STORE(_bte, _x) \ | 109 | #define BTE_DEST_STORE(_bte, _x) \ |
105 | HUB_S(_bte->bte_destination_addr, (_x)) | 110 | ({ \ |
111 | u64 __addr = ((_x) & ~AS_MASK); \ | ||
112 | if (is_shub2()) \ | ||
113 | __addr = SH2_TIO_PHYS_TO_DMA(__addr); \ | ||
114 | HUB_S(_bte->bte_destination_addr, __addr); \ | ||
115 | }) | ||
106 | #define BTE_CTRL_STORE(_bte, _x) \ | 116 | #define BTE_CTRL_STORE(_bte, _x) \ |
107 | HUB_S(_bte->bte_control_addr, (_x)) | 117 | HUB_S(_bte->bte_control_addr, (_x)) |
108 | #define BTE_NOTIF_STORE(_bte, _x) \ | 118 | #define BTE_NOTIF_STORE(_bte, _x) \ |
109 | HUB_S(_bte->bte_notify_addr, (_x)) | 119 | ({ \ |
120 | u64 __addr = ia64_tpa((_x) & ~AS_MASK); \ | ||
121 | if (is_shub2()) \ | ||
122 | __addr = SH2_TIO_PHYS_TO_DMA(__addr); \ | ||
123 | HUB_S(_bte->bte_notify_addr, __addr); \ | ||
124 | }) | ||
110 | 125 | ||
111 | #define BTE_START_TRANSFER(_bte, _len, _mode) \ | 126 | #define BTE_START_TRANSFER(_bte, _len, _mode) \ |
112 | is_shub2() ? BTE_CTRL_STORE(_bte, IBLS_BUSY | (_mode << 24) | _len) \ | 127 | is_shub2() ? BTE_CTRL_STORE(_bte, IBLS_BUSY | (_mode << 24) | _len) \ |