On 1/14/2008 6:04 PM, Adrian Bunk wrote:Why not put in 2.6.24 a simple fix for the last known remaining mmconfig problems in 2.6.24? There has mostly been three bugs related to mmconfig: - BIOS/hardware: exaggerated MCFG claims: solved long ago - hardware: buggy CRS+mmconfig chipset: fix included last month - Linux code: mmconfig incompatible with live BAR-probing: *not fixed* It would be ironic to not fix the only one that is really confined to the Linux code. Everybody more or less agrees *any* patches submitted so far does solve the known problems, and will not cause regressions. The only long discussion is about how to best prevent the effect of an "imaginary" fourth bug, and by nature that's a controversial topic. For 2.6.24, if nothing more than a few lines can be done, either make pci=nommconf the default and add a pci=mmconf option, or/and apply one of the easiest patch to review i.e.Tony's one, so small I copy it again below (using 0x40 or 0x100 for the comparison does not really matter, personally I would change it to 0x100 to be like Ivan's patch, but either is much better than nothing). Replacing some mmconfig access by conf1 cannot cause any regression. Loic P.S.: with that patch, conf1-less x86 systems requiring mmconfig would not be supported. But they are like UFOs. They are plenty of them in the galaxy, but earth sightings are not convincing enough for 2.6.24 support, they can wait 2.6.25. diff --git a/arch/x86/pci/mmconfig_32.c b/arch/x86/pci/mmconfig_32.c index 1bf5816..4474979 100644 --- a/arch/x86/pci/mmconfig_32.c +++ b/arch/x86/pci/mmconfig_32.c @@ -73,7 +73,7 @@ static int pci_mmcfg_read(unsigned int seg, unsigned int bus, } base = get_base_addr(seg, bus, devfn); - if (!base) + if ((!base) || (reg < 0x40)) return pci_conf1_read(seg,bus,devfn,reg,len,value); spin_lock_irqsave(&pci_config_lock, flags); @@ -106,7 +106,7 @@ static int pci_mmcfg_write(unsigned int seg, unsigned int bus, return -EINVAL; base = get_base_addr(seg, bus, devfn); - if (!base) + if ((!base) || (reg < 0x40)) return pci_conf1_write(seg,bus,devfn,reg,len,value); spin_lock_irqsave(&pci_config_lock, flags); diff --git a/arch/x86/pci/mmconfig_64.c b/arch/x86/pci/mmconfig_64.c index 4095e4d..4ad1fcb 100644 --- a/arch/x86/pci/mmconfig_64.c +++ b/arch/x86/pci/mmconfig_64.c @@ -61,7 +61,7 @@ static int pci_mmcfg_read(unsigned int seg, unsigned int bus, } addr = pci_dev_base(seg, bus, devfn); - if (!addr) + if ((!addr) || (reg < 0x40)) return pci_conf1_read(seg,bus,devfn,reg,len,value); switch (len) { @@ -89,7 +89,7 @@ static int pci_mmcfg_write(unsigned int seg, unsigned int bus, return -EINVAL; addr = pci_dev_base(seg, bus, devfn); - if (!addr) + if ((!addr) || (reg < 0x40)) return pci_conf1_write(seg,bus,devfn,reg,len,value); switch (len) { --
| Adrian Bunk | Re: Linux 2.6.21 |
| Linus Torvalds | Linux 2.6.21-rc2 |
| WANG Cong | [-mm Patch] UML: fix a building error |
| Roland McGrath | Re: [PATCH 0/5] ftrace: to kill a daemon |
git: | |
| Natalie Protasevich | [BUG] New Kernel Bugs |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Patrick McHardy | Re: [PATCH] netfilter: use per-cpu spinlock rather than RCU (v3) |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Theodore Ts'o | Re: cc1 fails silently |
| Michael Nolan | Power routines on notebook cause kernel panic |
| Marc Peters | v 0.11 boot disk problem |
| Dave `geek' Gymer | WARNING (was Re: New afio release) |
