Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp444921yba; Fri, 26 Apr 2019 02:57:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqxAdYLHXAnHG+B58y6mvtYloa4TfdC9WPwQvh1LnjSzwvNkVIorWUsRJYqb+uPBZ1BrucOg X-Received: by 2002:a17:902:266:: with SMTP id 93mr45170148plc.201.1556272621577; Fri, 26 Apr 2019 02:57:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556272621; cv=none; d=google.com; s=arc-20160816; b=QlLML1fnfzwjGK6ZMw7qyffPa3oYhQ8ud8pwsoGt/k60iu203RUrlmxpLjd1Bdx/q2 veSEhyNJR9KMiS8o/KGPTCLUaFm4lNE4+yokwvojpq+urKFW9O9fdldKcRG5e2W/tAZM M7Ub//+/GP2HPF7BWNsWQxlxN3NwNpqlzHYw1eQ2JS4ssep/4TBynI2+gsMTYMO9pKUH j7qZK/qeiTDDquRgh/RYEbmhtqN9rdZIAg7FWv5dAUyfC2Qn7umAK5mnjhseOmMWKjGr HRAndAdPw6/4sN8rJO17uGulD3QKdvlNpG6eFsfEqWNAJlZjJJb62Q+R/9aq0BjJ6Vw2 NSrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=lO9szt/ZVyjdGPU0A9ic8+kK3omYx2dR6UCLj4ma8EY=; b=yalPNExuEX6hq0C9z9S8hbky2gMjfp5GiZdRlgLk1T+dBJ2Z5uPdhnDmMCQcSNnQSe e8dNHUQ0igLlctDjtkwcVOyWeilF0+VUTu8pNNfqQSYTWxMUNHVLxEmlLfWpd7TLzK0J 8dHchkfRhJpBN+HSoyj9YPx6hPyaJMjeUvSJZ8G3sLi0+gX4+TfziihLW74lHGpCpGlP 2vLqsYIeRXf0pf1KJPTqSPmHefWhQJx4udMrbqlTCeccaCwJD0Dobjd/vbtMsb9r9O4Z cGk8+scyyyuILJ6WJgq94z1j8A6KxB5DOBa1WNLerRz2hT81Y90reAbJD9g0XDVQ+yce cqiw== 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 o6si25188591plh.186.2019.04.26.02.56.45; Fri, 26 Apr 2019 02:57:01 -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 S1726308AbfDZJz4 (ORCPT + 99 others); Fri, 26 Apr 2019 05:55:56 -0400 Received: from zulu616.server4you.de ([188.138.100.120]:59572 "EHLO zulu616.server4you.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725901AbfDZJz4 (ORCPT ); Fri, 26 Apr 2019 05:55:56 -0400 X-Greylist: delayed 406 seconds by postgrey-1.27 at vger.kernel.org; Fri, 26 Apr 2019 05:55:55 EDT Received: from macbook-2.local (x4d092da9.dyn.telefonica.de [77.9.45.169]) by csgraf.de (Postfix) with ESMTPSA id C037439003CF; Fri, 26 Apr 2019 11:49:06 +0200 (CEST) Subject: Re: [PATCH 7/7] irqchip/al-msi: Add ACPI support To: Marc Zyngier , Zeev Zilberman , Hanna Hawa Cc: 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, Lorenzo Pieralisi 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> From: Alexander Graf Message-ID: Date: Fri, 26 Apr 2019 11:49:06 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12.04.19 14:08, 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. I've had a quick chat about this with Marc at Linaro Connect and there might be a 3rd viable option: Create a standard ACPI binding for GICv3+MBI (akin to GICv2m) and use that. Zeev, Hanna, what exactly is the reason you need to use your own MSI translation engine here? Can't you just reuse the GICv3 built-in one? After all, I would assume that your PCIe complex is able to send DMA requests to external devices? If you could, we could start working towards an ACPI definition for that instead and make everyone happy. Alex