All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Peter Geis <pgwipeout@gmail.com>
Cc: Lucas Tanure <lucas.tanure@collabora.com>,
	Vinod Koul <vkoul@kernel.org>,
	Kishon Vijay Abraham I <kishon@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Heiko Stuebner <heiko@sntech.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Krzysztof Wilczynski <kw@linux.com>,
	Bjorn Helgaas <bhelgaas@google.com>, Qu Wenruo <wqu@suse.com>,
	Piotr Oniszczuk <piotr.oniszczuk@gmail.com>,
	Kever Yang <kever.yang@rock-chips.com>,
	linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org, kernel@collabora.com,
	Robin Murphy <robin.murphy@arm.com>
Subject: Re: [PATCH 1/7] irqchip/gic-v3: Add a DMA Non-Coherent flag
Date: Fri, 10 Mar 2023 12:12:01 +0000	[thread overview]
Message-ID: <86ttysyfe6.wl-maz@kernel.org> (raw)
In-Reply-To: <CAMdYzYo5FW6NT8zj8+4meAV-HVve+rVYybibVHy4GONC_PJ-6Q@mail.gmail.com>

On Fri, 10 Mar 2023 12:04:16 +0000,
Peter Geis <pgwipeout@gmail.com> wrote:
> 
> On Fri, Mar 10, 2023 at 6:57 AM Marc Zyngier <maz@kernel.org> wrote:
> >
> > On Fri, 10 Mar 2023 11:41:46 +0000,
> > Peter Geis <pgwipeout@gmail.com> wrote:
> > >
> > > On Fri, Mar 10, 2023 at 3:05 AM Lucas Tanure <lucas.tanure@collabora.com> wrote:
> > > >
> > > > The GIC600 integration in RK356x, used in rk3588, doesn't support
> > > > any of the shareability or cacheability attributes, and requires
> > > > both values to be set to 0b00 for all the ITS and Redistributor
> > > > tables.
> > > >
> > > > This is loosely based on prior work from XiaoDong Huang and
> > > > Peter Geis fixing this issue specifically for Rockchip 356x.
> > >
> > > Good Morning,
> > >
> > > Since the gic is using dma, would it be reasonable to have all memory
> > > allocations be requested with the GFP_DMA flag? Otherwise this doesn't
> > > fully solve the problem for rk356x, where only the lower 4GB range is
> > > DMA capable, but this tends to get allocated in the upper 4GB on 8GB
> > > boards.
> >
> > That's an erratum. Please treat as such.
> 
> Good Morning,
> 
> Yes, believe me I'm fully aware of how broken rk356x is. I'm asking an
> educational question from a kernel standards point of view, absent the
> rk356x issues. Would it be reasonable that since the gic uses dma
> memory, allocations for the gic should be made with the GFP_DMA flag?
> Or is that a misuse of the flag?

As Robin points out in another part of the thread, the right fix would
be to convert the ITS as a pure platform driver and handle the probing
dependencies that this would generate. Then you can start making us of
the DMA allocator and of the firmware description of what ranges are
reachable from the GIC (although this isn't strictly the ITS, but
also the redistributors).

We're in a better place for this now than we were a few years ago, but
this is still a sizeable amount of work.

If someone is motivated enough, they can have a go at it.

	M.

-- 
Without deviation from the norm, progress is not possible.

WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Peter Geis <pgwipeout@gmail.com>
Cc: Lucas Tanure <lucas.tanure@collabora.com>,
	Vinod Koul <vkoul@kernel.org>,
	Kishon Vijay Abraham I <kishon@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Heiko Stuebner <heiko@sntech.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Krzysztof Wilczynski <kw@linux.com>,
	Bjorn Helgaas <bhelgaas@google.com>, Qu Wenruo <wqu@suse.com>,
	Piotr Oniszczuk <piotr.oniszczuk@gmail.com>,
	Kever Yang <kever.yang@rock-chips.com>,
	linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org, kernel@collabora.com,
	Robin Murphy <robin.murphy@arm.com>
Subject: Re: [PATCH 1/7] irqchip/gic-v3: Add a DMA Non-Coherent flag
Date: Fri, 10 Mar 2023 12:12:01 +0000	[thread overview]
Message-ID: <86ttysyfe6.wl-maz@kernel.org> (raw)
In-Reply-To: <CAMdYzYo5FW6NT8zj8+4meAV-HVve+rVYybibVHy4GONC_PJ-6Q@mail.gmail.com>

On Fri, 10 Mar 2023 12:04:16 +0000,
Peter Geis <pgwipeout@gmail.com> wrote:
> 
> On Fri, Mar 10, 2023 at 6:57 AM Marc Zyngier <maz@kernel.org> wrote:
> >
> > On Fri, 10 Mar 2023 11:41:46 +0000,
> > Peter Geis <pgwipeout@gmail.com> wrote:
> > >
> > > On Fri, Mar 10, 2023 at 3:05 AM Lucas Tanure <lucas.tanure@collabora.com> wrote:
> > > >
> > > > The GIC600 integration in RK356x, used in rk3588, doesn't support
> > > > any of the shareability or cacheability attributes, and requires
> > > > both values to be set to 0b00 for all the ITS and Redistributor
> > > > tables.
> > > >
> > > > This is loosely based on prior work from XiaoDong Huang and
> > > > Peter Geis fixing this issue specifically for Rockchip 356x.
> > >
> > > Good Morning,
> > >
> > > Since the gic is using dma, would it be reasonable to have all memory
> > > allocations be requested with the GFP_DMA flag? Otherwise this doesn't
> > > fully solve the problem for rk356x, where only the lower 4GB range is
> > > DMA capable, but this tends to get allocated in the upper 4GB on 8GB
> > > boards.
> >
> > That's an erratum. Please treat as such.
> 
> Good Morning,
> 
> Yes, believe me I'm fully aware of how broken rk356x is. I'm asking an
> educational question from a kernel standards point of view, absent the
> rk356x issues. Would it be reasonable that since the gic uses dma
> memory, allocations for the gic should be made with the GFP_DMA flag?
> Or is that a misuse of the flag?

As Robin points out in another part of the thread, the right fix would
be to convert the ITS as a pure platform driver and handle the probing
dependencies that this would generate. Then you can start making us of
the DMA allocator and of the firmware description of what ranges are
reachable from the GIC (although this isn't strictly the ITS, but
also the redistributors).

We're in a better place for this now than we were a few years ago, but
this is still a sizeable amount of work.

If someone is motivated enough, they can have a go at it.

	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Peter Geis <pgwipeout@gmail.com>
Cc: Lucas Tanure <lucas.tanure@collabora.com>,
	Vinod Koul <vkoul@kernel.org>,
	Kishon Vijay Abraham I <kishon@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Heiko Stuebner <heiko@sntech.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Krzysztof Wilczynski <kw@linux.com>,
	Bjorn Helgaas <bhelgaas@google.com>, Qu Wenruo <wqu@suse.com>,
	Piotr Oniszczuk <piotr.oniszczuk@gmail.com>,
	Kever Yang <kever.yang@rock-chips.com>,
	linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org, kernel@collabora.com,
	Robin Murphy <robin.murphy@arm.com>
Subject: Re: [PATCH 1/7] irqchip/gic-v3: Add a DMA Non-Coherent flag
Date: Fri, 10 Mar 2023 12:12:01 +0000	[thread overview]
Message-ID: <86ttysyfe6.wl-maz@kernel.org> (raw)
In-Reply-To: <CAMdYzYo5FW6NT8zj8+4meAV-HVve+rVYybibVHy4GONC_PJ-6Q@mail.gmail.com>

On Fri, 10 Mar 2023 12:04:16 +0000,
Peter Geis <pgwipeout@gmail.com> wrote:
> 
> On Fri, Mar 10, 2023 at 6:57 AM Marc Zyngier <maz@kernel.org> wrote:
> >
> > On Fri, 10 Mar 2023 11:41:46 +0000,
> > Peter Geis <pgwipeout@gmail.com> wrote:
> > >
> > > On Fri, Mar 10, 2023 at 3:05 AM Lucas Tanure <lucas.tanure@collabora.com> wrote:
> > > >
> > > > The GIC600 integration in RK356x, used in rk3588, doesn't support
> > > > any of the shareability or cacheability attributes, and requires
> > > > both values to be set to 0b00 for all the ITS and Redistributor
> > > > tables.
> > > >
> > > > This is loosely based on prior work from XiaoDong Huang and
> > > > Peter Geis fixing this issue specifically for Rockchip 356x.
> > >
> > > Good Morning,
> > >
> > > Since the gic is using dma, would it be reasonable to have all memory
> > > allocations be requested with the GFP_DMA flag? Otherwise this doesn't
> > > fully solve the problem for rk356x, where only the lower 4GB range is
> > > DMA capable, but this tends to get allocated in the upper 4GB on 8GB
> > > boards.
> >
> > That's an erratum. Please treat as such.
> 
> Good Morning,
> 
> Yes, believe me I'm fully aware of how broken rk356x is. I'm asking an
> educational question from a kernel standards point of view, absent the
> rk356x issues. Would it be reasonable that since the gic uses dma
> memory, allocations for the gic should be made with the GFP_DMA flag?
> Or is that a misuse of the flag?

As Robin points out in another part of the thread, the right fix would
be to convert the ITS as a pure platform driver and handle the probing
dependencies that this would generate. Then you can start making us of
the DMA allocator and of the firmware description of what ranges are
reachable from the GIC (although this isn't strictly the ITS, but
also the redistributors).

We're in a better place for this now than we were a few years ago, but
this is still a sizeable amount of work.

If someone is motivated enough, they can have a go at it.

	M.

-- 
Without deviation from the norm, progress is not possible.

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Peter Geis <pgwipeout@gmail.com>
Cc: Lucas Tanure <lucas.tanure@collabora.com>,
	Vinod Koul <vkoul@kernel.org>,
	Kishon Vijay Abraham I <kishon@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Heiko Stuebner <heiko@sntech.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Krzysztof Wilczynski <kw@linux.com>,
	Bjorn Helgaas <bhelgaas@google.com>, Qu Wenruo <wqu@suse.com>,
	Piotr Oniszczuk <piotr.oniszczuk@gmail.com>,
	Kever Yang <kever.yang@rock-chips.com>,
	linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org, kernel@collabora.com,
	Robin Murphy <robin.murphy@arm.com>
Subject: Re: [PATCH 1/7] irqchip/gic-v3: Add a DMA Non-Coherent flag
Date: Fri, 10 Mar 2023 12:12:01 +0000	[thread overview]
Message-ID: <86ttysyfe6.wl-maz@kernel.org> (raw)
In-Reply-To: <CAMdYzYo5FW6NT8zj8+4meAV-HVve+rVYybibVHy4GONC_PJ-6Q@mail.gmail.com>

On Fri, 10 Mar 2023 12:04:16 +0000,
Peter Geis <pgwipeout@gmail.com> wrote:
> 
> On Fri, Mar 10, 2023 at 6:57 AM Marc Zyngier <maz@kernel.org> wrote:
> >
> > On Fri, 10 Mar 2023 11:41:46 +0000,
> > Peter Geis <pgwipeout@gmail.com> wrote:
> > >
> > > On Fri, Mar 10, 2023 at 3:05 AM Lucas Tanure <lucas.tanure@collabora.com> wrote:
> > > >
> > > > The GIC600 integration in RK356x, used in rk3588, doesn't support
> > > > any of the shareability or cacheability attributes, and requires
> > > > both values to be set to 0b00 for all the ITS and Redistributor
> > > > tables.
> > > >
> > > > This is loosely based on prior work from XiaoDong Huang and
> > > > Peter Geis fixing this issue specifically for Rockchip 356x.
> > >
> > > Good Morning,
> > >
> > > Since the gic is using dma, would it be reasonable to have all memory
> > > allocations be requested with the GFP_DMA flag? Otherwise this doesn't
> > > fully solve the problem for rk356x, where only the lower 4GB range is
> > > DMA capable, but this tends to get allocated in the upper 4GB on 8GB
> > > boards.
> >
> > That's an erratum. Please treat as such.
> 
> Good Morning,
> 
> Yes, believe me I'm fully aware of how broken rk356x is. I'm asking an
> educational question from a kernel standards point of view, absent the
> rk356x issues. Would it be reasonable that since the gic uses dma
> memory, allocations for the gic should be made with the GFP_DMA flag?
> Or is that a misuse of the flag?

As Robin points out in another part of the thread, the right fix would
be to convert the ITS as a pure platform driver and handle the probing
dependencies that this would generate. Then you can start making us of
the DMA allocator and of the firmware description of what ranges are
reachable from the GIC (although this isn't strictly the ITS, but
also the redistributors).

We're in a better place for this now than we were a few years ago, but
this is still a sizeable amount of work.

If someone is motivated enough, they can have a go at it.

	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-03-10 12:12 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10  8:05 [PATCH 0/7] Add PCIe2 support for Rockchip Boards Lucas Tanure
2023-03-10  8:05 ` Lucas Tanure
2023-03-10  8:05 ` Lucas Tanure
2023-03-10  8:05 ` Lucas Tanure
2023-03-10  8:05 ` [PATCH 1/7] irqchip/gic-v3: Add a DMA Non-Coherent flag Lucas Tanure
2023-03-10  8:05   ` Lucas Tanure
2023-03-10  8:05   ` Lucas Tanure
2023-03-10  8:05   ` Lucas Tanure
2023-03-10  8:56   ` Marc Zyngier
2023-03-10  8:56     ` Marc Zyngier
2023-03-10  8:56     ` Marc Zyngier
2023-03-10  8:56     ` Marc Zyngier
2023-03-10  9:53     ` Lucas Tanure
2023-03-10  9:53       ` Lucas Tanure
2023-03-10  9:53       ` Lucas Tanure
2023-03-10  9:53       ` Lucas Tanure
2023-03-10 10:44       ` Marc Zyngier
2023-03-10 10:44         ` Marc Zyngier
2023-03-10 10:44         ` Marc Zyngier
2023-03-10 10:44         ` Marc Zyngier
2023-03-10 11:41   ` Peter Geis
2023-03-10 11:41     ` Peter Geis
2023-03-10 11:41     ` Peter Geis
2023-03-10 11:41     ` Peter Geis
2023-03-10 11:56     ` Marc Zyngier
2023-03-10 11:56       ` Marc Zyngier
2023-03-10 11:56       ` Marc Zyngier
2023-03-10 11:56       ` Marc Zyngier
2023-03-10 12:04       ` Peter Geis
2023-03-10 12:04         ` Peter Geis
2023-03-10 12:04         ` Peter Geis
2023-03-10 12:04         ` Peter Geis
2023-03-10 12:12         ` Marc Zyngier [this message]
2023-03-10 12:12           ` Marc Zyngier
2023-03-10 12:12           ` Marc Zyngier
2023-03-10 12:12           ` Marc Zyngier
2023-03-10 12:04     ` Robin Murphy
2023-03-10 12:04       ` Robin Murphy
2023-03-10 12:04       ` Robin Murphy
2023-03-10 12:04       ` Robin Murphy
2023-03-14 13:25       ` Lucas Tanure
2023-03-14 13:25         ` Lucas Tanure
2023-03-14 13:25         ` Lucas Tanure
2023-03-14 13:25         ` Lucas Tanure
2023-03-14 14:14         ` Marc Zyngier
2023-03-14 14:14           ` Marc Zyngier
2023-03-14 14:14           ` Marc Zyngier
2023-03-14 14:14           ` Marc Zyngier
2023-03-10  8:05 ` [PATCH 2/7] PCI: rockchip-dwc: Add rk3588 compatible line Lucas Tanure
2023-03-10  8:05   ` Lucas Tanure
2023-03-10  8:05   ` Lucas Tanure
2023-03-10  8:05   ` Lucas Tanure
2023-03-10  8:05 ` [PATCH 3/7] dt-bindings: phy: rockchip: " Lucas Tanure
2023-03-10  8:05   ` Lucas Tanure
2023-03-10  8:05   ` Lucas Tanure
2023-03-10  8:05   ` Lucas Tanure
2023-03-12 11:31   ` Krzysztof Kozlowski
2023-03-12 11:31     ` Krzysztof Kozlowski
2023-03-12 11:31     ` Krzysztof Kozlowski
2023-03-12 11:31     ` Krzysztof Kozlowski
2023-03-10  8:05 ` [PATCH 4/7] phy: rockchip: Add naneng combo phy support for RK3588 Lucas Tanure
2023-03-10  8:05   ` Lucas Tanure
2023-03-10  8:05   ` Lucas Tanure
2023-03-10  8:05   ` Lucas Tanure
2023-03-10 12:31   ` Peter Geis
2023-03-10 12:31     ` Peter Geis
2023-03-10 12:31     ` Peter Geis
2023-03-10 12:31     ` Peter Geis
2023-03-10  8:05 ` [PATCH 5/7] arm64: dts: rockchip: Add ITS GIC600 configuration for rk3588s Lucas Tanure
2023-03-10  8:05   ` Lucas Tanure
2023-03-10  8:05   ` Lucas Tanure
2023-03-10  8:05   ` Lucas Tanure
2023-03-10  8:05 ` [PATCH 6/7] arm64: dts: rockchip: Add PCIE2.0x1 lane @fe190000 for RK3588s Lucas Tanure
2023-03-10  8:05   ` Lucas Tanure
2023-03-10  8:05   ` Lucas Tanure
2023-03-10  8:05   ` Lucas Tanure
2023-03-10  8:05 ` [PATCH 7/7] arm64: dts: rockchip: RK3588s: Enable PCIE2.0x1 @fe190000 Lucas Tanure
2023-03-10  8:05   ` Lucas Tanure
2023-03-10  8:05   ` Lucas Tanure
2023-03-10  8:05   ` Lucas Tanure

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=86ttysyfe6.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=kernel@collabora.com \
    --cc=kever.yang@rock-chips.com \
    --cc=kishon@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kw@linux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=lpieralisi@kernel.org \
    --cc=lucas.tanure@collabora.com \
    --cc=pgwipeout@gmail.com \
    --cc=piotr.oniszczuk@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=tglx@linutronix.de \
    --cc=vkoul@kernel.org \
    --cc=wqu@suse.com \
    /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.