Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1118455imm; Wed, 8 Aug 2018 11:03:25 -0700 (PDT) X-Google-Smtp-Source: AA+uWPw9uM6GfmdoA799+S2VAKJdbS/lh23Z8z3bOa+I170AiBpAGJP5qyIPwKCAkyMqO8ZI61wj X-Received: by 2002:a17:902:48c8:: with SMTP id u8-v6mr3542115plh.152.1533751404975; Wed, 08 Aug 2018 11:03:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533751404; cv=none; d=google.com; s=arc-20160816; b=elj6cM2QvWH9al55o/uoU2iEfNstRoPnheaY7uZ9OVSNdSrRjWk4eZQI+nDm3fMh0y jglc75+Dk/zNTLEgzV0OjkftD1HkD49qifjP4bWaK+af4IIR1hg/PsTDS26ZlfADwI9v wa/bjcxpv4refqglRvjTq6rLY5oMTkaI8hAJCtrcIDCbnqBgw6hMN9csFq31PQVLzQXa /KH+yV4xIZeG5F8FsCCKpaS3/uX/L54ctE3kuC3vcl9XGg1+LkMtqgolXYhiQqnv2jZs u+h2kiz9Cvji4K6IqUyjem7uVmT2FrayIlcpMzxFMC2V0VO08fnLUkJxl4bQRzdDDH4l w0BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:organization:references:in-reply-to:date:cc:to:from :message-id:arc-authentication-results; bh=TQZIjdAephoL4iDJWay53AuNvOrVPnoCSy7tJNFkM4s=; b=FK0CiGfn7FKpyGLxtWkYGZDeoRD3n+CoWsUJ8+/s1C5cKMviLWFUfF5Ivvwb0sxoMG u6Unegcba/4nfDA7lN/UcWgydS7D3gB5qn4eKmnvZ+XXbMrGTlpyxj98MiWcrEYNxfPC KqzEzWbNBCxpEP7luhJduxmUtQFlH0DBD/FHVN7xsjAzFXxt9VPSZzbjauU9rTIpeFV/ 6gOetXflt1wfjOlFs9vxvFgaY+UzOyNwV2KU+reMyko/REXYQ1W+vvwJSC2F5zQfxqZU MiiZQii3S/YzBrCNyuh+lkmJF8TZEv8zDOqGG2gR6WVsL0xC6QeGa51EWRB8m8GtphI9 86jw== 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 q1-v6si5109638pgr.68.2018.08.08.11.03.10; Wed, 08 Aug 2018 11:03:24 -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 S1729679AbeHHUWx (ORCPT + 99 others); Wed, 8 Aug 2018 16:22:53 -0400 Received: from baldur.buserror.net ([165.227.176.147]:57954 "EHLO baldur.buserror.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727748AbeHHUWx (ORCPT ); Wed, 8 Aug 2018 16:22:53 -0400 Received: from [2601:449:8400:7293:12bf:48ff:fe84:c9a0] by baldur.buserror.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fnSi9-0001xp-Bj; Wed, 08 Aug 2018 12:57:30 -0500 Message-ID: From: Scott Wood To: Bharat Bhushan , "benh@kernel.crashing.org" , "paulus@samba.org" , "mpe@ellerman.id.au" , "galak@kernel.crashing.org" , "mark.rutland@arm.com" , "kstewart@linuxfoundation.org" , "gregkh@linuxfoundation.org" , "devicetree@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" Cc: "robh@kernel.org" , "keescook@chromium.org" , "tyreld@linux.vnet.ibm.com" , "joe@perches.com" Date: Wed, 08 Aug 2018 12:57:27 -0500 In-Reply-To: References: <1532684881-19310-1-git-send-email-Bharat.Bhushan@nxp.com> <1532684881-19310-6-git-send-email-Bharat.Bhushan@nxp.com> Organization: Red Hat Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2601:449:8400:7293:12bf:48ff:fe84:c9a0 X-SA-Exim-Rcpt-To: bharat.bhushan@nxp.com, benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, galak@kernel.crashing.org, mark.rutland@arm.com, kstewart@linuxfoundation.org, gregkh@linuxfoundation.org, devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, robh@kernel.org, keescook@chromium.org, tyreld@linux.vnet.ibm.com, joe@perches.com X-SA-Exim-Mail-From: oss@buserror.net X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on baldur.localdomain X-Spam-Level: X-Spam-Status: No, score=-17.5 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -15 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -1.5 GREYLIST_ISWHITE The incoming server has been whitelisted for this * recipient and sender Subject: Re: [RFC 5/5] powerpc/fsl: Add supported-irq-ranges for P2020 X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on baldur.buserror.net) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2018-08-08 at 06:28 +0000, Bharat Bhushan wrote: > > -----Original Message----- > > From: Scott Wood [mailto:oss@buserror.net] > > Sent: Wednesday, August 8, 2018 11:26 AM > > To: Bharat Bhushan ; > > benh@kernel.crashing.org; paulus@samba.org; mpe@ellerman.id.au; > > galak@kernel.crashing.org; mark.rutland@arm.com; > > kstewart@linuxfoundation.org; gregkh@linuxfoundation.org; > > devicetree@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; linux- > > kernel@vger.kernel.org > > Cc: robh@kernel.org; keescook@chromium.org; tyreld@linux.vnet.ibm.com; > > joe@perches.com > > Subject: Re: [RFC 5/5] powerpc/fsl: Add supported-irq-ranges for P2020 > > > > On Wed, 2018-08-08 at 03:44 +0000, Bharat Bhushan wrote: > > > > -----Original Message----- > > > > From: Scott Wood [mailto:oss@buserror.net] > > > > Sent: Wednesday, August 8, 2018 2:44 AM > > > > To: Bharat Bhushan ; > > > > benh@kernel.crashing.org; paulus@samba.org; mpe@ellerman.id.au; > > > > galak@kernel.crashing.org; mark.rutland@arm.com; > > > > kstewart@linuxfoundation.org; gregkh@linuxfoundation.org; > > > > devicetree@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; linux- > > > > kernel@vger.kernel.org > > > > Cc: robh@kernel.org; keescook@chromium.org; > > > > tyreld@linux.vnet.ibm.com; joe@perches.com > > > > Subject: Re: [RFC 5/5] powerpc/fsl: Add supported-irq-ranges for > > > > P2020 > > > > > > > > On Fri, 2018-07-27 at 15:18 +0530, Bharat Bhushan wrote: > > > > > MPIC on NXP (Freescale) P2020 supports following irq > > > > > ranges: > > > > > > 0 - 11 (External interrupt) > > > > > > 16 - 79 (Internal interrupt) > > > > > > 176 - 183 (Messaging interrupt) > > > > > > 224 - 231 (Shared message signaled interrupt) > > > > > > > > Why don't you convert to the 4-cell interrupt specifiers that make > > > > dealing with these ranges less error-prone? > > > > > > Ok , will do if we agree to have this series as per comment on other > > > patch. > > > > If you're concerned with errors, this would be a good things to do > > regardless. > > Actually, it seems that p2020si-post.dtsi already uses 4-cell interrupts. > > > > What is motivating this patchset? Is there something wrong in the > > existing > > dts files? > > There is no error in device tree. Main motivation is to improve code for > following reasons: > - While code study it was found that if a reserved irq-number used then > there are no check in driver. irq will be configured as correct and > interrupt will never fire. Again, a wrong interrupt number won't fire, whether an interrupt by that number exists or not. I wouldn't mind a sanity check in the driver if the programming model made it properly discoverable, but I don't think it's worth messing with device trees just for this (and even less so given that there don't seem to be new chips coming out that this would be relevant for). > > > One other confusing observation I have is that "irq_count" from > > > platform code is given precedence over "last-interrupt-source" in > > > device- > > > > tree. > > > Should not device-tree should have precedence otherwise there is no > > > point using " last-interrupt-source" if platform code passes > > > "irq_count" in mpic_alloc(). > > > > Maybe, though I don't think it matters much given that last-interrupt- > > source > > was only added to avoid having to pass irq_count in platform code. > > Thanks for clarifying; > > My understanding was that "last-interrupt-source" added to ensure that we > can over-ride value passed from platform code. In that case we do not need > to change code and can control from device tree. The changelog says, "To avoid needing to write custom board-specific code to detect that scenario, allow it to be easily overridden in the device-tree," where "it" means the value provided by hardware. The goal was to pass in 256 without board code in the kernel, not to override the 256. -Scott