From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Osipenko Subject: Re: [PATCH V6 01/21] irqchip: tegra: Do not disable COP IRQ during suspend Date: Fri, 2 Aug 2019 20:35:25 +0300 Message-ID: References: <1563738060-30213-1-git-send-email-skomatineni@nvidia.com> <1563738060-30213-2-git-send-email-skomatineni@nvidia.com> <20190725095502.GM12715@pdeschrijver-desktop.Nvidia.com> <20190725103348.GN12715@pdeschrijver-desktop.Nvidia.com> <20190725103813.GO12715@pdeschrijver-desktop.Nvidia.com> <20190802130537.GB3883@pdeschrijver-desktop.Nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <20190802130537.GB3883@pdeschrijver-desktop.Nvidia.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Peter De Schrijver Cc: Sowjanya Komatineni , thierry.reding@gmail.com, jonathanh@nvidia.com, tglx@linutronix.de, jason@lakedaemon.net, marc.zyngier@arm.com, linus.walleij@linaro.org, stefan@agner.ch, mark.rutland@arm.com, pgaikwad@nvidia.com, sboyd@kernel.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, jckuo@nvidia.com, josephl@nvidia.com, talho@nvidia.com, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, mperttunen@nvidia.com, spatra@nvidia.com, robh+dt@kernel.org, devicetree@vger.kernel.org List-Id: devicetree@vger.kernel.org 02.08.2019 16:05, Peter De Schrijver пишет: > On Thu, Jul 25, 2019 at 01:59:09PM +0300, Dmitry Osipenko wrote: >> 25.07.2019 13:38, Peter De Schrijver пишет: >>> On Thu, Jul 25, 2019 at 01:33:48PM +0300, Peter De Schrijver wrote: >>>> On Thu, Jul 25, 2019 at 01:05:13PM +0300, Dmitry Osipenko wrote: >>>>> 25.07.2019 12:55, Peter De Schrijver пишет: >>>>>> On Mon, Jul 22, 2019 at 12:54:51PM +0300, Dmitry Osipenko wrote: >>>>>>> >>>>>>> All Tegra SoCs support SC7, hence the 'supports_sc7' and the comment >>>>>>> doesn't sound correct to me. Something like 'firmware_sc7' should suit >>>>>>> better here. >>>>>>> >>>>>>>> + writel_relaxed(~0ul, ictlr + ICTLR_COP_IER_CLR); >>>>>>> >>>>>>> Secondly, I'm also not sure why COP interrupts need to be disabled for >>>>>>> pre-T210 at all, since COP is unused. This looks to me like it was >>>>>>> cut-n-pasted from downstream kernel without a good reason and could be >>>>>>> simply removed. >>>>>> >>>>>> I don't think we can rely on the fact that COP is unused. People can >>>>>> write their own code to run on COP. >>>>> >>>>> 1. Not upstream - doesn't matter. >>>>> >>>> >>>> The code is not part of the kernel, so obviously it's not upstream? >>>> >>>>> 2. That's not very good if something unknown is running on COP and then >>>>> kernel suddenly intervenes, don't you think so? >>>> >>>> Unless the code was written with this in mind. >>>> >> >> In that case, please see 1. ;) >> > > In general the kernel should not touch the COP interrupts I think. > >>> >>> Looking at this again, I don't think we need to enable the IRQ at all. >> >> Could you please clarify? The code only saves/restores COP's interrupts >> context across suspend-resume. > > The sc7 entry firmware doesn't use interrupts. Okay, it shouldn't hurt to clean up the LIC's code a tad by removing the COP's bits, will make a patch.