Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp603133yba; Fri, 12 Apr 2019 09:48:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqy7vwep2DXvN7ml0Oe8E/TzSU8/OIZiP5gKCyxI5ua6mW6N5k5e86UGuW93Vp63fnizOnus X-Received: by 2002:aa7:8145:: with SMTP id d5mr57639427pfn.215.1555087719678; Fri, 12 Apr 2019 09:48:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555087719; cv=none; d=google.com; s=arc-20160816; b=FB/owR1FxMvSJFh45Hco2sMr46D+L5xH8NnY3qmHo50XDZLtaOlKugCPwGkuMlSU4M HtxS/wkKLRpCk0Xd43Cp0P9PYxjM9ybMAoqaqmvSDLhjwCSituyifqCXZWrK9H/CIkQU T07SBndU37YILVbwSUbVy9QZXnjHXByVjy5OewqjHdTMq/c4AgL71yH2kPXjRdKBHMyF 7ic9UHT4dBAwRJzWQcDLwE8o8zpVtrQK3LBMDgF/8zPnOrfRLYe1fwCsfL8f22iUxoSB P+4Cp2KskOWepttlKVamlUJtoAFDOSwKCH2/TQlddXEK85vy+k6AwMF7P9tD+Ht+vr4N gWQQ== 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; bh=/lEnwh0wmQNt0ME08k0ZgQN4Ry6Gf8Hys3H5Sop6ccI=; b=nMMo8DxN8cmxoo67lB35mWeQcmnaH23lSOUrdbD+LAsTbhPyTcxEwQUqE7BCzV8x9T IJRrG+Cl/nnKtgIbWFZGz6Q0+ytDJXDfmIjzYLX1prrMU+oEOo1zyxVHuwAzHk/gAUXo UL4/85Aid5CAtI2U9lduh1H5nc2uCMqsojqrhpr8L1v2+E5MwmpqYWa9+LIJiE338EOQ yv4zPlpRJtFH/9XlkTtE99WsgHAtY0pWJ2gqPOOVHCLfUrT9Z874f30nRgqMuzE/r9bE fTmOahLIVTd42pYxCWvcJY8I3aRZGJRki/zoPY7wRDTZYuN2Z7bKoub6EyYDdn+6XBda xpCg== ARC-Authentication-Results: i=1; mx.google.com; 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 e4si17362166plb.107.2019.04.12.09.48.23; Fri, 12 Apr 2019 09:48:39 -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; 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 S1726913AbfDLQqQ (ORCPT + 99 others); Fri, 12 Apr 2019 12:46:16 -0400 Received: from foss.arm.com ([217.140.101.70]:36700 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726327AbfDLQqP (ORCPT ); Fri, 12 Apr 2019 12:46:15 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 01D4D15AB; Fri, 12 Apr 2019 09:46:15 -0700 (PDT) Received: from red-moon (unknown [10.1.197.39]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4F40E3F718; Fri, 12 Apr 2019 09:46:11 -0700 (PDT) Date: Fri, 12 Apr 2019 17:45:34 +0100 From: Lorenzo Pieralisi To: Marc Zyngier Cc: Zeev Zilberman , Hanna Hawa , tsahee@annapurnalabs.com, antoine.tenart@bootlin.com, linux@armlinux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com, rjw@rjwysocki.net, lenb@kernel.org, tglx@linutronix.de, jason@lakedaemon.net, ronenk@amazon.com, dwmw@amazon.co.uk, vaerov@amazon.com, alisaidi@amazon.com, talel@amazon.com, jonnyc@amazon.com, hanochu@amazon.com, barakw@amazon.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Subject: Re: [PATCH 7/7] irqchip/al-msi: Add ACPI support Message-ID: <20190412164534.GA9071@red-moon> References: <1554035733-11827-1-git-send-email-hhhawa@amazon.com> <1554035733-11827-3-git-send-email-hhhawa@amazon.com> <86pnq65v48.wl-marc.zyngier@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 12, 2019 at 01:08:00PM +0100, Marc Zyngier wrote: > Hi Zeev, > > On 04/04/2019 15:45, Zeev Zilberman wrote: > > Hi Marc, > > > > We have considered exposing our interrupt controller both via MADT > > OEM-specific entry and via DSDT. > > We've chosen MADT OEM-specific entry, because it seemed like a > > reasonable placeholder for custom interrupt controller, but we can move > > to DSDT, if this seems like a better way to represent it. > > > > Either way we chose, we'll need to solve the ordering issue of the > > drivers probing. > > The desired order of driver probing in the system, because of the > > dependencies, is: > > GIC -> AL MSIX controller driver -> PCI > > If we keep using MADT, we can't just use IRQCHIP_DECLARE, because there > > is no way we found to control ordering of MADT probing. So, GIC might be > > probed after our driver in this case. > > The reason we used early_initcall, is that the early_initcalls are > > invoked after MADT probing in the system (and before DSDT probing). > > > > If we move to using DSDT we need to solve the ordering problem from > > another direction - make sure that MSIX driver is probed before PCI. > > In the patches that were posted for xgene interrupt controller (and > > weren't accepted) we saw that they proposed to solve the same issue > > by modifying ACPI subsystem code by defining a new type for msi drivers > > and probing them before PCI drivers > > (https://patchwork.ozlabs.org/patch/818771/). > > From the feedback on that patch > > (https://patchwork.ozlabs.org/cover/818767/#1788415) it seemed that > > alternative solution is in the works, > > but we didn't manage to find any followup on this. > > > > We would be glad to hear what you propose for fixing the ordering issue > > and rework the patches accordingly. > > There are multiple issues here, but the main one is that you're trying > to do something that is completely contrary to the ACPI spec by > inventing a new interrupt controller. > > The use case for ACPI is quite simple: you have HW that matches the ACPI > spec, and everything will work out of the box. This means GICv2+GICv2m > or GICv3+ITS. There is zero space for creativity. Now, if you want your > own interrupt controller, the only choice is to stick with DT. That's > the place for weird and wonderful stuff that ACPI cannot support. > > We've been around the block with XGene, and every "solution" was just > utter crap, prone to failure and in the end unmaintainable. Anything > involving an initcall definitely falls into that category. > > I'll let Lorenzo speak his mind as the arm64 ACPI maintainer, but from > an irqchip perspective, I can't see how to support this unless we get > the ACPI spec to support this type of configuration. That's pretty much it, as a matter of fact there is not much we can do, actually it is a problem that {should have been/can be} solved first at ACPI spec level, every kludge we put together to fix eg Xgene ended up having implicit dependencies/requirements on firmware that are non-existing from an ACPI spec binding perspective (eg DSDT objects ordering). It is not a kernel problem, however we put it, we can't guess an IRQ controllers dependency that can't be described. Lorenzo