From: Bjorn Helgaas <helgaas@kernel.org>
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>,
Bjorn Andersson <quic_bjorande@quicinc.com>,
linux-arm-msm@vger.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: Thu, 9 Mar 2023 11:38:36 -0600 [thread overview]
Message-ID: <20230309173836.GA1148798@bhelgaas> (raw)
In-Reply-To: <20230309025212.GB18319@T480>
On Thu, Mar 09, 2023 at 10:52:13AM +0800, Shawn Guo wrote:
> + linux-arm-msm and MSM maintainer Bjorn
>
> On Wed, Mar 08, 2023 at 12:53:10PM -0600, Bjorn Helgaas wrote:
> > On Mon, Feb 27, 2023 at 10:12:21AM +0800, Shawn Guo wrote:
> > > Commit 8fd4391ee717 ("arm64: PCI: Exclude ACPI "consumer" resources from
> > > host bridge windows") introduced a check to remove host bridge register
> > > resources for all arm64 platforms, with the assumption that the PNP0A03
> > > _CRS resources would always be host bridge registers and never as windows
> > > on arm64.
> > >
> > > The assumption stands true until Qualcomm Snapdragon Windows laptops
> > > emerge. These laptops describe host bridge windows in PNP0A03 _CRS
> > > resources instead. For example, the Microsoft Surface Pro X has host
> > > bridges defined as
> > >
> > > Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */) // _HID: Hardware ID
> > > Name (_CID, EisaId ("PNP0A03") /* PCI Bus */) // _CID: Compatible ID
> > >
> > > Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings
> > > {
> > > Name (RBUF, ResourceTemplate ()
> > > {
> > > Memory32Fixed (ReadWrite,
> > > 0x60200000, // Address Base
> > > 0x01DF0000, // Address Length
> > > )
> > > WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
> > > 0x0000, // Granularity
> > > 0x0000, // Range Minimum
> > > 0x0001, // Range Maximum
> > > 0x0000, // Translation Offset
> > > 0x0002, // Length
> > > ,, )
> > > })
> > > Return (RBUF) /* \_SB_.PCI0._CRS.RBUF */
> > > }
> > >
> > > The Memory32Fixed holds a host bridge window, but it's not properly
> > > defined as a "producer" resource. Consequently the resource gets
> > > removed by kernel, and the BAR allocation fails later on:
> > >
> > > [ 0.150731] pci 0002:00:00.0: BAR 14: no space for [mem size 0x00100000]
> > > [ 0.150744] pci 0002:00:00.0: BAR 14: failed to assign [mem size 0x00100000]
> > > [ 0.150758] pci 0002:01:00.0: BAR 0: no space for [mem size 0x00004000 64bit]
> > > [ 0.150769] pci 0002:01:00.0: BAR 0: failed to assign [mem size 0x00004000 64bit]
> > >
> > > This eventually prevents the PCIe NVME drive from being accessible.
> > >
> > > Add a quirk for these platforms to avoid the resource being removed.
> > >
> > > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > > ---
> > > We are running into the issue on more devices than just Surface Pro X
> > > now, so trying to sort it out with a quirk as suggested by Lorenzo [1].
> >
> > One thing I don't like about this application of quirks is that the
> > list of affected platforms is likely to grow, which is an ongoing
> > burden for users and developers.
>
> It's a very reasonable concern. I really hope that Qualcomm will start
> thinking about Linux support on these machines in the future not too far
> away, so that the list will not grow too long.
>
> > Can we have a conversation with Qualcomm about how they *intend* this
> > to work? Linux is probably doing something wrong (interpreting
> > something differently than Windows does), and if we could fix that, we
> > have a better chance of future platforms working without quirks.
>
> Today Qualcomm only ships and cares about Windows on these machines, but
> I believe it will change sooner or later.
I don't maintain arch/arm64/kernel/pci.c, but my opinion is that we
should not pursue quirks like this until we've tried really hard to
figure out a generic approach.
Bjorn
WARNING: multiple messages have this Message-ID (diff)
From: Bjorn Helgaas <helgaas@kernel.org>
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>,
Bjorn Andersson <quic_bjorande@quicinc.com>,
linux-arm-msm@vger.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: Thu, 9 Mar 2023 11:38:36 -0600 [thread overview]
Message-ID: <20230309173836.GA1148798@bhelgaas> (raw)
In-Reply-To: <20230309025212.GB18319@T480>
On Thu, Mar 09, 2023 at 10:52:13AM +0800, Shawn Guo wrote:
> + linux-arm-msm and MSM maintainer Bjorn
>
> On Wed, Mar 08, 2023 at 12:53:10PM -0600, Bjorn Helgaas wrote:
> > On Mon, Feb 27, 2023 at 10:12:21AM +0800, Shawn Guo wrote:
> > > Commit 8fd4391ee717 ("arm64: PCI: Exclude ACPI "consumer" resources from
> > > host bridge windows") introduced a check to remove host bridge register
> > > resources for all arm64 platforms, with the assumption that the PNP0A03
> > > _CRS resources would always be host bridge registers and never as windows
> > > on arm64.
> > >
> > > The assumption stands true until Qualcomm Snapdragon Windows laptops
> > > emerge. These laptops describe host bridge windows in PNP0A03 _CRS
> > > resources instead. For example, the Microsoft Surface Pro X has host
> > > bridges defined as
> > >
> > > Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */) // _HID: Hardware ID
> > > Name (_CID, EisaId ("PNP0A03") /* PCI Bus */) // _CID: Compatible ID
> > >
> > > Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings
> > > {
> > > Name (RBUF, ResourceTemplate ()
> > > {
> > > Memory32Fixed (ReadWrite,
> > > 0x60200000, // Address Base
> > > 0x01DF0000, // Address Length
> > > )
> > > WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
> > > 0x0000, // Granularity
> > > 0x0000, // Range Minimum
> > > 0x0001, // Range Maximum
> > > 0x0000, // Translation Offset
> > > 0x0002, // Length
> > > ,, )
> > > })
> > > Return (RBUF) /* \_SB_.PCI0._CRS.RBUF */
> > > }
> > >
> > > The Memory32Fixed holds a host bridge window, but it's not properly
> > > defined as a "producer" resource. Consequently the resource gets
> > > removed by kernel, and the BAR allocation fails later on:
> > >
> > > [ 0.150731] pci 0002:00:00.0: BAR 14: no space for [mem size 0x00100000]
> > > [ 0.150744] pci 0002:00:00.0: BAR 14: failed to assign [mem size 0x00100000]
> > > [ 0.150758] pci 0002:01:00.0: BAR 0: no space for [mem size 0x00004000 64bit]
> > > [ 0.150769] pci 0002:01:00.0: BAR 0: failed to assign [mem size 0x00004000 64bit]
> > >
> > > This eventually prevents the PCIe NVME drive from being accessible.
> > >
> > > Add a quirk for these platforms to avoid the resource being removed.
> > >
> > > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > > ---
> > > We are running into the issue on more devices than just Surface Pro X
> > > now, so trying to sort it out with a quirk as suggested by Lorenzo [1].
> >
> > One thing I don't like about this application of quirks is that the
> > list of affected platforms is likely to grow, which is an ongoing
> > burden for users and developers.
>
> It's a very reasonable concern. I really hope that Qualcomm will start
> thinking about Linux support on these machines in the future not too far
> away, so that the list will not grow too long.
>
> > Can we have a conversation with Qualcomm about how they *intend* this
> > to work? Linux is probably doing something wrong (interpreting
> > something differently than Windows does), and if we could fix that, we
> > have a better chance of future platforms working without quirks.
>
> Today Qualcomm only ships and cares about Windows on these machines, but
> I believe it will change sooner or later.
I don't maintain arch/arm64/kernel/pci.c, but my opinion is that we
should not pursue quirks like this until we've tried really hard to
figure out a generic approach.
Bjorn
_______________________________________________
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-03-09 17:38 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
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 [this message]
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=20230309173836.GA1148798@bhelgaas \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=catalin.marinas@arm.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=luzmaximilian@gmail.com \
--cc=quic_bjorande@quicinc.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.