From: Gerd Bayer <gbayer@linux.ibm.com>
To: Barry Song <song.bao.hua@hisilicon.com>,
Xiang Chen <chenxiang66@hisilicon.com>
Cc: Joerg Roedel <joro@8bytes.org>, Shuah Khan <shuah@kernel.org>,
iommu@lists.linux.dev, linux-kselftest@vger.kernel.org,
Niklas Schnelle <schnelle@linux.ibm.com>,
Gerd Bayer <gbayer@linux.ibm.com>
Subject: [PATCH] dma-mapping: benchmark: Fix compile error in user-space tool
Date: Mon, 5 Dec 2022 14:50:22 +0100 [thread overview]
Message-ID: <20221205135022.49708-1-gbayer@linux.ibm.com> (raw)
Since [1] the user-space program dma_map_benchmark shares the header file
linux/map_benchmark.h with the kernel driver in kernel/dma/map_benchmark.c.
With latest kernel version this does not compile any more.
While https://kernelnewbies.org/KernelHeaders suggests otherwise, allow it
to use of kernel headers through the uapi/ include direcotry. I assume we can
do so safely, since the controlling user-space program is distributed with
the kernel.
With this change dma_map_benchmark compiles with just the obvious warning
about uapi usage on ARCH=x86 and s390 and runs on ARCH=s390.
[1] commit 8ddde07a3d28 ("dma-mapping: benchmark: extract a common header file for map_benchmark definition")
Signed-off-by: Gerd Bayer <gbayer@linux.ibm.com>
---
tools/testing/selftests/dma/dma_map_benchmark.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/dma/dma_map_benchmark.c b/tools/testing/selftests/dma/dma_map_benchmark.c
index 5c997f17fcbd..d49d7ea6a63e 100644
--- a/tools/testing/selftests/dma/dma_map_benchmark.c
+++ b/tools/testing/selftests/dma/dma_map_benchmark.c
@@ -10,7 +10,7 @@
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
-#include <linux/types.h>
+#include <uapi/linux/types.h>
#include <linux/map_benchmark.h>
#define NSEC_PER_MSEC 1000000L
base-commit: 8abacb3356e68261ccd3a2ad74ed6042363e5d0f
--
2.38.1
next reply other threads:[~2022-12-05 13:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-05 13:50 Gerd Bayer [this message]
2022-12-06 3:13 ` [PATCH] dma-mapping: benchmark: Fix compile error in user-space tool chenxiang (M)
2022-12-16 14:35 ` Gerd Bayer
2022-12-19 0:40 ` chenxiang (M)
2022-12-21 10:27 ` Christoph Hellwig
2022-12-21 16:39 ` Shuah Khan
2022-12-21 16:44 ` Shuah Khan
2023-01-09 16:45 ` Gerd Bayer
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=20221205135022.49708-1-gbayer@linux.ibm.com \
--to=gbayer@linux.ibm.com \
--cc=chenxiang66@hisilicon.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=schnelle@linux.ibm.com \
--cc=shuah@kernel.org \
--cc=song.bao.hua@hisilicon.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.