Sort out i8253 and PC speaker locking and headers
Subsystems (16)
cover 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
PATCH 1/14 i8253: Create <linux/i8253.h> and make all in kernel users to use it.
To: [email protected]
Cc: Ralf Baechle <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: [email protected]
Cc: John Stultz <[email protected]>
Cc: [email protected]
arch/arm/mach-footbridge/isa-timer.c | 2 +- arch/mips/cobalt/time.c | 2 +- arch/mips/jazz/irq.c | 2 +- arch/mips/kernel/i8253.c | 2 +- arch/mips/mti-malta/malta-time.c | 2 +- arch/mips/sgi-ip22/ip22-time.c | 2 +- arch/mips/sni/time.c | 2 +- arch/x86/kernel/apic/apic.c | 2 +- arch/x86/kernel/apm_32.c | 2 +- arch/x86/kernel/hpet.c | 2 +- arch/x86/kernel/i8253.c | 2 +- arch/x86/kernel/time.c | 2 +- drivers/block/hd.c | 2 +- drivers/clocksource/i8253.c | 2 +- drivers/input/gameport/gameport.c | 2 +- drivers/input/joystick/analog.c | 2 +- drivers/input/misc/pcspkr.c | 2 +- include/linux/i8253.h | 11 +++++++++++ sound/drivers/pcsp/pcsp.h | 2 +- 19 files changed, 29 insertions(+), 18 deletions(-)
include/linux/i8253.h new file +11 -0
@@ -0,0 +1,11 @@ +/* +* This file is subject to the terms and conditions of the GNU General Public +* License. See the file "COPYING" in the main directory of this archive +* for more details. +*/ +#ifndef __LINUX_I8253_H +#define __LINUX_I8253_H + +#include <asm/i8253.h> + +#endif /* __LINUX_I8253_H */
arch/arm/mach-footbridge/isa-timer.c +1 -1
@@ -6,6 +6,7 @@*/ #include <linux/clockchips.h> #include <linux/clocksource.h> +#include <linux/i8253.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/irq.h>
@@ -14,7 +15,6 @@#include <linux/timex.h> #include <asm/irq.h> -#include <asm/i8253.h> #include <asm/mach/time.h> #include "common.h"
arch/mips/cobalt/time.c +1 -1
@@ -17,10 +17,10 @@* along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include <linux/i8253.h> #include <linux/init.h> #include <asm/gt64120.h> -#include <asm/i8253.h> #include <asm/time.h> #define GT641XX_BASE_CLOCK 50000000/* 50MHz */
arch/mips/jazz/irq.c +1 -1
@@ -7,6 +7,7 @@* Copyright (C) 1994 - 2001, 2003, 07 Ralf Baechle */ #include <linux/clockchips.h> +#include <linux/i8253.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/kernel.h>
@@ -15,7 +16,6 @@#include <linux/irq.h> #include <asm/irq_cpu.h> -#include <asm/i8253.h> #include <asm/i8259.h> #include <asm/io.h> #include <asm/jazz.h>
arch/mips/kernel/i8253.c +1 -1
@@ -3,6 +3,7 @@* */ #include <linux/clockchips.h> +#include <linux/i8253.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/jiffies.h>
@@ -12,7 +13,6 @@#include <linux/irq.h> #include <asm/delay.h> -#include <asm/i8253.h> #include <asm/io.h> #include <asm/time.h>
arch/mips/mti-malta/malta-time.c +1 -1
@@ -19,6 +19,7 @@*/ #include <linux/types.h> +#include <linux/i8253.h> #include <linux/init.h> #include <linux/kernel_stat.h> #include <linux/sched.h>
@@ -31,7 +32,6 @@#include <asm/mipsregs.h> #include <asm/mipsmtregs.h> #include <asm/hardirq.h> -#include <asm/i8253.h> #include <asm/irq.h> #include <asm/div64.h> #include <asm/cpu.h>
arch/mips/sgi-ip22/ip22-time.c +1 -1
@@ -10,6 +10,7 @@* Copyright (C) 2003, 06 Ralf Baechle ([email protected]) */ #include <linux/bcd.h> +#include <linux/i8253.h> #include <linux/init.h> #include <linux/irq.h> #include <linux/kernel.h>
@@ -20,7 +21,6 @@#include <asm/cpu.h> #include <asm/mipsregs.h> -#include <asm/i8253.h> #include <asm/io.h> #include <asm/irq.h> #include <asm/time.h>
arch/mips/sni/time.c +1 -1
@@ -1,11 +1,11 @@#include <linux/types.h> +#include <linux/i8253.h> #include <linux/interrupt.h> #include <linux/irq.h> #include <linux/smp.h> #include <linux/time.h> #include <linux/clockchips.h> -#include <asm/i8253.h> #include <asm/sni.h> #include <asm/time.h> #include <asm-generic/rtc.h>
arch/x86/kernel/apic/apic.c +1 -1
@@ -27,6 +27,7 @@#include <linux/syscore_ops.h> #include <linux/delay.h> #include <linux/timex.h> +#include <linux/i8253.h> #include <linux/dmar.h> #include <linux/init.h> #include <linux/cpu.h>
@@ -39,7 +40,6 @@#include <asm/pgalloc.h> #include <asm/atomic.h> #include <asm/mpspec.h> -#include <asm/i8253.h> #include <asm/i8259.h> #include <asm/proto.h> #include <asm/apic.h>
arch/x86/kernel/apm_32.c +1 -1
@@ -229,11 +229,11 @@#include <linux/jiffies.h> #include <linux/acpi.h> #include <linux/syscore_ops.h> +#include <linux/i8253.h> #include <asm/system.h> #include <asm/uaccess.h> #include <asm/desc.h> -#include <asm/i8253.h> #include <asm/olpc.h> #include <asm/paravirt.h> #include <asm/reboot.h>
arch/x86/kernel/hpet.c +1 -1
@@ -4,6 +4,7 @@#include <linux/sysdev.h> #include <linux/delay.h> #include <linux/errno.h> +#include <linux/i8253.h> #include <linux/slab.h> #include <linux/hpet.h> #include <linux/init.h>
@@ -12,7 +13,6 @@#include <linux/io.h> #include <asm/fixmap.h> -#include <asm/i8253.h> #include <asm/hpet.h> #define HPET_MASK CLOCKSOURCE_MASK(32)
arch/x86/kernel/i8253.c +1 -1
@@ -9,10 +9,10 @@#include <linux/module.h> #include <linux/timex.h> #include <linux/delay.h> +#include <linux/i8253.h> #include <linux/init.h> #include <linux/io.h> -#include <asm/i8253.h> #include <asm/hpet.h> #include <asm/smp.h>
arch/x86/kernel/time.c +1 -1
@@ -11,13 +11,13 @@#include <linux/clockchips.h> #include <linux/interrupt.h> +#include <linux/i8253.h> #include <linux/time.h> #include <linux/mca.h> #include <asm/vsyscall.h> #include <asm/x86_init.h> #include <asm/i8259.h> -#include <asm/i8253.h> #include <asm/timer.h> #include <asm/hpet.h> #include <asm/time.h>
drivers/block/hd.c +1 -1
@@ -155,7 +155,7 @@ else \#if (HD_DELAY >0 ) -#include <asm/i8253.h> +#include <linux/i8253.h> unsigned long last_req;
drivers/clocksource/i8253.c +1 -1
@@ -7,7 +7,7 @@#include <linux/spinlock.h> #include <linux/timex.h> -#include <asm/i8253.h> +#include <linux/i8253.h> /* * Since the PIT overflows every tick, its not very useful
drivers/input/gameport/gameport.c +1 -1
@@ -47,7 +47,7 @@ static void gameport_disconnect_port(str#if defined(__i386__) -#include <asm/i8253.h> +#include <linux/i8253.h> #define DELTA (x,y) ((y)-(x)+((y)<(x)?1193182/HZ:0))#define GET_TIME (x) do { x = get_time_pit(); } while (0)
drivers/input/joystick/analog.c +1 -1
@@ -136,7 +136,7 @@ struct analog_port {#ifdef __i386__ -#include <asm/i8253.h> +#include <linux/i8253.h> #define GET_TIME (x) do { if (cpu_has_tsc) rdtscl(x); else x = get_time_pit(); } while (0)#define DELTA (x,y) (cpu_has_tsc ? ((y) - (x)) : ((x) - (y) + ((x) < (y) ? CLOCK_TICK_RATE / HZ : 0)))
drivers/input/misc/pcspkr.c +1 -1
@@ -27,7 +27,7 @@ MODULE_ALIAS("platform:pcspkr");#if defined(CONFIG_MIPS ) || defined(CONFIG_X86 )/* Use the global PIT lock ! */ -#include <asm/i8253.h> +#include <linux/i8253.h> #else #include <asm/8253pit.h> static DEFINE_RAW_SPINLOCK (i8253_lock);
sound/drivers/pcsp/pcsp.h +1 -1
@@ -13,7 +13,7 @@#include <linux/timex.h> #if defined(CONFIG_MIPS ) || defined(CONFIG_X86 )/* Use the global PIT lock ! */ -#include <asm/i8253.h> +#include <linux/i8253.h> #else #include <asm/8253pit.h> static DEFINE_RAW_SPINLOCK (i8253_lock);
[tip:timers/cleanup] i8253: Create linux/i8253.h and use it in all 8253 related files
Commit-ID: 9e5f52db252be87dc88615c5a48f80a2c70cd2a0 Gitweb: http://git.kernel.org/tip/9e5f52db252be87dc88615c5a48f80a2c70cd2a0 Author: Ralf Baechle <[email protected]> AuthorDate: Wed, 1 Jun 2011 19:04:57 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 9 Jun 2011 12:03:49 +0200
i8253: Create linux/i8253.h and use it in all 8253 related files
arch/arm/mach-footbridge/isa-timer.c | 2 +- arch/mips/cobalt/time.c | 2 +- arch/mips/jazz/irq.c | 2 +- arch/mips/kernel/i8253.c | 2 +- arch/mips/mti-malta/malta-time.c | 2 +- arch/mips/sgi-ip22/ip22-time.c | 2 +- arch/mips/sni/time.c | 2 +- arch/x86/kernel/apic/apic.c | 2 +- arch/x86/kernel/apm_32.c | 2 +- arch/x86/kernel/hpet.c | 2 +- arch/x86/kernel/i8253.c | 2 +- arch/x86/kernel/time.c | 2 +- drivers/block/hd.c | 2 +- drivers/clocksource/i8253.c | 2 +- drivers/input/gameport/gameport.c | 2 +- drivers/input/joystick/analog.c | 2 +- drivers/input/misc/pcspkr.c | 2 +- include/linux/i8253.h | 11 +++++++++++ sound/drivers/pcsp/pcsp.h | 2 +- 19 files changed, 29 insertions(+), 18 deletions(-)
--- arch/arm/mach-footbridge/isa-timer.c | 2 +- arch/mips/cobalt/time.c | 2 +- arch/mips/jazz/irq.c | 2 +- arch/mips/kernel/i8253.c | 2 +- arch/mips/mti-malta/malta-time.c | 2 +- arch/mips/sgi-ip22/ip22-time.c | 2 +- arch/mips/sni/time.c | 2 +- arch/x86/kernel/apic/apic.c | 2 +- arch/x86/kernel/apm_32.c | 2 +- arch/x86/kernel/hpet.c | 2 +- arch/x86/kernel/i8253.c | 2 +- arch/x86/kernel/time.c | 2 +- drivers/block/hd.c | 2 +- drivers/clocksource/i8253.c | 2 +- drivers/input/gameport/gameport.c | 2 +- drivers/input/joystick/analog.c | 2 +- drivers/input/misc/pcspkr.c | 2 +- .../include/asm/ide.h => include/linux/i8253.h | 10 ++++------ sound/drivers/pcsp/pcsp.h | 2 +- 19 files changed, 22 insertions(+), 24 deletions(-)
arch/arm/mach-footbridge/isa-timer.c +1 -1
@@ -6,6 +6,7 @@*/ #include <linux/clockchips.h> #include <linux/clocksource.h> +#include <linux/i8253.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/irq.h>
@@ -14,7 +15,6 @@#include <linux/timex.h> #include <asm/irq.h> -#include <asm/i8253.h> #include <asm/mach/time.h> #include "common.h"
arch/mips/cobalt/time.c +1 -1
@@ -17,10 +17,10 @@* along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include <linux/i8253.h> #include <linux/init.h> #include <asm/gt64120.h> -#include <asm/i8253.h> #include <asm/time.h> #define GT641XX_BASE_CLOCK 50000000/* 50MHz */
arch/mips/jazz/irq.c +1 -1
@@ -7,6 +7,7 @@* Copyright (C) 1994 - 2001, 2003, 07 Ralf Baechle */ #include <linux/clockchips.h> +#include <linux/i8253.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/kernel.h>
@@ -15,7 +16,6 @@#include <linux/irq.h> #include <asm/irq_cpu.h> -#include <asm/i8253.h> #include <asm/i8259.h> #include <asm/io.h> #include <asm/jazz.h>
arch/mips/kernel/i8253.c +1 -1
@@ -3,6 +3,7 @@* */ #include <linux/clockchips.h> +#include <linux/i8253.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/jiffies.h>
@@ -12,7 +13,6 @@#include <linux/irq.h> #include <asm/delay.h> -#include <asm/i8253.h> #include <asm/io.h> #include <asm/time.h>
arch/mips/mti-malta/malta-time.c +1 -1
@@ -19,6 +19,7 @@*/ #include <linux/types.h> +#include <linux/i8253.h> #include <linux/init.h> #include <linux/kernel_stat.h> #include <linux/sched.h>
@@ -31,7 +32,6 @@#include <asm/mipsregs.h> #include <asm/mipsmtregs.h> #include <asm/hardirq.h> -#include <asm/i8253.h> #include <asm/irq.h> #include <asm/div64.h> #include <asm/cpu.h>
arch/mips/sgi-ip22/ip22-time.c +1 -1
@@ -10,6 +10,7 @@* Copyright (C) 2003, 06 Ralf Baechle ([email protected]) */ #include <linux/bcd.h> +#include <linux/i8253.h> #include <linux/init.h> #include <linux/irq.h> #include <linux/kernel.h>
@@ -20,7 +21,6 @@#include <asm/cpu.h> #include <asm/mipsregs.h> -#include <asm/i8253.h> #include <asm/io.h> #include <asm/irq.h> #include <asm/time.h>
arch/mips/sni/time.c +1 -1
@@ -1,11 +1,11 @@#include <linux/types.h> +#include <linux/i8253.h> #include <linux/interrupt.h> #include <linux/irq.h> #include <linux/smp.h> #include <linux/time.h> #include <linux/clockchips.h> -#include <asm/i8253.h> #include <asm/sni.h> #include <asm/time.h> #include <asm-generic/rtc.h>
arch/x86/kernel/apic/apic.c +1 -1
@@ -27,6 +27,7 @@#include <linux/syscore_ops.h> #include <linux/delay.h> #include <linux/timex.h> +#include <linux/i8253.h> #include <linux/dmar.h> #include <linux/init.h> #include <linux/cpu.h>
@@ -39,7 +40,6 @@#include <asm/pgalloc.h> #include <asm/atomic.h> #include <asm/mpspec.h> -#include <asm/i8253.h> #include <asm/i8259.h> #include <asm/proto.h> #include <asm/apic.h>
arch/x86/kernel/apm_32.c +1 -1
@@ -229,11 +229,11 @@#include <linux/jiffies.h> #include <linux/acpi.h> #include <linux/syscore_ops.h> +#include <linux/i8253.h> #include <asm/system.h> #include <asm/uaccess.h> #include <asm/desc.h> -#include <asm/i8253.h> #include <asm/olpc.h> #include <asm/paravirt.h> #include <asm/reboot.h>
arch/x86/kernel/hpet.c +1 -1
@@ -4,6 +4,7 @@#include <linux/sysdev.h> #include <linux/delay.h> #include <linux/errno.h> +#include <linux/i8253.h> #include <linux/slab.h> #include <linux/hpet.h> #include <linux/init.h>
@@ -12,7 +13,6 @@#include <linux/io.h> #include <asm/fixmap.h> -#include <asm/i8253.h> #include <asm/hpet.h> #define HPET_MASK CLOCKSOURCE_MASK(32)
arch/x86/kernel/i8253.c +1 -1
@@ -9,10 +9,10 @@#include <linux/module.h> #include <linux/timex.h> #include <linux/delay.h> +#include <linux/i8253.h> #include <linux/init.h> #include <linux/io.h> -#include <asm/i8253.h> #include <asm/hpet.h> #include <asm/smp.h>
arch/x86/kernel/time.c +1 -1
@@ -11,13 +11,13 @@#include <linux/clockchips.h> #include <linux/interrupt.h> +#include <linux/i8253.h> #include <linux/time.h> #include <linux/mca.h> #include <asm/vsyscall.h> #include <asm/x86_init.h> #include <asm/i8259.h> -#include <asm/i8253.h> #include <asm/timer.h> #include <asm/hpet.h> #include <asm/time.h>
drivers/block/hd.c +1 -1
@@ -155,7 +155,7 @@ else \#if (HD_DELAY >0 ) -#include <asm/i8253.h> +#include <linux/i8253.h> unsigned long last_req;
drivers/clocksource/i8253.c +1 -1
@@ -7,7 +7,7 @@#include <linux/spinlock.h> #include <linux/timex.h> -#include <asm/i8253.h> +#include <linux/i8253.h> /* * Since the PIT overflows every tick, its not very useful
drivers/input/gameport/gameport.c +1 -1
@@ -47,7 +47,7 @@ static void gameport_disconnect_port(struct gameport *gameport);#if defined(__i386__) -#include <asm/i8253.h> +#include <linux/i8253.h> #define DELTA (x,y) ((y)-(x)+((y)<(x)?1193182/HZ:0))#define GET_TIME (x) do { x = get_time_pit(); } while (0)
drivers/input/joystick/analog.c +1 -1
@@ -136,7 +136,7 @@ struct analog_port {#ifdef __i386__ -#include <asm/i8253.h> +#include <linux/i8253.h> #define GET_TIME (x) do { if (cpu_has_tsc) rdtscl(x); else x = get_time_pit(); } while (0)#define DELTA (x,y) (cpu_has_tsc ? ((y) - (x)) : ((x) - (y) + ((x) < (y) ? CLOCK_TICK_RATE / HZ : 0)))
drivers/input/misc/pcspkr.c +1 -1
@@ -27,7 +27,7 @@ MODULE_ALIAS("platform:pcspkr");#if defined(CONFIG_MIPS ) || defined(CONFIG_X86 )/* Use the global PIT lock ! */ -#include <asm/i8253.h> +#include <linux/i8253.h> #else #include <asm/8253pit.h> static DEFINE_RAW_SPINLOCK (i8253_lock);
include/linux/i8253.h renamed from arch/mips/include/asm/ide.h +4 -6
@@ -2,12 +2,10 @@* This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. -* -* This file contains the MIPS architecture specific IDE code. */ -#ifndef __ASM_IDE_H -#define __ASM_IDE_H +#ifndef __LINUX_I8253_H +#define __LINUX_I8253_H -#include <ide.h> +#include <asm/i8253.h> -#endif /* __ASM_IDE_H */ +#endif /* __LINUX_I8253_H */
sound/drivers/pcsp/pcsp.h +1 -1
@@ -13,7 +13,7 @@#include <linux/timex.h> #if defined(CONFIG_MIPS ) || defined(CONFIG_X86 )/* Use the global PIT lock ! */ -#include <asm/i8253.h> +#include <linux/i8253.h> #else #include <asm/8253pit.h> static DEFINE_RAW_SPINLOCK (i8253_lock);
[tip:timers/cleanup] i8253: Create linux/i8253.h and use it in all 8253 related files
In reply to [email protected]Commit-ID: 334955ef964bee9d3b1e20966847eee28cfd05f6 Gitweb: http://git.kernel.org/tip/334955ef964bee9d3b1e20966847eee28cfd05f6 Author: Ralf Baechle <[email protected]> AuthorDate: Wed, 1 Jun 2011 19:04:57 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 9 Jun 2011 15:01:37 +0200
i8253: Create linux/i8253.h and use it in all 8253 related files
arch/arm/mach-footbridge/isa-timer.c | 2 +- arch/mips/cobalt/time.c | 2 +- arch/mips/jazz/irq.c | 2 +- arch/mips/kernel/i8253.c | 2 +- arch/mips/mti-malta/malta-time.c | 2 +- arch/mips/sgi-ip22/ip22-time.c | 2 +- arch/mips/sni/time.c | 2 +- arch/x86/kernel/apic/apic.c | 2 +- arch/x86/kernel/apm_32.c | 2 +- arch/x86/kernel/hpet.c | 2 +- arch/x86/kernel/i8253.c | 2 +- arch/x86/kernel/time.c | 2 +- drivers/block/hd.c | 2 +- drivers/clocksource/i8253.c | 2 +- drivers/input/gameport/gameport.c | 2 +- drivers/input/joystick/analog.c | 2 +- drivers/input/misc/pcspkr.c | 2 +- include/linux/i8253.h | 11 +++++++++++ sound/drivers/pcsp/pcsp.h | 2 +- 19 files changed, 29 insertions(+), 18 deletions(-)
--- arch/arm/mach-footbridge/isa-timer.c | 2 +- arch/mips/cobalt/time.c | 2 +- arch/mips/jazz/irq.c | 2 +- arch/mips/kernel/i8253.c | 2 +- arch/mips/mti-malta/malta-time.c | 2 +- arch/mips/sgi-ip22/ip22-time.c | 2 +- arch/mips/sni/time.c | 2 +- arch/x86/kernel/apic/apic.c | 2 +- arch/x86/kernel/apm_32.c | 2 +- arch/x86/kernel/hpet.c | 2 +- arch/x86/kernel/i8253.c | 2 +- arch/x86/kernel/time.c | 2 +- drivers/block/hd.c | 2 +- drivers/clocksource/i8253.c | 2 +- drivers/input/gameport/gameport.c | 2 +- drivers/input/joystick/analog.c | 2 +- drivers/input/misc/pcspkr.c | 2 +- .../include/asm/ide.h => include/linux/i8253.h | 10 ++++------ sound/drivers/pcsp/pcsp.h | 2 +- 19 files changed, 22 insertions(+), 24 deletions(-)
arch/arm/mach-footbridge/isa-timer.c +1 -1
@@ -6,6 +6,7 @@*/ #include <linux/clockchips.h> #include <linux/clocksource.h> +#include <linux/i8253.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/irq.h>
@@ -14,7 +15,6 @@#include <linux/timex.h> #include <asm/irq.h> -#include <asm/i8253.h> #include <asm/mach/time.h> #include "common.h"
arch/mips/cobalt/time.c +1 -1
@@ -17,10 +17,10 @@* along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include <linux/i8253.h> #include <linux/init.h> #include <asm/gt64120.h> -#include <asm/i8253.h> #include <asm/time.h> #define GT641XX_BASE_CLOCK 50000000/* 50MHz */
arch/mips/jazz/irq.c +1 -1
@@ -7,6 +7,7 @@* Copyright (C) 1994 - 2001, 2003, 07 Ralf Baechle */ #include <linux/clockchips.h> +#include <linux/i8253.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/kernel.h>
@@ -15,7 +16,6 @@#include <linux/irq.h> #include <asm/irq_cpu.h> -#include <asm/i8253.h> #include <asm/i8259.h> #include <asm/io.h> #include <asm/jazz.h>
arch/mips/kernel/i8253.c +1 -1
@@ -3,6 +3,7 @@* */ #include <linux/clockchips.h> +#include <linux/i8253.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/jiffies.h>
@@ -12,7 +13,6 @@#include <linux/irq.h> #include <asm/delay.h> -#include <asm/i8253.h> #include <asm/io.h> #include <asm/time.h>
arch/mips/mti-malta/malta-time.c +1 -1
@@ -19,6 +19,7 @@*/ #include <linux/types.h> +#include <linux/i8253.h> #include <linux/init.h> #include <linux/kernel_stat.h> #include <linux/sched.h>
@@ -31,7 +32,6 @@#include <asm/mipsregs.h> #include <asm/mipsmtregs.h> #include <asm/hardirq.h> -#include <asm/i8253.h> #include <asm/irq.h> #include <asm/div64.h> #include <asm/cpu.h>
arch/mips/sgi-ip22/ip22-time.c +1 -1
@@ -10,6 +10,7 @@* Copyright (C) 2003, 06 Ralf Baechle ([email protected]) */ #include <linux/bcd.h> +#include <linux/i8253.h> #include <linux/init.h> #include <linux/irq.h> #include <linux/kernel.h>
@@ -20,7 +21,6 @@#include <asm/cpu.h> #include <asm/mipsregs.h> -#include <asm/i8253.h> #include <asm/io.h> #include <asm/irq.h> #include <asm/time.h>
arch/mips/sni/time.c +1 -1
@@ -1,11 +1,11 @@#include <linux/types.h> +#include <linux/i8253.h> #include <linux/interrupt.h> #include <linux/irq.h> #include <linux/smp.h> #include <linux/time.h> #include <linux/clockchips.h> -#include <asm/i8253.h> #include <asm/sni.h> #include <asm/time.h> #include <asm-generic/rtc.h>
arch/x86/kernel/apic/apic.c +1 -1
@@ -27,6 +27,7 @@#include <linux/syscore_ops.h> #include <linux/delay.h> #include <linux/timex.h> +#include <linux/i8253.h> #include <linux/dmar.h> #include <linux/init.h> #include <linux/cpu.h>
@@ -39,7 +40,6 @@#include <asm/pgalloc.h> #include <asm/atomic.h> #include <asm/mpspec.h> -#include <asm/i8253.h> #include <asm/i8259.h> #include <asm/proto.h> #include <asm/apic.h>
arch/x86/kernel/apm_32.c +1 -1
@@ -229,11 +229,11 @@#include <linux/jiffies.h> #include <linux/acpi.h> #include <linux/syscore_ops.h> +#include <linux/i8253.h> #include <asm/system.h> #include <asm/uaccess.h> #include <asm/desc.h> -#include <asm/i8253.h> #include <asm/olpc.h> #include <asm/paravirt.h> #include <asm/reboot.h>
arch/x86/kernel/hpet.c +1 -1
@@ -4,6 +4,7 @@#include <linux/sysdev.h> #include <linux/delay.h> #include <linux/errno.h> +#include <linux/i8253.h> #include <linux/slab.h> #include <linux/hpet.h> #include <linux/init.h>
@@ -12,7 +13,6 @@#include <linux/io.h> #include <asm/fixmap.h> -#include <asm/i8253.h> #include <asm/hpet.h> #define HPET_MASK CLOCKSOURCE_MASK(32)
arch/x86/kernel/i8253.c +1 -1
@@ -9,10 +9,10 @@#include <linux/module.h> #include <linux/timex.h> #include <linux/delay.h> +#include <linux/i8253.h> #include <linux/init.h> #include <linux/io.h> -#include <asm/i8253.h> #include <asm/hpet.h> #include <asm/smp.h>
arch/x86/kernel/time.c +1 -1
@@ -11,13 +11,13 @@#include <linux/clockchips.h> #include <linux/interrupt.h> +#include <linux/i8253.h> #include <linux/time.h> #include <linux/mca.h> #include <asm/vsyscall.h> #include <asm/x86_init.h> #include <asm/i8259.h> -#include <asm/i8253.h> #include <asm/timer.h> #include <asm/hpet.h> #include <asm/time.h>
drivers/block/hd.c +1 -1
@@ -155,7 +155,7 @@ else \#if (HD_DELAY >0 ) -#include <asm/i8253.h> +#include <linux/i8253.h> unsigned long last_req;
drivers/clocksource/i8253.c +1 -1
@@ -7,7 +7,7 @@#include <linux/spinlock.h> #include <linux/timex.h> -#include <asm/i8253.h> +#include <linux/i8253.h> /* * Since the PIT overflows every tick, its not very useful
drivers/input/gameport/gameport.c +1 -1
@@ -47,7 +47,7 @@ static void gameport_disconnect_port(struct gameport *gameport);#if defined(__i386__) -#include <asm/i8253.h> +#include <linux/i8253.h> #define DELTA (x,y) ((y)-(x)+((y)<(x)?1193182/HZ:0))#define GET_TIME (x) do { x = get_time_pit(); } while (0)
drivers/input/joystick/analog.c +1 -1
@@ -136,7 +136,7 @@ struct analog_port {#ifdef __i386__ -#include <asm/i8253.h> +#include <linux/i8253.h> #define GET_TIME (x) do { if (cpu_has_tsc) rdtscl(x); else x = get_time_pit(); } while (0)#define DELTA (x,y) (cpu_has_tsc ? ((y) - (x)) : ((x) - (y) + ((x) < (y) ? CLOCK_TICK_RATE / HZ : 0)))
drivers/input/misc/pcspkr.c +1 -1
@@ -27,7 +27,7 @@ MODULE_ALIAS("platform:pcspkr");#if defined(CONFIG_MIPS ) || defined(CONFIG_X86 )/* Use the global PIT lock ! */ -#include <asm/i8253.h> +#include <linux/i8253.h> #else #include <asm/8253pit.h> static DEFINE_RAW_SPINLOCK (i8253_lock);
include/linux/i8253.h renamed from arch/mips/include/asm/ide.h +4 -6
@@ -2,12 +2,10 @@* This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. -* -* This file contains the MIPS architecture specific IDE code. */ -#ifndef __ASM_IDE_H -#define __ASM_IDE_H +#ifndef __LINUX_I8253_H +#define __LINUX_I8253_H -#include <ide.h> +#include <asm/i8253.h> -#endif /* __ASM_IDE_H */ +#endif /* __LINUX_I8253_H */
sound/drivers/pcsp/pcsp.h +1 -1
@@ -13,7 +13,7 @@#include <linux/timex.h> #if defined(CONFIG_MIPS ) || defined(CONFIG_X86 )/* Use the global PIT lock ! */ -#include <asm/i8253.h> +#include <linux/i8253.h> #else #include <asm/8253pit.h> static DEFINE_RAW_SPINLOCK (i8253_lock);
PATCH 2/14 i8253: Unify all kernel declarations of i8253_lock in <linux/i8253.h>.
In reply to [email protected]To: [email protected]
Cc: Russell King <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
arch/arm/include/asm/i8253.h | 9 --------- arch/mips/include/asm/i8253.h | 12 ------------ arch/x86/include/asm/i8253.h | 10 ---------- include/linux/i8253.h | 14 ++++++++++++++ 4 files changed, 14 insertions(+), 31 deletions(-)
include/linux/i8253.h +14 -0
@@ -2,10 +2,24 @@* This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. +* +* Machine specific IO port address definition for generic. +* Written by Osamu Tomita <[email protected]> */ #ifndef __LINUX_I8253_H#define __LINUX_I8253_H +#include <linux/spinlock.h> #include <asm/i8253.h> +/* i8253A PIT registers */ +#define PIT_MODE 0x43 +#define PIT_CH0 0x40 +#define PIT_CH2 0x42 + +#define inb_pit inb_p +#define outb_pit outb_p + +extern raw_spinlock_t i8253_lock; +#endif /* __LINUX_I8253_H */
arch/arm/include/asm/i8253.h +0 -9
@@ -1,15 +1,6 @@#ifndef __ASMARM_I8253_H#define __ASMARM_I8253_H -/* i8253A PIT registers */ -#define PIT_MODE 0x43 -#define PIT_CH0 0x40 -#define PIT_LATCH ((PIT_TICK_RATE + HZ / 2) / HZ) -extern raw_spinlock_t i8253_lock; - -#define outb_pit outb_p -#define inb_pit inb_p -#endif
arch/mips/include/asm/i8253.h +0 -12
@@ -5,20 +5,8 @@#ifndef __ASM_I8253_H#define __ASM_I8253_H -#include <linux/spinlock.h> - -/* i8253A PIT registers */ -#define PIT_MODE 0x43 -#define PIT_CH0 0x40 -#define PIT_CH2 0x42 -#define PIT_LATCH LATCH -extern raw_spinlock_t i8253_lock; -extern void setup_pit_timer (void ); -#define inb_pit inb_p -#define outb_pit outb_p -#endif /* __ASM_I8253_H */
arch/x86/include/asm/i8253.h +0 -10
@@ -1,20 +1,10 @@#ifndef _ASM_X86_I8253_H#define _ASM_X86_I8253_H -/* i8253A PIT registers */ -#define PIT_MODE 0x43 -#define PIT_CH0 0x40 -#define PIT_CH2 0x42 -#define PIT_LATCH LATCH -extern raw_spinlock_t i8253_lock; -extern struct clock_event_device *global_clock_event;extern void setup_pit_timer (void ); -#define inb_pit inb_p -#define outb_pit outb_p -#endif /* _ASM_X86_I8253_H */
[tip:timers/cleanup] i8253: Unify all kernel declarations of i8253_lock
Commit-ID: 1ff256164618afb3880137d4819ee62e9bda2d50 Gitweb: http://git.kernel.org/tip/1ff256164618afb3880137d4819ee62e9bda2d50 Author: Ralf Baechle <[email protected]> AuthorDate: Wed, 1 Jun 2011 19:04:58 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 9 Jun 2011 12:03:49 +0200
i8253: Unify all kernel declarations of i8253_lock
--- arch/arm/include/asm/i8253.h | 9 --------- arch/mips/include/asm/i8253.h | 12 ------------ arch/x86/include/asm/i8253.h | 10 ---------- include/linux/i8253.h | 14 ++++++++++++++ 4 files changed, 14 insertions(+), 31 deletions(-)
arch/arm/include/asm/i8253.h +0 -9
@@ -1,15 +1,6 @@#ifndef __ASMARM_I8253_H#define __ASMARM_I8253_H -/* i8253A PIT registers */ -#define PIT_MODE 0x43 -#define PIT_CH0 0x40 -#define PIT_LATCH ((PIT_TICK_RATE + HZ / 2) / HZ) -extern raw_spinlock_t i8253_lock; - -#define outb_pit outb_p -#define inb_pit inb_p -#endif
arch/mips/include/asm/i8253.h +0 -12
@@ -5,20 +5,8 @@#ifndef __ASM_I8253_H#define __ASM_I8253_H -#include <linux/spinlock.h> - -/* i8253A PIT registers */ -#define PIT_MODE 0x43 -#define PIT_CH0 0x40 -#define PIT_CH2 0x42 -#define PIT_LATCH LATCH -extern raw_spinlock_t i8253_lock; -extern void setup_pit_timer (void ); -#define inb_pit inb_p -#define outb_pit outb_p -#endif /* __ASM_I8253_H */
arch/x86/include/asm/i8253.h +0 -10
@@ -1,20 +1,10 @@#ifndef _ASM_X86_I8253_H#define _ASM_X86_I8253_H -/* i8253A PIT registers */ -#define PIT_MODE 0x43 -#define PIT_CH0 0x40 -#define PIT_CH2 0x42 -#define PIT_LATCH LATCH -extern raw_spinlock_t i8253_lock; -extern struct clock_event_device *global_clock_event;extern void setup_pit_timer (void ); -#define inb_pit inb_p -#define outb_pit outb_p -#endif /* _ASM_X86_I8253_H */
include/linux/i8253.h +14 -0
@@ -2,10 +2,24 @@* This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. +* +* Machine specific IO port address definition for generic. +* Written by Osamu Tomita <[email protected]> */ #ifndef __LINUX_I8253_H#define __LINUX_I8253_H +#include <linux/spinlock.h> #include <asm/i8253.h> +/* i8253A PIT registers */ +#define PIT_MODE 0x43 +#define PIT_CH0 0x40 +#define PIT_CH2 0x42 + +#define inb_pit inb_p +#define outb_pit outb_p + +extern raw_spinlock_t i8253_lock; +#endif /* __LINUX_I8253_H */
[tip:timers/cleanup] i8253: Unify all kernel declarations of i8253_lock
In reply to [email protected]Commit-ID: cb2455aa274b780802c593fecf115240a655d809 Gitweb: http://git.kernel.org/tip/cb2455aa274b780802c593fecf115240a655d809 Author: Ralf Baechle <[email protected]> AuthorDate: Wed, 1 Jun 2011 19:04:58 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 9 Jun 2011 15:01:38 +0200
i8253: Unify all kernel declarations of i8253_lock
--- arch/arm/include/asm/i8253.h | 9 --------- arch/mips/include/asm/i8253.h | 12 ------------ arch/x86/include/asm/i8253.h | 10 ---------- include/linux/i8253.h | 14 ++++++++++++++ 4 files changed, 14 insertions(+), 31 deletions(-)
arch/arm/include/asm/i8253.h +0 -9
@@ -1,15 +1,6 @@#ifndef __ASMARM_I8253_H#define __ASMARM_I8253_H -/* i8253A PIT registers */ -#define PIT_MODE 0x43 -#define PIT_CH0 0x40 -#define PIT_LATCH ((PIT_TICK_RATE + HZ / 2) / HZ) -extern raw_spinlock_t i8253_lock; - -#define outb_pit outb_p -#define inb_pit inb_p -#endif
arch/mips/include/asm/i8253.h +0 -12
@@ -5,20 +5,8 @@#ifndef __ASM_I8253_H#define __ASM_I8253_H -#include <linux/spinlock.h> - -/* i8253A PIT registers */ -#define PIT_MODE 0x43 -#define PIT_CH0 0x40 -#define PIT_CH2 0x42 -#define PIT_LATCH LATCH -extern raw_spinlock_t i8253_lock; -extern void setup_pit_timer (void ); -#define inb_pit inb_p -#define outb_pit outb_p -#endif /* __ASM_I8253_H */
arch/x86/include/asm/i8253.h +0 -10
@@ -1,20 +1,10 @@#ifndef _ASM_X86_I8253_H#define _ASM_X86_I8253_H -/* i8253A PIT registers */ -#define PIT_MODE 0x43 -#define PIT_CH0 0x40 -#define PIT_CH2 0x42 -#define PIT_LATCH LATCH -extern raw_spinlock_t i8253_lock; -extern struct clock_event_device *global_clock_event;extern void setup_pit_timer (void ); -#define inb_pit inb_p -#define outb_pit outb_p -#endif /* _ASM_X86_I8253_H */
include/linux/i8253.h +14 -0
@@ -2,10 +2,24 @@* This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. +* +* Machine specific IO port address definition for generic. +* Written by Osamu Tomita <[email protected]> */ #ifndef __LINUX_I8253_H#define __LINUX_I8253_H +#include <linux/spinlock.h> #include <asm/i8253.h> +/* i8253A PIT registers */ +#define PIT_MODE 0x43 +#define PIT_CH0 0x40 +#define PIT_CH2 0x42 + +#define inb_pit inb_p +#define outb_pit outb_p + +extern raw_spinlock_t i8253_lock; +#endif /* __LINUX_I8253_H */
PATCH 3/14 i8253: Consolidate all kernel definitions of i8253_lock in lib/i8253-lock.c.
In reply to [email protected]lib/Kconfig | 6 ++++++ lib/Makefile | 1 + lib/i8253-lock.c | 11 +++++++++++ 3 files changed, 18 insertions(+)
lib/i8253-lock.c new file +11 -0
@@ -0,0 +1,11 @@ +#include <linux/spinlock.h> +#include <linux/module.h> + +/* +* Protects access to I/O ports +* +* 0040-0043 : timer0, i8253 / i8254 +* 0061-0061 : NMI Control Register which contains two speaker control bits. +*/ +DEFINE_RAW_SPINLOCK (i8253_lock); +EXPORT_SYMBOL (i8253_lock);
lib/Makefile +1 -0
@@ -37,6 +37,7 @@ obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o obj-$(CONFIG_CHECK_SIGNATURE) += check_signature.o obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o +obj-$(CONFIG_I8253_LOCK) += i8253-lock.o lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o
lib/Kconfig +6 -0
@@ -237,6 +237,12 @@ config CPU_RMAP bool depends on SMP +config I8253_LOCK + bool + help + Enable the shared lock for the i8253 PIT. Any system that uses + the i8253 should select this. + # # Netlink attribute parsing support is select'ed if needed #
[tip:timers/cleanup] i8253: Consolidate all kernel definitions of i8253_lock
Commit-ID: 78efffd9d7f2a988afecf0c281da3fac3d195120 Gitweb: http://git.kernel.org/tip/78efffd9d7f2a988afecf0c281da3fac3d195120 Author: Ralf Baechle <[email protected]> AuthorDate: Wed, 1 Jun 2011 19:04:59 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 9 Jun 2011 12:03:49 +0200
i8253: Consolidate all kernel definitions of i8253_lock
Move them to drivers/clocksource/i8253.c and remove the implementations in arch/
[ tglx: Avoid the extra file in lib - folded arch patches in. The
export will become conditional in a later step ]
--- arch/arm/mach-footbridge/isa-timer.c | 2 -- arch/mips/kernel/i8253.c | 3 --- arch/x86/kernel/i8253.c | 3 --- drivers/clocksource/Kconfig | 6 ++++++ drivers/clocksource/Makefile | 2 +- drivers/clocksource/i8253.c | 13 ++++++++++++- init/Kconfig | 1 + 7 files changed, 20 insertions(+), 10 deletions(-)
arch/arm/mach-footbridge/isa-timer.c +0 -2
@@ -19,8 +19,6 @@#include "common.h" -DEFINE_RAW_SPINLOCK (i8253_lock); -static void pit_set_mode (enum clock_event_mode mode,struct clock_event_device *evt) {
arch/mips/kernel/i8253.c +0 -3
@@ -16,9 +16,6 @@#include <asm/io.h> #include <asm/time.h> -DEFINE_RAW_SPINLOCK (i8253_lock); -EXPORT_SYMBOL (i8253_lock); -/* * Initialize the PIT timer. *
arch/x86/kernel/i8253.c +0 -3
@@ -16,9 +16,6 @@#include <asm/hpet.h> #include <asm/smp.h> -DEFINE_RAW_SPINLOCK (i8253_lock); -EXPORT_SYMBOL (i8253_lock); -/* * HPET replaces the PIT, when enabled. So we need to know, which of * the two timers is used
drivers/clocksource/Kconfig +6 -0
@@ -1,5 +1,11 @@ config CLKSRC_I8253 bool +config I8253_LOCK + bool + +config CLKBLD_I8253 + def_bool y if CLKSRC_I8253 || I8253_LOCK + config CLKSRC_MMIO bool
drivers/clocksource/Makefile +1 -1
@@ -6,5 +6,5 @@ obj-$(CONFIG_CS5535_CLOCK_EVENT_SRC) += cs5535-clockevt.o obj-$(CONFIG_SH_TIMER_CMT) += sh_cmt.o obj-$(CONFIG_SH_TIMER_MTU2) += sh_mtu2.o obj-$(CONFIG_SH_TIMER_TMU) += sh_tmu.o -obj-$(CONFIG_CLKSRC_I8253) += i8253.o +obj-$(CONFIG_CLKBLD_I8253) += i8253.o obj-$(CONFIG_CLKSRC_MMIO) += mmio.o
drivers/clocksource/i8253.c +12 -1
@@ -6,10 +6,20 @@#include <linux/io.h> #include <linux/spinlock.h> #include <linux/timex.h> - +#include <linux/module.h> #include <linux/i8253.h> /* +* Protects access to I/O ports +* +* 0040-0043 : timer0, i8253 / i8254 +* 0061-0061 : NMI Control Register which contains two speaker control bits. +*/ +DEFINE_RAW_SPINLOCK (i8253_lock); +EXPORT_SYMBOL (i8253_lock); + +#ifdef CONFIG_CLKSRC_I8253 +/* * Since the PIT overflows every tick, its not very useful * to just read by itself. So use jiffies to emulate a free * running counter:
@@ -86,3 +96,4 @@ int __init clocksource_i8253_init(void) {return clocksource_register_hz (&i8253_cs,PIT_TICK_RATE ); } +#endif
init/Kconfig +1 -0
@@ -1002,6 +1002,7 @@ config ELF_CORE config PCSPKR_PLATFORM bool "Enable PC-Speaker support" if EXPERT depends on ALPHA || X86 || MIPS || PPC_PREP || PPC_CHRP || PPC_PSERIES + select I8253_LOCK default y help This option allows to disable the internal PC-Speaker
[tip:timers/cleanup] i8253: Consolidate all kernel definitions of i8253_lock
In reply to [email protected]Commit-ID: 15f304b664c0d0a3e76ed3a9ce3615a86908babe Gitweb: http://git.kernel.org/tip/15f304b664c0d0a3e76ed3a9ce3615a86908babe Author: Ralf Baechle <[email protected]> AuthorDate: Wed, 1 Jun 2011 19:04:59 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 9 Jun 2011 15:01:38 +0200
i8253: Consolidate all kernel definitions of i8253_lock
Move them to drivers/clocksource/i8253.c and remove the implementations in arch/
[ tglx: Avoid the extra file in lib - folded arch patches in. The
export will become conditional in a later step ]
--- arch/arm/mach-footbridge/isa-timer.c | 2 -- arch/mips/kernel/i8253.c | 3 --- arch/x86/Kconfig | 1 + arch/x86/kernel/i8253.c | 3 --- drivers/clocksource/Kconfig | 6 ++++++ drivers/clocksource/Makefile | 2 +- drivers/clocksource/i8253.c | 13 ++++++++++++- init/Kconfig | 1 + 8 files changed, 21 insertions(+), 10 deletions(-)
arch/arm/mach-footbridge/isa-timer.c +0 -2
@@ -19,8 +19,6 @@#include "common.h" -DEFINE_RAW_SPINLOCK (i8253_lock); -static void pit_set_mode (enum clock_event_mode mode,struct clock_event_device *evt) {
arch/mips/kernel/i8253.c +0 -3
@@ -16,9 +16,6 @@#include <asm/io.h> #include <asm/time.h> -DEFINE_RAW_SPINLOCK (i8253_lock); -EXPORT_SYMBOL (i8253_lock); -/* * Initialize the PIT timer. *
arch/x86/Kconfig +1 -0
@@ -70,6 +70,7 @@ config X86 select IRQ_FORCED_THREADING select USE_GENERIC_SMP_HELPERS if SMP select HAVE_BPF_JIT if (X86_64 && NET) + select I8253_LOCK config INSTRUCTION_DECODER def_bool (KPROBES || PERF_EVENTS)
arch/x86/kernel/i8253.c +0 -3
@@ -16,9 +16,6 @@#include <asm/hpet.h> #include <asm/smp.h> -DEFINE_RAW_SPINLOCK (i8253_lock); -EXPORT_SYMBOL (i8253_lock); -/* * HPET replaces the PIT, when enabled. So we need to know, which of * the two timers is used
drivers/clocksource/Kconfig +6 -0
@@ -1,5 +1,11 @@ config CLKSRC_I8253 bool +config I8253_LOCK + bool + +config CLKBLD_I8253 + def_bool y if CLKSRC_I8253 || I8253_LOCK + config CLKSRC_MMIO bool
drivers/clocksource/Makefile +1 -1
@@ -6,5 +6,5 @@ obj-$(CONFIG_CS5535_CLOCK_EVENT_SRC) += cs5535-clockevt.o obj-$(CONFIG_SH_TIMER_CMT) += sh_cmt.o obj-$(CONFIG_SH_TIMER_MTU2) += sh_mtu2.o obj-$(CONFIG_SH_TIMER_TMU) += sh_tmu.o -obj-$(CONFIG_CLKSRC_I8253) += i8253.o +obj-$(CONFIG_CLKBLD_I8253) += i8253.o obj-$(CONFIG_CLKSRC_MMIO) += mmio.o
drivers/clocksource/i8253.c +12 -1
@@ -6,10 +6,20 @@#include <linux/io.h> #include <linux/spinlock.h> #include <linux/timex.h> - +#include <linux/module.h> #include <linux/i8253.h> /* +* Protects access to I/O ports +* +* 0040-0043 : timer0, i8253 / i8254 +* 0061-0061 : NMI Control Register which contains two speaker control bits. +*/ +DEFINE_RAW_SPINLOCK (i8253_lock); +EXPORT_SYMBOL (i8253_lock); + +#ifdef CONFIG_CLKSRC_I8253 +/* * Since the PIT overflows every tick, its not very useful * to just read by itself. So use jiffies to emulate a free * running counter:
@@ -86,3 +96,4 @@ int __init clocksource_i8253_init(void) {return clocksource_register_hz (&i8253_cs,PIT_TICK_RATE ); } +#endif
init/Kconfig +1 -0
@@ -1002,6 +1002,7 @@ config ELF_CORE config PCSPKR_PLATFORM bool "Enable PC-Speaker support" if EXPERT depends on ALPHA || X86 || MIPS || PPC_PREP || PPC_CHRP || PPC_PSERIES + select I8253_LOCK default y help This option allows to disable the internal PC-Speaker
PATCH 4/14 i8253: Make MIPS use the shared i8253_lock.
In reply to [email protected]To: [email protected]
Cc: [email protected]
arch/mips/Kconfig | 1 + arch/mips/kernel/i8253.c | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-)
arch/mips/Kconfig +1 -0
@@ -2388,6 +2388,7 @@ config MMU config I8253 bool select CLKSRC_I8253 + select I8253_LOCK select MIPS_EXTERNAL_TIMER config ZONE_DMA32
arch/mips/kernel/i8253.c +0 -3
@@ -16,9 +16,6 @@#include <asm/io.h> #include <asm/time.h> -DEFINE_RAW_SPINLOCK (i8253_lock); -EXPORT_SYMBOL (i8253_lock); -/* * Initialize the PIT timer. *
PATCH 5/14 i8253: Make x86 use the shared i8253_lock.
In reply to [email protected]To: [email protected]
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: [email protected]
arch/x86/Kconfig | 1 + arch/x86/kernel/i8253.c | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-)
arch/x86/Kconfig +1 -0
@@ -67,6 +67,7 @@ config X86 select GENERIC_IRQ_PROBE select GENERIC_PENDING_IRQ if SMP select GENERIC_IRQ_SHOW + select I8253_LOCK select IRQ_FORCED_THREADING select USE_GENERIC_SMP_HELPERS if SMP select HAVE_BPF_JIT if (X86_64 && NET)
arch/x86/kernel/i8253.c +0 -3
@@ -16,9 +16,6 @@#include <asm/hpet.h> #include <asm/smp.h> -DEFINE_RAW_SPINLOCK (i8253_lock); -EXPORT_SYMBOL (i8253_lock); -/* * HPET replaces the PIT, when enabled. So we need to know, which of * the two timers is used
PATCH 6/14 i8253: Make pcspkr input driver use the shared i8253_lock.
In reply to [email protected]To: [email protected]
Cc: Dmitry Torokhov <[email protected]>
Cc: [email protected]
drivers/input/misc/pcspkr.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)
drivers/input/misc/pcspkr.c +1 -8
@@ -14,6 +14,7 @@#include <linux/kernel.h> #include <linux/module.h> +#include <linux/i8253.h> #include <linux/init.h> #include <linux/input.h> #include <linux/platform_device.h>
@@ -25,14 +26,6 @@ MODULE_DESCRIPTION("PC Speaker beeper drMODULE_LICENSE ("GPL" );MODULE_ALIAS ("platform:pcspkr" ); -#if defined(CONFIG_MIPS ) || defined(CONFIG_X86 ) -/* Use the global PIT lock ! */ -#include <linux/i8253.h> -#else -#include <asm/8253pit.h> -static DEFINE_RAW_SPINLOCK (i8253_lock); -#endif -static int pcspkr_event (struct input_dev *dev,unsigned int type,unsigned int code,int value) {unsigned int count =0 ;
[tip:timers/cleanup] i8253: Make pcspkr input driver use the shared i8253_lock
Commit-ID: 2133e05bd64088cffd0f5d352c055fa7c9b9239a Gitweb: http://git.kernel.org/tip/2133e05bd64088cffd0f5d352c055fa7c9b9239a Author: Ralf Baechle <[email protected]> AuthorDate: Wed, 1 Jun 2011 19:05:02 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 9 Jun 2011 12:03:50 +0200
i8253: Make pcspkr input driver use the shared i8253_lock
--- drivers/input/misc/pcspkr.c | 9 +-------- 1 files changed, 1 insertions(+), 8 deletions(-)
drivers/input/misc/pcspkr.c +1 -8
@@ -14,6 +14,7 @@#include <linux/kernel.h> #include <linux/module.h> +#include <linux/i8253.h> #include <linux/init.h> #include <linux/input.h> #include <linux/platform_device.h>
@@ -25,14 +26,6 @@ MODULE_DESCRIPTION("PC Speaker beeper driver");MODULE_LICENSE ("GPL" );MODULE_ALIAS ("platform:pcspkr" ); -#if defined(CONFIG_MIPS ) || defined(CONFIG_X86 ) -/* Use the global PIT lock ! */ -#include <linux/i8253.h> -#else -#include <asm/8253pit.h> -static DEFINE_RAW_SPINLOCK (i8253_lock); -#endif -static int pcspkr_event (struct input_dev *dev,unsigned int type,unsigned int code,int value) {unsigned int count =0 ;
[tip:timers/cleanup] i8253: Make pcspkr input driver use the shared i8253_lock
In reply to [email protected]Commit-ID: 16ba9b061223c8a58b9b2e0dd01435111c4e902a Gitweb: http://git.kernel.org/tip/16ba9b061223c8a58b9b2e0dd01435111c4e902a Author: Ralf Baechle <[email protected]> AuthorDate: Wed, 1 Jun 2011 19:05:02 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 9 Jun 2011 15:01:38 +0200
i8253: Make pcspkr input driver use the shared i8253_lock
--- drivers/input/misc/pcspkr.c | 9 +-------- 1 files changed, 1 insertions(+), 8 deletions(-)
drivers/input/misc/pcspkr.c +1 -8
@@ -14,6 +14,7 @@#include <linux/kernel.h> #include <linux/module.h> +#include <linux/i8253.h> #include <linux/init.h> #include <linux/input.h> #include <linux/platform_device.h>
@@ -25,14 +26,6 @@ MODULE_DESCRIPTION("PC Speaker beeper driver");MODULE_LICENSE ("GPL" );MODULE_ALIAS ("platform:pcspkr" ); -#if defined(CONFIG_MIPS ) || defined(CONFIG_X86 ) -/* Use the global PIT lock ! */ -#include <linux/i8253.h> -#else -#include <asm/8253pit.h> -static DEFINE_RAW_SPINLOCK (i8253_lock); -#endif -static int pcspkr_event (struct input_dev *dev,unsigned int type,unsigned int code,int value) {unsigned int count =0 ;
PATCH 7/14 i8253: Make pcsp sound driver use the shared i8253_lock.
In reply to [email protected]To: [email protected]
Cc: Jaroslav Kysela <[email protected]>
Cc: Takashi Iwai <[email protected]>
Cc: [email protected]
sound/drivers/pcsp/pcsp.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
sound/drivers/pcsp/pcsp.h +1 -7
@@ -10,14 +10,8 @@#define __PCSP_H__#include <linux/hrtimer.h> -#include <linux/timex.h> -#if defined(CONFIG_MIPS ) || defined(CONFIG_X86 ) -/* Use the global PIT lock ! */ #include <linux/i8253.h> -#else -#include <asm/8253pit.h> -static DEFINE_RAW_SPINLOCK (i8253_lock); -#endif +#include <linux/timex.h> #define PCSP_SOUND_VERSION 0x400/* read 4.00 */ #define PCSP_DEBUG 0
Re: [alsa-devel] [patch 07/14] i8253: Make pcsp sound driver use the shared i8253_lock.
At Wed, 01 Jun 2011 19:05:03 +0100,
Quoted 6 lines · [email protected] wrote:
Signed-off-by Ralf Baechle <[email protected]>To: [email protected]
Cc: Jaroslav Kysela <[email protected]>
Cc: Takashi Iwai <[email protected]>
Cc: [email protected]
thanks,
Takashi
Quoted 31 lines
sound/drivers/pcsp/pcsp.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)Index:
linux-mips/sound/drivers/pcsp/pcsp.h
===================================================================sound/drivers/pcsp/pcsp.h +1
-7@@ -10,14 +10,8 @@#define __PCSP_H__#include <linux/hrtimer.h> -#include <linux/timex.h> -#if defined(CONFIG_MIPS ) || defined(CONFIG_X86 ) -/* Use the global PIT lock ! */ #include <linux/i8253.h> -#else -#include <asm/8253pit.h> -static DEFINE_RAW_SPINLOCK (i8253_lock); -#endif +#include <linux/timex.h> #define PCSP_SOUND_VERSION 0x400/* read 4.00 */ #define PCSP_DEBUG 0_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
[tip:timers/cleanup] i8253: Make pcsp sound driver use the shared i8253_lock
In reply to [email protected]Commit-ID: 1a8588c908e98c3b31a3a35595a94c655d569222 Gitweb: http://git.kernel.org/tip/1a8588c908e98c3b31a3a35595a94c655d569222 Author: Ralf Baechle <[email protected]> AuthorDate: Wed, 1 Jun 2011 19:05:03 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 9 Jun 2011 12:03:50 +0200
i8253: Make pcsp sound driver use the shared i8253_lock
--- sound/drivers/pcsp/pcsp.h | 8 +------- 1 files changed, 1 insertions(+), 7 deletions(-)
sound/drivers/pcsp/pcsp.h +1 -7
@@ -10,14 +10,8 @@#define __PCSP_H__#include <linux/hrtimer.h> -#include <linux/timex.h> -#if defined(CONFIG_MIPS ) || defined(CONFIG_X86 ) -/* Use the global PIT lock ! */ #include <linux/i8253.h> -#else -#include <asm/8253pit.h> -static DEFINE_RAW_SPINLOCK (i8253_lock); -#endif +#include <linux/timex.h> #define PCSP_SOUND_VERSION 0x400/* read 4.00 */ #define PCSP_DEBUG 0
[tip:timers/cleanup] i8253: Make pcsp sound driver use the shared i8253_lock
In reply to [email protected]Commit-ID: 8e1b5adfbee97a187d3e7188a0b248619b76682e Gitweb: http://git.kernel.org/tip/8e1b5adfbee97a187d3e7188a0b248619b76682e Author: Ralf Baechle <[email protected]> AuthorDate: Wed, 1 Jun 2011 19:05:03 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 9 Jun 2011 15:01:39 +0200
i8253: Make pcsp sound driver use the shared i8253_lock
--- sound/drivers/pcsp/pcsp.h | 8 +------- 1 files changed, 1 insertions(+), 7 deletions(-)
sound/drivers/pcsp/pcsp.h +1 -7
@@ -10,14 +10,8 @@#define __PCSP_H__#include <linux/hrtimer.h> -#include <linux/timex.h> -#if defined(CONFIG_MIPS ) || defined(CONFIG_X86 ) -/* Use the global PIT lock ! */ #include <linux/i8253.h> -#else -#include <asm/8253pit.h> -static DEFINE_RAW_SPINLOCK (i8253_lock); -#endif +#include <linux/timex.h> #define PCSP_SOUND_VERSION 0x400/* read 4.00 */ #define PCSP_DEBUG 0
PATCH 8/14 i8253: Alpha: Cleanup remaining users of i8253pit.h
In reply to [email protected]The Alpha <asm/i8253pit.h> header is empty so this inclusion can just be removed.
To: [email protected]
Cc: Richard Henderson <[email protected]>
Cc: Ivan Kokshaysky <[email protected]>
Cc: Matt Turner <[email protected]>
Cc: [email protected]
arch/alpha/kernel/sys_ruffian.c | 1 - arch/alpha/kernel/time.c | 1 - 2 files changed, 2 deletions(-)
arch/alpha/kernel/sys_ruffian.c +0 -1
@@ -26,7 +26,6 @@#include <asm/pgtable.h> #include <asm/core_cia.h> #include <asm/tlbflush.h> -#include <asm/8253pit.h> #include "proto.h" #include "irq_impl.h"
arch/alpha/kernel/time.c +0 -1
@@ -46,7 +46,6 @@#include <asm/uaccess.h> #include <asm/io.h> #include <asm/hwrpb.h> -#include <asm/8253pit.h> #include <asm/rtc.h> #include <linux/mc146818rtc.h>
[tip:timers/cleanup] alpha: i8253: Cleanup remaining users of i8253pit.h
Commit-ID: d49a40fb35042368fffd28c247fa82f07fa35ec4 Gitweb: http://git.kernel.org/tip/d49a40fb35042368fffd28c247fa82f07fa35ec4 Author: Ralf Baechle <[email protected]> AuthorDate: Wed, 1 Jun 2011 19:05:04 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 9 Jun 2011 12:03:50 +0200
alpha: i8253: Cleanup remaining users of i8253pit.h
The Alpha <asm/i8253pit.h> header is empty so this inclusion can just be removed.
--- arch/alpha/kernel/sys_ruffian.c | 1 - arch/alpha/kernel/time.c | 1 - 2 files changed, 0 insertions(+), 2 deletions(-)
arch/alpha/kernel/sys_ruffian.c +0 -1
@@ -26,7 +26,6 @@#include <asm/pgtable.h> #include <asm/core_cia.h> #include <asm/tlbflush.h> -#include <asm/8253pit.h> #include "proto.h" #include "irq_impl.h"
arch/alpha/kernel/time.c +0 -1
@@ -46,7 +46,6 @@#include <asm/uaccess.h> #include <asm/io.h> #include <asm/hwrpb.h> -#include <asm/8253pit.h> #include <asm/rtc.h> #include <linux/mc146818rtc.h>
[tip:timers/cleanup] alpha: i8253: Cleanup remaining users of i8253pit.h
In reply to [email protected]Commit-ID: 36af1b461293e838d6f47edd6f59f0beac222600 Gitweb: http://git.kernel.org/tip/36af1b461293e838d6f47edd6f59f0beac222600 Author: Ralf Baechle <[email protected]> AuthorDate: Wed, 1 Jun 2011 19:05:04 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 9 Jun 2011 15:01:39 +0200
alpha: i8253: Cleanup remaining users of i8253pit.h
The Alpha <asm/i8253pit.h> header is empty so this inclusion can just be removed.
--- arch/alpha/kernel/sys_ruffian.c | 1 - arch/alpha/kernel/time.c | 1 - 2 files changed, 0 insertions(+), 2 deletions(-)
arch/alpha/kernel/sys_ruffian.c +0 -1
@@ -26,7 +26,6 @@#include <asm/pgtable.h> #include <asm/core_cia.h> #include <asm/tlbflush.h> -#include <asm/8253pit.h> #include "proto.h" #include "irq_impl.h"
arch/alpha/kernel/time.c +0 -1
@@ -46,7 +46,6 @@#include <asm/uaccess.h> #include <asm/io.h> #include <asm/hwrpb.h> -#include <asm/8253pit.h> #include <asm/rtc.h> #include <linux/mc146818rtc.h>
PATCH 9/14 i8253: Alpha, PowerPC: Remove unused <asm/8253pit.h> header.
In reply to [email protected]To: [email protected]
Cc: Richard Henderson <[email protected]>
Cc: Ivan Kokshaysky <[email protected]>
Cc: Matt Turner <[email protected]>
Cc: [email protected]
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: [email protected]
arch/alpha/include/asm/8253pit.h | 3 --- arch/powerpc/include/asm/8253pit.h | 3 --- 2 files changed, 6 deletions(-)
arch/alpha/include/asm/8253pit.h deleted +0 -3
@@ -1,3 +0,0 @@ -/* -* 8253/8254 Programmable Interval Timer -*/
arch/powerpc/include/asm/8253pit.h deleted +0 -3
@@ -1,3 +0,0 @@ -/* -* 8253/8254 Programmable Interval Timer -*/
Re: [patch 09/14] i8253: Alpha, PowerPC: Remove unused <asm/8253pit.h> header.
Quoted 12 lines · On Wed, 2011-06-01 at 19:05 +0100, [email protected] wrote:
plain text document attachment (i8253-remove-unused-8253pit.h-files.patch)
Signed-off-by Ralf Baechle <[email protected]>To: [email protected]
Cc: Richard Henderson <[email protected]>
Cc: Ivan Kokshaysky <[email protected]>
Cc: Matt Turner <[email protected]>
Cc: [email protected]
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: [email protected]
Quoted 3 lines
arch/alpha/include/asm/8253pit.h | 3 --- arch/powerpc/include/asm/8253pit.h | 3 --- 2 files changed, 6 deletions(-)
Thanks !
Ben.
Quoted 17 lines
Index:
linux-mips/arch/alpha/include/asm/8253pit.h
===================================================================arch/alpha/include/asm/8253pit.h deleted +0
-3@@ -1,3 +0,0 @@ -/* -* 8253/8254 Programmable Interval Timer -*/ Index:
linux-mips/arch/powerpc/include/asm/8253pit.h
===================================================================arch/powerpc/include/asm/8253pit.h deleted +0
-3@@ -1,3 +0,0 @@ -/* -* 8253/8254 Programmable Interval Timer -*/
[tip:timers/cleanup] i8253: Alpha, PowerPC: Remove unused asm/8253pit.h
In reply to [email protected]Commit-ID: f056955cd8f0c0aaaf311dcff5ab209beb6bd9ea Gitweb: http://git.kernel.org/tip/f056955cd8f0c0aaaf311dcff5ab209beb6bd9ea Author: Ralf Baechle <[email protected]> AuthorDate: Wed, 1 Jun 2011 19:05:05 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 9 Jun 2011 12:03:51 +0200
i8253: Alpha, PowerPC: Remove unused asm/8253pit.h
--- arch/alpha/include/asm/8253pit.h | 3 --- arch/powerpc/include/asm/8253pit.h | 3 --- 2 files changed, 0 insertions(+), 6 deletions(-)
arch/alpha/include/asm/8253pit.h deleted +0 -3
@@ -1,3 +0,0 @@ -/* -* 8253/8254 Programmable Interval Timer -*/
arch/powerpc/include/asm/8253pit.h deleted +0 -3
@@ -1,3 +0,0 @@ -/* -* 8253/8254 Programmable Interval Timer -*/
[tip:timers/cleanup] i8253: Alpha, PowerPC: Remove unused asm/8253pit.h
In reply to [email protected]Commit-ID: 75bba0143454d0fef1b42d5b35cb5bd2f9388901 Gitweb: http://git.kernel.org/tip/75bba0143454d0fef1b42d5b35cb5bd2f9388901 Author: Ralf Baechle <[email protected]> AuthorDate: Wed, 1 Jun 2011 19:05:05 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 9 Jun 2011 15:01:39 +0200
i8253: Alpha, PowerPC: Remove unused asm/8253pit.h
--- arch/alpha/include/asm/8253pit.h | 3 --- arch/powerpc/include/asm/8253pit.h | 3 --- 2 files changed, 0 insertions(+), 6 deletions(-)
arch/alpha/include/asm/8253pit.h deleted +0 -3
@@ -1,3 +0,0 @@ -/* -* 8253/8254 Programmable Interval Timer -*/
arch/powerpc/include/asm/8253pit.h deleted +0 -3
@@ -1,3 +0,0 @@ -/* -* 8253/8254 Programmable Interval Timer -*/
PATCH 10/14 i8253: x86: Consolidate definitions of global_clock_event
In reply to [email protected]There are multiple declarations of global_clock_event in header files specific to particular clock event implementatiosn. Consolidate them in <asm/time.h> and make sure all users include that header.
To: [email protected]
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: [email protected]
Cc: "Venkatesh Pallipadi (Venki)" <[email protected]>
arch/x86/include/asm/apb_timer.h | 1 - arch/x86/include/asm/i8253.h | 2 -- arch/x86/include/asm/time.h | 6 ++++-- arch/x86/kernel/apb_timer.c | 1 + arch/x86/kernel/apic/apic.c | 1 + arch/x86/kernel/hpet.c | 1 + arch/x86/kernel/i8253.c | 1 + 7 files changed, 8 insertions(+), 5 deletions(-)
arch/x86/include/asm/apb_timer.h +0 -1
@@ -50,7 +50,6 @@#define APBT_DEV_USED 1extern void apbt_time_init (void ); -extern struct clock_event_device *global_clock_event;extern unsigned long apbt_quick_calibrate (void );extern int arch_setup_apbt_irqs (int irq,int trigger,int mask,int cpu);extern void apbt_setup_secondary_clock (void );
arch/x86/include/asm/i8253.h +0 -2
@@ -3,8 +3,6 @@#define PIT_LATCH LATCH -extern struct clock_event_device *global_clock_event; -extern void setup_pit_timer (void );#endif /* _ASM_X86_I8253_H */
arch/x86/include/asm/time.h +4 -2
@@ -1,10 +1,12 @@#ifndef _ASM_X86_TIME_H#define _ASM_X86_TIME_H -extern void hpet_time_init (void ); - +#include <linux/clocksource.h> #include <asm/mc146818rtc.h> +extern void hpet_time_init (void );extern void time_init (void ); +extern struct clock_event_device *global_clock_event; +#endif /* _ASM_X86_TIME_H */
arch/x86/kernel/apb_timer.c +1 -0
@@ -44,6 +44,7 @@#include <asm/fixmap.h> #include <asm/apb_timer.h> #include <asm/mrst.h> +#include <asm/time.h> #define APBT_MASK CLOCKSOURCE_MASK(32)#define APBT_SHIFT 22
arch/x86/kernel/apic/apic.c +1 -0
@@ -48,6 +48,7 @@#include <asm/hpet.h> #include <asm/idle.h> #include <asm/mtrr.h> +#include <asm/time.h> #include <asm/smp.h> #include <asm/mce.h> #include <asm/tsc.h>
arch/x86/kernel/hpet.c +1 -0
@@ -14,6 +14,7 @@#include <asm/fixmap.h> #include <asm/hpet.h> +#include <asm/time.h> #define HPET_MASK CLOCKSOURCE_MASK(32)
arch/x86/kernel/i8253.c +1 -0
@@ -14,6 +14,7 @@#include <linux/io.h> #include <asm/hpet.h> +#include <asm/time.h> #include <asm/smp.h> /*
[tip:timers/cleanup] x86: i8253: Consolidate definitions of global_clock_event
Commit-ID: 219c54629c73323ddd5281de1bb1dfe0004185dd Gitweb: http://git.kernel.org/tip/219c54629c73323ddd5281de1bb1dfe0004185dd Author: Ralf Baechle <[email protected]> AuthorDate: Wed, 1 Jun 2011 19:05:06 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 9 Jun 2011 12:03:51 +0200
x86: i8253: Consolidate definitions of global_clock_event
There are multiple declarations of global_clock_event in header files specific to particular clock event implementations. Consolidate them in <asm/time.h> and make sure all users include that header.
--- arch/x86/include/asm/apb_timer.h | 1 - arch/x86/include/asm/i8253.h | 2 -- arch/x86/include/asm/time.h | 6 ++++-- arch/x86/kernel/apb_timer.c | 1 + arch/x86/kernel/apic/apic.c | 1 + arch/x86/kernel/hpet.c | 1 + arch/x86/kernel/i8253.c | 1 + 7 files changed, 8 insertions(+), 5 deletions(-)
arch/x86/include/asm/apb_timer.h +0 -1
@@ -50,7 +50,6 @@#define APBT_DEV_USED 1extern void apbt_time_init (void ); -extern struct clock_event_device *global_clock_event;extern unsigned long apbt_quick_calibrate (void );extern int arch_setup_apbt_irqs (int irq,int trigger,int mask,int cpu);extern void apbt_setup_secondary_clock (void );
arch/x86/include/asm/i8253.h +0 -2
@@ -3,8 +3,6 @@#define PIT_LATCH LATCH -extern struct clock_event_device *global_clock_event; -extern void setup_pit_timer (void );#endif /* _ASM_X86_I8253_H */
arch/x86/include/asm/time.h +4 -2
@@ -1,10 +1,12 @@#ifndef _ASM_X86_TIME_H#define _ASM_X86_TIME_H -extern void hpet_time_init (void ); - +#include <linux/clocksource.h> #include <asm/mc146818rtc.h> +extern void hpet_time_init (void );extern void time_init (void ); +extern struct clock_event_device *global_clock_event; +#endif /* _ASM_X86_TIME_H */
arch/x86/kernel/apb_timer.c +1 -0
@@ -44,6 +44,7 @@#include <asm/fixmap.h> #include <asm/apb_timer.h> #include <asm/mrst.h> +#include <asm/time.h> #define APBT_MASK CLOCKSOURCE_MASK(32)#define APBT_SHIFT 22
arch/x86/kernel/apic/apic.c +1 -0
@@ -48,6 +48,7 @@#include <asm/hpet.h> #include <asm/idle.h> #include <asm/mtrr.h> +#include <asm/time.h> #include <asm/smp.h> #include <asm/mce.h> #include <asm/tsc.h>
arch/x86/kernel/hpet.c +1 -0
@@ -14,6 +14,7 @@#include <asm/fixmap.h> #include <asm/hpet.h> +#include <asm/time.h> #define HPET_MASK CLOCKSOURCE_MASK(32)
arch/x86/kernel/i8253.c +1 -0
@@ -14,6 +14,7 @@#include <linux/io.h> #include <asm/hpet.h> +#include <asm/time.h> #include <asm/smp.h> /*
[tip:timers/cleanup] x86: i8253: Consolidate definitions of global_clock_event
In reply to [email protected]Commit-ID: 16f871bc30f86560017b9d34520593a28e08f373 Gitweb: http://git.kernel.org/tip/16f871bc30f86560017b9d34520593a28e08f373 Author: Ralf Baechle <[email protected]> AuthorDate: Wed, 1 Jun 2011 19:05:06 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 9 Jun 2011 15:01:40 +0200
x86: i8253: Consolidate definitions of global_clock_event
There are multiple declarations of global_clock_event in header files specific to particular clock event implementations. Consolidate them in <asm/time.h> and make sure all users include that header.
--- arch/x86/include/asm/apb_timer.h | 1 - arch/x86/include/asm/i8253.h | 2 -- arch/x86/include/asm/time.h | 6 ++++-- arch/x86/kernel/apb_timer.c | 1 + arch/x86/kernel/apic/apic.c | 1 + arch/x86/kernel/hpet.c | 1 + arch/x86/kernel/i8253.c | 1 + 7 files changed, 8 insertions(+), 5 deletions(-)
arch/x86/include/asm/apb_timer.h +0 -1
@@ -50,7 +50,6 @@#define APBT_DEV_USED 1extern void apbt_time_init (void ); -extern struct clock_event_device *global_clock_event;extern unsigned long apbt_quick_calibrate (void );extern int arch_setup_apbt_irqs (int irq,int trigger,int mask,int cpu);extern void apbt_setup_secondary_clock (void );
arch/x86/include/asm/i8253.h +0 -2
@@ -3,8 +3,6 @@#define PIT_LATCH LATCH -extern struct clock_event_device *global_clock_event; -extern void setup_pit_timer (void );#endif /* _ASM_X86_I8253_H */
arch/x86/include/asm/time.h +4 -2
@@ -1,10 +1,12 @@#ifndef _ASM_X86_TIME_H#define _ASM_X86_TIME_H -extern void hpet_time_init (void ); - +#include <linux/clocksource.h> #include <asm/mc146818rtc.h> +extern void hpet_time_init (void );extern void time_init (void ); +extern struct clock_event_device *global_clock_event; +#endif /* _ASM_X86_TIME_H */
arch/x86/kernel/apb_timer.c +1 -0
@@ -44,6 +44,7 @@#include <asm/fixmap.h> #include <asm/apb_timer.h> #include <asm/mrst.h> +#include <asm/time.h> #define APBT_MASK CLOCKSOURCE_MASK(32)#define APBT_SHIFT 22
arch/x86/kernel/apic/apic.c +1 -0
@@ -48,6 +48,7 @@#include <asm/hpet.h> #include <asm/idle.h> #include <asm/mtrr.h> +#include <asm/time.h> #include <asm/smp.h> #include <asm/mce.h> #include <asm/tsc.h>
arch/x86/kernel/hpet.c +1 -0
@@ -14,6 +14,7 @@#include <asm/fixmap.h> #include <asm/hpet.h> +#include <asm/time.h> #define HPET_MASK CLOCKSOURCE_MASK(32)
arch/x86/kernel/i8253.c +1 -0
@@ -14,6 +14,7 @@#include <linux/io.h> #include <asm/hpet.h> +#include <asm/time.h> #include <asm/smp.h> /*
PATCH 11/14 i8253: Consolidate definitions of PIT_LATCH
In reply to [email protected]x86 defines PIT_LATCH as LATCH which in <linux/timex.h> is defined as ((CLOCK_TICK_RATE + HZ/2) / HZ) and <asm/timex.h> again defines CLOCK_TICK_RATE as PIT_TICK_RATE.
MIPS defines PIT_LATCH as LATCH which in <linux/timex.h> is defined as ((CLOCK_TICK_RATE + HZ/2) / HZ) and <asm/timex.h> again defines CLOCK_TICK_RATE as 1193182.
ARM defines PITCH_LATCH as ((PIT_TICK_RATE + HZ / 2) / HZ) - and that's the sanest thing and equivalent to above definitions so use that as the new definition in <linux/i8253.h>.
To: [email protected]
Cc: Russell King <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
arch/arm/include/asm/i8253.h | 2 -- arch/mips/include/asm/i8253.h | 2 -- arch/x86/include/asm/i8253.h | 2 -- include/linux/i8253.h | 4 ++++ 4 files changed, 4 insertions(+), 6 deletions(-)
arch/arm/include/asm/i8253.h +0 -2
@@ -1,6 +1,4 @@#ifndef __ASMARM_I8253_H#define __ASMARM_I8253_H -#define PIT_LATCH ((PIT_TICK_RATE + HZ / 2) / HZ) -#endif
arch/mips/include/asm/i8253.h +0 -2
@@ -5,8 +5,6 @@#ifndef __ASM_I8253_H#define __ASM_I8253_H -#define PIT_LATCH LATCH -extern void setup_pit_timer (void );#endif /* __ASM_I8253_H */
arch/x86/include/asm/i8253.h +0 -2
@@ -1,8 +1,6 @@#ifndef _ASM_X86_I8253_H#define _ASM_X86_I8253_H -#define PIT_LATCH LATCH -extern void setup_pit_timer (void );#endif /* _ASM_X86_I8253_H */
include/linux/i8253.h +4 -0
@@ -9,7 +9,9 @@#ifndef __LINUX_I8253_H#define __LINUX_I8253_H +#include <linux/param.h> #include <linux/spinlock.h> +#include <linux/timex.h> #include <asm/i8253.h> /* i8253A PIT registers */
@@ -17,6 +19,8 @@#define PIT_CH0 0x40#define PIT_CH2 0x42 +#define PIT_LATCH ((PIT_TICK_RATE + HZ/2) / HZ) +#define inb_pit inb_p#define outb_pit outb_p
[tip:timers/cleanup] i8253: Consolidate definitions of PIT_LATCH
Commit-ID: 00775d56568d925e74f8b52dddf5ba592ed69021 Gitweb: http://git.kernel.org/tip/00775d56568d925e74f8b52dddf5ba592ed69021 Author: Ralf Baechle <[email protected]> AuthorDate: Wed, 1 Jun 2011 19:05:07 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 9 Jun 2011 12:03:51 +0200
i8253: Consolidate definitions of PIT_LATCH
x86 defines PIT_LATCH as LATCH which in <linux/timex.h> is defined as ((CLOCK_TICK_RATE + HZ/2) / HZ) and <asm/timex.h> again defines CLOCK_TICK_RATE as PIT_TICK_RATE.
MIPS defines PIT_LATCH as LATCH which in <linux/timex.h> is defined as ((CLOCK_TICK_RATE + HZ/2) / HZ) and <asm/timex.h> again defines CLOCK_TICK_RATE as 1193182.
ARM defines PITCH_LATCH as ((PIT_TICK_RATE + HZ / 2) / HZ) - and that's the sanest thing and equivalent to above definitions so use that as the new definition in <linux/i8253.h>.
--- arch/arm/include/asm/i8253.h | 2 -- arch/mips/include/asm/i8253.h | 2 -- arch/x86/include/asm/i8253.h | 2 -- include/linux/i8253.h | 4 ++++ 4 files changed, 4 insertions(+), 6 deletions(-)
arch/arm/include/asm/i8253.h +0 -2
@@ -1,6 +1,4 @@#ifndef __ASMARM_I8253_H#define __ASMARM_I8253_H -#define PIT_LATCH ((PIT_TICK_RATE + HZ / 2) / HZ) -#endif
arch/mips/include/asm/i8253.h +0 -2
@@ -5,8 +5,6 @@#ifndef __ASM_I8253_H#define __ASM_I8253_H -#define PIT_LATCH LATCH -extern void setup_pit_timer (void );#endif /* __ASM_I8253_H */
arch/x86/include/asm/i8253.h +0 -2
@@ -1,8 +1,6 @@#ifndef _ASM_X86_I8253_H#define _ASM_X86_I8253_H -#define PIT_LATCH LATCH -extern void setup_pit_timer (void );#endif /* _ASM_X86_I8253_H */
include/linux/i8253.h +4 -0
@@ -9,7 +9,9 @@#ifndef __LINUX_I8253_H#define __LINUX_I8253_H +#include <linux/param.h> #include <linux/spinlock.h> +#include <linux/timex.h> #include <asm/i8253.h> /* i8253A PIT registers */
@@ -17,6 +19,8 @@#define PIT_CH0 0x40#define PIT_CH2 0x42 +#define PIT_LATCH ((PIT_TICK_RATE + HZ/2) / HZ) +#define inb_pit inb_p#define outb_pit outb_p
[tip:timers/cleanup] i8253: Consolidate definitions of PIT_LATCH
In reply to [email protected]Commit-ID: 49cf3f29a1ef2e59f1be823e376c1fbac586eb8d Gitweb: http://git.kernel.org/tip/49cf3f29a1ef2e59f1be823e376c1fbac586eb8d Author: Ralf Baechle <[email protected]> AuthorDate: Wed, 1 Jun 2011 19:05:07 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 9 Jun 2011 15:01:40 +0200
i8253: Consolidate definitions of PIT_LATCH
x86 defines PIT_LATCH as LATCH which in <linux/timex.h> is defined as ((CLOCK_TICK_RATE + HZ/2) / HZ) and <asm/timex.h> again defines CLOCK_TICK_RATE as PIT_TICK_RATE.
MIPS defines PIT_LATCH as LATCH which in <linux/timex.h> is defined as ((CLOCK_TICK_RATE + HZ/2) / HZ) and <asm/timex.h> again defines CLOCK_TICK_RATE as 1193182.
ARM defines PITCH_LATCH as ((PIT_TICK_RATE + HZ / 2) / HZ) - and that's the sanest thing and equivalent to above definitions so use that as the new definition in <linux/i8253.h>.
--- arch/arm/include/asm/i8253.h | 2 -- arch/mips/include/asm/i8253.h | 2 -- arch/x86/include/asm/i8253.h | 2 -- include/linux/i8253.h | 4 ++++ 4 files changed, 4 insertions(+), 6 deletions(-)
arch/arm/include/asm/i8253.h +0 -2
@@ -1,6 +1,4 @@#ifndef __ASMARM_I8253_H#define __ASMARM_I8253_H -#define PIT_LATCH ((PIT_TICK_RATE + HZ / 2) / HZ) -#endif
arch/mips/include/asm/i8253.h +0 -2
@@ -5,8 +5,6 @@#ifndef __ASM_I8253_H#define __ASM_I8253_H -#define PIT_LATCH LATCH -extern void setup_pit_timer (void );#endif /* __ASM_I8253_H */
arch/x86/include/asm/i8253.h +0 -2
@@ -1,8 +1,6 @@#ifndef _ASM_X86_I8253_H#define _ASM_X86_I8253_H -#define PIT_LATCH LATCH -extern void setup_pit_timer (void );#endif /* _ASM_X86_I8253_H */
include/linux/i8253.h +4 -0
@@ -9,7 +9,9 @@#ifndef __LINUX_I8253_H#define __LINUX_I8253_H +#include <linux/param.h> #include <linux/spinlock.h> +#include <linux/timex.h> #include <asm/i8253.h> /* i8253A PIT registers */
@@ -17,6 +19,8 @@#define PIT_CH0 0x40#define PIT_CH2 0x42 +#define PIT_LATCH ((PIT_TICK_RATE + HZ/2) / HZ) +#define inb_pit inb_p#define outb_pit outb_p
PATCH 12/14 i8253: Move remaining content and delete <asm/i8253.h>
In reply to [email protected]There is no really good other place but one line for two out of three architectures that have a <asm/i8253.h> file doesn't justify this files existence.
To: [email protected]
Cc: [email protected]
Cc: Russell King <[email protected]>
Cc: [email protected]
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: [email protected]
arch/arm/include/asm/i8253.h | 4 ---- arch/mips/include/asm/i8253.h | 10 ---------- arch/mips/include/asm/time.h | 5 +++++ arch/x86/include/asm/i8253.h | 6 ------ arch/x86/include/asm/time.h | 1 + include/linux/i8253.h | 1 - 6 files changed, 6 insertions(+), 21 deletions(-)
arch/x86/include/asm/i8253.h deleted +0 -6
@@ -1,6 +0,0 @@ -#ifndef _ASM_X86_I8253_H -#define _ASM_X86_I8253_H - -extern void setup_pit_timer (void ); - -#endif /* _ASM_X86_I8253_H */
include/linux/i8253.h +0 -1
@@ -12,7 +12,6 @@#include <linux/param.h> #include <linux/spinlock.h> #include <linux/timex.h> -#include <asm/i8253.h> /* i8253A PIT registers */ #define PIT_MODE 0x43
arch/x86/include/asm/time.h +1 -0
@@ -6,6 +6,7 @@extern void hpet_time_init (void );extern void time_init (void ); +extern void setup_pit_timer (void );extern struct clock_event_device *global_clock_event;
arch/mips/include/asm/i8253.h deleted +0 -10
@@ -1,10 +0,0 @@ -/* -* Machine specific IO port address definition for generic. -* Written by Osamu Tomita <[email protected]> -*/ -#ifndef __ASM_I8253_H -#define __ASM_I8253_H - -extern void setup_pit_timer (void ); - -#endif /* __ASM_I8253_H */
arch/arm/include/asm/i8253.h deleted +0 -4
@@ -1,4 +0,0 @@ -#ifndef __ASMARM_I8253_H -#define __ASMARM_I8253_H - -#endif
arch/mips/include/asm/time.h +5 -0
@@ -36,6 +36,11 @@ extern int rtc_mips_set_mmss(unsigned loextern void plat_time_init (void );/* +* Initialize i8253 / i8254 PIT clockevent device. +*/ +extern void setup_pit_timer (void ); + +/* * mips_hpt_frequency - must be set if you intend to use an R4k-compatible * counter as a timer interrupt source. */
Re: [patch 12/14] i8253: Move remaining content and delete <asm/i8253.h>
Hello.
Quoted 3 lines · ralf at linux-mips.org
There is no really good other place but one line for two out of three architectures that have a <
asm/i8253.h> file doesn't justify this files existence.
I couldn't parse that. :-)
Quoted 9 lines
Signed-off-by Ralf Baechle <[email protected]>To: linux-kernel at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: Russell King <[email protected]>
Cc: linux-mips at linux-mips.org
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: x86 at kernel.org
WBR, Sergei
[tip:timers/cleanup] i8253: Move remaining content and delete asm/i8253.h
In reply to [email protected]Commit-ID: 4cd8483247271d007af3a1167c0d5500b084135a Gitweb: http://git.kernel.org/tip/4cd8483247271d007af3a1167c0d5500b084135a Author: Ralf Baechle <[email protected]> AuthorDate: Wed, 1 Jun 2011 19:05:08 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 9 Jun 2011 12:03:52 +0200
i8253: Move remaining content and delete asm/i8253.h
Move setup_pit_timer() declaration to the common header file and remove the arch specific ones.
[ tglx: Move it to linux/i8253.h instead of asm/mips and asm/x86 ]
--- arch/arm/include/asm/i8253.h | 4 ---- arch/mips/include/asm/i8253.h | 10 ---------- arch/x86/include/asm/i8253.h | 6 ------ include/linux/i8253.h | 3 ++- 4 files changed, 2 insertions(+), 21 deletions(-)
arch/arm/include/asm/i8253.h deleted +0 -4
@@ -1,4 +0,0 @@ -#ifndef __ASMARM_I8253_H -#define __ASMARM_I8253_H - -#endif
arch/mips/include/asm/i8253.h deleted +0 -10
@@ -1,10 +0,0 @@ -/* -* Machine specific IO port address definition for generic. -* Written by Osamu Tomita <[email protected]> -*/ -#ifndef __ASM_I8253_H -#define __ASM_I8253_H - -extern void setup_pit_timer (void ); - -#endif /* __ASM_I8253_H */
arch/x86/include/asm/i8253.h deleted +0 -6
@@ -1,6 +0,0 @@ -#ifndef _ASM_X86_I8253_H -#define _ASM_X86_I8253_H - -extern void setup_pit_timer (void ); - -#endif /* _ASM_X86_I8253_H */
include/linux/i8253.h +2 -1
@@ -12,7 +12,6 @@#include <linux/param.h> #include <linux/spinlock.h> #include <linux/timex.h> -#include <asm/i8253.h> /* i8253A PIT registers */ #define PIT_MODE 0x43
@@ -26,4 +25,6 @@extern raw_spinlock_t i8253_lock; +extern void setup_pit_timer (void ); +#endif /* __LINUX_I8253_H */
[tip:timers/cleanup] i8253: Move remaining content and delete asm/i8253.h
In reply to [email protected]Commit-ID: 850492760cfd38d14d64a5fc6d636091464f755e Gitweb: http://git.kernel.org/tip/850492760cfd38d14d64a5fc6d636091464f755e Author: Ralf Baechle <[email protected]> AuthorDate: Wed, 1 Jun 2011 19:05:08 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 9 Jun 2011 15:01:40 +0200
i8253: Move remaining content and delete asm/i8253.h
Move setup_pit_timer() declaration to the common header file and remove the arch specific ones.
[ tglx: Move it to linux/i8253.h instead of asm/mips and asm/x86 ]
--- arch/arm/include/asm/i8253.h | 4 ---- arch/mips/include/asm/i8253.h | 10 ---------- arch/x86/include/asm/i8253.h | 6 ------ include/linux/i8253.h | 3 ++- 4 files changed, 2 insertions(+), 21 deletions(-)
arch/arm/include/asm/i8253.h deleted +0 -4
@@ -1,4 +0,0 @@ -#ifndef __ASMARM_I8253_H -#define __ASMARM_I8253_H - -#endif
arch/mips/include/asm/i8253.h deleted +0 -10
@@ -1,10 +0,0 @@ -/* -* Machine specific IO port address definition for generic. -* Written by Osamu Tomita <[email protected]> -*/ -#ifndef __ASM_I8253_H -#define __ASM_I8253_H - -extern void setup_pit_timer (void ); - -#endif /* __ASM_I8253_H */
arch/x86/include/asm/i8253.h deleted +0 -6
@@ -1,6 +0,0 @@ -#ifndef _ASM_X86_I8253_H -#define _ASM_X86_I8253_H - -extern void setup_pit_timer (void ); - -#endif /* _ASM_X86_I8253_H */
include/linux/i8253.h +2 -1
@@ -12,7 +12,6 @@#include <linux/param.h> #include <linux/spinlock.h> #include <linux/timex.h> -#include <asm/i8253.h> /* i8253A PIT registers */ #define PIT_MODE 0x43
@@ -26,4 +25,6 @@extern raw_spinlock_t i8253_lock; +extern void setup_pit_timer (void ); +#endif /* __LINUX_I8253_H */
PATCH 13/14 PCSPKR: Cleanup Kconfig dependencies
In reply to [email protected]Lenghty lists of the kind "depends on ARCH1 || ARCH2 ... || ARCH123" are usually either wrong or too coarse grained. Or plain an ugly sin.
To: [email protected]
Cc: Richard Henderson <[email protected]>
Cc: Ivan Kokshaysky <[email protected]>
Cc: Matt Turner <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
arch/alpha/Kconfig | 1 + arch/mips/Kconfig | 1 + arch/powerpc/platforms/chrp/Kconfig | 1 + arch/powerpc/platforms/prep/Kconfig | 1 + arch/powerpc/platforms/pseries/Kconfig | 1 + arch/x86/Kconfig | 1 + init/Kconfig | 5 ++++- 7 files changed, 10 insertions(+), 1 deletion(-)
arch/alpha/Kconfig +1 -0
@@ -6,6 +6,7 @@ config ALPHA select HAVE_OPROFILE select HAVE_SYSCALL_WRAPPERS select HAVE_IRQ_WORK + select HAVE_PCSPKR_PLATFORM select HAVE_PERF_EVENTS select HAVE_DMA_ATTRS select HAVE_GENERIC_HARDIRQS
arch/mips/Kconfig +1 -0
@@ -5,6 +5,7 @@ config MIPS select HAVE_IDE select HAVE_OPROFILE select HAVE_IRQ_WORK + select HAVE_PCSPKR_PLATFORM select HAVE_PERF_EVENTS select PERF_USE_VMALLOC select HAVE_ARCH_KGDB
arch/powerpc/platforms/chrp/Kconfig +1 -0
@@ -1,6 +1,7 @@ config PPC_CHRP bool "Common Hardware Reference Platform (CHRP) based machines" depends on 6xx + select HAVE_PCSPKR_PLATFORM select MPIC select PPC_I8259 select PPC_INDIRECT_PCI
arch/powerpc/platforms/prep/Kconfig +1 -0
@@ -1,6 +1,7 @@ config PPC_PREP bool "PowerPC Reference Platform (PReP) based machines" depends on 6xx && BROKEN + select HAVE_PCSPKR_PLATFORM select MPIC select PPC_I8259 select PPC_INDIRECT_PCI
arch/powerpc/platforms/pseries/Kconfig +1 -0
@@ -1,6 +1,7 @@ config PPC_PSERIES depends on PPC64 && PPC_BOOK3S bool "IBM pSeries & new (POWER5-based) iSeries" + select HAVE_PCSPKR_PLATFORM select MPIC select PCI_MSI select PPC_XICS
arch/x86/Kconfig +1 -0
@@ -20,6 +20,7 @@ config X86 select HAVE_UNSTABLE_SCHED_CLOCK select HAVE_IDE select HAVE_OPROFILE + select HAVE_PCSPKR_PLATFORM select HAVE_PERF_EVENTS select HAVE_IRQ_WORK select HAVE_IOREMAP_PROT
init/Kconfig +4 -1
@@ -1001,12 +1001,15 @@ config ELF_CORE config PCSPKR_PLATFORM bool "Enable PC-Speaker support" if EXPERT - depends on ALPHA || X86 || MIPS || PPC_PREP || PPC_CHRP || PPC_PSERIES + depends on HAVE_PCSPKR_PLATFORM default y help This option allows to disable the internal PC-Speaker support, saving some memory. +config HAVE_PCSPKR_PLATFORM + bool + config BASE_FULL default y bool "Enable full-sized data structures for core" if EXPERT
Re: [patch 13/14] PCSPKR: Cleanup Kconfig dependencies
Quoted 4 lines · On Wed, 2011-06-01 at 19:05 +0100, [email protected] wrote:
plain text document attachment (i8253-use-aux-symbol-for-pcspkr-config.patch)
Lenghty lists of the kind "depends on ARCH1 || ARCH2 ... || ARCH123" are usually either wrong or too coarse grained. Or plain an ugly sin.
---
Quoted 14 lines
Signed-off-by Ralf Baechle <[email protected]>To: [email protected]
Cc: Richard Henderson <[email protected]>
Cc: Ivan Kokshaysky <[email protected]>
Cc: Matt Turner <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
[tip:timers/cleanup] pcspkr: Cleanup Kconfig dependencies
In reply to [email protected]Commit-ID: ee65d52682535ea1343acb672898ed3c362e185c Gitweb: http://git.kernel.org/tip/ee65d52682535ea1343acb672898ed3c362e185c Author: Ralf Baechle <[email protected]> AuthorDate: Wed, 1 Jun 2011 19:05:09 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 9 Jun 2011 12:03:52 +0200
pcspkr: Cleanup Kconfig dependencies
Lenghty lists of the kind "depends on ARCH1 || ARCH2 ... || ARCH123" are usually either wrong or too coarse grained. Or plain an ugly sin.
[ tglx: Fixed up amigaone ]
--- arch/alpha/Kconfig | 1 + arch/mips/Kconfig | 1 + arch/powerpc/platforms/amigaone/Kconfig | 2 +- arch/powerpc/platforms/chrp/Kconfig | 1 + arch/powerpc/platforms/prep/Kconfig | 1 + arch/powerpc/platforms/pseries/Kconfig | 1 + arch/x86/Kconfig | 1 + init/Kconfig | 6 +++++- 8 files changed, 12 insertions(+), 2 deletions(-)
arch/alpha/Kconfig +1 -0
@@ -6,6 +6,7 @@ config ALPHA select HAVE_OPROFILE select HAVE_SYSCALL_WRAPPERS select HAVE_IRQ_WORK + select HAVE_PCSPKR_PLATFORM select HAVE_PERF_EVENTS select HAVE_DMA_ATTRS select HAVE_GENERIC_HARDIRQS
arch/mips/Kconfig +1 -0
@@ -5,6 +5,7 @@ config MIPS select HAVE_IDE select HAVE_OPROFILE select HAVE_IRQ_WORK + select HAVE_PCSPKR_PLATFORM select HAVE_PERF_EVENTS select PERF_USE_VMALLOC select HAVE_ARCH_KGDB
arch/powerpc/platforms/amigaone/Kconfig +1 -1
@@ -8,7 +8,7 @@ config AMIGAONE select NOT_COHERENT_CACHE select CHECK_CACHE_COHERENCY select DEFAULT_UIMAGE - select PCSPKR_PLATFORM + select HAVE_PCSPKR_PLATFORM help Select AmigaOne for the following machines: - AmigaOne SE/Teron CX (G3 only)
arch/powerpc/platforms/chrp/Kconfig +1 -0
@@ -1,6 +1,7 @@ config PPC_CHRP bool "Common Hardware Reference Platform (CHRP) based machines" depends on 6xx + select HAVE_PCSPKR_PLATFORM select MPIC select PPC_I8259 select PPC_INDIRECT_PCI
arch/powerpc/platforms/prep/Kconfig +1 -0
@@ -1,6 +1,7 @@ config PPC_PREP bool "PowerPC Reference Platform (PReP) based machines" depends on 6xx && BROKEN + select HAVE_PCSPKR_PLATFORM select MPIC select PPC_I8259 select PPC_INDIRECT_PCI
arch/powerpc/platforms/pseries/Kconfig +1 -0
@@ -1,6 +1,7 @@ config PPC_PSERIES depends on PPC64 && PPC_BOOK3S bool "IBM pSeries & new (POWER5-based) iSeries" + select HAVE_PCSPKR_PLATFORM select MPIC select PCI_MSI select PPC_XICS
arch/x86/Kconfig +1 -0
@@ -20,6 +20,7 @@ config X86 select HAVE_UNSTABLE_SCHED_CLOCK select HAVE_IDE select HAVE_OPROFILE + select HAVE_PCSPKR_PLATFORM select HAVE_PERF_EVENTS select HAVE_IRQ_WORK select HAVE_IOREMAP_PROT
init/Kconfig +5 -1
@@ -999,14 +999,18 @@ config ELF_CORE help Enable support for generating core dumps. Disabling saves about 4k. + config PCSPKR_PLATFORM bool "Enable PC-Speaker support" if EXPERT - depends on ALPHA || X86 || MIPS || PPC_PREP || PPC_CHRP || PPC_PSERIES + depends on HAVE_PCSPKR_PLATFORM default y help This option allows to disable the internal PC-Speaker support, saving some memory. +config HAVE_PCSPKR_PLATFORM + bool + config BASE_FULL default y bool "Enable full-sized data structures for core" if EXPERT
[tip:timers/cleanup] pcspkr: Cleanup Kconfig dependencies
In reply to [email protected]Commit-ID: 8761f1ab717cac0616f8cf7ec589ae021c739113 Gitweb: http://git.kernel.org/tip/8761f1ab717cac0616f8cf7ec589ae021c739113 Author: Ralf Baechle <[email protected]> AuthorDate: Wed, 1 Jun 2011 19:05:09 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 9 Jun 2011 15:01:41 +0200
pcspkr: Cleanup Kconfig dependencies
Lenghty lists of the kind "depends on ARCH1 || ARCH2 ... || ARCH123" are usually either wrong or too coarse grained. Or plain an ugly sin.
[ tglx: Fixed up amigaone ]
--- arch/alpha/Kconfig | 1 + arch/mips/Kconfig | 1 + arch/powerpc/platforms/amigaone/Kconfig | 2 +- arch/powerpc/platforms/chrp/Kconfig | 1 + arch/powerpc/platforms/prep/Kconfig | 1 + arch/powerpc/platforms/pseries/Kconfig | 1 + arch/x86/Kconfig | 1 + init/Kconfig | 6 +++++- 8 files changed, 12 insertions(+), 2 deletions(-)
arch/alpha/Kconfig +1 -0
@@ -6,6 +6,7 @@ config ALPHA select HAVE_OPROFILE select HAVE_SYSCALL_WRAPPERS select HAVE_IRQ_WORK + select HAVE_PCSPKR_PLATFORM select HAVE_PERF_EVENTS select HAVE_DMA_ATTRS select HAVE_GENERIC_HARDIRQS
arch/mips/Kconfig +1 -0
@@ -5,6 +5,7 @@ config MIPS select HAVE_IDE select HAVE_OPROFILE select HAVE_IRQ_WORK + select HAVE_PCSPKR_PLATFORM select HAVE_PERF_EVENTS select PERF_USE_VMALLOC select HAVE_ARCH_KGDB
arch/powerpc/platforms/amigaone/Kconfig +1 -1
@@ -8,7 +8,7 @@ config AMIGAONE select NOT_COHERENT_CACHE select CHECK_CACHE_COHERENCY select DEFAULT_UIMAGE - select PCSPKR_PLATFORM + select HAVE_PCSPKR_PLATFORM help Select AmigaOne for the following machines: - AmigaOne SE/Teron CX (G3 only)
arch/powerpc/platforms/chrp/Kconfig +1 -0
@@ -1,6 +1,7 @@ config PPC_CHRP bool "Common Hardware Reference Platform (CHRP) based machines" depends on 6xx + select HAVE_PCSPKR_PLATFORM select MPIC select PPC_I8259 select PPC_INDIRECT_PCI
arch/powerpc/platforms/prep/Kconfig +1 -0
@@ -1,6 +1,7 @@ config PPC_PREP bool "PowerPC Reference Platform (PReP) based machines" depends on 6xx && BROKEN + select HAVE_PCSPKR_PLATFORM select MPIC select PPC_I8259 select PPC_INDIRECT_PCI
arch/powerpc/platforms/pseries/Kconfig +1 -0
@@ -1,6 +1,7 @@ config PPC_PSERIES depends on PPC64 && PPC_BOOK3S bool "IBM pSeries & new (POWER5-based) iSeries" + select HAVE_PCSPKR_PLATFORM select MPIC select PCI_MSI select PPC_XICS
arch/x86/Kconfig +1 -0
@@ -20,6 +20,7 @@ config X86 select HAVE_UNSTABLE_SCHED_CLOCK select HAVE_IDE select HAVE_OPROFILE + select HAVE_PCSPKR_PLATFORM select HAVE_PERF_EVENTS select HAVE_IRQ_WORK select HAVE_IOREMAP_PROT
init/Kconfig +5 -1
@@ -999,15 +999,19 @@ config ELF_CORE help Enable support for generating core dumps. Disabling saves about 4k. + config PCSPKR_PLATFORM bool "Enable PC-Speaker support" if EXPERT - depends on ALPHA || X86 || MIPS || PPC_PREP || PPC_CHRP || PPC_PSERIES + depends on HAVE_PCSPKR_PLATFORM select I8253_LOCK default y help This option allows to disable the internal PC-Speaker support, saving some memory. +config HAVE_PCSPKR_PLATFORM + bool + config BASE_FULL default y bool "Enable full-sized data structures for core" if EXPERT
PATCH 14/14 PCSPKR: MIPS: Make config dependencies finer grained.
In reply to [email protected]Only the Siemens-Nixdorf RM series workstations and the Jazz family workstations have PC speakers built in; Malta can connect one via the infamous AMR connector with an AMR sound card or a little creativity. So we don't want to offer the PC speaker driver on all MIPS systems.
To: [email protected]
Cc: [email protected]
arch/mips/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/mips/Kconfig +3 -1
@@ -5,7 +5,6 @@ config MIPS select HAVE_IDE select HAVE_OPROFILE select HAVE_IRQ_WORK - select HAVE_PCSPKR_PLATFORM select HAVE_PERF_EVENTS select PERF_USE_VMALLOC select HAVE_ARCH_KGDB
@@ -186,6 +185,7 @@ config MACH_JAZZ select CSRC_R4K select DEFAULT_SGI_PARTITION if CPU_BIG_ENDIAN select GENERIC_ISA_DMA + select HAVE_PCSPKR_PLATFORM select IRQ_CPU select I8253 select I8259
@@ -267,6 +267,7 @@ config MIPS_MALTA select CSRC_R4K select DMA_NONCOHERENT select GENERIC_ISA_DMA + select HAVE_PCSPKR_PLATFORM select IRQ_CPU select IRQ_GIC select HW_HAS_PCI
@@ -641,6 +642,7 @@ config SNI_RM select DEFAULT_SGI_PARTITION if CPU_BIG_ENDIAN select DMA_NONCOHERENT select GENERIC_ISA_DMA + select HAVE_PCSPKR_PLATFORM select HW_HAS_EISA select HW_HAS_PCI select IRQ_CPU
[tip:timers/cleanup] pcpskr: MIPS: Make config dependencies finer grained
Commit-ID: 5168b2792f59b4a51806b6fc8b1df43109db0968 Gitweb: http://git.kernel.org/tip/5168b2792f59b4a51806b6fc8b1df43109db0968 Author: Ralf Baechle <[email protected]> AuthorDate: Wed, 1 Jun 2011 19:05:10 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 9 Jun 2011 12:03:52 +0200
pcpskr: MIPS: Make config dependencies finer grained
Only the Siemens-Nixdorf RM series workstations and the Jazz family workstations have PC speakers built in; Malta can connect one via the infamous AMR connector with an AMR sound card or a little creativity. So we don't want to offer the PC speaker driver on all MIPS systems.
--- arch/mips/Kconfig | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
arch/mips/Kconfig +3 -1
@@ -5,7 +5,6 @@ config MIPS select HAVE_IDE select HAVE_OPROFILE select HAVE_IRQ_WORK - select HAVE_PCSPKR_PLATFORM select HAVE_PERF_EVENTS select PERF_USE_VMALLOC select HAVE_ARCH_KGDB
@@ -186,6 +185,7 @@ config MACH_JAZZ select CSRC_R4K select DEFAULT_SGI_PARTITION if CPU_BIG_ENDIAN select GENERIC_ISA_DMA + select HAVE_PCSPKR_PLATFORM select IRQ_CPU select I8253 select I8259
@@ -267,6 +267,7 @@ config MIPS_MALTA select CSRC_R4K select DMA_NONCOHERENT select GENERIC_ISA_DMA + select HAVE_PCSPKR_PLATFORM select IRQ_CPU select IRQ_GIC select HW_HAS_PCI
@@ -641,6 +642,7 @@ config SNI_RM select DEFAULT_SGI_PARTITION if CPU_BIG_ENDIAN select DMA_NONCOHERENT select GENERIC_ISA_DMA + select HAVE_PCSPKR_PLATFORM select HW_HAS_EISA select HW_HAS_PCI select IRQ_CPU
[tip:timers/cleanup] pcpskr: MIPS: Make config dependencies finer grained
In reply to [email protected]Commit-ID: 8a118c3872945d54e0cacdea06c93527cdfb8782 Gitweb: http://git.kernel.org/tip/8a118c3872945d54e0cacdea06c93527cdfb8782 Author: Ralf Baechle <[email protected]> AuthorDate: Wed, 1 Jun 2011 19:05:10 +0100 Committer: Thomas Gleixner <[email protected]> CommitDate: Thu, 9 Jun 2011 15:01:41 +0200
pcpskr: MIPS: Make config dependencies finer grained
Only the Siemens-Nixdorf RM series workstations and the Jazz family workstations have PC speakers built in; Malta can connect one via the infamous AMR connector with an AMR sound card or a little creativity. So we don't want to offer the PC speaker driver on all MIPS systems.
--- arch/mips/Kconfig | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
arch/mips/Kconfig +3 -1
@@ -5,7 +5,6 @@ config MIPS select HAVE_IDE select HAVE_OPROFILE select HAVE_IRQ_WORK - select HAVE_PCSPKR_PLATFORM select HAVE_PERF_EVENTS select PERF_USE_VMALLOC select HAVE_ARCH_KGDB
@@ -186,6 +185,7 @@ config MACH_JAZZ select CSRC_R4K select DEFAULT_SGI_PARTITION if CPU_BIG_ENDIAN select GENERIC_ISA_DMA + select HAVE_PCSPKR_PLATFORM select IRQ_CPU select I8253 select I8259
@@ -267,6 +267,7 @@ config MIPS_MALTA select CSRC_R4K select DMA_NONCOHERENT select GENERIC_ISA_DMA + select HAVE_PCSPKR_PLATFORM select IRQ_CPU select IRQ_GIC select HW_HAS_PCI
@@ -641,6 +642,7 @@ config SNI_RM select DEFAULT_SGI_PARTITION if CPU_BIG_ENDIAN select DMA_NONCOHERENT select GENERIC_ISA_DMA + select HAVE_PCSPKR_PLATFORM select HW_HAS_EISA select HW_HAS_PCI select IRQ_CPU
-------- Original-Nachricht --------
Quoted 76 lines
Datum: Wed, 01 Jun 2011 19:04:56 +0100
Von: [email protected]
An: [email protected], [email protected], [email protected], [email protected], [email protected]
Betreff: [patch 00/14] Sort out i8253 and PC speaker locking and headersNo 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>
staticDEFINE_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>
staticDEFINE_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_TIMERSSo the status is:
Quoted 8 lines
Alpha: There is no
PCSPKR_PLATFORMso 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 aPCSPKR_PLATFORMso 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.
The Kconfig dependencies cleanup patch for CHRP, PSERIES, etc. should also apply to the AmigaOne. Can you resend it with a fix for the AmigaOne, or should I send a patch?
I'll check next week, if the PC speaker is still working on my AmigaOne.
Thanks,
Gerhard
Signature · 2 lines
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
Quoted 73 lines · Gerhard Pircher
Quoted 65 lines
#if
defined(CONFIG_MIPS)||defined(CONFIG_X86)
/* Use the global PIT lock ! */
#include <asm/i8253.h>
#else
#include <asm/8253pit.h>
staticDEFINE_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>
staticDEFINE_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_TIMERSSo the status is:
Quoted 8 lines
Alpha: There is no
PCSPKR_PLATFORMso 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 aPCSPKR_PLATFORMso 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.
Quoted 3 lines
The
Kconfigdependencies cleanup patch for CHRP, PSERIES, etc. should also apply to the AmigaOne. Can you resend it with a fix for the AmigaOne, or should I send a patch?
I can sort that; it's easy enough.
Quoted 1 line
I'll check next week, if the PC speaker is still working on my AmigaOne.
I can't imagine that it's going to break - the code is sorta simple ;-)
One obscurity I noticed is this bit in the amigaone.dts:
timer@40 {
// Also adds pcspkr to platform devices.
compatible = "pnpPNP,100";
reg = <1 0x00000040 0x00000020>;
};Shouldn't that rather be something like the following?
pcspeaker@61 {
device_type = "sound";
compatible = "pnpPNP,800";
reg = <1 0x61 1>;
};pnpPNP,100 is the i8253 timer as I understand and pnpPNP,800 the PC speaker. If you interpret pnpPNP,100 to imply the presence of a PC speaker you can't express a system that has a i8253 but no PCspeaker in a DT so maybe amigaone.dts and arch/powerpc/kernel/setup-common.c should be changed to use pnpPNP,800 instead?
Ralf
-------- Original-Nachricht --------
Quoted 83 lines
Datum: Fri, 3 Jun 2011 19:00:38 +0100
Von: Ralf Baechle <[email protected]>
An: Gerhard Pircher <[email protected]>
CC: [email protected], [email protected], [email protected], [email protected], [email protected], Thomas Gleixner <[email protected]>, Benjamin Herrenschmidt <[email protected]>
Betreff: Re: [patch 00/14] Sort out i8253 and PC speaker locking and headersQuoted 17 lines · Gerhard Pircher
Quoted 17 lines
#if
defined(CONFIG_MIPS)||defined(CONFIG_X86)
/* Use the global PIT lock ! */
#include <asm/i8253.h>
#else
#include <asm/8253pit.h>
staticDEFINE_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>
staticDEFINE_RAW_SPINLOCK(i8253_lock);Quoted 8 lines
Quoted 8 lines
$ 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,
Quoted 4 lines
Quoted 4 lines
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,
Quoted 44 lines
Quoted 44 lines
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_TIMERSSo the status is:
Alpha: There is no
PCSPKR_PLATFORMso 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 aPCSPKR_PLATFORMso 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.
Quoted 5 lines
Quoted 3 lines
The
Kconfigdependencies cleanup patch for CHRP, PSERIES, etc. should also apply to the AmigaOne. Can you resend it with a fix for the AmigaOne, or should I send a patch?I can sort that; it's easy enough.
Thanks a lot!
Quoted 4 lines
Quoted 2 lines
I'll check next week, if the PC speaker is still working on my AmigaOne.
I can't imagine that it's going to break - the code is sorta simple ;-)
That's true, but testing the most recent Linux kernel on the AmigaOne is never wrong. :-)
Quoted 16 lines
One obscurity I noticed is this bit in the
amigaone.dts:timer@40 { // Also adds pcspkr to platform devices. compatible = "pnpPNP,100"; reg = <1 0x00000040 0x00000020>; };Shouldn't that rather be something like the following?
pcspeaker@61 { device_type = "sound"; compatible = "pnpPNP,800"; reg = <1 0x61 1>; };
Quoted 6 lines
pnpPNP,100 is the i8253 timer as I understand and pnpPNP,800 the PC speaker.
If you interpret pnpPNP,100 to imply the presence of a PC speaker you can't express a system that has a i8253 but no PCspeaker in a DT so maybeamigaone.dtsandarch/powerpc/kernel/setup-common.cshould be changed to use pnpPNP,800 instead?
That would be cleaner, but I guess it would break CHRP and PSERIES. These platforms probably only provide a pnpPNP,100 entry in the device tree (at least that's the case on the Pegasos2 CHRP machine AFAICT).
Gerhard
Signature · 2 lines
NEU: FreePhone - kostenlos mobil telefonieren! Jetzt informieren: http://www.gmx.net/de/go/freephone