Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1261157ybl; Fri, 30 Aug 2019 14:51:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqx+YZFeltxXZmd+k+VSzIPYID86SZPHbav8Ag+dDCI5oBJE1Pyh0XuJ2mL/IIaUYPxZkA3i X-Received: by 2002:a17:90b:f03:: with SMTP id br3mr669871pjb.67.1567201909956; Fri, 30 Aug 2019 14:51:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567201909; cv=none; d=google.com; s=arc-20160816; b=jlW4kUI3Tc6TRmEgR/T0enxQapP8UeuVWwsR0NcQGkdAtn13Cut9Q68fEos4wxPSLY sATxSOWFe7ugoMMktg34ckasuHuqEO4XzDLtWjBYhfhG5W8miaabkwkG4eq0VWEVNEJG PoXjf/p+durb67lJrw3byeADjuLprcHyHjXR6snGYpzAKlrMqSoLZVqc2FbVkNVvsAfl AFZHJaIWOPTcNNlUXBEsLUiYeOXYLs2tP9Ook4nywX3R39ZQzMxWgWN20V9gIefbeih0 e0rY2EXC5O7YKI+m7vX9UmFCuEW6krfmAN+mVMyj0l56swZ/660DWeGC+xz68N5lzXC5 kCUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=BMFO/ja6VS575JdKNAgPGs67fG/E1rzTU5Hcuyhlp3Y=; b=JqlybkJck5IpdPSqEqv92tBY6rsbRnvIOQHdGC31pl9z8LqQJl4mXlA3ueTr2tLGW6 pBmdPwudarzCsPxbQZU0su1AsdctzL9FrLIRn65FIt4CPZPqBAe0/hOPPyXKPn39oFtu pp/lA1tzq+tCJ+K98kl1ycDU28cQqrD9wNTS3kT3ZmtShTWgv5EMx3gfLppGQaOie7w3 I4H/JkFHTu9j4ab7e51UMYRACMwSU6Dkv0nmJT1U9nqIhMhrZVCK24QumFV7GnoDccqv kJnyLr6sK/KwHLJpYP1dhBBf1tbGAEXN5ThQH+pHV5eMvbvUjfDXNyGIh16egdYsb+Kn sZhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Xr9EVH03; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a59si5703835plc.247.2019.08.30.14.51.34; Fri, 30 Aug 2019 14:51:49 -0700 (PDT) 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=pass header.i=@kernel.org header.s=default header.b=Xr9EVH03; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728188AbfH3Vui (ORCPT + 99 others); Fri, 30 Aug 2019 17:50:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:38930 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728111AbfH3Vui (ORCPT ); Fri, 30 Aug 2019 17:50:38 -0400 Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B7D7623777; Fri, 30 Aug 2019 21:50:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567201836; bh=BMFO/ja6VS575JdKNAgPGs67fG/E1rzTU5Hcuyhlp3Y=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Xr9EVH03o73fNeuckzt6dLa3FfxpH2GW0Qn7velEm+IuPIc7/1LrPkZz48VRLey21 PJmaWr/pvtrKOdFuSti/pogGgcUyo+BEHaQUmy7VEFRuPQjhyb70rv7DEtXD+6mq1k nuFl+OxgnCkudyUoGKmDHFuuRQsxrnRNbDQDa+BQ= Received: by mail-qk1-f172.google.com with SMTP id i78so6055249qke.11; Fri, 30 Aug 2019 14:50:36 -0700 (PDT) X-Gm-Message-State: APjAAAWjX9IRdrCZjLH1YCiB/Y90Gk4SGSkWbojJ6QAh9J2obcbbIcej RlYZZvSsF2txnTAHMPdBe666KR0yjBguwvtpNw== X-Received: by 2002:a37:682:: with SMTP id 124mr17209455qkg.393.1567201835797; Fri, 30 Aug 2019 14:50:35 -0700 (PDT) MIME-Version: 1.0 References: <20190805143911.12185-1-hhhawa@amazon.com> <20190805143911.12185-2-hhhawa@amazon.com> <20190821191704.GA32425@bogus> <1d23d7c5-cd7b-1512-5300-d43e82ba6dc1@amazon.com> In-Reply-To: From: Rob Herring Date: Fri, 30 Aug 2019 16:50:24 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 1/4] dt-bindings: EDAC: Add Amazon's Annapurna Labs L1 EDAC To: James Morse Cc: "Hawa, Hanna" , Mark Rutland , Borislav Petkov , Mauro Carvalho Chehab , David Miller , Greg Kroah-Hartman , Linus Walleij , Jonathan Cameron , Nicolas Ferre , "Paul E. McKenney" , "Woodhouse, David" , benh@amazon.com, "Krupnik, Ronen" , Talel Shenhar , Jonathan Chocron , "Hanoch, Uri" , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , linux-edac Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 30, 2019 at 7:45 AM James Morse wrote: > > Hi guys, > > On 27/08/2019 14:49, Rob Herring wrote: > > On Mon, Aug 26, 2019 at 9:49 AM Hawa, Hanna wrote: > >> On 8/21/2019 10:17 PM, Rob Herring wrote: > >>> Why is this even in DT? AFAICT, this is all just CortexA57 core features > >>> (i.e. nothing Amazon specific). The core type and the ECC capabilities > >>> are discoverable. > >> > >> Added to the DT in order to easily enable/disable the driver. > > > > That alone is not reason enough to put it in DT. From a DT > > perspective, I have no idea what the whims of a OS maintainer are > > regarding whether they want all this to be 1 driver or 2 drivers. > > (IMO, it should be 1 as this is ECC for an A57. For a core and memory > > controller, then 2 seems appropriate.) > > > >> You are > >> correct that they are CortexA57 core features and nothing Amazon > >> specific, but it's IMPLEMENTATION DEFINED, meaning that in different > >> cortex revisions (e.g. A57) the register bitmap may change. Because of > >> that we added an Amazon compatible which corresponds to the specific > >> core we are using. > > I think its that the instruction encoding is in the imp-def space that is important. > > CPU-implementers can add whatever registers they find useful here. A57 and A72 both > implemented some ECC registers here. (They are not guaranteed to be the same, but I can't > find any differences). Two cores potentially being the same only furthers my argument that this shouldn't be an Amazon driver. > We need some information from DT because the TRM doesn't say what happens when you read > from these registers on an A57 that doesn't have the 'optional ECC protection'. It could > take an exception due to an unimplemented system register. My read of the TRM is that L2 ECC is always there and L1 ECC/parity is optional. Furthermore, bit 22 of L2CTRL_EL1 indicates if L1 ECC/parity is supported or not and there's other non-ECC stuff like cache RAM timing values in that register. > The imp-def instruction space may also be trapped by a higher exception level. KVM does > this, and emulates these registers as if they were all undefined. So KVM provides a semi-CortexA57? Code that runs on real h/w won't as a guest. However, if we do need DT to indicate ECC support in a core or not, then we already have an A57 node and should put that info there. Rob