Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp2240491img; Wed, 27 Feb 2019 12:58:37 -0800 (PST) X-Google-Smtp-Source: AHgI3IanJIY/KUjSszIVSgoBpENdJJi+hYetq6UrSso2zshhedbK0GecVOtdFwAya2d35PGRYfGW X-Received: by 2002:a63:1155:: with SMTP id 21mr4601175pgr.96.1551301117755; Wed, 27 Feb 2019 12:58:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551301117; cv=none; d=google.com; s=arc-20160816; b=cx9kxYoP0xqNxcLcxv5hZRztzdw43aFJkn+SsnAYfRNkPPNz0Le1NELywe8Gke3oTq pvrj56ynCQoCfaqBIODMXm4hyz8EEIFE5BPc2E62A0nyRmtRpNYsB4RMrXWIvSdm6SV2 vte/T5tH8l8gyTIdt0geOEMdw+A4JL08UGwR1ZZsSYzEKftDVE6Jye5sI3qFyJ6JVfIO Hfw0/EfZasSi0l59a7PyUW84JV6tHSc5R1ziypU1ubXGpSmL3CXj79+V3UHEr/NXE85h l5lhedH6unSgUNqnVeLA8qr71tyNBKz9QRpJ1mCXa4SrK73wtAyk/dwDmRiVeousn8gM IPfg== 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:dkim-signature; bh=c8VWH6zBnriKrNXSEqZVVW0Kns2rlHqKeHT5OroTUIQ=; b=LXJYMR/h21+iyIm/EEfHTzqnnzraJa3Sgzd7oeGwgP8GyKrFFTPHgQQixpUr15u3ZE zX9MNf1zHtLTkXf8l9PPbkObCKlrxnF3zXiEEzJFb2ZEcpO6I0+yE3KCyRsGkleg2XqU aUPFxivSBhV1T9SoIv1kQQiGKupc2vFqKf+D08ANioZK6b2vKbeJRwZuzi+XbZqylrY7 KIAsjewoo1coKVtOY8MpJ6GrlLNjMEqBDKE63hqypZ64xceNCyqsSdxq4FRe6LHLiQ8N LvMRwIinGBiSmiUarSB06rjM0CGFqXUsARIT/v0VloqeX346ChMjsvWD7p6nyuxemB+E VVug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=IS2KUIgJ; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si9146676ply.361.2019.02.27.12.58.21; Wed, 27 Feb 2019 12:58:37 -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=@chromium.org header.s=google header.b=IS2KUIgJ; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730398AbfB0U57 (ORCPT + 99 others); Wed, 27 Feb 2019 15:57:59 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:38671 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729412AbfB0U57 (ORCPT ); Wed, 27 Feb 2019 15:57:59 -0500 Received: by mail-pl1-f195.google.com with SMTP id g37so5781980plb.5 for ; Wed, 27 Feb 2019 12:57:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=c8VWH6zBnriKrNXSEqZVVW0Kns2rlHqKeHT5OroTUIQ=; b=IS2KUIgJgNd0ucZl768yoRseJvxnyHKS/3NycTcRYZSEjwRArteaDb7lvOR0zwBhRi L2SS43CEyx7h8uKvGY7A1lRRYU4pBbWznUqXM+5XqUH5WoJyArubm/N9omPO7BVaXcsM 5IczBEs4mrCr+ygxwTwUdkywizoVCgkRMI04s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=c8VWH6zBnriKrNXSEqZVVW0Kns2rlHqKeHT5OroTUIQ=; b=P0tYiEQNoD7i3bdS0AVCy2WoohYKKYyIsYbUfSs2+BlQaGM4rlh0YInd2jVtCaa3fZ D8RwFcqnd9QGb08u0FdZc3+EzmluJWTQOxzfPm5058XG6gGscrsogfTCXCPK+99Y554b o0K6UalJmK1YYGuVN9dVbYaEzApTkUIIGirL3sDwodogE8WuS1Fy+7MHrMMm6ACrDkde TvS4tTckV+IYRK7mXDO4GgIFFKI8rRoYjrhmJjs0s0COuuRqHsfi8Jym0JDCY1Ndm8VR iRA+Op7NI8EBydgL/uOaB2Ed0VaiMH/ID+/DaiMOgNrIQP09oZoR8rU4cKL3mtnPNBlO Er8A== X-Gm-Message-State: AHQUAuZwauTwLNC2uhn6KzLCnIc4iE6isqhajbQD0qoqs6UQz0W9uBPb I47CEP4lO+88XCNAtFDOKLgJfg== X-Received: by 2002:a17:902:6a83:: with SMTP id n3mr4161242plk.313.1551301078637; Wed, 27 Feb 2019 12:57:58 -0800 (PST) Received: from google.com ([2620:15c:202:1:534:b7c0:a63c:460c]) by smtp.gmail.com with ESMTPSA id u11sm17044796pfh.23.2019.02.27.12.57.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Feb 2019 12:57:57 -0800 (PST) Date: Wed, 27 Feb 2019 12:57:55 -0800 From: Brian Norris To: Ard Biesheuvel Cc: Marc Zyngier , Ganapathi Bhat , Jeffy Chen , Heiko Stuebner , Devicetree List , Xinming Hu , "" , linux-pm , "" , Linux Kernel Mailing List , Amitkumar Karwar , linux-rockchip@lists.infradead.org, Nishant Sarmukadam , Rob Herring , "Rafael J. Wysocki" , linux-arm-kernel , Enric Balletbo i Serra , Lorenzo Pieralisi , "David S. Miller" , Kalle Valo , Tony Lindgren , Mark Rutland Subject: Re: [PATCH 0/4] mwifiex PCI/wake-up interrupt fixes Message-ID: <20190227205754.GF174696@google.com> References: <20190224140426.3267-1-marc.zyngier@arm.com> <20190226232822.GA174696@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ard, On Wed, Feb 27, 2019 at 11:16:12AM +0100, Ard Biesheuvel wrote: > On Wed, 27 Feb 2019 at 11:02, Marc Zyngier wrote: > > On 26/02/2019 23:28, Brian Norris wrote: > > > You're not the first person to notice this. All the motivations are not > > > necessarily painted clearly in their cover letter, but here are some > > > previous attempts at solving this problem: > > > > > > [RFC PATCH v11 0/5] PCI: rockchip: Move PCIe WAKE# handling into pci core > > > https://lkml.kernel.org/lkml/20171225114742.18920-1-jeffy.chen@rock-chips.com/ > > > http://lkml.kernel.org/lkml/20171226023646.17722-1-jeffy.chen@rock-chips.com/ > > > > > > As you can see by the 12th iteration, it wasn't left unsolved for lack > > > of trying... > > > > I wasn't aware of this. That's definitely a better approach than my > > hack, and I would really like this to be revived. > > > > I don't think this approach is entirely sound either. (I'm sure there may be problems with the above series. We probably should give it another shot though someday, as I think it's closer to the mark.) > From the side of the PCI device, WAKE# is just a GPIO line, and how it > is wired into the system is an entirely separate matter. So I don't > think it is justified to overload the notion of legacy interrupts with > some other pin that may behave in a way that is vaguely similar to how > a true wake-up capable interrupt works. I think you've conflated INTx with WAKE# just a bit (and to be fair, that's exactly what the bad binding we're trying to replace did, accidentally). We're not trying to claim this WAKE# signal replaces the typical PCI interrupts, but it *is* an interrupt in some sense -- "depending on your definition of interrupt", per our IRC conversation ;) > So I'd argue that we should add an optional 'wake-gpio' DT property > instead to the generic PCI device binding, and leave the interrupt > binding and discovery alone. So I think Mark Rutland already shot that one down; it's conceptually an interrupt from the device's perspective. We just need to figure out a good way of representing it that doesn't stomp on the existing INTx definitions. Brian