x86, UV: Correct BAU software acknowledge

Correct the acknowledgment and the reset of a BAU
software-acknowledged message.

A retry message should be testing only for timed-out resources
(mask << 8). (And we delete a log message that might cause
unnecessary concern) The acknowledge MMR is
|--timed-out--|---pending--|, each is 8 bits.

The IPI-driven reset of software acknowledge resources frees
both timed out and pending resources.

Signed-off-by: Cliff Wickman <cpw@sgi.com>
Cc: gregkh@suse.de
LKML-Reference: <E1OJvNy-0004aP-7O@eag09.americas.sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by Cliff Wickman and committed by Ingo Molnar 39847e7f 4faca155

+8 -9
+8 -9
arch/x86/kernel/tlb_uv.c
··· 161 slot2 = msg2 - mdp->va_queue_first; 162 mmr = uv_read_local_mmr 163 (UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE); 164 - msg_res = ((msg2->sw_ack_vector << 8) | 165 - msg2->sw_ack_vector); 166 /* 167 * This is a message retry; clear the resources held 168 * by the previous message only if they timed out. 169 * If it has not timed out we have an unexpected 170 * situation to report. 171 */ 172 - if (mmr & (msg_res << 8)) { 173 /* 174 * is the resource timed out? 175 * make everyone ignore the cancelled message. ··· 178 cancel_count++; 179 uv_write_local_mmr( 180 UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_ALIAS, 181 - (msg_res << 8) | msg_res); 182 - } else 183 - printk(KERN_INFO "note bau retry: no effect\n"); 184 } 185 } 186 if (!cancel_count) ··· 316 */ 317 mmr = uv_read_local_mmr 318 (UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE); 319 - msg_res = ((msg->sw_ack_vector << 8) | 320 - msg->sw_ack_vector); 321 if (mmr & msg_res) { 322 stat->d_rcanceled++; 323 uv_write_local_mmr( 324 UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_ALIAS, 325 - msg_res); 326 } 327 } 328 }
··· 161 slot2 = msg2 - mdp->va_queue_first; 162 mmr = uv_read_local_mmr 163 (UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE); 164 + msg_res = msg2->sw_ack_vector; 165 /* 166 * This is a message retry; clear the resources held 167 * by the previous message only if they timed out. 168 * If it has not timed out we have an unexpected 169 * situation to report. 170 */ 171 + if (mmr & (msg_res << UV_SW_ACK_NPENDING)) { 172 /* 173 * is the resource timed out? 174 * make everyone ignore the cancelled message. ··· 179 cancel_count++; 180 uv_write_local_mmr( 181 UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_ALIAS, 182 + (msg_res << UV_SW_ACK_NPENDING) | 183 + msg_res); 184 + } 185 } 186 } 187 if (!cancel_count) ··· 317 */ 318 mmr = uv_read_local_mmr 319 (UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE); 320 + msg_res = msg->sw_ack_vector; 321 if (mmr & msg_res) { 322 stat->d_rcanceled++; 323 uv_write_local_mmr( 324 UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_ALIAS, 325 + (msg_res << UV_SW_ACK_NPENDING) | 326 + msg_res); 327 } 328 } 329 }