public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: LKML <linux-kernel@vger.kernel.org>, linux-pci@atrey.karlin.mff.cuni.cz
Cc: Pavel Machek <pavel@ucw.cz>, Tejun Heo <htejun@gmail.com>,
	Tom Long Nguyen <tom.l.nguyen@intel.com>,
	Randy Dunlap <rdunlap@xenotime.net>,
	Reuben Farrelly <reuben-lkml@reub.net>,
	Jeff Garzik <jgarzik@pobox.com>
Subject: PCI MSI breaks when booting with nosmp
Date: Thu, 17 Apr 2008 21:40:01 +0200	[thread overview]
Message-ID: <200804172140.02311.jdelvare@suse.de> (raw)

Hi all,

My Thinkpad T60p laptop won't boot any recent kernel with nosmp.
I investigated the issue because many people have been complaining
lately that nosmp was breaking their system, and that's unfortunate
because nosmp is a valuable debugging tool.

The actual problem is that the ahci driver fails during probe.
It's essentially the same problem that has been reported here over
3 years ago:
http://marc.info/?l=linux-ide&m=112729386600155&w=2

The post above gave me the idea to try booting with "nosmp pci=nomsi",
and that worked. This makes me believe that the problem is that PCI MSI
makes expectations that are no longer valid when booting with nomsp.

So, I have come up with the following naive patch:

* * * * *

Booting with "nosmp" doesn't work on my Thinkpad T60p laptop while
booting with "nosmp pci=nomsi" works. Forcibly disabling PCI MSI
when booting with nosmp fixes the problem. I'm not sure if it's the
correct fix though.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
---
 drivers/pci/pci.c |    4 ++++
 1 file changed, 4 insertions(+)

--- linux-2.6.25-rc9.orig/drivers/pci/pci.c
+++ linux-2.6.25-rc9/drivers/pci/pci.c
@@ -1635,6 +1635,10 @@ static int __devinit pci_init(void)
 	while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
 		pci_fixup_device(pci_fixup_final, dev);
 	}
+#ifdef CONFIG_SMP
+	if (setup_max_cpus == 0)
+		pci_no_msi();
+#endif	
 	return 0;
 }
 

* * * * *

I would welcome comments on the patch above. Is it even remotely
correct? Or is the bug more likely in the ahci driver and the PCI MSI
code is innocent?

FWIW, booting with noapic or nolapic without disabling PCI MSI works
fine for me, so it doesn't seem to be an APIC problem (although this was
my first suspect originally.)

Thanks,
-- 
Jean Delvare
Suse L3

             reply	other threads:[~2008-04-17 19:37 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-17 19:40 Jean Delvare [this message]
2008-04-17 20:08 ` PCI MSI breaks when booting with nosmp 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
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=200804172140.02311.jdelvare@suse.de \
    --to=jdelvare@suse.de \
    --cc=htejun@gmail.com \
    --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=reuben-lkml@reub.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox