aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/pci/mmconfig.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/i386/pci/mmconfig.c b/arch/i386/pci/mmconfig.c
index c6b6d9bbc453..e2616a266e13 100644
--- a/arch/i386/pci/mmconfig.c
+++ b/arch/i386/pci/mmconfig.c
@@ -26,6 +26,7 @@
26 26
27/* The base address of the last MMCONFIG device accessed */ 27/* The base address of the last MMCONFIG device accessed */
28static u32 mmcfg_last_accessed_device; 28static u32 mmcfg_last_accessed_device;
29static int mmcfg_last_accessed_cpu;
29 30
30static DECLARE_BITMAP(fallback_slots, MAX_CHECK_BUS*32); 31static DECLARE_BITMAP(fallback_slots, MAX_CHECK_BUS*32);
31 32
@@ -73,8 +74,11 @@ static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn)
73static void pci_exp_set_dev_base(unsigned int base, int bus, int devfn) 74static void pci_exp_set_dev_base(unsigned int base, int bus, int devfn)
74{ 75{
75 u32 dev_base = base | (bus << 20) | (devfn << 12); 76 u32 dev_base = base | (bus << 20) | (devfn << 12);
76 if (dev_base != mmcfg_last_accessed_device) { 77 int cpu = smp_processor_id();
78 if (dev_base != mmcfg_last_accessed_device ||
79 cpu != mmcfg_last_accessed_cpu) {
77 mmcfg_last_accessed_device = dev_base; 80 mmcfg_last_accessed_device = dev_base;
81 mmcfg_last_accessed_cpu = cpu;
78 set_fixmap_nocache(FIX_PCIE_MCFG, dev_base); 82 set_fixmap_nocache(FIX_PCIE_MCFG, dev_base);
79 } 83 }
80} 84}