From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from g4t0017.houston.hp.com ([15.201.24.20]:48046 "EHLO g4t0017.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759990Ab3BKXA1 (ORCPT ); Mon, 11 Feb 2013 18:00:27 -0500 Message-ID: <1360623614.2950.60.camel@lorien2> Subject: [PATCH 0/4] pci: Add PCI_BUS() and PCI_DEVID() interfaces to return bus number and device id From: Shuah Khan Reply-To: shuah.khan@hp.com To: Joerg Roedel , bhelgaas@google.com Cc: jiang.liu@huawei.com, shemminger@vyatta.com, paulmck@linux.vnet.ibm.com, linasvepstas@gmail.com, dhowells@redhat.com, davej@redhat.com, tglx@linutronix.de, mtk.manpages@gmail.com, iommu@lists.linux-foundation.org, linux-pci@vger.kernel.org, wangyijing@huawei.com, LKML , shuahkhan@gmail.com Date: Mon, 11 Feb 2013 16:00:14 -0700 Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org List-ID: pci defines PCI_DEVFN(), PCI_SLOT(), and PCI_FUNC() interfaces, however, it doesn't have interfaces to return PCI bus and PCI device id. Drivers (AMD IOMMU, and AER) have module specific definitions for PCI_BUS() and AMD_IOMMU driver also has a module specific interface to calculate PCI device id from bus number and devfn. This patch set adds PCI_BUS(), and PCI_DEVID() to pci.h, changes are to use PCI_BUS() from pci. Changes AMD_IOMMU driver to use PCI_BUS() and PCI_DEVID() from pci. Files changed: include/uapi/linux/pci.h | 4 ++++ 1 file changed, 4 insertions(+) drivers/pci/pcie/aer/aerdrv_core.c | 2 -- 1 file changed, 2 deletions(-) drivers/iommu/amd_iommu_types.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) drivers/iommu/amd_iommu.c | 2 +- drivers/iommu/amd_iommu_init.c | 6 +++--- drivers/iommu/amd_iommu_types.h | 7 ------- 3 files changed, 4 insertions(+), 11 deletions(-)