From: "Thomas Weißschuh" <thomas@t-8ch.de>
To: Shawn Guo <shawn.guo@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Maximilian Luz <luzmaximilian@gmail.com>,
Lorenzo Pieralisi <lpieralisi@kernel.org>,
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
Date: Mon, 27 Feb 2023 02:55:45 +0000 [thread overview]
Message-ID: <67eac531-d808-4fc8-b282-754204b4bad0@t-8ch.de> (raw)
In-Reply-To: <20230227021221.17980-1-shawn.guo@linaro.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
>
WARNING: multiple messages have this Message-ID (diff)
From: "Thomas Weißschuh" <thomas@t-8ch.de>
To: Shawn Guo <shawn.guo@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Maximilian Luz <luzmaximilian@gmail.com>,
Lorenzo Pieralisi <lpieralisi@kernel.org>,
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
Date: Mon, 27 Feb 2023 02:55:45 +0000 [thread overview]
Message-ID: <67eac531-d808-4fc8-b282-754204b4bad0@t-8ch.de> (raw)
In-Reply-To: <20230227021221.17980-1-shawn.guo@linaro.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
next prev parent reply other threads:[~2023-02-27 2:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-27 2:12 [PATCH] arm64: PCI: Add quirk for platforms running Windows Shawn Guo
2023-02-27 2:12 ` Shawn Guo
2023-02-27 2:55 ` Thomas Weißschuh [this message]
2023-02-27 2:55 ` Thomas Weißschuh
2023-03-08 18:53 ` Bjorn Helgaas
2023-03-08 18:53 ` Bjorn Helgaas
2023-03-09 2:52 ` Shawn Guo
2023-03-09 2:52 ` Shawn Guo
2023-03-09 17:38 ` Bjorn Helgaas
2023-03-09 17:38 ` Bjorn Helgaas
2023-03-10 13:26 ` Lorenzo Pieralisi
2023-03-10 13:26 ` Lorenzo Pieralisi
2023-03-10 23:05 ` Bjorn Helgaas
2023-03-10 23:05 ` Bjorn Helgaas
2023-03-14 8:53 ` Lorenzo Pieralisi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=67eac531-d808-4fc8-b282-754204b4bad0@t-8ch.de \
--to=thomas@t-8ch.de \
--cc=bhelgaas@google.com \
--cc=catalin.marinas@arm.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=luzmaximilian@gmail.com \
--cc=shawn.guo@linaro.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.