From: adrian.ho.yin.ng@altera.com
To: Dinh Nguyen <dinguyen@kernel.org>, linux-kernel@vger.kernel.org
Cc: Adrian Ng Ho Yin <adrian.ho.yin.ng@altera.com>
Subject: [PATCH v4 0/2] firmware: stratix10-svc: Agilex5 SMMU DMA coherent support
Date: Fri, 11 Sep 2026 23:52:06 +0800 [thread overview]
Message-ID: <cover.1789141361.git.adrian.ho.yin.ng@altera.com> (raw)
In-Reply-To: <cover.v3.git.adrian.ho.yin.ng@altera.com>
From: Adrian Ng Ho Yin <adrian.ho.yin.ng@altera.com>
This series adds Agilex5 SMMU DMA coherent support in the stratix10-svc
driver.
On Agilex5 the DDR base address starts at 0x8000_0000, which is
outside the addressable range of the SDM. When SMMU is active, the
driver must allocate DMA-coherent buffers and pass IOVAs within the
SDM-accessible 0-512MB window to ATF. Agilex5 REV B introduced a
hardware SDM address remapper, but it must be bypassed so no additional
offset is applied to the IOVA, keeping the implementation consistent
across all Agilex5 revisions.
Patch 1 reports unmatched frees in stratix10_svc_free_memory() with
dev_warn() and cleans up related coding style in svc_pa_to_va(). The
list-head corruption from list_del(&svc_data_mem) was already fixed by
commit 9119ceb76e98 ("firmware: stratix10-svc: fix memory leaks and list
corruption bugs").
Patch 2 adds the DMA coherent allocation path and wires Agilex5
enablement in probe: require an IOMMU domain for intel,agilex5-svc,
bypass the SDM address remapper via INTEL_SIP_SMC_SDM_REMAPPER_CONFIG,
set the 29-bit DMA mask, select the DMA path through
stratix10_svc_pdata, register a devm cleanup for leaked buffers, and
guard err_destroy_pool against a NULL genpool.
---
changelog:
v3 -> v4:
- Squash the DMA-allocation and Agilex5 probe enablement patches into
one commit. Building the former alone triggered -Wunused-function on
svc_setup_dma_memory() and left use_dma_mem false (inert).
- Drop the arm64 DTS patch from this series; resend firmware patches
only.
- Drop Signed-off-by: Dinh Nguyen from patch 1; resending with author
Signed-off-by only.
v2 -> v3:
- Squash former patch 2 (SMC remapper defines) into the probe enablement
patch so the defines land with their first usage.
- Rebase on socfpga_firmware_for_v7.4.
- Drop the list_del(&svc_data_mem) fix already present in 9119ceb76e98;
keep the unmatched-free warning and style cleanup.
- Adapt of_device_id.data usage to extend stratix10_svc_pdata (shared with
needs_psci_cpu_off) instead of casting BIT flags into .data.
- Keep kzalloc_obj()/kfree() lifetime for pmem on both gen_pool and DMA
paths after 9119ceb76e98.
v1 -> v2:
- split original patch into smaller patches for easier review and backporting.
- Fixed the Fixes: tag in patch 3 referencing 5a0793ac66ac
- Replaced of_device_is_compatible() with of_device_id.data + of_device_get_match_data()
- Various commit message improvements
---
Adrian Ng Ho Yin (2):
firmware: stratix10-svc: warn on unmatched free in
stratix10_svc_free_memory
firmware: stratix10-svc: add Agilex5 SMMU DMA coherent support
drivers/firmware/stratix10-svc.c | 250 +++++++++++++++----
include/linux/firmware/intel/stratix10-smc.h | 23 ++
2 files changed, 228 insertions(+), 45 deletions(-)
--
2.49.GIT
next prev parent reply other threads:[~2026-09-11 15:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 8:20 [PATCH v3 0/4] Add Agilex5 support in SVC driver and FPGA configuration and partial reconfiguration support for Agilex5 Adrian Ng Ho Yin
2026-09-07 8:20 ` [PATCH v3 1/4] arm64: dts: socfpga: agilex5: add FPGA manager and region nodes Adrian Ng Ho Yin
2026-09-07 8:20 ` [PATCH v3 2/4] firmware: stratix10-svc: warn on unmatched free in stratix10_svc_free_memory Adrian Ng Ho Yin
2026-09-07 8:20 ` [PATCH v3 3/4] firmware: stratix10-svc: add DMA coherent memory allocation for SMMU-enabled platforms Adrian Ng Ho Yin
2026-09-07 8:20 ` [PATCH v3 4/4] firmware: stratix10-svc: enable Agilex5 SMMU support in probe Adrian Ng Ho Yin
2026-09-09 16:40 ` [PATCH v3 0/4] Add Agilex5 support in SVC driver and FPGA configuration and partial reconfiguration support for Agilex5 Dinh Nguyen
2026-09-11 13:54 ` Dinh Nguyen
2026-09-11 15:13 ` NG, ADRIAN HO YIN
2026-09-11 15:52 ` adrian.ho.yin.ng [this message]
2026-09-11 15:52 ` [PATCH v4 1/2] firmware: stratix10-svc: warn on unmatched free in stratix10_svc_free_memory adrian.ho.yin.ng
2026-09-11 15:52 ` [PATCH v4 2/2] firmware: stratix10-svc: add Agilex5 SMMU DMA coherent support adrian.ho.yin.ng
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=cover.1789141361.git.adrian.ho.yin.ng@altera.com \
--to=adrian.ho.yin.ng@altera.com \
--cc=dinguyen@kernel.org \
--cc=linux-kernel@vger.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 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®