Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53893
b: refs/heads/master
c: f2b218d
h: refs/heads/master
i:
  53891: 826ee57
v: v3
  • Loading branch information
Fernando Luis VazquezCao authored and Andi Kleen committed May 2, 2007
1 parent 4f4af79 commit f99e00d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 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: de938c51d5fec4ae03af64b06beb15d4423ec611
refs/heads/master: f2b218dd6199983b120a96bc6531c1b81f4090d8
22 changes: 22 additions & 0 deletions trunk/arch/i386/kernel/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,28 @@ static int modern_apic(void)
return lapic_get_version() >= 0x14;
}

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

unsigned long safe_apic_wait_icr_idle(void)
{
unsigned long 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;
}

/**
* enable_NMI_through_LVT0 - enable NMI through local vector table 0
*/
Expand Down
9 changes: 3 additions & 6 deletions trunk/include/asm-i386/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/processor.h>
Expand Down Expand Up @@ -64,12 +65,8 @@ static __inline fastcall unsigned long native_apic_read(unsigned long reg)
return *((volatile unsigned long *)(APIC_BASE+reg));
}

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

void apic_wait_icr_idle(void);
unsigned long safe_apic_wait_icr_idle(void);
int get_physical_broadcast(void);

#ifdef CONFIG_X86_GOOD_APIC
Expand Down

0 comments on commit f99e00d

Please sign in to comment.