Skip to contentSkip to conversation

calling oem sal functions

PATCH Tony Luck 6 participants 8 messages Aug 19, 2004

lore
Share & tools
lore

Tony Luck

author
#0 lore raw

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

===== arch/ia64/kernel/sal.c 1.11 vs edited =====

arch/ia64/kernel/sal.c +13 -0
@@ -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);
#1 lore raw
Quoted 11 lines · Tony Luck

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?

Please make the exports _GPL so we have the callers under rcontrol.

#2 lore raw
In reply to Tony Luck
Quoted 6 lines · Christoph Hellwig
Quoted 5 lines · Tony Luck

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.

Quoted 8 lines
Quoted 6 lines

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?

Please make the exports _GPL so we have the callers under rcontrol.

If you make them GPL, it makes the call useless to SGI. Some of our tests suites have the problem description we are testing for and the resolution. This may include vendor specific or customer specific data which is not disclosable. Some of the vendor specific tests are likewise covered by NDA. I understand you would love to have everything _GPL, but that is unreasonable.

All that is being provided here is a gateway to SAL. How much value is the kernel community adding.

Tony, please carefully consider the _GPL.

Thanks,
Robin Holt

#3 lore raw
In reply to Tony Luck
Quoted 6 lines · Robin Holt

If you make them GPL, it makes the call useless to SGI. Some of our tests suites have the problem description we are testing for and the resolution. This may include vendor specific or customer specific data which is not disclosable. Some of the vendor specific tests are likewise covered by NDA. I understand you would love to have everything _GPL, but that is unreasonable.

Huh? As long as you use your testsuite only internally the GPL doesn't matter. It only kicks in as soon as you distribute something.

Quoted 1 line

Tony, please carefully consider the _GPL.

This is talking directly to the SAL layer, something that should be reserved to OS internals.

#4 lore raw
In reply to Tony Luck
Quoted 11 lines · Tony Luck

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?

Yes, it would certainly do the trick. And yes, we would need all three versions.

Did you want me to finish developing this patch and submit it with my stuff, or were you planning on taking it to completion?

Thanks,
Dean

#5 lore raw
In reply to Tony Luck
Quoted 6 lines · Christoph Hellwig
Quoted 5 lines · Tony Luck

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.

Quoted 8 lines
Quoted 6 lines

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?

Please make the exports _GPL so we have the callers under rcontrol.

SGI uses OEM_SAL calls in some of it's online diagnostics. These diagnostics are run on production systems, both in the factory and at customer sites. If the SAL call interface is marked _GPL, then these diagnostics cant be run on standard kernels.

Since the OEM_SAL call interface restricts SAL calls to the OEM range of function codes, I dont understand why these calls should be GPL'ed.

Signature · 4 lines
Thanks

Jack Steiner ([email protected])          651-683-5302
Principal Engineer                      SGI - Silicon Graphics, Inc.
#6 lore raw
In reply to Tony Luck
Quoted 10 lines · Christoph Hellwig
Quoted 6 lines · Robin Holt

If you make them GPL, it makes the call useless to SGI. Some of our tests suites have the problem description we are testing for and the resolution. This may include vendor specific or customer specific data which is not disclosable. Some of the vendor specific tests are likewise covered by NDA. I understand you would love to have everything _GPL, but that is unreasonable.

Huh? As long as you use your testsuite only internally the GPL doesn't matter. It only kicks in as soon as you distribute something.

The test suites are part of our online diagnostics. We normally have the field support or customer run the diagnostics to identify the source of the problem.

Quoted 5 lines
Quoted 2 lines

Tony, please carefully consider the _GPL.

This is talking directly to the SAL layer, something that should be reserved to OS internals.

IIRC, the SAL calls that diags make do stuff like change hardware error timeout settings, hardware request queue sizes, voltage thresholds, and retry limits so that even slightly marginal hardware becomes extermely likely to fail.

Userland then uses normal kernel mechanism to excercise the portion under test (eg: ping-pong a cacheline between two nodes) to attempt to force an error.

All the error indications we are looking for use the normal kernel paths. We are just setting the hardware up for the maximum probability for failure.

Again Tony, please consider carefully the effect of putting _GPL on these exports.

Thanks,
Robin

#7 lore raw
In reply to Tony Luck
Quoted 4 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Robin Holt

...

Quoted 3 lines · Christoph Hellwig
Quoted 1 line · Tony Luck

....

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Would you also need "_nolock" and "_reentrant" versions?

Yes, that would be perfect.

Quoted 10 lines
Quoted 2 lines

Please make the exports _GPL so we have the callers under rcontrol.

If you make them GPL, it makes the call useless to SGI. Some of our tests suites have the problem description we are testing for and the resolution. This may include vendor specific or customer specific data which is not disclosable. Some of the vendor specific tests are likewise covered by NDA. I understand you would love to have everything _GPL, but that is unreasonable.

Quoted 5 lines

All that is being provided here is a gateway to SAL. How much value is the kernel community adding.

Tony, please carefully consider the _GPL.

I have to second to this.

John
Platform Solutions