From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B627C433DB for ; Mon, 1 Feb 2021 12:02:27 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DFC3964DD8 for ; Mon, 1 Feb 2021 12:02:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DFC3964DD8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8uKQV2uqNr6V4fMnoeJBVvX2SgyD5xYPL0HpQ3oItDY=; b=aDh2XZ0dYHNkcmFzLSb/TM13Z mjUNyqoupjyJNLyo1opOAzRVjrg8DWoMYeRgOb2gYghfFP47pZY6zle0CaDXoIWpslvILlPa0BFZa e/WG5tuTDEbikoZbnhdqzRFKfFXZFb1ZAaNd0DhXa7c4vGyeLrTxsjvLUuSWAVgAwJQGSWiwX5SVg B2GAWFFwtyDozcJFkIOknIzDuLC/UUqOy1E6SeArI+O/C39R24ChLTgmbTkrDAVEsz007D7cvv/LI mhjpPYmwtKxCUYW5N0XrSJVKNNa9SHFDkYyzXBRRR3jy1+BtW/BjpwfXaUNMwO4xHOZ1MoRC6JmxX hwtFSxZ7w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l6XtM-0005Kf-Cr; Mon, 01 Feb 2021 12:01:16 +0000 Received: from metis.ext.pengutronix.de ([85.220.165.71]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l6Xt3-0005D4-90 for linux-arm-kernel@lists.infradead.org; Mon, 01 Feb 2021 12:01:11 +0000 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l6Xsl-0005jO-HT; Mon, 01 Feb 2021 13:00:39 +0100 Received: from sha by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1l6Xsj-0000et-PI; Mon, 01 Feb 2021 13:00:37 +0100 Date: Mon, 1 Feb 2021 13:00:37 +0100 From: Sascha Hauer To: linux-edac@vger.kernel.org Subject: Re: [PATCH 2/2] dt-bindings: arm: cpus: Add edac-enabled property Message-ID: <20210201120037.GQ19583@pengutronix.de> References: <20210201115753.18349-1-s.hauer@pengutronix.de> <20210201115753.18349-3-s.hauer@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210201115753.18349-3-s.hauer@pengutronix.de> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 12:59:46 up 61 days, 26 min, 101 users, load average: 0.17, 0.07, 0.06 User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210201_070057_382310_67EF3F59 X-CRM114-Status: GOOD ( 22.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tony Luck , Rob Herring , Robert Richter , James Morse , kernel@pengutronix.de, Borislav Petkov , York Sun , Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Feb 01, 2021 at 12:57:53PM +0100, Sascha Hauer wrote: > Some CPUs like the Cortex-A53 and Cortex-A57 have Error Detection And > Correction (EDAC) support on their L1 and L2 caches. This is implemented > in implementation defined registers, so usage of this functionality is > not safe in virtualized environments or when EL3 already uses these > registers. > This patch adds a edac-enabled flag which can be explicitly set when > EDAC can be used. > > Signed-off-by: Sascha Hauer > --- > Documentation/devicetree/bindings/arm/cpus.yaml | 6 ++++++ > drivers/edac/cortex_arm64_l1_l2.c | 7 +++++-- > 2 files changed, 11 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/arm/cpus.yaml b/Documentation/devicetree/bindings/arm/cpus.yaml > index f02fd10de604..80dcf90f3e78 100644 > --- a/Documentation/devicetree/bindings/arm/cpus.yaml > +++ b/Documentation/devicetree/bindings/arm/cpus.yaml > @@ -269,6 +269,12 @@ properties: > For PSCI based platforms, the name corresponding to the index of the PSCI > PM domain provider, must be "psci". > > + edac-enabled: > + $ref: '/schemas/types.yaml#/definitions/flag' > + description: > + Some CPUs support Error Detection And Correction (EDAC) on their L1 and > + L2 caches. This flag marks this function as usable. > + > qcom,saw: > $ref: '/schemas/types.yaml#/definitions/phandle' > description: | > diff --git a/drivers/edac/cortex_arm64_l1_l2.c b/drivers/edac/cortex_arm64_l1_l2.c > index 3b1e2f3ccab6..6d5355bae80c 100644 > --- a/drivers/edac/cortex_arm64_l1_l2.c > +++ b/drivers/edac/cortex_arm64_l1_l2.c > @@ -190,8 +190,11 @@ static int __init cortex_arm64_edac_driver_init(void) > for_each_possible_cpu(cpu) { > np = of_get_cpu_node(cpu, NULL); > > - if (of_match_node(cortex_arm64_edac_of_match, np)) > - cpumask_set_cpu(cpu, &compat_mask); > + if (!of_match_node(cortex_arm64_edac_of_match, np)) > + continue; > + if (!of_property_read_bool(np, "edac-enabled")) > + continue; > + cpumask_set_cpu(cpu, &compat_mask); Hum, this should be in patch 1/2 of course. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel