* [patch] spinlock cleanup
@ 2005-06-22 3:24 Stas Sergeev
2005-06-22 3:36 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Stas Sergeev @ 2005-06-22 3:24 UTC (permalink / raw)
To: Andrew Morton; +Cc: Linux kernel
[-- Attachment #1: Type: text/plain, Size: 287 bytes --]
Hi Andrew.
Here is another attempt to
remove the "extern i8253_lock"
from the C files.
It now uses the same #ifdefs for
including the header and using
the lock, so it hopefully no
longer breaks the compilation.
Does it look good this time?
Signed-off-by: Stas Sergeev <stsp@aknet.ru>
[-- Attachment #2: linux-2.6.12-rc6-spinlk2.diff --]
[-- Type: text/x-patch, Size: 9788 bytes --]
diff -urN linux-2.6.12-rc6/arch/i386/kernel/apic.c linux-2.6.12-rc6-spinlk/arch/i386/kernel/apic.c
--- linux-2.6.12-rc6/arch/i386/kernel/apic.c 2005-06-07 11:11:34.000000000 +0400
+++ linux-2.6.12-rc6-spinlk/arch/i386/kernel/apic.c 2005-06-15 11:26:02.000000000 +0400
@@ -34,6 +34,7 @@
#include <asm/desc.h>
#include <asm/arch_hooks.h>
#include <asm/hpet.h>
+#include <asm/8253pit.h>
#include <mach_apic.h>
@@ -857,7 +858,6 @@
*/
static unsigned int __init get_8254_timer_count(void)
{
- extern spinlock_t i8253_lock;
unsigned long flags;
unsigned int count;
diff -urN linux-2.6.12-rc6/arch/i386/kernel/apm.c linux-2.6.12-rc6-spinlk/arch/i386/kernel/apm.c
--- linux-2.6.12-rc6/arch/i386/kernel/apm.c 2005-06-07 11:11:34.000000000 +0400
+++ linux-2.6.12-rc6-spinlk/arch/i386/kernel/apm.c 2005-06-15 11:26:02.000000000 +0400
@@ -228,10 +228,10 @@
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/desc.h>
+#include <asm/8253pit.h>
#include "io_ports.h"
-extern spinlock_t i8253_lock;
extern unsigned long get_cmos_time(void);
extern void machine_real_restart(unsigned char *, int);
@@ -1169,7 +1169,6 @@
{
#ifdef INIT_TIMER_AFTER_SUSPEND
unsigned long flags;
- extern spinlock_t i8253_lock;
spin_lock_irqsave(&i8253_lock, flags);
/* set the clock to 100 Hz */
diff -urN linux-2.6.12-rc6/arch/i386/kernel/io_apic.c linux-2.6.12-rc6-spinlk/arch/i386/kernel/io_apic.c
--- linux-2.6.12-rc6/arch/i386/kernel/io_apic.c 2005-06-07 11:11:34.000000000 +0400
+++ linux-2.6.12-rc6-spinlk/arch/i386/kernel/io_apic.c 2005-06-15 11:26:02.000000000 +0400
@@ -37,6 +37,7 @@
#include <asm/smp.h>
#include <asm/desc.h>
#include <asm/timer.h>
+#include <asm/i8259.h>
#include <mach_apic.h>
@@ -1565,7 +1566,6 @@
void /*__init*/ print_PIC(void)
{
- extern spinlock_t i8259A_lock;
unsigned int v;
unsigned long flags;
diff -urN linux-2.6.12-rc6/arch/i386/kernel/time.c linux-2.6.12-rc6-spinlk/arch/i386/kernel/time.c
--- linux-2.6.12-rc6/arch/i386/kernel/time.c 2005-06-07 11:11:34.000000000 +0400
+++ linux-2.6.12-rc6-spinlk/arch/i386/kernel/time.c 2005-06-20 09:51:09.000000000 +0400
@@ -63,12 +63,12 @@
#include <linux/config.h>
#include <asm/hpet.h>
+#include <asm/i8259.h>
#include <asm/arch_hooks.h>
#include "io_ports.h"
-extern spinlock_t i8259A_lock;
int pit_latch_buggy; /* extern */
#include "do_timer.h"
diff -urN linux-2.6.12-rc6/arch/i386/kernel/timers/timer_cyclone.c linux-2.6.12-rc6-spinlk/arch/i386/kernel/timers/timer_cyclone.c
--- linux-2.6.12-rc6/arch/i386/kernel/timers/timer_cyclone.c 2005-06-07 11:11:34.000000000 +0400
+++ linux-2.6.12-rc6-spinlk/arch/i386/kernel/timers/timer_cyclone.c 2005-06-15 11:26:02.000000000 +0400
@@ -17,10 +17,9 @@
#include <asm/io.h>
#include <asm/pgtable.h>
#include <asm/fixmap.h>
+#include <asm/8253pit.h>
#include "io_ports.h"
-extern spinlock_t i8253_lock;
-
/* Number of usecs that the last interrupt was delayed */
static int delay_at_last_interrupt;
diff -urN linux-2.6.12-rc6/arch/i386/kernel/timers/timer_pit.c linux-2.6.12-rc6-spinlk/arch/i386/kernel/timers/timer_pit.c
--- linux-2.6.12-rc6/arch/i386/kernel/timers/timer_pit.c 2005-06-07 11:11:34.000000000 +0400
+++ linux-2.6.12-rc6-spinlk/arch/i386/kernel/timers/timer_pit.c 2005-06-20 09:51:09.000000000 +0400
@@ -15,9 +15,9 @@
#include <asm/smp.h>
#include <asm/io.h>
#include <asm/arch_hooks.h>
+#include <asm/8253pit.h>
+#include <asm/i8259.h>
-extern spinlock_t i8259A_lock;
-extern spinlock_t i8253_lock;
#include "do_timer.h"
#include "io_ports.h"
@@ -166,7 +166,6 @@
void setup_pit_timer(void)
{
- extern spinlock_t i8253_lock;
unsigned long flags;
spin_lock_irqsave(&i8253_lock, flags);
diff -urN linux-2.6.12-rc6/arch/i386/kernel/timers/timer_tsc.c linux-2.6.12-rc6-spinlk/arch/i386/kernel/timers/timer_tsc.c
--- linux-2.6.12-rc6/arch/i386/kernel/timers/timer_tsc.c 2005-06-07 11:11:34.000000000 +0400
+++ linux-2.6.12-rc6-spinlk/arch/i386/kernel/timers/timer_tsc.c 2005-06-15 11:26:02.000000000 +0400
@@ -17,6 +17,7 @@
#include <asm/timer.h>
#include <asm/io.h>
+#include <asm/8253pit.h>
/* processor.h for distable_tsc flag */
#include <asm/processor.h>
@@ -35,8 +36,6 @@
int tsc_disable __initdata = 0;
-extern spinlock_t i8253_lock;
-
static int use_tsc;
/* Number of usecs that the last interrupt was delayed */
static int delay_at_last_interrupt;
diff -urN linux-2.6.12-rc6/arch/i386/mach-voyager/voyager_basic.c linux-2.6.12-rc6-spinlk/arch/i386/mach-voyager/voyager_basic.c
--- linux-2.6.12-rc6/arch/i386/mach-voyager/voyager_basic.c 2005-06-07 11:11:31.000000000 +0400
+++ linux-2.6.12-rc6-spinlk/arch/i386/mach-voyager/voyager_basic.c 2005-06-15 11:26:02.000000000 +0400
@@ -30,6 +30,7 @@
#include <linux/irq.h>
#include <asm/tlbflush.h>
#include <asm/arch_hooks.h>
+#include <asm/8253pit.h>
/*
* Power off function, if any
@@ -182,7 +183,6 @@
* and swiftly introduce it to something sharp and
* pointy. */
__u16 val;
- extern spinlock_t i8253_lock;
spin_lock(&i8253_lock);
diff -urN linux-2.6.12-rc6/drivers/ide/legacy/hd.c linux-2.6.12-rc6-spinlk/drivers/ide/legacy/hd.c
--- linux-2.6.12-rc6/drivers/ide/legacy/hd.c 2005-06-07 11:11:51.000000000 +0400
+++ linux-2.6.12-rc6-spinlk/drivers/ide/legacy/hd.c 2005-06-20 11:27:31.000000000 +0400
@@ -112,6 +112,10 @@
#define STAT_OK (READY_STAT|SEEK_STAT)
#define OK_STATUS(s) (((s)&(STAT_OK|(BUSY_STAT|WRERR_STAT|ERR_STAT)))==STAT_OK)
+#if (HD_DELAY > 0)
+#include <asm/8253pit.h>
+#endif
+
static void recal_intr(void);
static void bad_rw_intr(void);
@@ -160,7 +164,6 @@
unsigned long read_timer(void)
{
- extern spinlock_t i8253_lock;
unsigned long t, flags;
int i;
diff -urN linux-2.6.12-rc6/drivers/input/gameport/gameport.c linux-2.6.12-rc6-spinlk/drivers/input/gameport/gameport.c
--- linux-2.6.12-rc6/drivers/input/gameport/gameport.c 2005-06-07 11:11:49.000000000 +0400
+++ linux-2.6.12-rc6-spinlk/drivers/input/gameport/gameport.c 2005-06-20 09:51:09.000000000 +0400
@@ -22,6 +22,9 @@
#include <linux/smp_lock.h>
#include <linux/slab.h>
#include <linux/delay.h>
+#if defined(__i386__)
+#include <asm/8253pit.h>
+#endif
/*#include <asm/io.h>*/
@@ -66,7 +69,6 @@
static unsigned int get_time_pit(void)
{
- extern spinlock_t i8253_lock;
unsigned long flags;
unsigned int count;
diff -urN linux-2.6.12-rc6/drivers/input/joystick/analog.c linux-2.6.12-rc6-spinlk/drivers/input/joystick/analog.c
--- linux-2.6.12-rc6/drivers/input/joystick/analog.c 2005-06-07 11:11:49.000000000 +0400
+++ linux-2.6.12-rc6-spinlk/drivers/input/joystick/analog.c 2005-06-20 09:51:09.000000000 +0400
@@ -39,6 +39,9 @@
#include <linux/input.h>
#include <linux/gameport.h>
#include <asm/timex.h>
+#ifdef __i386__
+#include <asm/8253pit.h>
+#endif
#define DRIVER_DESC "Analog joystick and gamepad driver"
@@ -145,7 +148,6 @@
#define TIME_NAME (cpu_has_tsc?"TSC":"PIT")
static unsigned int get_time_pit(void)
{
- extern spinlock_t i8253_lock;
unsigned long flags;
unsigned int count;
diff -urN linux-2.6.12-rc6/include/asm-alpha/8253pit.h linux-2.6.12-rc6-spinlk/include/asm-alpha/8253pit.h
--- linux-2.6.12-rc6/include/asm-alpha/8253pit.h 2005-06-07 11:12:33.000000000 +0400
+++ linux-2.6.12-rc6-spinlk/include/asm-alpha/8253pit.h 2005-06-15 11:26:02.000000000 +0400
@@ -5,6 +5,9 @@
#ifndef _8253PIT_H
#define _8253PIT_H
+#include <linux/spinlock.h>
+
#define PIT_TICK_RATE 1193180UL
+extern spinlock_t i8253_lock;
#endif
diff -urN linux-2.6.12-rc6/include/asm-i386/8253pit.h linux-2.6.12-rc6-spinlk/include/asm-i386/8253pit.h
--- linux-2.6.12-rc6/include/asm-i386/8253pit.h 2005-06-07 11:12:32.000000000 +0400
+++ linux-2.6.12-rc6-spinlk/include/asm-i386/8253pit.h 2005-06-15 11:26:02.000000000 +0400
@@ -5,8 +5,10 @@
#ifndef _8253PIT_H
#define _8253PIT_H
+#include <linux/spinlock.h>
#include <asm/timex.h>
#define PIT_TICK_RATE CLOCK_TICK_RATE
+extern spinlock_t i8253_lock;
#endif
diff -urN linux-2.6.12-rc6/include/asm-mips/8253pit.h linux-2.6.12-rc6-spinlk/include/asm-mips/8253pit.h
--- linux-2.6.12-rc6/include/asm-mips/8253pit.h 2005-06-07 11:12:27.000000000 +0400
+++ linux-2.6.12-rc6-spinlk/include/asm-mips/8253pit.h 2005-06-15 11:26:02.000000000 +0400
@@ -5,6 +5,9 @@
#ifndef _8253PIT_H
#define _8253PIT_H
+#include <linux/spinlock.h>
+
#define PIT_TICK_RATE 1193182UL
+extern spinlock_t i8253_lock;
#endif
diff -urN linux-2.6.12-rc6/include/asm-ppc/8253pit.h linux-2.6.12-rc6-spinlk/include/asm-ppc/8253pit.h
--- linux-2.6.12-rc6/include/asm-ppc/8253pit.h 2005-06-07 11:12:27.000000000 +0400
+++ linux-2.6.12-rc6-spinlk/include/asm-ppc/8253pit.h 2005-06-15 11:26:02.000000000 +0400
@@ -5,6 +5,9 @@
#ifndef _8253PIT_H
#define _8253PIT_H
+#include <linux/spinlock.h>
+
#define PIT_TICK_RATE 1193182UL
+extern spinlock_t i8253_lock;
#endif
diff -urN linux-2.6.12-rc6/include/asm-ppc64/8253pit.h linux-2.6.12-rc6-spinlk/include/asm-ppc64/8253pit.h
--- linux-2.6.12-rc6/include/asm-ppc64/8253pit.h 2005-06-07 11:12:31.000000000 +0400
+++ linux-2.6.12-rc6-spinlk/include/asm-ppc64/8253pit.h 2005-06-15 11:26:02.000000000 +0400
@@ -5,6 +5,9 @@
#ifndef _8253PIT_H
#define _8253PIT_H
+#include <linux/spinlock.h>
+
#define PIT_TICK_RATE 1193182UL
+extern spinlock_t i8253_lock;
#endif
diff -urN linux-2.6.12-rc6/include/asm-x86_64/8253pit.h linux-2.6.12-rc6-spinlk/include/asm-x86_64/8253pit.h
--- linux-2.6.12-rc6/include/asm-x86_64/8253pit.h 2005-06-07 11:12:30.000000000 +0400
+++ linux-2.6.12-rc6-spinlk/include/asm-x86_64/8253pit.h 2005-06-15 11:26:02.000000000 +0400
@@ -5,6 +5,9 @@
#ifndef _8253PIT_H
#define _8253PIT_H
+#include <linux/spinlock.h>
+
#define PIT_TICK_RATE 1193182UL
+extern spinlock_t i8253_lock;
#endif
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] spinlock cleanup
2005-06-22 3:24 [patch] spinlock cleanup Stas Sergeev
@ 2005-06-22 3:36 ` Andrew Morton
2005-06-22 8:52 ` [patch] i8253-i8259A-lock-cleanup Ingo Molnar
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2005-06-22 3:36 UTC (permalink / raw)
To: Stas Sergeev; +Cc: linux-kernel
Stas Sergeev <stsp@aknet.ru> wrote:
>
> Here is another attempt to
> remove the "extern i8253_lock"
> from the C files.
> It now uses the same #ifdefs for
> including the header and using
> the lock, so it hopefully no
> longer breaks the compilation.
> Does it look good this time?
Adding ifdefs around #includes is a bit unsightly - it also increases the
possibility that the build will break when .configs are changed.
Is it not possible to find an appropriate arch-specific header file for the
declaration?
^ permalink raw reply [flat|nested] 3+ messages in thread
* [patch] i8253-i8259A-lock-cleanup
2005-06-22 3:36 ` Andrew Morton
@ 2005-06-22 8:52 ` Ingo Molnar
0 siblings, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2005-06-22 8:52 UTC (permalink / raw)
To: Andrew Morton; +Cc: Stas Sergeev, linux-kernel
* Andrew Morton <akpm@osdl.org> wrote:
> Adding ifdefs around #includes is a bit unsightly - it also increases
> the possibility that the build will break when .configs are changed.
>
> Is it not possible to find an appropriate arch-specific header file
> for the declaration?
just to avoid duplication of effort - here's what i had in the -RT tree
for months. Against git-curr. Build and boot-tested on x86.
Ingo
-----
introduce proper declarations for i8253_lock and i8259A_lock.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/i386/kernel/apic.c | 2 +-
arch/i386/kernel/apm.c | 5 ++---
arch/i386/kernel/io_apic.c | 2 +-
arch/i386/kernel/time.c | 5 ++++-
arch/i386/kernel/timers/timer_cyclone.c | 4 ++--
arch/i386/kernel/timers/timer_pit.c | 4 +---
arch/i386/kernel/timers/timer_tsc.c | 3 +--
arch/i386/mach-voyager/voyager_basic.c | 2 +-
arch/x86_64/kernel/io_apic.c | 1 -
drivers/ide/legacy/hd.c | 4 +++-
drivers/input/gameport/gameport.c | 3 ++-
drivers/input/joystick/analog.c | 4 +++-
include/asm-i386/i8253.h | 6 ++++++
include/asm-i386/mach-default/do_timer.h | 1 +
include/asm-x86_64/io_apic.h | 2 ++
15 files changed, 30 insertions(+), 18 deletions(-)
Index: arch/i386/kernel/apic.c
===================================================================
--- arch/i386/kernel/apic.c.orig
+++ arch/i386/kernel/apic.c
@@ -34,6 +34,7 @@
#include <asm/desc.h>
#include <asm/arch_hooks.h>
#include <asm/hpet.h>
+#include <asm/i8253.h>
#include <mach_apic.h>
@@ -857,7 +858,6 @@ fake_ioapic_page:
*/
static unsigned int __init get_8254_timer_count(void)
{
- extern spinlock_t i8253_lock;
unsigned long flags;
unsigned int count;
Index: arch/i386/kernel/apm.c
===================================================================
--- arch/i386/kernel/apm.c.orig
+++ arch/i386/kernel/apm.c
@@ -228,10 +228,10 @@
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/desc.h>
+#include <asm/i8253.h>
#include "io_ports.h"
-extern spinlock_t i8253_lock;
extern unsigned long get_cmos_time(void);
extern void machine_real_restart(unsigned char *, int);
@@ -1168,8 +1168,7 @@ static void get_time_diff(void)
static void reinit_timer(void)
{
#ifdef INIT_TIMER_AFTER_SUSPEND
- unsigned long flags;
- extern spinlock_t i8253_lock;
+ unsigned long flags;
spin_lock_irqsave(&i8253_lock, flags);
/* set the clock to 100 Hz */
Index: arch/i386/kernel/io_apic.c
===================================================================
--- arch/i386/kernel/io_apic.c.orig
+++ arch/i386/kernel/io_apic.c
@@ -37,6 +37,7 @@
#include <asm/smp.h>
#include <asm/desc.h>
#include <asm/timer.h>
+#include <asm/i8259.h>
#include <mach_apic.h>
@@ -1565,7 +1566,6 @@ void print_all_local_APICs (void)
void /*__init*/ print_PIC(void)
{
- extern spinlock_t i8259A_lock;
unsigned int v;
unsigned long flags;
Index: arch/i386/kernel/time.c
===================================================================
--- arch/i386/kernel/time.c.orig
+++ arch/i386/kernel/time.c
@@ -68,7 +68,8 @@
#include "io_ports.h"
-extern spinlock_t i8259A_lock;
+#include <asm/i8259.h>
+
int pit_latch_buggy; /* extern */
#include "do_timer.h"
@@ -83,6 +84,8 @@ extern unsigned long wall_jiffies;
DEFINE_SPINLOCK(rtc_lock);
+#include <asm/i8253.h>
+
DEFINE_SPINLOCK(i8253_lock);
EXPORT_SYMBOL(i8253_lock);
Index: arch/i386/kernel/timers/timer_cyclone.c
===================================================================
--- arch/i386/kernel/timers/timer_cyclone.c.orig
+++ arch/i386/kernel/timers/timer_cyclone.c
@@ -17,9 +17,9 @@
#include <asm/io.h>
#include <asm/pgtable.h>
#include <asm/fixmap.h>
-#include "io_ports.h"
+#include <asm/i8253.h>
-extern spinlock_t i8253_lock;
+#include "io_ports.h"
/* Number of usecs that the last interrupt was delayed */
static int delay_at_last_interrupt;
Index: arch/i386/kernel/timers/timer_pit.c
===================================================================
--- arch/i386/kernel/timers/timer_pit.c.orig
+++ arch/i386/kernel/timers/timer_pit.c
@@ -15,9 +15,8 @@
#include <asm/smp.h>
#include <asm/io.h>
#include <asm/arch_hooks.h>
+#include <asm/i8253.h>
-extern spinlock_t i8259A_lock;
-extern spinlock_t i8253_lock;
#include "do_timer.h"
#include "io_ports.h"
@@ -166,7 +165,6 @@ struct init_timer_opts __initdata timer_
void setup_pit_timer(void)
{
- extern spinlock_t i8253_lock;
unsigned long flags;
spin_lock_irqsave(&i8253_lock, flags);
Index: arch/i386/kernel/timers/timer_tsc.c
===================================================================
--- arch/i386/kernel/timers/timer_tsc.c.orig
+++ arch/i386/kernel/timers/timer_tsc.c
@@ -24,6 +24,7 @@
#include "mach_timer.h"
#include <asm/hpet.h>
+#include <asm/i8253.h>
#ifdef CONFIG_HPET_TIMER
static unsigned long hpet_usec_quotient;
@@ -35,8 +36,6 @@ static inline void cpufreq_delayed_get(v
int tsc_disable __initdata = 0;
-extern spinlock_t i8253_lock;
-
static int use_tsc;
/* Number of usecs that the last interrupt was delayed */
static int delay_at_last_interrupt;
Index: arch/i386/mach-voyager/voyager_basic.c
===================================================================
--- arch/i386/mach-voyager/voyager_basic.c.orig
+++ arch/i386/mach-voyager/voyager_basic.c
@@ -30,6 +30,7 @@
#include <linux/irq.h>
#include <asm/tlbflush.h>
#include <asm/arch_hooks.h>
+#include <asm/i8253.h>
/*
* Power off function, if any
@@ -182,7 +183,6 @@ voyager_timer_interrupt(struct pt_regs *
* and swiftly introduce it to something sharp and
* pointy. */
__u16 val;
- extern spinlock_t i8253_lock;
spin_lock(&i8253_lock);
Index: arch/x86_64/kernel/io_apic.c
===================================================================
--- arch/x86_64/kernel/io_apic.c.orig
+++ arch/x86_64/kernel/io_apic.c
@@ -1064,7 +1064,6 @@ void print_all_local_APICs (void)
void __apicdebuginit print_PIC(void)
{
- extern spinlock_t i8259A_lock;
unsigned int v;
unsigned long flags;
Index: drivers/ide/legacy/hd.c
===================================================================
--- drivers/ide/legacy/hd.c.orig
+++ drivers/ide/legacy/hd.c
@@ -156,11 +156,13 @@ else \
#if (HD_DELAY > 0)
+
+#include <asm/i8253.h>
+
unsigned long last_req;
unsigned long read_timer(void)
{
- extern spinlock_t i8253_lock;
unsigned long t, flags;
int i;
Index: drivers/input/gameport/gameport.c
===================================================================
--- drivers/input/gameport/gameport.c.orig
+++ drivers/input/gameport/gameport.c
@@ -61,12 +61,13 @@ static void gameport_disconnect_port(str
#if defined(__i386__)
+#include <asm/i8253.h>
+
#define DELTA(x,y) ((y)-(x)+((y)<(x)?1193182/HZ:0))
#define GET_TIME(x) do { x = get_time_pit(); } while (0)
static unsigned int get_time_pit(void)
{
- extern spinlock_t i8253_lock;
unsigned long flags;
unsigned int count;
Index: drivers/input/joystick/analog.c
===================================================================
--- drivers/input/joystick/analog.c.orig
+++ drivers/input/joystick/analog.c
@@ -140,12 +140,14 @@ struct analog_port {
*/
#ifdef __i386__
+
+#include <asm/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)))
#define TIME_NAME (cpu_has_tsc?"TSC":"PIT")
static unsigned int get_time_pit(void)
{
- extern spinlock_t i8253_lock;
unsigned long flags;
unsigned int count;
Index: include/asm-i386/i8253.h
===================================================================
--- /dev/null
+++ include/asm-i386/i8253.h
@@ -0,0 +1,6 @@
+#ifndef __ASM_I8253_H__
+#define __ASM_I8253_H__
+
+extern spinlock_t i8253_lock;
+
+#endif /* __ASM_I8253_H__ */
Index: include/asm-i386/mach-default/do_timer.h
===================================================================
--- include/asm-i386/mach-default/do_timer.h.orig
+++ include/asm-i386/mach-default/do_timer.h
@@ -1,6 +1,7 @@
/* defines for inline arch setup functions */
#include <asm/apic.h>
+#include <asm/i8259.h>
/**
* do_timer_interrupt_hook - hook into timer tick
Index: include/asm-x86_64/io_apic.h
===================================================================
--- include/asm-x86_64/io_apic.h.orig
+++ include/asm-x86_64/io_apic.h
@@ -217,4 +217,6 @@ extern int assign_irq_vector(int irq);
void enable_NMI_through_LVT0 (void * dummy);
+extern spinlock_t i8259A_lock;
+
#endif
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-06-22 9:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-22 3:24 [patch] spinlock cleanup Stas Sergeev
2005-06-22 3:36 ` Andrew Morton
2005-06-22 8:52 ` [patch] i8253-i8259A-lock-cleanup Ingo Molnar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.