Latest paulus.git PCI broken on mpc8540?

8 messages, 3 authors, 2007-11-16 · open the first message on its own page

Latest paulus.git PCI broken on mpc8540?

From: Clemens Koller <hidden>
Date: 2007-11-15 17:20:15

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

Re: Latest paulus.git PCI broken on mpc8540?

From: Kumar Gala <hidden>
Date: 2007-11-16 04:37:48

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

Re: Latest paulus.git PCI broken on mpc8540?

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2007-11-16 05:35:44

On Thu, 2007-11-15 at 22:37 -0600, Kumar Gala wrote:
quoted
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

Re: Latest paulus.git PCI broken on mpc8540?

From: Kumar Gala <hidden>
Date: 2007-11-16 19:18:50

On Nov 15, 2007, at 11:35 PM, Benjamin Herrenschmidt wrote:
On Thu, 2007-11-15 at 22:37 -0600, Kumar Gala wrote:
quoted
quoted
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

Re: Latest paulus.git PCI broken on mpc8540?

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2007-11-16 21:09:27

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.

Re: Latest paulus.git PCI broken on mpc8540?

From: Clemens Koller <hidden>
Date: 2007-11-16 21:14:58

Hi, Ben!

Benjamin Herrenschmidt schrieb:
On Fri, 2007-11-16 at 13:18 -0600, Kumar Gala wrote:
quoted
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

Re: Latest paulus.git PCI broken on mpc8540?

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2007-11-16 21:20:48

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.

Re: Latest paulus.git PCI broken on mpc8540?

From: Kumar Gala <hidden>
Date: 2007-11-16 21:45:39

On Nov 16, 2007, at 3:09 PM, Benjamin Herrenschmidt wrote:
On Fri, 2007-11-16 at 13:18 -0600, Kumar Gala wrote:
quoted

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help