diff options
Diffstat (limited to 'drivers/misc/sgi-xp/xpc_uv.c')
-rw-r--r-- | drivers/misc/sgi-xp/xpc_uv.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/drivers/misc/sgi-xp/xpc_uv.c b/drivers/misc/sgi-xp/xpc_uv.c index b5bbe59f9c57..bbf0e2ee6fd9 100644 --- a/drivers/misc/sgi-xp/xpc_uv.c +++ b/drivers/misc/sgi-xp/xpc_uv.c | |||
@@ -157,22 +157,24 @@ xpc_gru_mq_watchlist_alloc_uv(struct xpc_gru_mq_uv *mq) | |||
157 | { | 157 | { |
158 | int ret; | 158 | int ret; |
159 | 159 | ||
160 | #if defined CONFIG_X86_64 | 160 | #if defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV |
161 | ret = uv_bios_mq_watchlist_alloc(mq->mmr_blade, uv_gpa(mq->address), | 161 | int mmr_pnode = uv_blade_to_pnode(mq->mmr_blade); |
162 | mq->order, &mq->mmr_offset); | 162 | |
163 | if (ret < 0) { | 163 | ret = sn_mq_watchlist_alloc(mmr_pnode, (void *)uv_gpa(mq->address), |
164 | dev_err(xpc_part, "uv_bios_mq_watchlist_alloc() failed, " | ||
165 | "ret=%d\n", ret); | ||
166 | return ret; | ||
167 | } | ||
168 | #elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV | ||
169 | ret = sn_mq_watchlist_alloc(mq->mmr_blade, (void *)uv_gpa(mq->address), | ||
170 | mq->order, &mq->mmr_offset); | 164 | mq->order, &mq->mmr_offset); |
171 | if (ret < 0) { | 165 | if (ret < 0) { |
172 | dev_err(xpc_part, "sn_mq_watchlist_alloc() failed, ret=%d\n", | 166 | dev_err(xpc_part, "sn_mq_watchlist_alloc() failed, ret=%d\n", |
173 | ret); | 167 | ret); |
174 | return -EBUSY; | 168 | return -EBUSY; |
175 | } | 169 | } |
170 | #elif defined CONFIG_X86_64 | ||
171 | ret = uv_bios_mq_watchlist_alloc(uv_gpa(mq->address), | ||
172 | mq->order, &mq->mmr_offset); | ||
173 | if (ret < 0) { | ||
174 | dev_err(xpc_part, "uv_bios_mq_watchlist_alloc() failed, " | ||
175 | "ret=%d\n", ret); | ||
176 | return ret; | ||
177 | } | ||
176 | #else | 178 | #else |
177 | #error not a supported configuration | 179 | #error not a supported configuration |
178 | #endif | 180 | #endif |
@@ -185,12 +187,13 @@ static void | |||
185 | xpc_gru_mq_watchlist_free_uv(struct xpc_gru_mq_uv *mq) | 187 | xpc_gru_mq_watchlist_free_uv(struct xpc_gru_mq_uv *mq) |
186 | { | 188 | { |
187 | int ret; | 189 | int ret; |
190 | int mmr_pnode = uv_blade_to_pnode(mq->mmr_blade); | ||
188 | 191 | ||
189 | #if defined CONFIG_X86_64 | 192 | #if defined CONFIG_X86_64 |
190 | ret = uv_bios_mq_watchlist_free(mq->mmr_blade, mq->watchlist_num); | 193 | ret = uv_bios_mq_watchlist_free(mmr_pnode, mq->watchlist_num); |
191 | BUG_ON(ret != BIOS_STATUS_SUCCESS); | 194 | BUG_ON(ret != BIOS_STATUS_SUCCESS); |
192 | #elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV | 195 | #elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV |
193 | ret = sn_mq_watchlist_free(mq->mmr_blade, mq->watchlist_num); | 196 | ret = sn_mq_watchlist_free(mmr_pnode, mq->watchlist_num); |
194 | BUG_ON(ret != SALRET_OK); | 197 | BUG_ON(ret != SALRET_OK); |
195 | #else | 198 | #else |
196 | #error not a supported configuration | 199 | #error not a supported configuration |