Received: by 2002:a4a:301c:0:0:0:0:0 with SMTP id q28-v6csp585679oof; Tue, 25 Sep 2018 01:49:15 -0700 (PDT) X-Google-Smtp-Source: ACcGV61faQAeiQ4sbEtiwCcZk3LRXDfPE5zGVihXqVsEGgPDkg5J0ud4NIxOBpPnKj2jsKtU8hOA X-Received: by 2002:a63:2441:: with SMTP id k62-v6mr54613pgk.26.1537865355745; Tue, 25 Sep 2018 01:49:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537865355; cv=none; d=google.com; s=arc-20160816; b=f1dBmNvIKEIcgkpr7joe5rw0bUbOgD4AvpAvTAE18MEZiJsbkiqjlNMUmOFIBlyzpy aftyUIVc8/YzfKOJgiID1ojPEwYeLVQTADctSD/ndyiaSdygolTkKJTt1oAtp6pGVETa vUvmH4HKIe8SeT+yqRPwEjlJ2olqemkrUrWqOSLsjHybXbhBoXNS25n5cEuHrd5zZc2i aC8MMQt9FeyCveBSoCipSVWb7gjcpkMHIYx6ZYgtAsz3JVNorKeCSpVLHMeyTr82401e 2/S6Vys5hpxMqaAlczNPn9W27AKgNNGzOSXcioRnHhATT5IBvbp5PkiUOmhS6yHoO5Nc zmFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Jxgi2935BexNSO0XwcF0lp5n8KyZPq4LJLIGysjZJ+Y=; b=ouru/1XEFV67tJzcjJiJMGuRoD3s+i4QoSXPHC4P0T0ePyNHhsyeqYMi9rZO4JuAQ3 0bqyJduj/jaLWME81sPJDaIz4ZFUtwajCKtUZ0enGCVL9u2owBqgm/nMi4qSeg6I8Ml+ eVano4cbKlC9tEejyt2p6pqQIjaNGrnRIvsY1XH9eqGfpFBxUztbaXpXM7enS5TpQv+0 mtXSCr7uD72yOQYaNz3pgqv6AVmNvMkcbweAJpr6kQi+lBpCFfUkvIynwCWrNbweIyCP +Fc0d6VSCRoQl4S1Ie6LYRgVRtwL1RTOc8gFdHwbGDGgdqXJCnaRJMHW1d2BHXfsCDuZ FJnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PQFpmpmY; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cd17-v6si1936658plb.219.2018.09.25.01.48.59; Tue, 25 Sep 2018 01:49:15 -0700 (PDT) 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=@linaro.org header.s=google header.b=PQFpmpmY; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727767AbeIYOzW (ORCPT + 99 others); Tue, 25 Sep 2018 10:55:22 -0400 Received: from mail-it1-f195.google.com ([209.85.166.195]:34070 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726208AbeIYOzV (ORCPT ); Tue, 25 Sep 2018 10:55:21 -0400 Received: by mail-it1-f195.google.com with SMTP id o72-v6so5685389ita.1 for ; Tue, 25 Sep 2018 01:48:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Jxgi2935BexNSO0XwcF0lp5n8KyZPq4LJLIGysjZJ+Y=; b=PQFpmpmYUk0afv6meLAGaRp8zHkJHu7gHljIJ5U2Pb1bUgpm1WuIsZjPw7oQba8ezq Rd/kf9IYkwW5jWqruO/mfPk39R549+hZ7IJ1tQTNOxoIkEt0VsS3878y1VpF8Hj2RZDN J1pGKXKP6dO6k3nX6XWX3G8fOlfScL+3poiPA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Jxgi2935BexNSO0XwcF0lp5n8KyZPq4LJLIGysjZJ+Y=; b=pdVQMJwrOh+Wa+xIwEwCXSmEyGdjjMxjoq7gzFvBWCa3fvqNLtF0t+5kmycg19Cm/B PDcGM3uELQJkmeWPBvgYGrrwOCRNIemJ/xEtkgkuZoI+HlkbB/yceDkO3wy7fYsfYrji +vcIblm49/gXsrJCYIPn3upddagMp/RU0YC54qEDQsZsjaAEfnko1EFXikTh8pPagJpl sqFH37YJSKTNVr7uQ/WDxFszXwjEI6iTfeF7sAcLBKjr1sar6b3lb++gdiTvBE7cZSwH 0gW+ks+2IM3e6FJ5jlLho5E3cCtZO5cwA+U9gUv06JR1lP2cOcsgKhkDJlIZsO7hXSQd 3jdg== X-Gm-Message-State: ABuFfojjA9tZxnC1jUcxDtN0zHxFRicBmqFD32ejyAtznxEJsGOqmhSB iqiLRyGEJRpRO4p1hcrQzbN+uUYgMeqwqf7dLp5zYQ== X-Received: by 2002:a24:9d84:: with SMTP id f126-v6mr1869621itd.130.1537865332320; Tue, 25 Sep 2018 01:48:52 -0700 (PDT) MIME-Version: 1.0 References: <20180921102546.12745-1-thierry.reding@gmail.com> In-Reply-To: <20180921102546.12745-1-thierry.reding@gmail.com> From: Linus Walleij Date: Tue, 25 Sep 2018 10:48:39 +0200 Message-ID: Subject: Re: [PATCH 0/9] Implement wake event support on Tegra186 and later To: "thierry.reding@gmail.com" , ilina@codeaurora.org, Marc Zyngier Cc: Thomas Gleixner , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , linux-tegra@vger.kernel.org, "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" , Ulf Hansson Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thierry, thanks for working on the wakeup business! This patch gets me a bit confused on our different approaches toward wakeups in the kernel, so I included Lina, Marc and Ulf to see if we can get some common understanding. On Fri, Sep 21, 2018 at 12:25 PM Thierry Reding wrote: > The following is a set of patches that allow certain interrupts to be > used as wakeup sources on Tegra186 and later. To implement this, each > of the GPIO controllers' IRQ domain needs to become hierarchical, and > parented to the PMC domain. The PMC domain in turn implements a new > IRQ domain that is a child to the GIC IRQ domain. > > The above ensures that the interrupt chip implementation of the PMC is > called at the correct time. The ->irq_set_type() and ->irq_set_wake() > implementations program the PMC wake registers in a way to enable the > given interrupts as wakeup sources. > > This is based on a suggestion from Thomas Gleixner that resulted from > the following thread: > > https://lkml.org/lkml/2018/9/13/1042 I am not sure if you are aware about Lina's series "Wakeup GPIO support for SDM845 SoC" that is now in v3: https://patchwork.kernel.org/cover/10587965/ It appears to me, though I am blissfully ignorant of the details, that there is a relationship between this patch series and the other one. Your approach is to insert an hiearchical PMC irq controller and Lina's approach is to simply put a mechanism on the side to inject IRQs into the GIC after sleep (IIUC). I guess your hierarchy is in response to this mail from tglx: https://lkml.org/lkml/2018/9/14/339 So from a birds eye point of view I don't see how the Tegra PMC irq controller and Qualcomm's PDC power domain controller are conceptually different. Are you doing the same thing in two different ways for the same problem space here? Or are these hardwares so very different that they really warrant two different approaches to wakeups? I guess I miss a bit of hardware insight... is the key difference that in Qualcomm's PDC the IRQs need to be replayed/injected by software while Tegra's PMC will do this in hardware? Yours, Linus Walleij