summaryrefslogtreecommitdiffstats
path: root/usr.bin/mkesdb
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2011-12-21 11:49:33 +0000
committeravg <avg@FreeBSD.org>2011-12-21 11:49:33 +0000
commit7bd2d75f37bf175e19c8a11cd17e960b5186f779 (patch)
tree41b815f7dbe0f32a2726c7bfd034ecd6577fa840 /usr.bin/mkesdb
parent89ab30c75fb39b787137083c605fcb09563c2920 (diff)
downloadFreeBSD-src-7bd2d75f37bf175e19c8a11cd17e960b5186f779.zip
FreeBSD-src-7bd2d75f37bf175e19c8a11cd17e960b5186f779.tar.gz
ukbd: adjust for SCHEDULER_STOPPED() and overhaul locking code
This change is designed to let USB keyboard work in the panic context with stop_scheduler_on_panic=1. Most of change consists of removing mtx_owned() checks where they can be easily avoided. Some additional lock cleanup is performed along the way. A list of the smaller changes: - newbus methods should be executed with Giant already held, just assert this - kbd methods called in the non-polling context should be executed with Giant already held, just assert this - Giant is recursive, so we should just take it where we must have it, without redundant checks if we already have it - thanks to recent syscons changes we don't need to go through the hoops to detect if kernel is going to poll us; polling mode is now clearly separated from non-polling mode - at present the polling mode can be entered by only one thread - document special cases in greater detail Please note that the ukbd code and underlying USB code still lve dangerously in the kdb context by trying to obtain various locks including the Giant. If any of those locks are already held by the stopped threads, then the things would blow up. Another limitation of the ukbd driver is that it is detached before a system enters the halt state. With this commit we can enable kern.stop_scheduler_on_panic by default, that should not introduce any regressions. Reviewed by: hselasky MFC after: 3 months X-MFC after: r228424, r228760
Diffstat (limited to 'usr.bin/mkesdb')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud