Received: by 10.223.176.46 with SMTP id f43csp2465312wra; Thu, 25 Jan 2018 10:13:58 -0800 (PST) X-Google-Smtp-Source: AH8x226/U1JdpWU1WmORz3IBX0kw8P+Pj3P8DotOIfVSdiFjOD1L51qgHkHaT0ujuvjMrXjITa3f X-Received: by 10.98.11.218 with SMTP id 87mr16334053pfl.99.1516904038372; Thu, 25 Jan 2018 10:13:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516904038; cv=none; d=google.com; s=arc-20160816; b=V5H1yadGCXCv7/uwqBcBheA44rvYY3Svq44jN5PhhEs8hlGmqYCxMhnu1ikZHe15IG +hWL3gAe90M+pInwGay5Xb9QgOUNysgPMQraOVgtLJdJIQFt9Y5PZ+8MBDHOjBQxGPOE HchZTeGRApd6iA/7Cu/V/VvWQ5PpVQnwnbv1nSGpf/2MTozPgoIQz0znZdwl/w1ewpes lhk3yKSn1H5V0F8aFY+6WY9VloxahgJnQi7DqE+orjZri73g6wYjtlupk7k9YSQpHCfQ Mb95qGLPi6GLb83Fql5kGaVvqXezyMK2EtTlA75/b8/aebewaw6ItRhGcB7g/MWnEJL9 DwIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=QLddN6mcs/XCron0l7LRM9t3aRKjv+EgMbAoAL83MlM=; b=PSFKBtuKKsQtUIEODpKMPrDFctHE81L98Lp1LP8x0kwwRX6FNNVonk0zCsakea+uun hbH3PlRmORuJbOdZjyCagwDikDsHs8PWuMfrz0Isbo8IdNhskijmtYT3J8g5nAZOLsW+ nFuuogir8zQRS1hm7NnSJ/OK0UMdN33xdUuUrPTAAwAhaupIb+7C+wybx4jp3WfA8Jo0 ujOKVG/JRVcy3vMzdqXMPnn7qmChV211+RpoOn20DY6JI/N9r1gaf+cCHfPe8W36Gxod Ggoy3IstmOMR0dr98i1sTJ0M5Fw/d6NNtH5JCa3fMYGosnOhO8YeOK2LLPZ9nUhWq6Ub y1MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=UtVeT1pe; dkim=pass header.i=@codeaurora.org header.s=default header.b=UtVeT1pe; 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 h64si290208pgc.416.2018.01.25.10.13.43; Thu, 25 Jan 2018 10:13:58 -0800 (PST) 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=@codeaurora.org header.s=default header.b=UtVeT1pe; dkim=pass header.i=@codeaurora.org header.s=default header.b=UtVeT1pe; 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 S1751281AbeAYSNN (ORCPT + 99 others); Thu, 25 Jan 2018 13:13:13 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:47776 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751106AbeAYSNL (ORCPT ); Thu, 25 Jan 2018 13:13:11 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 800D760A4E; Thu, 25 Jan 2018 18:13:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1516903990; bh=JbPfR6cYyjJDtlXQcne8lt2MnJPURdkfmkeIMOg2TWw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UtVeT1peUNqnZ6t5w7s/6joN7ZL+g5QVtk6G2rkQNb31WcbG6N7sKhXU0RBZiXXBt bulv1L31n8sBrBI1WnrttIo3AJCN/DHksoMaA9VqBAMdCo2Y8cFqAFCcKBl4zxihil LcnE5N/I+vBtM/viGgjTgjBJhKoApHrhNFRpfcZA= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from localhost (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: ilina@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id EDB4360452; Thu, 25 Jan 2018 18:13:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1516903990; bh=JbPfR6cYyjJDtlXQcne8lt2MnJPURdkfmkeIMOg2TWw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UtVeT1peUNqnZ6t5w7s/6joN7ZL+g5QVtk6G2rkQNb31WcbG6N7sKhXU0RBZiXXBt bulv1L31n8sBrBI1WnrttIo3AJCN/DHksoMaA9VqBAMdCo2Y8cFqAFCcKBl4zxihil LcnE5N/I+vBtM/viGgjTgjBJhKoApHrhNFRpfcZA= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org EDB4360452 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=ilina@codeaurora.org Date: Thu, 25 Jan 2018 18:13:09 +0000 From: Lina Iyer To: Sudeep Holla Cc: Thomas Gleixner , Jason Cooper , Marc Zyngier , open list , linux-arm-msm@vger.kernel.org, Stephen Boyd , "Nayak, Rajendra" , asathyak@codeaurora.org Subject: Re: [PATCH RFC 0/4] irqchip: qcom: add support for PDC interrupt controller Message-ID: <20180125181309.GA12603@codeaurora.org> References: <20180123175656.11942-1-ilina@codeaurora.org> <20180123184442.GA12243@codeaurora.org> <494fa715-aff0-19f2-0ee9-78d8c0b33775@arm.com> <20180124174310.GA24587@codeaurora.org> <1ee07421-444d-adf7-bf6f-8a35c4884c14@arm.com> <20180125155428.GC24587@codeaurora.org> <403f9685-fd40-8948-d658-5acb63af04fb@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <403f9685-fd40-8948-d658-5acb63af04fb@arm.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 25 2018 at 16:39 +0000, Sudeep Holla wrote: > > >On 25/01/18 15:54, Lina Iyer wrote: >> On Wed, Jan 24 2018 at 17:54 +0000, Sudeep Holla wrote: >>> >>> >>> On 24/01/18 17:43, Lina Iyer wrote: >>>> On Wed, Jan 24 2018 at 10:10 +0000, Sudeep Holla wrote: >>>>> >>>>> >>>>> On 23/01/18 18:44, Lina Iyer wrote: >>>>>> On Tue, Jan 23 2018 at 18:15 +0000, Sudeep Holla wrote: >> Platform drivers leave their interrupts enabled at the GIC. Only >> interrupts that are wakeup capable are of interest when the processor is >> powered down. The remote processor (or f/w) will need to know the set of >> wakeup capable interrupts and then configure the PDC by copying from >> GIC. As mentioned earlier, it is simplified by letting Linux write to >> the PDC reqisters directly. >> > >OK looks like I have not properly conveyed what I wanted to :( >So lets take a peripheral A which has GIC interrupt X and a >corresponding PDC interrupt Y. > >IIUC you want to configure Y from Linux while X is still enabled. > >1. GICv3 masks all the interrupts(~X) that are not wakeup sources. > So when you say "platform drivers leave their interrupts enabled at > the GIC", it's not completely correct. > During idle path, the interrupts remain enabled. The GIC configuration is retained, but the controller cannot sense interrupts because the GIC logic is powered off. The PDC takes over for GIC at this time. >2. GIC CPU interface is disabled in firmware, so it's better to copy the > wakeup source to PDC just before that in the firmware. > >3. Remote f/w must just know the mapping to PDC(X) for all the enabled > interrupts(Y) at the GIC and enable them accordingly at PDC. Is that > not what you have in the array in patch 4 ? > >I find above approach simpler instead of getting those wakeup >interrupts defined per peripheral in DT. Further if there are any secure >wakeup interrupts the firmware can also deal with that. > You assume that the remote processor is capable of doing all that. It is better to de-centralize all this and have individual processors do the work of configuring their wake up sources. We used to do that in earlier SoCs but with SDM845, we moved to de-centralized model to reduce latency and take the load off from time-critical idle path at the remote processor. Dumping all this work into the firmware/PSCI is not desirable either. >>>> Yes. There is a partition and protected. So only permitted ELs can write >>>> to the registers. This is done by the firmware at boot. >>>> >>> >>> Just for myself to understand better, so you have multiple partitions in >>> PDC and one of them is given to EL1 or it just has one partition and >>> that can be configured so that only permitted ELx is allowed to access >>> it(in your case it's EL1) >>> >> Yes. > >Yes for the former or the latter :) ? > The latter. Thanks, Lina