public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Duncan Laurie <duncan@virtualwire.org>
To: Petr Matula <pem@informatics.muni.cz>
Cc: linux-kernel@vger.kernel.org, randy.dunlap@intel.com
Subject: Re: int. assignment on SMP + ServerWorks chipset
Date: Sun, 21 Jan 2001 21:54:23 -0700	[thread overview]
Message-ID: <20010121215423.A20953@virtualwire.org> (raw)
In-Reply-To: <3A64F7E2.30807@virtualwire.org> <20010118095810.A13218780@aisa.fi.muni.cz>
In-Reply-To: <20010118095810.A13218780@aisa.fi.muni.cz>; from "pem@informatics.muni.cz" on Thu, Jan 18, 2001 at 09:58:10AM

On Thu, 18 Jan 2001, Petr Matula wrote:
| On Tue, Jan 16, 2001 at 06:39:46PM -0700, Duncan Laurie wrote:
| > There may be bogus data in the PIRQ table as well, which is why this
| > explicitly routes the interrupt & sets the ELCR.  If you enable DEBUG
| > in pci-i386.h and re-send the dmesg output I will look it over.
| I tied your patch. dmesg output si attached.
| 
| Without this patch the smp kernel crashes when my USB printer is detected.
| With this patch only a USB Hub is detected but not the printer. It seems to
| be stable.
| 
| Petr
|

Hi Petr,

I didn't consider that your hardware would have subtle differences
than Mr. Dunlap's Intel SBT2 board, but these could have made the
hard-coded values in the patch invalid.  So instead try the attached
patch, and this time you'll need to plug in some values into a boot
parameter to override the mptable entry.

This "mpint=" parameter allows you to alter a specific (IO)INT mptable
entry destination APIC and INT.  It takes four arguments, the first
two for looking up the entry to change in the current mptable by APIC
and INT, and the second two are for the new APIC and INT values to use.
(I also have an expanded version that allows more detailed
modifications but the number of arguments gets out of hand very fast)

The values to use depend on what your system is configured to use
for the USB interrupt.  This can be obtained by using the dump_pirq
utility from the recent pcmcia utilities.  (I made some modifications
to recognize the ServerWorks IRQ router which is available from
ftp://virtualwire.org/dump_pirq)

The output you are looking for should look something like this:

Device 00:0f.0 (slot 0): ISA bridge
    INTA: link 0x01, irq mask 0x0400 [10]

The USB device is actually function 2, but uses INTA#.  The irq
mask value should give you the new INT value to put in the
mptable.  The old INT value can be read from the dmesg output
or by compiling and running mptable, which I also made available
at ftp://virtualwire.org/mptable.c.  (it appears to be '0' on your
hardware as well as Mr. Dunlap's)  The destination APIC should just
be the ID of the first IO-APIC in the system, in this case 4.

So based on the example above, you would add "mpint=5,0,4,10" to
the boot parameters.  One caveat, this doesn't actually change the
mptable as it is stored in memory so if you use the mptable program
to view it you will still see the original values.

Good luck, and feel free to send me the output from "dump_pirq"
and "mptable" if it doesn't work..

  -duncan


--- linux.orig/arch/i386/kernel/io_apic.c	Sun Oct  1 20:35:15 2000
+++ linux-2.4.1-pre8/arch/i386/kernel/io_apic.c	Sun Jan 21 21:08:42 2001
@@ -229,6 +229,43 @@
 }
 
 /*
+ * "mpint=oldAPIC,oldINT,newAPIC,newINT"
+ */
+static int __init ioapic_mpint_setup(char *str)
+{
+       struct mpc_config_intsrc newint;
+       int ints[5];
+       int i;
+
+       get_options(str, ARRAY_SIZE(ints), ints);
+       if (ints[0] < 4)
+               return 0;
+
+       for (i = 0; i < nr_ioapics; i++)
+               if (mp_ioapics[i].mpc_apicid == ints[1])
+                       ints[1] = i;
+
+       i = find_irq_entry(ints[1], ints[2], mp_INT);
+       if (i < 0)
+               return 0;
+
+       printk(KERN_DEBUG "(old) mpint: APIC ID %1d, APIC INT %02x\n",
+              mp_irqs[i].mpc_dstapic, mp_irqs[i].mpc_dstirq);
+
+       memcpy(&newint, &mp_irqs[i], sizeof(newint));
+       newint.mpc_dstapic = ints[3];
+       newint.mpc_dstirq = ints[4];
+       mp_irqs[i] = newint;
+
+       printk(KERN_DEBUG "(new) mpint: APIC ID %1d, APIC INT %02x\n",
+              mp_irqs[i].mpc_dstapic, mp_irqs[i].mpc_dstirq);
+
+       return 1;
+}
+
+__setup("mpint=", ioapic_mpint_setup);
+
+/*
  * Find the pin to which IRQ[irq] (ISA) is connected
  */
 static int __init find_isa_irq_pin(int irq, int type)


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2001-01-22  4:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-17  1:39 int. assignment on SMP + ServerWorks chipset Duncan Laurie
2001-01-17 17:53 ` Petr Matula
2001-01-18  8:58 ` Petr Matula
2001-01-22  4:54   ` Duncan Laurie [this message]
2001-01-22 22:05     ` Randy.Dunlap
2001-01-22 23:46       ` Duncan Laurie
2001-01-24  8:43     ` Petr Matula
  -- strict thread matches above, loose matches on Subject: below --
2001-01-23  1:52 Dunlap, Randy
2001-01-22 17:01 Dunlap, Randy
2001-01-22  0:26 Dunlap, Randy
     [not found] <D5E932F578EBD111AC3F00A0C96B1E6F07DBDF24@orsmsx31.jf.intel.com>
2001-01-16  4:49 ` Linus Torvalds
2001-01-16  5:35   ` Tim Hockin
2001-01-17 17:50   ` Petr Matula
2001-01-17 18:11     ` Andre Hedrick
2001-01-17 21:33     ` Linus Torvalds
2001-01-18  7:43       ` Petr Matula

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=20010121215423.A20953@virtualwire.org \
    --to=duncan@virtualwire.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pem@informatics.muni.cz \
    --cc=randy.dunlap@intel.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