Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5223866ybi; Tue, 11 Jun 2019 22:08:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqz9adFMj+oYsFmo9nmrvjyxT//4xFmUbM2GnO/7AppZtZkes39slWLiJjA09ENbeOgDc5pd X-Received: by 2002:a63:27c7:: with SMTP id n190mr23465893pgn.250.1560316128064; Tue, 11 Jun 2019 22:08:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560316128; cv=none; d=google.com; s=arc-20160816; b=AcDADEV0iOxBKQe34gjz0jeXkC7nPw/NKpDzA0S1osRm/+OtKJu1uB59oIdbYcHZLx 9vmwiN94setzuIUoId0FdnLv/kGdATQ9pToV6kQu2wX24RK3Flv1kwsgeR3pmYjJ/+Kq Cd+1PhcwWBU8najUmKlmXaj468zO62d2mbscGZXmx0VubfXc2HFqQtg8CyAPfCUhxfPe 5N7HgXvK1NBBKoxPMUCTiRj6dEKcyar1OPV/BdIMkf5bIoWsKNjWDXhY9rN73bHQzC6c 3o23d8fxi+ncfTAwOX/9vna8TwCaANIyxorkf78Tb0hlF9rk7FmPkL05iRiCked0TbNB Btlg== 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=lXAaJXkFSuZkOwt5eDz3RdXkJGDek+KW9G/AkDueGc8=; b=mHtjLlzIrhRouPNBVENjI4htHhItM+h0cbYhoMjt+J/Cn4qHqfK3hw8w8qRNCLOdm4 dVUxu8tSBWIepyo+zYca0Ty2RSo+JJ1excMheGqmFNs07hbMA4SjRPJBLcIXVBEaH1dF Mr+hgoVl6WIu8lVlKjJxyEMASsPj/dbRr44nmmPf7OsXpNaFs5Ls193D/Lxk5KAY1jwv gMbo+wPKx6SNTX9AbzO93pfeIEaRixW1Orv4zf2lpNl1Ijce5LXI2lOPZA0+rPFg2iDr MO1o5w1MKLcyqRONrjR60woVa10l2Nv90bmTXCRIxiABnKSapSRF5DmKMeLOqGuF8Mn0 uMCQ== 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 h63si16114328pfb.90.2019.06.11.22.08.31; Tue, 11 Jun 2019 22:08:48 -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 S2391906AbfFKW0S (ORCPT + 99 others); Tue, 11 Jun 2019 18:26:18 -0400 Received: from gate.crashing.org ([63.228.1.57]:56267 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389575AbfFKW0S (ORCPT ); Tue, 11 Jun 2019 18:26:18 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x5BMPqDC020637; Tue, 11 Jun 2019 17:25:53 -0500 Message-ID: <6df5a17bb1c900dc69b991171e55632f40d9426f.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: Wed, 12 Jun 2019 08:25:52 +1000 In-Reply-To: <20190611115651.GD31772@zn.tnic> References: <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> <68446361fd1e742b284555b96b638fe6b5218b8b.camel@kernel.crashing.org> <20190611115651.GD31772@zn.tnic> 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 13:56 +0200, Borislav Petkov wrote: > On Tue, Jun 11, 2019 at 05:21:39PM +1000, Benjamin Herrenschmidt wrote: > > 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... > > Well, as I said "it might work or it might set your cat on fire." For > example, one of the error logging paths is edac_mc_handle_error() and > that thing mostly operates using the *mci pointer which should be ok > but then it calls the "trace_mc_event" tracepoint and I'd suppose that > tracepoints can do lockless but I'm not sure. Yes, we would be in a world of pain already if tracepoints couldn't handle concurrency :-) > So what needs to happen is for paths which weren't called by multiple > EDAC agents in parallel but need to get called in parallel now due to > ARM drivers wanting to do that, to get audited that they're safe. That's the thing, I don't think we have such path. We are talking about having separate L1/L2 vs. MC drivers, they don't overlap. > Situation is easy if you have one platform driver where you can > synchronize things in the driver but since you guys need to do separate > drivers for whatever reason, then that would need to be done prior. > > Makes more sense? Sort-of... I still don't see a race in what we propose but I might be missing something subtle. We are talking about two drivers for two different IP blocks updating different counters etc... Cheers, Ben.