Sort out i8253 and PC speaker locking and headers
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest14 patches 31 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/14 | i8253: Create <linux/i8253.h> and make all in kernel users to use it.arch/ arch/ arch/ +16 more | +29 | 2 replies | |
| 2/14 | i8253: Unify all kernel declarations of i8253_lock in <linux/i8253.h>.arch/ arch/ arch/ +1 more | +14 | 2 replies | |
| 3/14 | i8253: Consolidate all kernel definitions of i8253_lock in lib/i8253-lock.c.lib/ lib/ lib/ | +18 | 2 replies | |
| 4/14 | i8253: Make MIPS use the shared i8253_lock.arch/ arch/ | +1 | 0 replies | |
| 5/14 | i8253: Make x86 use the shared i8253_lock.arch/ arch/ | +1 | 0 replies | |
| 6/14 | i8253: Make pcspkr input driver use the shared i8253_lock.drivers/ | +1 | 2 replies | |
| 7/14 | i8253: Make pcsp sound driver use the shared i8253_lock.sound/ | +1 | 3 replies | |
| 8/14 | i8253: Alpha: Cleanup remaining users of i8253pit.harch/ arch/ | +0 | 2 replies | |
| 9/14 | i8253: Alpha, PowerPC: Remove unused <asm/8253pit.h> header.arch/ arch/ | +0 | 3 replies | |
| 10/14 | i8253: x86: Consolidate definitions of global_clock_eventarch/ arch/ arch/ +4 more | +8 | 2 replies | |
| 11/14 | i8253: Consolidate definitions of PIT_LATCHarch/ arch/ arch/ +1 more | +4 | 2 replies | |
| 12/14 | i8253: Move remaining content and delete <asm/i8253.h>arch/ arch/ arch/ +3 more | +6 | 3 replies | |
| 13/14 | PCSPKR: Cleanup Kconfig dependenciesarch/ arch/ arch/ +4 more | +10 | 3 replies | |
| 14/14 | PCSPKR: MIPS: Make config dependencies finer grained.arch/ | +3 | 2 replies |
Reviews trailers per patch
3 of 14 patches have a Reviewed-by or Acked-by.
| Patch | Takashi Iwai | Benjamin Herrenschmidt |
|---|---|---|
| 1/14 | ||
| 2/14 | ||
| 3/14 | ||
| 4/14 | ||
| 5/14 | ||
| 6/14 | ||
| 7/14 | A-b A-b A-b | |
| 8/14 | ||
| 9/14 | A-b A-b | |
| 10/14 | ||
| 11/14 | ||
| 12/14 | ||
| 13/14 | A-b A-b A-b | |
| 14/14 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [patch 00/14] Sort out i8253 and PC speaker locking and headers
No longer terribly relevant these days but still broken and just an eyesore mess of neglience just as I've already raised it a few days ago. Time to sort this.
drivers/input/misc/pcspkr.c:
#if defined(CONFIG_MIPS) || defined(CONFIG_X86)
/* Use the global PIT lock ! */
#include <asm/i8253.h>
#else
#include <asm/8253pit.h>
static DEFINE_RAW_SPINLOCK(i8253_lock);
#endif
sound/drivers/pcsp/pcsp.h:
#if defined(CONFIG_MIPS) || defined(CONFIG_X86)
/* Use the global PIT lock ! */
#include <asm/i8253.h>
#else
#include <asm/8253pit.h>
static DEFINE_RAW_SPINLOCK(i8253_lock);
$ git grep -F pcsp.h sound/drivers/pcsp sound/drivers/pcsp/pcsp.c:#include "pcsp.h" sound/drivers/pcsp/pcsp_input.c:#include "pcsp.h" sound/drivers/pcsp/pcsp_lib.c:#include "pcsp.h" sound/drivers/pcsp/pcsp_mixer.c:#include "pcsp.h" $ git grep -w i8253_lock sound/drivers/pcsp/ sound/drivers/pcsp/pcsp.h:static DEFINE_RAW_SPINLOCK(i8253_lock); sound/drivers/pcsp/pcsp_input.c: raw_spin_lock_irqsave(&i8253_lock, flags sound/drivers/pcsp/pcsp_input.c: raw_spin_unlock_irqrestore(&i8253_lock, sound/drivers/pcsp/pcsp_lib.c: raw_spin_lock_irqsave(&i8253_lock, flags sound/drivers/pcsp/pcsp_lib.c: raw_spin_unlock_irqrestore(&i8253_lock, sound/drivers/pcsp/pcsp_lib.c: raw_spin_lock(&i8253_lock); sound/drivers/pcsp/pcsp_lib.c: raw_spin_unlock(&i8253_lock); sound/drivers/pcsp/pcsp_lib.c: raw_spin_lock(&i8253_lock); sound/drivers/pcsp/pcsp_lib.c: raw_spin_unlock(&i8253_lock);
Locks are great, everybody should have their own lock!
$ find . -name 8253pit.h ./arch/powerpc/include/asm/8253pit.h ./arch/alpha/include/asm/8253pit.h $ cat arch/*/include/asm/8253pit.h /* * 8253/8254 Programmable Interval Timer */ /* * 8253/8254 Programmable Interval Timer */ $
Eh...
$ git grep -w PCSPKR_PLATFORM arch/mips/Kconfig: select PCSPKR_PLATFORM arch/mips/Kconfig: select PCSPKR_PLATFORM arch/mips/Kconfig: select PCSPKR_PLATFORM arch/powerpc/platforms/amigaone/Kconfig: select PCSPKR_PLATFORM drivers/input/misc/Kconfig: depends on PCSPKR_PLATFORM init/Kconfig:config PCSPKR_PLATFORM sound/drivers/Kconfig: depends on PCSPKR_PLATFORM && X86 && HIGH_RES_TIMERS
So the status is:
Alpha: There is no PCSPKR_PLATFORM so while a platform device is
being installed no drivers will be built. I don't know which Alpha platforms or even if all of Alpha should be doing a PCSPKR_PLATFORM so I haven't even tried to sort this.
ARM: No PC speaker supported, yeah :)
PowerPC: Should compile but the locking is wrong but only the AmigaOne
platforms should be affected.
MIPS: Ok.
x86: Ok.
All others: No PC speaker supported
Also only the plain old IBM PC XT was using a i8253; every later system had i8254. So maybe this is the time for renaming the support code?
Ralf