Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp399353pxb; Tue, 3 Nov 2020 02:33:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJyv9tTk71jhqZEUQomaOfq1Libh3v5uB3/SrzZL0xpFzGxPzNKbRBRxw5t6IeBVewv6Qki4 X-Received: by 2002:a17:906:4306:: with SMTP id j6mr20147156ejm.523.1604399609242; Tue, 03 Nov 2020 02:33:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604399609; cv=none; d=google.com; s=arc-20160816; b=mfB+XT7c6acxmwCqJIIx45escfnGnzS/YIpUmAy/uWbP3QfEp9d6qlctB9rTmqh7wN QsAZJjtXQtuU1lCMKIb6B2VRoNTk4FGlWYQmQb3qIL7PL+iNLRtuSEB0Xgp+D8wRt6is ixeu/xY9Lcjxnx9PuJM8YUFDFTfS643H5XCpoT1W/Gusi6hS52vCjPdcHKC9Iy6oRLxo 3+Y8RmkMwEjEppkY8BIOEmIZmtFqYpSokbf8Nrb3XEc/tqabG2hVWy0ukdT7NClTfvvu g0TlK5plXYl+fQ2i6ZrZInEdg6VKrg62AnxkrMV2aZ5sla0GDYj1mcvbmdb3CkRQHZaH 1W6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=4YPfyThdfqh+Ek0aAZOjucScX+kZFKAkhTa4zTnlBMU=; b=SQoPF0xrpBSQ+H4vHhPKW7wNx6SEcrGPwe+XgWR8DYWXUbzSRjWM0iXEs+Aprpr+sE 6m+GTPRI+lUOmcytl/x7RBdwsL4XoHz4TZa7u7HAk3k7VfvcF7aRjmvyGhY8fpzH7kZj d3++yqGMG2OEAsBu4YNneSv7kW0SCb1QK9R29Lrn39fRieGenPo9Lsc6y0mStq6EDuDQ 8BY9O9uwg204s8lfsWNUmBo8XwGMdEX0TiA+kfpejBrhAWX2CJ7cMcnsUtMMXKpMwx9/ BAz5u7BGguSD+SF9HvWnpl9FKbHoIEAgOBbuWB1smanD+ZxPa25xFQcs8Xv++eOlyZEB EcqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=cJmsOmPV; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=k7tiSTzp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y9si12743205ede.591.2020.11.03.02.33.06; Tue, 03 Nov 2020 02:33:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=cJmsOmPV; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=k7tiSTzp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728124AbgKCKbV (ORCPT + 99 others); Tue, 3 Nov 2020 05:31:21 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:37172 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727443AbgKCKbT (ORCPT ); Tue, 3 Nov 2020 05:31:19 -0500 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1604399477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4YPfyThdfqh+Ek0aAZOjucScX+kZFKAkhTa4zTnlBMU=; b=cJmsOmPV8GxzrObsOJzXJvTYMLL9xzFykDdEjxeqVusW8aVOVPJKjwbe7RH/Qi4KGazgb6 EXRzP0xXM42TRoQIjBOjqlb6E6IJNMg5Uj8mAc5cqfbHJfnhvPpar3uOMOKW8ezN121T8a SZhNsRibqapisx5f/5weainDJpjip7on3mdg+F9fcAxJ8oPkKlaYWreRU8WbB5JD6pr4qJ F07XA3El6TMzHtEVCrcFtl5Mfsj+eyD8kEiVd6Zd3AuGeEJN8dVA/THmr8KCllF2pe5+Dw I2o5pQOvke7qTwY4QNIw/OC1C03cMdbGZqpZ5ly8lJw41X8M2mgMCZ2GC3DoNA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1604399477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4YPfyThdfqh+Ek0aAZOjucScX+kZFKAkhTa4zTnlBMU=; b=k7tiSTzpqGHQ8uDde18bylPddN7ucdzaebd1+q9xcVIWj2XjHe6Ebn2vilYBp7//HFtXyS 9Q9mwA+dO8xE2cDA== To: Marc Zyngier Cc: Frank Wunderlich , Ryder Lee , linux-mediatek@lists.infradead.org, Frank Wunderlich , linux-kernel@vger.kernel.org, Matthias Brugger , linux-pci@vger.kernel.org, Bjorn Helgaas Subject: Re: Aw: Re: [PATCH] pci: mediatek: fix warning in msi.h In-Reply-To: <901c5eb8bbaa3fe53ddc8f65917e48ef@kernel.org> References: <20201031140330.83768-1-linux@fw-web.de> <878sbm9icl.fsf@nanos.tec.linutronix.de> <87lfflti8q.wl-maz@kernel.org> <1604253261.22363.0.camel@mtkswgap22> <87k0v4u4uq.wl-maz@kernel.org> <87pn4w90hm.fsf@nanos.tec.linutronix.de> <87h7q791j8.fsf@nanos.tec.linutronix.de> <877dr38kt8.fsf@nanos.tec.linutronix.de> <901c5eb8bbaa3fe53ddc8f65917e48ef@kernel.org> Date: Tue, 03 Nov 2020 11:31:17 +0100 Message-ID: <87k0v27mve.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 03 2020 at 09:54, Marc Zyngier wrote: > On 2020-11-02 22:18, Thomas Gleixner wrote: >> So we really need some other solution and removing the warning is not >> an option. If MSI is enabled then we want to get a warning when a PCI >> device has no MSI domain associated. Explicitly expressing the PCIE >> brigde misfeature of not supporting MSI is way better than silently >> returning an error code which is swallowed anyway. > > I don't disagree here, though the PCI_MSI_ARCH_FALLBACKS mechanism > makes it more difficult to establish. Only for the few leftovers which implement msi_controller, i.e. drivers/pci/controller/pci-hyperv.c drivers/pci/controller/pci-tegra.c drivers/pci/controller/pcie-rcar-host.c drivers/pci/controller/pcie-xilinx.c The architectures which select PCI_MSI_ARCH_FALLBACKS are: arch/ia64/Kconfig: select PCI_MSI_ARCH_FALLBACKS if PCI_MSI arch/mips/Kconfig: select PCI_MSI_ARCH_FALLBACKS if PCI_MSI arch/powerpc/Kconfig: select PCI_MSI_ARCH_FALLBACKS if PCI_MSI arch/s390/Kconfig: select PCI_MSI_ARCH_FALLBACKS if PCI_MSI arch/sparc/Kconfig: select PCI_MSI_ARCH_FALLBACKS if PCI_MSI implement arch_setup_msi_irq() which makes it magically work :) >> Whatever the preferred way is via flags at host probe time or flagging >> it post probe I don't care much as long as it is consistent. > > Host probe time is going to require some changes in the core PCI api, > as everything that checks for a MSI domain is based on the pci_bus > structure, which is only allocated much later. Yeah, it's nasty. One possible solution is to add flags or a callback to pci_ops, but it's not pretty either. I think we should go with the 'mark it after pci_host_probe()' hack for 5.10-rc. The real fix will be larger and go into 5.11. Thoughts? Thanks, tglx