Received: by 10.223.176.46 with SMTP id f43csp1044914wra; Wed, 24 Jan 2018 09:44:06 -0800 (PST) X-Google-Smtp-Source: AH8x2273DXpjXpv2ubIuY0dooOOVMw0LyqjoGjHmCB795+XIL4biSQzXlmIypZNpTYUgPAhOiufF X-Received: by 10.98.19.19 with SMTP id b19mr13683617pfj.118.1516815846163; Wed, 24 Jan 2018 09:44:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516815846; cv=none; d=google.com; s=arc-20160816; b=ERgiU9ecSFk9Pr+cTCX4rl2FvcF/IiUphkHdcX5TdWdbLOxm3eWVXwgZox67rFlWU9 asDmXzkuqWjp9X7CCR0cSkAcPJPUmlYVrtCj3WHVViHpQI9ZjbNT/sTAWV5nJ6BTk3OW 803qG1JeUDqDReOQHPh8gl8S+Foo3PscES4axbPhlGNgk8PxYw10nXhxhrMaBO4JdXqX hsjBCme/eJ65YjCW5/iYr8oQgcaR3HRNgWp+Y0PSbArpIT78k6sMmnUrbOqZE72eU3CG PU3Vs/YrN0St8MLKV0t/SOhbvxeTKiS1vFmGfBbvtu7PNcFlvO6fjSDBkgP+KyvhJamH ML0w== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=hgjm99Ie8NqxACz0Nnn5p6m7N8T4xVtiwvhSQ525nr4=; b=sYwqHG1WsehLMF5B2PCHL0Zd3DCzaUAXrdf8moaz9d5QkhVBj5BLGchZR4Z45F7Z+K ygVFaCiRCFIEK0aIhUCR2yLNkkoeG2Zk70S+y4zEC2P/1odKG04RUL+H32OoVHyfzc/F avDa6IMeZYxZtmQe8kxwOnV8BjP09F0Jkc1C8SoFuhPZrAj5Ca1CFkpYU/BhsDOUpYO6 SU3JO/hFbQM2hWXIiFYd5CJ8jyM8VmO2JCCHVHXU6/i4/cuT9QiBM8JBjEMn7COTnYRU 2OJaBV3Yj+g4/BJhxuJVn1bYOOXqkCrxNQI3aXEwqiuo5EiQP2tldtCZhoMOCZHIx+Zd MHmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=GszPtC2v; dkim=pass header.i=@codeaurora.org header.s=default header.b=PsCdU7ZX; 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 c8-v6si515723plm.534.2018.01.24.09.43.52; Wed, 24 Jan 2018 09:44:06 -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=GszPtC2v; dkim=pass header.i=@codeaurora.org header.s=default header.b=PsCdU7ZX; 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 S965016AbeAXRnP (ORCPT + 99 others); Wed, 24 Jan 2018 12:43:15 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:52922 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964850AbeAXRnN (ORCPT ); Wed, 24 Jan 2018 12:43:13 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 06CDF604D4; Wed, 24 Jan 2018 17:43:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1516815793; bh=hgjm99Ie8NqxACz0Nnn5p6m7N8T4xVtiwvhSQ525nr4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GszPtC2vNM0SPCX19qAy1o2MKw2uTsirIHdzwc8C7oTEmpdE2yTlv7vhwNuW2aAMR 9LBlefqo9nOen0Zm137s1v2TfGXWNSBYT01PInL5CzFUK+Jsh1WtXkIlfg/G3zRWoL bg3ucfGRZTewcMHn0lr7w5HgqZzwIo7lFJi+kJ4o= 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 16903604D4; Wed, 24 Jan 2018 17:43:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1516815792; bh=hgjm99Ie8NqxACz0Nnn5p6m7N8T4xVtiwvhSQ525nr4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PsCdU7ZXXw9X6msrk5/ofRimD/fB2gIYw1CHSmHXZ52XVRBhz0t2pB7EcnHDgb3CP T2AL65sApqbfjlcCLY/FFg4oXXkTPSetRjqTcqFJdgsPiryzYoTqdt/wR7sgd6ATW6 pZtbr1rIsvgHRBM5pmKvoe4DL/0rrBQvCjp3QsPU= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 16903604D4 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: Wed, 24 Jan 2018 17:43:10 +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: <20180124174310.GA24587@codeaurora.org> References: <20180123175656.11942-1-ilina@codeaurora.org> <20180123184442.GA12243@codeaurora.org> <494fa715-aff0-19f2-0ee9-78d8c0b33775@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <494fa715-aff0-19f2-0ee9-78d8c0b33775@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 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: >>> 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 ? > Yes. It is handled by a remote processor, which is aware that the application processor subsystem has been powered off. >Also when will this PDC wakeup interrupts get configured ? > The platform drivers configure the IRQ as a wake source and if the IRQ is one of those listed as routed to the PDC, the PDC is configured to sense the interrupt and when the application processor domain is powered on and the GIC can sense the interrupts, it is replayed to the GIC, which then wakes up the processor. >>> 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. > Yes, through the hierarchy. >>> >>> 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. > Yes. There is a partition and protected. So only permitted ELs can write to the registers. This is done by the firmware at boot. Thanks, Lina