Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2169035ybh; Fri, 13 Mar 2020 14:09:35 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvf+nR5zu5el9k9O5Z1UGt4xT0/SLMn60ZY2N9o6X90dY2e9DqZedHOw1aOFAKdSAUJfkNQ X-Received: by 2002:aca:4b56:: with SMTP id y83mr8872111oia.142.1584133774923; Fri, 13 Mar 2020 14:09:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584133774; cv=none; d=google.com; s=arc-20160816; b=DVN6PHMBA9yoM+YW8VGoLb5tsYz3PVT2VP868rarZWvFnybckV8ganl0n64NPrcvJu neIuz/nDGKS7GEH9nNvu8IaDZ6IiBtGnPl2ALEA8qvFLOWHW4cho8rRpuOGR13Qv3iu0 QcwlD3ZtNwREkagi8FODEYAoQDrigrQQ34Htk3EB3zwk5d72JBKdSdqW635nKkw6tIrk q2R/UtGxwPaINAyTDfAFL4YQhuejNOW6jD+Za/E7hegM/MBBxrm48XDcqiFLlrFhUlX8 T7fvjDo62jglDADlAyjAB+bEA1oXaDvhu5syOMp4+1LDPHk4rLK0Hc7zZkY4Qtrqzr9r 6PpQ== 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=ctrrvsauAYuF+5TZRvlwZdq08mz1JQ5bpHPFrWuBNr4=; b=koqYvEqMiAtgNFldMTGkLj25Fp3K/svdlFW+C/McUbiw9kMYW6VOY8sRGeUd88sO15 7Nwtt38dROZx/+5O7LOwPM5aiGumz2NWU50uVSr8q0Crhlrl/iSfS4cw4ZJgWKxMVSHe Tv2EMi8vTo8VZBELKATZdOVVI63m7RDjLOUcvzj3w1DFMY67rEkTjvlcmoKFaQ2TB+x/ H5CLHlSdvG1eSJCeh+DNSGNM++kj6d8bJAKgOTdWV6IRKTfuMdx0y4/eib129uaMF59L 4qB/cLGIrp8r5unueyoMk9zsPZW8mhy+c6hWmgZANCJpnxi5pFe01ZN0mZwZBFc658Eg UcPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gateworks-com.20150623.gappssmtp.com header.s=20150623 header.b=Svo7zeoc; 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 u24si5267286otk.287.2020.03.13.14.09.16; Fri, 13 Mar 2020 14:09:34 -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=@gateworks-com.20150623.gappssmtp.com header.s=20150623 header.b=Svo7zeoc; 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 S1727341AbgCMVHF (ORCPT + 99 others); Fri, 13 Mar 2020 17:07:05 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:39943 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726526AbgCMVHE (ORCPT ); Fri, 13 Mar 2020 17:07:04 -0400 Received: by mail-wr1-f67.google.com with SMTP id f3so6843457wrw.7 for ; Fri, 13 Mar 2020 14:07:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gateworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ctrrvsauAYuF+5TZRvlwZdq08mz1JQ5bpHPFrWuBNr4=; b=Svo7zeocU6WeReAJ0ARsPwMuvSxptIHLhgPIFefBnZPEgG3FnK7tlqkWb7i3HOx5vL VqIJixbFQCwfd8MGlA7fSHwwWQNaHCqOvQ9m3WtJIB+UnsMRMYMZKMn/00sakmoj55Xu Z3/TNEbyJZzM2ZGXSyR73sB/2Nk0vJcW+6GyPWiNj7nO5yA9XRhdmKNWsopYUJtYt4QW VV9bGGawnMGRYIRVN8R4lXD7VyZ/Xuu0K7XeOBl2nODRTmHtzKpY5GY+42fn66+vKffB VfdATghzXSOLKiTo7jvnVseKl8R7tuI2mE+U+32kp57yPJ1VQV/w4ar6oX00nmofuiwC 6Bjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ctrrvsauAYuF+5TZRvlwZdq08mz1JQ5bpHPFrWuBNr4=; b=D/hbG2msGClne5wieYWFCmLFLhHfzvOdlNruLpqGWutb6HaBo6MwEtZq3HtIvlvasV qY+4SaYp3/6UKXWCc0PEM8Hlj39dzKSGxoqFWHyrgGu8IBPkvq5Lt4iLr0wbBq/JVbQz +x4WEHPeVuB5Zpqbob36HfjSDjwQ9qpy8vctZLsDMUOFr4iPFi9/BUprGnMDH9o7zxkl ABA6MN3VpqkD1ycGhrh2+GRI/iN9s+sF6UWNdvTz2AByS3OaNfyeVJJGsCF3KgWg9yYf /9ic2K+8v+hMWVUvEaaA6qihYbhcqvWPGuylFBtqw1U2wuMl1sEaAjUQfblMsWZEAqCI FJqg== X-Gm-Message-State: ANhLgQ0Maj4skNXpEkkS/oov0+GsUznUALnB6iaHQ0as22Mmg+VN+xux fBIXaQArgtUG5vzh4LeySpY104x7sEHjcr0DYlnC9A== X-Received: by 2002:adf:91c3:: with SMTP id 61mr6714394wri.384.1584133622854; Fri, 13 Mar 2020 14:07:02 -0700 (PDT) MIME-Version: 1.0 References: <1583941433-15876-1-git-send-email-tharvey@gateworks.com> <20200313153151.e5nmsbr6yrzchdxi@rric.localdomain> <20200313191230.qrrlo7ht24fhfhvj@rric.localdomain> <20200313202444.vdfdowbudlsxmqsf@rric.localdomain> In-Reply-To: <20200313202444.vdfdowbudlsxmqsf@rric.localdomain> From: Tim Harvey Date: Fri, 13 Mar 2020 14:06:50 -0700 Message-ID: Subject: Re: [PATCH] gpio: thunderx: fix irq_request_resources To: Robert Richter Cc: Linus Walleij , Lokesh Vutla , "open list:GPIO SUBSYSTEM" , open list 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, Mar 13, 2020 at 1:24 PM Robert Richter wrote: > > On 13.03.20 12:41:19, Tim Harvey wrote: > > On Fri, Mar 13, 2020 at 12:12 PM Robert Richter wrote: > > > > > > On 13.03.20 16:31:51, Robert Richter wrote: > > > > On 11.03.20 08:43:53, Tim Harvey wrote: > > > > > If there are no parent resources do not call irq_chip_request_resources_parent > > > > > at all as this will return an error. > > > > > > > > > > This resolves a regression where devices using a thunderx gpio as an interrupt > > > > > would fail probing. > > > > > > > > > > Fixes: 0d04d0c ("gpio: thunderx: Use the default parent apis for {request,release}_resources") > > > > > Signed-off-by: Tim Harvey > > > > > --- > > > > > drivers/gpio/gpio-thunderx.c | 9 ++++++--- > > > > > 1 file changed, 6 insertions(+), 3 deletions(-) > > > > Looking at the original code, the parent resources are requested only > > > if existing. So the change is ok. > > > > > > On the other hand, the overall change using irq_chip_{request, > > > release}_resources_parent() became pointless now. It is unreadable and > > > more complex now. Thus, commit 0d04d0c should just be reverted. > > > > > > The function interface is limited. Instead of letting the child device > > > deal with the parent, parent requests should be handled directly in > > > irq_request_resources(). Another aspect is that the code for this > > > driver has been already removed upstream and ti_sci_inta_msi.c is the > > > last remaining user of it. This speaks also for a removal by a revert. > > > A revert does make the most sense to me and it works for 5.2, 5.3, and > > 5.5 but the revert fails for 5.4 and needs some manual intervention. > > v5.4 should additionally revert a7fc89f9d5fc ("gpio: thunderx: Switch > to GPIOLIB_IRQCHIP"). v5.5 contains this revert too (a564ac35d605 > Revert "gpio: thunderx: Switch to GPIOLIB_IRQCHIP") and the code in > that area is the same then for all kernels from 5.2 to 5.5, which is > basically a revert back to 5.1. I think this is ok. > > Do you have a particular test case to test the driver that I can use > for my own testing? > Robert, The hardware I have has an interrupt controller with its upstream interrupt to an OctoenTX GPIO (and its driver is in progress and not yet accepted upstream which means this issue in 5.2/5.3/5.4 doesn't affect me). I'm unclear if you just need a device that has an interrupt on the OcteonTX GPIO or if the device has to be an interrupt controller to trigger the issue as is my case. Tim