PCI Error Recovery API Proposal (updated)
Hidetoshi Seto
seto.hidetoshi at jp.fujitsu.com
Thu Apr 7 23:27:24 EST 2005
Benjamin Herrenschmidt wrote:
>>>The definition of "pci_error_token" is not covered here.
>>
>>What is the default type of pci_error_token in API 1)? You said "within
>>this function and after it returns, the driver shouldn't do any new
>>IOs." AER code is required to pass error severity (fatal or nonfatal) to
>>a driver when calling API 1). I refer this error token should be defined
>>as an integer type, which is passed with either PCIERR_FATAL_DETECTED or
>>PCIERR_NONFATAL_DETECTED. Please let me know what you think?
>
> The token should be an opaque type with accessors. You could define a
> pci_error_get_severity(token) to return the severity. The idea is to
> define accessors which return an error when the data requested isn't
> present in the error info. The actual content of the token is to be
> defined. I was thinking about a type plus a union. I was hoping Seto
> could provide something here ...
I agree that the token should be an opaque, implement-depends thing.
For example, it could be a bitmask like:
#define PCIERR_ERROR_DETECTED 0x00000001 /* fundamental, always ON */
#define PCIERR_VALID_INFO 0x00000010 /* optional */
#define PCIERR_SEVERITY_FATAL 0x00000100 /* optional */
#define PCIERR_SEVERITY_NONFATAL 0x00000200 /* optional */
:
or to get more detail:
#define PCIERR_ERROR_DETECTED 0x00000001 /* fundamental, always ON */
#define PCIERR_VALID_PCIE_AER 0x00010000 /* optional */
:
and define a function like:
int pci_error_get_severity(pci_error_token *t)
int pci_error_get_pcie_aer(pci_error_token *t, pcie_aer_bits *dat)
or (I think it would be better,) merge of them, etc.
My thought was, depends on the arch, some could have only a error bit,
some could have various info with well-defined struct/union/etc.
Anyway, the token should be a easy handle for basic use, and also
should be useful for advanced use.
Thanks,
H.Seto
More information about the Linuxppc64-dev
mailing list