Date: Fri, 24 Apr 2026 16:24:43 +0000 From: Warner Losh <imp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Raphael Poss <knz@thaumogen.net> Subject: git: 43b7cf42d425 - main - speaker(4): drop NEEDGIANT Message-ID: <69eb994b.3aecd.383c3505@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=43b7cf42d425abc84a1313b7eed933438804a051 commit 43b7cf42d425abc84a1313b7eed933438804a051 Author: Raphael Poss <knz@thaumogen.net> AuthorDate: 2025-12-10 20:12:22 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2026-04-24 16:23:06 +0000 speaker(4): drop NEEDGIANT When the frequency configuration logic was moved to clock.c in 2008, a mutex lock was added there (timer_spkr_setfreq) to serialize accesses to the I/O register. Since then, no more calls to disable/enable_intr were needed in spkr.c than they were needed in the other callers to the same timer_spkr functions in syscons / kern_cons, that is, not at all. This is because there are no other accesses remaining in the kernel to the i8254 timers after boot than through clock.c. For context, see commits e46598588587b4897f6604489364f83fffd4d033 and 93f5134aaf829826dbcbea457bfeb27389761854. Signed-off-by: Raphael Poss <knz@thaumogen.net> Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1922 --- sys/dev/speaker/spkr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c index 2cdbbd43ff6e..85789c107336 100644 --- a/sys/dev/speaker/spkr.c +++ b/sys/dev/speaker/spkr.c @@ -24,7 +24,7 @@ static d_ioctl_t spkrioctl; static struct cdevsw spkr_cdevsw = { .d_version = D_VERSION, - .d_flags = D_NEEDGIANT, + .d_flags = 0, .d_open = spkropen, .d_close = spkrclose, .d_write = spkrwrite, @@ -78,10 +78,8 @@ tone(unsigned int thz, unsigned int centisecs) if (timer_spkr_acquire()) { return; } - disable_intr(); /* Configure the speaker with the tone frequency. */ timer_spkr_setfreq(thz); - enable_intr(); /* * Make the current thread sleep while the tone is beinghome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69eb994b.3aecd.383c3505>
