public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: mingo@elte.hu
Cc: Frank de Lange <frank@unternet.org>,
	Linus Torvalds <torvalds@transmeta.com>,
	dwmw2@infradead.org, linux-kernel@vger.kernel.org,
	Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated?
Date: Fri, 12 Jan 2001 21:54:31 +0100	[thread overview]
Message-ID: <3A5F6F07.88564D5B@colorfullife.com> (raw)
In-Reply-To: <Pine.LNX.4.30.0101122136180.2772-100000@e2>

[-- Attachment #1: Type: text/plain, Size: 887 bytes --]

Ingo Molnar wrote:
> 
> 
> okay - i just wanted to hear a definitive word from you that this fixes
> your problem, because this is what we'll have to do as a final solution.
> (barring any other solution.)
> 
Ingo, is that possible?

The current fix is "disable_irq_nosync() and enable_irq() cause
deadlocks with level triggered ioapic irqs, do not use them" - I'm sure
ne2k-pci isn't the only driver that uses these function.

I have found one combination that doesn't hang with the unpatched
8390.c, but network throughput is down to 1/2. I hope that's due to the
debugging changes.

I'll restart now from a fresh 2.4.0 tree:
Changes:

1) enable focus cpu.
2) apply the attached patch.

I'm not sure if it's a real fix or if it just hides the problem: my
sysrq patch has shown that clearing and setting the "level trigger" bit
in the io apic reanimates the IO APIC.

--
        Manfred

[-- Attachment #2: patch-io --]
[-- Type: text/plain, Size: 1698 bytes --]

--- build-2.4/arch/i386/kernel/io_apic.c.orig	Fri Jan 12 20:17:36 2001
+++ build-2.4/arch/i386/kernel/io_apic.c	Fri Jan 12 21:26:31 2001
@@ -134,6 +134,30 @@
 	spin_unlock_irqrestore(&ioapic_lock, flags);
 }
 
+DO_ACTION( __trigger_level,    0, |= 0x00008000, io_apic_sync(entry->apic))/* mask = 1 */
+DO_ACTION( __trigger_edge,  0, &= 0xffff7fff, )				/* mask = 0 */
+
+
+static void unmask_level_IO_APIC_irq (unsigned int irq)
+{
+	unsigned long flags;
+
+	spin_lock_irqsave(&ioapic_lock, flags);
+	__trigger_level_IO_APIC_irq(irq);
+	__unmask_IO_APIC_irq(irq);
+	spin_unlock_irqrestore(&ioapic_lock, flags);
+}
+
+static void mask_level_IO_APIC_irq (unsigned int irq)
+{
+	unsigned long flags;
+
+	spin_lock_irqsave(&ioapic_lock, flags);
+	__mask_IO_APIC_irq(irq);
+	__trigger_edge_IO_APIC_irq(irq);
+	spin_unlock_irqrestore(&ioapic_lock, flags);
+}
+
 static void unmask_IO_APIC_irq (unsigned int irq)
 {
 	unsigned long flags;
@@ -143,6 +167,7 @@
 	spin_unlock_irqrestore(&ioapic_lock, flags);
 }
 
