Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1584439 > unrolled thread

Re: [PATCH v6 7/8] uapi: export all headers under uapi directories

Started byNicolas Dichtel <nicolas.dichtel@6wind.com>
First post2017-02-20 10:40 +0100
Last post2017-03-01 06:00 +0100
Articles 20 on this page of 26 — 4 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v6 7/8] uapi: export all headers under uapi directories Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-20 10:40 +0100
    Re: [PATCH v6 7/8] uapi: export all headers under uapi directories Arnd Bergmann <arnd@arndb.de> - 2017-02-20 11:20 +0100
      Re: [PATCH v6 7/8] uapi: export all headers under uapi directories Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-20 14:00 +0100
      [PATCH v7 1/8] h8300: put bitsperlong.h in uapi Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-24 17:50 +0100
      [PATCH v7 2/8] nios2: put setup.h in uapi Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-24 18:00 +0100
      [PATCH v7 5/8] Makefile.headersinst: remove destination-y option Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-24 18:00 +0100
      [PATCH v7 0/8] uapi: export all headers under uapi directories Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-24 18:00 +0100
        [PATCH v7 3/8] x86: stop exporting msr-index.h to userland Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-24 18:00 +0100
        [PATCH v7 8/8] uapi: export all arch specifics directories Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-24 18:00 +0100
        [PATCH v7 4/8] Makefile.headersinst: cleanup input files Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-24 18:00 +0100
        [PATCH v7 6/8] uapi: includes linux/types.h before exporting files Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-24 18:00 +0100
        Re: [PATCH v7 7/8] uapi: export all headers under uapi directories Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-27 17:10 +0100
          Re: [PATCH v7 7/8] uapi: export all headers under uapi directories "Dmitry V. Levin" <ldv@altlinux.org> - 2017-02-28 03:50 +0100
            Re: [PATCH v7 7/8] uapi: export all headers under uapi directories Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-28 17:00 +0100
            [PATCH v8 05/11] Makefile.headersinst: remove destination-y option Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-28 22:20 +0100
            [PATCH v8 03/11] x86: stop exporting msr-index.h to userland Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-28 22:20 +0100
            [PATCH v8 02/11] nios2: put setup.h in uapi Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-28 22:20 +0100
            [PATCH v8 00/11] uapi: export all headers under uapi directories Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-28 22:20 +0100
              [PATCH v8 07/11] btrfs_tree.h: fix include from userland Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-28 22:30 +0100
              [PATCH v8 01/11] h8300: put bitsperlong.h in uapi Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-28 22:30 +0100
              [PATCH v8 09/11] smc_diag.h: fix include from userland Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-28 22:30 +0100
              [PATCH v8 04/11] Makefile.headersinst: cleanup input files Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-28 22:30 +0100
              [PATCH v8 06/11] uapi: includes linux/types.h before exporting files Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-28 22:30 +0100
              [PATCH v8 11/11] uapi: export all arch specifics directories Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-28 22:30 +0100
              [PATCH v8 08/11] cryptouser.h: fix include from userland Nicolas Dichtel <nicolas.dichtel@6wind.com> - 2017-02-28 22:30 +0100
                Re: [PATCH v8 08/11] cryptouser.h: fix include from userland Herbert Xu <herbert@gondor.apana.org.au> - 2017-03-01 06:00 +0100

Page 1 of 2  [1] 2  Next page →


#1584439 — Re: [PATCH v6 7/8] uapi: export all headers under uapi directories

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-20 10:40 +0100
SubjectRe: [PATCH v6 7/8] uapi: export all headers under uapi directories
Message-ID<tcSBP-2Sv-23@gated-at.bofh.it>
Le 13/02/2017 à 08:49, Christoph Hellwig a écrit :
>> linux/genwqe/..install.cmd
>> linux/genwqe/.install
> 
> Third time:  NAK on exporting internal kbuild metadata.
> 
And for the third time: this is not related to this series. Those files are
there before my series and the goal of the series has nothing to do with that.

Feel free to send a patch.


Regards,
Nicolas

[toc] | [next] | [standalone]


#1584466

FromArnd Bergmann <arnd@arndb.de>
Date2017-02-20 11:20 +0100
Message-ID<tcTey-3lR-15@gated-at.bofh.it>
In reply to#1584439
On Mon, Feb 20, 2017 at 10:32 AM, Nicolas Dichtel
<nicolas.dichtel@6wind.com> wrote:
> Le 13/02/2017 à 08:49, Christoph Hellwig a écrit :
>>> linux/genwqe/..install.cmd
>>> linux/genwqe/.install
>>
>> Third time:  NAK on exporting internal kbuild metadata.
>>
> And for the third time: this is not related to this series. Those files are
> there before my series and the goal of the series has nothing to do with that.
>
> Feel free to send a patch.

Your description literally says "After this patch, the following files, which
were not exported, are now exported (with make headers_install_all)"
for the files that Christoph quoted. It that is not true, then you need to
update the patch description to say what your patch actually does.

    Arnd

[toc] | [prev] | [next] | [standalone]


#1584596

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-20 14:00 +0100
Message-ID<tcVJo-4Mr-33@gated-at.bofh.it>
In reply to#1584466
Le 20/02/2017 à 11:14, Arnd Bergmann a écrit :
> On Mon, Feb 20, 2017 at 10:32 AM, Nicolas Dichtel
> <nicolas.dichtel@6wind.com> wrote:
>> Le 13/02/2017 à 08:49, Christoph Hellwig a écrit :
>>>> linux/genwqe/..install.cmd
>>>> linux/genwqe/.install
>>>
>>> Third time:  NAK on exporting internal kbuild metadata.
>>>
>> And for the third time: this is not related to this series. Those files are
>> there before my series and the goal of the series has nothing to do with that.
>>
>> Feel free to send a patch.
> 
> Your description literally says "After this patch, the following files, which
> were not exported, are now exported (with make headers_install_all)"
> for the files that Christoph quoted. It that is not true, then you need to
> update the patch description to say what your patch actually does.
That is true. But as I explained when the comment was done the first time (and I
never got any answer), these files are generated in every exported directory.
Because the genwqe directory is now exported, the corresponding '..install.cmd'
and '.install' are generated.
See
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/scripts/Makefile.headersinst#n32
and
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/scripts/Makefile.headersinst#n130
for more details.

In other words, these files are there because some new directories are exported.
If those directories were added to the 'header-y' variable, the result would be
the same.

Regards,
Nicolas

[toc] | [prev] | [next] | [standalone]


