From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 70BBBC7EE23 for ; Mon, 27 Feb 2023 02:56:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3Q9Joiyj6qqRC2wctShvf58m5e3icknBEDREJTdvT1o=; b=2eYtlbPgMR01rf NKhu7lExBKro19ci7Ei29Xfklr7FNTc6YjBOFNgh5Uli8nrE+OM0GyEXaFdFsy3zbG2y7qTkAnYSJ LSUrfKq0EMElzoUMZ5lE6+iZo12xqwijEmUaL3hV/F4WDivamVivqEkwTKJjn+omfHl+i1Sr5I4LW lcwAFXxIPHUnQk54V5n78nXjGPczsgUSVkofJehAz2P/jXcNCKI9ZdFp9yBnxZLPcACUCBzSNSJME nCWmAmFXjsq10iZ1WuUQ1oLUsHXbpDe9rhiNdtKfbjSJl81AgXFtbPk9vXkBGXzHEUntCpbDF99G2 clkKfIYCr52tW/5N8Z2w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWTgB-008Jbl-Gf; Mon, 27 Feb 2023 02:55:55 +0000 Received: from todd.t-8ch.de ([159.69.126.157]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWTg7-008JaF-NK for linux-arm-kernel@lists.infradead.org; Mon, 27 Feb 2023 02:55:53 +0000 Date: Mon, 27 Feb 2023 02:55:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=t-8ch.de; s=mail; t=1677466548; bh=s+R+iT0x1iNvvwUvUPl39IwKnJPRvBOzNR/yqTatfOE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=g127leCTLJI90j4qbQYmqcH3Kqg/0M9NoCbLMiFFthSAFmoPKahi9a9+XpyTNCOBw gwbO/NoMW5wL2GziqVMZyP6ECAxs2eQQ6xhrx7jx1v2TfcTHlt4F74SMso6ss5mEnA tMZHkZI6YZXfh29V1bbnmfQG8t152oRc5aBWdfOo= From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Shawn Guo Cc: Catalin Marinas , Will Deacon , Bjorn Helgaas , Maximilian Luz , Lorenzo Pieralisi , linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm64: PCI: Add quirk for platforms running Windows Message-ID: <67eac531-d808-4fc8-b282-754204b4bad0@t-8ch.de> References: <20230227021221.17980-1-shawn.guo@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230227021221.17980-1-shawn.guo@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230226_185551_934554_E936AE55 X-CRM114-Status: GOOD ( 15.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On Mon, Feb 27, 2023 at 10:12:21AM +0800, Shawn Guo wrote: > diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c > index 2276689b5411..896dbd028b67 100644 > --- a/arch/arm64/kernel/pci.c > +++ b/arch/arm64/kernel/pci.c > @@ -109,16 +109,42 @@ int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge) > return 0; > } > > +#define QCOM_DSDT_QUIRK "Host bridge windows in PNP0A03 _CRS" > + > +static struct acpi_platform_list qcom_platlist[] = { ^^^ const > + /* Thinkpad X13s */ > + { "LENOVO", "SDM8280 ", 0, ACPI_SIG_DSDT, all_versions, QCOM_DSDT_QUIRK }, > + /* Microsoft Surface Pro 9 (5G) and Windows Dev Kit 2023 */ > + { "QCOMM ", "SDM8280 ", 0, ACPI_SIG_DSDT, all_versions, QCOM_DSDT_QUIRK }, > + /* Microsoft Surface Pro X */ > + { "QCOMM ", "SDM8180 ", 0, ACPI_SIG_DSDT, all_versions, QCOM_DSDT_QUIRK }, > + { } > +}; > + > static int pci_acpi_root_prepare_resources(struct acpi_pci_root_info *ci) > { > struct resource_entry *entry, *tmp; > int status; > + int idx; > > status = acpi_pci_probe_root_resources(ci); > + > + /* > + * Most arm64 platforms that do not run Windows describe host bridge > + * registers in PNP0A03 _CRS resources, but some like Qualcomm > + * Snapdragon Windows laptops describe host bridge windows in there. > + * We do not want to destroy the resources for these platforms. > + */ > + idx = acpi_match_platform_list(qcom_platlist); > + if (idx >= 0) > + goto done; > + > resource_list_for_each_entry_safe(entry, tmp, &ci->resources) { > if (!(entry->res->flags & IORESOURCE_WINDOW)) > resource_list_destroy_entry(entry); > } > + > +done: > return status; > } > > -- > 2.17.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel