* [Linux-ia64] [PATCH] sal calls w/o taking sal_lock
@ 2003-04-01 18:06 Jesse Barnes
0 siblings, 0 replies; only message in thread
From: Jesse Barnes @ 2003-04-01 18:06 UTC (permalink / raw)
To: linux-ia64
This patch adds SAL_CALL_NOLOCK so that platforms may call the SAL
without taking a lock, if appropriate. The ia64_sal_mc_rendez() has
been changed to use it, since it won't return until all CPUs have been
rendevoused by the SAL, if I understand correctly. It's also used by
various SN specific SAL routines that access the system controllers
and might be useful to other plaforms.
Thanks,
Jesse
diff -Naur -X /usr/people/jbarnes/dontdiff linux-2.5.64-ia64/include/asm-ia64/sal.h linux-2.5.64-salcallnolock/include/asm-ia64/sal.h
--- linux-2.5.64-ia64/include/asm-ia64/sal.h Fri Mar 7 16:02:45 2003
+++ linux-2.5.64-salcallnolock/include/asm-ia64/sal.h Tue Apr 1 09:56:02 2003
@@ -46,6 +46,16 @@
ia64_load_scratch_fpregs(fr); \
} while (0)
+# define SAL_CALL_NOLOCK(result,args...) do { \
+ unsigned long flags; \
+ struct ia64_fpreg fr[6]; \
+ ia64_save_scratch_fpregs(fr); \
+ local_irq_save(flags); \
+ __SAL_CALL(result,args); \
+ local_irq_restore(flags); \
+ ia64_load_scratch_fpregs(fr); \
+} while (0)
+
#define SAL_SET_VECTORS 0x01000000
#define SAL_GET_STATE_INFO 0x01000001
#define SAL_GET_STATE_INFO_SIZE 0x01000002
@@ -685,14 +695,15 @@
}
/*
- * Causes the processor to go into a spin loop within SAL where SAL awaits a wakeup from
- * the monarch processor.
+ * Causes the processor to go into a spin loop within SAL where SAL awaits a wakeup
+ * from the monarch processor. Must not lock, this will not return on any cpu until
+ * the monarch processor sends a wake up.
*/
static inline s64
ia64_sal_mc_rendez (void)
{
struct ia64_sal_retval isrv;
- SAL_CALL(isrv, SAL_MC_RENDEZ, 0, 0, 0, 0, 0, 0, 0);
+ SAL_CALL_NOLOCK(isrv, SAL_MC_RENDEZ, 0, 0, 0, 0, 0, 0, 0);
return isrv.status;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-04-01 18:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-01 18:06 [Linux-ia64] [PATCH] sal calls w/o taking sal_lock Jesse Barnes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox