Discussion:
SMP DevHlps supported on all kernels (of newer date) ?
(too old to reply)
Lars Erdmann
2008-05-30 19:52:48 UTC
Permalink
Raw Message
Hallo,

does anyone know if the DevHelps that were introduced with SMP:
DevHlp_CreateSpinLock 79h
DevHlp_FreeSpinLock 7Ah
DevHlp_AcquireSpinLock 71h
DevHlp_ReleaseSpinLock 72h
DevHlp_Port_IO
DevHlp_GetIRQMask
DevHlp_SetIRQMask

are available in all (later) kernels: Warp4, UNI, SMP ?
With "later" I mean kernels with High memory support, for Warp 4 kernel for
example, kernels >= fixpak13.

Lars
scott g
2008-06-03 16:18:25 UTC
Permalink
Raw Message
Post by Lars Erdmann
DevHlp_CreateSpinLock 79h
DevHlp_FreeSpinLock 7Ah
DevHlp_AcquireSpinLock 71h
DevHlp_ReleaseSpinLock 72h
DevHlp_Port_IO
DevHlp_GetIRQMask
DevHlp_SetIRQMask
are available in all (later) kernels: Warp4, UNI, SMP ?
With "later" I mean kernels with High memory support, for Warp 4 kernel for
example, kernels >= fixpak13.
Yes, I know.

regards, Scott

p.s. the answer is yes, though I can't imagine why anyone would need to use
these functions for 95% of device drivers
Ruediger Ihle
2008-06-07 08:53:36 UTC
Permalink
Raw Message
On Tue, 3 Jun 2008 16:18:25 UTC, scott g
<scottegos2-***@sbcglobal.boguspart.net> wrote:

Hi Scott,
Post by scott g
p.s. the answer is yes, though I can't imagine why anyone
would need to use these functions for 95% of device drivers
It's probably more a question of compatibility between drivers
written for 2.11 SMP and current kernels...

BTW, how are the spinlocks introduced in KEE related to those
managed by DevHlp_xxxxSpinLock ? Does KEE just provide a thunking
layer for those or does it have it's own spinlock implementation ?
--
Ruediger "Rudi" Ihle [S&T Systemtechnik GmbH, Germany]
http://www.s-t.de
Please remove all characters left of the "R" in my email address
scott g
2008-06-13 23:53:14 UTC
Permalink
Raw Message
Post by Ruediger Ihle
It's probably more a question of compatibility between drivers
written for 2.11 SMP and current kernels...
Yes, that's what Lars intimates
Post by Ruediger Ihle
BTW, how are the spinlocks introduced in KEE related to those
managed by DevHlp_xxxxSpinLock ? Does KEE just provide a thunking
layer for those ...
Yes, exactly. It's just thunking.

Basically, CLI and STI will work fine exactly for the reason someone or other
mentioned in some other post -- at the time there was a lot of concern about
breaking existing drivers that used that mechanism. Basically, there are a
couple of spinlocks (the R0spinlock and one other, whose name I forget) that get
grabbed on behalf of drivers and kernel code. You really only need to mess with
spinlocks, etc. on rare occasions -- mainly having to do with the 32 bit filesys
code, if I recall correctly.

The same comment is NOT true, though for doing EOI -- you really do want to use
DH_EOI rather than just writing to whatever port that was (I forget). Also the
Port_IO call is worth using. The rest of them are pretty irrelevant unless
you're doing kbd/mouse (maybe), DASD drivers (at least ones that support
StratIII interface) and 32 bit FSDs.

Of course, after several years, I might be forgetting something. :-)

-Scott

Lars Erdmann
2008-06-13 21:36:53 UTC
Permalink
Raw Message
Hallo,

thanks for your answer:

1.) I know that you know about the different kernels but maybe it was
not clear for others ...
2.) For the spinlock devhelps I thought it would still be necessary to
use them to serialize access to a resource instead of using cli/sti. Or
has the newer SMP kernel made this superfluous compared to the old OS/2
2.11 SMP kernel and cli/sti will do the job just as it did for single
processor systems ?
3.) for Port_IO, GetIRQMask, SetIRQMask question was just out of curiousity.

Lars
Post by scott g
Post by Lars Erdmann
DevHlp_CreateSpinLock 79h
DevHlp_FreeSpinLock 7Ah
DevHlp_AcquireSpinLock 71h
DevHlp_ReleaseSpinLock 72h
DevHlp_Port_IO
DevHlp_GetIRQMask
DevHlp_SetIRQMask
are available in all (later) kernels: Warp4, UNI, SMP ?
With "later" I mean kernels with High memory support, for Warp 4
kernel for example, kernels >= fixpak13.
Yes, I know.
regards, Scott
p.s. the answer is yes, though I can't imagine why anyone would need to
use these functions for 95% of device drivers
Loading...