See patch.
Uwe.
Subject: [coreboot] [PATCH] kconfig: Set MAX_PCI_BUSES to same values as
Can we just remove it from newconfig and Kconfig? It's never used in the code.
Thanks, Myles
Myles Watson wrote:
Subject: [coreboot] [PATCH] kconfig: Set MAX_PCI_BUSES to same values as
Can we just remove it from newconfig and Kconfig? It's never used in the code.
Or fix the code? Shouldn't it be used?
//Peter
On Fri, Oct 16, 2009 at 8:29 AM, Peter Stuge peter@stuge.se wrote:
Myles Watson wrote:
Subject: [coreboot] [PATCH] kconfig: Set MAX_PCI_BUSES to same values
as
Can we just remove it from newconfig and Kconfig? It's never used in the code.
Or fix the code? Shouldn't it be used?
For what?
Thanks, Myles
Myles Watson wrote:
Subject: [coreboot] [PATCH] kconfig: Set MAX_PCI_BUSES to same values as
Can we just remove it from newconfig and Kconfig? It's never used in the code.
Or fix the code? Shouldn't it be used?
For what?
Stop scanning PCI busses?
//Peter
On Fri, Oct 16, 2009 at 8:39 AM, Peter Stuge peter@stuge.se wrote:
Myles Watson wrote:
Subject: [coreboot] [PATCH] kconfig: Set MAX_PCI_BUSES to same values as
Can we just remove it from newconfig and Kconfig? It's never used in the code.
Or fix the code? Shouldn't it be used?
For what?
Stop scanning PCI busses?
Right now the code scans the root bus and any bus it can find from there. It just scans until it finds no more devices which have a bus. I don't think we want to change the code to blindly scan from 0->MAX_PCI_BUSES. On my Tyan s2895 Board there are 6 PCI buses as it's configured: 0,1,2,40,41,42,80. You can plug in a card that will make more somewhere, but 3-39,43-79,81-... don't need to be scanned.
Thanks, Myles
This variable may date way back to v1 and a problem I had with a via part, wherein scanning above a certain PCI bus would hang the chip up. I doubt we need it any more.
ron
ron minnich wrote:
I doubt we need it any more.
Thanks for the explanations, Myles and Ron! See patch.
//Peter
On Fri, Oct 16, 2009 at 8:04 AM, Peter Stuge peter@stuge.se wrote:
ron minnich wrote:
I doubt we need it any more.
Thanks for the explanations, Myles and Ron! See patch.
Thanks for finding that.
Acked-by: Ronald G. Minnich rminnich@gmail.com
On Fri, Oct 16, 2009 at 9:04 AM, Peter Stuge peter@stuge.se wrote:
ron minnich wrote:
I doubt we need it any more.
Thanks for the explanations, Myles and Ron! See patch.
## Setting this number very high will make pci_locate_device() take a long ## time when it can't find a device. ## -default CONFIG_MAX_PCI_BUSES = 3 The comments should disappear too. ... -define CONFIG_MAX_PCI_BUSES default 255 export always comment "Maximum number of PCI buses to search for devices" The rest of this has to go.
Thanks, Myles
On Fri, Oct 16, 2009 at 05:04:52PM +0200, Peter Stuge wrote:
ron minnich wrote:
I doubt we need it any more.
Thanks for the explanations, Myles and Ron! See patch.
//Peter
Drop CONFIG_MAX_PCI_BUSES
It was added by rsmith in r2273 on 20060424, when pci_locate_device() in src/arch/i386/include/arch/romcc_io.h in fact scanned all busses:
- for(; dev <= PCI_DEV(255, 31, 7); dev += PCI_DEV(0,0,1)) {
- for(; dev <= PCI_DEV(CONFIG_MAX_PCI_BUSES, 31, 7); dev += PCI_DEV(0,0,1)) {
Today this looks like:
for(; dev <= PCI_DEV(255|(((1<<CONFIG_PCI_BUS_SEGN_BITS)-1)<<8), 31, 7); dev += PCI_DEV(0,0,1)) {
and CONFIG_MAX_PCI_BUSES is never used anywhere.
Signed-off-by: Peter Stuge peter@stuge.se
Looks like you were faster, but here's my patch nonetheless. It removeѕ some additional useless comments. Also, the change in src/config/Options.lb is not correct and will likely break the build.
Index: src/config/Options.lb
--- src/config/Options.lb (revision 4787) +++ src/config/Options.lb (working copy) @@ -562,7 +562,6 @@ export used comment "System clock frequency in MHz" end -define CONFIG_MAX_PCI_BUSES default 255 export always comment "Maximum number of PCI buses to search for devices"
Uwe.
Myles Watson wrote:
## Setting this number very high will make pci_locate_device() take a long ## time when it can't find a device. ## -default CONFIG_MAX_PCI_BUSES = 3 The comments should disappear too. ... -define CONFIG_MAX_PCI_BUSES default 255 export always comment "Maximum number of PCI buses to search for devices" The rest of this has to go.
Duh! Thanks for finding it!
Uwe Hermann wrote:
Drop CONFIG_MAX_PCI_BUSES
It was added by rsmith in r2273 on 20060424, when pci_locate_device() in src/arch/i386/include/arch/romcc_io.h in fact scanned all busses:
- for(; dev <= PCI_DEV(255, 31, 7); dev += PCI_DEV(0,0,1)) {
- for(; dev <= PCI_DEV(CONFIG_MAX_PCI_BUSES, 31, 7); dev += PCI_DEV(0,0,1)) {
Today this looks like:
for(; dev <= PCI_DEV(255|(((1<<CONFIG_PCI_BUS_SEGN_BITS)-1)<<8), 31, 7); dev += PCI_DEV(0,0,1)) {
and CONFIG_MAX_PCI_BUSES is never used anywhere.
Signed-off-by: Peter Stuge peter@stuge.se
Looks like you were faster, but here's my patch nonetheless. It removeѕ some additional useless comments. Also, the change in src/config/Options.lb is not correct and will likely break the build.
Good stuff! Thanks for finding what I missed. Feel free to grab some parts from my commit message and go for it!
Drop unused and useless CONFIG_MAX_PCI_BUSES.
Signed-off-by: Uwe Hermann uwe@hermann-uwe.de
Acked-by: Peter Stuge peter@stuge.se
On Fri, Oct 16, 2009 at 05:22:47PM +0200, Peter Stuge wrote:
Good stuff! Thanks for finding what I missed. Feel free to grab some parts from my commit message and go for it!
Acked-by: Peter Stuge peter@stuge.se
Done, r4789.
Uwe.
Uwe Hermann wrote:
kconfig: Set MAX_PCI_BUSES to same values as in oldconfig.
Signed-off-by: Uwe Hermann uwe@hermann-uwe.de
Acked-by: Peter Stuge peter@stuge.se