diff options
author | Gavin Shan <shangw@linux.vnet.ibm.com> | 2013-06-20 06:13:25 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-06-21 02:01:51 -0400 |
commit | 37c367f2792f899528b5bf201a4bd6131f8b75b6 (patch) | |
tree | a5b742374872a18ef8763b1dd3ca52b99e41661f /arch/powerpc/platforms/powernv/pci-ioda.c | |
parent | 7cb9d93dc6d4f717218b6fa791be9bcf4e417379 (diff) |
powerpc/powernv: Debugfs directory for PHB
The patch creates one debugfs directory ("powerpc/PCIxxxx") for
each PHB so that we can hook EEH error injection debugfs entry
there in proceeding patch.
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/powernv/pci-ioda.c')
-rw-r--r-- | arch/powerpc/platforms/powernv/pci-ioda.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index 319ed61d674a..dc4ec7956967 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/pci.h> | 15 | #include <linux/pci.h> |
16 | #include <linux/debugfs.h> | ||
16 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
17 | #include <linux/string.h> | 18 | #include <linux/string.h> |
18 | #include <linux/init.h> | 19 | #include <linux/init.h> |
@@ -32,6 +33,7 @@ | |||
32 | #include <asm/iommu.h> | 33 | #include <asm/iommu.h> |
33 | #include <asm/tce.h> | 34 | #include <asm/tce.h> |
34 | #include <asm/xics.h> | 35 | #include <asm/xics.h> |
36 | #include <asm/debug.h> | ||
35 | 37 | ||
36 | #include "powernv.h" | 38 | #include "powernv.h" |
37 | #include "pci.h" | 39 | #include "pci.h" |
@@ -969,12 +971,33 @@ static void pnv_pci_ioda_setup_DMA(void) | |||
969 | } | 971 | } |
970 | } | 972 | } |
971 | 973 | ||
974 | static void pnv_pci_ioda_create_dbgfs(void) | ||
975 | { | ||
976 | #ifdef CONFIG_DEBUG_FS | ||
977 | struct pci_controller *hose, *tmp; | ||
978 | struct pnv_phb *phb; | ||
979 | char name[16]; | ||
980 | |||
981 | list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { | ||
982 | phb = hose->private_data; | ||
983 | |||
984 | sprintf(name, "PCI%04x", hose->global_number); | ||
985 | phb->dbgfs = debugfs_create_dir(name, powerpc_debugfs_root); | ||
986 | if (!phb->dbgfs) | ||
987 | pr_warning("%s: Error on creating debugfs on PHB#%x\n", | ||
988 | __func__, hose->global_number); | ||
989 | } | ||
990 | #endif /* CONFIG_DEBUG_FS */ | ||
991 | } | ||
992 | |||
972 | static void pnv_pci_ioda_fixup(void) | 993 | static void pnv_pci_ioda_fixup(void) |
973 | { | 994 | { |
974 | pnv_pci_ioda_setup_PEs(); | 995 | pnv_pci_ioda_setup_PEs(); |
975 | pnv_pci_ioda_setup_seg(); | 996 | pnv_pci_ioda_setup_seg(); |
976 | pnv_pci_ioda_setup_DMA(); | 997 | pnv_pci_ioda_setup_DMA(); |
977 | 998 | ||
999 | pnv_pci_ioda_create_dbgfs(); | ||
1000 | |||
978 | #ifdef CONFIG_EEH | 1001 | #ifdef CONFIG_EEH |
979 | eeh_addr_cache_build(); | 1002 | eeh_addr_cache_build(); |
980 | eeh_init(); | 1003 | eeh_init(); |