From: "Randy.Dunlap" <rdunlap@xenotime.net>
To: Matthew Wilcox <matthew@wil.cx>
Cc: hch@infradead.org, alan@lxorguk.ukuu.org.uk, erich@areca.com.tw,
arjan@infradead.org, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, billion.wu@areca.com.tw,
akpm@osdl.org, oliver@neukum.org
Subject: Re: Areca RAID driver remaining items?
Date: Sun, 26 Feb 2006 11:00:24 -0800 [thread overview]
Message-ID: <20060226110024.874328e3.rdunlap@xenotime.net> (raw)
In-Reply-To: <20060226160247.GT28587@parisc-linux.org>
On Sun, 26 Feb 2006 09:02:47 -0700 Matthew Wilcox wrote:
> On Sat, Feb 25, 2006 at 10:41:12PM -0800, Randy.Dunlap wrote:
> > OK, updated patch for "pci=nomsi" is now at
> > http://www.xenotime.net/linux/patches/pci_nomsi.patch
>
> After sleeping on it, I realised this wouldn't work if CONFIG_PCI_MSI
> is disabled. So how about this (not even compile-tested):
It's good. Thanks for catching that.
> Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
> Index: ./Documentation/kernel-parameters.txt
> ===================================================================
> RCS file: /var/cvs/linux-2.6/Documentation/kernel-parameters.txt,v
> retrieving revision 1.41.4.1
> diff -u -p -r1.41.4.1 kernel-parameters.txt
> --- ./Documentation/kernel-parameters.txt 18 Feb 2006 05:26:01 -0000 1.41.4.1
> +++ ./Documentation/kernel-parameters.txt 26 Feb 2006 15:58:40 -0000
> @@ -49,6 +49,7 @@ restrictions referred to are that the re
> MCA MCA bus support is enabled.
> MDA MDA console support is enabled.
> MOUSE Appropriate mouse support is enabled.
> + MSI Message Signaled Interrupts (PCI).
> MTD MTD support is enabled.
> NET Appropriate network support is enabled.
> NUMA NUMA support is enabled.
> @@ -1135,6 +1136,9 @@ running once the system is up.
> Mechanism 2.
> nommconf [IA-32,X86_64] Disable use of MMCONFIG for PCI
> Configuration
> + nomsi [MSI] If the PCI_MSI kernel config parameter is
> + enabled, this kernel boot option can be used to
> + disable the use of MSI interrupts system-wide.
> nosort [IA-32] Don't sort PCI devices according to
> order given by the PCI BIOS. This sorting is
> done to get a device order compatible with
> Index: ./drivers/pci/Kconfig
> ===================================================================
> RCS file: /var/cvs/linux-2.6/drivers/pci/Kconfig,v
> retrieving revision 1.8
> diff -u -p -r1.8 Kconfig
> --- ./drivers/pci/Kconfig 14 Sep 2005 12:56:32 -0000 1.8
> +++ ./drivers/pci/Kconfig 26 Feb 2006 15:58:40 -0000
> @@ -11,6 +11,10 @@ config PCI_MSI
> generate an interrupt using an inbound Memory Write on its
> PCI bus instead of asserting a device IRQ pin.
>
> + Use of PCI MSI interrupts can be disabled at kernel boot time
> + by using the 'pci=nomsi' option. This disables MSI for the
> + entire system.
> +
> If you don't know what to do here, say N.
>
> config PCI_LEGACY_PROC
> Index: ./drivers/pci/msi.c
> ===================================================================
> RCS file: /var/cvs/linux-2.6/drivers/pci/msi.c,v
> retrieving revision 1.17
> diff -u -p -r1.17 msi.c
> --- ./drivers/pci/msi.c 4 Feb 2006 04:51:55 -0000 1.17
> +++ ./drivers/pci/msi.c 26 Feb 2006 15:58:40 -0000
> @@ -755,6 +755,9 @@ void pci_disable_msi(struct pci_dev* dev
> u16 control;
> unsigned long flags;
>
> + if (!pci_msi_enable)
> + return;
> +
> if (!dev || !(pos = pci_find_capability(dev, PCI_CAP_ID_MSI)))
> return;
>
> @@ -1006,6 +1009,9 @@ void pci_disable_msix(struct pci_dev* de
> int pos, temp;
> u16 control;
>
> + if (!pci_msi_enable)
> + return;
> +
> if (!dev || !(pos = pci_find_capability(dev, PCI_CAP_ID_MSIX)))
> return;
>
> @@ -1121,6 +1127,11 @@ void msi_remove_pci_irq_vectors(struct p
> }
> dev->irq = temp; /* Restore IOAPIC IRQ */
> }
> +}
> +
> +void pci_no_msi(void)
> +{
> + pci_msi_enable = 0;
> }
>
> EXPORT_SYMBOL(pci_enable_msi);
> Index: ./drivers/pci/pci.c
> ===================================================================
> RCS file: /var/cvs/linux-2.6/drivers/pci/pci.c,v
> retrieving revision 1.28
> diff -u -p -r1.28 pci.c
> --- ./drivers/pci/pci.c 4 Feb 2006 04:51:55 -0000 1.28
> +++ ./drivers/pci/pci.c 26 Feb 2006 15:58:40 -0000
> @@ -900,8 +900,12 @@ static int __devinit pci_setup(char *str
> if (k)
> *k++ = 0;
> if (*str && (str = pcibios_setup(str)) && *str) {
> - /* PCI layer options should be handled here */
> - printk(KERN_ERR "PCI: Unknown option `%s'\n", str);
> + if (!strcmp(str, "nomsi")) {
> + pci_no_msi();
> + } else {
> + printk(KERN_ERR "PCI: Unknown option `%s'\n",
> + str);
> + }
> }
> str = k;
> }
> Index: ./drivers/pci/pci.h
> ===================================================================
> RCS file: /var/cvs/linux-2.6/drivers/pci/pci.h,v
> retrieving revision 1.13
> diff -u -p -r1.13 pci.h
> --- ./drivers/pci/pci.h 17 Jan 2006 14:51:41 -0000 1.13
> +++ ./drivers/pci/pci.h 26 Feb 2006 15:58:40 -0000
> @@ -50,8 +50,10 @@ extern int pci_msi_quirk;
>
> #ifdef CONFIG_PCI_MSI
> void disable_msi_mode(struct pci_dev *dev, int pos, int type);
> +void pci_no_msi(void);
> #else
> static inline void disable_msi_mode(struct pci_dev *dev, int pos, int type) { }
> +static inline void pci_no_msi(void) { }
> #endif
>
> extern int pcie_mch_quirk;
>
---
next prev parent reply other threads:[~2006-02-26 18:59 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-20 18:02 Areca RAID driver remaining items? Dax Kelson
2006-02-20 18:11 ` Arjan van de Ven
2006-02-20 18:20 ` Christoph Hellwig
2006-02-22 6:27 ` erich
2006-02-22 14:57 ` Christoph Hellwig
2006-02-23 6:27 ` erich
2006-02-23 8:25 ` Arjan van de Ven
2006-02-23 9:50 ` erich
2006-02-23 9:56 ` Arjan van de Ven
2006-02-23 11:51 ` erich
2006-02-23 12:07 ` Arjan van de Ven
2006-02-24 2:08 ` erich
2006-02-24 8:50 ` Arjan van de Ven
2006-02-23 11:59 ` Alan Cox
2006-02-24 2:36 ` erich
2006-02-24 16:56 ` Christoph Hellwig
2006-02-24 17:03 ` Randy.Dunlap
2006-02-24 19:38 ` Matthew Wilcox
2006-02-24 20:14 ` Randy.Dunlap
2006-02-26 6:41 ` Randy.Dunlap
2006-02-26 16:02 ` Matthew Wilcox
2006-02-26 19:00 ` Randy.Dunlap [this message]
2006-02-24 3:18 erich
2006-02-27 11:27 erich
2006-02-27 12:36 ` Matthew Wilcox
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=20060226110024.874328e3.rdunlap@xenotime.net \
--to=rdunlap@xenotime.net \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arjan@infradead.org \
--cc=billion.wu@areca.com.tw \
--cc=erich@areca.com.tw \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=oliver@neukum.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).