Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp3201089lqo; Wed, 15 May 2024 02:48:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXejRyLN6Ti1zJfUK8idt/6DPBqunZKYrj0i/WZbo9zkeggfAfttVqMN3XgDgJcYaOdIh/7+u4zT9wM31G0P351LTaLOrUZC4Kzyx2ycA== X-Google-Smtp-Source: AGHT+IF8Jw56yWyIzEC14AYjxDocgBzKWP9PHYtq/+M3LtwTY9KZwCwqySbpgw+jolaS43+G9w1m X-Received: by 2002:a05:6830:1217:b0:6f0:37af:bf10 with SMTP id 46e09a7af769-6f0e90f582emr19076721a34.3.1715766525923; Wed, 15 May 2024 02:48:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715766525; cv=pass; d=google.com; s=arc-20160816; b=UoKVct4iDDZbJspXDjl2ILaK4R9cEFyMxPBVf2mY8J3J2moHZFbuo2L4lyowdGYP2n rrnTksZhecowJhicEBKzX7934FXKUCiC0LPUTdJn+/VT9bMBydXuoBXH3wKM6bK0CXXz n3UIG2FHhRX9hpbAVaki+UcOlNqoXs45kGQZZg3LRLN0tPhwoH0eZ0bJS+QiB6aNECQW IJ1V+d1An+IDyMXyOrmbxFQ3VC2mf+cjux8OThynNU1/LmGH85v+KUaG4dKwKAb/ZnD7 xoGmuRUo2guAjGlNtFOlmnerwWikyQB6j5Rp+60HrGpwkoEnewSs6Fc1e4aJqv1wzKKA dk7A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature:dkim-filter; bh=RP6KAOAdizMehQEBvNjNqD2oKi1HizOL3blKYGvIfEU=; fh=nItzodgaC7qz4Eaw0dzaNmkWRdpPt+qoiUUmiIHfWAk=; b=N+D4Ay6auT9+VcoLA6iMkMfzMwwqP8XTYWIu+FRJ4TN7yoUpOeNjzjXuKP5RdeVWgQ ltReuOE1bLilpsTRf4WZiXnwKv4QEyprUgy7v801M4Tjf0a3dKICrvbkrwvHhYnc1CNr +UrADgCGqzeJsJTOaxgFiwJD7knBmUcK+7UVuv/e0KSVaTdaL06J0J0xFfmHo8w4Myvv Fpq6q9IRDx3idU1f19IEmXFHsnSZ/40ZM0N7FXl/kLWu4StCBSNrsJ6v+MwU9WjGG+EG HNGxwhJGbcybNi/D6t+Ns1k8Wo16/bbx5nIxrtJbHqS6kPJz86u58hb2GluK3wx/a1cr sQAw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=sbsC2YkB; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-179722-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179722-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-64f0a8e4a08si2676825a12.534.2024.05.15.02.48.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 02:48:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179722-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=sbsC2YkB; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-179722-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179722-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5A2FF2835AA for ; Wed, 15 May 2024 09:48:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B21FB5CDF2; Wed, 15 May 2024 09:48:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="sbsC2YkB" Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 856331DFFD; Wed, 15 May 2024 09:48:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715766501; cv=none; b=LGDa+XMBs2ZNoY51t1yKqJZH02JCW9OBgtc9QR4UX03+KPKoSzjOW582jj8xGF6RLR9cKk3oN9DM65oYbubS32HCkZEva5L8XO3f8XdqmyVzWI/RfJzujwbjdjiAk6Meew7yDoPSD+X/ajAGfK4/bPkPceY9zf5zJMws9pStJZc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715766501; c=relaxed/simple; bh=DWMXLBoPPceddodR+n4Z64JB4Nh2VGdGGIpJtZw0Vks=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZEWB+RRS03Eck9wUGbJxa9gmpVRootmyoekgi0wUudAFLAY37onHzxWijnN4m5dHg6de3qnJOb/a7hPzHxFVIWbOwNN+IW6wRSfrlQyWax51uzycll9l1+P/wfpjgRbVDaC23hk2L3r+pf/vBgYGKeO7XNRpW++RUM3HivjpvN8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=sbsC2YkB; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Received: by linux.microsoft.com (Postfix, from userid 1127) id 1FB0C20B2C82; Wed, 15 May 2024 02:48:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1FB0C20B2C82 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1715766500; bh=RP6KAOAdizMehQEBvNjNqD2oKi1HizOL3blKYGvIfEU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sbsC2YkBDl7aC0npjPyjeCm95s6BBpPfjSk3E8X2TeZQwS5J2/1yIFjgCGxnuSsQU ujq0fSAdTMPJl9hvAwZKYr7KhdPGT5h9ZJ2fjwT1quUd4+zKqBhr4WqcGAXGW+8ssf V+qbxOCk4LCO5W6A63L+E2x2aTAL6PjVkGTAiqDw= Date: Wed, 15 May 2024 02:48:20 -0700 From: Saurabh Singh Sengar To: Roman Kisel Cc: arnd@arndb.de, bhelgaas@google.com, bp@alien8.de, catalin.marinas@arm.com, dave.hansen@linux.intel.com, decui@microsoft.com, haiyangz@microsoft.com, hpa@zytor.com, kw@linux.com, kys@microsoft.com, lenb@kernel.org, lpieralisi@kernel.org, mingo@redhat.com, mhklinux@outlook.com, rafael@kernel.org, robh@kernel.org, tglx@linutronix.de, wei.liu@kernel.org, will@kernel.org, linux-acpi@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, x86@kernel.org, ssengar@microsoft.com, sunilmut@microsoft.com, vdso@hexbites.dev Subject: Re: [PATCH v2 6/6] drivers/pci/hyperv/arm64: vPCI MSI IRQ domain from DT Message-ID: <20240515094820.GB22844@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20240514224508.212318-1-romank@linux.microsoft.com> <20240514224508.212318-7-romank@linux.microsoft.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240514224508.212318-7-romank@linux.microsoft.com> User-Agent: Mutt/1.5.21 (2010-09-15) On Tue, May 14, 2024 at 03:43:53PM -0700, Roman Kisel wrote: > The hyperv-pci driver uses ACPI for MSI IRQ domain configuration > on arm64 thereby it won't be able to do that in the VTL mode where > only DeviceTree can be used. > > Update the hyperv-pci driver to discover interrupt configuration > via DeviceTree. Subject prefix should be "PCI: hv:" > > Signed-off-by: Roman Kisel > --- > drivers/pci/controller/pci-hyperv.c | 13 ++++++++++--- > include/linux/acpi.h | 9 +++++++++ > 2 files changed, 19 insertions(+), 3 deletions(-) > > diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c > index 1eaffff40b8d..ccc2b54206f4 100644 > --- a/drivers/pci/controller/pci-hyperv.c > +++ b/drivers/pci/controller/pci-hyperv.c > @@ -906,9 +906,16 @@ static int hv_pci_irqchip_init(void) > * way to ensure that all the corresponding devices are also gone and > * no interrupts will be generated. > */ > - hv_msi_gic_irq_domain = acpi_irq_create_hierarchy(0, HV_PCI_MSI_SPI_NR, > - fn, &hv_pci_domain_ops, > - chip_data); > + if (acpi_disabled) > + hv_msi_gic_irq_domain = irq_domain_create_hierarchy( > + irq_find_matching_fwnode(fn, DOMAIN_BUS_ANY), > + 0, HV_PCI_MSI_SPI_NR, > + fn, &hv_pci_domain_ops, > + chip_data); > + else > + hv_msi_gic_irq_domain = acpi_irq_create_hierarchy(0, HV_PCI_MSI_SPI_NR, > + fn, &hv_pci_domain_ops, > + chip_data); Upto 100 characters per line are supported now, we can have less line breaks. > > if (!hv_msi_gic_irq_domain) { > pr_err("Failed to create Hyper-V arm64 vPCI MSI IRQ domain\n"); > diff --git a/include/linux/acpi.h b/include/linux/acpi.h > index b7165e52b3c6..498cbb2c40a1 100644 > --- a/include/linux/acpi.h > +++ b/include/linux/acpi.h > @@ -1077,6 +1077,15 @@ static inline bool acpi_sleep_state_supported(u8 sleep_state) > return false; > } > > +static inline struct irq_domain *acpi_irq_create_hierarchy(unsigned int flags, > + unsigned int size, > + struct fwnode_handle *fwnode, > + const struct irq_domain_ops *ops, > + void *host_data) > +{ > + return NULL; > +} > + > #endif /* !CONFIG_ACPI */ > > extern void arch_post_acpi_subsys_init(void); > -- > 2.45.0 >