aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGavin Shan <shangw@linux.vnet.ibm.com>2013-09-05 21:00:00 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-10-11 01:53:56 -0400
commit20bb842b9b0e26a5768b62ee639e64a2ecaada8c (patch)
treef681d34f66035b9199f0c2eeb93853b4478815a8
parent81fafea67a2ea418673df2df2b22a81f0c5a455a (diff)
powerpc/powernv: Enable EEH for PHB3
The EEH isn't enabled for PHB3 and the patch intends to enable it. Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--arch/powerpc/platforms/powernv/eeh-ioda.c26
-rw-r--r--arch/powerpc/platforms/powernv/eeh-powernv.c5
2 files changed, 12 insertions, 19 deletions
diff --git a/arch/powerpc/platforms/powernv/eeh-ioda.c b/arch/powerpc/platforms/powernv/eeh-ioda.c
index cf42e74514fa..799ccaa07b80 100644
--- a/arch/powerpc/platforms/powernv/eeh-ioda.c
+++ b/arch/powerpc/platforms/powernv/eeh-ioda.c
@@ -106,27 +106,23 @@ static int ioda_eeh_post_init(struct pci_controller *hose)
106 ioda_eeh_nb_init = 1; 106 ioda_eeh_nb_init = 1;
107 } 107 }
108 108
109 /* FIXME: Enable it for PHB3 later */ 109 /* We needn't HUB diag-data on PHB3 */
110 if (phb->type == PNV_PHB_IODA1) { 110 if (phb->type == PNV_PHB_IODA1 && !hub_diag) {
111 hub_diag = (char *)__get_free_page(GFP_KERNEL | __GFP_ZERO);
111 if (!hub_diag) { 112 if (!hub_diag) {
112 hub_diag = (char *)__get_free_page(GFP_KERNEL | 113 pr_err("%s: Out of memory !\n", __func__);
113 __GFP_ZERO); 114 return -ENOMEM;
114 if (!hub_diag) {
115 pr_err("%s: Out of memory !\n",
116 __func__);
117 return -ENOMEM;
118 }
119 } 115 }
116 }
120 117
121#ifdef CONFIG_DEBUG_FS 118#ifdef CONFIG_DEBUG_FS
122 if (phb->dbgfs) 119 if (phb->dbgfs)
123 debugfs_create_file("err_injct", 0600, 120 debugfs_create_file("err_injct", 0600,
124 phb->dbgfs, hose, 121 phb->dbgfs, hose,
125 &ioda_eeh_dbgfs_ops); 122 &ioda_eeh_dbgfs_ops);
126#endif 123#endif
127 124
128 phb->eeh_state |= PNV_EEH_STATE_ENABLED; 125 phb->eeh_state |= PNV_EEH_STATE_ENABLED;
129 }
130 126
131 return 0; 127 return 0;
132} 128}
diff --git a/arch/powerpc/platforms/powernv/eeh-powernv.c b/arch/powerpc/platforms/powernv/eeh-powernv.c
index 79663d26e6ea..73b981438cc5 100644
--- a/arch/powerpc/platforms/powernv/eeh-powernv.c
+++ b/arch/powerpc/platforms/powernv/eeh-powernv.c
@@ -144,11 +144,8 @@ static int powernv_eeh_dev_probe(struct pci_dev *dev, void *flag)
144 /* 144 /*
145 * Enable EEH explicitly so that we will do EEH check 145 * Enable EEH explicitly so that we will do EEH check
146 * while accessing I/O stuff 146 * while accessing I/O stuff
147 *
148 * FIXME: Enable that for PHB3 later
149 */ 147 */
150 if (phb->type == PNV_PHB_IODA1) 148 eeh_subsystem_enabled = 1;
151 eeh_subsystem_enabled = 1;
152 149
153 /* Save memory bars */ 150 /* Save memory bars */
154 eeh_save_bars(edev); 151 eeh_save_bars(edev);