[PATCH] x86: i8253/i8259A lock cleanup
Introduce proper declarations for i8253_lock and i8259A_lock. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
bcbda35ca7
commit
306e440daf
@@ -60,12 +60,13 @@ static void gameport_disconnect_port(struct gameport *gameport);
|
||||
|
||||
#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;
|
||||
|
||||
|
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user