Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1399145pxa; Fri, 28 Aug 2020 11:32:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDnwIitZxtx0Pp8rY33vkvmSFZSthANULhuRO9/ETCOMIXe1s03wF/zoq4E/HMqxI7ukw/ X-Received: by 2002:aa7:cfc7:: with SMTP id r7mr56616edy.24.1598639525450; Fri, 28 Aug 2020 11:32:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598639525; cv=none; d=google.com; s=arc-20160816; b=I7NT7qbCM4FfzTJxXGwd7w8BYLa6GGN7vN1sKr+YUUeL9odfvPHt5t5IzTaptIcAka KZZs7aLFCNUGwQ8Ifw9D1cErK42Nw4ngYwbx2UiaO2L81gy/hIaZnC/qyEjqm0kRiEaW Nf3mjnUF62TocONgkvTcTLUvYOq3HXRHrOC5CezVoHFAJE5OSCqfnv4RYSKqHL/GPINM uiKd3vOwQKmyMlniAxm05whoIOwzZl01KTj029MyOtxOKf0CusYIOWBPSre3+9c7rgGc v826oKMhQM1HJQtA8iUYAX8+1qPwqR2X3FZ+OuMEg7O97PpIDtPdOHj5Cb2AFb1d62pk m69Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=HQQ3PgkKo2hS5HQKNaJ3P1IptF/ClXfBwAd1n3Worn0=; b=i1eFd8HZasx/7/meuo8LXLiM6R5TFtqVOW8MOElTKG2IZ1yLhMdvhxvEZSu0Ey7TZ9 iYwRJNMdnShzu7kOt2hXPPAiKK29zQtXGOLm51XSo3WaX1BuQd1M6jqzU1S0eVX2Zx6t YpFMFVogo4hU86mX4nov7Ejo2+Dh5h5uC3cnQTUtzS+NxT6WGMUcS5HaozWkzDmxCHGF 7raJEDZp9y/b9naq7/GR+wNXPMP4DtkYOMgwsd9KSxDBYgfP6B+SML6d00Pb4w/CpDZz HxlSPivvYCn9vwCQWf2uHLvrwYv1SVLZG3dK8Avg0dXjSk4qtaHxn/ue4ssVuZV9hcqy iY3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=aCTaFZU+; dkim=neutral (no key) header.i=@vger.kernel.org; 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 i10si1238400edu.323.2020.08.28.11.31.41; Fri, 28 Aug 2020 11:32:05 -0700 (PDT) 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=aCTaFZU+; dkim=neutral (no key) header.i=@vger.kernel.org; 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 S1728058AbgH1SaC (ORCPT + 99 others); Fri, 28 Aug 2020 14:30:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727940AbgH1SaA (ORCPT ); Fri, 28 Aug 2020 14:30:00 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0764DC061264; Fri, 28 Aug 2020 11:29:59 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1598639398; 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=HQQ3PgkKo2hS5HQKNaJ3P1IptF/ClXfBwAd1n3Worn0=; b=aCTaFZU+e8x0x58wJ1oeYUMPHmUAbdjR6qrLnzUL2j3Joo6UWr9US/cCwRlh/cn/Dvl3Ea AvjuuOBWjpzVXAXBQyGeg3gInDAiqfY9sH0WgQWHi3NyPKyTXpj7zFsze/QeG7xMPEXKCT iIrXwbhXKciDtYdzmRP42PwSOTAibh/Ci9iyIDxL9JGAZZDFCWmomrS+tkBweJNjmV2kjb BbgDTKvuYwHkEpQDeFwqMNmNeXfaqNVEON0+suObP1Oa+wJK8Ot+NeM4+0tLDCDC/otdSb sRbMsWVyem66C8lTMSZznkBMUmQrRkEU4Yxl7AH+oxxHZ72nlgzHwSoX1gI+cQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1598639398; 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=HQQ3PgkKo2hS5HQKNaJ3P1IptF/ClXfBwAd1n3Worn0=; b=vXG0XUsJMIi3DkkPAd4hFW5NyIUjTPD3/KRNdL6hTZ3E1uRKkBApmbjwrrLTXyfG5+s5Mw 6hQo8a2K/hj9JbDA== To: Bjorn Helgaas Cc: LKML , x86@kernel.org, Joerg Roedel , iommu@lists.linux-foundation.org, linux-hyperv@vger.kernel.org, Haiyang Zhang , Jon Derrick , Lu Baolu , Wei Liu , "K. Y. Srinivasan" , Stephen Hemminger , Steve Wahl , Dimitri Sivanich , Russ Anderson , linux-pci@vger.kernel.org, Bjorn Helgaas , Lorenzo Pieralisi , Konrad Rzeszutek Wilk , xen-devel@lists.xenproject.org, Juergen Gross , Boris Ostrovsky , Stefano Stabellini , Marc Zyngier , Greg Kroah-Hartman , "Rafael J. Wysocki" , Megha Dey , Jason Gunthorpe , Dave Jiang , Alex Williamson , Jacob Pan , Baolu Lu , Kevin Tian , Dan Williams , Rob Herring Subject: Re: [patch V2 34/46] PCI/MSI: Make arch_.*_msi_irq[s] fallbacks selectable In-Reply-To: <20200827182040.GA2049623@bjorn-Precision-5520> References: <20200827182040.GA2049623@bjorn-Precision-5520> Date: Fri, 28 Aug 2020 20:29:57 +0200 Message-ID: <873646lj2y.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 27 2020 at 13:20, Bjorn Helgaas wrote: > On Wed, Aug 26, 2020 at 01:17:02PM +0200, Thomas Gleixner wrote: >> Make the architectures and drivers which rely on them select them in Kconfig >> and if not selected replace them by stub functions which emit a warning and >> fail the PCI/MSI interrupt allocation. > > Sorry, I really don't understand this, so these are probably stupid > questions. > > If CONFIG_PCI_MSI_ARCH_FALLBACKS is defined, we will supply > implementations of: > > arch_setup_msi_irq > arch_teardown_msi_irq > arch_setup_msi_irqs > arch_teardown_msi_irqs > default_teardown_msi_irqs # non-weak > > You select CONFIG_PCI_MSI_ARCH_FALLBACKS for ia64, mips, powerpc, > s390, sparc, and x86. I see that all of those arches implement at > least one of the functions above. But x86 doesn't and I can't figure > out why it needs to select CONFIG_PCI_MSI_ARCH_FALLBACKS. X86 still has them at that point in the series and the next patch removes them. I wanted to have the warnings in place before doing so. > I assume there's a way to convert these arches to hierarchical irq > domains so they wouldn't need this at all? Is there a sample > conversion to look at? For a quick and dirty step it's pretty much the wrapper I used for XEN and then make sure that the msi_domain pointer is populated is pci_device::device. > And I can't figure out what's special about tegra, rcar, and xilinx > that makes them need it as well. Those are old drivers from the time where ARM did not use hierarchical irq domains and nobody cared to fix them up. > Is there something I could grep for > to identify them? git grep arch_setup_msi_irq git grep arch_teardown_msi_irq > Is there a way to convert them so they don't need it? Sure, it just needs some work and probably hardware to test. Thanks, tglx