[PATCH 1/10] safe_apic_wait_icr_idle - i386

Keith Owens kaos at ocs.com.au
Wed Apr 25 08:55:01 EDT 2007


Fernando Luis =?ISO-8859-1?Q?V=E1zquez?= Cao (on Wed, 25 Apr 2007 20:13:28 +0900) wrote:
>+static __inline__ unsigned long safe_apic_wait_icr_idle(void)
>+{
>+	unsigned long send_status;
>+	int timeout;
>+
>+	timeout = 0;
>+	do {
>+		udelay(100);
>+		send_status = apic_read(APIC_ICR) & APIC_ICR_BUSY;
>+	} while (send_status && (timeout++ < 1000));
>+
>+	return send_status;
>+}
>+

safe_apic_wait_icr_idle() as coded guarantees a minimum 100 usec delay
before sending the IPI, this extra delay is unnecessary.  Change it to

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




More information about the kexec mailing list