From: Qinxin Xia <xiaqinxin@huawei.com>
To: <21cnbao@gmail.com>, <m.szyprowski@samsung.com>,
<robin.murphy@arm.com>, <jonathan.cameron@huawei.com>
Cc: <prime.zeng@huawei.com>, <fanghao11@huawei.com>,
<linux-kernel@vger.kernel.org>, <linuxarm@huawei.com>,
<xiaqinxin@huawei.com>, <yangyicong@huawei.com>
Subject: [PATCH 1/2] tools/dma: move dma_map_benchmark from selftests to tools/dma
Date: Thu, 14 Aug 2025 21:35:26 +0800 [thread overview]
Message-ID: <20250814133527.2679261-2-xiaqinxin@huawei.com> (raw)
In-Reply-To: <20250814133527.2679261-1-xiaqinxin@huawei.com>
dma_map_benchmark is a standalone developer tool rather than an
automated selftest. It has no pass/fail criteria, expects manual
invocation, and is built as a normal userspace binary. Move it to
tools/dma/ and add a minimal, the original selftest/dma/Makefile
entry is removed to avoid duplication.
Signed-off-by: Qinxin Xia <xiaqinxin@huawei.com>
---
tools/Makefile | 13 +++++++------
tools/dma/Makefile | 17 +++++++++++++++++
tools/{testing/selftests => }/dma/config | 0
.../selftests => }/dma/dma_map_benchmark.c | 0
tools/testing/selftests/dma/Makefile | 7 -------
5 files changed, 24 insertions(+), 13 deletions(-)
create mode 100644 tools/dma/Makefile
rename tools/{testing/selftests => }/dma/config (100%)
rename tools/{testing/selftests => }/dma/dma_map_benchmark.c (100%)
delete mode 100644 tools/testing/selftests/dma/Makefile
diff --git a/tools/Makefile b/tools/Makefile
index c31cbbd12c45..cb40961a740f 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -14,6 +14,7 @@ help:
@echo ' counter - counter tools'
@echo ' cpupower - a tool for all things x86 CPU power'
@echo ' debugging - tools for debugging'
+ @echo ' dma - tools for DMA mapping'
@echo ' firewire - the userspace part of nosy, an IEEE-1394 traffic sniffer'
@echo ' firmware - Firmware tools'
@echo ' freefall - laptop accelerometer program for disk protection'
@@ -69,7 +70,7 @@ acpi: FORCE
cpupower: FORCE
$(call descend,power/$@)
-counter firewire hv guest bootconfig spi usb virtio mm bpf iio gpio objtool leds wmi firmware debugging tracing: FORCE
+counter dma firewire hv guest bootconfig spi usb virtio mm bpf iio gpio objtool leds wmi firmware debugging tracing: FORCE
$(call descend,$@)
bpf/%: FORCE
@@ -122,7 +123,7 @@ kvm_stat: FORCE
ynl: FORCE
$(call descend,net/ynl)
-all: acpi counter cpupower gpio hv firewire \
+all: acpi counter cpupower dma gpio hv firewire \
perf selftests bootconfig spi turbostat usb \
virtio mm bpf x86_energy_perf_policy \
tmon freefall iio objtool kvm_stat wmi \
@@ -134,7 +135,7 @@ acpi_install:
cpupower_install:
$(call descend,power/$(@:_install=),install)
-counter_install firewire_install gpio_install hv_install iio_install perf_install bootconfig_install spi_install usb_install virtio_install mm_install bpf_install objtool_install wmi_install debugging_install tracing_install:
+counter_install dma_install firewire_install gpio_install hv_install iio_install perf_install bootconfig_install spi_install usb_install virtio_install mm_install bpf_install objtool_install wmi_install debugging_install tracing_install:
$(call descend,$(@:_install=),install)
selftests_install:
@@ -164,7 +165,7 @@ kvm_stat_install:
ynl_install:
$(call descend,net/$(@:_install=),install)
-install: acpi_install counter_install cpupower_install gpio_install \
+install: acpi_install counter_install cpupower_install dma_install gpio_install \
hv_install firewire_install iio_install \
perf_install selftests_install turbostat_install usb_install \
virtio_install mm_install bpf_install x86_energy_perf_policy_install \
@@ -178,7 +179,7 @@ acpi_clean:
cpupower_clean:
$(call descend,power/cpupower,clean)
-counter_clean hv_clean firewire_clean bootconfig_clean spi_clean usb_clean virtio_clean mm_clean wmi_clean bpf_clean iio_clean gpio_clean objtool_clean leds_clean firmware_clean debugging_clean tracing_clean:
+counter_clean dma_clean hv_clean firewire_clean bootconfig_clean spi_clean usb_clean virtio_clean mm_clean wmi_clean bpf_clean iio_clean gpio_clean objtool_clean leds_clean firmware_clean debugging_clean tracing_clean:
$(call descend,$(@:_clean=),clean)
libapi_clean:
@@ -224,7 +225,7 @@ build_clean:
ynl_clean:
$(call descend,net/$(@:_clean=),clean)
-clean: acpi_clean counter_clean cpupower_clean hv_clean firewire_clean \
+clean: acpi_clean counter_clean cpupower_clean dma_clean hv_clean firewire_clean \
perf_clean selftests_clean turbostat_clean bootconfig_clean spi_clean usb_clean virtio_clean \
mm_clean bpf_clean iio_clean x86_energy_perf_policy_clean tmon_clean \
freefall_clean build_clean libbpf_clean libsubcmd_clean \
diff --git a/tools/dma/Makefile b/tools/dma/Makefile
new file mode 100644
index 000000000000..841b54896288
--- /dev/null
+++ b/tools/dma/Makefile
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: GPL-2.0
+bindir ?= /usr/bin
+
+CFLAGS += -I../../include -I../../usr/include
+
+TARGET = dma_map_benchmark
+
+all: $(TARGET)
+
+$(TARGET): $(TARGET).c
+ $(CC) $(CFLAGS) $< -o $@
+
+install: all
+ install -D -m 755 $(TARGET) $(DESTDIR)$(bindir)/$(TARGET)
+
+clean:
+ rm -f $(TARGET)
diff --git a/tools/testing/selftests/dma/config b/tools/dma/config
similarity index 100%
rename from tools/testing/selftests/dma/config
rename to tools/dma/config
diff --git a/tools/testing/selftests/dma/dma_map_benchmark.c b/tools/dma/dma_map_benchmark.c
similarity index 100%
rename from tools/testing/selftests/dma/dma_map_benchmark.c
rename to tools/dma/dma_map_benchmark.c
diff --git a/tools/testing/selftests/dma/Makefile b/tools/testing/selftests/dma/Makefile
deleted file mode 100644
index cd8c5ece1cba..000000000000
--- a/tools/testing/selftests/dma/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-CFLAGS += -I../../../../usr/include/
-CFLAGS += -I../../../../include/
-
-TEST_GEN_PROGS := dma_map_benchmark
-
-include ../lib.mk
--
2.33.0
next prev parent reply other threads:[~2025-08-14 13:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-14 13:35 [PATCH 0/2] " Qinxin Xia
2025-08-14 13:35 ` Qinxin Xia [this message]
2025-08-15 10:03 ` [PATCH 1/2] tools/dma: " Barry Song
2025-08-18 2:53 ` Qinxin Xia
2025-08-21 3:39 ` Barry Song
2025-08-21 3:55 ` Qinxin Xia
2025-08-22 1:12 ` Barry Song
2025-08-27 12:07 ` Qinxin Xia
2025-08-28 21:22 ` Barry Song
2025-09-02 4:08 ` Qinxin Xia
2025-09-02 4:45 ` Barry Song
2025-08-14 13:35 ` [PATCH 2/2] MAINTAINERS: add myself and Barry to dma_map_benchmark maintainers Qinxin Xia
2025-08-15 9:28 ` Barry Song
2025-08-15 9:37 ` Qinxin Xia
-- strict thread matches above, loose matches on Subject: below --
2025-07-24 8:55 [PATCH 0/2] dma-mapping: benchmark: modify the dma_map_benchmark directory Qinxin Xia
2025-07-24 8:55 ` [PATCH 1/2] tools/dma: move dma_map_benchmark from selftests to tools/dma Qinxin Xia
2025-07-24 9:25 ` Barry Song
2025-07-24 9:33 ` Qinxin Xia
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=20250814133527.2679261-2-xiaqinxin@huawei.com \
--to=xiaqinxin@huawei.com \
--cc=21cnbao@gmail.com \
--cc=fanghao11@huawei.com \
--cc=jonathan.cameron@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=m.szyprowski@samsung.com \
--cc=prime.zeng@huawei.com \
--cc=robin.murphy@arm.com \
--cc=yangyicong@huawei.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 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®