linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: lkml <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@digeo.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>, James <jamesclv@us.ibm.com>
Subject: [PATCH] linux-2.5.69_clear-smi-fix_A1
Date: 12 May 2003 17:30:03 -0700	[thread overview]
Message-ID: <1052785802.4169.12.camel@w-jstultz2.beaverton.ibm.com> (raw)

All, 
	I've been having problems with ACPI on a box here in our lab. Some of
our more recent hardware requires that SMIs are routed through the
IOAPIC, thus when we clear_IO_APIC() at boot time, we clear the BIOS
initialized SMI pin. This basically clobbers the SMI so we can then
never make the transition into ACPI mode. 

This patch simply reads the apic entry in clear_IO_APIC to make sure the
delivery_mode isn't dest_SMI. If it is, we leave the apic entry alone
and return.

With this patch, the box boots and SMIs function properly.

Please consider for inclusion.

thanks
-john

Changes since _A0:
o yanked printk
o locked the io_apic_read calls to insure atomicity


diff -Nru a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
--- a/arch/i386/kernel/io_apic.c	Mon May 12 17:16:06 2003
+++ b/arch/i386/kernel/io_apic.c	Mon May 12 17:16:06 2003
@@ -219,6 +219,14 @@
 {
 	struct IO_APIC_route_entry entry;
 	unsigned long flags;
+	
+	/* Check delivery_mode to be sure we're not clearing an SMI pin */
+	spin_lock_irqsave(&ioapic_lock, flags);
+	*(((int*)&entry) + 0) = io_apic_read(apic, 0x10 + 2 * pin);
+	*(((int*)&entry) + 1) = io_apic_read(apic, 0x11 + 2 * pin);
+	spin_unlock_irqrestore(&ioapic_lock, flags);
+	if (entry.delivery_mode == dest_SMI)
+		return;
 
 	/*
 	 * Disable it in the IO-APIC irq-routing table:





             reply	other threads:[~2003-05-13  0:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-13  0:30 john stultz [this message]
2003-05-13  0:54 ` [PATCH] linux-2.5.69_clear-smi-fix_A1 Dave Hansen
2003-05-13  1:03   ` john stultz
2003-05-13 14:03 ` Dave Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1052785802.4169.12.camel@w-jstultz2.beaverton.ibm.com \
    --to=johnstul@us.ibm.com \
    --cc=akpm@digeo.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jamesclv@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).