[PATCH] x86: skip it if Fam 10h only handle bus 0

2008-02-20 Thread Yinghai Lu

need to apply after
x86_64: check MSR to get MMCONFIG for AMD Family 10h Opteron v3

some BIOS only let AMD fam 10h handle bus0, and nvidia mcp55/ck804
to handle other buses. at that case MCFG will cover all over them.

this patch will skip it so to use MCFG later.

Signed-off-by: Yinghai Lu <[EMAIL PROTECTED]>

Index: linux-2.6/arch/x86/pci/mmconfig-shared.c
===
--- linux-2.6.orig/arch/x86/pci/mmconfig-shared.c
+++ linux-2.6/arch/x86/pci/mmconfig-shared.c
@@ -123,6 +123,14 @@ static const char __init *pci_mmcfg_amd_
 
busnbits = (msr >> FAM10H_MMIO_CONF_BUSRANGE_SHIFT) &
 FAM10H_MMIO_CONF_BUSRANGE_MASK;
+
+   /*
+* only handle bus 0 ?
+* need to skip it
+*/
+   if (!busnbits)
+   return NULL;
+
if (busnbits > 8) {
segnbits = busnbits - 8;
busnbits = 8;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] x86: skip it if Fam 10h only handle bus 0

2008-02-20 Thread Yinghai Lu

need to apply after
x86_64: check MSR to get MMCONFIG for AMD Family 10h Opteron v3

some BIOS only let AMD fam 10h handle bus0, and nvidia mcp55/ck804
to handle other buses. at that case MCFG will cover all over them.

this patch will skip it so to use MCFG later.

Signed-off-by: Yinghai Lu [EMAIL PROTECTED]

Index: linux-2.6/arch/x86/pci/mmconfig-shared.c
===
--- linux-2.6.orig/arch/x86/pci/mmconfig-shared.c
+++ linux-2.6/arch/x86/pci/mmconfig-shared.c
@@ -123,6 +123,14 @@ static const char __init *pci_mmcfg_amd_
 
busnbits = (msr  FAM10H_MMIO_CONF_BUSRANGE_SHIFT) 
 FAM10H_MMIO_CONF_BUSRANGE_MASK;
+
+   /*
+* only handle bus 0 ?
+* need to skip it
+*/
+   if (!busnbits)
+   return NULL;
+
if (busnbits  8) {
segnbits = busnbits - 8;
busnbits = 8;
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/