From: Manfred <manfred@colorfullife.com>
To: linux-kernel@vger.kernel.org
Cc: Gérard Roudier <groudier@club-internet.fr>,
"Maciej W. Rozycki" <macro@ds2.pg.gda.pl>,
Linus Torvalds <torvalds@transmeta.com>,
Andrew Morton <andrewm@uow.edu.au>,
Ingo Molnar <mingo@chiara.elte.hu>,
Randy <randy.dunlap@intel.com>
Subject: [test patch] reliable apic lockup with one enable/disable_irq()
Date: Sat, 03 Feb 2001 15:44:16 +0100 [thread overview]
Message-ID: <3A7C1940.FDFC2EED@colorfullife.com> (raw)
In-Reply-To: <Pine.LNX.4.10.10102031117430.893-100000@linux.local>
[-- Attachment #1: Type: text/plain, Size: 886 bytes --]
I found a sequence that reliably locks up my 82093AA ioapic with just
one disable/enable_irq.
I've attached a patch for the tulip driver. (tested with a pnic card)
* focus cpu must be enabled.
* Gerard's mask sequence: disable_irq() only sets IRQ_DISABLED,
mask_and_ack masks the ioapic entry if an interrupt is send to a
disabled handler.
* tulip_open:
disable_irq()
<sleep>
force the irq line active (enable both TPLnkPass and TPLnkFail, one of
them is always active)
<sleep>
enable_irq()
#insmod tulip
#ifup eth1
and now the interrupt is delivered as edge triggered, but the IRR bit is
set --> irq line stuck.
Could someone test the patch with newer boards (i840, via apollo pro,
perhaps i815 if the bios builds the MP table)
I also tried changing the trigger mode bit in
{,un}mask_level_IO_APIC_irq(), but that doesn't prevent the hang.
The patch is against 2.4.1
--
Manfred
[-- Attachment #2: patch-hang --]
[-- Type: text/plain, Size: 2364 bytes --]
// $Header$
// Kernel Version:
// VERSION = 2
// PATCHLEVEL = 4
// SUBLEVEL = 1
// EXTRAVERSION =
--- 2.4/drivers/net/tulip/tulip_core.c Sat Feb 3 14:02:54 2001
+++ build-2.4/drivers/net/tulip/tulip_core.c Sat Feb 3 14:04:58 2001
@@ -421,6 +421,24 @@
tulip_up (dev);
+ disable_irq(dev->irq);
+ set_current_state(TASK_UNINTERRUPTIBLE);
+ schedule_timeout(10);
+
+{
+ long ioaddr = dev->base_addr;
+ long csr7 = inl(ioaddr + CSR7);
+ outl(NormalIntr|AbnormalIntr|TPLnkPass|TPLnkFail, ioaddr + CSR7);
+ set_current_state(TASK_UNINTERRUPTIBLE);
+ schedule_timeout(10);
+ enable_irq(dev->irq);
+
+ set_current_state(TASK_UNINTERRUPTIBLE);
+ schedule_timeout(10);
+ outl(csr7, ioaddr + CSR7);
+
+}
+
netif_start_queue (dev);
return 0;
--- 2.4/arch/i386/kernel/io_apic.c Sat Feb 3 14:02:24 2001
+++ build-2.4/arch/i386/kernel/io_apic.c Sat Feb 3 14:54:14 2001
@@ -693,7 +693,7 @@
printk(KERN_WARNING " to linux-smp@vger.kernel.org\n");
}
-void __init print_IO_APIC(void)
+void print_IO_APIC(void)
{
int apic, i;
struct IO_APIC_reg_00 reg_00;
@@ -1189,14 +1189,22 @@
#define shutdown_level_ioapic_irq mask_IO_APIC_irq
#define enable_level_ioapic_irq unmask_IO_APIC_irq
-#define disable_level_ioapic_irq mask_IO_APIC_irq
+static void disable_level_ioapic_irq(unsigned int i)
+{
+ /* delayed. */
+}
static void end_level_ioapic_irq (unsigned int i)
{
ack_APIC_irq();
}
-static void mask_and_ack_level_ioapic_irq (unsigned int i) { /* nothing */ }
+static void mask_and_ack_level_ioapic_irq (unsigned int i)
+{
+ if (irq_desc[i].status & IRQ_DISABLED) {
+ mask_IO_APIC_irq(i);
+ }
+}
static void set_ioapic_affinity (unsigned int irq, unsigned long mask)
{
--- 2.4/arch/i386/kernel/apic.c Sat Feb 3 14:02:24 2001
+++ build-2.4/arch/i386/kernel/apic.c Sat Feb 3 14:42:47 2001
@@ -270,7 +270,7 @@
* PCI Ne2000 networking cards and PII/PIII processors, dual
* BX chipset. ]
*/
-#if 0
+#if 1
/* Enable focus processor (bit==0) */
value &= ~(1<<9);
#else
--- 2.4/drivers/char/sysrq.c Mon Dec 4 02:48:19 2000
+++ build-2.4/drivers/char/sysrq.c Sat Feb 3 14:33:51 2001
@@ -137,6 +137,10 @@
send_sig_all(SIGKILL, 1);
orig_log_level = 8;
break;
+ case 'q':
+ print_all_local_APICs();
+ print_IO_APIC();
+ break;
default: /* Unknown: help */
if (kbd)
printk("unRaw ");
next prev parent reply other threads:[~2001-02-03 14:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-29 18:46 [patch] 2.4.0, 2.4.0-ac12: APIC lock-ups Maciej W. Rozycki
2001-01-29 20:40 ` Manfred Spraul
2001-01-30 11:20 ` Maciej W. Rozycki
2001-02-01 0:58 ` Andrew Morton
2001-02-02 12:08 ` Maciej W. Rozycki
2001-02-02 18:12 ` Gérard Roudier
2001-02-02 22:17 ` Manfred Spraul
2001-02-03 10:28 ` Gérard Roudier
2001-02-03 14:44 ` Manfred [this message]
2001-02-05 10:32 ` Maciej W. Rozycki
2001-02-03 12:14 ` Manfred Spraul
2001-02-05 11:38 ` Maciej W. Rozycki
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=3A7C1940.FDFC2EED@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=andrewm@uow.edu.au \
--cc=groudier@club-internet.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=macro@ds2.pg.gda.pl \
--cc=mingo@chiara.elte.hu \
--cc=randy.dunlap@intel.com \
--cc=torvalds@transmeta.com \
/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