[Skiboot] [PATCH v11 09/23] core/pci: Fix wrong reserved PE# in enumeration
Stewart Smith
stewart at linux.vnet.ibm.com
Wed Jun 8 20:37:54 AEST 2016
Gavin Shan <gwshan at linux.vnet.ibm.com> writes:
> On Wed, Jun 08, 2016 at 02:58:05PM +1000, Stewart Smith wrote:
>>Gavin Shan <gwshan at linux.vnet.ibm.com> writes:
>>> When scanning to non-existing PCI device, EEH (frozen) error is
>>> usually happening. We clear the unexpected frozen PE state after
>>> it. The reserved PE number is assumed to be 0 wrongly. So the
>>> frozen state on the reserved PE number isn't cleared properly.
>>>
>>> This introduces struct phb_ops::get_info() to retrieve the reserved
>>> PE number from platforms. Then the EEH frozen state checking and
>>> clearing are applied to the reserved PE number.
>>>
>>> Signed-off-by: Gavin Shan <gwshan at linux.vnet.ibm.com>
>>> ---
>>> core/pci.c | 15 ++++++++++++---
>>> hw/npu.c | 1 +
>>> hw/p7ioc-phb.c | 15 +++++++++++++++
>>> hw/phb3.c | 16 ++++++++++++++++
>>> include/pci.h | 7 +++++++
>>> 5 files changed, 51 insertions(+), 3 deletions(-)
>>
>>I'd prefer just a int64_t (or int46_t*) to the get_info() function
>>unless there's a real set of other things we need to have a get_info
>>method for. We can always add get_info() once we get a few - but in
>>general, it looks a bit too ioctl() like for me.
>>
>
> Thanks for review, Stewart. Yeah, I was expecting the interface
> is to be extended to return more PHB specific info in future.
> For now, the reserved PE number is only info I need from this
> interface. So it's fair enough to have below interface for now,
> which will be reflected in next revision:
>
> int64_t (*get_info)(void);
get_reserved_pe_number() would likely be better
--
Stewart Smith
OPAL Architect, IBM.
More information about the Skiboot
mailing list