#1587790 — [PATCH v7 1/8] h8300: put bitsperlong.h in uapi

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-24 17:50 +0100
Subject[PATCH v7 1/8] h8300: put bitsperlong.h in uapi
Message-ID<terea-2Ov-25@gated-at.bofh.it>
In reply to#1584466
This header file is exported, thus move it to uapi.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 arch/h8300/include/asm/bitsperlong.h      | 14 --------------
 arch/h8300/include/uapi/asm/bitsperlong.h | 14 ++++++++++++++
 2 files changed, 14 insertions(+), 14 deletions(-)
 delete mode 100644 arch/h8300/include/asm/bitsperlong.h
 create mode 100644 arch/h8300/include/uapi/asm/bitsperlong.h

diff --git a/arch/h8300/include/asm/bitsperlong.h b/arch/h8300/include/asm/bitsperlong.h
deleted file mode 100644
index e140e46729ac..000000000000
--- a/arch/h8300/include/asm/bitsperlong.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef __ASM_H8300_BITS_PER_LONG
-#define __ASM_H8300_BITS_PER_LONG
-
-#include <asm-generic/bitsperlong.h>
-
-#if !defined(__ASSEMBLY__)
-/* h8300-unknown-linux required long */
-#define __kernel_size_t __kernel_size_t
-typedef unsigned long	__kernel_size_t;
-typedef long		__kernel_ssize_t;
-typedef long		__kernel_ptrdiff_t;
-#endif
-
-#endif /* __ASM_H8300_BITS_PER_LONG */
diff --git a/arch/h8300/include/uapi/asm/bitsperlong.h b/arch/h8300/include/uapi/asm/bitsperlong.h
new file mode 100644
index 000000000000..e56cf72369b6
--- /dev/null
+++ b/arch/h8300/include/uapi/asm/bitsperlong.h
@@ -0,0 +1,14 @@
+#ifndef _UAPI_ASM_H8300_BITS_PER_LONG
+#define _UAPI_ASM_H8300_BITS_PER_LONG
+
+#include <asm-generic/bitsperlong.h>
+
+#if !defined(__ASSEMBLY__)
+/* h8300-unknown-linux required long */
+#define __kernel_size_t __kernel_size_t
+typedef unsigned long	__kernel_size_t;
+typedef long		__kernel_ssize_t;
+typedef long		__kernel_ptrdiff_t;
+#endif
+
+#endif /* _UAPI_ASM_H8300_BITS_PER_LONG */
-- 
2.8.1

[toc] | [prev] | [next] | [standalone]


#1587791 — [PATCH v7 2/8] nios2: put setup.h in uapi

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-24 18:00 +0100
Subject[PATCH v7 2/8] nios2: put setup.h in uapi
Message-ID<ternP-2WZ-1@gated-at.bofh.it>
In reply to#1584466
This header file is exported, but from a userland pov, it's just a wrapper
to asm-generic/setup.h.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Reviewed-by: Tobias Klauser <tklauser@distanz.ch>
---
 arch/nios2/include/uapi/asm/Kbuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/nios2/include/uapi/asm/Kbuild b/arch/nios2/include/uapi/asm/Kbuild
index e0bb972a50d7..69c965304146 100644
--- a/arch/nios2/include/uapi/asm/Kbuild
+++ b/arch/nios2/include/uapi/asm/Kbuild
@@ -2,4 +2,5 @@ include include/uapi/asm-generic/Kbuild.asm
 
 header-y += elf.h
 
+generic-y += setup.h
 generic-y += ucontext.h
-- 
2.8.1

[toc] | [prev] | [next] | [standalone]


#1587793 — [PATCH v7 5/8] Makefile.headersinst: remove destination-y option

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-24 18:00 +0100
Subject[PATCH v7 5/8] Makefile.headersinst: remove destination-y option
Message-ID<ternP-2WZ-11@gated-at.bofh.it>
In reply to#1584466
This option was added in commit c7bb349e7c25 ("kbuild: introduce destination-y
for exported headers") but never used in-tree.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Paul Bolle <pebolle@tiscali.nl>
---
 Documentation/kbuild/makefiles.txt | 23 ++++-------------------
 scripts/Makefile.headersinst       |  2 +-
 2 files changed, 5 insertions(+), 20 deletions(-)

diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index 9b9c4797fc55..37b525d329ae 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -46,9 +46,8 @@ This document describes the Linux kernel Makefiles.
 	=== 7 Kbuild syntax for exported headers
 		--- 7.1 header-y
 		--- 7.2 genhdr-y
-		--- 7.3 destination-y
-		--- 7.4 generic-y
-		--- 7.5 generated-y
+		--- 7.3 generic-y
+		--- 7.4 generated-y
 
 	=== 8 Kbuild Variables
 	=== 9 Makefile language
@@ -1295,21 +1294,7 @@ See subsequent chapter for the syntax of the Kbuild file.
 			#include/linux/Kbuild
 			genhdr-y += version.h
 
-	--- 7.3 destination-y
-
-	When an architecture has a set of exported headers that needs to be
-	exported to a different directory destination-y is used.
-	destination-y specifies the destination directory for all exported
-	headers in the file where it is present.
-
-		Example:
-			#arch/xtensa/platforms/s6105/include/platform/Kbuild
-			destination-y := include/linux
-
-	In the example above all exported headers in the Kbuild file
-	will be located in the directory "include/linux" when exported.
-
-	--- 7.4 generic-y
+	--- 7.3 generic-y
 
 	If an architecture uses a verbatim copy of a header from
 	include/asm-generic then this is listed in the file
@@ -1336,7 +1321,7 @@ See subsequent chapter for the syntax of the Kbuild file.
 		Example: termios.h
 			#include <asm-generic/termios.h>
 
-	--- 7.5 generated-y
+	--- 7.4 generated-y
 
 	If an architecture generates other header files alongside generic-y
 	wrappers, and not included in genhdr-y, then generated-y specifies
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 3e20d03432d2..876b42cfede4 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -14,7 +14,7 @@ kbuild-file := $(srctree)/$(obj)/Kbuild
 include $(kbuild-file)
 
 # called may set destination dir (when installing to asm/)
-_dst := $(if $(destination-y),$(destination-y),$(if $(dst),$(dst),$(obj)))
+_dst := $(if $(dst),$(dst),$(obj))
 
 old-kbuild-file := $(srctree)/$(subst uapi/,,$(obj))/Kbuild
 ifneq ($(wildcard $(old-kbuild-file)),)
-- 
2.8.1

[toc] | [prev] | [next] | [standalone]


#1587794 — [PATCH v7 0/8] uapi: export all headers under uapi directories

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-24 18:00 +0100
Subject[PATCH v7 0/8] uapi: export all headers under uapi directories
Message-ID<terea-2Ov-27@gated-at.bofh.it>
In reply to#1584466
Here is the v7 of this series.

Patches #1 and #2 are just cleanup: some exported headers were still under
a non-uapi directory. Patch #3 is a fix to avoid exporting a file that was
not under an uapi directory.
After these three patches, all exported headers are under an uapi directory:
path #4 stops searching files in non uapi directories.
The patch #5 was spotted by code review: there is no in-tree user of this
functionality.
Patch #6 fixes some warnings/errors reported by 0-day tests.
Patches #7 and #8 remove the need to list explicitly headers. Now all files
under an uapi directory are exported.

This series has been tested with a 'make headers_install' on x86 and a
'make headers_install_all'. I've checked the result of both commands.

This patch is built against linus tree. If I must rebase it against the kbuild
tree, just tell me.
Michal, is this series going through your tree?

v6 -> v7:
  - rebase on last linus tree
  - patch #7: remove autogenerated files from the list in the commit log

v5 -> v6:
  - patch #6: remove change of include/uapi/linux/media.h
  - patch #7: fix hdr export when 'make O=' is used (look for genhdr files in
              the right directory)
  - patch #8: fix 'make headers_check'

