tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: giantlock support




> On Jan 15, 2020, at 9:10 AM, Mouse <mouse%Rodents-Montreal.ORG@localhost> wrote:
> 
> Does 8.0 still support giantlocked drivers?  I'm trying to port a
> driver from 5.2 to 8.0, and it has a comment saying "This locks against
> itself with splhigh().  This essentially depends on either (a) the
> machine being uniprocessor or (b) it running giantlocked.  This needs
> some love from someone who actually understands NetBSD's MP locking
> DKI.".

There are lots of non-MP-safe drivers in the tree currently, and the big kernel lock will be automatically acquired when their interrupt handlers are called.

Eventually this will no longer be the case, but we are not there yet.

> ...but I am not that someone.  I'm wondering if I can get away with
> just leaving it non-MPSAFE.  I note that there are still MPSAFE defines
> around, but that doesn't necessarily mean leaving them out actually
> works.
> 
> For that matter, is the comment even correct that splhigh() works for
> non-MPSAFE drivers?  It sounds dodgy to me to assume giantlocking works
> between interrupt handlers and the main line.  (In case it matters,
> it's a PCI/PCIe device, and amd64 is the only port I care about here;
> this is, of course, for work.)
> 
> /~\ The ASCII				  Mouse
> \ / Ribbon Campaign
> X  Against HTML		mouse%rodents-montreal.org@localhost
> / \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

-- thorpej



Home | Main Index | Thread Index | Old Index