From: "Frédéric Mahé" <frederic.mahe@cirad.fr>
To: Vlad Banea <montrealtango@gmail.com>
Cc: "Frédéric Mahé" <frederic.mahe@cirad.fr>,
"Yixun Lan" <dlan@kernel.org>,
troy.mitchell@linux.spacemit.com, wangruikang@iscas.ac.cn,
guodong.xu@oss.qualcomm.com, jyc0019@gmail.com, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org, pjw@kernel.org,
palmer@dabbelt.com, aou@eecs.berkeley.edu, alex@ghiti.fr,
devicetree@vger.kernel.org, linux-riscv@lists.infradead.org,
spacemit@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] riscv: dts: spacemit: k1: give each PCIe port its own DMA window
Date: Tue, 17 Nov 2026 09:49:36 +0100 [thread overview]
Message-ID: <20261117084938.82968-1-frederic.mahe@cirad.fr> (raw)
In-Reply-To: <20261113023158.2872492-1-montrealtango@gmail.com>
On Thu, Nov 12, 2026 at 09:31:58PM -0500, Vlad Banea wrote:
> The shared pcie-bus skips all three windows, bus 0x8000_0000-0xb7ff_ffff,
> which leaves CPU addresses 0x1_0000_0000-0x1_37ff_ffff unreachable from
> every port. Give each port its own bus that skips only its own window.
Tested on a Banana Pi BPI-F3 (16 GB) with an NVMe SSD on pcie1, on
v7.4-rc1 plus "PCI: spacemit: Ignore PERST# input in RC mode on K1".
For pages at known physical addresses (from /proc/self/pagemap), I did
one 4 KiB O_DIRECT write and read per page and counted swiotlb_bounced
events:
CPU range without with this patch
0x1_0000_0000-0x1_0fff_ffff 1439/1439 bounced 0/864 bounced
0x1_1000_0000-0x1_1fff_ffff all bounced all bounced (pcie1's own window)
Every page read back correctly in both cases, so DMA through bus
0x8000_0000 works. fio with crc32c verify (16 GiB direct, 8 GiB
buffered) also passed with both DTs.
Tested-by: Frédéric Mahé <frederic.mahe@cirad.fr>
next prev parent reply other threads:[~2026-11-17 8:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 2:31 Vlad Banea
2026-11-13 8:40 ` Troy Mitchell
2026-11-14 1:44 ` Yixun Lan
2026-11-17 8:49 ` Frédéric Mahé [this message]
2026-11-17 9:51 ` Frédéric Mahé
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=20261117084938.82968-1-frederic.mahe@cirad.fr \
--to=frederic.mahe@cirad.fr \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlan@kernel.org \
--cc=guodong.xu@oss.qualcomm.com \
--cc=jyc0019@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=montrealtango@gmail.com \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=robh@kernel.org \
--cc=spacemit@lists.linux.dev \
--cc=troy.mitchell@linux.spacemit.com \
--cc=wangruikang@iscas.ac.cn \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®