All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@hp.com>
To: linux-ia64@vger.kernel.org
Subject: [PATCH] bug w/ shared interrupts
Date: Mon, 26 Apr 2004 14:29:00 +0000	[thread overview]
Message-ID: <1082989740.15656.20.camel@localhost> (raw)


   I just ran into a bug introduced by cset 1.1371.519.37.  The scenario
is a builtin driver is up and running happily.  A module loads for a
devices that happens to share the same interrupt vector, in this case a
network driver.  The module calls pci_enable_device() as it should,
which eventually lands in iosapic_enable_intr().  We then proceed to
mask the interrupt and kill the device that's already running.  As a
bonus, request_interrupt() doesn't fix the problem because we only call
the startup for the interrupt handler on the first action attached to
the interrupt.

   I think the best way out of this is simply to detect when an action
is already attached to a vector and leave it alone.  This also prevents
interrupts from moving to other cpus (on boxes w/o irq redirection) for
no good reason.  Thanks,

	Alex

-- 
Alex Williamson                             HP Linux & Open Source Lab

=== arch/ia64/kernel/iosapic.c 1.39 vs edited ==--- 1.39/arch/ia64/kernel/iosapic.c	Wed Apr 21 15:26:09 2004
+++ edited/arch/ia64/kernel/iosapic.c	Sun Apr 25 21:13:33 2004
@@ -648,6 +648,16 @@
 iosapic_enable_intr (unsigned int vector)
 {
 	unsigned int dest;
+	irq_desc_t *desc;
+
+	/*
+	 * In the case of a shared interrupt, do not re-route the vector, and
+	 * especially do not mask a running interrupt (startup will not get
+	 * called for a shared interrupt).
+	 */
+	desc = irq_descp(vector);
+	if (desc->action)
+		return;
 
 #ifdef CONFIG_SMP
 	/*



             reply	other threads:[~2004-04-26 14:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-26 14:29 Alex Williamson [this message]
2004-04-26 21:12 ` [PATCH] bug w/ shared interrupts David Mosberger
2004-04-27 11:57 ` Kenji Kaneshige
2004-04-27 13:19 ` Kenji Kaneshige
2004-04-27 14:38 ` Bjorn Helgaas
2004-04-27 14:46 ` Alex Williamson

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=1082989740.15656.20.camel@localhost \
    --to=alex.williamson@hp.com \
    --cc=linux-ia64@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.