Skip to contentSkip to conversation

x86/urgent: Fix NumaConnect2 MMCFG PCI access

PATCH New Daniel J Blueman 2 participants 2 messages Dec 30, 2015 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/urgent: Fix NumaConnect2 MMCFG PCI access

The MMCFG PCI accessors weren't being setup for NumacConnect2 correctly due to over-early assignment; this would create the potential for the wrong PCI domain to be accessed.

Fix this by using the correct arch-specific PCI init function.

---
 arch/x86/kernel/apic/apic_numachip.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
arch/x86/kernel/apic/apic_numachip.c +1 -4
index 38dd5ef..2bd2292 100644
@@ -193,20 +193,17 @@ static int __init numachip_system_init(void)
 	case 1:
 		init_extra_mapping_uc(NUMACHIP_LCSR_BASE, NUMACHIP_LCSR_SIZE);
 		numachip_apic_icr_write = numachip1_apic_icr_write;
-		x86_init.pci.arch_init = pci_numachip_init;
 		break;
 	case 2:
 		init_extra_mapping_uc(NUMACHIP2_LCSR_BASE, NUMACHIP2_LCSR_SIZE);
 		numachip_apic_icr_write = numachip2_apic_icr_write;
-
-		/* Use MCFG config cycles rather than locked CF8 cycles */
-		raw_pci_ops = &pci_mmcfg;
 		break;
 	default:
 		return 0;
 	}
 
 	x86_cpuinit.fixup_cpu_id = fixup_cpu_id;
+	x86_init.pci.arch_init = pci_numachip_init;
 
 	return 0;
 }

--
2.5.0

#1 lore raw

[tip:x86/urgent] x86/numachip: Fix NumaConnect2 MMCFG PCI access

x86/numachip: Fix NumaConnect2 MMCFG PCI access
Commit-ID:  dd7a5ab495019d424c2b0747892eb2e38a052ba5
Gitweb:     http://git.kernel.org/tip/dd7a5ab495019d424c2b0747892eb2e38a052ba5
Author:     Daniel J Blueman <[email protected]>
AuthorDate: Thu, 31 Dec 2015 02:06:47 +0800
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Wed, 30 Dec 2015 19:19:03 +0100

x86/numachip: Fix NumaConnect2 MMCFG PCI access

The MMCFG PCI accessors weren't being setup for NumacConnect2 correctly due to over-early assignment; this would create the potential for the wrong PCI domain to be accessed.

Fix this by using the correct arch-specific PCI init function.

---
 arch/x86/kernel/apic/apic_numachip.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
arch/x86/kernel/apic/apic_numachip.c +1 -4
index 38dd5ef..2bd2292 100644
@@ -193,20 +193,17 @@ static int __init numachip_system_init(void)
 	case 1:
 		init_extra_mapping_uc(NUMACHIP_LCSR_BASE, NUMACHIP_LCSR_SIZE);
 		numachip_apic_icr_write = numachip1_apic_icr_write;
-		x86_init.pci.arch_init = pci_numachip_init;
 		break;
 	case 2:
 		init_extra_mapping_uc(NUMACHIP2_LCSR_BASE, NUMACHIP2_LCSR_SIZE);
 		numachip_apic_icr_write = numachip2_apic_icr_write;
-
-		/* Use MCFG config cycles rather than locked CF8 cycles */
-		raw_pci_ops = &pci_mmcfg;
 		break;
 	default:
 		return 0;
 	}
 
 	x86_cpuinit.fixup_cpu_id = fixup_cpu_id;
+	x86_init.pci.arch_init = pci_numachip_init;
 
 	return 0;
 }