Received: by 10.223.176.46 with SMTP id f43csp545154wra; Wed, 24 Jan 2018 02:11:24 -0800 (PST) X-Google-Smtp-Source: AH8x226MTv6MTtCHBKi6QEpWrcI+rbF2npjjR46WZn1HxRoA/uSDTZgBhet7e01FsnqI+5ujaWYV X-Received: by 2002:a17:902:781:: with SMTP id 1-v6mr7577681plj.411.1516788684470; Wed, 24 Jan 2018 02:11:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516788684; cv=none; d=google.com; s=arc-20160816; b=EZgqVbtuUzontDlZm3Z3IZTxJkFO6CbyrxclQVWb2W3h+FMUe4cWwYTaXngBwwBlGG 0EWV9RfY2T5Ysg4YxRTkVRQcFF4YZBWyyExCOrgMJ79NlFVUE/3tZVMGBhrxViYQYaNh XSp9OW1NO+T61Xr48EzC7PWvokf3TBgQKfHeyxS8htwPZE4Ktd5zbzru+aCgC1Y9n7IW oAkxi5Nl+hKa3QoUEsjtEfJ0E0ETVjfymLmkLz5M6xX77nemXIiqpEn0HToHW0lkEfCE 1GX7zQ1wDxZm48IOa8e9QM4nd94j+nMJpRySpEXBHfZkXf9q2Z1cp/H01NJfS3CZLRRZ LG/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:to:subject:cc :arc-authentication-results; bh=9hxAFQh2su9T4xlV+Cl9rZOiclHpbLMZxMMnHaGxvYA=; b=jTnK7T9f9/SamxA2vzAlog6i3dptEMtvF6/qMgidalUGxy2Bq8jL8dv60Q/jh4uq3/ gqSpS3S6PcFyMRXCEIpoSSIrf7SK1kXP9L3Lmoh11viuQDOfWu5/Be1jcQHEWXl+LB7R czFig0l2Y/YhBoD7HZT65LCAfc1I1qJGA7uVIKlIDbI2c7QR73g/UkEUBcoJpjtDXTi7 yNgS03m7pyAmpKZ5O5TzK8e7sVPiqx68AqLEmeHqFXTEDJB5xnpYBchddZKU5eatqE9y ye10CkLiDeC+Bi+nuIQuzc2PgCltRHjLQ09zKaBeHTBqqijiITxpngNHrhWrRQXfzV6I Oc9A== 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 n16si15815374pgc.589.2018.01.24.02.11.10; Wed, 24 Jan 2018 02:11:24 -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; 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 S932884AbeAXKKm (ORCPT + 99 others); Wed, 24 Jan 2018 05:10:42 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:50616 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752483AbeAXKKk (ORCPT ); Wed, 24 Jan 2018 05:10:40 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 307851435; Wed, 24 Jan 2018 02:10:40 -0800 (PST) Received: from [10.1.210.28] (e107155-lin.cambridge.arm.com [10.1.210.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0CBC63F318; Wed, 24 Jan 2018 02:10:36 -0800 (PST) Cc: Sudeep Holla , 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 To: Lina Iyer References: <20180123175656.11942-1-ilina@codeaurora.org> <20180123184442.GA12243@codeaurora.org> From: Sudeep Holla Organization: ARM Message-ID: <494fa715-aff0-19f2-0ee9-78d8c0b33775@arm.com> Date: Wed, 24 Jan 2018 10:10:35 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180123184442.GA12243@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23/01/18 18:44, Lina Iyer wrote: > On Tue, Jan 23 2018 at 18:15 +0000, Sudeep Holla wrote: >> Hi Lina, >> >> On Tue, Jan 23, 2018 at 5:56 PM, Lina Iyer wrote: >>> On newer Qualcomm Techonologies Inc's SoCs like the SDM845, the GIC >>> is in a >>> power domain that can be powered off when not needed. Interrupts that >>> need to >>> be sensed even when the GIC is powered off, are routed through an >>> interrupt >>> controller in an always-on domain called the Power Domain Controller >>> a.k.a PDC. >>> This series adds support for the PDC's interrupt controller. >>> >> >> Sorry for the basic questions: >> >> 1. Will the GIC be powered off in any other state other than System >> suspend ? >> > Yes. When all the CPUs are in idle, there is an opportunity to power off > the CPU's power domain and the GIC. QCOM SoCs have been doing that for > many generations now. > OK interesting, in that case so either GIC state is saved/restored with some out of tree patches or the firmware takes care of it and it's transparent to Linux ? Also when will this PDC wakeup interrupts get configured ? >> 2. Why this needs to be done in Linux, why can't it be transparent and >> hidden >>    in the firmware doing the actual GIC power down ? I assume Linux is >> not >>    powering down the GIC. > No. You are right, Linux is not powering off the GIC directly. A > dedicated processor for power management in the SoC does that. Platform > drivers in Linux, know and configure the wakeup interrupts (depending on > the usecase). This is runtime specific and this is the way to tell the > SoC to wake up the processor even if the GIC and the CPU domain were > powered off. > OK, understood. By transparent, I mean firmware can copy the interrupts enabled in the GIC to the PDC. It need not be kernel driven. >> >> 3. I see some bits that enable secure interrupts in one of the patch. >> Is that even >>    safe to allow Linux to enable some secure interrupts in PDC ? >> > Linux should not and would not configure secure interrupts. We would not > have permissions for secure interrupts. The interrupt names might be a > misnomer, but the interrupts listed in patch #4 are all non-secure > interrupts. > OK. So I can assume PDC is partitioned in secure and non-secure. If not it's safe not have any access for PDC in the kernel. Couple of designs of similar PDC I have seen is system wide and does handle even secure part of the system. That was the main reason for checking. -- Regards, Sudeep