* [PATCH] dma-mapping: benchmark: Fix compile error in user-space tool
@ 2022-12-05 13:50 Gerd Bayer
2022-12-06 3:13 ` chenxiang (M)
0 siblings, 1 reply; 8+ messages in thread
From: Gerd Bayer @ 2022-12-05 13:50 UTC (permalink / raw)
To: Barry Song, Xiang Chen
Cc: Joerg Roedel, Shuah Khan, iommu, linux-kselftest, Niklas Schnelle,
Gerd Bayer
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] dma-mapping: benchmark: Fix compile error in user-space tool
2022-12-05 13:50 [PATCH] dma-mapping: benchmark: Fix compile error in user-space tool Gerd Bayer
@ 2022-12-06 3:13 ` chenxiang (M)
2022-12-16 14:35 ` Gerd Bayer
0 siblings, 1 reply; 8+ messages in thread
From: chenxiang (M) @ 2022-12-06 3:13 UTC (permalink / raw)
To: Gerd Bayer, Barry Song
Cc: Joerg Roedel, Shuah Khan, iommu, linux-kselftest, Niklas Schnelle
在 2022/12/5 21:50, Gerd Bayer 写道:
> 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>
It also solves the compile error on arm64 platform.
Acked-by: Xiang Chen <chenxiang66@hisilicon.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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] dma-mapping: benchmark: Fix compile error in user-space tool
2022-12-06 3:13 ` chenxiang (M)
@ 2022-12-16 14:35 ` Gerd Bayer
2022-12-19 0:40 ` chenxiang (M)
2022-12-21 16:39 ` Shuah Khan
0 siblings, 2 replies; 8+ messages in thread
From: Gerd Bayer @ 2022-12-16 14:35 UTC (permalink / raw)
To: chenxiang (M), Shuah Khan
Cc: Joerg Roedel, iommu, linux-kselftest, Niklas Schnelle
On Tue, 2022-12-06 at 11:13 +0800, chenxiang (M) wrote:
>
> 在 2022/12/5 21:50, Gerd Bayer 写道:
> > 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>
>
> It also solves the compile error on arm64 platform.
> Acked-by: Xiang Chen <chenxiang66@hisilicon.com>
Hi Xiang Chen, hi Shuah,
so is there any chance to have this compile fix integrated into linux-
next still, or is this too late now?
Thanks,
Gerd
>
> > ---
> > 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
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] dma-mapping: benchmark: Fix compile error in user-space tool
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
1 sibling, 1 reply; 8+ messages in thread
From: chenxiang (M) @ 2022-12-19 0:40 UTC (permalink / raw)
To: Gerd Bayer, Shuah Khan
Cc: Joerg Roedel, iommu, linux-kselftest, Niklas Schnelle,
Christoph Hellwig
+cc Christoph Hellwig
在 2022/12/16 22:35, Gerd Bayer 写道:
> On Tue, 2022-12-06 at 11:13 +0800, chenxiang (M) wrote:
>> 在 2022/12/5 21:50, Gerd Bayer 写道:
>>> 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>
>> It also solves the compile error on arm64 platform.
>> Acked-by: Xiang Chen <chenxiang66@hisilicon.com>
> Hi Xiang Chen, hi Shuah,
>
> so is there any chance to have this compile fix integrated into linux-
> next still, or is this too late now?
>
> Thanks,
> Gerd
>
>>> ---
>>> 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
> .
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] dma-mapping: benchmark: Fix compile error in user-space tool
2022-12-19 0:40 ` chenxiang (M)
@ 2022-12-21 10:27 ` Christoph Hellwig
0 siblings, 0 replies; 8+ messages in thread
From: Christoph Hellwig @ 2022-12-21 10:27 UTC (permalink / raw)
To: chenxiang (M)
Cc: Gerd Bayer, Shuah Khan, Joerg Roedel, iommu, linux-kselftest,
Niklas Schnelle, Christoph Hellwig
Can you explain what the problem is? I just say a maze of quotes
and top posting replies.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] dma-mapping: benchmark: Fix compile error in user-space tool
2022-12-16 14:35 ` Gerd Bayer
2022-12-19 0:40 ` chenxiang (M)
@ 2022-12-21 16:39 ` Shuah Khan
2022-12-21 16:44 ` Shuah Khan
1 sibling, 1 reply; 8+ messages in thread
From: Shuah Khan @ 2022-12-21 16:39 UTC (permalink / raw)
To: Gerd Bayer, chenxiang (M), Shuah Khan
Cc: Joerg Roedel, iommu, linux-kselftest, Niklas Schnelle, Shuah Khan
On 12/16/22 07:35, Gerd Bayer wrote:
> On Tue, 2022-12-06 at 11:13 +0800, chenxiang (M) wrote:
>>
>> 在 2022/12/5 21:50, Gerd Bayer 写道:
>>> 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>
>>
>> It also solves the compile error on arm64 platform.
>> Acked-by: Xiang Chen <chenxiang66@hisilicon.com>
>
> Hi Xiang Chen, hi Shuah,
>
> so is there any chance to have this compile fix integrated into linux-
> next still, or is this too late now?
Plan to apply this after the merge window closes
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] dma-mapping: benchmark: Fix compile error in user-space tool
2022-12-21 16:39 ` Shuah Khan
@ 2022-12-21 16:44 ` Shuah Khan
2023-01-09 16:45 ` Gerd Bayer
0 siblings, 1 reply; 8+ messages in thread
From: Shuah Khan @ 2022-12-21 16:44 UTC (permalink / raw)
To: Gerd Bayer, chenxiang (M), Shuah Khan
Cc: Joerg Roedel, iommu, linux-kselftest, Niklas Schnelle, Shuah Khan,
Christoph Hellwig
On 12/21/22 09:39, Shuah Khan wrote:
> On 12/16/22 07:35, Gerd Bayer wrote:
>> On Tue, 2022-12-06 at 11:13 +0800, chenxiang (M) wrote:
>>>
>>> 在 2022/12/5 21:50, Gerd Bayer 写道:
>>>> 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>
>>>
>>> It also solves the compile error on arm64 platform.
>>> Acked-by: Xiang Chen <chenxiang66@hisilicon.com>
>>
>> Hi Xiang Chen, hi Shuah,
>>
>> so is there any chance to have this compile fix integrated into linux-
>> next still, or is this too late now?
> Plan to apply this after the merge window closes
>
The reason for the delay is this patch doesn't have the right commit
header. This should have been "selftests:dma -----"
It makes it easier for maintainers to parse and pay attention to the
patches if they indicate the area they fall under. Something to
keep in mind for your future patches.
Please resend the patch with the Acks you received and a correct
commit header.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] dma-mapping: benchmark: Fix compile error in user-space tool
2022-12-21 16:44 ` Shuah Khan
@ 2023-01-09 16:45 ` Gerd Bayer
0 siblings, 0 replies; 8+ messages in thread
From: Gerd Bayer @ 2023-01-09 16:45 UTC (permalink / raw)
To: Shuah Khan, chenxiang (M), Shuah Khan
Cc: Joerg Roedel, iommu, linux-kselftest, Niklas Schnelle,
Christoph Hellwig
On Wed, 2022-12-21 at 09:44 -0700, Shuah Khan wrote:
> On 12/21/22 09:39, Shuah Khan wrote:
> > On 12/16/22 07:35, Gerd Bayer wrote:
> > > On Tue, 2022-12-06 at 11:13 +0800, chenxiang (M) wrote:
> > > >
> > > > 在 2022/12/5 21:50, Gerd Bayer 写道:
> > > > > 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.
[...]
> > > >
> > > > It also solves the compile error on arm64 platform.
> > > > Acked-by: Xiang Chen <chenxiang66@hisilicon.com>
> > >
> > > Hi Xiang Chen, hi Shuah,
> > >
> > > so is there any chance to have this compile fix integrated into
> > > linux-
> > > next still, or is this too late now?
> > Plan to apply this after the merge window closes
> >
>
> The reason for the delay is this patch doesn't have the right commit
> header. This should have been "selftests:dma -----"
>
> It makes it easier for maintainers to parse and pay attention to the
> patches if they indicate the area they fall under. Something to
> keep in mind for your future patches.
>
> Please resend the patch with the Acks you received and a correct
> commit header.
>
> thanks,
> -- Shuah
Shuah,
thank you for your explanation. I'm working on resending the patch.
Thanks,
Gerd
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-01-09 16:47 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-05 13:50 [PATCH] dma-mapping: benchmark: Fix compile error in user-space tool Gerd Bayer
2022-12-06 3:13 ` 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox