From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C46A2C433DF for ; Sat, 25 Jul 2020 14:44:10 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8C19520674 for ; Sat, 25 Jul 2020 14:44:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fiLhoTAo"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="maFYJdi5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8C19520674 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Uolms2Vr6eDn6bh79Ft7o8KKXClmoabzP09N7cOVlco=; b=fiLhoTAoytbU2sXZOmlimnBzJ lxzMhnJtWCE3COumIDLhRlVZwjOk/tuME6tEAHTBjTwlsWD/YwgSvcQ0nd+PoSkO29ik2z7t0mW/D SU3NQLoFlHtP46Ynokrmj3CBLP1zjHZ/9xk5S5lfKxQSALK66rtyZunG/sJcqMnPtIXfW3IjmWSSn Nc1UBJoITG2j+w06hNs+yF/U1uHvvgxc2MOe4vjxtIaCvBXR3buO0gENNHgtp+2ge9qP7V30vAx6S MylRdiqzkR7u/U79WxzhIXUVysko8SzBTJjP7PXq4Vx5oeE9WA34NBzh73fOg8aPXshpFIIpuBCoZ VGOB2BJMw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jzLNy-0000LG-DW; Sat, 25 Jul 2020 14:42:50 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jzLNv-0000JK-4z for linux-arm-kernel@lists.infradead.org; Sat, 25 Jul 2020 14:42:48 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1F90320674; Sat, 25 Jul 2020 14:42:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595688166; bh=7ZD7iGe1bVQVPcYICPx/F6qdNS1AB+CvnrItQ4eJvAM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=maFYJdi5cNG71IRRw8530NvoWI59rgCxC98K4czY8TcqqTccQIF2OYKa2V5ncGzVg oVSzcoNl9vV3Wy/rlFDTj0Xr6num6TIdGINVXgcxy2O9v24fWoz6zcCzI8rhWYx+r+ uQdOeBFlpPqw2+WzXSUrDT6/zHR8rhtkOsk70GO0= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jzLNs-00ErHQ-NG; Sat, 25 Jul 2020 15:42:44 +0100 MIME-Version: 1.0 Date: Sat, 25 Jul 2020 15:42:44 +0100 From: Marc Zyngier To: Lokesh Vutla Subject: Re: [PATCH v3 6/9] irqchip/ti-sci-intr: Add support for INTR being a parent to INTR In-Reply-To: References: <20200724141837.4542-1-lokeshvutla@ti.com> <20200724141837.4542-7-lokeshvutla@ti.com> <871rkzy9i4.wl-maz@kernel.org> User-Agent: Roundcube Webmail/1.4.5 Message-ID: <71b33062f87f66e8c865b9e80b36585c@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: lokeshvutla@ti.com, robh+dt@kernel.org, tglx@linutronix.de, nm@ti.com, t-kristo@ti.com, ssantosh@kernel.org, linux-arm-kernel@lists.infradead.org, nsekhar@ti.com, grygorii.strashko@ti.com, peter.ujfalusi@ti.com, devicetree@vger.kernel.org, s-anna@ti.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200725_104247_437683_A6AADD0E X-CRM114-Status: GOOD ( 15.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nishanth Menon , Peter Ujfalusi , Grygorii Strashko , Device Tree Mailing List , Sekhar Nori , Tero Kristo , Rob Herring , Santosh Shilimkar , Thomas Gleixner , Linux ARM Mailing List Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2020-07-25 15:37, Lokesh Vutla wrote: > On 25/07/20 7:36 pm, Marc Zyngier wrote: >> On Fri, 24 Jul 2020 15:18:34 +0100, >> Lokesh Vutla wrote: >>> >>> Driver assumes that Interrupt parent to Interrupt router is always >>> GIC. >>> This is not true always and an Interrupt Router can be a parent to >>> Interrupt Router. Update the driver to detect the parent and request >>> the >>> parent irqs accordingly. >>> >>> Signed-off-by: Lokesh Vutla >>> --- >>> drivers/irqchip/irq-ti-sci-intr.c | 150 >>> ++++++++++++++++++------------ >>> 1 file changed, 91 insertions(+), 59 deletions(-) >>> >>> diff --git a/drivers/irqchip/irq-ti-sci-intr.c >>> b/drivers/irqchip/irq-ti-sci-intr.c >>> index 59d51a20bbd8..0b73816e77fc 100644 >>> --- a/drivers/irqchip/irq-ti-sci-intr.c >>> +++ b/drivers/irqchip/irq-ti-sci-intr.c [...] >>> - ret = of_property_read_u32(dev_of_node(dev), "ti,sci-dst-id", >>> - &intr->dst_id); >>> + ret = of_property_read_u32(dev_of_node(dev), "ti,sci-dev-id", >>> + &pdev->id); >> >> This feels very dodgy. You are hijacking a random field in the >> platform device data structure, which shouldn't be any of your > > pdev->id is pretty much unused field today. I was kind of hoping that > in future > it can be utilized to populated field with TISCI device IDs in some > generic > manner. So thought of using it now. It isn't unused. DT doesn't make active use of it for now, not that's not something you can rely on. >> business. What was wrong with having a separate field for something >> that is obviously platform specific? > > No reason. I could just add a new filed in the intr structure. Please do. Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E77BBC433E0 for ; Sat, 25 Jul 2020 14:42:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BD16D2070E for ; Sat, 25 Jul 2020 14:42:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595688167; bh=7ZD7iGe1bVQVPcYICPx/F6qdNS1AB+CvnrItQ4eJvAM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=pGvWoyVy6+U8z9fTX817/hun4957VsFgp+tQqn0UKnVDS+lFQ5by0eyTzxOTouFZa 7ApDg3tyn4ZODbjIe4vNCOPJunY6+kuyUI3z/wzbnkHiI+mLljFLOutU6RaK8P0pdF VskGwCSr+4JSoCLvuoOeYWvV7Kj5Cf+DlAIU6c/Y= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726944AbgGYOmr (ORCPT ); Sat, 25 Jul 2020 10:42:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:48974 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726652AbgGYOmr (ORCPT ); Sat, 25 Jul 2020 10:42:47 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1F90320674; Sat, 25 Jul 2020 14:42:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595688166; bh=7ZD7iGe1bVQVPcYICPx/F6qdNS1AB+CvnrItQ4eJvAM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=maFYJdi5cNG71IRRw8530NvoWI59rgCxC98K4czY8TcqqTccQIF2OYKa2V5ncGzVg oVSzcoNl9vV3Wy/rlFDTj0Xr6num6TIdGINVXgcxy2O9v24fWoz6zcCzI8rhWYx+r+ uQdOeBFlpPqw2+WzXSUrDT6/zHR8rhtkOsk70GO0= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jzLNs-00ErHQ-NG; Sat, 25 Jul 2020 15:42:44 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 25 Jul 2020 15:42:44 +0100 From: Marc Zyngier To: Lokesh Vutla Cc: Rob Herring , Thomas Gleixner , Nishanth Menon , Tero Kristo , Santosh Shilimkar , Linux ARM Mailing List , Sekhar Nori , Grygorii Strashko , Peter Ujfalusi , Device Tree Mailing List , Suman Anna Subject: Re: [PATCH v3 6/9] irqchip/ti-sci-intr: Add support for INTR being a parent to INTR In-Reply-To: References: <20200724141837.4542-1-lokeshvutla@ti.com> <20200724141837.4542-7-lokeshvutla@ti.com> <871rkzy9i4.wl-maz@kernel.org> User-Agent: Roundcube Webmail/1.4.5 Message-ID: <71b33062f87f66e8c865b9e80b36585c@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: lokeshvutla@ti.com, robh+dt@kernel.org, tglx@linutronix.de, nm@ti.com, t-kristo@ti.com, ssantosh@kernel.org, linux-arm-kernel@lists.infradead.org, nsekhar@ti.com, grygorii.strashko@ti.com, peter.ujfalusi@ti.com, devicetree@vger.kernel.org, s-anna@ti.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 2020-07-25 15:37, Lokesh Vutla wrote: > On 25/07/20 7:36 pm, Marc Zyngier wrote: >> On Fri, 24 Jul 2020 15:18:34 +0100, >> Lokesh Vutla wrote: >>> >>> Driver assumes that Interrupt parent to Interrupt router is always >>> GIC. >>> This is not true always and an Interrupt Router can be a parent to >>> Interrupt Router. Update the driver to detect the parent and request >>> the >>> parent irqs accordingly. >>> >>> Signed-off-by: Lokesh Vutla >>> --- >>> drivers/irqchip/irq-ti-sci-intr.c | 150 >>> ++++++++++++++++++------------ >>> 1 file changed, 91 insertions(+), 59 deletions(-) >>> >>> diff --git a/drivers/irqchip/irq-ti-sci-intr.c >>> b/drivers/irqchip/irq-ti-sci-intr.c >>> index 59d51a20bbd8..0b73816e77fc 100644 >>> --- a/drivers/irqchip/irq-ti-sci-intr.c >>> +++ b/drivers/irqchip/irq-ti-sci-intr.c [...] >>> - ret = of_property_read_u32(dev_of_node(dev), "ti,sci-dst-id", >>> - &intr->dst_id); >>> + ret = of_property_read_u32(dev_of_node(dev), "ti,sci-dev-id", >>> + &pdev->id); >> >> This feels very dodgy. You are hijacking a random field in the >> platform device data structure, which shouldn't be any of your > > pdev->id is pretty much unused field today. I was kind of hoping that > in future > it can be utilized to populated field with TISCI device IDs in some > generic > manner. So thought of using it now. It isn't unused. DT doesn't make active use of it for now, not that's not something you can rely on. >> business. What was wrong with having a separate field for something >> that is obviously platform specific? > > No reason. I could just add a new filed in the intr structure. Please do. Thanks, M. -- Jazz is not dead. It just smells funny...