lkml.org 
[lkml]   [2019]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] drivers: edac: Add EDAC support for Kryo CPU caches
On 2019-12-12 04:03, Stephen Boyd wrote:
> Quoting Evan Green (2019-12-11 11:32:37)
>> Hi Sai,
>>
>> On Thu, Dec 5, 2019 at 1:53 AM Sai Prakash Ranjan
>> <saiprakash.ranjan@codeaurora.org> wrote:
>> > diff --git a/drivers/edac/qcom_kryo_edac.c b/drivers/edac/qcom_kryo_edac.c
>> > new file mode 100644
>> > index 000000000000..05b60ad3cb0e
>> > --- /dev/null
>> > +++ b/drivers/edac/qcom_kryo_edac.c
>> > @@ -0,0 +1,679 @@
> [...]
>> > +static const struct error_record serror_record[] = {
>> > + { 0x1, "Errors due to fault injection" },
>> > + { 0x2, "ECC error from internal data buffer" },
>> > + { 0x6, "ECC error on cache data RAM" },
>> > + { 0x7, "ECC error on cache tag or dirty RAM" },
>> > + { 0x8, "Parity error on TLB data RAM" },
>> > + { 0x9, "Parity error on TLB tag RAM" },
>> > + { 0x12, "Error response for a cache copyback" },
>> > + { 0x15, "Deferred error not supported" },
>> > +};
>> > +
>> > +static const struct error_type err_type[] = {
>> > + { edac_device_handle_ce, "Kryo L1 Corrected Error" },
>> > + { edac_device_handle_ue, "Kryo L1 Uncorrected Error" },
>> > + { edac_device_handle_ue, "Kryo L1 Deferred Error" },
>> > + { edac_device_handle_ce, "Kryo L2 Corrected Error" },
>> > + { edac_device_handle_ue, "Kryo L2 Uncorrected Error" },
>> > + { edac_device_handle_ue, "Kryo L2 Deferred Error" },
>> > + { edac_device_handle_ce, "L3 Corrected Error" },
>> > + { edac_device_handle_ue, "L3 Uncorrected Error" },
>> > + { edac_device_handle_ue, "L3 Deferred Error" },
>> > +};
>>
>> A comment is warranted to indicate that err_type is indexed by the
>> enum, as this would be easy to mess up in later changes.
>
> Instead of a comment please use array indexing.
>
> [KRYO_L1_CE] = { edac_device_handle_ce, "Kryo L1..." },
> ...

Will do this in the next spin.

-Sai

--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a
member
of Code Aurora Forum, hosted by The Linux Foundation

\
 
 \ /
  Last update: 2019-12-13 06:32    [W:0.036 / U:1.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site