HomeFreeBSD

kbd: replace vestigial spl calls with Giant assertions

Description

kbd: replace vestigial spl calls with Giant assertions

The keyboard driver was initially protected via spl* interrupt priority
calls but (as part of a comprehensive effort) migrated to use the Giant
lock (mutex).

The spl calls left behind became NOPs but they can be confusing as they
have no bearing on the actual mutual exclusion that is now present.

Remove them from kbd and add assertions that Giant is held. markj notes
that there is conflation between the "bus topo" lock (which is Giant
under the hood) and Giant. The assertions could either be addressed as
a small item along with bus topology locking work or they'll be removed
if kbd is decoupled from Giant.

PR: 206680
Reviewed by: markj
MFC after: 3 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34645

(cherry picked from commit a0cd78bf2c148d7ab63454471771e3f4b572522f)

Details

Provenance
emasteAuthored on Mar 22 2022, 5:48 PM
Reviewer
markj
Differential Revision
D34645: kbd: replace vestigial spl calls with Giant assertions
Parents
rG421c2f93a4e0: net: Fix memory leaks in lltable_calc_llheader() error paths
Branches
Unknown
Tags
Unknown