Skip to contentSkip to conversation

Prevent SAL calls from being preempted

PATCH New Bjorn Helgaas 1 participant 1 message Dec 18, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Prevent SAL calls from being preempted

ia64: Prevent SAL calls from being preempted.

(SAL_CALL_REENTRANT): Disable preemption around the SAL call to
make sure we don't get rescheduled on a different CPU.

=== include/asm-ia64/sal.h 1.19 vs edited ==--- 1.19/include/asm-ia64/sal.h Sat Aug 16 18:31:13 2003
+++ edited/include/asm-ia64/sal.h Wed Dec 10 14:10:04 2003
@@ -71,7 +71,9 @@

 # define SAL_CALL_REENTRANT(result,args...) do {	\
 	struct ia64_fpreg __ia64_scs_fr[6];		\
 	ia64_save_scratch_fpregs(__ia64_scs_fr);	\
+	preempt_disable();				\
 	__SAL_CALL(result, args);			\
+	preempt_enable();				\
 	ia64_load_scratch_fpregs(__ia64_scs_fr);	\
 } while (0)