linux-mips
[Top] [All Lists]

Re: [MIPS] SMTC: Fix crash on bootup with idebus= command line argument.

To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Subject: Re: [MIPS] SMTC: Fix crash on bootup with idebus= command line argument.
From: "Maciej W. Rozycki" <macro@linux-mips.org>
Date: Wed, 12 Sep 2007 16:54:08 +0100 (BST)
Cc: ralf@linux-mips.org, linux-mips@linux-mips.org
In-reply-to: <20070913.001809.106261283.anemo@mba.ocn.ne.jp>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <Pine.LNX.4.64N.0709111431240.30365@blysk.ds.pg.gda.pl> <20070911.230712.39152979.anemo@mba.ocn.ne.jp> <Pine.LNX.4.64N.0709111509140.30365@blysk.ds.pg.gda.pl> <20070913.001809.106261283.anemo@mba.ocn.ne.jp>
Sender: linux-mips-bounce@linux-mips.org
On Thu, 13 Sep 2007, Atsushi Nemoto wrote:

> >  Not quite so.  The test for the PCI-(E)ISA bridge is there so that they 
> > are handled.  Now I gather the use of no_pci_devices() in 
> > ide_probe_legacy() effectively disables the test entirely (thus making it 
> > a candidate for removal).  Or am I missing something?
> 
> Well, I missed your point...  please elaborate?

 I gather the problem is ide_probe_legacy() is called too early for PCI to 
have been initialised.  With the old code ide_probe_legacy() called 
pci_get_class(), which in turn triggered PCI initialisation, which enabled 
interrupts prematurely and the failure scenario happened.  To rectify Ralf 
resurrected yet older code that reserved the legacy ports unconditionally.  
You have put the code that calls pci_get_class() back and introduced this 
call to no_pci_devices() beforehand.  Please correct me if I have been 
wrong anywhere here.

 Now because at the point ide_probe_legacy() is called, PCI has not been 
initialised yet, no_pci_devices() returns true and calls to 
pci_get_class() are skipped preventing PCI initialisation from triggering 
at this point.  But the end result is they are not going to be called, 
because if they were, it would mean no_pci_devices() had returned false 
and would have been unnecessary in the first place.

 I hope I have been clearer now.

  Maciej

<Prev in Thread] Current Thread [Next in Thread>