From: Jesse Barnes <jbarnes@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] [PATCH] sal calls w/o taking sal_lock
Date: Tue, 01 Apr 2003 18:06:44 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590723705376@msgid-missing> (raw)
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;
}
reply other threads:[~2003-04-01 18:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-ia64-105590723705376@msgid-missing \
--to=jbarnes@sgi.com \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.