v4 -> v5:
  - patch #3: get back to v3 (don't export msr-index.h)
  - patch #6: new in this version
  - patch #7: fix compilation by introducing header-n

v3 -> v4:
 - first patch has been included
 - patch #4: get back to v2 and remove arch/x86/include/asm/msr-index.h

v2 -> v3:
 - patch #1: remove arch/arm/include/asm/types.h
 - patch #2: remove arch/h8300/include/asm/bitsperlong.h
 - patch #3: remove arch/nios2/include/uapi/asm/setup.h
 - patch #4: don't export msr-index.h
 - patch #5: fix a typo: s/unput-files3-name/input-files3-name
 - patch #6: no change
 - patch #7: fix include/uapi/asm-generic/Kbuild.asm by introducing mandatory-y
 - add patch #8

v1 -> v2:
 - add patch #1 to #6
 - patch #7: remove use of header-y

Comments are welcomed,
Nicolas

[toc] | [prev] | [next] | [standalone]


#1587798 — [PATCH v7 3/8] x86: stop exporting msr-index.h to userland

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-24 18:00 +0100
Subject[PATCH v7 3/8] x86: stop exporting msr-index.h to userland
Message-ID<ternQ-2WZ-19@gated-at.bofh.it>
In reply to#1587794
Even if this file was not in an uapi directory, it was exported because
it was listed in the Kbuild file.

Fixes: b72e7464e4cf ("x86/uapi: Do not export <asm/msr-index.h> as part of the user API headers")
Suggested-by: Borislav Petkov <bp@alien8.de>
CC: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/x86/include/uapi/asm/Kbuild | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/x86/include/uapi/asm/Kbuild b/arch/x86/include/uapi/asm/Kbuild
index 3dec769cadf7..1c532b3f18ea 100644
--- a/arch/x86/include/uapi/asm/Kbuild
+++ b/arch/x86/include/uapi/asm/Kbuild
@@ -27,7 +27,6 @@ header-y += ldt.h
 header-y += mce.h
 header-y += mman.h
 header-y += msgbuf.h
-header-y += msr-index.h
 header-y += msr.h
 header-y += mtrr.h
 header-y += param.h
-- 
2.8.1

[toc] | [prev] | [next] | [standalone]


#1587799 — [PATCH v7 8/8] uapi: export all arch specifics directories

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-24 18:00 +0100
Subject[PATCH v7 8/8] uapi: export all arch specifics directories
Message-ID<ternP-2WZ-9@gated-at.bofh.it>
In reply to#1587794
This patch removes the need of subdir-y. Now all files/directories under
arch/<arch>/include/uapi/ are exported.

The only change for userland is the layout of the command 'make
headers_install_all': directories asm-<arch> are replaced by arch-<arch>/.
Those new directories contains all files/directories of the specified arch.

Note that only cris and tile have more directories than only asm:
 - arch-v[10|32] for cris;
 - arch for tile.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 Documentation/kbuild/makefiles.txt | 15 +--------------
 Makefile                           |  6 +++---
 arch/cris/include/uapi/asm/Kbuild  |  3 ---
 arch/tile/include/uapi/asm/Kbuild  |  2 --
 scripts/Makefile.headersinst       |  3 +--
 5 files changed, 5 insertions(+), 24 deletions(-)

diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index 91ffb391ed54..223b33d5195a 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -49,7 +49,6 @@ This document describes the Linux kernel Makefiles.
 		--- 7.3 generic-y
 		--- 7.4 generated-y
 		--- 7.5 mandatory-y
-		--- 7.6 subdir-y
 
 	=== 8 Kbuild Variables
 	=== 9 Makefile language
@@ -1265,7 +1264,7 @@ The pre-processing does:
 - drop all sections that are kernel internal (guarded by ifdef __KERNEL__)
 
 All headers under include/uapi/, include/generated/uapi/,
-arch/<arch>/include/uapi/asm/ and arch/<arch>/include/generated/uapi/asm/
+arch/<arch>/include/uapi/ and arch/<arch>/include/generated/uapi/
 are exported.
 
 A Kbuild file may be defined under arch/<arch>/include/uapi/asm/ and
@@ -1338,18 +1337,6 @@ See subsequent chapter for the syntax of the Kbuild file.
 	The convention is to list one subdir per line and
 	preferably in alphabetic order.
 
-	--- 7.6 subdir-y
-
-	subdir-y may be used to specify a subdirectory to be exported.
-
-		Example:
-			#arch/cris/include/uapi/asm/Kbuild
-			subdir-y += ../arch-v10/arch/
-			subdir-y += ../arch-v32/arch/
-
-	The convention is to list one subdir per line and
-	preferably in alphabetic order.
-
 === 8 Kbuild Variables
 
 The top Makefile exports the following variables:
diff --git a/Makefile b/Makefile
index b83109b5d217..ecb319dd6675 100644
--- a/Makefile
+++ b/Makefile
@@ -1128,7 +1128,7 @@ firmware_install:
 export INSTALL_HDR_PATH = $(objtree)/usr
 
 # If we do an all arch process set dst to asm-$(hdr-arch)
-hdr-dst = $(if $(KBUILD_HEADERS), dst=include/asm-$(hdr-arch), dst=include/asm)
+hdr-dst = $(if $(KBUILD_HEADERS), dst=include/arch-$(hdr-arch), dst=include)
 
 PHONY += archheaders
 archheaders:
@@ -1149,7 +1149,7 @@ headers_install: __headers
 	$(if $(wildcard $(srctree)/arch/$(hdr-arch)/include/uapi/asm/Kbuild),, \
 	  $(error Headers not exportable for the $(SRCARCH) architecture))
 	$(Q)$(MAKE) $(hdr-inst)=include/uapi
