linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Latest paulus.git PCI broken on mpc8540?
@ 2007-11-15 17:20 Clemens Koller
  2007-11-16  4:37 ` Kumar Gala
  0 siblings, 1 reply; 8+ messages in thread
From: Clemens Koller @ 2007-11-15 17:20 UTC (permalink / raw)
  To: linuxppc-embedded

Hi there!

I try to use the latest Linux-2.6.24-rc2-ge6a5c27f from paulus.git
for my mpc8540ads compatible board.

$ dmesg contains some nasty messages, which look like something is wrong.

PCI: Probing PCI hardware
PCI: Cannot allocate resource region 0 of device 0000:00:12.0
PCI: Cannot allocate resource region 1 of device 0000:00:12.0
PCI: Cannot allocate resource region 2 of device 0000:00:12.0
PCI: Cannot allocate resource region 3 of device 0000:00:12.0
PCI: Cannot allocate resource region 4 of device 0000:00:12.0
PCI: Cannot allocate resource region 0 of device 0000:00:14.0
PCI: Cannot allocate resource region 2 of device 0000:00:14.0

However, the PCI devices just work fine - machine boots and:

$ lspci -vv
00:12.0 Mass storage controller: Promise Technology, Inc. 20269 (rev 02) (prog-if 85)
         Subsystem: Promise Technology, Inc. Ultra133TX2
         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB-
         Status: Cap+ 66MHz+ UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <-
         Latency: 128 (1000ns min, 4500ns max), Cache Line Size: 32 bytes
         Interrupt: pin A routed to IRQ 18
         Region 0: I/O ports at 1000 [size=8]
         Region 1: I/O ports at 1008 [size=4]
         Region 2: I/O ports at 1010 [size=8]
         Region 3: I/O ports at 100c [size=4]
         Region 4: I/O ports at 1020 [size=16]
         Region 5: Memory at 80000000 (32-bit, non-prefetchable) [size=16K]
         Expansion ROM at 000dc000 [disabled] [size=16K]
         Capabilities: [60] Power Management version 1
                 Flags: PMEClk- DSI+ D1+ D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                 Status: D0 PME-Enable- DSel=0 DScale=0 PME-
         Kernel driver in use: pata_pdc2027x

00:14.0 Mass storage controller: Promise Technology, Inc. PDC40775 (SATA 300 TX2plus) (rev 02)
         Subsystem: Promise Technology, Inc. PDC40775 (SATA 300 TX2plus)
         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB-
         Status: Cap+ 66MHz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR--
         Latency: 128 (1000ns min, 4500ns max), Cache Line Size: 32 bytes
         Interrupt: pin A routed to IRQ 19
         Region 0: I/O ports at 1080 [size=128]
         Region 2: I/O ports at 1400 [size=256]
         Region 3: Memory at 80004000 (32-bit, non-prefetchable) [size=4K]
         Region 4: Memory at 80020000 (32-bit, non-prefetchable) [size=128K]
         Expansion ROM at 00080000 [disabled] [size=32K]
         Capabilities: [60] Power Management version 2
                 Flags: PMEClk- DSI+ D1+ D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                 Status: D0 PME-Enable- DSel=0 DScale=0 PME-
         Kernel driver in use: sata_promise


Hmm...
I suspect a wrong kernel config or problems with the device tree
(I'm using an unchanged arch/powerpc/boot/dts/mpc8540ads.dts).
My .config is based on the mpc8540_ads_defconfig was attached:
http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20071114/2567627a/attachment-0001.txt

Any ideas?

Thank you,

-- 
Clemens Koller
__________________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Straße 45/1
Linhof Werksgelände
D-81379 München
Tel.089-741518-50
Fax 089-741518-19
http://www.anagramm-technology.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Latest paulus.git PCI broken on mpc8540?
  2007-11-15 17:20 Latest paulus.git PCI broken on mpc8540? Clemens Koller
@ 2007-11-16  4:37 ` Kumar Gala
  2007-11-16  5:35   ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 8+ messages in thread
From: Kumar Gala @ 2007-11-16  4:37 UTC (permalink / raw)
  To: Clemens Koller; +Cc: linuxppc-embedded


On Nov 15, 2007, at 11:20 AM, Clemens Koller wrote:

