aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/pci/mmconfig_32.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2009-11-13 19:34:08 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-11-24 18:29:11 -0500
commitdf5eb1d67e8074dfbc23cf396c556116728187b3 (patch)
tree1512457b52c6763ee9921094f62690d0a3b8b1e3 /arch/x86/pci/mmconfig_32.c
parentf7ca69848786bb99fdfafb511791b078c298438e (diff)
x86/PCI: MMCONFIG: add PCI_MMCFG_BUS_OFFSET() to factor common expression
This factors out the common "bus << 20" expression used when computing the MMCONFIG address. Reviewed-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/x86/pci/mmconfig_32.c')
-rw-r--r--arch/x86/pci/mmconfig_32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/pci/mmconfig_32.c b/arch/x86/pci/mmconfig_32.c
index f10a7e94a84c..8c19df89ad75 100644
--- a/arch/x86/pci/mmconfig_32.c
+++ b/arch/x86/pci/mmconfig_32.c
@@ -47,7 +47,7 @@ static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn)
47 */ 47 */
48static void pci_exp_set_dev_base(unsigned int base, int bus, int devfn) 48static void pci_exp_set_dev_base(unsigned int base, int bus, int devfn)
49{ 49{
50 u32 dev_base = base | (bus << 20) | (devfn << 12); 50 u32 dev_base = base | PCI_MMCFG_BUS_OFFSET(bus) | (devfn << 12);
51 int cpu = smp_processor_id(); 51 int cpu = smp_processor_id();
52 if (dev_base != mmcfg_last_accessed_device || 52 if (dev_base != mmcfg_last_accessed_device ||
53 cpu != mmcfg_last_accessed_cpu) { 53 cpu != mmcfg_last_accessed_cpu) {