]> git.karo-electronics.de Git - linux-beck.git/commitdiff
powerpc/eeh: Make eeh_pe_get() public
authorGavin Shan <shangw@linux.vnet.ibm.com>
Thu, 20 Jun 2013 05:20:54 +0000 (13:20 +0800)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 20 Jun 2013 07:05:41 +0000 (17:05 +1000)
While processing EEH event interrupt from P7IOC, we need function
to retrieve the PE according to the indicated EEH device. The patch
makes function eeh_pe_get() public so that other source files can call
it for that purpose. Also, the patch fixes referring to wrong BDF
(Bus/Device/Function) address while searching PE in function
__eeh_pe_get().

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/eeh.h
arch/powerpc/kernel/eeh_pe.c

index 4ac6f70025b4db7035eb46ee7e593d023d910191..acdfcaaf5c361c8ed836b02e629db9663bf2a47b 100644 (file)
@@ -185,6 +185,7 @@ static inline void eeh_unlock(void)
 typedef void *(*eeh_traverse_func)(void *data, void *flag);
 int eeh_phb_pe_create(struct pci_controller *phb);
 struct eeh_pe *eeh_phb_pe_get(struct pci_controller *phb);
+struct eeh_pe *eeh_pe_get(struct eeh_dev *edev);
 int eeh_add_to_parent_pe(struct eeh_dev *edev);
 int eeh_rmv_from_parent_pe(struct eeh_dev *edev, int purge_pe);
 void *eeh_pe_dev_traverse(struct eeh_pe *root,
index 71c4544453cf45ed66636d5f9c03c914b368084f..3d2dcf5afc295c4843a3c76a11840fe8c3d42e5d 100644 (file)
@@ -228,7 +228,7 @@ static void *__eeh_pe_get(void *data, void *flag)
                return pe;
 
        /* Try BDF address */
-       if (edev->pe_config_addr &&
+       if (edev->config_addr &&
           (edev->config_addr == pe->config_addr))
                return pe;
 
@@ -246,7 +246,7 @@ static void *__eeh_pe_get(void *data, void *flag)
  * which is composed of PCI bus/device/function number, or unified
  * PE address.
  */
-static struct eeh_pe *eeh_pe_get(struct eeh_dev *edev)
+struct eeh_pe *eeh_pe_get(struct eeh_dev *edev)
 {
        struct eeh_pe *root = eeh_phb_pe_get(edev->phb);
        struct eeh_pe *pe;