[PATCH] x86 reboot: Remove inb_p usage

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <mingo@...>, <akpm@...>, <linux-kernel@...>
Date: Saturday, January 19, 2008 - 11:44 am

We are driving a motherboard port so use a 2uS explicit delay at this
point.

Signed-off-by: Alan Cox <alan@redhat.com>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.24-rc8-mm1/arch/x86/kernel/reboot.c linux-2.6.24-rc8-mm1/arch/x86/kernel/reboot.c
--- linux.vanilla-2.6.24-rc8-mm1/arch/x86/kernel/reboot.c	2008-01-19 14:47:55.000000000 +0000
+++ linux-2.6.24-rc8-mm1/arch/x86/kernel/reboot.c	2008-01-19 14:53:58.000000000 +0000
@@ -319,9 +319,11 @@
 {
 	int i;
 
-	for (i = 0; i < 0x10000; i++)
-		if ((inb_p(0x64) & 0x02) == 0)
+	for (i = 0; i < 0x10000; i++) {
+		if ((inb(0x64) & 0x02) == 0)
 			break;
+		udelay(2);
+	}
 }
 
 void machine_emergency_restart(void)
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] x86 reboot: Remove inb_p usage, Alan Cox, (Sat Jan 19, 11:44 am)
Re: [PATCH] x86 reboot: Remove inb_p usage, Ingo Molnar, (Tue Jan 22, 5:55 am)
Re: [PATCH] x86 reboot: Remove inb_p usage, Ray Lee, (Sat Jan 19, 1:00 pm)
Re: [PATCH] x86 reboot: Remove inb_p usage, Alan Cox, (Sat Jan 19, 3:59 pm)