Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53894
b: refs/heads/master
c: 8339e9f
h: refs/heads/master
v: v3
  • Loading branch information
Fernando Luis VazquezCao authored and Andi Kleen committed May 2, 2007
1 parent f99e00d commit af5bd32
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f2b218dd6199983b120a96bc6531c1b81f4090d8
refs/heads/master: 8339e9fba33aa3205f541478c413982c0ac5a37f
22 changes: 22 additions & 0 deletions trunk/arch/x86_64/kernel/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,28 @@ int using_apic_timer __read_mostly = 0;

static void apic_pm_activate(void);

void apic_wait_icr_idle(void)
{
while (apic_read(APIC_ICR) & APIC_ICR_BUSY)
cpu_relax();
}

unsigned int safe_apic_wait_icr_idle(void)
{
unsigned int send_status;
int timeout;

timeout = 0;
do {
send_status = apic_read(APIC_ICR) & APIC_ICR_BUSY;
if (!send_status)
break;
udelay(100);
} while (timeout++ < 1000);

return send_status;
}

void enable_NMI_through_LVT0 (void * dummy)
{
unsigned int v;
Expand Down
8 changes: 3 additions & 5 deletions trunk/include/asm-x86_64/apic.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define __ASM_APIC_H

#include <linux/pm.h>
#include <linux/delay.h>
#include <asm/fixmap.h>
#include <asm/apicdef.h>
#include <asm/system.h>
Expand Down Expand Up @@ -47,11 +48,8 @@ static __inline unsigned int apic_read(unsigned long reg)
return *((volatile unsigned int *)(APIC_BASE+reg));
}

static __inline__ void apic_wait_icr_idle(void)
{
while (apic_read( APIC_ICR ) & APIC_ICR_BUSY)
cpu_relax();
}
extern void apic_wait_icr_idle(void);
extern unsigned int safe_apic_wait_icr_idle(void);

static inline void ack_APIC_irq(void)
{
Expand Down

0 comments on commit af5bd32

Please sign in to comment.