-	$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst)
+	$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi $(hdr-dst)
 
 PHONY += headers_check_all
 headers_check_all: headers_install_all
@@ -1158,7 +1158,7 @@ headers_check_all: headers_install_all
 PHONY += headers_check
 headers_check: headers_install
 	$(Q)$(MAKE) $(hdr-inst)=include/uapi HDRCHECK=1
-	$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst) HDRCHECK=1
+	$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/ $(hdr-dst) HDRCHECK=1
 
 # ---------------------------------------------------------------------------
 # Kernel selftest
diff --git a/arch/cris/include/uapi/asm/Kbuild b/arch/cris/include/uapi/asm/Kbuild
index d0c5471856e0..b15bf6bc0e94 100644
--- a/arch/cris/include/uapi/asm/Kbuild
+++ b/arch/cris/include/uapi/asm/Kbuild
@@ -1,5 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-subdir-y += ../arch-v10/arch/
-subdir-y += ../arch-v32/arch/
diff --git a/arch/tile/include/uapi/asm/Kbuild b/arch/tile/include/uapi/asm/Kbuild
index e0a50111e07f..0c74c3c5ebfa 100644
--- a/arch/tile/include/uapi/asm/Kbuild
+++ b/arch/tile/include/uapi/asm/Kbuild
@@ -2,5 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += ucontext.h
-
-subdir-y += ../arch
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 122945618ae2..1aeb4f45208f 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -2,7 +2,7 @@
 # Installing headers
 #
 # All headers under include/uapi, include/generated/uapi,
-# arch/<arch>/include/uapi/asm and arch/<arch>/include/generated/uapi/asm are
+# arch/<arch>/include/uapi and arch/<arch>/include/generated/uapi are
 # exported.
 # They are preprocessed to remove __KERNEL__ section of the file.
 #
