Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4082960ybi; Tue, 11 Jun 2019 00:23:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqzsqbPMj9jMCivX4at+Nmzo9jVq+FzNB9oP5sHFVvnne2tH6cw9Q8fg2Rx9OEqICPl2jMrv X-Received: by 2002:a63:1844:: with SMTP id 4mr17740272pgy.402.1560237784368; Tue, 11 Jun 2019 00:23:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560237784; cv=none; d=google.com; s=arc-20160816; b=PRAlJ30HhGFg2Yh8NhMvPsMha/s4SrUVbBaJkA84jGwjLXai+KKsathsd6vJmyscpo qwJkFrOBhIFr0Hh8yIc9J+IOq2bpONsTV67o0aKSM8v2Vb6amgSCSuy6g5ZGf8uaz6CB GwbOHXH87GSsFYnWEeQOd+SX0xj34hIX2pTiTanXYCPIIkOBawCp0qAe0iBjnyyl6yFt KJn8O1nPlmCIWAX/uFMxs0rewOZcEnjUWNuW9Xmy2blGNl0kdbnGZuVrq79f3sClrLmo DCZlsNqmmTsZCJyUowqS4wIru2WcoTqlTsqASK70nCIegQZ1ZndkVY+lpLh3pfBiazeN bOXQ== 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=MHCMo1CY/IVF2Vmk3YNXZfulUIcjvzHuvdDsmDMXwfs=; b=JkizLK+QuPnOO0eMUwhetnHmyuDDK/kSY40ZiAvGIjLCF8QIzOHw4vXSFueM0nqiR8 vvbVlP+Vu17wDJc/HQ0/f5GHg+jWGou0gp1rombSyWaZzajdCf5kOC5eYQVVZ+uYKMv0 CDEsXue1kSScA7NsGOIFeczuZdyFRSYjqWs6sMvGJEnBLZfOvyQZseJsGWxyDnbU/X6d 6pmcockLg5tHcgHViAmulP8OnzkDVy0fPgwV+Bg86H+Gt/1g4SJcv8NAvyJP07Vk+xLE yzsJB4I7VC8YATZDaJGhk9AkfNlFDrm3TIOZQIJOLEB6M2lLfiwkJe15PINiTWItjJf0 qfpQ== 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 f10si7738970pgi.236.2019.06.11.00.22.48; Tue, 11 Jun 2019 00:23:04 -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 S2404306AbfFKHWM (ORCPT + 99 others); Tue, 11 Jun 2019 03:22:12 -0400 Received: from gate.crashing.org ([63.228.1.57]:40104 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404144AbfFKHWM (ORCPT ); Tue, 11 Jun 2019 03:22:12 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x5B7LdBB000541; Tue, 11 Jun 2019 02:21:40 -0500 Message-ID: <68446361fd1e742b284555b96b638fe6b5218b8b.camel@kernel.crashing.org> Subject: Re: [PATCH 2/2] edac: add support for Amazon's Annapurna Labs EDAC From: Benjamin Herrenschmidt To: Borislav Petkov Cc: James Morse , "Hawa, Hanna" , "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" , "Shenhar, Talel" , "linux-kernel@vger.kernel.org" , "Chocron, Jonathan" , "Krupnik, Ronen" , "linux-edac@vger.kernel.org" , "Hanoch, Uri" Date: Tue, 11 Jun 2019 17:21:39 +1000 In-Reply-To: <1ae5e7a3464f9d8e16b112cd371957ea20472864.camel@kernel.crashing.org> 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> <9a2aaf4a9545ed30568a0613e64bc3f57f047799.camel@kernel.crashing.org> <20190608090556.GA32464@zn.tnic> <1ae5e7a3464f9d8e16b112cd371957ea20472864.camel@kernel.crashing.org> 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 Tue, 2019-06-11 at 15:50 +1000, Benjamin Herrenschmidt wrote: > On Sat, 2019-06-08 at 11:05 +0200, Borislav Petkov wrote: > > On Sat, Jun 08, 2019 at 10:16:11AM +1000, Benjamin Herrenschmidt wrote: > > > Those IP blocks don't need any SW coordination at runtime. The drivers > > > don't share data nor communicate with each other. There is absolultely > > > no reason to go down that path. > > > > Let me set one thing straight: the EDAC "subsystem" if you will - or > > that pile of code which does error counting and reporting - has its > > limitations in supporting one EDAC driver per platform. And whenever we > > have two drivers loadable on a platform, we have to do dirty hacks like > > > > 301375e76432 ("EDAC: Add owner check to the x86 platform drivers") > > > > What that means is, that if you need to call EDAC logging routines or > > whatnot from two different drivers, there's no locking, no nothing. So > > it might work or it might set your cat on fire. > > Should we fix that then instead ? What are the big issues with adding > some basic locking ? being called from NMIs ? > > If the separate drivers operate on distinct counters I don't see a big > problem there. So looking again ... all the registration/removal of edac devices seem to already be protected by mutexes, so that's not a problem. Tell me more about what specific races you think we might have here, I'm not sure I follow... Cheers, Ben.