Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1845685ybe; Wed, 11 Sep 2019 23:58:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqwupaWrdkHTvOODwyTXzkCDLpclT3azH45YuuMYXZvFppm8z9oMKfCoOKjHe3L6JSRCAVHg X-Received: by 2002:a05:6402:16d5:: with SMTP id r21mr12082281edx.71.1568271494927; Wed, 11 Sep 2019 23:58:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568271494; cv=none; d=google.com; s=arc-20160816; b=KN05xoHspxrf2xV2iHKwh66pfRZrSMUZNXGSyWRZG6Vl6lxdslwts2w/XlpXDFXebQ +OciLQOAU0hCH3WxFEcuZRYU1MM8uXOwvzuXgIAFHslddpXJHuvfirJxWTrwEVv8G8W3 0sIZ//b9xfdyE4bVMVVqZFhl4DxptyK8PpBuNNFKC0IkAp78vCFlF/f0H+Z312NHIE+2 vfYqNAFA3sO/VjvcJ2M0wA9j5FmjwBHeIFyrYy6A8R6V3JHzNHgS1JJkSLWSBLdfl4xP 5i+SUkZ6VzHzOXmbv1jGLWGTKTZ/7P5VdSLDNzjsJcGLEPiYNEL4feh7V2v+gxBOeR2k LXIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=RkCzFDA8G0+ul+VXzUIqi6fz+55WLQ8iBiqeKjnUUqw=; b=cQUWLyldTLz1q+FRiEohJi0V1ugGaIqsv/yNtjpmMxO7YESF5WX8ChdJTs4+yah6Ln txq3UCegAvN+J3iz17mf7uOc+o8RAH8zL/48UB2e/8QH184dyzfkusc4GqbcUhG7JOyN Sv5HoAQi6Q8Eww9g+peR3UimNW04IXcYOnVPYrFmk/I0cYTI5kuelXQtfbVRNwoopwgK rr4hSYxmhYEatyov8AFQQ0F6T3HS19lKZw1e8aDr0qe5MQMpdkhqgI5u+NLy+/Lrd+O/ x3HcvZPSceDepb9Pxjlm0s0+aLptxMA5FPAUdOgKPV2wgqkF89nJAd9D6dW7MENr28Np KoJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=XK0MJuLw; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k14si15441712ede.421.2019.09.11.23.57.51; Wed, 11 Sep 2019 23:58:14 -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=@amazon.com header.s=amazon201209 header.b=XK0MJuLw; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728931AbfILGuY (ORCPT + 99 others); Thu, 12 Sep 2019 02:50:24 -0400 Received: from smtp-fw-33001.amazon.com ([207.171.190.10]:40857 "EHLO smtp-fw-33001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725765AbfILGuY (ORCPT ); Thu, 12 Sep 2019 02:50:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1568271023; x=1599807023; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=RkCzFDA8G0+ul+VXzUIqi6fz+55WLQ8iBiqeKjnUUqw=; b=XK0MJuLwRuACdK673mdd5nTyOb/5nuc7oAdIsMFDWDx9JsjdeqoQXY/5 QxhSUwjEBd3UPSy9FkTdDComzq2zqEmSe6AFgJD7JB6YE5kvQnlVMeYQY rLgAcfYS2PlHIfk8Plte0k9CDSbSLGBtrlZsyKBPN4eXPCjZxgRs0H1/v g=; X-IronPort-AV: E=Sophos;i="5.64,495,1559520000"; d="scan'208";a="830871359" Received: from sea3-co-svc-lb6-vlan2.sea.amazon.com (HELO email-inbound-relay-1e-a70de69e.us-east-1.amazon.com) ([10.47.22.34]) by smtp-border-fw-out-33001.sea14.amazon.com with ESMTP; 12 Sep 2019 06:50:19 +0000 Received: from EX13MTAUEA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1e-a70de69e.us-east-1.amazon.com (Postfix) with ESMTPS id BD585A22DC; Thu, 12 Sep 2019 06:50:15 +0000 (UTC) Received: from EX13D01EUB002.ant.amazon.com (10.43.166.113) by EX13MTAUEA001.ant.amazon.com (10.43.61.243) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 12 Sep 2019 06:50:14 +0000 Received: from [10.125.238.52] (10.43.161.82) by EX13D01EUB002.ant.amazon.com (10.43.166.113) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 12 Sep 2019 06:50:07 +0000 Subject: Re: [UNVERIFIED SENDER] Re: [PATCH v2 2/3] soc: amazon: al-pos: Introduce Amazon's Annapurna Labs POS driver To: Marc Zyngier CC: , , , , , , , , , , , , James Morse References: <1568142310-17622-1-git-send-email-talel@amazon.com> <1568142310-17622-3-git-send-email-talel@amazon.com> <86d0g6syva.wl-maz@kernel.org> From: "Shenhar, Talel" Message-ID: <3205f7ae-5568-c064-23ac-ea726246173b@amazon.com> Date: Thu, 12 Sep 2019 09:50:03 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.0 MIME-Version: 1.0 In-Reply-To: <86d0g6syva.wl-maz@kernel.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [10.43.161.82] X-ClientProxiedBy: EX13D11UWB001.ant.amazon.com (10.43.161.53) To EX13D01EUB002.ant.amazon.com (10.43.166.113) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marc, On 9/11/2019 5:15 PM, Marc Zyngier wrote: > [+James] > > Hi Talel, > > On Tue, 10 Sep 2019 20:05:09 +0100, > Talel Shenhar wrote: > >> + log1 = readl(pos->mmio_base + AL_POS_ERROR_LOG_1); > Do you actually need the implied barriers? I'd expect that relaxed > accesses should be enough. You are correct. Barriers are not needed, In v1 this driver indeed used _relaxed versions. Due to request coming from Arnd in v1 patch series I removed it. As this is not data path I had no strong objection for removing it. > >> + if (!FIELD_GET(AL_POS_ERROR_LOG_1_VALID, log1)) >> + return IRQ_NONE; >> + >> + log0 = readl(pos->mmio_base + AL_POS_ERROR_LOG_0); >> + writel(0, pos->mmio_base + AL_POS_ERROR_LOG_1); >> + >> + addr = FIELD_GET(AL_POS_ERROR_LOG_0_ADDR_LOW, log0); >> + addr |= (FIELD_GET(AL_POS_ERROR_LOG_1_ADDR_HIGH, log1) << 32); >> + request_id = FIELD_GET(AL_POS_ERROR_LOG_1_REQUEST_ID, log1); >> + bresp = FIELD_GET(AL_POS_ERROR_LOG_1_BRESP, log1); >> + >> + dev_err(&pdev->dev, "addr=0x%llx request_id=0x%x bresp=0x%x\n", >> + addr, request_id, bresp); > What is this information? How do we make use of it? Given that this is > asynchronous, how do we correlate it to the offending software? Indeed this information arriving from the HW is asynchronous. There is no direct method to get the offending software. There are all kinds of hacks we do to find the offending software once we find this error. most of the time its a new patch introduced but some of the time is just digging. > The whole think looks to me like a poor man's EDAC handling, and I'd > expect to be plugged in that subsystem instead. Any reason why this > isn't the case? It would certainly make the handling uniform for the > user. This logic was not plugged into EDAC as there is no "Correctable" error here. its just error event. Not all errors are EDAC in the sense of Error Detection And *Correction*. There are no correctable errors for this driver. So plugging it  under EDAC seems like abusing the EDAC system. Now that I've emphasize the reason for not putting this under EDAC, what do you think? should this "only uncorrectable event" driver should be part of EDAC? Thanks, Talel