@@ -30,7 +30,6 @@ installdir    := $(INSTALL_HDR_PATH)/$(subst uapi/,,$(_dst))
 srcdir        := $(srctree)/$(obj)
 gendir        := $(objtree)/$(gen)
 subdirs       := $(patsubst $(srcdir)/%/.,%,$(wildcard $(srcdir)/*/.))
-subdirs       += $(subdir-y)
 header-files  := $(notdir $(wildcard $(srcdir)/*.h))
 header-files  += $(notdir $(wildcard $(srcdir)/*.agh))
 header-files  := $(filter-out $(header-n), $(header-files))
-- 
2.8.1

[toc] | [prev] | [next] | [standalone]


#1587800 — [PATCH v7 4/8] Makefile.headersinst: cleanup input files

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-24 18:00 +0100
Subject[PATCH v7 4/8] Makefile.headersinst: cleanup input files
Message-ID<ternQ-2WZ-17@gated-at.bofh.it>
In reply to#1587794
After the last four patches, all exported headers are under uapi/, thus
input-files2 are not needed anymore.
The side effect is that input-files1-name is exactly header-y.

Note also that input-files3-name is genhdr-y.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 scripts/Makefile.headersinst | 34 +++++++++++-----------------------
 1 file changed, 11 insertions(+), 23 deletions(-)

diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 1106d6ca3a38..3e20d03432d2 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -40,31 +40,20 @@ wrapper-files := $(filter $(header-y), $(generic-y))
 srcdir        := $(srctree)/$(obj)
 gendir        := $(objtree)/$(gen)
 
-oldsrcdir     := $(srctree)/$(subst /uapi,,$(obj))
-
 # all headers files for this dir
 header-y      := $(filter-out $(generic-y), $(header-y))
 all-files     := $(header-y) $(genhdr-y) $(wrapper-files)
 output-files  := $(addprefix $(installdir)/, $(all-files))
 
-input-files1  := $(foreach hdr, $(header-y), \
-		   $(if $(wildcard $(srcdir)/$(hdr)), \
-			$(wildcard $(srcdir)/$(hdr))) \
-		   )
-input-files1-name := $(notdir $(input-files1))
-input-files2  := $(foreach hdr, $(header-y), \
-		   $(if  $(wildcard $(srcdir)/$(hdr)),, \
-			$(if $(wildcard $(oldsrcdir)/$(hdr)), \
-				$(wildcard $(oldsrcdir)/$(hdr)), \
-				$(error Missing UAPI file $(srcdir)/$(hdr))) \
-		   ))
-input-files2-name := $(notdir $(input-files2))
-input-files3  := $(foreach hdr, $(genhdr-y), \
-		   $(if	$(wildcard $(gendir)/$(hdr)), \
-			$(wildcard $(gendir)/$(hdr)), \
-			$(error Missing generated UAPI file $(gendir)/$(hdr)) \
-		   ))
-input-files3-name := $(notdir $(input-files3))
+# Check that all expected files exist
+$(foreach hdr, $(header-y), \
+  $(if $(wildcard $(srcdir)/$(hdr)),, \
+       $(error Missing UAPI file $(srcdir)/$(hdr)) \
+   ))
+$(foreach hdr, $(genhdr-y), \
+  $(if	$(wildcard $(gendir)/$(hdr)),, \
+       $(error Missing generated UAPI file $(gendir)/$(hdr)) \
+  ))
 
 # Work out what needs to be removed
 oldheaders    := $(patsubst $(installdir)/%,%,$(wildcard $(installdir)/*.h))
@@ -78,9 +67,8 @@ printdir = $(patsubst $(INSTALL_HDR_PATH)/%/,%,$(dir $@))
 quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\
                             file$(if $(word 2, $(all-files)),s))
       cmd_install = \
-        $(CONFIG_SHELL) $< $(installdir) $(srcdir) $(input-files1-name); \
-        $(CONFIG_SHELL) $< $(installdir) $(oldsrcdir) $(input-files2-name); \
-        $(CONFIG_SHELL) $< $(installdir) $(gendir) $(input-files3-name); \
+        $(CONFIG_SHELL) $< $(installdir) $(srcdir) $(header-y); \
+        $(CONFIG_SHELL) $< $(installdir) $(gendir) $(genhdr-y); \
         for F in $(wrapper-files); do                                   \
                 echo "\#include <asm-generic/$$F>" > $(installdir)/$$F;    \
         done;                                                           \
-- 
2.8.1

[toc] | [prev] | [next] | [standalone]


#1587801 — [PATCH v7 6/8] uapi: includes linux/types.h before exporting files

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-24 18:00 +0100
Subject[PATCH v7 6/8] uapi: includes linux/types.h before exporting files
Message-ID<ternP-2WZ-13@gated-at.bofh.it>
In reply to#1587794
Some files will be exported after the next patch. 0-day tests report the
following warning/error:
./usr/include/linux/bcache.h:8: include of <linux/types.h> is preferred over <asm/types.h>
./usr/include/linux/bcache.h:11: found __[us]{8,16,32,64} type without #include <linux/types.h>
./usr/include/linux/qrtr.h:8: found __[us]{8,16,32,64} type without #include <linux/types.h>
./usr/include/linux/cryptouser.h:39: found __[us]{8,16,32,64} type without #include <linux/types.h>
./usr/include/linux/pr.h:14: found __[us]{8,16,32,64} type without #include <linux/types.h>
./usr/include/linux/btrfs_tree.h:337: found __[us]{8,16,32,64} type without #include <linux/types.h>
./usr/include/rdma/bnxt_re-abi.h:45: found __[us]{8,16,32,64} type without #include <linux/types.h>

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 include/uapi/linux/bcache.h     | 2 +-
 include/uapi/linux/btrfs_tree.h | 2 ++
 include/uapi/linux/cryptouser.h | 2 ++
 include/uapi/linux/pr.h         | 2 ++
 include/uapi/linux/qrtr.h       | 1 +
 include/uapi/rdma/bnxt_re-abi.h | 2 ++
 6 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/bcache.h b/include/uapi/linux/bcache.h
index 22b6ad31c706..e3bb0635e94a 100644
--- a/include/uapi/linux/bcache.h
+++ b/include/uapi/linux/bcache.h
@@ -5,7 +5,7 @@
  * Bcache on disk data structures
  */
 
-#include <asm/types.h>
+#include <linux/types.h>
 
 #define BITMASK(name, type, field, offset, size)		\
 static inline __u64 name(const type *k)				\
diff --git a/include/uapi/linux/btrfs_tree.h b/include/uapi/linux/btrfs_tree.h
index d5ad15a106a7..6a261cb52d95 100644
--- a/include/uapi/linux/btrfs_tree.h
+++ b/include/uapi/linux/btrfs_tree.h
@@ -1,6 +1,8 @@
 #ifndef _BTRFS_CTREE_H_
 #define _BTRFS_CTREE_H_
 
+#include <linux/types.h>
+
 /*
  * This header contains the structure definitions and constants used
  * by file system objects that can be retrieved using
diff --git a/include/uapi/linux/cryptouser.h b/include/uapi/linux/cryptouser.h
index 11d21fce14d6..c6a09c5261e7 100644
--- a/include/uapi/linux/cryptouser.h
+++ b/include/uapi/linux/cryptouser.h
@@ -18,6 +18,8 @@
  * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
+#include <linux/types.h>
+
 /* Netlink configuration messages.  */
 enum {
 	CRYPTO_MSG_BASE = 0x10,
diff --git a/include/uapi/linux/pr.h b/include/uapi/linux/pr.h
index 57d7c0f916b6..645ef3cf3dd0 100644
--- a/include/uapi/linux/pr.h
+++ b/include/uapi/linux/pr.h
@@ -1,6 +1,8 @@
 #ifndef _UAPI_PR_H
 #define _UAPI_PR_H
 
+#include <linux/types.h>
+
 enum pr_type {
 	PR_WRITE_EXCLUSIVE		= 1,
 	PR_EXCLUSIVE_ACCESS		= 2,
diff --git a/include/uapi/linux/qrtr.h b/include/uapi/linux/qrtr.h
index 66c0748d26e2..b14ee91ec387 100644
--- a/include/uapi/linux/qrtr.h
+++ b/include/uapi/linux/qrtr.h
@@ -1,6 +1,7 @@
 #ifndef _LINUX_QRTR_H
 #define _LINUX_QRTR_H
 
+#include <linux/types.h>
 #include <linux/socket.h>
 
 struct sockaddr_qrtr {
diff --git a/include/uapi/rdma/bnxt_re-abi.h b/include/uapi/rdma/bnxt_re-abi.h
index e2c8a3f0ccec..74018bd18d72 100644
--- a/include/uapi/rdma/bnxt_re-abi.h
+++ b/include/uapi/rdma/bnxt_re-abi.h
@@ -39,6 +39,8 @@
 #ifndef __BNXT_RE_UVERBS_ABI_H__
 #define __BNXT_RE_UVERBS_ABI_H__
 
+#include <linux/types.h>
+
 #define BNXT_RE_ABI_VERSION	1
 
 struct bnxt_re_uctx_resp {
-- 
2.8.1

[toc] | [prev] | [next] | [standalone]


#1588785 — Re: [PATCH v7 7/8] uapi: export all headers under uapi directories

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-27 17:10 +0100
SubjectRe: [PATCH v7 7/8] uapi: export all headers under uapi directories
Message-ID<tfw26-7YC-19@gated-at.bofh.it>
In reply to#1587794
Le 24/02/2017 à 17:49, Nicolas Dichtel a écrit :
> Regularly, when a new header is created in include/uapi/, the developer
> forgets to add it in the corresponding Kbuild file. This error is usually
> detected after the release is out.
> 
> In fact, all headers under uapi directories should be exported, thus it's
> useless to have an exhaustive list.
> 
> After this patch, the following files, which were not exported, are now
> exported (with make headers_install_all):
> asm-arc/kvm_para.h
> asm-arc/ucontext.h
> asm-avr32/kvm_para.h
> asm-blackfin/shmparam.h
> asm-blackfin/ucontext.h
> asm-c6x/shmparam.h
> asm-c6x/ucontext.h
> asm-cris/kvm_para.h
> asm-h8300/shmparam.h
> asm-h8300/ucontext.h
> asm-hexagon/shmparam.h
> asm-m32r/kvm_para.h
> asm-m68k/kvm_para.h
> asm-m68k/shmparam.h
> asm-metag/kvm_para.h
> asm-metag/shmparam.h
> asm-metag/ucontext.h
> asm-mips/hwcap.h
> asm-mips/reg.h
> asm-mips/ucontext.h
> asm-nios2/kvm_para.h
> asm-nios2/ucontext.h
> asm-openrisc/shmparam.h
> asm-parisc/kvm_para.h
> asm-powerpc/perf_regs.h
> asm-sh/kvm_para.h
> asm-sh/ucontext.h
> asm-tile/shmparam.h
> asm-unicore32/shmparam.h
> asm-unicore32/ucontext.h
> asm-x86/hwcap2.h
> asm-xtensa/kvm_para.h
> drm/armada_drm.h
> drm/etnaviv_drm.h
> drm/vgem_drm.h
> linux/auto_dev-ioctl.h
> linux/bcache.h
> linux/btrfs_tree.h
> linux/cifs
> linux/cifs/cifs_mount.h
> linux/coresight-stm.h
> linux/cryptouser.h
> linux/genwqe
> linux/genwqe/genwqe_card.h
> linux/hash_info.h
> linux/kcm.h
> linux/kcov.h
> linux/kfd_ioctl.h
> linux/lightnvm.h
> linux/module.h
> linux/nilfs2_api.h
> linux/nilfs2_ondisk.h
> linux/nsfs.h
> linux/pr.h
> linux/qrtr.h
> linux/rpmsg.h
> linux/sed-opal.h
> linux/smc.h
> linux/smc_diag.h
> linux/stm.h
> linux/userio.h
> linux/wil6210_uapi.h
> rdma/bnxt_re-abi.h
> 
> Note that I have removed from this list the files which are generated in every
> exported directories (like .install or .install.cmd).
> 
> Thanks to Julien Floret <julien.floret@6wind.com> for the tip to get all
> subdirs with a pure makefile command.
> 
> For the record, note that exported files for asm directories are a mix of
> files listed by:
>  - include/uapi/asm-generic/Kbuild.asm;
>  - arch/<arch>/include/uapi/asm/Kbuild;
>  - arch/<arch>/include/asm/Kbuild.
> 
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
> Acked-by: Mark Salter <msalter@redhat.com>
> Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Is there any chance to get this series in before the rc1?


Regards,
Nicolas

[toc] | [prev] | [next] | [standalone]


#1589124 — Re: [PATCH v7 7/8] uapi: export all headers under uapi directories

From"Dmitry V. Levin" <ldv@altlinux.org>
Date2017-02-28 03:50 +0100
SubjectRe: [PATCH v7 7/8] uapi: export all headers under uapi directories
Message-ID<tfG1r-6nB-5@gated-at.bofh.it>
In reply to#1588785

[Multipart message — attachments visible in raw view] — view raw

On Mon, Feb 27, 2017 at 05:01:55PM +0100, Nicolas Dichtel wrote:
> Le 24/02/2017 à 17:49, Nicolas Dichtel a écrit :
> > Regularly, when a new header is created in include/uapi/, the developer
> > forgets to add it in the corresponding Kbuild file. This error is usually
> > detected after the release is out.
> > 
> > In fact, all headers under uapi directories should be exported, thus it's
> > useless to have an exhaustive list.
> > 
> > After this patch, the following files, which were not exported, are now
> > exported (with make headers_install_all):
> > asm-arc/kvm_para.h
> > asm-arc/ucontext.h
> > asm-avr32/kvm_para.h
> > asm-blackfin/shmparam.h
> > asm-blackfin/ucontext.h
> > asm-c6x/shmparam.h
> > asm-c6x/ucontext.h
> > asm-cris/kvm_para.h
> > asm-h8300/shmparam.h
> > asm-h8300/ucontext.h
> > asm-hexagon/shmparam.h
> > asm-m32r/kvm_para.h
> > asm-m68k/kvm_para.h
> > asm-m68k/shmparam.h
> > asm-metag/kvm_para.h
> > asm-metag/shmparam.h
> > asm-metag/ucontext.h
> > asm-mips/hwcap.h
> > asm-mips/reg.h
> > asm-mips/ucontext.h
> > asm-nios2/kvm_para.h
> > asm-nios2/ucontext.h
> > asm-openrisc/shmparam.h
> > asm-parisc/kvm_para.h
> > asm-powerpc/perf_regs.h
> > asm-sh/kvm_para.h
> > asm-sh/ucontext.h
> > asm-tile/shmparam.h
> > asm-unicore32/shmparam.h
> > asm-unicore32/ucontext.h
> > asm-x86/hwcap2.h
> > asm-xtensa/kvm_para.h
> > drm/armada_drm.h
> > drm/etnaviv_drm.h
> > drm/vgem_drm.h
> > linux/auto_dev-ioctl.h
> > linux/bcache.h
> > linux/btrfs_tree.h
> > linux/cifs
> > linux/cifs/cifs_mount.h
> > linux/coresight-stm.h
> > linux/cryptouser.h
> > linux/genwqe
> > linux/genwqe/genwqe_card.h
> > linux/hash_info.h
> > linux/kcm.h
> > linux/kcov.h
> > linux/kfd_ioctl.h
> > linux/lightnvm.h
> > linux/module.h
> > linux/nilfs2_api.h
> > linux/nilfs2_ondisk.h
> > linux/nsfs.h
> > linux/pr.h
> > linux/qrtr.h
> > linux/rpmsg.h
> > linux/sed-opal.h
> > linux/smc.h
> > linux/smc_diag.h
> > linux/stm.h
> > linux/userio.h
> > linux/wil6210_uapi.h
> > rdma/bnxt_re-abi.h
> > 
> > Note that I have removed from this list the files which are generated in every
> > exported directories (like .install or .install.cmd).
> > 
> > Thanks to Julien Floret <julien.floret@6wind.com> for the tip to get all
> > subdirs with a pure makefile command.
> > 
> > For the record, note that exported files for asm directories are a mix of
> > files listed by:
> >  - include/uapi/asm-generic/Kbuild.asm;
> >  - arch/<arch>/include/uapi/asm/Kbuild;
> >  - arch/<arch>/include/asm/Kbuild.
> > 
> > Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> > Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
> > Acked-by: Mark Salter <msalter@redhat.com>
> > Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
> Is there any chance to get this series in before the rc1?

Note that the following newly exported headers have userspace compilation
errors:

/usr/include/drm/armada_drm.h:26:2: error: unknown type name 'uint32_t'
  uint32_t handle;

/usr/include/linux/btrfs_tree.h:390:12: error: 'BTRFS_UUID_SIZE' undeclared here (not in a function)
  __u8 uuid[BTRFS_UUID_SIZE];

/usr/include/linux/cryptouser.h:58:16: error: 'CRYPTO_MAX_ALG_NAME' undeclared here (not in a function)
  char cru_name[CRYPTO_MAX_ALG_NAME];

/usr/include/linux/kfd_ioctl.h:33:2: error: unknown type name 'uint32_t'
  uint32_t major_version; /* from KFD */

/usr/include/linux/smc_diag.h:6:27: fatal error: rdma/ib_verbs.h: No such file or directory
 #include <rdma/ib_verbs.h>

/usr/include/linux/wil6210_uapi.h:73:2: error: unknown type name 'uint32_t'
  uint32_t op; /* enum wil_memio_op */

I think they should be fixed first.


-- 
ldv

[toc] | [prev] | [next] | [standalone]


#1589582 — Re: [PATCH v7 7/8] uapi: export all headers under uapi directories

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-28 17:00 +0100
SubjectRe: [PATCH v7 7/8] uapi: export all headers under uapi directories
Message-ID<tfSlY-6te-27@gated-at.bofh.it>
In reply to#1589124
Le 28/02/2017 à 03:48, Dmitry V. Levin a écrit :
> On Mon, Feb 27, 2017 at 05:01:55PM +0100, Nicolas Dichtel wrote:
[snip]
>> Is there any chance to get this series in before the rc1?
> 
> Note that the following newly exported headers have userspace compilation
> errors:
> 
> /usr/include/drm/armada_drm.h:26:2: error: unknown type name 'uint32_t'
>   uint32_t handle;
> 
> /usr/include/linux/btrfs_tree.h:390:12: error: 'BTRFS_UUID_SIZE' undeclared here (not in a function)
>   __u8 uuid[BTRFS_UUID_SIZE];
> 
> /usr/include/linux/cryptouser.h:58:16: error: 'CRYPTO_MAX_ALG_NAME' undeclared here (not in a function)
>   char cru_name[CRYPTO_MAX_ALG_NAME];
> 
> /usr/include/linux/kfd_ioctl.h:33:2: error: unknown type name 'uint32_t'
>   uint32_t major_version; /* from KFD */
> 
> /usr/include/linux/smc_diag.h:6:27: fatal error: rdma/ib_verbs.h: No such file or directory
>  #include <rdma/ib_verbs.h>
> 
> /usr/include/linux/wil6210_uapi.h:73:2: error: unknown type name 'uint32_t'
>   uint32_t op; /* enum wil_memio_op */
> 
> I think they should be fixed first.
Sure. Thanks for pointing this out. I will send a v8.

I'm still wondering if Michal will take this series or if it will go through
another tree.


Regards,
Nicolas

[toc] | [prev] | [next] | [standalone]


#1589780 — [PATCH v8 05/11] Makefile.headersinst: remove destination-y option

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-28 22:20 +0100
Subject[PATCH v8 05/11] Makefile.headersinst: remove destination-y option
Message-ID<tfXlD-1rB-5@gated-at.bofh.it>
In reply to#1589124
This option was added in commit c7bb349e7c25 ("kbuild: introduce destination-y
for exported headers") but never used in-tree.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Paul Bolle <pebolle@tiscali.nl>
---
 Documentation/kbuild/makefiles.txt | 23 ++++-------------------
 scripts/Makefile.headersinst       |  2 +-
 2 files changed, 5 insertions(+), 20 deletions(-)

diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index 9b9c4797fc55..37b525d329ae 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -46,9 +46,8 @@ This document describes the Linux kernel Makefiles.
 	=== 7 Kbuild syntax for exported headers
 		--- 7.1 header-y
 		--- 7.2 genhdr-y
-		--- 7.3 destination-y
-		--- 7.4 generic-y
-		--- 7.5 generated-y
+		--- 7.3 generic-y
+		--- 7.4 generated-y
 
 	=== 8 Kbuild Variables
 	=== 9 Makefile language
@@ -1295,21 +1294,7 @@ See subsequent chapter for the syntax of the Kbuild file.
 			#include/linux/Kbuild
 			genhdr-y += version.h
 
-	--- 7.3 destination-y
-
-	When an architecture has a set of exported headers that needs to be
-	exported to a different directory destination-y is used.
-	destination-y specifies the destination directory for all exported
-	headers in the file where it is present.
-
-		Example:
-			#arch/xtensa/platforms/s6105/include/platform/Kbuild
-			destination-y := include/linux
-
-	In the example above all exported headers in the Kbuild file
-	will be located in the directory "include/linux" when exported.
-
-	--- 7.4 generic-y
+	--- 7.3 generic-y
 
 	If an architecture uses a verbatim copy of a header from
 	include/asm-generic then this is listed in the file
@@ -1336,7 +1321,7 @@ See subsequent chapter for the syntax of the Kbuild file.
 		Example: termios.h
 			#include <asm-generic/termios.h>
 
-	--- 7.5 generated-y
+	--- 7.4 generated-y
 
 	If an architecture generates other header files alongside generic-y
 	wrappers, and not included in genhdr-y, then generated-y specifies
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 3e20d03432d2..876b42cfede4 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -14,7 +14,7 @@ kbuild-file := $(srctree)/$(obj)/Kbuild
 include $(kbuild-file)
 
 # called may set destination dir (when installing to asm/)
-_dst := $(if $(destination-y),$(destination-y),$(if $(dst),$(dst),$(obj)))
+_dst := $(if $(dst),$(dst),$(obj))
 
 old-kbuild-file := $(srctree)/$(subst uapi/,,$(obj))/Kbuild
 ifneq ($(wildcard $(old-kbuild-file)),)
-- 
2.8.1

[toc] | [prev] | [next] | [standalone]


#1589787 — [PATCH v8 03/11] x86: stop exporting msr-index.h to userland

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-28 22:20 +0100
Subject[PATCH v8 03/11] x86: stop exporting msr-index.h to userland
Message-ID<tfXlE-1rB-33@gated-at.bofh.it>
In reply to#1589124
Even if this file was not in an uapi directory, it was exported because
it was listed in the Kbuild file.

Fixes: b72e7464e4cf ("x86/uapi: Do not export <asm/msr-index.h> as part of the user API headers")
Suggested-by: Borislav Petkov <bp@alien8.de>
CC: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/x86/include/uapi/asm/Kbuild | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/x86/include/uapi/asm/Kbuild b/arch/x86/include/uapi/asm/Kbuild
index 3dec769cadf7..1c532b3f18ea 100644
--- a/arch/x86/include/uapi/asm/Kbuild
+++ b/arch/x86/include/uapi/asm/Kbuild
@@ -27,7 +27,6 @@ header-y += ldt.h
 header-y += mce.h
 header-y += mman.h
 header-y += msgbuf.h
-header-y += msr-index.h
 header-y += msr.h
 header-y += mtrr.h
 header-y += param.h
-- 
2.8.1

[toc] | [prev] | [next] | [standalone]


#1589791 — [PATCH v8 02/11] nios2: put setup.h in uapi

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-28 22:20 +0100
Subject[PATCH v8 02/11] nios2: put setup.h in uapi
Message-ID<tfXlE-1rB-37@gated-at.bofh.it>
In reply to#1589124
This header file is exported, but from a userland pov, it's just a wrapper
to asm-generic/setup.h.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Reviewed-by: Tobias Klauser <tklauser@distanz.ch>
---
 arch/nios2/include/uapi/asm/Kbuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/nios2/include/uapi/asm/Kbuild b/arch/nios2/include/uapi/asm/Kbuild
index e0bb972a50d7..69c965304146 100644
--- a/arch/nios2/include/uapi/asm/Kbuild
+++ b/arch/nios2/include/uapi/asm/Kbuild
@@ -2,4 +2,5 @@ include include/uapi/asm-generic/Kbuild.asm
 
 header-y += elf.h
 
+generic-y += setup.h
 generic-y += ucontext.h
-- 
2.8.1

[toc] | [prev] | [next] | [standalone]


#1589793 — [PATCH v8 00/11] uapi: export all headers under uapi directories

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-28 22:20 +0100
Subject[PATCH v8 00/11] uapi: export all headers under uapi directories
Message-ID<tfXlD-1rB-7@gated-at.bofh.it>
In reply to#1589124
Patches #1 and #2 are just cleanup: some exported headers were still under
a non-uapi directory. Patch #3 is a fix to avoid exporting a file that was
not under an uapi directory.
After these three patches, all exported headers are under an uapi directory:
path #4 stops searching files in non uapi directories.
The patch #5 was spotted by code review: there is no in-tree user of this
functionality.
Patch #6 fixes some warnings/errors reported by 0-day tests.
Patch #7 to #9 fix some errors when the corresponding files are included by
userland.
Patches #10 and #11 remove the need to list explicitly headers. Now all files
under an uapi directory are exported.

This series has been tested with a 'make headers_install' on x86 and a
'make headers_install_all'. I've checked the result of both commands.

This patch is built against linus tree. If I must rebase it against the kbuild
tree, just tell me.
Michal, is this series going through your tree?

v7 -> v8:
  - rebase on top of linus tree
  - add patch #7, #8 and #9

v6 -> v7:
  - rebase on top of linus tree
  - patch #7: remove autogenerated files from the list in the commit log

v5 -> v6:
  - patch #6: remove change of include/uapi/linux/media.h
  - patch #7: fix hdr export when 'make O=' is used (look for genhdr files in
              the right directory)
  - patch #8: fix 'make headers_check'

v4 -> v5:
  - patch #3: get back to v3 (don't export msr-index.h)
  - patch #6: new in this version
  - patch #7: fix compilation by introducing header-n

v3 -> v4:
 - first patch has been included
 - patch #4: get back to v2 and remove arch/x86/include/asm/msr-index.h

v2 -> v3:
 - patch #1: remove arch/arm/include/asm/types.h
 - patch #2: remove arch/h8300/include/asm/bitsperlong.h
 - patch #3: remove arch/nios2/include/uapi/asm/setup.h
 - patch #4: don't export msr-index.h
 - patch #5: fix a typo: s/unput-files3-name/input-files3-name
 - patch #6: no change
 - patch #7: fix include/uapi/asm-generic/Kbuild.asm by introducing mandatory-y
 - add patch #8

v1 -> v2:
 - add patch #1 to #6
 - patch #7: remove use of header-y

Comments are welcomed,
Nicolas

[toc] | [prev] | [next] | [standalone]


#1589795 — [PATCH v8 07/11] btrfs_tree.h: fix include from userland

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-28 22:30 +0100
Subject[PATCH v8 07/11] btrfs_tree.h: fix include from userland
Message-ID<tfXvj-1v9-3@gated-at.bofh.it>
In reply to#1589793
This patch prepares the uapi export by fixing the following errors:

.../linux/btrfs_tree.h:283:2: error: #error "UUID items require BTRFS_UUID_SIZE == 16!"
 #error "UUID items require BTRFS_UUID_SIZE == 16!"

.../linux/btrfs_tree.h:390:12: error: ‘BTRFS_UUID_SIZE’ undeclared here (not in a function)
  __u8 uuid[BTRFS_UUID_SIZE];
            ^
.../linux/btrfs_tree.h:796:16: error: ‘BTRFS_DEV_STAT_VALUES_MAX’ undeclared here (not in a function)
  __le64 values[BTRFS_DEV_STAT_VALUES_MAX];

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 include/uapi/linux/btrfs_tree.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/uapi/linux/btrfs_tree.h b/include/uapi/linux/btrfs_tree.h
index 6a261cb52d95..6a754ada59af 100644
--- a/include/uapi/linux/btrfs_tree.h
+++ b/include/uapi/linux/btrfs_tree.h
@@ -2,6 +2,7 @@
 #define _BTRFS_CTREE_H_
 
 #include <linux/types.h>
+#include <linux/btrfs.h>
 
 /*
  * This header contains the structure definitions and constants used
-- 
2.8.1

[toc] | [prev] | [next] | [standalone]


#1589798 — [PATCH v8 01/11] h8300: put bitsperlong.h in uapi

FromNicolas Dichtel <nicolas.dichtel@6wind.com>
Date2017-02-28 22:30 +0100
Subject[PATCH v8 01/11] h8300: put bitsperlong.h in uapi
Message-ID<tfXvj-1v9-9@gated-at.bofh.it>
In reply to#1589793
This header file is exported, thus move it to uapi.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 arch/h8300/include/asm/bitsperlong.h      | 14 --------------
 arch/h8300/include/uapi/asm/bitsperlong.h | 14 ++++++++++++++
 2 files changed, 14 insertions(+), 14 deletions(-)
 delete mode 100644 arch/h8300/include/asm/bitsperlong.h
 create mode 100644 arch/h8300/include/uapi/asm/bitsperlong.h

diff --git a/arch/h8300/include/asm/bitsperlong.h b/arch/h8300/include/asm/bitsperlong.h
deleted file mode 100644
index e140e46729ac..000000000000
--- a/arch/h8300/include/asm/bitsperlong.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef __ASM_H8300_BITS_PER_LONG
-#define __ASM_H8300_BITS_PER_LONG
-
-#include <asm-generic/bitsperlong.h>
-
-#if !defined(__ASSEMBLY__)
-/* h8300-unknown-linux required long */
-#define __kernel_size_t __kernel_size_t
-typedef unsigned long	__kernel_size_t;
-typedef long		__kernel_ssize_t;
-typedef long		__kernel_ptrdiff_t;
-#endif
-
-#endif /* __ASM_H8300_BITS_PER_LONG */
diff --git a/arch/h8300/include/uapi/asm/bitsperlong.h b/arch/h8300/include/uapi/asm/bitsperlong.h
new file mode 100644
index 000000000000..e56cf72369b6
--- /dev/null
+++ b/arch/h8300/include/uapi/asm/bitsperlong.h
@@ -0,0 +1,14 @@
+#ifndef _UAPI_ASM_H8300_BITS_PER_LONG
+#define _UAPI_ASM_H8300_BITS_PER_LONG
+
+#include <asm-generic/bitsperlong.h>
+
+#if !defined(__ASSEMBLY__)
+/* h8300-unknown-linux required long */
+#define __kernel_size_t __kernel_size_t
+typedef unsigned long	__kernel_size_t;
+typedef long		__kernel_ssize_t;
+typedef long		__kernel_ptrdiff_t;
+#endif
+
+#endif /* _UAPI_ASM_H8300_BITS_PER_LONG */
-- 
2.8.1

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | linux.kernel


csiph-web