Commit 1d350544 authored by Gavin Shan's avatar Gavin Shan Committed by Benjamin Herrenschmidt

powerpc/eeh: Add restore_config operation

After reset on the specific PE or PHB, we never configure AER
correctly on PowerNV platform. We needn't care it on pSeries
platform. The patch introduces additional EEH operation eeh_ops::
restore_config() so that we have chance to configure AER correctly
for PowerNV platform.
Signed-off-by: default avatarGavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 8184616f
...@@ -157,6 +157,7 @@ struct eeh_ops { ...@@ -157,6 +157,7 @@ struct eeh_ops {
int (*read_config)(struct device_node *dn, int where, int size, u32 *val); int (*read_config)(struct device_node *dn, int where, int size, u32 *val);
int (*write_config)(struct device_node *dn, int where, int size, u32 val); int (*write_config)(struct device_node *dn, int where, int size, u32 val);
int (*next_error)(struct eeh_pe **pe); int (*next_error)(struct eeh_pe **pe);
int (*restore_config)(struct device_node *dn);
}; };
extern struct eeh_ops *eeh_ops; extern struct eeh_ops *eeh_ops;
......
...@@ -736,6 +736,9 @@ static void *eeh_restore_one_device_bars(void *data, void *flag) ...@@ -736,6 +736,9 @@ static void *eeh_restore_one_device_bars(void *data, void *flag)
else else
eeh_restore_device_bars(edev, dn); eeh_restore_device_bars(edev, dn);
if (eeh_ops->restore_config)
eeh_ops->restore_config(dn);
return NULL; return NULL;
} }
......
...@@ -359,7 +359,8 @@ static struct eeh_ops powernv_eeh_ops = { ...@@ -359,7 +359,8 @@ static struct eeh_ops powernv_eeh_ops = {
.configure_bridge = powernv_eeh_configure_bridge, .configure_bridge = powernv_eeh_configure_bridge,
.read_config = pnv_pci_cfg_read, .read_config = pnv_pci_cfg_read,
.write_config = pnv_pci_cfg_write, .write_config = pnv_pci_cfg_write,
.next_error = powernv_eeh_next_error .next_error = powernv_eeh_next_error,
.restore_config = NULL
}; };
/** /**
......
...@@ -689,7 +689,9 @@ static struct eeh_ops pseries_eeh_ops = { ...@@ -689,7 +689,9 @@ static struct eeh_ops pseries_eeh_ops = {
.get_log = pseries_eeh_get_log, .get_log = pseries_eeh_get_log,
.configure_bridge = pseries_eeh_configure_bridge, .configure_bridge = pseries_eeh_configure_bridge,
.read_config = pseries_eeh_read_config, .read_config = pseries_eeh_read_config,
.write_config = pseries_eeh_write_config .write_config = pseries_eeh_write_config,
.next_error = NULL,
.restore_config = NULL
}; };
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment