Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp799781ybi; Fri, 7 Jun 2019 18:05:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVXlh8aN5ZKr8d/TMYDVeSa4i2R8yq1O0CnmZiNMBbiXclSbtFgpqJiwejhMpnl8W9p0JU X-Received: by 2002:a17:90a:d151:: with SMTP id t17mr8723208pjw.60.1559955924632; Fri, 07 Jun 2019 18:05:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559955924; cv=none; d=google.com; s=arc-20160816; b=PkNdeJYR2hftK4B6DU0kArQQxxlPtqX2D/bHsTM4bqM3fb18u8KLVM7S9QQSUjapXL XAQn8nOV4uFt6YR7TrSS89EFBXoD+pLBVKpKuajYMBw0EO4y/Yw5prher4dYWG3Zls9x kI0twiNKFEHDa6IKvkQP1Z2opBR9rGG/7OvcgMtq5KkEozlYrg8YgJtQBYuikp+DYE5w vOVNJsEEe2KD7O6cGRq+lHM9j/DtmcKn6wr6M5LZqkZx8ErX5YB4Otum+jsnb+s9v878 kghD9z31ackeeznfLTpOjxEUdqG1JoT8TMbozhav4WTDBXI2sgX0Qlz2Ak1zPMkZ5N2x 4VvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=OiXR2F7bla5JoNeZ0jtibO3aIA+EWdPzi59dxZKBVAI=; b=CwOVfqywVssmE57MzGl6b/uaYs3i5lukQ++KeWohwCjjWSYw4RiNU8xOaJGEAa3nK+ 6cnQYsnyb8AY1dGRDUL/7vi3fUapcboVPuI0TL8dfKXwM5zRr23r/IWAfCI3FK/x4lG2 NK6tNN/5+XKQIuy8//vq/y8UhcTv+aL0mTNTFKjKHS9o5IJ610jNrGSWu6NPZ6pVp8L4 r/jv5fYMGOJza0S5c/5qIKu9wEUan2lVdD0TC3Udu5xJUqCcaWkwCMI7ty7Sn/VdDakv mUZd146aaAXZjdhMmXnbEzyrepUNo71jNmSuti60d/2UK64iTQ/IcwPXCxeQQ40Tkxmm PzMA== ARC-Authentication-Results: i=1; mx.google.com; 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 d14si3450572pgg.169.2019.06.07.18.05.07; Fri, 07 Jun 2019 18:05:24 -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; 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 S1731082AbfFHAWx (ORCPT + 99 others); Fri, 7 Jun 2019 20:22:53 -0400 Received: from gate.crashing.org ([63.228.1.57]:50020 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729685AbfFHAWx (ORCPT ); Fri, 7 Jun 2019 20:22:53 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x580MMHP007800; Fri, 7 Jun 2019 19:22:23 -0500 Message-ID: Subject: Re: [PATCH 2/2] edac: add support for Amazon's Annapurna Labs EDAC From: Benjamin Herrenschmidt To: James Morse , "Shenhar, Talel" Cc: "Hawa, Hanna" , Borislav Petkov , "robh+dt@kernel.org" , "Woodhouse, David" , "paulmck@linux.ibm.com" , "mchehab@kernel.org" , "mark.rutland@arm.com" , "gregkh@linuxfoundation.org" , "davem@davemloft.net" , "nicolas.ferre@microchip.com" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Chocron, Jonathan" , "Krupnik, Ronen" , "linux-edac@vger.kernel.org" , "Hanoch, Uri" Date: Sat, 08 Jun 2019 10:22:20 +1000 In-Reply-To: <25efb27c-b725-137d-5735-b3ab88323846@arm.com> References: <1559211329-13098-1-git-send-email-hhhawa@amazon.com> <1559211329-13098-3-git-send-email-hhhawa@amazon.com> <20190531051400.GA2275@cz.tnic> <32431fa2-2285-6c41-ce32-09630205bb54@arm.com> <71da083e-1a74-cf86-455d-260a34ee01fd@amazon.com> <25efb27c-b725-137d-5735-b3ab88323846@arm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2019-06-07 at 16:11 +0100, James Morse wrote: > I'm coming at this from somewhere else. This stuff has to be considered all the way > through the system. Just because each component supports error detection, doesn't mean you > aren't going to get silent corruption. Likewise if another platform picks up two piecemeal > edac drivers for hardware it happens to have in common with yours, it doesn't mean we're > counting all the errors. This stuff has to be viewed for the whole platform. Sure but you don't solve that problem by having a magic myplatform.c overseer. And even if you do, it can perfectly access the individual IP block drivers, finding them via phandles in the DT for example etc... without having to make those individual drivers dependent on some over arching machine wide probing mechanism. > But this doesn't give you a device you can bind a driver to, to kick this stuff off. > This (I assume) is why you added a dummy 'edac_l1_l2' node, that just probes the driver. > The hardware is to do with the CPU and caches, 'edac_l1'_l2' doesn't correspond to any > distinct part of the soc. > > The request is to use the machine compatible, not a dummy node. This wraps up the firmware > properties too, and any other platform property we don't know about today. > > Once you have this, you don't really need the cpu/cache integration annotations, and your > future memory-controller support can be picked up as part of the platform driver. > If you have otherwise identical platforms with different memory controllers, OF gives you > the API to match the node in the DT. Dummy nodes are pefectly fine, and has been from the early days of Open Firmware. That said, these aren't so much dummy as a way to expose the control path to the caches. The DT isn't perfect in its structure and the way caches and CPUs are represented makes it difficult to represent arbitrary control path to them without extra nodes, which is thus what people do. Cheers, Ben.