diff options
| author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2019-01-11 15:03:35 +1100 |
|---|---|---|
| committer | Stewart Smith <stewart@linux.ibm.com> | 2019-02-18 22:12:37 -0600 |
| commit | fd0950488f7f2c34e921888f69e76d75498078f2 (patch) | |
| tree | 88ab224819b0c5bd1b20f02d5f07d6fc1f117a4a /include | |
| parent | 639f67285c2cf2ca122638d2c7469da81236b365 (diff) | |
| download | talos-skiboot-fd0950488f7f2c34e921888f69e76d75498078f2.tar.gz talos-skiboot-fd0950488f7f2c34e921888f69e76d75498078f2.zip | |
opal: Deprecate reading the PHB status
The OPAL_PCI_EEH_FREEZE_STATUS call takes a bunch of parameters, one of
them is @phb_status. It is defined as __be64* and always NULL in
the current Linux upstream but if anyone ever decides to read that status,
then the PHB3's handler will assume it is struct OpalIoPhb3ErrorData*
(which is a lot bigger than 8 bytes) and zero it causing the stack
corruption; p7ioc-phb has the same issue.
This removes @phb_status from all eeh_freeze_status() hooks and moves
the error message from PHB4 to the affected OPAL handlers.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Reviewed-By: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/npu2.h | 3 | ||||
| -rw-r--r-- | include/pci.h | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/include/npu2.h b/include/npu2.h index f51a6a2a..0e79e0e0 100644 --- a/include/npu2.h +++ b/include/npu2.h @@ -225,6 +225,5 @@ int64_t npu2_freeze_status(struct phb *phb __unused, uint64_t pe_number __unused, uint8_t *freeze_state, uint16_t *pci_error_type __unused, - uint16_t *severity __unused, - uint64_t *phb_status __unused); + uint16_t *severity __unused); #endif /* __NPU2_H */ diff --git a/include/pci.h b/include/pci.h index 05165614..b49641ca 100644 --- a/include/pci.h +++ b/include/pci.h @@ -260,8 +260,7 @@ struct phb_ops { int64_t (*eeh_freeze_status)(struct phb *phb, uint64_t pe_number, uint8_t *freeze_state, uint16_t *pci_error_type, - uint16_t *severity, - uint64_t *phb_status); + uint16_t *severity); int64_t (*eeh_freeze_clear)(struct phb *phb, uint64_t pe_number, uint64_t eeh_action_token); int64_t (*eeh_freeze_set)(struct phb *phb, uint64_t pe_number, |

