diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-ia64/sn/bte.h | 23 |
1 files changed, 19 insertions, 4 deletions
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) \ |