* [PATCH 1/3] kcmp: Move kcmp.h into uapi
@ 2014-10-23 5:07 Michael Ellerman
[not found] ` <1414040834-30209-1-git-send-email-mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
2014-10-23 5:07 ` [PATCH 3/3] selftests/kcmp: Always try to build the test Michael Ellerman
0 siblings, 2 replies; 17+ messages in thread
From: Michael Ellerman @ 2014-10-23 5:07 UTC (permalink / raw)
To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
Cc: shuahkh-JPH+aEBZ4P+UEJcrhfAQsw, linux-api-u79uwXL29TY76Z2rM5mHXA,
Andrew Morton, gorcunov-GEFAQzZX7r8dnm+yROfE0A
kcmp.h appears to be part of the API, it's documented in kcmp(2), and
the selftests/kcmp code uses it. So move it to uapi so it's actually
exported.
Signed-off-by: Michael Ellerman <mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
---
include/linux/kcmp.h | 13 +------------
include/uapi/linux/Kbuild | 1 +
include/uapi/linux/kcmp.h | 17 +++++++++++++++++
3 files changed, 19 insertions(+), 12 deletions(-)
create mode 100644 include/uapi/linux/kcmp.h
diff --git a/include/linux/kcmp.h b/include/linux/kcmp.h
index 2dcd1b3aafc8..9dfb23e1771b 100644
--- a/include/linux/kcmp.h
+++ b/include/linux/kcmp.h
@@ -1,17 +1,6 @@
#ifndef _LINUX_KCMP_H
#define _LINUX_KCMP_H
-/* Comparison type */
-enum kcmp_type {
- KCMP_FILE,
- KCMP_VM,
- KCMP_FILES,
- KCMP_FS,
- KCMP_SIGHAND,
- KCMP_IO,
- KCMP_SYSVSEM,
-
- KCMP_TYPES,
-};
+#include <uapi/linux/kcmp.h>
#endif /* _LINUX_KCMP_H */
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index b70237e8bc37..1cf50d682dbf 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -209,6 +209,7 @@ header-y += ivtvfb.h
header-y += ixjuser.h
header-y += jffs2.h
header-y += joystick.h
+header-y += kcmp.h
header-y += kd.h
header-y += kdev_t.h
header-y += kernel-page-flags.h
diff --git a/include/uapi/linux/kcmp.h b/include/uapi/linux/kcmp.h
new file mode 100644
index 000000000000..84df14b37360
--- /dev/null
+++ b/include/uapi/linux/kcmp.h
@@ -0,0 +1,17 @@
+#ifndef _UAPI_LINUX_KCMP_H
+#define _UAPI_LINUX_KCMP_H
+
+/* Comparison type */
+enum kcmp_type {
+ KCMP_FILE,
+ KCMP_VM,
+ KCMP_FILES,
+ KCMP_FS,
+ KCMP_SIGHAND,
+ KCMP_IO,
+ KCMP_SYSVSEM,
+
+ KCMP_TYPES,
+};
+
+#endif /* _UAPI_LINUX_KCMP_H */
--
1.9.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
[parent not found: <1414040834-30209-1-git-send-email-mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>]
* [PATCH 2/3] selftests/kcmp: Don't include kernel headers
[not found] ` <1414040834-30209-1-git-send-email-mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
@ 2014-10-23 5:07 ` Michael Ellerman
[not found] ` <1414040834-30209-2-git-send-email-mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
2014-10-23 6:04 ` [PATCH 1/3] kcmp: Move kcmp.h into uapi Cyrill Gorcunov
` (2 subsequent siblings)
3 siblings, 1 reply; 17+ messages in thread
From: Michael Ellerman @ 2014-10-23 5:07 UTC (permalink / raw)
To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
Cc: shuahkh-JPH+aEBZ4P+UEJcrhfAQsw, linux-api-u79uwXL29TY76Z2rM5mHXA,
Andrew Morton, gorcunov-GEFAQzZX7r8dnm+yROfE0A
The kcmp test mucks with the include path to bring in the kernel
headers, and x86 headers too for reasons that are not clear.
Now that kcmp.h is exported none of that should be necessary.
Signed-off-by: Michael Ellerman <mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
---
tools/testing/selftests/kcmp/Makefile | 4 ----
1 file changed, 4 deletions(-)
diff --git a/tools/testing/selftests/kcmp/Makefile b/tools/testing/selftests/kcmp/Makefile
index 8aabd82db9e4..4f00c0524501 100644
--- a/tools/testing/selftests/kcmp/Makefile
+++ b/tools/testing/selftests/kcmp/Makefile
@@ -8,11 +8,7 @@ ifeq ($(ARCH),x86_64)
ARCH := x86
CFLAGS := -DCONFIG_X86_64 -D__x86_64__
endif
-
-CFLAGS += -I../../../../arch/x86/include/generated/
-CFLAGS += -I../../../../include/
CFLAGS += -I../../../../usr/include/
-CFLAGS += -I../../../../arch/x86/include/
all:
ifeq ($(ARCH),x86)
--
1.9.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 1/3] kcmp: Move kcmp.h into uapi
[not found] ` <1414040834-30209-1-git-send-email-mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
2014-10-23 5:07 ` [PATCH 2/3] selftests/kcmp: Don't include kernel headers Michael Ellerman
@ 2014-10-23 6:04 ` Cyrill Gorcunov
2014-10-23 7:49 ` Arnd Bergmann
2014-11-28 2:18 ` Michael Ellerman
3 siblings, 0 replies; 17+ messages in thread
From: Cyrill Gorcunov @ 2014-10-23 6:04 UTC (permalink / raw)
To: Michael Ellerman
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
shuahkh-JPH+aEBZ4P+UEJcrhfAQsw, linux-api-u79uwXL29TY76Z2rM5mHXA,
Andrew Morton
On Thu, Oct 23, 2014 at 04:07:12PM +1100, Michael Ellerman wrote:
> kcmp.h appears to be part of the API, it's documented in kcmp(2), and
> the selftests/kcmp code uses it. So move it to uapi so it's actually
> exported.
>
> Signed-off-by: Michael Ellerman <mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
Acked-by: Cyrill Gorcunov <gorcunov-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/3] kcmp: Move kcmp.h into uapi
[not found] ` <1414040834-30209-1-git-send-email-mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
2014-10-23 5:07 ` [PATCH 2/3] selftests/kcmp: Don't include kernel headers Michael Ellerman
2014-10-23 6:04 ` [PATCH 1/3] kcmp: Move kcmp.h into uapi Cyrill Gorcunov
@ 2014-10-23 7:49 ` Arnd Bergmann
2014-10-23 8:14 ` Cyrill Gorcunov
2014-11-28 2:18 ` Michael Ellerman
3 siblings, 1 reply; 17+ messages in thread
From: Arnd Bergmann @ 2014-10-23 7:49 UTC (permalink / raw)
To: Michael Ellerman
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
shuahkh-JPH+aEBZ4P+UEJcrhfAQsw, linux-api-u79uwXL29TY76Z2rM5mHXA,
Andrew Morton, gorcunov-GEFAQzZX7r8dnm+yROfE0A
On Thursday 23 October 2014 16:07:12 Michael Ellerman wrote:
> --- a/include/linux/kcmp.h
> +++ b/include/linux/kcmp.h
> @@ -1,17 +1,6 @@
> #ifndef _LINUX_KCMP_H
> #define _LINUX_KCMP_H
>
> -/* Comparison type */
> -enum kcmp_type {
> - KCMP_FILE,
> - KCMP_VM,
> - KCMP_FILES,
> - KCMP_FS,
> - KCMP_SIGHAND,
> - KCMP_IO,
> - KCMP_SYSVSEM,
> -
> - KCMP_TYPES,
> -};
> +#include <uapi/linux/kcmp.h>
>
> #endif /* _LINUX_KCMP_H */
>
If the file is empty except for the uapi include, I think it's better to
delete it completely. The include path logic should ensure we pick the
other one up.
Arnd
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/3] kcmp: Move kcmp.h into uapi
2014-10-23 7:49 ` Arnd Bergmann
@ 2014-10-23 8:14 ` Cyrill Gorcunov
2014-12-01 16:57 ` Shuah Khan
0 siblings, 1 reply; 17+ messages in thread
From: Cyrill Gorcunov @ 2014-10-23 8:14 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Michael Ellerman, linux-kernel, shuahkh, linux-api, Andrew Morton
On Thu, Oct 23, 2014 at 09:49:14AM +0200, Arnd Bergmann wrote:
> On Thursday 23 October 2014 16:07:12 Michael Ellerman wrote:
> > --- a/include/linux/kcmp.h
> > +++ b/include/linux/kcmp.h
> > @@ -1,17 +1,6 @@
> > #ifndef _LINUX_KCMP_H
> > #define _LINUX_KCMP_H
> >
> > -/* Comparison type */
> > -enum kcmp_type {
> > - KCMP_FILE,
> > - KCMP_VM,
> > - KCMP_FILES,
> > - KCMP_FS,
> > - KCMP_SIGHAND,
> > - KCMP_IO,
> > - KCMP_SYSVSEM,
> > -
> > - KCMP_TYPES,
> > -};
> > +#include <uapi/linux/kcmp.h>
> >
> > #endif /* _LINUX_KCMP_H */
> >
>
> If the file is empty except for the uapi include, I think it's better to
> delete it completely. The include path logic should ensure we pick the
> other one up.
Good point, somehow managed to miss this.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/3] kcmp: Move kcmp.h into uapi
2014-10-23 8:14 ` Cyrill Gorcunov
@ 2014-12-01 16:57 ` Shuah Khan
0 siblings, 0 replies; 17+ messages in thread
From: Shuah Khan @ 2014-12-01 16:57 UTC (permalink / raw)
To: Cyrill Gorcunov, Arnd Bergmann
Cc: Michael Ellerman, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-api-u79uwXL29TY76Z2rM5mHXA, Andrew Morton, Shuah Khan
On 10/23/2014 02:14 AM, Cyrill Gorcunov wrote:
> On Thu, Oct 23, 2014 at 09:49:14AM +0200, Arnd Bergmann wrote:
>> On Thursday 23 October 2014 16:07:12 Michael Ellerman wrote:
>>> --- a/include/linux/kcmp.h
>>> +++ b/include/linux/kcmp.h
>>> @@ -1,17 +1,6 @@
>>> #ifndef _LINUX_KCMP_H
>>> #define _LINUX_KCMP_H
>>>
>>> -/* Comparison type */
>>> -enum kcmp_type {
>>> - KCMP_FILE,
>>> - KCMP_VM,
>>> - KCMP_FILES,
>>> - KCMP_FS,
>>> - KCMP_SIGHAND,
>>> - KCMP_IO,
>>> - KCMP_SYSVSEM,
>>> -
>>> - KCMP_TYPES,
>>> -};
>>> +#include <uapi/linux/kcmp.h>
>>>
>>> #endif /* _LINUX_KCMP_H */
>>>
>>
>> If the file is empty except for the uapi include, I think it's better to
>> delete it completely. The include path logic should ensure we pick the
>> other one up.
>
> Good point, somehow managed to miss this.
>
Michael,
Are you planning to send v2 to address the comments?
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Samsung Research America (Silicon Valley)
shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org | (970) 217-8978
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/3] kcmp: Move kcmp.h into uapi
[not found] ` <1414040834-30209-1-git-send-email-mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
` (2 preceding siblings ...)
2014-10-23 7:49 ` Arnd Bergmann
@ 2014-11-28 2:18 ` Michael Ellerman
2014-12-01 17:00 ` Shuah Khan
3 siblings, 1 reply; 17+ messages in thread
From: Michael Ellerman @ 2014-11-28 2:18 UTC (permalink / raw)
To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
Cc: shuahkh-JPH+aEBZ4P+UEJcrhfAQsw, linux-api-u79uwXL29TY76Z2rM5mHXA,
Andrew Morton, gorcunov-GEFAQzZX7r8dnm+yROfE0A
On Thu, 2014-10-23 at 16:07 +1100, Michael Ellerman wrote:
> kcmp.h appears to be part of the API, it's documented in kcmp(2), and
> the selftests/kcmp code uses it. So move it to uapi so it's actually
> exported.
Looks like this series fell through the cracks?
It still applies on rc6. Should I resend?
cheers
> Signed-off-by: Michael Ellerman <mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
> ---
> include/linux/kcmp.h | 13 +------------
> include/uapi/linux/Kbuild | 1 +
> include/uapi/linux/kcmp.h | 17 +++++++++++++++++
> 3 files changed, 19 insertions(+), 12 deletions(-)
> create mode 100644 include/uapi/linux/kcmp.h
>
> diff --git a/include/linux/kcmp.h b/include/linux/kcmp.h
> index 2dcd1b3aafc8..9dfb23e1771b 100644
> --- a/include/linux/kcmp.h
> +++ b/include/linux/kcmp.h
> @@ -1,17 +1,6 @@
> #ifndef _LINUX_KCMP_H
> #define _LINUX_KCMP_H
>
> -/* Comparison type */
> -enum kcmp_type {
> - KCMP_FILE,
> - KCMP_VM,
> - KCMP_FILES,
> - KCMP_FS,
> - KCMP_SIGHAND,
> - KCMP_IO,
> - KCMP_SYSVSEM,
> -
> - KCMP_TYPES,
> -};
> +#include <uapi/linux/kcmp.h>
>
> #endif /* _LINUX_KCMP_H */
> diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
> index b70237e8bc37..1cf50d682dbf 100644
> --- a/include/uapi/linux/Kbuild
> +++ b/include/uapi/linux/Kbuild
> @@ -209,6 +209,7 @@ header-y += ivtvfb.h
> header-y += ixjuser.h
> header-y += jffs2.h
> header-y += joystick.h
> +header-y += kcmp.h
> header-y += kd.h
> header-y += kdev_t.h
> header-y += kernel-page-flags.h
> diff --git a/include/uapi/linux/kcmp.h b/include/uapi/linux/kcmp.h
> new file mode 100644
> index 000000000000..84df14b37360
> --- /dev/null
> +++ b/include/uapi/linux/kcmp.h
> @@ -0,0 +1,17 @@
> +#ifndef _UAPI_LINUX_KCMP_H
> +#define _UAPI_LINUX_KCMP_H
> +
> +/* Comparison type */
> +enum kcmp_type {
> + KCMP_FILE,
> + KCMP_VM,
> + KCMP_FILES,
> + KCMP_FS,
> + KCMP_SIGHAND,
> + KCMP_IO,
> + KCMP_SYSVSEM,
> +
> + KCMP_TYPES,
> +};
> +
> +#endif /* _UAPI_LINUX_KCMP_H */
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/3] kcmp: Move kcmp.h into uapi
2014-11-28 2:18 ` Michael Ellerman
@ 2014-12-01 17:00 ` Shuah Khan
[not found] ` <547C9E92.8010606-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
0 siblings, 1 reply; 17+ messages in thread
From: Shuah Khan @ 2014-12-01 17:00 UTC (permalink / raw)
To: Michael Ellerman, linux-kernel-u79uwXL29TY76Z2rM5mHXA
Cc: linux-api-u79uwXL29TY76Z2rM5mHXA, Andrew Morton,
gorcunov-GEFAQzZX7r8dnm+yROfE0A, Shuah Khan
On 11/27/2014 07:18 PM, Michael Ellerman wrote:
> On Thu, 2014-10-23 at 16:07 +1100, Michael Ellerman wrote:
>> kcmp.h appears to be part of the API, it's documented in kcmp(2), and
>> the selftests/kcmp code uses it. So move it to uapi so it's actually
>> exported.
>
> Looks like this series fell through the cracks?
>
> It still applies on rc6. Should I resend?
>
> cheers
>
>> Signed-off-by: Michael Ellerman <mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
I am expecting a patch v2 for the series based on the comments
on the series. Please see my responses to the individual patch
threads.
thanks,
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Samsung Research America (Silicon Valley)
shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org | (970) 217-8978
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 3/3] selftests/kcmp: Always try to build the test
2014-10-23 5:07 [PATCH 1/3] kcmp: Move kcmp.h into uapi Michael Ellerman
[not found] ` <1414040834-30209-1-git-send-email-mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
@ 2014-10-23 5:07 ` Michael Ellerman
[not found] ` <1414040834-30209-3-git-send-email-mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
1 sibling, 1 reply; 17+ messages in thread
From: Michael Ellerman @ 2014-10-23 5:07 UTC (permalink / raw)
To: linux-kernel; +Cc: shuahkh, linux-api, Andrew Morton, gorcunov
Don't prevent the test building on non-x86. Just try and build it and
let the chips fall where they may.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
tools/testing/selftests/kcmp/Makefile | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/tools/testing/selftests/kcmp/Makefile b/tools/testing/selftests/kcmp/Makefile
index 4f00c0524501..cda9cc4004c9 100644
--- a/tools/testing/selftests/kcmp/Makefile
+++ b/tools/testing/selftests/kcmp/Makefile
@@ -1,21 +1,7 @@
-uname_M := $(shell uname -m 2>/dev/null || echo not)
-ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/)
-ifeq ($(ARCH),i386)
- ARCH := x86
- CFLAGS := -DCONFIG_X86_32 -D__i386__
-endif
-ifeq ($(ARCH),x86_64)
- ARCH := x86
- CFLAGS := -DCONFIG_X86_64 -D__x86_64__
-endif
CFLAGS += -I../../../../usr/include/
all:
-ifeq ($(ARCH),x86)
gcc $(CFLAGS) kcmp_test.c -o kcmp_test
-else
- echo "Not an x86 target, can't build kcmp selftest"
-endif
run_tests: all
@./kcmp_test || echo "kcmp_test: [FAIL]"
--
1.9.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
end of thread, other threads:[~2014-12-02 5:53 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-23 5:07 [PATCH 1/3] kcmp: Move kcmp.h into uapi Michael Ellerman
[not found] ` <1414040834-30209-1-git-send-email-mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
2014-10-23 5:07 ` [PATCH 2/3] selftests/kcmp: Don't include kernel headers Michael Ellerman
[not found] ` <1414040834-30209-2-git-send-email-mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
2014-10-23 6:05 ` Cyrill Gorcunov
2014-10-23 6:04 ` [PATCH 1/3] kcmp: Move kcmp.h into uapi Cyrill Gorcunov
2014-10-23 7:49 ` Arnd Bergmann
2014-10-23 8:14 ` Cyrill Gorcunov
2014-12-01 16:57 ` Shuah Khan
2014-11-28 2:18 ` Michael Ellerman
2014-12-01 17:00 ` Shuah Khan
[not found] ` <547C9E92.8010606-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
2014-12-02 5:36 ` Michael Ellerman
2014-10-23 5:07 ` [PATCH 3/3] selftests/kcmp: Always try to build the test Michael Ellerman
[not found] ` <1414040834-30209-3-git-send-email-mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
2014-10-23 6:09 ` Cyrill Gorcunov
2014-12-02 5:53 ` Michael Ellerman
2014-10-23 13:06 ` Christopher Covington
[not found] ` <5448FD72.9040301-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2014-10-23 13:52 ` Shuah Khan
[not found] ` <54490832.7040906-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
2014-12-01 16:58 ` Shuah Khan
2014-12-02 5:44 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).