alpha: fix hae_cache race in RESTORE_ALL

We want interrupts disabled on all paths leading to RESTORE_ALL;
otherwise, we are risking an IRQ coming between the updates of
alpha_mv->hae_cache and *alpha_mv->hae_register and set_hae()
within the IRQ getting badly confused.

RESTORE_ALL used to play with disabling IRQ itself, but that got
removed back in 2002, without making sure we had them disabled
on all paths. It's cheaper to make sure we have them disabled than
to revert to original variant...

Remove the detritus left from that commit back in 2002; we used to
need a reload of $0 and $1 since swpipl would change those, but
doing that had become pointless when we stopped doing swpipl in
there...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Al Viro and committed by Linus Torvalds 77edffb6 56162bad

+7 -4
+7 -4
arch/alpha/kernel/entry.S
··· 73 ldq $20, HAE_REG($19); \ 74 stq $21, HAE_CACHE($19); \ 75 stq $21, 0($20); \ 76 - ldq $0, 0($sp); \ 77 - ldq $1, 8($sp); \ 78 99:; \ 79 ldq $19, 72($sp); \ 80 ldq $20, 80($sp); \ ··· 314 cmovne $26, 0, $19 /* $19 = 0 => non-restartable */ 315 ldq $0, SP_OFF($sp) 316 and $0, 8, $0 317 - beq $0, restore_all 318 ret_to_user: 319 /* Make sure need_resched and sigpending don't change between 320 sampling and the rti. */ ··· 326 restore_all: 327 RESTORE_ALL 328 call_pal PAL_rti 329 330 .align 3 331 $syscall_error: ··· 660 /* We don't actually care for a3 success widgetry in the kernel. 661 Not for positive errno values. */ 662 stq $0, 0($sp) /* $0 */ 663 - br restore_all 664 .end kernel_thread 665 666 /*
··· 73 ldq $20, HAE_REG($19); \ 74 stq $21, HAE_CACHE($19); \ 75 stq $21, 0($20); \ 76 99:; \ 77 ldq $19, 72($sp); \ 78 ldq $20, 80($sp); \ ··· 316 cmovne $26, 0, $19 /* $19 = 0 => non-restartable */ 317 ldq $0, SP_OFF($sp) 318 and $0, 8, $0 319 + beq $0, ret_to_kernel 320 ret_to_user: 321 /* Make sure need_resched and sigpending don't change between 322 sampling and the rti. */ ··· 328 restore_all: 329 RESTORE_ALL 330 call_pal PAL_rti 331 + 332 + ret_to_kernel: 333 + lda $16, 7 334 + call_pal PAL_swpipl 335 + br restore_all 336 337 .align 3 338 $syscall_error: ··· 657 /* We don't actually care for a3 success widgetry in the kernel. 658 Not for positive errno values. */ 659 stq $0, 0($sp) /* $0 */ 660 + br ret_to_kernel 661 .end kernel_thread 662 663 /*