Received: by 10.223.176.5 with SMTP id f5csp228149wra; Tue, 30 Jan 2018 10:32:00 -0800 (PST) X-Google-Smtp-Source: AH8x227Cz62I8U7cTm486cki25jmOZOFdcCK4/E9qD104saQj52j8QA4hqXlvMB/FOKmBODO2ZeJ X-Received: by 10.98.162.10 with SMTP id m10mr30966760pff.168.1517337120629; Tue, 30 Jan 2018 10:32:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517337120; cv=none; d=google.com; s=arc-20160816; b=zaffzjacxEULyE1aOvOVzslaewLKOd1xqiIDDjlPXR1waGRnPhF6lHJtbd1XsHogzi H6frbEHkHYdNXzu0xFyc5gt8jAgtwEdWhef8jPLSu9eRLv8d4mTxzxr7/FMSBtwylfC0 IeWpsFSAJkW7Wj5FxIJj5t54a9jatV4sGerCu9i6pfwiTzidUF2O7TAy7PppE33Nhi/V jnC/VjPv+zwRPs/+gcfOVCOnuwHyueNkdCQSRpI/ZRDOp9ltKU/raX9FTn6yLd85FmBk d4n2JVOpmBa01dhI7lJ3h4YCJdXzytzFeIXKyStht5POWesWNyvhbuhIA8whBh/MxtzN z5cQ== 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=yRYHXjyD/aQ4E7j0e6b3IomohgJfFyW3ldXPrcW/zKw=; b=FIFaFoiIFSuTHzIw3cscAQevv4br8wYKdFsXWjCxOX1qPQjZBBD+oWJ+DmLFJQzSRr nf4SPvS1wjmuJEN4SXUkPmUSBO/UXeJLEuevHuCKZGTlJyVQ/xad/19xGRhOmAEMkMiJ 4wf/WJsyPDuiLSNdnORIyjV4Q+dgub7XVmkapTRD8DJbTL9ayk03YjPAV23eNgw8kumC RQG3aLgV9FlBCPTt1NE+O3/+t0IT1X1JcU+j0wiyso8nZMbBkvwWj1SfyQjywslgOOt+ gnzHQ8eeJBNwyA3gXJqgwhEn9ZQTo+Cy1mbUv1/+x1NbBHH39HWLyJ7RB0XK5ymx6Y6n PLLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Ddu76Q4n; dkim=pass header.i=@codeaurora.org header.s=default header.b=deSlMhtt; 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 y128si1978434pfy.110.2018.01.30.10.31.46; Tue, 30 Jan 2018 10:32:00 -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=Ddu76Q4n; dkim=pass header.i=@codeaurora.org header.s=default header.b=deSlMhtt; 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 S1752907AbeA3R46 (ORCPT + 99 others); Tue, 30 Jan 2018 12:56:58 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:44736 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751761AbeA3R44 (ORCPT ); Tue, 30 Jan 2018 12:56:56 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 18C39606DD; Tue, 30 Jan 2018 17:56:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1517335016; bh=GadNtc2leqwp3fEopmp+QqkLES/ThaG/9g5nVgdg868=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ddu76Q4nOIFz7CvC5sKH318V/humjJc2/4zt857IxqcrOTWu8pQT/5tltnDVWsgvo QOzfqyE2YT9z/HN4rTMcV6BOcVlgdObmnmjODF8CRTd+e6F0U/zCR2lOrg3at6URz8 89iZG+H4qTnIIzpu3V6rwMdvs9Pt87TcIn9JDwCQ= 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 1391F601D2; Tue, 30 Jan 2018 17:56:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1517335015; bh=GadNtc2leqwp3fEopmp+QqkLES/ThaG/9g5nVgdg868=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=deSlMhttgqvTdWO2SIEVMuop6JgBVRTr1gWPwNeZoQRiepiBp9Me9s6gL5lTS3VKk pFpYVRWbXUUrmZP7K/xF4wcqyJ97QUrbGbHCLQpkU8dup8gZRY4OmkNgIy5/tl2QEm mvuWTKuNYDNAUiPf3+Yun1KLR5CKaKjzJ5v/4eNw= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1391F601D2 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: Tue, 30 Jan 2018 17:56:54 +0000 From: Lina Iyer To: Marc Zyngier Cc: tglx@linutronix.de, jason@lakedaemon.net, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, sboyd@codeaurora.org, rnayak@codeaurora.org, asathyak@codeaurora.org Subject: Re: [PATCH RFC 1/4] drivers: irqchip: pdc: add support for PDC interrupt controller Message-ID: <20180130175654.GC20815@codeaurora.org> References: <20180123175656.11942-1-ilina@codeaurora.org> <20180123175656.11942-2-ilina@codeaurora.org> <9dd8307c-4906-4707-d4d7-2ef0fc8307b6@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <9dd8307c-4906-4707-d4d7-2ef0fc8307b6@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 Hi Mark, On Wed, Jan 24 2018 at 14:20 +0000, Marc Zyngier wrote: >Hi Lina, Archana, > >On 23/01/18 17:56, Lina Iyer wrote: >> From : Archana Sathyakumar >> >> The Power Domain Controller (PDC) hardware block on Qualcomm SoCs houses >> an interrupt controller along with other domain control functions to >> handle interrupt related functions like handle falling edge or active >> low which are not detected at the GIC and handle wakeup interrupts. >> >> The interrupt controller is on an always-on domain for the purpose of >> waking up the processor, but only a subset of the processor's interrupts >> are routed through the PDC to the GIC. The PDC powers on the processor's >> domain, bringing the domain out of low power mode and replays the >> pending interrupts so the GIC may wake up the processor. >> >> Signed-off-by: Archana Sathyakumar >> Signed-off-by: Lina Iyer >> [Lina: Split out DT bindings target data and initialization changes] >> --- [...] >> + >> +static int qcom_pdc_translate(struct irq_domain *d, >> + struct irq_fwspec *fwspec, unsigned long *hwirq, unsigned int *type) >> +{ >> + return d->parent->ops->translate(d->parent, fwspec, hwirq, type); > >No way. The translate operation is local to your domain. You don't go >and fish in another domain's private stuff. Please implement your own. >The reason you're getting away with it is because you're in the DT by >providing the GIC SPI instead of the pin into the PDC. > I am looking into this approach. Was hoping to get some clarifications from you. The PDC sits between the device and the the GIC. Platform drivers receive their interrupts from GIC. They are not aware of the fact that the GIC may lose power and hand over its job to PDC. The platform drivers may configure an interrupt as a wakeup interrupt, in which case, we would wake up the CPU even if we are in system sleep or suspend mode. Platform driver don't know about the PDC pin or its configuration information. It makes it easier to keep that information contained within the PDC driver. Instead of getting the pin-hwirq map from the table as in patch #4, I can get that information cleanly from DT. >Don't do that. Expose the pin in the DT, use the alloc method to map the >PDC pin into the GIC pin. > I would like to understand how you mean by this. I am thinking something like this in the dts - / { interrupt-controller = <&pdc>; soc { intc: interrupt-controller@176000 { [...] interrupt-controller; interrupt-parent = <&intc>; }; pdc: interrupt-controller@210000 { [...] interrupt-controller; interrupt-parent = <&intc>; qcm,pdc-ranges = <0 512 94>, <94 641 15>, <115 662 7>; }; foo-device { interrupts = ; }; }; }; Where the qcom,pdc-ranges is defined as - . For this example, the PDC map is established for pin0-pin93 using 94 interrupts in sequence starting from 512 and so on. This allows for holes in the map per the hardware interrupt topology. I am not sure if you were asking to specify the pin in the 'interrupts' property in each device. I would like to avoid that as this may be an information that the device author may care less about. Would you agree? If I completely missed your point, would you please care to elaborate? Thanks, Lina