From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: linux-pci@atrey.karlin.mff.cuni.cz
Cc: Andi Kleen <andi@firstfloor.org>, Jean Delvare <jdelvare@suse.de>,
LKML <linux-kernel@vger.kernel.org>, Pavel Machek <pavel@ucw.cz>,
Tejun Heo <htejun@gmail.com>,
Tom Long Nguyen <tom.l.nguyen@intel.com>,
Randy Dunlap <rdunlap@xenotime.net>,
Jeff Garzik <jgarzik@pobox.com>
Subject: Re: PCI MSI breaks when booting with nosmp
Date: Mon, 21 Apr 2008 12:35:23 -0700 [thread overview]
Message-ID: <200804211235.25174.jbarnes@virtuousgeek.org> (raw)
In-Reply-To: <200804211207.00961.jbarnes@virtuousgeek.org>
On Monday, April 21, 2008 12:06 pm Jesse Barnes wrote:
> On Monday, April 21, 2008 11:45 am Andi Kleen wrote:
> > Jesse Barnes <jbarnes@virtuousgeek.org> writes:
> > > Ok, I see this too on my desktop machine. It looks like we're not
> > > getting interrupts setup correctly in the nosmp case. Still digging
> > > through to see why though...
> >
> > NoSMP disables the io-apic and a lot of modern systems don't work without
> > APIC.
> >
> > If you just want to run with a single cpu for testing etc. always use
> > maxcpus=1 (not 0, that will disable the APIC too)
>
> Right... but it looks like the MSI code is buggy when noapic is specified
> via nosmp or maxcpus=0. We should either fix it to work with noapic or
> disable it like we do the ioapic when nosmp or maxcpus=0:
Or if you want something that compiles & works (at least on my machine) here
it is. But the fact that noapic alone doesn't cause the bug means there's
probably something depending on !setup_max_cpus that needs fixing instead.
Jesse
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index eabeb1f..9170589 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -39,14 +39,6 @@ extern struct rw_semaphore pci_bus_sem;
extern unsigned int pci_pm_d3_delay;
-#ifdef CONFIG_PCI_MSI
-void pci_no_msi(void);
-extern void pci_msi_init_pci_dev(struct pci_dev *dev);
-#else
-static inline void pci_no_msi(void) { }
-static inline void pci_msi_init_pci_dev(struct pci_dev *dev) { }
-#endif
-
#ifdef CONFIG_PCIEAER
void pci_no_aer(void);
#else
diff --git a/include/linux/pci.h b/include/linux/pci.h
index ea760e5..0ed53d6 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -590,6 +590,13 @@ int pci_try_set_mwi(struct pci_dev *dev);
void pci_clear_mwi(struct pci_dev *dev);
void pci_intx(struct pci_dev *dev, int enable);
void pci_msi_off(struct pci_dev *dev);
+#ifdef CONFIG_PCI_MSI
+void pci_no_msi(void);
+extern void pci_msi_init_pci_dev(struct pci_dev *dev);
+#else
+static inline void pci_no_msi(void) { }
+static inline void pci_msi_init_pci_dev(struct pci_dev *dev) { }
+#endif
int pci_set_dma_mask(struct pci_dev *dev, u64 mask);
int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask);
int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size);
diff --git a/init/main.c b/init/main.c
index 99ce949..a9436b7 100644
--- a/init/main.c
+++ b/init/main.c
@@ -58,6 +58,7 @@
#include <linux/kthread.h>
#include <linux/sched.h>
#include <linux/signal.h>
+#include <linux/pci.h>
#include <asm/io.h>
#include <asm/bugs.h>
@@ -148,6 +149,7 @@ static int __init nosmp(char *str)
{
setup_max_cpus = 0;
disable_ioapic_setup();
+ pci_no_msi();
return 0;
}
@@ -156,9 +158,10 @@ early_param("nosmp", nosmp);
static int __init maxcpus(char *str)
{
get_option(&str, &setup_max_cpus);
- if (setup_max_cpus == 0)
+ if (setup_max_cpus == 0) {
disable_ioapic_setup();
-
+ pci_no_msi();
+ }
return 0;
}
next prev parent reply other threads:[~2008-04-21 19:40 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-17 19:40 PCI MSI breaks when booting with nosmp Jean Delvare
2008-04-17 20:08 ` Jesse Barnes
2008-04-17 20:25 ` Jean Delvare
2008-04-21 17:43 ` Jesse Barnes
2008-04-21 18:45 ` Andi Kleen
2008-04-21 19:06 ` Jesse Barnes
2008-04-21 19:35 ` Jesse Barnes [this message]
2008-04-21 19:41 ` Andi Kleen
2008-04-21 19:43 ` Pavel Machek
2008-04-21 19:44 ` Andi Kleen
2008-04-22 21:25 ` Pavel Machek
2008-04-22 23:07 ` Jesse Barnes
2008-04-21 20:20 ` Jean Delvare
2008-04-21 20:40 ` Jesse Barnes
2008-04-21 20:46 ` Andi Kleen
2008-04-21 20:48 ` Jean Delvare
2008-04-21 21:09 ` Andi Kleen
2008-04-21 21:14 ` Jesse Barnes
2008-04-22 13:27 ` Jean Delvare
2008-04-22 15:50 ` Jesse Barnes
2008-04-23 14:38 ` Jean Delvare
2008-04-23 15:12 ` Jesse Barnes
2008-04-23 18:13 ` Maciej W. Rozycki
2008-04-23 18:23 ` Jesse Barnes
2008-04-23 18:32 ` Jesse Barnes
2008-04-23 18:32 ` Jean Delvare
2008-04-23 18: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=200804211235.25174.jbarnes@virtuousgeek.org \
--to=jbarnes@virtuousgeek.org \
--cc=andi@firstfloor.org \
--cc=htejun@gmail.com \
--cc=jdelvare@suse.de \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=pavel@ucw.cz \
--cc=rdunlap@xenotime.net \
--cc=tom.l.nguyen@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 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.