> Hi there!
>
> I try to use the latest Linux-2.6.24-rc2-ge6a5c27f from paulus.git
> for my mpc8540ads compatible board.
>
> $ dmesg contains some nasty messages, which look like something is  
> wrong.
>
> PCI: Probing PCI hardware
> PCI: Cannot allocate resource region 0 of device 0000:00:12.0
> PCI: Cannot allocate resource region 1 of device 0000:00:12.0
> PCI: Cannot allocate resource region 2 of device 0000:00:12.0
> PCI: Cannot allocate resource region 3 of device 0000:00:12.0
> PCI: Cannot allocate resource region 4 of device 0000:00:12.0
> PCI: Cannot allocate resource region 0 of device 0000:00:14.0
> PCI: Cannot allocate resource region 2 of device 0000:00:14.0

this isn't really an error.  Its more of a warning, the kernel will  
try and allocate these later and I'm guessing based on what you are  
seeing it succeeded.

Benh, can we possibly change these messages in pci_32.c?

- k

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Latest paulus.git PCI broken on mpc8540?
  2007-11-16  4:37 ` Kumar Gala
@ 2007-11-16  5:35   ` Benjamin Herrenschmidt
  2007-11-16 19:18     ` Kumar Gala
  0 siblings, 1 reply; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2007-11-16  5:35 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-embedded


On Thu, 2007-11-15 at 22:37 -0600, Kumar Gala wrote:
> > PCI: Probing PCI hardware
> > PCI: Cannot allocate resource region 0 of device 0000:00:12.0
> > PCI: Cannot allocate resource region 1 of device 0000:00:12.0
> > PCI: Cannot allocate resource region 2 of device 0000:00:12.0
> > PCI: Cannot allocate resource region 3 of device 0000:00:12.0
> > PCI: Cannot allocate resource region 4 of device 0000:00:12.0
> > PCI: Cannot allocate resource region 0 of device 0000:00:14.0
> > PCI: Cannot allocate resource region 2 of device 0000:00:14.0
> 
> this isn't really an error.  Its more of a warning, the kernel will  
> try and allocate these later and I'm guessing based on what you are  
> seeing it succeeded.
> 
> Benh, can we possibly change these messages in pci_32.c?

Heh, well, I've been working on 44x PCI lately and got annoyed by the
exact same messages, though I'm still pondering what would be a better
replacement.

Ben

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Latest paulus.git PCI broken on mpc8540?
  2007-11-16  5:35   ` Benjamin Herrenschmidt
@ 2007-11-16 19:18     ` Kumar Gala
  2007-11-16 21:09       ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 8+ messages in thread
From: Kumar Gala @ 2007-11-16 19:18 UTC (permalink / raw)
  To: benh; +Cc: linuxppc-embedded


On Nov 15, 2007, at 11:35 PM, Benjamin Herrenschmidt wrote:

>
> On Thu, 2007-11-15 at 22:37 -0600, Kumar Gala wrote:
>>> PCI: Probing PCI hardware
>>> PCI: Cannot allocate resource region 0 of device 0000:00:12.0
>>> PCI: Cannot allocate resource region 1 of device 0000:00:12.0
>>> PCI: Cannot allocate resource region 2 of device 0000:00:12.0
>>> PCI: Cannot allocate resource region 3 of device 0000:00:12.0
>>> PCI: Cannot allocate resource region 4 of device 0000:00:12.0
>>> PCI: Cannot allocate resource region 0 of device 0000:00:14.0
>>> PCI: Cannot allocate resource region 2 of device 0000:00:14.0
>>
>> this isn't really an error.  Its more of a warning, the kernel will
>> try and allocate these later and I'm guessing based on what you are
>> seeing it succeeded.
>>
>> Benh, can we possibly change these messages in pci_32.c?
>
> Heh, well, I've been working on 44x PCI lately and got annoyed by the
> exact same messages, though I'm still pondering what would be a better
> replacement.

Well, for one the generic pci code will complain if its not able to  
allocate the resource which is the true failure.

I'm thinking maybe we just make these pr_debug() instead of standard  
printk?

- k

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Latest paulus.git PCI broken on mpc8540?
  2007-11-16 19:18     ` Kumar Gala
