Latest paulus.git PCI broken on mpc8540?
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_pdc2027x00: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,
Signature · 10 lines
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
Quoted 7 lines · Clemens Koller
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.
Quoted 8 lines
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
Quoted 9 lines · Kumar Gala
Quoted 8 lines
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
Quoted 5 lines
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
Quoted 15 lines · Benjamin Herrenschmidt
Quoted 13 lines · Kumar Gala
Quoted 8 lines
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.0this 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.
Quoted 5 lines
Quoted 1 line
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
Quoted 7 lines · Kumar Gala
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.
Hi, Ben!
Quoted 9 lines · Benjamin Herrenschmidt
Quoted 4 lines · Kumar Gala
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,
Signature · 11 lines
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
Quoted 9 lines
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.
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 5 lines · Kumar Gala
Well, for one the generic pci code will complain if its not able to allocate the resource which is the true failure.
Quoted 6 lines
Quoted 2 lines
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