+
 void clear_IO_APIC_pin(unsigned int apic, unsigned int pin)
 {
 	struct IO_APIC_route_entry entry;
@@ -1181,14 +1206,14 @@
  */
 static unsigned int startup_level_ioapic_irq (unsigned int irq)
 {
-	unmask_IO_APIC_irq(irq);
+	unmask_level_IO_APIC_irq(irq);
 
 	return 0; /* don't check for pending */
 }
 
-#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
+#define shutdown_level_ioapic_irq	mask_level_IO_APIC_irq
+#define enable_level_ioapic_irq		unmask_level_IO_APIC_irq
+#define disable_level_ioapic_irq	mask_level_IO_APIC_irq
 
 static void end_level_ioapic_irq (unsigned int i)
 {

  parent reply	other threads:[~2001-01-12 20:56 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-12 17:16 QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware related? Manfred Spraul
2001-01-12 17:33 ` Frank de Lange
2001-01-12 17:51   ` Manfred Spraul
2001-01-12 18:25     ` Frank de Lange
2001-01-12 19:04       ` Manfred Spraul
2001-01-12 19:07         ` Frank de Lange
2001-01-12 19:21         ` Frank de Lange
2001-01-12 19:33           ` Manfred Spraul
2001-01-12 19:52             ` Frank de Lange
2001-01-12 19:59               ` Linus Torvalds
2001-01-12 20:03                 ` Ingo Molnar
2001-01-14  0:13                   ` Roeland Th. Jansen
2001-01-14  0:23                     ` Frank de Lange
2001-01-12 20:05                 ` Frank de Lange
2001-01-12 20:11                 ` QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated? Manfred Spraul
2001-01-12 20:16                   ` Frank de Lange
2001-01-12 20:19                     ` Ingo Molnar
2001-01-12 20:26                       ` Frank de Lange
2001-01-12 20:31                         ` Ingo Molnar
2001-01-12 20:35                           ` Frank de Lange
2001-01-12 20:37                             ` Ingo Molnar
2001-01-12 20:46                               ` David Woodhouse
2001-01-12 20:46                               ` Frank de Lange
2001-01-12 20:51                                 ` Ingo Molnar
2001-01-12 21:05                                   ` Frank de Lange
2001-01-15  2:00                                     ` Jorge Nerin
2001-01-13  0:15                                 ` Linus Torvalds
2001-01-13  0:19                                   ` Frank de Lange
2001-01-13  0:29                                     ` Alan Cox
2001-01-12 20:54                               ` Manfred Spraul [this message]
2001-01-12 21:07                                 ` Frank de Lange
2001-01-12 21:31                                   ` Manfred Spraul
2001-01-12 23:50                           ` Alan Cox
2001-01-12 21:21                 ` QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware related? Frank de Lange
2001-01-12 23:35             ` QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware Alan Cox
2001-01-13  0:06               ` Manfred Spraul
2001-01-13  0:36               ` Linus Torvalds
2001-01-13  0:48                 ` Frank de Lange
2001-01-13  0:56                   ` Linus Torvalds
2001-01-13  1:27                     ` Frank de Lange
2001-01-13  1:51                       ` Manfred Spraul
2001-01-13  2:11                         ` Frank de Lange
2001-01-13  1:49                     ` Jens Axboe
2001-01-13  2:12                     ` Andrew Morton
2001-01-13  2:48                       ` Linus Torvalds
2001-01-13  3:24                         ` Andrew Morton
2001-01-13 12:37                           ` Russell King
2001-01-13 15:18                             ` Call for testers: ne2k-pci and io apic (was: Re: QUESTION: Network hangs with BP6...) Manfred Spraul
2001-01-13 23:55                               ` Manfred Spraul
2001-01-14  0:18                               ` Call for testers: ne2k-pci and io apic J . A . Magallon
2001-01-14  0:23                               ` Call for testers: ne2k-pci and io apic (was: Re: QUESTION: Network hangs with BP6...) J . A . Magallon
2001-01-14  2:14                               ` Call for testers: ne2k-pci and io apic J . A . Magallon
2001-01-15 16:15                     ` QUESTION: Network hangs with BP6 and 2.4.x kernels, hardware Zdenek Kabelac
2001-01-13  1:38                 ` Manfred Spraul
2001-01-13  2:10               ` Andrew Morton
2001-01-12 17:49 ` Alan Cox
2001-01-12 18:08   ` Manfred Spraul
2001-01-12 18:16     ` Ingo Molnar
2001-01-12 18:45       ` Manfred Spraul
2001-01-12 18:48         ` Ingo Molnar
2001-01-12 18:28     ` Linus Torvalds
2001-01-12 23:27       ` Alan Cox
2001-01-13  0:35         ` Linus Torvalds
2001-01-13  0:43           ` Alan Cox
2001-01-13  0:48             ` Linus Torvalds
2001-01-12 19:05     ` Frank de Lange
2001-01-12 20:04       ` Linus Torvalds
2001-01-15 14:36         ` Roeland Th. Jansen
2001-01-12 22:03   ` Latest status of IDE patches from Andre Jeff Nguyen
     [not found] <20010112213217.E26555@unternet.org>
2001-01-12 20:34 ` QUESTION: Network hangs with BP6 and 2.4.x kernels, hardwarerelated? Ingo Molnar
2001-01-12 20:39   ` Frank de Lange

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=3A5F6F07.88564D5B@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=dwmw2@infradead.org \
    --cc=frank@unternet.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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