From: Tony Luck <tony.luck@intel.com>
To: linux-ia64@vger.kernel.org
Subject: calling oem sal functions
Date: Thu, 19 Aug 2004 17:23:46 +0000 [thread overview]
Message-ID: <4124E222.2080105@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 484 bytes --]
Dean,
I've been thinking about this, and it does seem unresonable that there
is no way for an OEM written module to make a call to an OEM SAL function.
Would something like the (compiles, but untested) attached patch work
for you? The return value of 0/-1 just indicates whether the SAL call
was attempted. Callers should look at the status field of the isrvp
structure to determine the actual success of the call.
Would you also need "_nolock" and "_reentrant" versions?
-Tony
[-- Attachment #2: oemsal.patch --]
[-- Type: text/plain, Size: 711 bytes --]
===== arch/ia64/kernel/sal.c 1.11 vs edited =====
--- 1.11/arch/ia64/kernel/sal.c 2004-07-09 00:11:46 +00:00
+++ edited/arch/ia64/kernel/sal.c 2004-08-19 17:02:07 +00:00
@@ -10,6 +10,7 @@
#include <linux/kernel.h>
#include <linux/init.h>
+#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/string.h>
@@ -262,3 +263,15 @@
p += SAL_DESC_SIZE(*p);
}
}
+
+int
+oem_sal_call(struct ia64_sal_retval *isrvp, u64 oemfunc, u64 arg1, u64 arg2,
+ u64 arg3, u64 arg4, u64 arg5, u64 arg6, u64 arg7)
+{
+ if (oemfunc < 0x02000000 || oemfunc > 0x03ffffff)
+ return -1;
+ SAL_CALL(*isrvp, oemfunc, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
+ return 0;
+}
+
+EXPORT_SYMBOL(oem_sal_call);
next reply other threads:[~2004-08-19 17:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-19 17:23 Tony Luck [this message]
2004-08-19 17:29 ` calling oem sal functions Christoph Hellwig
2004-08-19 18:18 ` Robin Holt
2004-08-19 18:21 ` Christoph Hellwig
2004-08-19 18:29 ` Dean Nelson
2004-08-19 18:48 ` Jack Steiner
2004-08-19 19:48 ` Robin Holt
2004-08-19 22:14 ` John Lee
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=4124E222.2080105@intel.com \
--to=tony.luck@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox