Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp426558ybl; Thu, 12 Dec 2019 21:33:14 -0800 (PST) X-Google-Smtp-Source: APXvYqzXV5wWeDqcejCWUdwTQs0qxHcLtPBPIdpc8+P/MZNkGYWTM9Os7/BFUbjFjyhPOcTmeR39 X-Received: by 2002:a9d:150:: with SMTP id 74mr11301715otu.149.1576215194610; Thu, 12 Dec 2019 21:33:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576215194; cv=none; d=google.com; s=arc-20160816; b=zo0UcBuUPrzO/Wdf+U6AYOlRlPxSHJEUHS1r6OKEOd10tiHjhOqD6QAGKJjdl1L8OE JpJmA8gxf1N7fSWCO8Avh0zemyH91L4eSr1TRxEW9TnIwT6f7Fj3U5kIeF6kihjW6LjB dju2d+Yni5PHVukBzLRfMDwaDbwpvCtYQQhNvjraWUenOuSHG4ZhHOHvkq3rhyRmERKj 6ny8ZgeG0IrF65K0N825GZVX8VM7cLDf3FYXFnZ63mpK+wgcovNVaejoYos12O9q9kIa 49k5+Z/rWnntY1pJObuWIMYBA+sihL46fsIeMKjvbNtI5ToAkmQiZ6Sxo6HPS3zzwtX8 rZfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=YrvqTP9z2N2j9Eee0g2uwcZZNKGFYVYmedHWIpnWR2A=; b=Ei3KUF3iwnwY4B2DpIGD2Hta3VGUlDVMajo4nsFUwyfpp4dQ4VRyZTf4smvR0V28mM AnlISd1qMLvihvGap3ejX7PlgNFfLRL7lsBDSMG58Z3zlqkPVUZlviB+QoLdFgNna5qu 6QtqI1YvXk4AeaXQ6ClDV6yKT8QP6YJjUt4SBxuBf+gJE0Lg3Cg4d87Qpi3NBzVkjO6R wAE85+y/FGZ/EWnMtsdoUPmJCXgUEVm7P7pObrhK1Y1nSr6K+0hCekr3VD2l3xhv3gtm B4TVvpguFS+yuAy1wJ/QC4TJa+PHzd+Pkvgr7kUJNf7tpIb7Hxcd4LfX2EaknFg3D5T5 lfZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=slRoN7tQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r132si4553594oig.263.2019.12.12.21.33.01; Thu, 12 Dec 2019 21:33:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=slRoN7tQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732056AbfLMFb2 (ORCPT + 99 others); Fri, 13 Dec 2019 00:31:28 -0500 Received: from m228-5.mailgun.net ([159.135.228.5]:34370 "EHLO m228-5.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732043AbfLMFb1 (ORCPT ); Fri, 13 Dec 2019 00:31:27 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1576215086; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=YrvqTP9z2N2j9Eee0g2uwcZZNKGFYVYmedHWIpnWR2A=; b=slRoN7tQ4GZ5Z+vji1lSY6X8vY0kigKtKJkDbtRxxFlFp1j7X9NFnceZ0rpXKMaiXQ0k8MHp 3MY7Pqf3nZi6HV8KNEEMNREzeXtRxdiU9mXOTTKGjZoaSKBl/MkXysg+vNLxmu4Zz1Q2ubDK A8IFVse4rHFHhhN5YeZIopN2HVg= X-Mailgun-Sending-Ip: 159.135.228.5 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5df3222c.7fd25d5ad3e8-smtp-out-n01; Fri, 13 Dec 2019 05:31:24 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id A8198C447A2; Fri, 13 Dec 2019 05:31:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: saiprakash.ranjan) by smtp.codeaurora.org (Postfix) with ESMTPSA id C1B48C433CB; Fri, 13 Dec 2019 05:31:23 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 13 Dec 2019 11:01:23 +0530 From: Sai Prakash Ranjan To: Stephen Boyd Cc: Evan Green , Mark Rutland , OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS , Tony Luck , psodagud@codeaurora.org, linux-arm-msm , tsoni@codeaurora.org, LKML , Rob Herring , Bjorn Andersson , Robert Richter , Andy Gross , Borislav Petkov , James Morse , Mauro Carvalho Chehab , linux-arm Mailing List , linux-edac@vger.kernel.org Subject: Re: [PATCH 2/2] drivers: edac: Add EDAC support for Kryo CPU caches In-Reply-To: <5df16ebe.1c69fb81.6481f.a011@mx.google.com> References: <0101016ed57a6311-e815485c-4b77-4342-a3de-203673941602-000000@us-west-2.amazonses.com> <5df16ebe.1c69fb81.6481f.a011@mx.google.com> Message-ID: <624229b9b2d5bf4b5eccf7778b420e2d@codeaurora.org> X-Sender: saiprakash.ranjan@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> 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