sal calls w/o taking sal_lock
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Jesse Barnes
Jesse> This patch adds SAL_CALL_NOLOCK so that platforms may call the SAL Jesse> without taking a lock, if appropriate. The ia64_sal_mc_rendez() has Jesse> been changed to use it, since it won't return until all CPUs have been Jesse> rendevoused by the SAL, if I understand correctly. It's also used by Jesse> various SN specific SAL routines that access the system controllers Jesse> and might be useful to other plaforms.
http://lia64.bkbits.net:8080/to-linus-2.5/[email protected]?nav=index.html
--david
Quoted 8 lines · David Mosberger
Jesse> This patch adds
SAL_CALL_NOLOCKso that platforms may call the SAL Jesse> without taking a lock, if appropriate. Theia64_sal_mc_rendez()has Jesse> been changed to use it, since it won't return until all CPUs have been Jesse> rendevoused by the SAL, if I understand correctly. It's also used by Jesse> various SN specific SAL routines that access the system controllers Jesse> and might be useful to other plaforms.http://lia64.bkbits.net:8080/to-linus-2.5/[email protected]?nav=index.html
Oops! That's what I get for not checking bkbits before I post something... Anyway, glad it's there.
Thanks,
Jesse
Quoted 10 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Jesse Barnes
Jesse> This patch adds
SAL_CALL_NOLOCKso that platforms may call the SAL Jesse> without taking a lock, if appropriate. Theia64_sal_mc_rendez()has Jesse> been changed to use it, since it won't return until all CPUs have been Jesse> rendevoused by the SAL, if I understand correctly. It's also used by Jesse> various SN specific SAL routines that access the system controllers Jesse> and might be useful to other plaforms.http://lia64.bkbits.net:8080/to-linus-2.5/[email protected]?nav=index.html
I do not understand why you renamed the variables. The SAL code is enclosed in do { } while(); All variables within {} are local, they do not need unique names.
Quoted 3 lines
I do not understand why you renamed the variables. The SAL code is enclosed in do { }
while(); All variables within {} are local, they do not need unique names.
What happens to this:
#define foo(arg) do { int flag; arg = flag; } while (0)
If I do this:
foo(flag);
Answer:
do { int flag; flag = flag; } while (0);Does his change make more sense now?
Kevin
Quoted 10 lines · Kevin
Quoted 3 lines
I do not understand why you renamed the variables. The SAL code is enclosed in do { }
while(); All variables within {} are local, they do not need unique names.What happens to this:
#define foo(arg) do { int flag; arg = flag; } while (0)
If I do this:
Quoted 7 lines
foo(flag);Answer:
do { int flag; flag = flag; } while (0);Does his change make more sense now?
You get around that by using __flags in the macro. You do not need __ia64_sc_flags in SAL_CALL() and a different __ia64_scn_flags in SAL_CALL_NOLOCK(). The old SAL_CALL() code has been there since IA64 was released and has never had any problems with name scopes.
Keith Owens <[email protected]> writes:
|> I do not understand why you renamed the variables. The SAL code is
|> enclosed in do { } while(); All variables within {} are local, they do
|> not need unique names.Now consider what happens when you have a reference to a variable named flags or fr in one of the macro arguments.
Andreas.
Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected] SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."