@ 2007-11-16 21:09       ` Benjamin Herrenschmidt
  2007-11-16 21:14         ` Clemens Koller
  2007-11-16 21:45         ` Kumar Gala
  0 siblings, 2 replies; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2007-11-16 21:09 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-embedded


On Fri, 2007-11-16 at 13:18 -0600, Kumar Gala wrote:
> 
> 
> Well, for one the generic pci code will complain if its not able to  
> allocate the resource which is the true failure.
> 
> I'm thinking maybe we just make these pr_debug() instead of standard  
> printk?

I was thinking about changing the message to "cannot allocate initial
resource, will reallocate" or something like that. That is, make it
clear it's non fatal.

Ben.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Latest paulus.git PCI broken on mpc8540?
  2007-11-16 21:09       ` Benjamin Herrenschmidt
@ 2007-11-16 21:14         ` Clemens Koller
  2007-11-16 21:20           ` Benjamin Herrenschmidt
  2007-11-16 21:45         ` Kumar Gala
  1 sibling, 1 reply; 8+ messages in thread
From: Clemens Koller @ 2007-11-16 21:14 UTC (permalink / raw)
  To: benh; +Cc: linuxppc-embedded

Hi, Ben!

Benjamin Herrenschmidt schrieb:
> On Fri, 2007-11-16 at 13:18 -0600, Kumar Gala wrote:
>>
>> Well, for one the generic pci code will complain if its not able to  
>> allocate the resource which is the true failure.
>>
>> I'm thinking maybe we just make these pr_debug() instead of standard  
>> printk?
> 
> I was thinking about changing the message to "cannot allocate initial
> resource, will reallocate" or something like that. That is, make it
> clear it's non fatal.

I don't know much of the code, so, propably a stupid question:
Can we avoid to do the initial resource allocation, when it's known to fail?

It seems to me like things are done twice here:
1. try
2. reallocate
3. retry

Regards,

-- 
Clemens Koller
_______________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Str. 45/1
81379 Muenchen
Germany

http://www.anagramm-technology.com
Phone: +49-89-741518-50
Fax: +49-89-741518-19

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Latest paulus.git PCI broken on mpc8540?
  2007-11-16 21:14         ` Clemens Koller
@ 2007-11-16 21:20           ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2007-11-16 21:20 UTC (permalink / raw)
  To: Clemens Koller; +Cc: linuxppc-embedded


> 
> I don't know much of the code, so, propably a stupid question:
> Can we avoid to do the initial resource allocation, when it's known to fail?
> 
> It seems to me like things are done twice here:
> 1. try
> 2. reallocate
> 3. retry

Well, we don't know it's going to fail until we try :-)

Ben.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Latest paulus.git PCI broken on mpc8540?
  2007-11-16 21:09       ` Benjamin Herrenschmidt
  2007-11-16 21:14         ` Clemens Koller
@ 2007-11-16 21:45         ` Kumar Gala
  1 sibling, 0 replies; 8+ messages in thread
From: Kumar Gala @ 2007-11-16 21:45 UTC (permalink / raw)
  To: benh; +Cc: linuxppc-embedded


On Nov 16, 2007, at 3:09 PM, Benjamin Herrenschmidt wrote:

>
> On Fri, 2007-11-16 at 13:18 -0600, Kumar Gala wrote:
>>
>>
>> Well, for one the generic pci code will complain if its not able to
>> allocate the resource which is the true failure.
>>
>> I'm thinking maybe we just make these pr_debug() instead of standard
>> printk?
>
> I was thinking about changing the message to "cannot allocate initial
> resource, will reallocate" or something like that. That is, make it
> clear it's non fatal.

Yeah, something that on those lines would be good, and maybe mark them  
KERN_WARNING instead of KERN_ERR.

- k

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-11-16 21:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-15 17:20 Latest paulus.git PCI broken on mpc8540? Clemens Koller
2007-11-16  4:37 ` Kumar Gala
2007-11-16  5:35   ` Benjamin Herrenschmidt
2007-11-16 19:18     ` Kumar Gala
2007-11-16 21:09       ` Benjamin Herrenschmidt
2007-11-16 21:14         ` Clemens Koller
2007-11-16 21:20           ` Benjamin Herrenschmidt
2007-11-16 21:45         ` Kumar Gala

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).