Skip to contentSkip to conversation

uapi: add kbuild for some files

PATCH Applied Stephen Hemminger 24 participants 264 messages Dec 2, 2016 – May 16, 2017 Page 3 of 4

Subsystems (47)
lore
Share & tools
lore
#129 lore raw

PATCH v5 5/8 Makefile.headersinst: remove destination-y option

In reply to Nicolas Dichtel

This option was added in commit c7bb349e7c25 ("kbuild: introduce destination-y for exported headers") but never used in-tree.

---
 Documentation/kbuild/makefiles.txt | 23 ++++-------------------
 scripts/Makefile.headersinst       |  2 +-
 2 files changed, 5 insertions(+), 20 deletions(-)
Documentation/kbuild/makefiles.txt +4 -19
index 9b9c4797fc55..37b525d329ae 100644
@@ -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
scripts/Makefile.headersinst +1 -1
index 3e20d03432d2..876b42cfede4 100644
@@ -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)),)
Signature · 1 line
2.8.1
Acked-by on v5 5/8
#130 lore raw

Re: [PATCH v5 5/8] Makefile.headersinst: remove destination-y option

Quoted 4 lines · Nicolas Dichtel

This option was added in commit c7bb349e7c25 ("kbuild: introduce destination-y for exported headers") but never used in-tree.

I've got an identical patch in my ever growing stack of stuff that I should actually submit:

Thanks,

Paul Bolle

#131 lore raw

PATCH v5 6/8 uapi: includes linux/types.h before exporting files

In reply to Nicolas Dichtel

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/media.h:29: included file 'linux/version.h' is not exported ./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/linux/seg6.h:21: found __[us]{8,16,32,64} type without #include <linux/types.h> ./usr/include/linux/seg6_hmac.h:11: found __[us]{8,16,32,64} type without #include <linux/types.h>

---
 include/uapi/linux/bcache.h     | 2 +-
 include/uapi/linux/btrfs_tree.h | 2 ++
 include/uapi/linux/cryptouser.h | 2 ++
 include/uapi/linux/media.h      | 1 -
 include/uapi/linux/pr.h         | 2 ++
 include/uapi/linux/seg6.h       | 2 ++
 6 files changed, 9 insertions(+), 2 deletions(-)
include/uapi/linux/bcache.h +1 -1
index 22b6ad31c706..e3bb0635e94a 100644
@@ -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)				\
include/uapi/linux/btrfs_tree.h +2 -0
index d5ad15a106a7..6a261cb52d95 100644
@@ -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
include/uapi/linux/cryptouser.h +2 -0
index 11d21fce14d6..c6a09c5261e7 100644
@@ -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,
include/uapi/linux/media.h +0 -1
index 4890787731b8..27c972903b3f 100644
@@ -28,7 +28,6 @@
 #endif
 #include <linux/ioctl.h>
 #include <linux/types.h>
-#include <linux/version.h>
 
 #define MEDIA_API_VERSION	KERNEL_VERSION(0, 1, 0)
 
include/uapi/linux/pr.h +2 -0
index 57d7c0f916b6..645ef3cf3dd0 100644
@@ -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,
include/uapi/linux/seg6.h +2 -0
index c396a8052f73..33496595064c 100644
@@ -14,6 +14,8 @@
 #ifndef _UAPI_LINUX_SEG6_H
 #define _UAPI_LINUX_SEG6_H
 
+#include <linux/types.h>
+
 /*
  * SRH
  */
Signature · 1 line
2.8.1
#132 lore raw

Re: [PATCH v5 6/8] uapi: includes linux/types.h before exporting files

url: https://github.com/0day-ci/linux/commits/Nicolas-Dichtel/uapi-export-all-headers-under-uapi-directories/20170202-213944 config: i386-allmodconfig (attached as .config) compiler: gcc-6 (Debian…

Hi Nicolas,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.10-rc6 next-20170202]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Nicolas-Dichtel/uapi-export-all-headers-under-uapi-directories/20170202-213944
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:

        # save the attached .config to linux build tree
        make ARCH=i386 

All error/warnings (new ones prefixed by >>):

In file included from drivers/media/media-device.c:30:0:
drivers/media/media-device.c: In function 'media_device_get_info':

>> include/uapi/linux/media.h:32:27: error: implicit declaration of function 'KERNEL_VERSION' [-Werror=implicit-function-declaration]
    #define MEDIA_API_VERSION KERNEL_VERSION(0, 1, 0)
                              ^
>> drivers/media/media-device.c:76:24: note: in expansion of macro 'MEDIA_API_VERSION'
     info->media_version = MEDIA_API_VERSION;
                           ^~~~~~~~~~~~~~~~~
   drivers/media/media-device.c: In function 'media_device_pci_init':
>> drivers/media/media-device.c:841:25: error: 'LINUX_VERSION_CODE' undeclared (first use in this function)
     mdev->driver_version = LINUX_VERSION_CODE;
                            ^~~~~~~~~~~~~~~~~~
   drivers/media/media-device.c:841:25: note: each undeclared identifier is reported only once for each function it appears in
   drivers/media/media-device.c: In function '__media_device_usb_init':
   drivers/media/media-device.c:870:25: error: 'LINUX_VERSION_CODE' undeclared (first use in this function)
     mdev->driver_version = LINUX_VERSION_CODE;
                            ^~~~~~~~~~~~~~~~~~

cc1: some warnings being treated as errors

vim +/KERNEL_VERSION +32 include/uapi/linux/media.h

b3b7a9f1 include/uapi/linux/media.h Mauro Carvalho Chehab 2015-12-11  26  #ifndef __KERNEL__
b3b7a9f1 include/uapi/linux/media.h Mauro Carvalho Chehab 2015-12-11  27  #include <stdint.h>
b3b7a9f1 include/uapi/linux/media.h Mauro Carvalho Chehab 2015-12-11  28  #endif
140d8816 include/linux/media.h      Laurent Pinchart      2010-08-18  29  #include <linux/ioctl.h>
140d8816 include/linux/media.h      Laurent Pinchart      2010-08-18  30  #include <linux/types.h>
140d8816 include/linux/media.h      Laurent Pinchart      2010-08-18  31  
140d8816 include/linux/media.h      Laurent Pinchart      2010-08-18 @32  #define MEDIA_API_VERSION	KERNEL_VERSION(0, 1, 0)
140d8816 include/linux/media.h      Laurent Pinchart      2010-08-18  33  
140d8816 include/linux/media.h      Laurent Pinchart      2010-08-18  34  struct media_device_info {
140d8816 include/linux/media.h      Laurent Pinchart      2010-08-18  35  	char driver[16];

:::::: The code at line 32 was first introduced by commit
:::::: 140d88165c25137e871f9559e67986ed89251105 [media] media: Media device information query

:::::: TO: Laurent Pinchart <[email protected]> :::::: CC: Mauro Carvalho Chehab <[email protected]>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

#133 lore raw

Re: [PATCH v5 6/8] uapi: includes linux/types.h before exporting files

In reply to Nicolas Dichtel
url: https://github.com/0day-ci/linux/commits/Nicolas-Dichtel/uapi-export-all-headers-under-uapi-directories/20170202-213944 config: x86_64-randconfig-n0-02022216 (attached as .config) compiler…

Hi Nicolas,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.10-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Nicolas-Dichtel/uapi-export-all-headers-under-uapi-directories/20170202-213944
config: x86_64-randconfig-n0-02022216 (attached as .config)
compiler: gcc-4.8 (Debian 4.8.4-1) 4.8.4 reproduce:

        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

drivers/media/media-device.c: In function 'media_device_get_info':

>> drivers/media/media-device.c:76:2: error: implicit declaration of function 'KERNEL_VERSION' [-Werror=implicit-function-declaration]
     info->media_version = MEDIA_API_VERSION;
     ^
   drivers/media/media-device.c: In function 'media_device_pci_init':
   drivers/media/media-device.c:841:25: error: 'LINUX_VERSION_CODE' undeclared (first use in this function)
     mdev->driver_version = LINUX_VERSION_CODE;
                            ^
   drivers/media/media-device.c:841:25: note: each undeclared identifier is reported only once for each function it appears in
   drivers/media/media-device.c: In function '__media_device_usb_init':
   drivers/media/media-device.c:870:25: error: 'LINUX_VERSION_CODE' undeclared (first use in this function)
     mdev->driver_version = LINUX_VERSION_CODE;
                            ^

cc1: some warnings being treated as errors

vim +/KERNEL_VERSION +76 drivers/media/media-device.c

bcd5081b Sakari Ailus          2016-05-03  70  			sizeof(info->driver));
bb07bd6b Mauro Carvalho Chehab 2016-02-11  71  
bcd5081b Sakari Ailus          2016-05-03  72  	strlcpy(info->model, dev->model, sizeof(info->model));
bcd5081b Sakari Ailus          2016-05-03  73  	strlcpy(info->serial, dev->serial, sizeof(info->serial));
bcd5081b Sakari Ailus          2016-05-03  74  	strlcpy(info->bus_info, dev->bus_info, sizeof(info->bus_info));
140d8816 Laurent Pinchart      2010-08-18  75  
bcd5081b Sakari Ailus          2016-05-03 @76  	info->media_version = MEDIA_API_VERSION;
bcd5081b Sakari Ailus          2016-05-03  77  	info->hw_revision = dev->hw_revision;
bcd5081b Sakari Ailus          2016-05-03  78  	info->driver_version = dev->driver_version;
140d8816 Laurent Pinchart      2010-08-18  79  

:::::: The code at line 76 was first introduced by commit
:::::: bcd5081b05367d108c1380369c698a4601c41cfc [media] media: Refactor copying IOCTL arguments from and to user space

:::::: TO: Sakari Ailus <[email protected]> :::::: CC: Mauro Carvalho Chehab <[email protected]>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

#134 lore raw

PATCH v5 7/8 uapi: export all headers under uapi directories

In reply to Nicolas Dichtel

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-xtensa/kvm_para.h
drm/armada_drm.h
drm/etnaviv_drm.h
drm/omap_drm.h
drm/vgem_drm.h
linux/auto_dev-ioctl.h
linux/batman_adv.h
linux/bcache.h
linux/btrfs_tree.h
linux/cifs
linux/cifs/..install.cmd
linux/cifs/.install
linux/cifs/cifs_mount.h
linux/coresight-stm.h
linux/cryptouser.h
linux/dma-buf.h
linux/genwqe
linux/genwqe/..install.cmd
linux/genwqe/.install
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/seg6.h
linux/seg6_genl.h
linux/seg6_hmac.h
linux/seg6_iptunnel.h
linux/stm.h
linux/userio.h
linux/wil6210_uapi.h

Thanks to Julien Floret <[email protected]> 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.

---
 Documentation/kbuild/makefiles.txt          |  66 ++--
 arch/alpha/include/uapi/asm/Kbuild          |  41 ---
 arch/arc/include/uapi/asm/Kbuild            |   3 -
 arch/arm/include/uapi/asm/Kbuild            |  17 -
 arch/arm64/include/uapi/asm/Kbuild          |  18 --
 arch/avr32/include/uapi/asm/Kbuild          |  20 --
 arch/blackfin/include/uapi/asm/Kbuild       |  17 -
 arch/c6x/include/uapi/asm/Kbuild            |   8 -
 arch/cris/include/uapi/arch-v10/arch/Kbuild |   5 -
 arch/cris/include/uapi/arch-v32/arch/Kbuild |   3 -
 arch/cris/include/uapi/asm/Kbuild           |  43 +--
 arch/frv/include/uapi/asm/Kbuild            |  33 --
 arch/h8300/include/uapi/asm/Kbuild          |  28 --
 arch/hexagon/include/asm/Kbuild             |   3 -
 arch/hexagon/include/uapi/asm/Kbuild        |  13 -
 arch/ia64/include/uapi/asm/Kbuild           |  45 ---
 arch/m32r/include/uapi/asm/Kbuild           |  31 --
 arch/m68k/include/uapi/asm/Kbuild           |  24 --
 arch/metag/include/uapi/asm/Kbuild          |   8 -
 arch/microblaze/include/uapi/asm/Kbuild     |  32 --
 arch/mips/include/uapi/asm/Kbuild           |  37 ---
 arch/mn10300/include/uapi/asm/Kbuild        |  32 --
 arch/nios2/include/uapi/asm/Kbuild          |   3 +-
 arch/openrisc/include/asm/Kbuild            |   3 -
 arch/openrisc/include/uapi/asm/Kbuild       |   8 -
 arch/parisc/include/uapi/asm/Kbuild         |  28 --
 arch/powerpc/include/uapi/asm/Kbuild        |  45 ---
 arch/s390/include/uapi/asm/Kbuild           |  52 ---
 arch/score/include/asm/Kbuild               |   4 -
 arch/score/include/uapi/asm/Kbuild          |  32 --
 arch/sh/include/uapi/asm/Kbuild             |  23 --
 arch/sparc/include/uapi/asm/Kbuild          |  48 ---
 arch/tile/include/asm/Kbuild                |   3 -
 arch/tile/include/uapi/arch/Kbuild          |  17 -
 arch/tile/include/uapi/asm/Kbuild           |  19 +-
 arch/unicore32/include/uapi/asm/Kbuild      |   6 -
 arch/x86/include/uapi/asm/Kbuild            |  58 ----
 arch/xtensa/include/uapi/asm/Kbuild         |  23 --
 include/Kbuild                              |   2 -
 include/asm-generic/Kbuild.asm              |   1 -
 include/scsi/fc/Kbuild                      |   0
 include/uapi/Kbuild                         |  15 -
 include/uapi/asm-generic/Kbuild             |  36 ---
 include/uapi/asm-generic/Kbuild.asm         |  62 ++--
 include/uapi/drm/Kbuild                     |  22 --
 include/uapi/linux/Kbuild                   | 485 +---------------------------
 include/uapi/linux/android/Kbuild           |   2 -
 include/uapi/linux/byteorder/Kbuild         |   3 -
 include/uapi/linux/caif/Kbuild              |   3 -
 include/uapi/linux/can/Kbuild               |   6 -
 include/uapi/linux/dvb/Kbuild               |   9 -
 include/uapi/linux/hdlc/Kbuild              |   2 -
 include/uapi/linux/hsi/Kbuild               |   2 -
 include/uapi/linux/iio/Kbuild               |   3 -
 include/uapi/linux/isdn/Kbuild              |   2 -
 include/uapi/linux/mmc/Kbuild               |   2 -
 include/uapi/linux/netfilter/Kbuild         |  89 -----
 include/uapi/linux/netfilter/ipset/Kbuild   |   5 -
 include/uapi/linux/netfilter_arp/Kbuild     |   3 -
 include/uapi/linux/netfilter_bridge/Kbuild  |  18 --
 include/uapi/linux/netfilter_ipv4/Kbuild    |  10 -
 include/uapi/linux/netfilter_ipv6/Kbuild    |  13 -
 include/uapi/linux/nfsd/Kbuild              |   6 -
 include/uapi/linux/raid/Kbuild              |   3 -
 include/uapi/linux/spi/Kbuild               |   2 -
 include/uapi/linux/sunrpc/Kbuild            |   2 -
 include/uapi/linux/tc_act/Kbuild            |  15 -
 include/uapi/linux/tc_ematch/Kbuild         |   5 -
 include/uapi/linux/usb/Kbuild               |  12 -
 include/uapi/linux/wimax/Kbuild             |   2 -
 include/uapi/misc/Kbuild                    |   2 -
 include/uapi/mtd/Kbuild                     |   6 -
 include/uapi/rdma/Kbuild                    |  19 --
 include/uapi/rdma/hfi/Kbuild                |   2 -
 include/uapi/scsi/Kbuild                    |   6 -
 include/uapi/scsi/fc/Kbuild                 |   5 -
 include/uapi/sound/Kbuild                   |  16 -
 include/uapi/video/Kbuild                   |   4 -
 include/uapi/xen/Kbuild                     |   5 -
 include/video/Kbuild                        |   0
 scripts/Makefile.headersinst                |  46 +--
 81 files changed, 111 insertions(+), 1741 deletions(-)
 delete mode 100644 arch/cris/include/uapi/arch-v10/arch/Kbuild
 delete mode 100644 arch/cris/include/uapi/arch-v32/arch/Kbuild
 delete mode 100644 arch/tile/include/uapi/arch/Kbuild
 delete mode 100644 include/Kbuild
 delete mode 100644 include/asm-generic/Kbuild.asm
 delete mode 100644 include/scsi/fc/Kbuild
 delete mode 100644 include/uapi/Kbuild
 delete mode 100644 include/uapi/asm-generic/Kbuild
 delete mode 100644 include/uapi/drm/Kbuild
 delete mode 100644 include/uapi/linux/android/Kbuild
 delete mode 100644 include/uapi/linux/byteorder/Kbuild
 delete mode 100644 include/uapi/linux/caif/Kbuild
 delete mode 100644 include/uapi/linux/can/Kbuild
 delete mode 100644 include/uapi/linux/dvb/Kbuild
 delete mode 100644 include/uapi/linux/hdlc/Kbuild
 delete mode 100644 include/uapi/linux/hsi/Kbuild
 delete mode 100644 include/uapi/linux/iio/Kbuild
 delete mode 100644 include/uapi/linux/isdn/Kbuild
 delete mode 100644 include/uapi/linux/mmc/Kbuild
 delete mode 100644 include/uapi/linux/netfilter/Kbuild
 delete mode 100644 include/uapi/linux/netfilter/ipset/Kbuild
 delete mode 100644 include/uapi/linux/netfilter_arp/Kbuild
 delete mode 100644 include/uapi/linux/netfilter_bridge/Kbuild
 delete mode 100644 include/uapi/linux/netfilter_ipv4/Kbuild
 delete mode 100644 include/uapi/linux/netfilter_ipv6/Kbuild
 delete mode 100644 include/uapi/linux/nfsd/Kbuild
 delete mode 100644 include/uapi/linux/raid/Kbuild
 delete mode 100644 include/uapi/linux/spi/Kbuild
 delete mode 100644 include/uapi/linux/sunrpc/Kbuild
 delete mode 100644 include/uapi/linux/tc_act/Kbuild
 delete mode 100644 include/uapi/linux/tc_ematch/Kbuild
 delete mode 100644 include/uapi/linux/usb/Kbuild
 delete mode 100644 include/uapi/linux/wimax/Kbuild
 delete mode 100644 include/uapi/misc/Kbuild
 delete mode 100644 include/uapi/mtd/Kbuild
 delete mode 100644 include/uapi/rdma/Kbuild
 delete mode 100644 include/uapi/rdma/hfi/Kbuild
 delete mode 100644 include/uapi/scsi/Kbuild
 delete mode 100644 include/uapi/scsi/fc/Kbuild
 delete mode 100644 include/uapi/sound/Kbuild
 delete mode 100644 include/uapi/video/Kbuild
 delete mode 100644 include/uapi/xen/Kbuild
 delete mode 100644 include/video/Kbuild
Documentation/kbuild/makefiles.txt +41 -25
index 37b525d329ae..91ffb391ed54 100644
@@ -44,10 +44,12 @@ This document describes the Linux kernel Makefiles.
 	   --- 6.11 Post-link pass
 
 	=== 7 Kbuild syntax for exported headers
-		--- 7.1 header-y
+		--- 7.1 header-n
 		--- 7.2 genhdr-y
 		--- 7.3 generic-y
 		--- 7.4 generated-y
+		--- 7.5 mandatory-y
+		--- 7.6 subdir-y
 
 	=== 8 Kbuild Variables
 	=== 9 Makefile language
@@ -1235,7 +1237,7 @@ When kbuild executes, the following steps are followed (roughly):
 	that may be shared between individual architectures.
 	The recommended approach how to use a generic header file is
 	to list the file in the Kbuild file.
-	See "7.4 generic-y" for further info on syntax etc.
+	See "7.3 generic-y" for further info on syntax etc.
 
 --- 6.11 Post-link pass
 
@@ -1262,37 +1264,30 @@ The pre-processing does:
 - drop include of compiler.h
 - drop all sections that are kernel internal (guarded by ifdef __KERNEL__)
 
-Each relevant directory contains a file name "Kbuild" which specifies the
-headers to be exported.
-See subsequent chapter for the syntax of the Kbuild file.
-
-	--- 7.1 header-y
-
-	header-y specifies header files to be exported.
-
-		Example:
-			#include/linux/Kbuild
-			header-y += usb/
-			header-y += aio_abi.h
+All headers under include/uapi/, include/generated/uapi/,
+arch/<arch>/include/uapi/asm/ and arch/<arch>/include/generated/uapi/asm/
+are exported.
 
-	The convention is to list one file per line and
-	preferably in alphabetic order.
+A Kbuild file may be defined under arch/<arch>/include/uapi/asm/ and
+arch/<arch>/include/asm/ to list asm files coming from asm-generic.
+See subsequent chapter for the syntax of the Kbuild file.
 
-	header-y also specifies which subdirectories to visit.
-	A subdirectory is identified by a trailing '/' which
-	can be seen in the example above for the usb subdirectory.
+	--- 7.1 header-n
 
-	Subdirectories are visited before their parent directories.
+	header-n is essentially used by include/uapi/linux/Kbuild to avoid
+	exporting specific headers (e.g. kvm.h) on architectures that do not
+	support it. It should be avoided as much as possible.
 
 	--- 7.2 genhdr-y
 
-	genhdr-y specifies generated files to be exported.
-	Generated files are special as they need to be looked
-	up in another directory when doing 'make O=...' builds.
+	genhdr-y specifies asm files to be generated.
 
 		Example:
-			#include/linux/Kbuild
-			genhdr-y += version.h
+			#arch/x86/include/uapi/asm/Kbuild
+			genhdr-y += unistd_32.h
+			genhdr-y += unistd_64.h
+			genhdr-y += unistd_x32.h
+
 
 	--- 7.3 generic-y
 
@@ -1334,6 +1329,27 @@ See subsequent chapter for the syntax of the Kbuild file.
 			#arch/x86/include/asm/Kbuild
 			generated-y += syscalls_32.h
 
+	--- 7.5 mandatory-y
+
+	mandatory-y is essentially used by include/uapi/asm-generic/Kbuild.asm
+	to define the minimun set of headers that must be exported in
+	include/asm.
+
+	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:
arch/alpha/include/uapi/asm/Kbuild +0 -41

43 lines not on this page · raw message

arch/arc/include/uapi/asm/Kbuild +0 -3
index f50d02df78d5..b15bf6bc0e94 100644
@@ -1,5 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-header-y += elf.h
-header-y += page.h
-header-y += cachectl.h
arch/arm/include/uapi/asm/Kbuild +0 -17
index 46a76cd6acb6..607f702c2d62 100644
@@ -1,23 +1,6 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += auxvec.h
-header-y += byteorder.h
-header-y += fcntl.h
-header-y += hwcap.h
-header-y += ioctls.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += perf_regs.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += unistd.h
 genhdr-y += unistd-common.h
 genhdr-y += unistd-oabi.h
 genhdr-y += unistd-eabi.h
arch/arm64/include/uapi/asm/Kbuild +0 -18
index 825b0fe51c2b..13a97aa2285f 100644
@@ -2,21 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += kvm_para.h
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += fcntl.h
-header-y += hwcap.h
-header-y += kvm_para.h
-header-y += perf_regs.h
-header-y += param.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += stat.h
-header-y += statfs.h
-header-y += ucontext.h
-header-y += unistd.h
arch/avr32/include/uapi/asm/Kbuild +0 -20
index 08d8a3d76ea8..610395083364 100644
@@ -1,26 +1,6 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += auxvec.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
 generic-y += bitsperlong.h
 generic-y += errno.h
 generic-y += fcntl.h
arch/blackfin/include/uapi/asm/Kbuild +0 -17
index 0bd28f77abc3..b15bf6bc0e94 100644
@@ -1,19 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += bfin_sport.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += fcntl.h
-header-y += fixed_code.h
-header-y += ioctls.h
-header-y += kvm_para.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += stat.h
-header-y += swab.h
-header-y += unistd.h
arch/c6x/include/uapi/asm/Kbuild +0 -8
index e9bc2b2b8147..13a97aa2285f 100644
@@ -2,11 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += kvm_para.h
-
-header-y += byteorder.h
-header-y += kvm_para.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += swab.h
-header-y += unistd.h
arch/cris/include/uapi/arch-v10/arch/Kbuild deleted +0 -5
deleted file mode 100644
index 9048c87a782b..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += sv_addr.agh
-header-y += sv_addr_ag.h
-header-y += svinto.h
-header-y += user.h
arch/cris/include/uapi/arch-v32/arch/Kbuild deleted +0 -3
deleted file mode 100644
index 59efffd16b61..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += cryptocop.h
-header-y += user.h
arch/cris/include/uapi/asm/Kbuild +2 -41

46 lines not on this page · raw message

arch/frv/include/uapi/asm/Kbuild +0 -33
index 42a2b33461c0..b15bf6bc0e94 100644
@@ -1,35 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += registers.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/h8300/include/uapi/asm/Kbuild +0 -28
index fb6101a5d4f1..b15bf6bc0e94 100644
@@ -1,30 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += siginfo.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/hexagon/include/asm/Kbuild +0 -3
index db8ddabc6bd2..f3b1ceb5c1e4 100644
@@ -1,6 +1,3 @@
-
-header-y += ucontext.h
-
 generic-y += auxvec.h
 generic-y += barrier.h
 generic-y += bug.h
arch/hexagon/include/uapi/asm/Kbuild +0 -13
index c31706c38631..b15bf6bc0e94 100644
@@ -1,15 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += kvm_para.h
-header-y += param.h
-header-y += ptrace.h
-header-y += registers.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += swab.h
-header-y += unistd.h
-header-y += user.h
arch/ia64/include/uapi/asm/Kbuild +0 -45

48 lines not on this page · raw message

arch/m32r/include/uapi/asm/Kbuild +0 -31
index 43937a61d6cf..b15bf6bc0e94 100644
@@ -1,33 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/m68k/include/uapi/asm/Kbuild +0 -24
index 6a2d257bdfb2..64368077235a 100644
@@ -9,27 +9,3 @@ generic-y += socket.h
 generic-y += sockios.h
 generic-y += termbits.h
 generic-y += termios.h
-
-header-y += a.out.h
-header-y += bootinfo.h
-header-y += bootinfo-amiga.h
-header-y += bootinfo-apollo.h
-header-y += bootinfo-atari.h
-header-y += bootinfo-hp300.h
-header-y += bootinfo-mac.h
-header-y += bootinfo-q40.h
-header-y += bootinfo-vme.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += fcntl.h
-header-y += ioctls.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += stat.h
-header-y += swab.h
-header-y += unistd.h
arch/metag/include/uapi/asm/Kbuild +0 -8
index ab78be2b6eb0..b29731ebd7a9 100644
@@ -1,14 +1,6 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += byteorder.h
-header-y += ech.h
-header-y += ptrace.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += swab.h
-header-y += unistd.h
-
 generic-y += mman.h
 generic-y += resource.h
 generic-y += setup.h
arch/microblaze/include/uapi/asm/Kbuild +0 -32
index 1aac99f87df1..2178c78c7c1a 100644
@@ -2,35 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += types.h
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += elf.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += unistd.h
arch/mips/include/uapi/asm/Kbuild +0 -37
index f2cf41461146..a0266feba9e6 100644
@@ -2,40 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += ipcbuf.h
-
-header-y += auxvec.h
-header-y += bitfield.h
-header-y += bitsperlong.h
-header-y += break.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += inst.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += sgidefs.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += sysmips.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/mn10300/include/uapi/asm/Kbuild +0 -32
index 040178cdb3eb..b15bf6bc0e94 100644
@@ -1,34 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/nios2/include/uapi/asm/Kbuild +1 -2
index 69c965304146..374bd123329f 100644
@@ -1,6 +1,5 @@
+# UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += elf.h
-
 generic-y += setup.h
 generic-y += ucontext.h
arch/openrisc/include/asm/Kbuild +0 -3
index 2832f031fb11..561915716fd9 100644
@@ -1,6 +1,3 @@
-
-header-y += ucontext.h
-
 generic-y += atomic.h
 generic-y += auxvec.h
 generic-y += barrier.h
arch/openrisc/include/uapi/asm/Kbuild +0 -8
index 80761eb82b5f..b15bf6bc0e94 100644
@@ -1,10 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += byteorder.h
-header-y += elf.h
-header-y += kvm_para.h
-header-y += param.h
-header-y += ptrace.h
-header-y += sigcontext.h
-header-y += unistd.h
arch/parisc/include/uapi/asm/Kbuild +0 -28
index 348356c99514..3971c60a7e7f 100644
@@ -2,31 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += resource.h
-
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += pdc.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/powerpc/include/uapi/asm/Kbuild +0 -45

47 lines not on this page · raw message

arch/s390/include/uapi/asm/Kbuild +0 -52

54 lines not on this page · raw message

arch/score/include/asm/Kbuild +0 -4
index a05218ff3fe4..128ca7ec0220 100644
@@ -1,7 +1,3 @@
-
-header-y +=
-
-
 generic-y += barrier.h
 generic-y += clkdev.h
 generic-y += cputime.h
arch/score/include/uapi/asm/Kbuild +0 -32
index 040178cdb3eb..b15bf6bc0e94 100644
@@ -1,34 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/sh/include/uapi/asm/Kbuild +0 -23
index 60613ae78513..b15bf6bc0e94 100644
@@ -1,25 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += cpu-features.h
-header-y += hw_breakpoint.h
-header-y += ioctls.h
-header-y += posix_types.h
-header-y += posix_types_32.h
-header-y += posix_types_64.h
-header-y += ptrace.h
-header-y += ptrace_32.h
-header-y += ptrace_64.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += sockios.h
-header-y += stat.h
-header-y += swab.h
-header-y += types.h
-header-y += unistd.h
-header-y += unistd_32.h
-header-y += unistd_64.h
arch/sparc/include/uapi/asm/Kbuild +0 -48

50 lines not on this page · raw message

arch/tile/include/asm/Kbuild +0 -3
index 2d1f5638974c..057eaa533877 100644
@@ -1,6 +1,3 @@
-
-header-y += ../arch/
-
 generic-y += bug.h
 generic-y += bugs.h
 generic-y += clkdev.h
arch/tile/include/uapi/arch/Kbuild deleted +0 -17
deleted file mode 100644
index 97dfbecec6b6..000000000000
@@ -1,17 +0,0 @@
-# UAPI Header export list
-header-y += abi.h
-header-y += chip.h
-header-y += chip_tilegx.h
-header-y += chip_tilepro.h
-header-y += icache.h
-header-y += interrupts.h
-header-y += interrupts_32.h
-header-y += interrupts_64.h
-header-y += opcode.h
-header-y += opcode_tilegx.h
-header-y += opcode_tilepro.h
-header-y += sim.h
-header-y += sim_def.h
-header-y += spr_def.h
-header-y += spr_def_32.h
-header-y += spr_def_64.h
arch/tile/include/uapi/asm/Kbuild +2 -17
index c20db8e428bf..e0a50111e07f 100644
@@ -1,21 +1,6 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += hardwall.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += stat.h
-header-y += swab.h
-header-y += ucontext.h
-header-y += unistd.h
-
 generic-y += ucontext.h
+
+subdir-y += ../arch
arch/unicore32/include/uapi/asm/Kbuild +0 -6
index 0514d7ad6855..13a97aa2285f 100644
@@ -1,10 +1,4 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += byteorder.h
-header-y += kvm_para.h
-header-y += ptrace.h
-header-y += sigcontext.h
-header-y += unistd.h
-
 generic-y += kvm_para.h
arch/x86/include/uapi/asm/Kbuild +0 -58

61 lines not on this page · raw message

arch/xtensa/include/uapi/asm/Kbuild +0 -23
index 56aad54e7fb7..b15bf6bc0e94 100644
@@ -1,25 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += byteorder.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += swab.h
-header-y += termbits.h
-header-y += types.h
-header-y += unistd.h
include/Kbuild deleted +0 -2
deleted file mode 100644
index bab1145bc7a7..000000000000
@@ -1,2 +0,0 @@
-# Top-level Makefile calls into asm-$(ARCH)
-# List only non-arch directories below
include/asm-generic/Kbuild.asm deleted +0 -1
deleted file mode 100644
index d2ee86b4c091..000000000000
@@ -1 +0,0 @@
-include include/uapi/asm-generic/Kbuild.asm
include/scsi/fc/Kbuild deleted +0 -0
deleted file mode 100644
index e69de29bb2d1..000000000000
include/uapi/Kbuild deleted +0 -15
deleted file mode 100644
index 245aa6e05e6a..000000000000
@@ -1,15 +0,0 @@
-# UAPI Header export list
-# Top-level Makefile calls into asm-$(ARCH)
-# List only non-arch directories below
-
-
-header-y += asm-generic/
-header-y += linux/
-header-y += sound/
-header-y += mtd/
-header-y += rdma/
-header-y += video/
-header-y += drm/
-header-y += xen/
-header-y += scsi/
-header-y += misc/
include/uapi/asm-generic/Kbuild deleted +0 -36
deleted file mode 100644
index b73de7bb7a62..000000000000
@@ -1,36 +0,0 @@
-# UAPI Header export list
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += errno-base.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += int-l64.h
-header-y += int-ll64.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman-common.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += shmparam.h
-header-y += siginfo.h
-header-y += signal-defs.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += ucontext.h
-header-y += unistd.h
include/uapi/asm-generic/Kbuild.asm +31 -31

69 lines not on this page · raw message

include/uapi/drm/Kbuild deleted +0 -22
deleted file mode 100644
index 9355dd8eff3b..000000000000
@@ -1,22 +0,0 @@
-# UAPI Header export list
-header-y += drm.h
-header-y += drm_fourcc.h
-header-y += drm_mode.h
-header-y += drm_sarea.h
-header-y += amdgpu_drm.h
-header-y += exynos_drm.h
-header-y += i810_drm.h
-header-y += i915_drm.h
-header-y += mga_drm.h
-header-y += nouveau_drm.h
-header-y += qxl_drm.h
-header-y += r128_drm.h
-header-y += radeon_drm.h
-header-y += savage_drm.h
-header-y += sis_drm.h
-header-y += tegra_drm.h
-header-y += via_drm.h
-header-y += vmwgfx_drm.h
-header-y += msm_drm.h
-header-y += vc4_drm.h
-header-y += virtgpu_drm.h
include/uapi/linux/Kbuild +9 -476

492 lines not on this page · raw message

include/uapi/linux/android/Kbuild deleted +0 -2
deleted file mode 100644
index ca011eec252a..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += binder.h
include/uapi/linux/byteorder/Kbuild deleted +0 -3
deleted file mode 100644
index 619225b9ff2e..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += big_endian.h
-header-y += little_endian.h
include/uapi/linux/caif/Kbuild deleted +0 -3
deleted file mode 100644
index 43396612d3a3..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += caif_socket.h
-header-y += if_caif.h
include/uapi/linux/can/Kbuild deleted +0 -6
deleted file mode 100644
index 21c91bf25a29..000000000000
@@ -1,6 +0,0 @@
-# UAPI Header export list
-header-y += bcm.h
-header-y += error.h
-header-y += gw.h
-header-y += netlink.h
-header-y += raw.h
include/uapi/linux/dvb/Kbuild deleted +0 -9
deleted file mode 100644
index d40942cfc627..000000000000
@@ -1,9 +0,0 @@
-# UAPI Header export list
-header-y += audio.h
-header-y += ca.h
-header-y += dmx.h
-header-y += frontend.h
-header-y += net.h
-header-y += osd.h
-header-y += version.h
-header-y += video.h
include/uapi/linux/hdlc/Kbuild deleted +0 -2
deleted file mode 100644
index 8c1d2cb75e33..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += ioctl.h
include/uapi/linux/hsi/Kbuild deleted +0 -2
deleted file mode 100644
index a16a00544258..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += hsi_char.h cs-protocol.h
include/uapi/linux/iio/Kbuild deleted +0 -3
deleted file mode 100644
index 86f76d84c44f..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += events.h
-header-y += types.h
include/uapi/linux/isdn/Kbuild deleted +0 -2
deleted file mode 100644
index 89e52850bf29..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += capicmd.h
include/uapi/linux/mmc/Kbuild deleted +0 -2
deleted file mode 100644
index 8c1d2cb75e33..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += ioctl.h
include/uapi/linux/netfilter/Kbuild deleted +0 -89

89 lines not on this page · raw message

include/uapi/linux/netfilter/ipset/Kbuild deleted +0 -5
deleted file mode 100644
index d2680423d9ab..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += ip_set.h
-header-y += ip_set_bitmap.h
-header-y += ip_set_hash.h
-header-y += ip_set_list.h
include/uapi/linux/netfilter_arp/Kbuild deleted +0 -3
deleted file mode 100644
index 62d5637cc0ac..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += arp_tables.h
-header-y += arpt_mangle.h
include/uapi/linux/netfilter_bridge/Kbuild deleted +0 -18
deleted file mode 100644
index 0fbad8ef96de..000000000000
@@ -1,18 +0,0 @@
-# UAPI Header export list
-header-y += ebt_802_3.h
-header-y += ebt_among.h
-header-y += ebt_arp.h
-header-y += ebt_arpreply.h
-header-y += ebt_ip.h
-header-y += ebt_ip6.h
-header-y += ebt_limit.h
-header-y += ebt_log.h
-header-y += ebt_mark_m.h
-header-y += ebt_mark_t.h
-header-y += ebt_nat.h
-header-y += ebt_nflog.h
-header-y += ebt_pkttype.h
-header-y += ebt_redirect.h
-header-y += ebt_stp.h
-header-y += ebt_vlan.h
-header-y += ebtables.h
include/uapi/linux/netfilter_ipv4/Kbuild deleted +0 -10
deleted file mode 100644
index ecb291df390e..000000000000
@@ -1,10 +0,0 @@
-# UAPI Header export list
-header-y += ip_tables.h
-header-y += ipt_CLUSTERIP.h
-header-y += ipt_ECN.h
-header-y += ipt_LOG.h
-header-y += ipt_REJECT.h
-header-y += ipt_TTL.h
-header-y += ipt_ah.h
-header-y += ipt_ecn.h
-header-y += ipt_ttl.h
include/uapi/linux/netfilter_ipv6/Kbuild deleted +0 -13
deleted file mode 100644
index 75a668ca2353..000000000000
@@ -1,13 +0,0 @@
-# UAPI Header export list
-header-y += ip6_tables.h
-header-y += ip6t_HL.h
-header-y += ip6t_LOG.h
-header-y += ip6t_NPT.h
-header-y += ip6t_REJECT.h
-header-y += ip6t_ah.h
-header-y += ip6t_frag.h
-header-y += ip6t_hl.h
-header-y += ip6t_ipv6header.h
-header-y += ip6t_mh.h
-header-y += ip6t_opts.h
-header-y += ip6t_rt.h
include/uapi/linux/nfsd/Kbuild deleted +0 -6
deleted file mode 100644
index c11bc404053c..000000000000
@@ -1,6 +0,0 @@
-# UAPI Header export list
-header-y += cld.h
-header-y += debug.h
-header-y += export.h
-header-y += nfsfh.h
-header-y += stats.h
include/uapi/linux/raid/Kbuild deleted +0 -3
deleted file mode 100644
index e2c3d25405d7..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += md_p.h
-header-y += md_u.h
include/uapi/linux/spi/Kbuild deleted +0 -2
deleted file mode 100644
index 0cc747eff165..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += spidev.h
include/uapi/linux/sunrpc/Kbuild deleted +0 -2
deleted file mode 100644
index 8e02e47c20fb..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += debug.h
include/uapi/linux/tc_act/Kbuild deleted +0 -15
deleted file mode 100644
index e3db7403296f..000000000000
@@ -1,15 +0,0 @@
-# UAPI Header export list
-header-y += tc_csum.h
-header-y += tc_defact.h
-header-y += tc_gact.h
-header-y += tc_ipt.h
-header-y += tc_mirred.h
-header-y += tc_nat.h
-header-y += tc_pedit.h
-header-y += tc_skbedit.h
-header-y += tc_vlan.h
-header-y += tc_bpf.h
-header-y += tc_connmark.h
-header-y += tc_ife.h
-header-y += tc_tunnel_key.h
-header-y += tc_skbmod.h
include/uapi/linux/tc_ematch/Kbuild deleted +0 -5
deleted file mode 100644
index 53fca3925535..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += tc_em_cmp.h
-header-y += tc_em_meta.h
-header-y += tc_em_nbyte.h
-header-y += tc_em_text.h
include/uapi/linux/usb/Kbuild deleted +0 -12
deleted file mode 100644
index 4cc4d6e7e523..000000000000
@@ -1,12 +0,0 @@
-# UAPI Header export list
-header-y += audio.h
-header-y += cdc.h
-header-y += cdc-wdm.h
-header-y += ch11.h
-header-y += ch9.h
-header-y += functionfs.h
-header-y += g_printer.h
-header-y += gadgetfs.h
-header-y += midi.h
-header-y += tmc.h
-header-y += video.h
include/uapi/linux/wimax/Kbuild deleted +0 -2
deleted file mode 100644
index 1c97be49971f..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += i2400m.h
include/uapi/misc/Kbuild deleted +0 -2
deleted file mode 100644
index e96cae7d58c9..000000000000
@@ -1,2 +0,0 @@
-# misc Header export list
-header-y += cxl.h
include/uapi/mtd/Kbuild deleted +0 -6
deleted file mode 100644
index 5a691e10cd0e..000000000000
@@ -1,6 +0,0 @@
-# UAPI Header export list
-header-y += inftl-user.h
-header-y += mtd-abi.h
-header-y += mtd-user.h
-header-y += nftl-user.h
-header-y += ubi-user.h
include/uapi/rdma/Kbuild deleted +0 -19
deleted file mode 100644
index bb68cb1b04ed..000000000000
@@ -1,19 +0,0 @@
-# UAPI Header export list
-header-y += ib_user_cm.h
-header-y += ib_user_mad.h
-header-y += ib_user_sa.h
-header-y += ib_user_verbs.h
-header-y += rdma_netlink.h
-header-y += rdma_user_cm.h
-header-y += hfi/
-header-y += rdma_user_rxe.h
-header-y += cxgb3-abi.h
-header-y += cxgb4-abi.h
-header-y += mlx4-abi.h
-header-y += mlx5-abi.h
-header-y += mthca-abi.h
-header-y += nes-abi.h
-header-y += ocrdma-abi.h
-header-y += hns-abi.h
-header-y += vmw_pvrdma-abi.h
-header-y += qedr-abi.h
include/uapi/rdma/hfi/Kbuild deleted +0 -2
deleted file mode 100644
index ef23c294fc71..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += hfi1_user.h
include/uapi/scsi/Kbuild deleted +0 -6
deleted file mode 100644
index d791e0ad509d..000000000000
@@ -1,6 +0,0 @@
-# UAPI Header export list
-header-y += fc/
-header-y += scsi_bsg_fc.h
-header-y += scsi_netlink.h
-header-y += scsi_netlink_fc.h
-header-y += cxlflash_ioctl.h
include/uapi/scsi/fc/Kbuild deleted +0 -5
deleted file mode 100644
index 5ead9fac265c..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += fc_els.h
-header-y += fc_fs.h
-header-y += fc_gs.h
-header-y += fc_ns.h
include/uapi/sound/Kbuild deleted +0 -16
deleted file mode 100644
index 9578d8bdbf31..000000000000
@@ -1,16 +0,0 @@
-# UAPI Header export list
-header-y += asequencer.h
-header-y += asoc.h
-header-y += asound.h
-header-y += asound_fm.h
-header-y += compress_offload.h
-header-y += compress_params.h
-header-y += emu10k1.h
-header-y += firewire.h
-header-y += hdsp.h
-header-y += hdspm.h
-header-y += sb16_csp.h
-header-y += sfnt_info.h
-header-y += tlv.h
-header-y += usb_stream.h
-header-y += snd_sst_tokens.h
include/uapi/video/Kbuild deleted +0 -4
deleted file mode 100644
index ac7203bb32cc..000000000000
@@ -1,4 +0,0 @@
-# UAPI Header export list
-header-y += edid.h
-header-y += sisfb.h
-header-y += uvesafb.h
include/uapi/xen/Kbuild deleted +0 -5
deleted file mode 100644
index 5c459628e8c7..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += evtchn.h
-header-y += gntalloc.h
-header-y += gntdev.h
-header-y += privcmd.h
include/video/Kbuild deleted +0 -0
deleted file mode 100644
index e69de29bb2d1..000000000000
scripts/Makefile.headersinst +25 -21

84 lines not on this page · raw message

Signature · 1 line
2.8.1
#135 lore raw

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

url: https://github.com/0day-ci/linux/commits/Nicolas-Dichtel/uapi-export-all-headers-under-uapi-directories/20170202-213944 config: i386-tinyconfig (attached as .config) compiler: gcc-6 (Debian…

Hi Nicolas,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.10-rc6]
[cannot apply to next-20170202]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Nicolas-Dichtel/uapi-export-all-headers-under-uapi-directories/20170202-213944
config: i386-tinyconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce:

        # save the attached .config to linux build tree
        make ARCH=i386 

Note: the linux-review/Nicolas-Dichtel/uapi-export-all-headers-under-uapi-directories/20170202-213944 HEAD fec8d2b493885de70b229c7ce5bf917dc92ddb9f builds fine.
It only hurts bisectibility.

All errors (new ones prefixed by >>):

>> ./usr/include/asm/unistd.h:8: included file 'asm-x86/unistd_32.h' is not exported
>> ./usr/include/asm/unistd.h:10: included file 'asm-x86/unistd_x32.h' is not exported
>> ./usr/include/asm/unistd.h:12: included file 'asm-x86/unistd_64.h' is not exported

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

#136 lore raw

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

Quoted 11 lines · kbuild test robot

Hi Nicolas,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.10-rc6]
[cannot apply to next-20170202]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Nicolas-Dichtel/uapi-export-all-headers-under-uapi-directories/20170202-213944
config: i386-tinyconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce:

Quoted 11 lines
        # save the attached .config to linux build tree
        make ARCH=i386 

Note: the linux-review/Nicolas-Dichtel/uapi-export-all-headers-under-uapi-directories/20170202-213944 HEAD fec8d2b493885de70b229c7ce5bf917dc92ddb9f builds fine.
It only hurts bisectibility.

All errors (new ones prefixed by >>):

Quoted 3 lines
Quoted 3 lines

./usr/include/asm/unistd.h:8: included file 'asm-x86/unistd_32.h' is not exported ./usr/include/asm/unistd.h:10: included file 'asm-x86/unistd_x32.h' is not exported ./usr/include/asm/unistd.h:12: included file 'asm-x86/unistd_64.h' is not exported

I don't reproduce this error, it compiles on my target (gcc 4.9.2).

Regards,
Nicolas

#137 lore raw

v6 cover uapi: export all headers under uapi directories

In reply to kbuild test robot

Here is the v6 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.

FYI, I will be off for 10 days.

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

#138 lore raw

PATCH v6 1/8 h8300: put bitsperlong.h in uapi

This header file is exported, thus move it to uapi.

---
 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
arch/h8300/include/asm/bitsperlong.h deleted +0 -14
deleted file mode 100644
index e140e46729ac..000000000000
@@ -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 */
arch/h8300/include/uapi/asm/bitsperlong.h new file +14 -0
new file mode 100644
index 000000000000..e56cf72369b6
@@ -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 */
Signature · 1 line
2.8.1
#139 lore raw

PATCH v6 2/8 nios2: put setup.h in uapi

In reply to Nicolas Dichtel

This header file is exported, but from a userland pov, it's just a wrapper to asm-generic/setup.h.

---
 arch/nios2/include/uapi/asm/Kbuild | 1 +
 1 file changed, 1 insertion(+)
arch/nios2/include/uapi/asm/Kbuild +1 -0
index e0bb972a50d7..69c965304146 100644
@@ -2,4 +2,5 @@ include include/uapi/asm-generic/Kbuild.asm
 
 header-y += elf.h
 
+generic-y += setup.h
 generic-y += ucontext.h
Signature · 1 line
2.8.1
#140 lore raw

PATCH v6 3/8 x86: stop exporting msr-index.h to userland

In reply to Nicolas Dichtel

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")
CC Ingo Molnar <[email protected]>
---
 arch/x86/include/uapi/asm/Kbuild | 1 -
 1 file changed, 1 deletion(-)
arch/x86/include/uapi/asm/Kbuild +0 -1
index 3dec769cadf7..1c532b3f18ea 100644
@@ -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
Signature · 1 line
2.8.1
Acked-by on v6 3/8
#141 lore raw

Re: [PATCH v6 3/8] x86: stop exporting msr-index.h to userland

Quoted 8 lines · Nicolas Dichtel

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")
CC Ingo Molnar <[email protected]>
Quoted 24 lines
---
 arch/x86/include/uapi/asm/Kbuild | 1 -
 1 file changed, 1 deletion(-)
arch/x86/include/uapi/asm/Kbuild +0 -1
index 3dec769cadf7..1c532b3f18ea 100644
@@ -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
Signature · 6 lines
2.8.1

--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#142 lore raw

PATCH v6 4/8 Makefile.headersinst: cleanup input files

In reply to Nicolas Dichtel

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.

---
 scripts/Makefile.headersinst | 34 +++++++++++-----------------------
 1 file changed, 11 insertions(+), 23 deletions(-)
scripts/Makefile.headersinst +11 -23
index 1106d6ca3a38..3e20d03432d2 100644
@@ -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;                                                           \
Signature · 1 line
2.8.1
#143 lore raw

PATCH v6 5/8 Makefile.headersinst: remove destination-y option

In reply to Nicolas Dichtel

This option was added in commit c7bb349e7c25 ("kbuild: introduce destination-y for exported headers") but never used in-tree.

---
 Documentation/kbuild/makefiles.txt | 23 ++++-------------------
 scripts/Makefile.headersinst       |  2 +-
 2 files changed, 5 insertions(+), 20 deletions(-)
Documentation/kbuild/makefiles.txt +4 -19
index 9b9c4797fc55..37b525d329ae 100644
@@ -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
scripts/Makefile.headersinst +1 -1
index 3e20d03432d2..876b42cfede4 100644
@@ -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)),)
Signature · 1 line
2.8.1
#144 lore raw

PATCH v6 6/8 uapi: includes linux/types.h before exporting files

In reply to Nicolas Dichtel

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/linux/seg6.h:21: found __[us]{8,16,32,64} type without #include <linux/types.h> ./usr/include/linux/seg6_hmac.h:11: found __[us]{8,16,32,64} type without #include <linux/types.h>

---
 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/linux/seg6.h       | 2 ++
 6 files changed, 10 insertions(+), 1 deletion(-)
include/uapi/linux/bcache.h +1 -1
index 22b6ad31c706..e3bb0635e94a 100644
@@ -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)				\
include/uapi/linux/btrfs_tree.h +2 -0
index d5ad15a106a7..6a261cb52d95 100644
@@ -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
include/uapi/linux/cryptouser.h +2 -0
index 11d21fce14d6..c6a09c5261e7 100644
@@ -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,
include/uapi/linux/pr.h +2 -0
index 57d7c0f916b6..645ef3cf3dd0 100644
@@ -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,
include/uapi/linux/qrtr.h +1 -0
index 66c0748d26e2..b14ee91ec387 100644
@@ -1,6 +1,7 @@
 #ifndef _LINUX_QRTR_H
 #define _LINUX_QRTR_H
 
+#include <linux/types.h>
 #include <linux/socket.h>
 
 struct sockaddr_qrtr {
include/uapi/linux/seg6.h +2 -0
index 052799e4d751..61df8d392f41 100644
@@ -14,6 +14,8 @@
 #ifndef _UAPI_LINUX_SEG6_H
 #define _UAPI_LINUX_SEG6_H
 
+#include <linux/types.h>
+
 /*
  * SRH
  */
Signature · 1 line
2.8.1
#145 lore raw

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

In reply to Nicolas Dichtel

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-xtensa/kvm_para.h
drm/armada_drm.h
drm/etnaviv_drm.h
drm/omap_drm.h
drm/vgem_drm.h
linux/auto_dev-ioctl.h
linux/batman_adv.h
linux/bcache.h
linux/btrfs_tree.h
linux/cifs
linux/cifs/..install.cmd
linux/cifs/.install
linux/cifs/cifs_mount.h
linux/coresight-stm.h
linux/cryptouser.h
linux/dma-buf.h
linux/genwqe
linux/genwqe/..install.cmd
linux/genwqe/.install
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/seg6.h
linux/seg6_genl.h
linux/seg6_hmac.h
linux/seg6_iptunnel.h
linux/stm.h
linux/userio.h
linux/wil6210_uapi.h

Thanks to Julien Floret <[email protected]> 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.

---
 Documentation/kbuild/makefiles.txt          |  66 ++--
 arch/alpha/include/uapi/asm/Kbuild          |  41 ---
 arch/arc/include/uapi/asm/Kbuild            |   3 -
 arch/arm/include/uapi/asm/Kbuild            |  17 -
 arch/arm64/include/uapi/asm/Kbuild          |  18 --
 arch/avr32/include/uapi/asm/Kbuild          |  20 --
 arch/blackfin/include/uapi/asm/Kbuild       |  17 -
 arch/c6x/include/uapi/asm/Kbuild            |   8 -
 arch/cris/include/uapi/arch-v10/arch/Kbuild |   5 -
 arch/cris/include/uapi/arch-v32/arch/Kbuild |   3 -
 arch/cris/include/uapi/asm/Kbuild           |  43 +--
 arch/frv/include/uapi/asm/Kbuild            |  33 --
 arch/h8300/include/uapi/asm/Kbuild          |  28 --
 arch/hexagon/include/asm/Kbuild             |   3 -
 arch/hexagon/include/uapi/asm/Kbuild        |  13 -
 arch/ia64/include/uapi/asm/Kbuild           |  45 ---
 arch/m32r/include/uapi/asm/Kbuild           |  31 --
 arch/m68k/include/uapi/asm/Kbuild           |  24 --
 arch/metag/include/uapi/asm/Kbuild          |   8 -
 arch/microblaze/include/uapi/asm/Kbuild     |  32 --
 arch/mips/include/uapi/asm/Kbuild           |  37 ---
 arch/mn10300/include/uapi/asm/Kbuild        |  32 --
 arch/nios2/include/uapi/asm/Kbuild          |   3 +-
 arch/openrisc/include/asm/Kbuild            |   3 -
 arch/openrisc/include/uapi/asm/Kbuild       |   8 -
 arch/parisc/include/uapi/asm/Kbuild         |  28 --
 arch/powerpc/include/uapi/asm/Kbuild        |  45 ---
 arch/s390/include/uapi/asm/Kbuild           |  52 ---
 arch/score/include/asm/Kbuild               |   4 -
 arch/score/include/uapi/asm/Kbuild          |  32 --
 arch/sh/include/uapi/asm/Kbuild             |  23 --
 arch/sparc/include/uapi/asm/Kbuild          |  48 ---
 arch/tile/include/asm/Kbuild                |   3 -
 arch/tile/include/uapi/arch/Kbuild          |  17 -
 arch/tile/include/uapi/asm/Kbuild           |  19 +-
 arch/unicore32/include/uapi/asm/Kbuild      |   6 -
 arch/x86/include/uapi/asm/Kbuild            |  58 ----
 arch/xtensa/include/uapi/asm/Kbuild         |  23 --
 include/Kbuild                              |   2 -
 include/asm-generic/Kbuild.asm              |   1 -
 include/scsi/fc/Kbuild                      |   0
 include/uapi/Kbuild                         |  15 -
 include/uapi/asm-generic/Kbuild             |  36 ---
 include/uapi/asm-generic/Kbuild.asm         |  62 ++--
 include/uapi/drm/Kbuild                     |  22 --
 include/uapi/linux/Kbuild                   | 485 +---------------------------
 include/uapi/linux/android/Kbuild           |   2 -
 include/uapi/linux/byteorder/Kbuild         |   3 -
 include/uapi/linux/caif/Kbuild              |   3 -
 include/uapi/linux/can/Kbuild               |   6 -
 include/uapi/linux/dvb/Kbuild               |   9 -
 include/uapi/linux/hdlc/Kbuild              |   2 -
 include/uapi/linux/hsi/Kbuild               |   2 -
 include/uapi/linux/iio/Kbuild               |   3 -
 include/uapi/linux/isdn/Kbuild              |   2 -
 include/uapi/linux/mmc/Kbuild               |   2 -
 include/uapi/linux/netfilter/Kbuild         |  89 -----
 include/uapi/linux/netfilter/ipset/Kbuild   |   5 -
 include/uapi/linux/netfilter_arp/Kbuild     |   3 -
 include/uapi/linux/netfilter_bridge/Kbuild  |  18 --
 include/uapi/linux/netfilter_ipv4/Kbuild    |  10 -
 include/uapi/linux/netfilter_ipv6/Kbuild    |  13 -
 include/uapi/linux/nfsd/Kbuild              |   6 -
 include/uapi/linux/raid/Kbuild              |   3 -
 include/uapi/linux/spi/Kbuild               |   2 -
 include/uapi/linux/sunrpc/Kbuild            |   2 -
 include/uapi/linux/tc_act/Kbuild            |  15 -
 include/uapi/linux/tc_ematch/Kbuild         |   5 -
 include/uapi/linux/usb/Kbuild               |  12 -
 include/uapi/linux/wimax/Kbuild             |   2 -
 include/uapi/misc/Kbuild                    |   2 -
 include/uapi/mtd/Kbuild                     |   6 -
 include/uapi/rdma/Kbuild                    |  19 --
 include/uapi/rdma/hfi/Kbuild                |   2 -
 include/uapi/scsi/Kbuild                    |   6 -
 include/uapi/scsi/fc/Kbuild                 |   5 -
 include/uapi/sound/Kbuild                   |  16 -
 include/uapi/video/Kbuild                   |   4 -
 include/uapi/xen/Kbuild                     |   5 -
 include/video/Kbuild                        |   0
 scripts/Makefile.headersinst                |  51 +--
 81 files changed, 113 insertions(+), 1744 deletions(-)
 delete mode 100644 arch/cris/include/uapi/arch-v10/arch/Kbuild
 delete mode 100644 arch/cris/include/uapi/arch-v32/arch/Kbuild
 delete mode 100644 arch/tile/include/uapi/arch/Kbuild
 delete mode 100644 include/Kbuild
 delete mode 100644 include/asm-generic/Kbuild.asm
 delete mode 100644 include/scsi/fc/Kbuild
 delete mode 100644 include/uapi/Kbuild
 delete mode 100644 include/uapi/asm-generic/Kbuild
 delete mode 100644 include/uapi/drm/Kbuild
 delete mode 100644 include/uapi/linux/android/Kbuild
 delete mode 100644 include/uapi/linux/byteorder/Kbuild
 delete mode 100644 include/uapi/linux/caif/Kbuild
 delete mode 100644 include/uapi/linux/can/Kbuild
 delete mode 100644 include/uapi/linux/dvb/Kbuild
 delete mode 100644 include/uapi/linux/hdlc/Kbuild
 delete mode 100644 include/uapi/linux/hsi/Kbuild
 delete mode 100644 include/uapi/linux/iio/Kbuild
 delete mode 100644 include/uapi/linux/isdn/Kbuild
 delete mode 100644 include/uapi/linux/mmc/Kbuild
 delete mode 100644 include/uapi/linux/netfilter/Kbuild
 delete mode 100644 include/uapi/linux/netfilter/ipset/Kbuild
 delete mode 100644 include/uapi/linux/netfilter_arp/Kbuild
 delete mode 100644 include/uapi/linux/netfilter_bridge/Kbuild
 delete mode 100644 include/uapi/linux/netfilter_ipv4/Kbuild
 delete mode 100644 include/uapi/linux/netfilter_ipv6/Kbuild
 delete mode 100644 include/uapi/linux/nfsd/Kbuild
 delete mode 100644 include/uapi/linux/raid/Kbuild
 delete mode 100644 include/uapi/linux/spi/Kbuild
 delete mode 100644 include/uapi/linux/sunrpc/Kbuild
 delete mode 100644 include/uapi/linux/tc_act/Kbuild
 delete mode 100644 include/uapi/linux/tc_ematch/Kbuild
 delete mode 100644 include/uapi/linux/usb/Kbuild
 delete mode 100644 include/uapi/linux/wimax/Kbuild
 delete mode 100644 include/uapi/misc/Kbuild
 delete mode 100644 include/uapi/mtd/Kbuild
 delete mode 100644 include/uapi/rdma/Kbuild
 delete mode 100644 include/uapi/rdma/hfi/Kbuild
 delete mode 100644 include/uapi/scsi/Kbuild
 delete mode 100644 include/uapi/scsi/fc/Kbuild
 delete mode 100644 include/uapi/sound/Kbuild
 delete mode 100644 include/uapi/video/Kbuild
 delete mode 100644 include/uapi/xen/Kbuild
 delete mode 100644 include/video/Kbuild
Documentation/kbuild/makefiles.txt +41 -25
index 37b525d329ae..91ffb391ed54 100644
@@ -44,10 +44,12 @@ This document describes the Linux kernel Makefiles.
 	   --- 6.11 Post-link pass
 
 	=== 7 Kbuild syntax for exported headers
-		--- 7.1 header-y
+		--- 7.1 header-n
 		--- 7.2 genhdr-y
 		--- 7.3 generic-y
 		--- 7.4 generated-y
+		--- 7.5 mandatory-y
+		--- 7.6 subdir-y
 
 	=== 8 Kbuild Variables
 	=== 9 Makefile language
@@ -1235,7 +1237,7 @@ When kbuild executes, the following steps are followed (roughly):
 	that may be shared between individual architectures.
 	The recommended approach how to use a generic header file is
 	to list the file in the Kbuild file.
-	See "7.4 generic-y" for further info on syntax etc.
+	See "7.3 generic-y" for further info on syntax etc.
 
 --- 6.11 Post-link pass
 
@@ -1262,37 +1264,30 @@ The pre-processing does:
 - drop include of compiler.h
 - drop all sections that are kernel internal (guarded by ifdef __KERNEL__)
 
-Each relevant directory contains a file name "Kbuild" which specifies the
-headers to be exported.
-See subsequent chapter for the syntax of the Kbuild file.
-
-	--- 7.1 header-y
-
-	header-y specifies header files to be exported.
-
-		Example:
-			#include/linux/Kbuild
-			header-y += usb/
-			header-y += aio_abi.h
+All headers under include/uapi/, include/generated/uapi/,
+arch/<arch>/include/uapi/asm/ and arch/<arch>/include/generated/uapi/asm/
+are exported.
 
-	The convention is to list one file per line and
-	preferably in alphabetic order.
+A Kbuild file may be defined under arch/<arch>/include/uapi/asm/ and
+arch/<arch>/include/asm/ to list asm files coming from asm-generic.
+See subsequent chapter for the syntax of the Kbuild file.
 
-	header-y also specifies which subdirectories to visit.
-	A subdirectory is identified by a trailing '/' which
-	can be seen in the example above for the usb subdirectory.
+	--- 7.1 header-n
 
-	Subdirectories are visited before their parent directories.
+	header-n is essentially used by include/uapi/linux/Kbuild to avoid
+	exporting specific headers (e.g. kvm.h) on architectures that do not
+	support it. It should be avoided as much as possible.
 
 	--- 7.2 genhdr-y
 
-	genhdr-y specifies generated files to be exported.
-	Generated files are special as they need to be looked
-	up in another directory when doing 'make O=...' builds.
+	genhdr-y specifies asm files to be generated.
 
 		Example:
-			#include/linux/Kbuild
-			genhdr-y += version.h
+			#arch/x86/include/uapi/asm/Kbuild
+			genhdr-y += unistd_32.h
+			genhdr-y += unistd_64.h
+			genhdr-y += unistd_x32.h
+
 
 	--- 7.3 generic-y
 
@@ -1334,6 +1329,27 @@ See subsequent chapter for the syntax of the Kbuild file.
 			#arch/x86/include/asm/Kbuild
 			generated-y += syscalls_32.h
 
+	--- 7.5 mandatory-y
+
+	mandatory-y is essentially used by include/uapi/asm-generic/Kbuild.asm
+	to define the minimun set of headers that must be exported in
+	include/asm.
+
+	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:
arch/alpha/include/uapi/asm/Kbuild +0 -41

43 lines not on this page · raw message

arch/arc/include/uapi/asm/Kbuild +0 -3
index f50d02df78d5..b15bf6bc0e94 100644
@@ -1,5 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-header-y += elf.h
-header-y += page.h
-header-y += cachectl.h
arch/arm/include/uapi/asm/Kbuild +0 -17
index 46a76cd6acb6..607f702c2d62 100644
@@ -1,23 +1,6 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += auxvec.h
-header-y += byteorder.h
-header-y += fcntl.h
-header-y += hwcap.h
-header-y += ioctls.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += perf_regs.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += unistd.h
 genhdr-y += unistd-common.h
 genhdr-y += unistd-oabi.h
 genhdr-y += unistd-eabi.h
arch/arm64/include/uapi/asm/Kbuild +0 -18
index 825b0fe51c2b..13a97aa2285f 100644
@@ -2,21 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += kvm_para.h
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += fcntl.h
-header-y += hwcap.h
-header-y += kvm_para.h
-header-y += perf_regs.h
-header-y += param.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += stat.h
-header-y += statfs.h
-header-y += ucontext.h
-header-y += unistd.h
arch/avr32/include/uapi/asm/Kbuild +0 -20
index 08d8a3d76ea8..610395083364 100644
@@ -1,26 +1,6 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += auxvec.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
 generic-y += bitsperlong.h
 generic-y += errno.h
 generic-y += fcntl.h
arch/blackfin/include/uapi/asm/Kbuild +0 -17
index 0bd28f77abc3..b15bf6bc0e94 100644
@@ -1,19 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += bfin_sport.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += fcntl.h
-header-y += fixed_code.h
-header-y += ioctls.h
-header-y += kvm_para.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += stat.h
-header-y += swab.h
-header-y += unistd.h
arch/c6x/include/uapi/asm/Kbuild +0 -8
index e9bc2b2b8147..13a97aa2285f 100644
@@ -2,11 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += kvm_para.h
-
-header-y += byteorder.h
-header-y += kvm_para.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += swab.h
-header-y += unistd.h
arch/cris/include/uapi/arch-v10/arch/Kbuild deleted +0 -5
deleted file mode 100644
index 9048c87a782b..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += sv_addr.agh
-header-y += sv_addr_ag.h
-header-y += svinto.h
-header-y += user.h
arch/cris/include/uapi/arch-v32/arch/Kbuild deleted +0 -3
deleted file mode 100644
index 59efffd16b61..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += cryptocop.h
-header-y += user.h
arch/cris/include/uapi/asm/Kbuild +2 -41

46 lines not on this page · raw message

arch/frv/include/uapi/asm/Kbuild +0 -33
index 42a2b33461c0..b15bf6bc0e94 100644
@@ -1,35 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += registers.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/h8300/include/uapi/asm/Kbuild +0 -28
index fb6101a5d4f1..b15bf6bc0e94 100644
@@ -1,30 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += siginfo.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/hexagon/include/asm/Kbuild +0 -3
index db8ddabc6bd2..f3b1ceb5c1e4 100644
@@ -1,6 +1,3 @@
-
-header-y += ucontext.h
-
 generic-y += auxvec.h
 generic-y += barrier.h
 generic-y += bug.h
arch/hexagon/include/uapi/asm/Kbuild +0 -13
index c31706c38631..b15bf6bc0e94 100644
@@ -1,15 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += kvm_para.h
-header-y += param.h
-header-y += ptrace.h
-header-y += registers.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += swab.h
-header-y += unistd.h
-header-y += user.h
arch/ia64/include/uapi/asm/Kbuild +0 -45

48 lines not on this page · raw message

arch/m32r/include/uapi/asm/Kbuild +0 -31
index 43937a61d6cf..b15bf6bc0e94 100644
@@ -1,33 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/m68k/include/uapi/asm/Kbuild +0 -24
index 6a2d257bdfb2..64368077235a 100644
@@ -9,27 +9,3 @@ generic-y += socket.h
 generic-y += sockios.h
 generic-y += termbits.h
 generic-y += termios.h
-
-header-y += a.out.h
-header-y += bootinfo.h
-header-y += bootinfo-amiga.h
-header-y += bootinfo-apollo.h
-header-y += bootinfo-atari.h
-header-y += bootinfo-hp300.h
-header-y += bootinfo-mac.h
-header-y += bootinfo-q40.h
-header-y += bootinfo-vme.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += fcntl.h
-header-y += ioctls.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += stat.h
-header-y += swab.h
-header-y += unistd.h
arch/metag/include/uapi/asm/Kbuild +0 -8
index ab78be2b6eb0..b29731ebd7a9 100644
@@ -1,14 +1,6 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += byteorder.h
-header-y += ech.h
-header-y += ptrace.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += swab.h
-header-y += unistd.h
-
 generic-y += mman.h
 generic-y += resource.h
 generic-y += setup.h
arch/microblaze/include/uapi/asm/Kbuild +0 -32
index 1aac99f87df1..2178c78c7c1a 100644
@@ -2,35 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += types.h
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += elf.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += unistd.h
arch/mips/include/uapi/asm/Kbuild +0 -37
index f2cf41461146..a0266feba9e6 100644
@@ -2,40 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += ipcbuf.h
-
-header-y += auxvec.h
-header-y += bitfield.h
-header-y += bitsperlong.h
-header-y += break.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += inst.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += sgidefs.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += sysmips.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/mn10300/include/uapi/asm/Kbuild +0 -32
index 040178cdb3eb..b15bf6bc0e94 100644
@@ -1,34 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/nios2/include/uapi/asm/Kbuild +1 -2
index 69c965304146..374bd123329f 100644
@@ -1,6 +1,5 @@
+# UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += elf.h
-
 generic-y += setup.h
 generic-y += ucontext.h
arch/openrisc/include/asm/Kbuild +0 -3
index 2832f031fb11..561915716fd9 100644
@@ -1,6 +1,3 @@
-
-header-y += ucontext.h
-
 generic-y += atomic.h
 generic-y += auxvec.h
 generic-y += barrier.h
arch/openrisc/include/uapi/asm/Kbuild +0 -8
index 80761eb82b5f..b15bf6bc0e94 100644
@@ -1,10 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += byteorder.h
-header-y += elf.h
-header-y += kvm_para.h
-header-y += param.h
-header-y += ptrace.h
-header-y += sigcontext.h
-header-y += unistd.h
arch/parisc/include/uapi/asm/Kbuild +0 -28
index 348356c99514..3971c60a7e7f 100644
@@ -2,31 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += resource.h
-
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += pdc.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/powerpc/include/uapi/asm/Kbuild +0 -45

47 lines not on this page · raw message

arch/s390/include/uapi/asm/Kbuild +0 -52

54 lines not on this page · raw message

arch/score/include/asm/Kbuild +0 -4
index a05218ff3fe4..128ca7ec0220 100644
@@ -1,7 +1,3 @@
-
-header-y +=
-
-
 generic-y += barrier.h
 generic-y += clkdev.h
 generic-y += cputime.h
arch/score/include/uapi/asm/Kbuild +0 -32
index 040178cdb3eb..b15bf6bc0e94 100644
@@ -1,34 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/sh/include/uapi/asm/Kbuild +0 -23
index 60613ae78513..b15bf6bc0e94 100644
@@ -1,25 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += cpu-features.h
-header-y += hw_breakpoint.h
-header-y += ioctls.h
-header-y += posix_types.h
-header-y += posix_types_32.h
-header-y += posix_types_64.h
-header-y += ptrace.h
-header-y += ptrace_32.h
-header-y += ptrace_64.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += sockios.h
-header-y += stat.h
-header-y += swab.h
-header-y += types.h
-header-y += unistd.h
-header-y += unistd_32.h
-header-y += unistd_64.h
arch/sparc/include/uapi/asm/Kbuild +0 -48

50 lines not on this page · raw message

arch/tile/include/asm/Kbuild +0 -3
index 2d1f5638974c..057eaa533877 100644
@@ -1,6 +1,3 @@
-
-header-y += ../arch/
-
 generic-y += bug.h
 generic-y += bugs.h
 generic-y += clkdev.h
arch/tile/include/uapi/arch/Kbuild deleted +0 -17
deleted file mode 100644
index 97dfbecec6b6..000000000000
@@ -1,17 +0,0 @@
-# UAPI Header export list
-header-y += abi.h
-header-y += chip.h
-header-y += chip_tilegx.h
-header-y += chip_tilepro.h
-header-y += icache.h
-header-y += interrupts.h
-header-y += interrupts_32.h
-header-y += interrupts_64.h
-header-y += opcode.h
-header-y += opcode_tilegx.h
-header-y += opcode_tilepro.h
-header-y += sim.h
-header-y += sim_def.h
-header-y += spr_def.h
-header-y += spr_def_32.h
-header-y += spr_def_64.h
arch/tile/include/uapi/asm/Kbuild +2 -17
index c20db8e428bf..e0a50111e07f 100644
@@ -1,21 +1,6 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += hardwall.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += stat.h
-header-y += swab.h
-header-y += ucontext.h
-header-y += unistd.h
-
 generic-y += ucontext.h
+
+subdir-y += ../arch
arch/unicore32/include/uapi/asm/Kbuild +0 -6
index 0514d7ad6855..13a97aa2285f 100644
@@ -1,10 +1,4 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += byteorder.h
-header-y += kvm_para.h
-header-y += ptrace.h
-header-y += sigcontext.h
-header-y += unistd.h
-
 generic-y += kvm_para.h
arch/x86/include/uapi/asm/Kbuild +0 -58

61 lines not on this page · raw message

arch/xtensa/include/uapi/asm/Kbuild +0 -23
index 56aad54e7fb7..b15bf6bc0e94 100644
@@ -1,25 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += byteorder.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += swab.h
-header-y += termbits.h
-header-y += types.h
-header-y += unistd.h
include/Kbuild deleted +0 -2
deleted file mode 100644
index bab1145bc7a7..000000000000
@@ -1,2 +0,0 @@
-# Top-level Makefile calls into asm-$(ARCH)
-# List only non-arch directories below
include/asm-generic/Kbuild.asm deleted +0 -1
deleted file mode 100644
index d2ee86b4c091..000000000000
@@ -1 +0,0 @@
-include include/uapi/asm-generic/Kbuild.asm
include/scsi/fc/Kbuild deleted +0 -0
deleted file mode 100644
index e69de29bb2d1..000000000000
include/uapi/Kbuild deleted +0 -15
deleted file mode 100644
index 245aa6e05e6a..000000000000
@@ -1,15 +0,0 @@
-# UAPI Header export list
-# Top-level Makefile calls into asm-$(ARCH)
-# List only non-arch directories below
-
-
-header-y += asm-generic/
-header-y += linux/
-header-y += sound/
-header-y += mtd/
-header-y += rdma/
-header-y += video/
-header-y += drm/
-header-y += xen/
-header-y += scsi/
-header-y += misc/
include/uapi/asm-generic/Kbuild deleted +0 -36
deleted file mode 100644
index b73de7bb7a62..000000000000
@@ -1,36 +0,0 @@
-# UAPI Header export list
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += errno-base.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += int-l64.h
-header-y += int-ll64.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman-common.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += shmparam.h
-header-y += siginfo.h
-header-y += signal-defs.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += ucontext.h
-header-y += unistd.h
include/uapi/asm-generic/Kbuild.asm +31 -31

69 lines not on this page · raw message

include/uapi/drm/Kbuild deleted +0 -22
deleted file mode 100644
index 9355dd8eff3b..000000000000
@@ -1,22 +0,0 @@
-# UAPI Header export list
-header-y += drm.h
-header-y += drm_fourcc.h
-header-y += drm_mode.h
-header-y += drm_sarea.h
-header-y += amdgpu_drm.h
-header-y += exynos_drm.h
-header-y += i810_drm.h
-header-y += i915_drm.h
-header-y += mga_drm.h
-header-y += nouveau_drm.h
-header-y += qxl_drm.h
-header-y += r128_drm.h
-header-y += radeon_drm.h
-header-y += savage_drm.h
-header-y += sis_drm.h
-header-y += tegra_drm.h
-header-y += via_drm.h
-header-y += vmwgfx_drm.h
-header-y += msm_drm.h
-header-y += vc4_drm.h
-header-y += virtgpu_drm.h
include/uapi/linux/Kbuild +9 -476

492 lines not on this page · raw message

include/uapi/linux/android/Kbuild deleted +0 -2
deleted file mode 100644
index ca011eec252a..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += binder.h
include/uapi/linux/byteorder/Kbuild deleted +0 -3
deleted file mode 100644
index 619225b9ff2e..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += big_endian.h
-header-y += little_endian.h
include/uapi/linux/caif/Kbuild deleted +0 -3
deleted file mode 100644
index 43396612d3a3..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += caif_socket.h
-header-y += if_caif.h
include/uapi/linux/can/Kbuild deleted +0 -6
deleted file mode 100644
index 21c91bf25a29..000000000000
@@ -1,6 +0,0 @@
-# UAPI Header export list
-header-y += bcm.h
-header-y += error.h
-header-y += gw.h
-header-y += netlink.h
-header-y += raw.h
include/uapi/linux/dvb/Kbuild deleted +0 -9
deleted file mode 100644
index d40942cfc627..000000000000
@@ -1,9 +0,0 @@
-# UAPI Header export list
-header-y += audio.h
-header-y += ca.h
-header-y += dmx.h
-header-y += frontend.h
-header-y += net.h
-header-y += osd.h
-header-y += version.h
-header-y += video.h
include/uapi/linux/hdlc/Kbuild deleted +0 -2
deleted file mode 100644
index 8c1d2cb75e33..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += ioctl.h
include/uapi/linux/hsi/Kbuild deleted +0 -2
deleted file mode 100644
index a16a00544258..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += hsi_char.h cs-protocol.h
include/uapi/linux/iio/Kbuild deleted +0 -3
deleted file mode 100644
index 86f76d84c44f..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += events.h
-header-y += types.h
include/uapi/linux/isdn/Kbuild deleted +0 -2
deleted file mode 100644
index 89e52850bf29..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += capicmd.h
include/uapi/linux/mmc/Kbuild deleted +0 -2
deleted file mode 100644
index 8c1d2cb75e33..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += ioctl.h
include/uapi/linux/netfilter/Kbuild deleted +0 -89

89 lines not on this page · raw message

include/uapi/linux/netfilter/ipset/Kbuild deleted +0 -5
deleted file mode 100644
index d2680423d9ab..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += ip_set.h
-header-y += ip_set_bitmap.h
-header-y += ip_set_hash.h
-header-y += ip_set_list.h
include/uapi/linux/netfilter_arp/Kbuild deleted +0 -3
deleted file mode 100644
index 62d5637cc0ac..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += arp_tables.h
-header-y += arpt_mangle.h
include/uapi/linux/netfilter_bridge/Kbuild deleted +0 -18
deleted file mode 100644
index 0fbad8ef96de..000000000000
@@ -1,18 +0,0 @@
-# UAPI Header export list
-header-y += ebt_802_3.h
-header-y += ebt_among.h
-header-y += ebt_arp.h
-header-y += ebt_arpreply.h
-header-y += ebt_ip.h
-header-y += ebt_ip6.h
-header-y += ebt_limit.h
-header-y += ebt_log.h
-header-y += ebt_mark_m.h
-header-y += ebt_mark_t.h
-header-y += ebt_nat.h
-header-y += ebt_nflog.h
-header-y += ebt_pkttype.h
-header-y += ebt_redirect.h
-header-y += ebt_stp.h
-header-y += ebt_vlan.h
-header-y += ebtables.h
include/uapi/linux/netfilter_ipv4/Kbuild deleted +0 -10
deleted file mode 100644
index ecb291df390e..000000000000
@@ -1,10 +0,0 @@
-# UAPI Header export list
-header-y += ip_tables.h
-header-y += ipt_CLUSTERIP.h
-header-y += ipt_ECN.h
-header-y += ipt_LOG.h
-header-y += ipt_REJECT.h
-header-y += ipt_TTL.h
-header-y += ipt_ah.h
-header-y += ipt_ecn.h
-header-y += ipt_ttl.h
include/uapi/linux/netfilter_ipv6/Kbuild deleted +0 -13
deleted file mode 100644
index 75a668ca2353..000000000000
@@ -1,13 +0,0 @@
-# UAPI Header export list
-header-y += ip6_tables.h
-header-y += ip6t_HL.h
-header-y += ip6t_LOG.h
-header-y += ip6t_NPT.h
-header-y += ip6t_REJECT.h
-header-y += ip6t_ah.h
-header-y += ip6t_frag.h
-header-y += ip6t_hl.h
-header-y += ip6t_ipv6header.h
-header-y += ip6t_mh.h
-header-y += ip6t_opts.h
-header-y += ip6t_rt.h
include/uapi/linux/nfsd/Kbuild deleted +0 -6
deleted file mode 100644
index c11bc404053c..000000000000
@@ -1,6 +0,0 @@
-# UAPI Header export list
-header-y += cld.h
-header-y += debug.h
-header-y += export.h
-header-y += nfsfh.h
-header-y += stats.h
include/uapi/linux/raid/Kbuild deleted +0 -3
deleted file mode 100644
index e2c3d25405d7..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += md_p.h
-header-y += md_u.h
include/uapi/linux/spi/Kbuild deleted +0 -2
deleted file mode 100644
index 0cc747eff165..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += spidev.h
include/uapi/linux/sunrpc/Kbuild deleted +0 -2
deleted file mode 100644
index 8e02e47c20fb..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += debug.h
include/uapi/linux/tc_act/Kbuild deleted +0 -15
deleted file mode 100644
index e3db7403296f..000000000000
@@ -1,15 +0,0 @@
-# UAPI Header export list
-header-y += tc_csum.h
-header-y += tc_defact.h
-header-y += tc_gact.h
-header-y += tc_ipt.h
-header-y += tc_mirred.h
-header-y += tc_nat.h
-header-y += tc_pedit.h
-header-y += tc_skbedit.h
-header-y += tc_vlan.h
-header-y += tc_bpf.h
-header-y += tc_connmark.h
-header-y += tc_ife.h
-header-y += tc_tunnel_key.h
-header-y += tc_skbmod.h
include/uapi/linux/tc_ematch/Kbuild deleted +0 -5
deleted file mode 100644
index 53fca3925535..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += tc_em_cmp.h
-header-y += tc_em_meta.h
-header-y += tc_em_nbyte.h
-header-y += tc_em_text.h
include/uapi/linux/usb/Kbuild deleted +0 -12
deleted file mode 100644
index 4cc4d6e7e523..000000000000
@@ -1,12 +0,0 @@
-# UAPI Header export list
-header-y += audio.h
-header-y += cdc.h
-header-y += cdc-wdm.h
-header-y += ch11.h
-header-y += ch9.h
-header-y += functionfs.h
-header-y += g_printer.h
-header-y += gadgetfs.h
-header-y += midi.h
-header-y += tmc.h
-header-y += video.h
include/uapi/linux/wimax/Kbuild deleted +0 -2
deleted file mode 100644
index 1c97be49971f..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += i2400m.h
include/uapi/misc/Kbuild deleted +0 -2
deleted file mode 100644
index e96cae7d58c9..000000000000
@@ -1,2 +0,0 @@
-# misc Header export list
-header-y += cxl.h
include/uapi/mtd/Kbuild deleted +0 -6
deleted file mode 100644
index 5a691e10cd0e..000000000000
@@ -1,6 +0,0 @@
-# UAPI Header export list
-header-y += inftl-user.h
-header-y += mtd-abi.h
-header-y += mtd-user.h
-header-y += nftl-user.h
-header-y += ubi-user.h
include/uapi/rdma/Kbuild deleted +0 -19
deleted file mode 100644
index bb68cb1b04ed..000000000000
@@ -1,19 +0,0 @@
-# UAPI Header export list
-header-y += ib_user_cm.h
-header-y += ib_user_mad.h
-header-y += ib_user_sa.h
-header-y += ib_user_verbs.h
-header-y += rdma_netlink.h
-header-y += rdma_user_cm.h
-header-y += hfi/
-header-y += rdma_user_rxe.h
-header-y += cxgb3-abi.h
-header-y += cxgb4-abi.h
-header-y += mlx4-abi.h
-header-y += mlx5-abi.h
-header-y += mthca-abi.h
-header-y += nes-abi.h
-header-y += ocrdma-abi.h
-header-y += hns-abi.h
-header-y += vmw_pvrdma-abi.h
-header-y += qedr-abi.h
include/uapi/rdma/hfi/Kbuild deleted +0 -2
deleted file mode 100644
index ef23c294fc71..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += hfi1_user.h
include/uapi/scsi/Kbuild deleted +0 -6
deleted file mode 100644
index d791e0ad509d..000000000000
@@ -1,6 +0,0 @@
-# UAPI Header export list
-header-y += fc/
-header-y += scsi_bsg_fc.h
-header-y += scsi_netlink.h
-header-y += scsi_netlink_fc.h
-header-y += cxlflash_ioctl.h
include/uapi/scsi/fc/Kbuild deleted +0 -5
deleted file mode 100644
index 5ead9fac265c..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += fc_els.h
-header-y += fc_fs.h
-header-y += fc_gs.h
-header-y += fc_ns.h
include/uapi/sound/Kbuild deleted +0 -16
deleted file mode 100644
index 9578d8bdbf31..000000000000
@@ -1,16 +0,0 @@
-# UAPI Header export list
-header-y += asequencer.h
-header-y += asoc.h
-header-y += asound.h
-header-y += asound_fm.h
-header-y += compress_offload.h
-header-y += compress_params.h
-header-y += emu10k1.h
-header-y += firewire.h
-header-y += hdsp.h
-header-y += hdspm.h
-header-y += sb16_csp.h
-header-y += sfnt_info.h
-header-y += tlv.h
-header-y += usb_stream.h
-header-y += snd_sst_tokens.h
include/uapi/video/Kbuild deleted +0 -4
deleted file mode 100644
index ac7203bb32cc..000000000000
@@ -1,4 +0,0 @@
-# UAPI Header export list
-header-y += edid.h
-header-y += sisfb.h
-header-y += uvesafb.h
include/uapi/xen/Kbuild deleted +0 -5
deleted file mode 100644
index 5c459628e8c7..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += evtchn.h
-header-y += gntalloc.h
-header-y += gntdev.h
-header-y += privcmd.h
include/video/Kbuild deleted +0 -0
deleted file mode 100644
index e69de29bb2d1..000000000000
scripts/Makefile.headersinst +27 -24

86 lines not on this page · raw message

Signature · 1 line
2.8.1
#146 lore raw

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

Quoted 2 lines

linux/genwqe/..install.cmd
linux/genwqe/.install

Third time: NAK on exporting internal kbuild metadata.

#147 lore raw

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

Quoted 5 lines · Christoph Hellwig
Quoted 2 lines

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

maintainer
#148 lore raw

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

Quoted 10 lines · Nicolas Dichtel
Quoted 5 lines · Christoph Hellwig
Quoted 2 lines

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

#149 lore raw

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

Quoted 11 lines · Arnd Bergmann
Quoted 9 lines · Nicolas Dichtel
Quoted 5 lines · Christoph Hellwig
Quoted 2 lines

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.

Quoted 6 lines
Quoted 1 line

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

#150 lore raw

v7 cover uapi: export all headers under uapi directories

In reply to Arnd Bergmann

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

#151 lore raw

PATCH v7 1/8 h8300: put bitsperlong.h in uapi

This header file is exported, thus move it to uapi.

---
 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
arch/h8300/include/asm/bitsperlong.h deleted +0 -14
deleted file mode 100644
index e140e46729ac..000000000000
@@ -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 */
arch/h8300/include/uapi/asm/bitsperlong.h new file +14 -0
new file mode 100644
index 000000000000..e56cf72369b6
@@ -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 */
Signature · 1 line
2.8.1
#152 lore raw

PATCH v7 2/8 nios2: put setup.h in uapi

In reply to Nicolas Dichtel

This header file is exported, but from a userland pov, it's just a wrapper to asm-generic/setup.h.

---
 arch/nios2/include/uapi/asm/Kbuild | 1 +
 1 file changed, 1 insertion(+)
arch/nios2/include/uapi/asm/Kbuild +1 -0
index e0bb972a50d7..69c965304146 100644
@@ -2,4 +2,5 @@ include include/uapi/asm-generic/Kbuild.asm
 
 header-y += elf.h
 
+generic-y += setup.h
 generic-y += ucontext.h
Signature · 1 line
2.8.1
#153 lore raw

PATCH v7 3/8 x86: stop exporting msr-index.h to userland

In reply to Nicolas Dichtel

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")
CC Ingo Molnar <[email protected]>
---
 arch/x86/include/uapi/asm/Kbuild | 1 -
 1 file changed, 1 deletion(-)
arch/x86/include/uapi/asm/Kbuild +0 -1
index 3dec769cadf7..1c532b3f18ea 100644
@@ -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
Signature · 1 line
2.8.1
#154 lore raw

PATCH v7 4/8 Makefile.headersinst: cleanup input files

In reply to Nicolas Dichtel

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.

---
 scripts/Makefile.headersinst | 34 +++++++++++-----------------------
 1 file changed, 11 insertions(+), 23 deletions(-)
scripts/Makefile.headersinst +11 -23
index 1106d6ca3a38..3e20d03432d2 100644
@@ -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;                                                           \
Signature · 1 line
2.8.1
#155 lore raw

PATCH v7 5/8 Makefile.headersinst: remove destination-y option

In reply to Nicolas Dichtel

This option was added in commit c7bb349e7c25 ("kbuild: introduce destination-y for exported headers") but never used in-tree.

---
 Documentation/kbuild/makefiles.txt | 23 ++++-------------------
 scripts/Makefile.headersinst       |  2 +-
 2 files changed, 5 insertions(+), 20 deletions(-)
Documentation/kbuild/makefiles.txt +4 -19
index 9b9c4797fc55..37b525d329ae 100644
@@ -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
scripts/Makefile.headersinst +1 -1
index 3e20d03432d2..876b42cfede4 100644
@@ -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)),)
Signature · 1 line
2.8.1
#156 lore raw

PATCH v7 6/8 uapi: includes linux/types.h before exporting files

In reply to Nicolas Dichtel

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>

---
 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(-)
include/uapi/linux/bcache.h +1 -1
index 22b6ad31c706..e3bb0635e94a 100644
@@ -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)				\
include/uapi/linux/btrfs_tree.h +2 -0
index d5ad15a106a7..6a261cb52d95 100644
@@ -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
include/uapi/linux/cryptouser.h +2 -0
index 11d21fce14d6..c6a09c5261e7 100644
@@ -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,
include/uapi/linux/pr.h +2 -0
index 57d7c0f916b6..645ef3cf3dd0 100644
@@ -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,
include/uapi/linux/qrtr.h +1 -0
index 66c0748d26e2..b14ee91ec387 100644
@@ -1,6 +1,7 @@
 #ifndef _LINUX_QRTR_H
 #define _LINUX_QRTR_H
 
+#include <linux/types.h>
 #include <linux/socket.h>
 
 struct sockaddr_qrtr {
include/uapi/rdma/bnxt_re-abi.h +2 -0
index e2c8a3f0ccec..74018bd18d72 100644
@@ -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 {
Signature · 1 line
2.8.1
#157 lore raw

PATCH v7 7/8 uapi: export all headers under uapi directories

In reply to Nicolas Dichtel

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 <[email protected]> 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.

---
 Documentation/kbuild/makefiles.txt          |  66 ++--
 arch/alpha/include/uapi/asm/Kbuild          |  41 ---
 arch/arc/include/uapi/asm/Kbuild            |   3 -
 arch/arm/include/uapi/asm/Kbuild            |  17 -
 arch/arm64/include/uapi/asm/Kbuild          |  18 -
 arch/avr32/include/uapi/asm/Kbuild          |  20 --
 arch/blackfin/include/uapi/asm/Kbuild       |  17 -
 arch/c6x/include/uapi/asm/Kbuild            |   8 -
 arch/cris/include/uapi/arch-v10/arch/Kbuild |   5 -
 arch/cris/include/uapi/arch-v32/arch/Kbuild |   3 -
 arch/cris/include/uapi/asm/Kbuild           |  43 +--
 arch/frv/include/uapi/asm/Kbuild            |  33 --
 arch/h8300/include/uapi/asm/Kbuild          |  28 --
 arch/hexagon/include/asm/Kbuild             |   3 -
 arch/hexagon/include/uapi/asm/Kbuild        |  13 -
 arch/ia64/include/uapi/asm/Kbuild           |  45 ---
 arch/m32r/include/uapi/asm/Kbuild           |  31 --
 arch/m68k/include/uapi/asm/Kbuild           |  24 --
 arch/metag/include/uapi/asm/Kbuild          |   8 -
 arch/microblaze/include/uapi/asm/Kbuild     |  32 --
 arch/mips/include/uapi/asm/Kbuild           |  37 ---
 arch/mn10300/include/uapi/asm/Kbuild        |  32 --
 arch/nios2/include/uapi/asm/Kbuild          |   3 +-
 arch/openrisc/include/asm/Kbuild            |   3 -
 arch/openrisc/include/uapi/asm/Kbuild       |   8 -
 arch/parisc/include/uapi/asm/Kbuild         |  28 --
 arch/powerpc/include/uapi/asm/Kbuild        |  45 ---
 arch/s390/include/uapi/asm/Kbuild           |  52 ---
 arch/score/include/asm/Kbuild               |   3 -
 arch/score/include/uapi/asm/Kbuild          |  32 --
 arch/sh/include/uapi/asm/Kbuild             |  23 --
 arch/sparc/include/uapi/asm/Kbuild          |  48 ---
 arch/tile/include/asm/Kbuild                |   3 -
 arch/tile/include/uapi/arch/Kbuild          |  17 -
 arch/tile/include/uapi/asm/Kbuild           |  19 +-
 arch/unicore32/include/uapi/asm/Kbuild      |   6 -
 arch/x86/include/uapi/asm/Kbuild            |  58 ----
 arch/xtensa/include/uapi/asm/Kbuild         |  23 --
 include/Kbuild                              |   2 -
 include/asm-generic/Kbuild.asm              |   1 -
 include/scsi/fc/Kbuild                      |   0
 include/uapi/Kbuild                         |  15 -
 include/uapi/asm-generic/Kbuild             |  36 --
 include/uapi/asm-generic/Kbuild.asm         |  62 ++--
 include/uapi/drm/Kbuild                     |  23 --
 include/uapi/linux/Kbuild                   | 493 +---------------------------
 include/uapi/linux/android/Kbuild           |   2 -
 include/uapi/linux/byteorder/Kbuild         |   3 -
 include/uapi/linux/caif/Kbuild              |   3 -
 include/uapi/linux/can/Kbuild               |   6 -
 include/uapi/linux/dvb/Kbuild               |   9 -
 include/uapi/linux/hdlc/Kbuild              |   2 -
 include/uapi/linux/hsi/Kbuild               |   2 -
 include/uapi/linux/iio/Kbuild               |   3 -
 include/uapi/linux/isdn/Kbuild              |   2 -
 include/uapi/linux/mmc/Kbuild               |   2 -
 include/uapi/linux/netfilter/Kbuild         |  89 -----
 include/uapi/linux/netfilter/ipset/Kbuild   |   5 -
 include/uapi/linux/netfilter_arp/Kbuild     |   3 -
 include/uapi/linux/netfilter_bridge/Kbuild  |  18 -
 include/uapi/linux/netfilter_ipv4/Kbuild    |  10 -
 include/uapi/linux/netfilter_ipv6/Kbuild    |  13 -
 include/uapi/linux/nfsd/Kbuild              |   6 -
 include/uapi/linux/raid/Kbuild              |   3 -
 include/uapi/linux/spi/Kbuild               |   2 -
 include/uapi/linux/sunrpc/Kbuild            |   2 -
 include/uapi/linux/tc_act/Kbuild            |  16 -
 include/uapi/linux/tc_ematch/Kbuild         |   5 -
 include/uapi/linux/usb/Kbuild               |  12 -
 include/uapi/linux/wimax/Kbuild             |   2 -
 include/uapi/misc/Kbuild                    |   2 -
 include/uapi/mtd/Kbuild                     |   6 -
 include/uapi/rdma/Kbuild                    |  20 --
 include/uapi/rdma/hfi/Kbuild                |   3 -
 include/uapi/scsi/Kbuild                    |   6 -
 include/uapi/scsi/fc/Kbuild                 |   5 -
 include/uapi/sound/Kbuild                   |  16 -
 include/uapi/video/Kbuild                   |   4 -
 include/uapi/xen/Kbuild                     |   5 -
 include/video/Kbuild                        |   0
 scripts/Makefile.headersinst                |  51 +--
 81 files changed, 113 insertions(+), 1755 deletions(-)
 delete mode 100644 arch/cris/include/uapi/arch-v10/arch/Kbuild
 delete mode 100644 arch/cris/include/uapi/arch-v32/arch/Kbuild
 delete mode 100644 arch/tile/include/uapi/arch/Kbuild
 delete mode 100644 include/Kbuild
 delete mode 100644 include/asm-generic/Kbuild.asm
 delete mode 100644 include/scsi/fc/Kbuild
 delete mode 100644 include/uapi/Kbuild
 delete mode 100644 include/uapi/asm-generic/Kbuild
 delete mode 100644 include/uapi/drm/Kbuild
 delete mode 100644 include/uapi/linux/android/Kbuild
 delete mode 100644 include/uapi/linux/byteorder/Kbuild
 delete mode 100644 include/uapi/linux/caif/Kbuild
 delete mode 100644 include/uapi/linux/can/Kbuild
 delete mode 100644 include/uapi/linux/dvb/Kbuild
 delete mode 100644 include/uapi/linux/hdlc/Kbuild
 delete mode 100644 include/uapi/linux/hsi/Kbuild
 delete mode 100644 include/uapi/linux/iio/Kbuild
 delete mode 100644 include/uapi/linux/isdn/Kbuild
 delete mode 100644 include/uapi/linux/mmc/Kbuild
 delete mode 100644 include/uapi/linux/netfilter/Kbuild
 delete mode 100644 include/uapi/linux/netfilter/ipset/Kbuild
 delete mode 100644 include/uapi/linux/netfilter_arp/Kbuild
 delete mode 100644 include/uapi/linux/netfilter_bridge/Kbuild
 delete mode 100644 include/uapi/linux/netfilter_ipv4/Kbuild
 delete mode 100644 include/uapi/linux/netfilter_ipv6/Kbuild
 delete mode 100644 include/uapi/linux/nfsd/Kbuild
 delete mode 100644 include/uapi/linux/raid/Kbuild
 delete mode 100644 include/uapi/linux/spi/Kbuild
 delete mode 100644 include/uapi/linux/sunrpc/Kbuild
 delete mode 100644 include/uapi/linux/tc_act/Kbuild
 delete mode 100644 include/uapi/linux/tc_ematch/Kbuild
 delete mode 100644 include/uapi/linux/usb/Kbuild
 delete mode 100644 include/uapi/linux/wimax/Kbuild
 delete mode 100644 include/uapi/misc/Kbuild
 delete mode 100644 include/uapi/mtd/Kbuild
 delete mode 100644 include/uapi/rdma/Kbuild
 delete mode 100644 include/uapi/rdma/hfi/Kbuild
 delete mode 100644 include/uapi/scsi/Kbuild
 delete mode 100644 include/uapi/scsi/fc/Kbuild
 delete mode 100644 include/uapi/sound/Kbuild
 delete mode 100644 include/uapi/video/Kbuild
 delete mode 100644 include/uapi/xen/Kbuild
 delete mode 100644 include/video/Kbuild
Documentation/kbuild/makefiles.txt +41 -25
index 37b525d329ae..91ffb391ed54 100644
@@ -44,10 +44,12 @@ This document describes the Linux kernel Makefiles.
 	   --- 6.11 Post-link pass
 
 	=== 7 Kbuild syntax for exported headers
-		--- 7.1 header-y
+		--- 7.1 header-n
 		--- 7.2 genhdr-y
 		--- 7.3 generic-y
 		--- 7.4 generated-y
+		--- 7.5 mandatory-y
+		--- 7.6 subdir-y
 
 	=== 8 Kbuild Variables
 	=== 9 Makefile language
@@ -1235,7 +1237,7 @@ When kbuild executes, the following steps are followed (roughly):
 	that may be shared between individual architectures.
 	The recommended approach how to use a generic header file is
 	to list the file in the Kbuild file.
-	See "7.4 generic-y" for further info on syntax etc.
+	See "7.3 generic-y" for further info on syntax etc.
 
 --- 6.11 Post-link pass
 
@@ -1262,37 +1264,30 @@ The pre-processing does:
 - drop include of compiler.h
 - drop all sections that are kernel internal (guarded by ifdef __KERNEL__)
 
-Each relevant directory contains a file name "Kbuild" which specifies the
-headers to be exported.
-See subsequent chapter for the syntax of the Kbuild file.
-
-	--- 7.1 header-y
-
-	header-y specifies header files to be exported.
-
-		Example:
-			#include/linux/Kbuild
-			header-y += usb/
-			header-y += aio_abi.h
+All headers under include/uapi/, include/generated/uapi/,
+arch/<arch>/include/uapi/asm/ and arch/<arch>/include/generated/uapi/asm/
+are exported.
 
-	The convention is to list one file per line and
-	preferably in alphabetic order.
+A Kbuild file may be defined under arch/<arch>/include/uapi/asm/ and
+arch/<arch>/include/asm/ to list asm files coming from asm-generic.
+See subsequent chapter for the syntax of the Kbuild file.
 
-	header-y also specifies which subdirectories to visit.
-	A subdirectory is identified by a trailing '/' which
-	can be seen in the example above for the usb subdirectory.
+	--- 7.1 header-n
 
-	Subdirectories are visited before their parent directories.
+	header-n is essentially used by include/uapi/linux/Kbuild to avoid
+	exporting specific headers (e.g. kvm.h) on architectures that do not
+	support it. It should be avoided as much as possible.
 
 	--- 7.2 genhdr-y
 
-	genhdr-y specifies generated files to be exported.
-	Generated files are special as they need to be looked
-	up in another directory when doing 'make O=...' builds.
+	genhdr-y specifies asm files to be generated.
 
 		Example:
-			#include/linux/Kbuild
-			genhdr-y += version.h
+			#arch/x86/include/uapi/asm/Kbuild
+			genhdr-y += unistd_32.h
+			genhdr-y += unistd_64.h
+			genhdr-y += unistd_x32.h
+
 
 	--- 7.3 generic-y
 
@@ -1334,6 +1329,27 @@ See subsequent chapter for the syntax of the Kbuild file.
 			#arch/x86/include/asm/Kbuild
 			generated-y += syscalls_32.h
 
+	--- 7.5 mandatory-y
+
+	mandatory-y is essentially used by include/uapi/asm-generic/Kbuild.asm
+	to define the minimun set of headers that must be exported in
+	include/asm.
+
+	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:
arch/alpha/include/uapi/asm/Kbuild +0 -41

43 lines not on this page · raw message

arch/arc/include/uapi/asm/Kbuild +0 -3
index f50d02df78d5..b15bf6bc0e94 100644
@@ -1,5 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-header-y += elf.h
-header-y += page.h
-header-y += cachectl.h
arch/arm/include/uapi/asm/Kbuild +0 -17
index 46a76cd6acb6..607f702c2d62 100644
@@ -1,23 +1,6 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += auxvec.h
-header-y += byteorder.h
-header-y += fcntl.h
-header-y += hwcap.h
-header-y += ioctls.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += perf_regs.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += unistd.h
 genhdr-y += unistd-common.h
 genhdr-y += unistd-oabi.h
 genhdr-y += unistd-eabi.h
arch/arm64/include/uapi/asm/Kbuild +0 -18
index 825b0fe51c2b..13a97aa2285f 100644
@@ -2,21 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += kvm_para.h
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += fcntl.h
-header-y += hwcap.h
-header-y += kvm_para.h
-header-y += perf_regs.h
-header-y += param.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += stat.h
-header-y += statfs.h
-header-y += ucontext.h
-header-y += unistd.h
arch/avr32/include/uapi/asm/Kbuild +0 -20
index 08d8a3d76ea8..610395083364 100644
@@ -1,26 +1,6 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += auxvec.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
 generic-y += bitsperlong.h
 generic-y += errno.h
 generic-y += fcntl.h
arch/blackfin/include/uapi/asm/Kbuild +0 -17
index 0bd28f77abc3..b15bf6bc0e94 100644
@@ -1,19 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += bfin_sport.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += fcntl.h
-header-y += fixed_code.h
-header-y += ioctls.h
-header-y += kvm_para.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += stat.h
-header-y += swab.h
-header-y += unistd.h
arch/c6x/include/uapi/asm/Kbuild +0 -8
index e9bc2b2b8147..13a97aa2285f 100644
@@ -2,11 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += kvm_para.h
-
-header-y += byteorder.h
-header-y += kvm_para.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += swab.h
-header-y += unistd.h
arch/cris/include/uapi/arch-v10/arch/Kbuild deleted +0 -5
deleted file mode 100644
index 9048c87a782b..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += sv_addr.agh
-header-y += sv_addr_ag.h
-header-y += svinto.h
-header-y += user.h
arch/cris/include/uapi/arch-v32/arch/Kbuild deleted +0 -3
deleted file mode 100644
index 59efffd16b61..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += cryptocop.h
-header-y += user.h
arch/cris/include/uapi/asm/Kbuild +2 -41

46 lines not on this page · raw message

arch/frv/include/uapi/asm/Kbuild +0 -33
index 42a2b33461c0..b15bf6bc0e94 100644
@@ -1,35 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += registers.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/h8300/include/uapi/asm/Kbuild +0 -28
index fb6101a5d4f1..b15bf6bc0e94 100644
@@ -1,30 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += siginfo.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/hexagon/include/asm/Kbuild +0 -3
index a43a7c90e4af..70711fd7842c 100644
@@ -1,6 +1,3 @@
-
-header-y += ucontext.h
-
 generic-y += auxvec.h
 generic-y += barrier.h
 generic-y += bug.h
arch/hexagon/include/uapi/asm/Kbuild +0 -13
index c31706c38631..b15bf6bc0e94 100644
@@ -1,15 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += kvm_para.h
-header-y += param.h
-header-y += ptrace.h
-header-y += registers.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += swab.h
-header-y += unistd.h
-header-y += user.h
arch/ia64/include/uapi/asm/Kbuild +0 -45

48 lines not on this page · raw message

arch/m32r/include/uapi/asm/Kbuild +0 -31
index 43937a61d6cf..b15bf6bc0e94 100644
@@ -1,33 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/m68k/include/uapi/asm/Kbuild +0 -24
index 6a2d257bdfb2..64368077235a 100644
@@ -9,27 +9,3 @@ generic-y += socket.h
 generic-y += sockios.h
 generic-y += termbits.h
 generic-y += termios.h
-
-header-y += a.out.h
-header-y += bootinfo.h
-header-y += bootinfo-amiga.h
-header-y += bootinfo-apollo.h
-header-y += bootinfo-atari.h
-header-y += bootinfo-hp300.h
-header-y += bootinfo-mac.h
-header-y += bootinfo-q40.h
-header-y += bootinfo-vme.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += fcntl.h
-header-y += ioctls.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += stat.h
-header-y += swab.h
-header-y += unistd.h
arch/metag/include/uapi/asm/Kbuild +0 -8
index ab78be2b6eb0..b29731ebd7a9 100644
@@ -1,14 +1,6 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += byteorder.h
-header-y += ech.h
-header-y += ptrace.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += swab.h
-header-y += unistd.h
-
 generic-y += mman.h
 generic-y += resource.h
 generic-y += setup.h
arch/microblaze/include/uapi/asm/Kbuild +0 -32
index 1aac99f87df1..2178c78c7c1a 100644
@@ -2,35 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += types.h
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += elf.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += unistd.h
arch/mips/include/uapi/asm/Kbuild +0 -37
index f2cf41461146..a0266feba9e6 100644
@@ -2,40 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += ipcbuf.h
-
-header-y += auxvec.h
-header-y += bitfield.h
-header-y += bitsperlong.h
-header-y += break.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += inst.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += sgidefs.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += sysmips.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/mn10300/include/uapi/asm/Kbuild +0 -32
index 040178cdb3eb..b15bf6bc0e94 100644
@@ -1,34 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/nios2/include/uapi/asm/Kbuild +1 -2
index 69c965304146..374bd123329f 100644
@@ -1,6 +1,5 @@
+# UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += elf.h
-
 generic-y += setup.h
 generic-y += ucontext.h
arch/openrisc/include/asm/Kbuild +0 -3
index ef8d1ccc3e45..9cca71975b69 100644
@@ -1,6 +1,3 @@
-
-header-y += ucontext.h
-
 generic-y += atomic.h
 generic-y += auxvec.h
 generic-y += barrier.h
arch/openrisc/include/uapi/asm/Kbuild +0 -8
index 80761eb82b5f..b15bf6bc0e94 100644
@@ -1,10 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += byteorder.h
-header-y += elf.h
-header-y += kvm_para.h
-header-y += param.h
-header-y += ptrace.h
-header-y += sigcontext.h
-header-y += unistd.h
arch/parisc/include/uapi/asm/Kbuild +0 -28
index 348356c99514..3971c60a7e7f 100644
@@ -2,31 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += resource.h
-
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += pdc.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/powerpc/include/uapi/asm/Kbuild +0 -45

47 lines not on this page · raw message

arch/s390/include/uapi/asm/Kbuild +0 -52

54 lines not on this page · raw message

arch/score/include/asm/Kbuild +0 -3
index db3e28ca3ae2..59f76b45477d 100644
@@ -1,6 +1,3 @@
-
-header-y +=
-
 generic-y += barrier.h
 generic-y += clkdev.h
 generic-y += current.h
arch/score/include/uapi/asm/Kbuild +0 -32
index 040178cdb3eb..b15bf6bc0e94 100644
@@ -1,34 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/sh/include/uapi/asm/Kbuild +0 -23
index 60613ae78513..b15bf6bc0e94 100644
@@ -1,25 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += cpu-features.h
-header-y += hw_breakpoint.h
-header-y += ioctls.h
-header-y += posix_types.h
-header-y += posix_types_32.h
-header-y += posix_types_64.h
-header-y += ptrace.h
-header-y += ptrace_32.h
-header-y += ptrace_64.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += sockios.h
-header-y += stat.h
-header-y += swab.h
-header-y += types.h
-header-y += unistd.h
-header-y += unistd_32.h
-header-y += unistd_64.h
arch/sparc/include/uapi/asm/Kbuild +0 -48

50 lines not on this page · raw message

arch/tile/include/asm/Kbuild +0 -3
index aa48b6eaff2d..61157a7e8532 100644
@@ -1,6 +1,3 @@
-
-header-y += ../arch/
-
 generic-y += bug.h
 generic-y += bugs.h
 generic-y += clkdev.h
arch/tile/include/uapi/arch/Kbuild deleted +0 -17
deleted file mode 100644
index 97dfbecec6b6..000000000000
@@ -1,17 +0,0 @@
-# UAPI Header export list
-header-y += abi.h
-header-y += chip.h
-header-y += chip_tilegx.h
-header-y += chip_tilepro.h
-header-y += icache.h
-header-y += interrupts.h
-header-y += interrupts_32.h
-header-y += interrupts_64.h
-header-y += opcode.h
-header-y += opcode_tilegx.h
-header-y += opcode_tilepro.h
-header-y += sim.h
-header-y += sim_def.h
-header-y += spr_def.h
-header-y += spr_def_32.h
-header-y += spr_def_64.h
arch/tile/include/uapi/asm/Kbuild +2 -17
index c20db8e428bf..e0a50111e07f 100644
@@ -1,21 +1,6 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += hardwall.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += stat.h
-header-y += swab.h
-header-y += ucontext.h
-header-y += unistd.h
-
 generic-y += ucontext.h
+
+subdir-y += ../arch
arch/unicore32/include/uapi/asm/Kbuild +0 -6
index 0514d7ad6855..13a97aa2285f 100644
@@ -1,10 +1,4 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += byteorder.h
-header-y += kvm_para.h
-header-y += ptrace.h
-header-y += sigcontext.h
-header-y += unistd.h
-
 generic-y += kvm_para.h
arch/x86/include/uapi/asm/Kbuild +0 -58

61 lines not on this page · raw message

arch/xtensa/include/uapi/asm/Kbuild +0 -23
index 56aad54e7fb7..b15bf6bc0e94 100644
@@ -1,25 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += byteorder.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += swab.h
-header-y += termbits.h
-header-y += types.h
-header-y += unistd.h
include/Kbuild deleted +0 -2
deleted file mode 100644
index bab1145bc7a7..000000000000
@@ -1,2 +0,0 @@
-# Top-level Makefile calls into asm-$(ARCH)
-# List only non-arch directories below
include/asm-generic/Kbuild.asm deleted +0 -1
deleted file mode 100644
index d2ee86b4c091..000000000000
@@ -1 +0,0 @@
-include include/uapi/asm-generic/Kbuild.asm
include/scsi/fc/Kbuild deleted +0 -0
deleted file mode 100644
index e69de29bb2d1..000000000000
include/uapi/Kbuild deleted +0 -15
deleted file mode 100644
index 245aa6e05e6a..000000000000
@@ -1,15 +0,0 @@
-# UAPI Header export list
-# Top-level Makefile calls into asm-$(ARCH)
-# List only non-arch directories below
-
-
-header-y += asm-generic/
-header-y += linux/
-header-y += sound/
-header-y += mtd/
-header-y += rdma/
-header-y += video/
-header-y += drm/
-header-y += xen/
-header-y += scsi/
-header-y += misc/
include/uapi/asm-generic/Kbuild deleted +0 -36
deleted file mode 100644
index b73de7bb7a62..000000000000
@@ -1,36 +0,0 @@
-# UAPI Header export list
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += errno-base.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += int-l64.h
-header-y += int-ll64.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman-common.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += shmparam.h
-header-y += siginfo.h
-header-y += signal-defs.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += ucontext.h
-header-y += unistd.h
include/uapi/asm-generic/Kbuild.asm +31 -31

69 lines not on this page · raw message

include/uapi/drm/Kbuild deleted +0 -23
deleted file mode 100644
index c97addd08f8c..000000000000
@@ -1,23 +0,0 @@
-# UAPI Header export list
-header-y += drm.h
-header-y += drm_fourcc.h
-header-y += drm_mode.h
-header-y += drm_sarea.h
-header-y += amdgpu_drm.h
-header-y += exynos_drm.h
-header-y += i810_drm.h
-header-y += i915_drm.h
-header-y += mga_drm.h
-header-y += nouveau_drm.h
-header-y += omap_drm.h
-header-y += qxl_drm.h
-header-y += r128_drm.h
-header-y += radeon_drm.h
-header-y += savage_drm.h
-header-y += sis_drm.h
-header-y += tegra_drm.h
-header-y += via_drm.h
-header-y += vmwgfx_drm.h
-header-y += msm_drm.h
-header-y += vc4_drm.h
-header-y += virtgpu_drm.h
include/uapi/linux/Kbuild +9 -484

500 lines not on this page · raw message

include/uapi/linux/android/Kbuild deleted +0 -2
deleted file mode 100644
index ca011eec252a..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += binder.h
include/uapi/linux/byteorder/Kbuild deleted +0 -3
deleted file mode 100644
index 619225b9ff2e..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += big_endian.h
-header-y += little_endian.h
include/uapi/linux/caif/Kbuild deleted +0 -3
deleted file mode 100644
index 43396612d3a3..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += caif_socket.h
-header-y += if_caif.h
include/uapi/linux/can/Kbuild deleted +0 -6
deleted file mode 100644
index 21c91bf25a29..000000000000
@@ -1,6 +0,0 @@
-# UAPI Header export list
-header-y += bcm.h
-header-y += error.h
-header-y += gw.h
-header-y += netlink.h
-header-y += raw.h
include/uapi/linux/dvb/Kbuild deleted +0 -9
deleted file mode 100644
index d40942cfc627..000000000000
@@ -1,9 +0,0 @@
-# UAPI Header export list
-header-y += audio.h
-header-y += ca.h
-header-y += dmx.h
-header-y += frontend.h
-header-y += net.h
-header-y += osd.h
-header-y += version.h
-header-y += video.h
include/uapi/linux/hdlc/Kbuild deleted +0 -2
deleted file mode 100644
index 8c1d2cb75e33..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += ioctl.h
include/uapi/linux/hsi/Kbuild deleted +0 -2
deleted file mode 100644
index a16a00544258..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += hsi_char.h cs-protocol.h
include/uapi/linux/iio/Kbuild deleted +0 -3
deleted file mode 100644
index 86f76d84c44f..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += events.h
-header-y += types.h
include/uapi/linux/isdn/Kbuild deleted +0 -2
deleted file mode 100644
index 89e52850bf29..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += capicmd.h
include/uapi/linux/mmc/Kbuild deleted +0 -2
deleted file mode 100644
index 8c1d2cb75e33..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += ioctl.h
include/uapi/linux/netfilter/Kbuild deleted +0 -89

89 lines not on this page · raw message

include/uapi/linux/netfilter/ipset/Kbuild deleted +0 -5
deleted file mode 100644
index d2680423d9ab..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += ip_set.h
-header-y += ip_set_bitmap.h
-header-y += ip_set_hash.h
-header-y += ip_set_list.h
include/uapi/linux/netfilter_arp/Kbuild deleted +0 -3
deleted file mode 100644
index 62d5637cc0ac..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += arp_tables.h
-header-y += arpt_mangle.h
include/uapi/linux/netfilter_bridge/Kbuild deleted +0 -18
deleted file mode 100644
index 0fbad8ef96de..000000000000
@@ -1,18 +0,0 @@
-# UAPI Header export list
-header-y += ebt_802_3.h
-header-y += ebt_among.h
-header-y += ebt_arp.h
-header-y += ebt_arpreply.h
-header-y += ebt_ip.h
-header-y += ebt_ip6.h
-header-y += ebt_limit.h
-header-y += ebt_log.h
-header-y += ebt_mark_m.h
-header-y += ebt_mark_t.h
-header-y += ebt_nat.h
-header-y += ebt_nflog.h
-header-y += ebt_pkttype.h
-header-y += ebt_redirect.h
-header-y += ebt_stp.h
-header-y += ebt_vlan.h
-header-y += ebtables.h
include/uapi/linux/netfilter_ipv4/Kbuild deleted +0 -10
deleted file mode 100644
index ecb291df390e..000000000000
@@ -1,10 +0,0 @@
-# UAPI Header export list
-header-y += ip_tables.h
-header-y += ipt_CLUSTERIP.h
-header-y += ipt_ECN.h
-header-y += ipt_LOG.h
-header-y += ipt_REJECT.h
-header-y += ipt_TTL.h
-header-y += ipt_ah.h
-header-y += ipt_ecn.h
-header-y += ipt_ttl.h
include/uapi/linux/netfilter_ipv6/Kbuild deleted +0 -13
deleted file mode 100644
index 75a668ca2353..000000000000
@@ -1,13 +0,0 @@
-# UAPI Header export list
-header-y += ip6_tables.h
-header-y += ip6t_HL.h
-header-y += ip6t_LOG.h
-header-y += ip6t_NPT.h
-header-y += ip6t_REJECT.h
-header-y += ip6t_ah.h
-header-y += ip6t_frag.h
-header-y += ip6t_hl.h
-header-y += ip6t_ipv6header.h
-header-y += ip6t_mh.h
-header-y += ip6t_opts.h
-header-y += ip6t_rt.h
include/uapi/linux/nfsd/Kbuild deleted +0 -6
deleted file mode 100644
index c11bc404053c..000000000000
@@ -1,6 +0,0 @@
-# UAPI Header export list
-header-y += cld.h
-header-y += debug.h
-header-y += export.h
-header-y += nfsfh.h
-header-y += stats.h
include/uapi/linux/raid/Kbuild deleted +0 -3
deleted file mode 100644
index e2c3d25405d7..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += md_p.h
-header-y += md_u.h
include/uapi/linux/spi/Kbuild deleted +0 -2
deleted file mode 100644
index 0cc747eff165..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += spidev.h
include/uapi/linux/sunrpc/Kbuild deleted +0 -2
deleted file mode 100644
index 8e02e47c20fb..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += debug.h
include/uapi/linux/tc_act/Kbuild deleted +0 -16
deleted file mode 100644
index ba62ddf0e58a..000000000000
@@ -1,16 +0,0 @@
-# UAPI Header export list
-header-y += tc_csum.h
-header-y += tc_defact.h
-header-y += tc_gact.h
-header-y += tc_ipt.h
-header-y += tc_mirred.h
-header-y += tc_sample.h
-header-y += tc_nat.h
-header-y += tc_pedit.h
-header-y += tc_skbedit.h
-header-y += tc_vlan.h
-header-y += tc_bpf.h
-header-y += tc_connmark.h
-header-y += tc_ife.h
-header-y += tc_tunnel_key.h
-header-y += tc_skbmod.h
include/uapi/linux/tc_ematch/Kbuild deleted +0 -5
deleted file mode 100644
index 53fca3925535..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += tc_em_cmp.h
-header-y += tc_em_meta.h
-header-y += tc_em_nbyte.h
-header-y += tc_em_text.h
include/uapi/linux/usb/Kbuild deleted +0 -12
deleted file mode 100644
index 4cc4d6e7e523..000000000000
@@ -1,12 +0,0 @@
-# UAPI Header export list
-header-y += audio.h
-header-y += cdc.h
-header-y += cdc-wdm.h
-header-y += ch11.h
-header-y += ch9.h
-header-y += functionfs.h
-header-y += g_printer.h
-header-y += gadgetfs.h
-header-y += midi.h
-header-y += tmc.h
-header-y += video.h
include/uapi/linux/wimax/Kbuild deleted +0 -2
deleted file mode 100644
index 1c97be49971f..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += i2400m.h
include/uapi/misc/Kbuild deleted +0 -2
deleted file mode 100644
index e96cae7d58c9..000000000000
@@ -1,2 +0,0 @@
-# misc Header export list
-header-y += cxl.h
include/uapi/mtd/Kbuild deleted +0 -6
deleted file mode 100644
index 5a691e10cd0e..000000000000
@@ -1,6 +0,0 @@
-# UAPI Header export list
-header-y += inftl-user.h
-header-y += mtd-abi.h
-header-y += mtd-user.h
-header-y += nftl-user.h
-header-y += ubi-user.h
include/uapi/rdma/Kbuild deleted +0 -20
deleted file mode 100644
index 1e0af1ff75c3..000000000000
@@ -1,20 +0,0 @@
-# UAPI Header export list
-header-y += ib_user_cm.h
-header-y += rdma_user_ioctl.h
-header-y += ib_user_mad.h
-header-y += ib_user_sa.h
-header-y += ib_user_verbs.h
-header-y += rdma_netlink.h
-header-y += rdma_user_cm.h
-header-y += hfi/
-header-y += rdma_user_rxe.h
-header-y += cxgb3-abi.h
-header-y += cxgb4-abi.h
-header-y += mlx4-abi.h
-header-y += mlx5-abi.h
-header-y += mthca-abi.h
-header-y += nes-abi.h
-header-y += ocrdma-abi.h
-header-y += hns-abi.h
-header-y += vmw_pvrdma-abi.h
-header-y += qedr-abi.h
include/uapi/rdma/hfi/Kbuild deleted +0 -3
deleted file mode 100644
index b65b0b3a5f63..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += hfi1_user.h
-header-y += hfi1_ioctl.h
include/uapi/scsi/Kbuild deleted +0 -6
deleted file mode 100644
index d791e0ad509d..000000000000
@@ -1,6 +0,0 @@
-# UAPI Header export list
-header-y += fc/
-header-y += scsi_bsg_fc.h
-header-y += scsi_netlink.h
-header-y += scsi_netlink_fc.h
-header-y += cxlflash_ioctl.h
include/uapi/scsi/fc/Kbuild deleted +0 -5
deleted file mode 100644
index 5ead9fac265c..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += fc_els.h
-header-y += fc_fs.h
-header-y += fc_gs.h
-header-y += fc_ns.h
include/uapi/sound/Kbuild deleted +0 -16
deleted file mode 100644
index 9578d8bdbf31..000000000000
@@ -1,16 +0,0 @@
-# UAPI Header export list
-header-y += asequencer.h
-header-y += asoc.h
-header-y += asound.h
-header-y += asound_fm.h
-header-y += compress_offload.h
-header-y += compress_params.h
-header-y += emu10k1.h
-header-y += firewire.h
-header-y += hdsp.h
-header-y += hdspm.h
-header-y += sb16_csp.h
-header-y += sfnt_info.h
-header-y += tlv.h
-header-y += usb_stream.h
-header-y += snd_sst_tokens.h
include/uapi/video/Kbuild deleted +0 -4
deleted file mode 100644
index ac7203bb32cc..000000000000
@@ -1,4 +0,0 @@
-# UAPI Header export list
-header-y += edid.h
-header-y += sisfb.h
-header-y += uvesafb.h
include/uapi/xen/Kbuild deleted +0 -5
deleted file mode 100644
index 5c459628e8c7..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += evtchn.h
-header-y += gntalloc.h
-header-y += gntdev.h
-header-y += privcmd.h
include/video/Kbuild deleted +0 -0
deleted file mode 100644
index e69de29bb2d1..000000000000
scripts/Makefile.headersinst +27 -24

86 lines not on this page · raw message

Signature · 1 line
2.8.1
#158 lore raw

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

Quoted 85 lines · Nicolas Dichtel

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 <[email protected]> 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.

Quoted 5 lines

Is there any chance to get this series in before the rc1?

Regards,
Nicolas

#159 lore raw

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

Quoted 86 lines · Nicolas Dichtel
Quoted 85 lines · Nicolas Dichtel

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 <[email protected]> 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.

Quoted 6 lines
Quoted 5 lines

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.

Signature · 1 line
ldv
#160 lore raw

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

Quoted 1 line · Dmitry V. Levin

On Mon, Feb 27, 2017 at 05:01:55PM +0100, Nicolas Dichtel wrote:

[snip]

Quoted 17 lines
Quoted 1 line

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 */

Quoted 7 lines

/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

#161 lore raw

v8 cover uapi: export all headers under uapi directories

In reply to Dmitry V. Levin

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

#162 lore raw

PATCH v8 1/11 h8300: put bitsperlong.h in uapi

This header file is exported, thus move it to uapi.

---
 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
arch/h8300/include/asm/bitsperlong.h deleted +0 -14
deleted file mode 100644
index e140e46729ac..000000000000
@@ -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 */
arch/h8300/include/uapi/asm/bitsperlong.h new file +14 -0
new file mode 100644
index 000000000000..e56cf72369b6
@@ -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 */
Signature · 1 line
2.8.1
#163 lore raw

PATCH v8 2/11 nios2: put setup.h in uapi

In reply to Nicolas Dichtel

This header file is exported, but from a userland pov, it's just a wrapper to asm-generic/setup.h.

---
 arch/nios2/include/uapi/asm/Kbuild | 1 +
 1 file changed, 1 insertion(+)
arch/nios2/include/uapi/asm/Kbuild +1 -0
index e0bb972a50d7..69c965304146 100644
@@ -2,4 +2,5 @@ include include/uapi/asm-generic/Kbuild.asm
 
 header-y += elf.h
 
+generic-y += setup.h
 generic-y += ucontext.h
Signature · 1 line
2.8.1
#164 lore raw

PATCH v8 3/11 x86: stop exporting msr-index.h to userland

In reply to Nicolas Dichtel

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")
CC Ingo Molnar <[email protected]>
---
 arch/x86/include/uapi/asm/Kbuild | 1 -
 1 file changed, 1 deletion(-)
arch/x86/include/uapi/asm/Kbuild +0 -1
index 3dec769cadf7..1c532b3f18ea 100644
@@ -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
Signature · 1 line
2.8.1
#165 lore raw

PATCH v8 4/11 Makefile.headersinst: cleanup input files

In reply to Nicolas Dichtel

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.

---
 scripts/Makefile.headersinst | 34 +++++++++++-----------------------
 1 file changed, 11 insertions(+), 23 deletions(-)
scripts/Makefile.headersinst +11 -23
index 1106d6ca3a38..3e20d03432d2 100644
@@ -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;                                                           \
Signature · 1 line
2.8.1
#166 lore raw

PATCH v8 5/11 Makefile.headersinst: remove destination-y option

In reply to Nicolas Dichtel

This option was added in commit c7bb349e7c25 ("kbuild: introduce destination-y for exported headers") but never used in-tree.

---
 Documentation/kbuild/makefiles.txt | 23 ++++-------------------
 scripts/Makefile.headersinst       |  2 +-
 2 files changed, 5 insertions(+), 20 deletions(-)
Documentation/kbuild/makefiles.txt +4 -19
index 9b9c4797fc55..37b525d329ae 100644
@@ -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
scripts/Makefile.headersinst +1 -1
index 3e20d03432d2..876b42cfede4 100644
@@ -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)),)
Signature · 1 line
2.8.1
#167 lore raw

PATCH v8 6/11 uapi: includes linux/types.h before exporting files

In reply to Nicolas Dichtel

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>

---
 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(-)
include/uapi/linux/bcache.h +1 -1
index 22b6ad31c706..e3bb0635e94a 100644
@@ -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)				\
include/uapi/linux/btrfs_tree.h +2 -0
index d5ad15a106a7..6a261cb52d95 100644
@@ -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
include/uapi/linux/cryptouser.h +2 -0
index 11d21fce14d6..c6a09c5261e7 100644
@@ -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,
include/uapi/linux/pr.h +2 -0
index 57d7c0f916b6..645ef3cf3dd0 100644
@@ -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,
include/uapi/linux/qrtr.h +1 -0
index 66c0748d26e2..b14ee91ec387 100644
@@ -1,6 +1,7 @@
 #ifndef _LINUX_QRTR_H
 #define _LINUX_QRTR_H
 
+#include <linux/types.h>
 #include <linux/socket.h>
 
 struct sockaddr_qrtr {
include/uapi/rdma/bnxt_re-abi.h +2 -0
index e2c8a3f0ccec..74018bd18d72 100644
@@ -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 {
Signature · 1 line
2.8.1
#168 lore raw

PATCH v8 7/11 btrfs_tree.h: fix include from userland

In reply to Nicolas Dichtel

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];

---
 include/uapi/linux/btrfs_tree.h | 1 +
 1 file changed, 1 insertion(+)
include/uapi/linux/btrfs_tree.h +1 -0
index 6a261cb52d95..6a754ada59af 100644
@@ -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
Signature · 1 line
2.8.1
#169 lore raw

PATCH v8 8/11 cryptouser.h: fix include from userland

In reply to Nicolas Dichtel

This patch prepares the uapi export by fixing the following error:

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

---
 include/linux/crypto.h          | 2 +-
 include/uapi/linux/cryptouser.h | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)
include/linux/crypto.h +1 -1
index c0b0cf3d2d2f..4cf29a35bb4b 100644
@@ -24,6 +24,7 @@
 #include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/uaccess.h>
+#include <uapi/linux/cryptouser.h>
 
 /*
  * Autoloaded crypto modules should only use a prefixed name to avoid allowing
@@ -123,7 +124,6 @@
 /*
  * Miscellaneous stuff.
  */
-#define CRYPTO_MAX_ALG_NAME		64
 
 /*
  * The macro CRYPTO_MINALIGN_ATTR (along with the void * type in the actual
include/uapi/linux/cryptouser.h +7 -0
index c6a09c5261e7..05fcf1393b4d 100644
@@ -18,6 +18,9 @@
  * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
+#ifndef _UAPI_CRYPTOUSER_H
+#define _UAPI_CRYPTOUSER_H
+
 #include <linux/types.h>
 
 /* Netlink configuration messages.  */
@@ -54,6 +57,8 @@ enum crypto_attr_type_t {
 #define CRYPTOCFGA_MAX (__CRYPTOCFGA_MAX - 1)
 };
 
+#define CRYPTO_MAX_ALG_NAME		64
+
 struct crypto_user_alg {
 	char cru_name[CRYPTO_MAX_ALG_NAME];
 	char cru_driver_name[CRYPTO_MAX_ALG_NAME];
@@ -121,3 +126,5 @@ struct crypto_report_acomp {
 
 #define CRYPTO_REPORT_MAXSIZE (sizeof(struct crypto_user_alg) + \
 			       sizeof(struct crypto_report_blkcipher))
+
+#endif /* _UAPI_CRYPTOUSER_H */
Signature · 1 line
2.8.1
maintainer
#170 lore raw

Re: [PATCH v8 08/11] cryptouser.h: fix include from userland

Quoted 16 lines · Nicolas Dichtel

This patch prepares the uapi export by fixing the following error:

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

---
 include/linux/crypto.h          | 2 +-
 include/uapi/linux/cryptouser.h | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)
include/linux/crypto.h +0 -0
index c0b0cf3d2d2f..4cf29a35bb4b 100644

include/linux/crypto.h line 27

Quoted 4 lines
include/linux/crypto.h +1 -0
@@ -24,6 +24,7 @@
 #include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/uaccess.h>
+#include <uapi/linux/cryptouser.h>

Nack. cryptouser is just one interface in the crypto API. It should not be included by every single crypto user in the kernel.

You could perhaps introduce a new file under uapi just for this.

Cheers,

Signature · 7 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#171 lore raw

v9 cover uapi: export all headers under uapi directories

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?

v8 -> v9:
- rebase on top of linus tree
- patch #8: add include/uapi/linux/crypto.h

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

#172 lore raw

PATCH v9 1/11 h8300: put bitsperlong.h in uapi

This header file is exported, thus move it to uapi.

---
 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
arch/h8300/include/asm/bitsperlong.h deleted +0 -14
deleted file mode 100644
index e140e46729ac..000000000000
@@ -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 */
arch/h8300/include/uapi/asm/bitsperlong.h new file +14 -0
new file mode 100644
index 000000000000..e56cf72369b6
@@ -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 */
Signature · 1 line
2.8.1
#173 lore raw

PATCH v9 2/11 nios2: put setup.h in uapi

In reply to Nicolas Dichtel

This header file is exported, but from a userland pov, it's just a wrapper to asm-generic/setup.h.

---
 arch/nios2/include/uapi/asm/Kbuild | 1 +
 1 file changed, 1 insertion(+)
arch/nios2/include/uapi/asm/Kbuild +1 -0
index e0bb972a50d7..69c965304146 100644
@@ -2,4 +2,5 @@ include include/uapi/asm-generic/Kbuild.asm
 
 header-y += elf.h
 
+generic-y += setup.h
 generic-y += ucontext.h
Signature · 1 line
2.8.1
#174 lore raw

PATCH v9 3/11 x86: stop exporting msr-index.h to userland

In reply to Nicolas Dichtel

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")
CC Ingo Molnar <[email protected]>
---
 arch/x86/include/uapi/asm/Kbuild | 1 -
 1 file changed, 1 deletion(-)
arch/x86/include/uapi/asm/Kbuild +0 -1
index 3dec769cadf7..1c532b3f18ea 100644
@@ -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
Signature · 1 line
2.8.1
#175 lore raw

PATCH v9 4/11 Makefile.headersinst: cleanup input files

In reply to Nicolas Dichtel

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.

---
 scripts/Makefile.headersinst | 34 +++++++++++-----------------------
 1 file changed, 11 insertions(+), 23 deletions(-)
scripts/Makefile.headersinst +11 -23
index 1106d6ca3a38..3e20d03432d2 100644
@@ -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;                                                           \
Signature · 1 line
2.8.1
#176 lore raw

PATCH v9 5/11 Makefile.headersinst: remove destination-y option

In reply to Nicolas Dichtel

This option was added in commit c7bb349e7c25 ("kbuild: introduce destination-y for exported headers") but never used in-tree.

---
 Documentation/kbuild/makefiles.txt | 23 ++++-------------------
 scripts/Makefile.headersinst       |  2 +-
 2 files changed, 5 insertions(+), 20 deletions(-)
Documentation/kbuild/makefiles.txt +4 -19
index 9b9c4797fc55..37b525d329ae 100644
@@ -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
scripts/Makefile.headersinst +1 -1
index 3e20d03432d2..876b42cfede4 100644
@@ -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)),)
Signature · 1 line
2.8.1
#177 lore raw

PATCH v9 6/11 uapi: includes linux/types.h before exporting files

In reply to Nicolas Dichtel

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>

---
 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(-)
include/uapi/linux/bcache.h +1 -1
index 22b6ad31c706..e3bb0635e94a 100644
@@ -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)				\
include/uapi/linux/btrfs_tree.h +2 -0
index d5ad15a106a7..6a261cb52d95 100644
@@ -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
include/uapi/linux/cryptouser.h +2 -0
index 11d21fce14d6..c6a09c5261e7 100644
@@ -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,
include/uapi/linux/pr.h +2 -0
index 57d7c0f916b6..645ef3cf3dd0 100644
@@ -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,
include/uapi/linux/qrtr.h +1 -0
index 66c0748d26e2..b14ee91ec387 100644
@@ -1,6 +1,7 @@
 #ifndef _LINUX_QRTR_H
 #define _LINUX_QRTR_H
 
+#include <linux/types.h>
 #include <linux/socket.h>
 
 struct sockaddr_qrtr {
include/uapi/rdma/bnxt_re-abi.h +2 -0
index e2c8a3f0ccec..74018bd18d72 100644
@@ -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 {
Signature · 1 line
2.8.1
#178 lore raw

PATCH v9 7/11 btrfs_tree.h: fix include from userland

In reply to Nicolas Dichtel

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];

---
 include/uapi/linux/btrfs_tree.h | 1 +
 1 file changed, 1 insertion(+)
include/uapi/linux/btrfs_tree.h +1 -0
index 6a261cb52d95..6a754ada59af 100644
@@ -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
Signature · 1 line
2.8.1
#179 lore raw

PATCH v9 8/11 cryptouser.h: fix include from userland

In reply to Nicolas Dichtel

This patch prepares the uapi export by fixing the following error:

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

---
 include/linux/crypto.h          |  2 +-
 include/uapi/linux/crypto.h     | 14 ++++++++++++++
 include/uapi/linux/cryptouser.h |  6 ++++++
 3 files changed, 21 insertions(+), 1 deletion(-)
 create mode 100644 include/uapi/linux/crypto.h
include/linux/crypto.h +1 -1
index c0b0cf3d2d2f..cc2425ba8527 100644
@@ -24,6 +24,7 @@
 #include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/uaccess.h>
+#include <uapi/linux/crypto.h>
 
 /*
  * Autoloaded crypto modules should only use a prefixed name to avoid allowing
@@ -123,7 +124,6 @@
 /*
  * Miscellaneous stuff.
  */
-#define CRYPTO_MAX_ALG_NAME		64
 
 /*
  * The macro CRYPTO_MINALIGN_ATTR (along with the void * type in the actual
include/uapi/linux/crypto.h new file +14 -0
new file mode 100644
index 000000000000..e342c5a5ac50
@@ -0,0 +1,14 @@
+/*
+ * Copyright (c) 2017 Nicolas Dichtel <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ */
+
+#ifndef _UAPI_CRYPTO_H
+#define _UAPI_CRYPTO_H
+
+#define CRYPTO_MAX_ALG_NAME		64
+
+#endif /* _UAPI_CRYPTO_H */
include/uapi/linux/cryptouser.h +6 -0
index c6a09c5261e7..ce3c64fb89e1 100644
@@ -18,7 +18,11 @@
  * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
+#ifndef _UAPI_CRYPTOUSER_H
+#define _UAPI_CRYPTOUSER_H
+
 #include <linux/types.h>
+#include <linux/crypto.h>
 
 /* Netlink configuration messages.  */
 enum {
@@ -121,3 +125,5 @@ struct crypto_report_acomp {
 
 #define CRYPTO_REPORT_MAXSIZE (sizeof(struct crypto_user_alg) + \
 			       sizeof(struct crypto_report_blkcipher))
+
+#endif /* _UAPI_CRYPTOUSER_H */
Signature · 1 line
2.8.1
maintainer Acked-by on v9 8/11
#180 lore raw

Re: [PATCH v9 08/11] cryptouser.h: fix include from userland

Quoted 6 lines · Nicolas Dichtel

This patch prepares the uapi export by fixing the following error:

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

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#181 lore raw

PATCH v9 9/11 smc_diag.h: fix include from userland

In reply to Nicolas Dichtel

This patch prepares the uapi export by fixing the following error:

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

---
 include/rdma/ib_verbs.h           | 3 +--
 include/uapi/linux/smc_diag.h     | 2 +-
 include/uapi/rdma/ib_user_verbs.h | 2 ++
 3 files changed, 4 insertions(+), 3 deletions(-)
include/rdma/ib_verbs.h +1 -2
index 0f1813c13687..50f276a4afdc 100644
@@ -61,6 +61,7 @@
 #include <linux/mmu_notifier.h>
 #include <linux/uaccess.h>
 #include <linux/cgroup_rdma.h>
+#include <uapi/rdma/ib_user_verbs.h>
 
 extern struct workqueue_struct *ib_wq;
 extern struct workqueue_struct *ib_comp_wq;
@@ -1838,8 +1839,6 @@ enum ib_mad_result {
 	IB_MAD_RESULT_CONSUMED = 1 << 2  /* Packet consumed: stop processing */
 };
 
-#define IB_DEVICE_NAME_MAX 64
-
 struct ib_port_cache {
 	struct ib_pkey_cache  *pkey;
 	struct ib_gid_table   *gid;
include/uapi/linux/smc_diag.h +1 -1
index 0063919fea34..87712bfaa9dd 100644
@@ -3,7 +3,7 @@
 
 #include <linux/types.h>
 #include <linux/inet_diag.h>
-#include <rdma/ib_verbs.h>
+#include <rdma/ib_user_verbs.h>
 
 /* Request structure */
 struct smc_diag_req {
include/uapi/rdma/ib_user_verbs.h +2 -0
index 997f904c7692..8edce2b65903 100644
@@ -1124,4 +1124,6 @@ struct ib_uverbs_ex_destroy_rwq_ind_table  {
 	__u32 ind_tbl_handle;
 };
 
+#define IB_DEVICE_NAME_MAX 64
+
 #endif /* IB_USER_VERBS_H */
Signature · 6 lines
2.8.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#182 lore raw

PATCH v9 10/11 uapi: export all headers under uapi directories

In reply to Nicolas Dichtel

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 <[email protected]> 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.

---
 Documentation/kbuild/makefiles.txt          |  66 ++--
 arch/alpha/include/uapi/asm/Kbuild          |  41 ---
 arch/arc/include/uapi/asm/Kbuild            |   3 -
 arch/arm/include/uapi/asm/Kbuild            |  17 -
 arch/arm64/include/uapi/asm/Kbuild          |  18 -
 arch/avr32/include/uapi/asm/Kbuild          |  20 --
 arch/blackfin/include/uapi/asm/Kbuild       |  17 -
 arch/c6x/include/uapi/asm/Kbuild            |   8 -
 arch/cris/include/uapi/arch-v10/arch/Kbuild |   5 -
 arch/cris/include/uapi/arch-v32/arch/Kbuild |   3 -
 arch/cris/include/uapi/asm/Kbuild           |  43 +--
 arch/frv/include/uapi/asm/Kbuild            |  33 --
 arch/h8300/include/uapi/asm/Kbuild          |  28 --
 arch/hexagon/include/asm/Kbuild             |   3 -
 arch/hexagon/include/uapi/asm/Kbuild        |  13 -
 arch/ia64/include/uapi/asm/Kbuild           |  45 ---
 arch/m32r/include/uapi/asm/Kbuild           |  31 --
 arch/m68k/include/uapi/asm/Kbuild           |  24 --
 arch/metag/include/uapi/asm/Kbuild          |   8 -
 arch/microblaze/include/uapi/asm/Kbuild     |  32 --
 arch/mips/include/uapi/asm/Kbuild           |  37 ---
 arch/mn10300/include/uapi/asm/Kbuild        |  32 --
 arch/nios2/include/uapi/asm/Kbuild          |   3 +-
 arch/openrisc/include/asm/Kbuild            |   3 -
 arch/openrisc/include/uapi/asm/Kbuild       |   8 -
 arch/parisc/include/uapi/asm/Kbuild         |  28 --
 arch/powerpc/include/uapi/asm/Kbuild        |  45 ---
 arch/s390/include/uapi/asm/Kbuild           |  53 ---
 arch/score/include/asm/Kbuild               |   3 -
 arch/score/include/uapi/asm/Kbuild          |  32 --
 arch/sh/include/uapi/asm/Kbuild             |  23 --
 arch/sparc/include/uapi/asm/Kbuild          |  48 ---
 arch/tile/include/asm/Kbuild                |   3 -
 arch/tile/include/uapi/arch/Kbuild          |  17 -
 arch/tile/include/uapi/asm/Kbuild           |  19 +-
 arch/unicore32/include/uapi/asm/Kbuild      |   6 -
 arch/x86/include/uapi/asm/Kbuild            |  58 ----
 arch/xtensa/include/uapi/asm/Kbuild         |  23 --
 include/Kbuild                              |   2 -
 include/asm-generic/Kbuild.asm              |   1 -
 include/scsi/fc/Kbuild                      |   0
 include/uapi/Kbuild                         |  15 -
 include/uapi/asm-generic/Kbuild             |  36 --
 include/uapi/asm-generic/Kbuild.asm         |  62 ++--
 include/uapi/drm/Kbuild                     |  23 --
 include/uapi/linux/Kbuild                   | 493 +---------------------------
 include/uapi/linux/android/Kbuild           |   2 -
 include/uapi/linux/byteorder/Kbuild         |   3 -
 include/uapi/linux/caif/Kbuild              |   3 -
 include/uapi/linux/can/Kbuild               |   6 -
 include/uapi/linux/dvb/Kbuild               |   9 -
 include/uapi/linux/hdlc/Kbuild              |   2 -
 include/uapi/linux/hsi/Kbuild               |   2 -
 include/uapi/linux/iio/Kbuild               |   3 -
 include/uapi/linux/isdn/Kbuild              |   2 -
 include/uapi/linux/mmc/Kbuild               |   2 -
 include/uapi/linux/netfilter/Kbuild         |  89 -----
 include/uapi/linux/netfilter/ipset/Kbuild   |   5 -
 include/uapi/linux/netfilter_arp/Kbuild     |   3 -
 include/uapi/linux/netfilter_bridge/Kbuild  |  18 -
 include/uapi/linux/netfilter_ipv4/Kbuild    |  10 -
 include/uapi/linux/netfilter_ipv6/Kbuild    |  13 -
 include/uapi/linux/nfsd/Kbuild              |   6 -
 include/uapi/linux/raid/Kbuild              |   3 -
 include/uapi/linux/spi/Kbuild               |   2 -
 include/uapi/linux/sunrpc/Kbuild            |   2 -
 include/uapi/linux/tc_act/Kbuild            |  16 -
 include/uapi/linux/tc_ematch/Kbuild         |   5 -
 include/uapi/linux/usb/Kbuild               |  12 -
 include/uapi/linux/wimax/Kbuild             |   2 -
 include/uapi/misc/Kbuild                    |   2 -
 include/uapi/mtd/Kbuild                     |   6 -
 include/uapi/rdma/Kbuild                    |  20 --
 include/uapi/rdma/hfi/Kbuild                |   3 -
 include/uapi/scsi/Kbuild                    |   6 -
 include/uapi/scsi/fc/Kbuild                 |   5 -
 include/uapi/sound/Kbuild                   |  16 -
 include/uapi/video/Kbuild                   |   4 -
 include/uapi/xen/Kbuild                     |   5 -
 include/video/Kbuild                        |   0
 scripts/Makefile.headersinst                |  51 +--
 81 files changed, 113 insertions(+), 1756 deletions(-)
 delete mode 100644 arch/cris/include/uapi/arch-v10/arch/Kbuild
 delete mode 100644 arch/cris/include/uapi/arch-v32/arch/Kbuild
 delete mode 100644 arch/tile/include/uapi/arch/Kbuild
 delete mode 100644 include/Kbuild
 delete mode 100644 include/asm-generic/Kbuild.asm
 delete mode 100644 include/scsi/fc/Kbuild
 delete mode 100644 include/uapi/Kbuild
 delete mode 100644 include/uapi/asm-generic/Kbuild
 delete mode 100644 include/uapi/drm/Kbuild
 delete mode 100644 include/uapi/linux/android/Kbuild
 delete mode 100644 include/uapi/linux/byteorder/Kbuild
 delete mode 100644 include/uapi/linux/caif/Kbuild
 delete mode 100644 include/uapi/linux/can/Kbuild
 delete mode 100644 include/uapi/linux/dvb/Kbuild
 delete mode 100644 include/uapi/linux/hdlc/Kbuild
 delete mode 100644 include/uapi/linux/hsi/Kbuild
 delete mode 100644 include/uapi/linux/iio/Kbuild
 delete mode 100644 include/uapi/linux/isdn/Kbuild
 delete mode 100644 include/uapi/linux/mmc/Kbuild
 delete mode 100644 include/uapi/linux/netfilter/Kbuild
 delete mode 100644 include/uapi/linux/netfilter/ipset/Kbuild
 delete mode 100644 include/uapi/linux/netfilter_arp/Kbuild
 delete mode 100644 include/uapi/linux/netfilter_bridge/Kbuild
 delete mode 100644 include/uapi/linux/netfilter_ipv4/Kbuild
 delete mode 100644 include/uapi/linux/netfilter_ipv6/Kbuild
 delete mode 100644 include/uapi/linux/nfsd/Kbuild
 delete mode 100644 include/uapi/linux/raid/Kbuild
 delete mode 100644 include/uapi/linux/spi/Kbuild
 delete mode 100644 include/uapi/linux/sunrpc/Kbuild
 delete mode 100644 include/uapi/linux/tc_act/Kbuild
 delete mode 100644 include/uapi/linux/tc_ematch/Kbuild
 delete mode 100644 include/uapi/linux/usb/Kbuild
 delete mode 100644 include/uapi/linux/wimax/Kbuild
 delete mode 100644 include/uapi/misc/Kbuild
 delete mode 100644 include/uapi/mtd/Kbuild
 delete mode 100644 include/uapi/rdma/Kbuild
 delete mode 100644 include/uapi/rdma/hfi/Kbuild
 delete mode 100644 include/uapi/scsi/Kbuild
 delete mode 100644 include/uapi/scsi/fc/Kbuild
 delete mode 100644 include/uapi/sound/Kbuild
 delete mode 100644 include/uapi/video/Kbuild
 delete mode 100644 include/uapi/xen/Kbuild
 delete mode 100644 include/video/Kbuild
Documentation/kbuild/makefiles.txt +41 -25
index 37b525d329ae..91ffb391ed54 100644
@@ -44,10 +44,12 @@ This document describes the Linux kernel Makefiles.
 	   --- 6.11 Post-link pass
 
 	=== 7 Kbuild syntax for exported headers
-		--- 7.1 header-y
+		--- 7.1 header-n
 		--- 7.2 genhdr-y
 		--- 7.3 generic-y
 		--- 7.4 generated-y
+		--- 7.5 mandatory-y
+		--- 7.6 subdir-y
 
 	=== 8 Kbuild Variables
 	=== 9 Makefile language
@@ -1235,7 +1237,7 @@ When kbuild executes, the following steps are followed (roughly):
 	that may be shared between individual architectures.
 	The recommended approach how to use a generic header file is
 	to list the file in the Kbuild file.
-	See "7.4 generic-y" for further info on syntax etc.
+	See "7.3 generic-y" for further info on syntax etc.
 
 --- 6.11 Post-link pass
 
@@ -1262,37 +1264,30 @@ The pre-processing does:
 - drop include of compiler.h
 - drop all sections that are kernel internal (guarded by ifdef __KERNEL__)
 
-Each relevant directory contains a file name "Kbuild" which specifies the
-headers to be exported.
-See subsequent chapter for the syntax of the Kbuild file.
-
-	--- 7.1 header-y
-
-	header-y specifies header files to be exported.
-
-		Example:
-			#include/linux/Kbuild
-			header-y += usb/
-			header-y += aio_abi.h
+All headers under include/uapi/, include/generated/uapi/,
+arch/<arch>/include/uapi/asm/ and arch/<arch>/include/generated/uapi/asm/
+are exported.
 
-	The convention is to list one file per line and
-	preferably in alphabetic order.
+A Kbuild file may be defined under arch/<arch>/include/uapi/asm/ and
+arch/<arch>/include/asm/ to list asm files coming from asm-generic.
+See subsequent chapter for the syntax of the Kbuild file.
 
-	header-y also specifies which subdirectories to visit.
-	A subdirectory is identified by a trailing '/' which
-	can be seen in the example above for the usb subdirectory.
+	--- 7.1 header-n
 
-	Subdirectories are visited before their parent directories.
+	header-n is essentially used by include/uapi/linux/Kbuild to avoid
+	exporting specific headers (e.g. kvm.h) on architectures that do not
+	support it. It should be avoided as much as possible.
 
 	--- 7.2 genhdr-y
 
-	genhdr-y specifies generated files to be exported.
-	Generated files are special as they need to be looked
-	up in another directory when doing 'make O=...' builds.
+	genhdr-y specifies asm files to be generated.
 
 		Example:
-			#include/linux/Kbuild
-			genhdr-y += version.h
+			#arch/x86/include/uapi/asm/Kbuild
+			genhdr-y += unistd_32.h
+			genhdr-y += unistd_64.h
+			genhdr-y += unistd_x32.h
+
 
 	--- 7.3 generic-y
 
@@ -1334,6 +1329,27 @@ See subsequent chapter for the syntax of the Kbuild file.
 			#arch/x86/include/asm/Kbuild
 			generated-y += syscalls_32.h
 
+	--- 7.5 mandatory-y
+
+	mandatory-y is essentially used by include/uapi/asm-generic/Kbuild.asm
+	to define the minimun set of headers that must be exported in
+	include/asm.
+
+	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:
arch/alpha/include/uapi/asm/Kbuild +0 -41

43 lines not on this page · raw message

arch/arc/include/uapi/asm/Kbuild +0 -3
index f50d02df78d5..b15bf6bc0e94 100644
@@ -1,5 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-header-y += elf.h
-header-y += page.h
-header-y += cachectl.h
arch/arm/include/uapi/asm/Kbuild +0 -17
index 46a76cd6acb6..607f702c2d62 100644
@@ -1,23 +1,6 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += auxvec.h
-header-y += byteorder.h
-header-y += fcntl.h
-header-y += hwcap.h
-header-y += ioctls.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += perf_regs.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += unistd.h
 genhdr-y += unistd-common.h
 genhdr-y += unistd-oabi.h
 genhdr-y += unistd-eabi.h
arch/arm64/include/uapi/asm/Kbuild +0 -18
index 825b0fe51c2b..13a97aa2285f 100644
@@ -2,21 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += kvm_para.h
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += fcntl.h
-header-y += hwcap.h
-header-y += kvm_para.h
-header-y += perf_regs.h
-header-y += param.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += stat.h
-header-y += statfs.h
-header-y += ucontext.h
-header-y += unistd.h
arch/avr32/include/uapi/asm/Kbuild +0 -20
index 08d8a3d76ea8..610395083364 100644
@@ -1,26 +1,6 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += auxvec.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
 generic-y += bitsperlong.h
 generic-y += errno.h
 generic-y += fcntl.h
arch/blackfin/include/uapi/asm/Kbuild +0 -17
index 0bd28f77abc3..b15bf6bc0e94 100644
@@ -1,19 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += bfin_sport.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += fcntl.h
-header-y += fixed_code.h
-header-y += ioctls.h
-header-y += kvm_para.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += stat.h
-header-y += swab.h
-header-y += unistd.h
arch/c6x/include/uapi/asm/Kbuild +0 -8
index e9bc2b2b8147..13a97aa2285f 100644
@@ -2,11 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += kvm_para.h
-
-header-y += byteorder.h
-header-y += kvm_para.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += swab.h
-header-y += unistd.h
arch/cris/include/uapi/arch-v10/arch/Kbuild deleted +0 -5
deleted file mode 100644
index 9048c87a782b..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += sv_addr.agh
-header-y += sv_addr_ag.h
-header-y += svinto.h
-header-y += user.h
arch/cris/include/uapi/arch-v32/arch/Kbuild deleted +0 -3
deleted file mode 100644
index 59efffd16b61..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += cryptocop.h
-header-y += user.h
arch/cris/include/uapi/asm/Kbuild +2 -41

46 lines not on this page · raw message

arch/frv/include/uapi/asm/Kbuild +0 -33
index 42a2b33461c0..b15bf6bc0e94 100644
@@ -1,35 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += registers.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/h8300/include/uapi/asm/Kbuild +0 -28
index fb6101a5d4f1..b15bf6bc0e94 100644
@@ -1,30 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += siginfo.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/hexagon/include/asm/Kbuild +0 -3
index 797b64a4b80b..65f48073f8ac 100644
@@ -1,6 +1,3 @@
-
-header-y += ucontext.h
-
 generic-y += auxvec.h
 generic-y += barrier.h
 generic-y += bug.h
arch/hexagon/include/uapi/asm/Kbuild +0 -13
index c31706c38631..b15bf6bc0e94 100644
@@ -1,15 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += kvm_para.h
-header-y += param.h
-header-y += ptrace.h
-header-y += registers.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += swab.h
-header-y += unistd.h
-header-y += user.h
arch/ia64/include/uapi/asm/Kbuild +0 -45

48 lines not on this page · raw message

arch/m32r/include/uapi/asm/Kbuild +0 -31
index 43937a61d6cf..b15bf6bc0e94 100644
@@ -1,33 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/m68k/include/uapi/asm/Kbuild +0 -24
index 6a2d257bdfb2..64368077235a 100644
@@ -9,27 +9,3 @@ generic-y += socket.h
 generic-y += sockios.h
 generic-y += termbits.h
 generic-y += termios.h
-
-header-y += a.out.h
-header-y += bootinfo.h
-header-y += bootinfo-amiga.h
-header-y += bootinfo-apollo.h
-header-y += bootinfo-atari.h
-header-y += bootinfo-hp300.h
-header-y += bootinfo-mac.h
-header-y += bootinfo-q40.h
-header-y += bootinfo-vme.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += fcntl.h
-header-y += ioctls.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += stat.h
-header-y += swab.h
-header-y += unistd.h
arch/metag/include/uapi/asm/Kbuild +0 -8
index ab78be2b6eb0..b29731ebd7a9 100644
@@ -1,14 +1,6 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += byteorder.h
-header-y += ech.h
-header-y += ptrace.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += swab.h
-header-y += unistd.h
-
 generic-y += mman.h
 generic-y += resource.h
 generic-y += setup.h
arch/microblaze/include/uapi/asm/Kbuild +0 -32
index 1aac99f87df1..2178c78c7c1a 100644
@@ -2,35 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += types.h
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += elf.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += unistd.h
arch/mips/include/uapi/asm/Kbuild +0 -37
index f2cf41461146..a0266feba9e6 100644
@@ -2,40 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += ipcbuf.h
-
-header-y += auxvec.h
-header-y += bitfield.h
-header-y += bitsperlong.h
-header-y += break.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += inst.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += sgidefs.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += sysmips.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/mn10300/include/uapi/asm/Kbuild +0 -32
index 040178cdb3eb..b15bf6bc0e94 100644
@@ -1,34 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/nios2/include/uapi/asm/Kbuild +1 -2
index 69c965304146..374bd123329f 100644
@@ -1,6 +1,5 @@
+# UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += elf.h
-
 generic-y += setup.h
 generic-y += ucontext.h
arch/openrisc/include/asm/Kbuild +0 -3
index fb01873a5aad..1b533a107f19 100644
@@ -1,6 +1,3 @@
-
-header-y += ucontext.h
-
 generic-y += auxvec.h
 generic-y += barrier.h
 generic-y += bitsperlong.h
arch/openrisc/include/uapi/asm/Kbuild +0 -8
index 80761eb82b5f..b15bf6bc0e94 100644
@@ -1,10 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += byteorder.h
-header-y += elf.h
-header-y += kvm_para.h
-header-y += param.h
-header-y += ptrace.h
-header-y += sigcontext.h
-header-y += unistd.h
arch/parisc/include/uapi/asm/Kbuild +0 -28
index 348356c99514..3971c60a7e7f 100644
@@ -2,31 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += resource.h
-
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += pdc.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/powerpc/include/uapi/asm/Kbuild +0 -45

47 lines not on this page · raw message

arch/s390/include/uapi/asm/Kbuild +0 -53

55 lines not on this page · raw message

arch/score/include/asm/Kbuild +0 -3
index 926943a49ea5..4ee7fc77d23c 100644
@@ -1,6 +1,3 @@
-
-header-y +=
-
 generic-y += barrier.h
 generic-y += clkdev.h
 generic-y += current.h
arch/score/include/uapi/asm/Kbuild +0 -32
index 040178cdb3eb..b15bf6bc0e94 100644
@@ -1,34 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/sh/include/uapi/asm/Kbuild +0 -23
index 60613ae78513..b15bf6bc0e94 100644
@@ -1,25 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += cpu-features.h
-header-y += hw_breakpoint.h
-header-y += ioctls.h
-header-y += posix_types.h
-header-y += posix_types_32.h
-header-y += posix_types_64.h
-header-y += ptrace.h
-header-y += ptrace_32.h
-header-y += ptrace_64.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += sockios.h
-header-y += stat.h
-header-y += swab.h
-header-y += types.h
-header-y += unistd.h
-header-y += unistd_32.h
-header-y += unistd_64.h
arch/sparc/include/uapi/asm/Kbuild +0 -48

50 lines not on this page · raw message

arch/tile/include/asm/Kbuild +0 -3
index aa48b6eaff2d..61157a7e8532 100644
@@ -1,6 +1,3 @@
-
-header-y += ../arch/
-
 generic-y += bug.h
 generic-y += bugs.h
 generic-y += clkdev.h
arch/tile/include/uapi/arch/Kbuild deleted +0 -17
deleted file mode 100644
index 97dfbecec6b6..000000000000
@@ -1,17 +0,0 @@
-# UAPI Header export list
-header-y += abi.h
-header-y += chip.h
-header-y += chip_tilegx.h
-header-y += chip_tilepro.h
-header-y += icache.h
-header-y += interrupts.h
-header-y += interrupts_32.h
-header-y += interrupts_64.h
-header-y += opcode.h
-header-y += opcode_tilegx.h
-header-y += opcode_tilepro.h
-header-y += sim.h
-header-y += sim_def.h
-header-y += spr_def.h
-header-y += spr_def_32.h
-header-y += spr_def_64.h
arch/tile/include/uapi/asm/Kbuild +2 -17
index c20db8e428bf..e0a50111e07f 100644
@@ -1,21 +1,6 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += hardwall.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += stat.h
-header-y += swab.h
-header-y += ucontext.h
-header-y += unistd.h
-
 generic-y += ucontext.h
+
+subdir-y += ../arch
arch/unicore32/include/uapi/asm/Kbuild +0 -6
index 0514d7ad6855..13a97aa2285f 100644
@@ -1,10 +1,4 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += byteorder.h
-header-y += kvm_para.h
-header-y += ptrace.h
-header-y += sigcontext.h
-header-y += unistd.h
-
 generic-y += kvm_para.h
arch/x86/include/uapi/asm/Kbuild +0 -58

61 lines not on this page · raw message

arch/xtensa/include/uapi/asm/Kbuild +0 -23
index 56aad54e7fb7..b15bf6bc0e94 100644
@@ -1,25 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += byteorder.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += swab.h
-header-y += termbits.h
-header-y += types.h
-header-y += unistd.h
include/Kbuild deleted +0 -2
deleted file mode 100644
index bab1145bc7a7..000000000000
@@ -1,2 +0,0 @@
-# Top-level Makefile calls into asm-$(ARCH)
-# List only non-arch directories below
include/asm-generic/Kbuild.asm deleted +0 -1
deleted file mode 100644
index d2ee86b4c091..000000000000
@@ -1 +0,0 @@
-include include/uapi/asm-generic/Kbuild.asm
include/scsi/fc/Kbuild deleted +0 -0
deleted file mode 100644
index e69de29bb2d1..000000000000
include/uapi/Kbuild deleted +0 -15
deleted file mode 100644
index 245aa6e05e6a..000000000000
@@ -1,15 +0,0 @@
-# UAPI Header export list
-# Top-level Makefile calls into asm-$(ARCH)
-# List only non-arch directories below
-
-
-header-y += asm-generic/
-header-y += linux/
-header-y += sound/
-header-y += mtd/
-header-y += rdma/
-header-y += video/
-header-y += drm/
-header-y += xen/
-header-y += scsi/
-header-y += misc/
include/uapi/asm-generic/Kbuild deleted +0 -36
deleted file mode 100644
index b73de7bb7a62..000000000000
@@ -1,36 +0,0 @@
-# UAPI Header export list
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += errno-base.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += int-l64.h
-header-y += int-ll64.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman-common.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += shmparam.h
-header-y += siginfo.h
-header-y += signal-defs.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += ucontext.h
-header-y += unistd.h
include/uapi/asm-generic/Kbuild.asm +31 -31

69 lines not on this page · raw message

include/uapi/drm/Kbuild deleted +0 -23
deleted file mode 100644
index c97addd08f8c..000000000000
@@ -1,23 +0,0 @@
-# UAPI Header export list
-header-y += drm.h
-header-y += drm_fourcc.h
-header-y += drm_mode.h
-header-y += drm_sarea.h
-header-y += amdgpu_drm.h
-header-y += exynos_drm.h
-header-y += i810_drm.h
-header-y += i915_drm.h
-header-y += mga_drm.h
-header-y += nouveau_drm.h
-header-y += omap_drm.h
-header-y += qxl_drm.h
-header-y += r128_drm.h
-header-y += radeon_drm.h
-header-y += savage_drm.h
-header-y += sis_drm.h
-header-y += tegra_drm.h
-header-y += via_drm.h
-header-y += vmwgfx_drm.h
-header-y += msm_drm.h
-header-y += vc4_drm.h
-header-y += virtgpu_drm.h
include/uapi/linux/Kbuild +9 -484

500 lines not on this page · raw message

include/uapi/linux/android/Kbuild deleted +0 -2
deleted file mode 100644
index ca011eec252a..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += binder.h
include/uapi/linux/byteorder/Kbuild deleted +0 -3
deleted file mode 100644
index 619225b9ff2e..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += big_endian.h
-header-y += little_endian.h
include/uapi/linux/caif/Kbuild deleted +0 -3
deleted file mode 100644
index 43396612d3a3..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += caif_socket.h
-header-y += if_caif.h
include/uapi/linux/can/Kbuild deleted +0 -6
deleted file mode 100644
index 21c91bf25a29..000000000000
@@ -1,6 +0,0 @@
-# UAPI Header export list
-header-y += bcm.h
-header-y += error.h
-header-y += gw.h
-header-y += netlink.h
-header-y += raw.h
include/uapi/linux/dvb/Kbuild deleted +0 -9
deleted file mode 100644
index d40942cfc627..000000000000
@@ -1,9 +0,0 @@
-# UAPI Header export list
-header-y += audio.h
-header-y += ca.h
-header-y += dmx.h
-header-y += frontend.h
-header-y += net.h
-header-y += osd.h
-header-y += version.h
-header-y += video.h
include/uapi/linux/hdlc/Kbuild deleted +0 -2
deleted file mode 100644
index 8c1d2cb75e33..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += ioctl.h
include/uapi/linux/hsi/Kbuild deleted +0 -2
deleted file mode 100644
index a16a00544258..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += hsi_char.h cs-protocol.h
include/uapi/linux/iio/Kbuild deleted +0 -3
deleted file mode 100644
index 86f76d84c44f..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += events.h
-header-y += types.h
include/uapi/linux/isdn/Kbuild deleted +0 -2
deleted file mode 100644
index 89e52850bf29..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += capicmd.h
include/uapi/linux/mmc/Kbuild deleted +0 -2
deleted file mode 100644
index 8c1d2cb75e33..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += ioctl.h
include/uapi/linux/netfilter/Kbuild deleted +0 -89

89 lines not on this page · raw message

include/uapi/linux/netfilter/ipset/Kbuild deleted +0 -5
deleted file mode 100644
index d2680423d9ab..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += ip_set.h
-header-y += ip_set_bitmap.h
-header-y += ip_set_hash.h
-header-y += ip_set_list.h
include/uapi/linux/netfilter_arp/Kbuild deleted +0 -3
deleted file mode 100644
index 62d5637cc0ac..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += arp_tables.h
-header-y += arpt_mangle.h
include/uapi/linux/netfilter_bridge/Kbuild deleted +0 -18
deleted file mode 100644
index 0fbad8ef96de..000000000000
@@ -1,18 +0,0 @@
-# UAPI Header export list
-header-y += ebt_802_3.h
-header-y += ebt_among.h
-header-y += ebt_arp.h
-header-y += ebt_arpreply.h
-header-y += ebt_ip.h
-header-y += ebt_ip6.h
-header-y += ebt_limit.h
-header-y += ebt_log.h
-header-y += ebt_mark_m.h
-header-y += ebt_mark_t.h
-header-y += ebt_nat.h
-header-y += ebt_nflog.h
-header-y += ebt_pkttype.h
-header-y += ebt_redirect.h
-header-y += ebt_stp.h
-header-y += ebt_vlan.h
-header-y += ebtables.h
include/uapi/linux/netfilter_ipv4/Kbuild deleted +0 -10
deleted file mode 100644
index ecb291df390e..000000000000
@@ -1,10 +0,0 @@
-# UAPI Header export list
-header-y += ip_tables.h
-header-y += ipt_CLUSTERIP.h
-header-y += ipt_ECN.h
-header-y += ipt_LOG.h
-header-y += ipt_REJECT.h
-header-y += ipt_TTL.h
-header-y += ipt_ah.h
-header-y += ipt_ecn.h
-header-y += ipt_ttl.h
include/uapi/linux/netfilter_ipv6/Kbuild deleted +0 -13
deleted file mode 100644
index 75a668ca2353..000000000000
@@ -1,13 +0,0 @@
-# UAPI Header export list
-header-y += ip6_tables.h
-header-y += ip6t_HL.h
-header-y += ip6t_LOG.h
-header-y += ip6t_NPT.h
-header-y += ip6t_REJECT.h
-header-y += ip6t_ah.h
-header-y += ip6t_frag.h
-header-y += ip6t_hl.h
-header-y += ip6t_ipv6header.h
-header-y += ip6t_mh.h
-header-y += ip6t_opts.h
-header-y += ip6t_rt.h
include/uapi/linux/nfsd/Kbuild deleted +0 -6
deleted file mode 100644
index c11bc404053c..000000000000
@@ -1,6 +0,0 @@
-# UAPI Header export list
-header-y += cld.h
-header-y += debug.h
-header-y += export.h
-header-y += nfsfh.h
-header-y += stats.h
include/uapi/linux/raid/Kbuild deleted +0 -3
deleted file mode 100644
index e2c3d25405d7..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += md_p.h
-header-y += md_u.h
include/uapi/linux/spi/Kbuild deleted +0 -2
deleted file mode 100644
index 0cc747eff165..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += spidev.h
include/uapi/linux/sunrpc/Kbuild deleted +0 -2
deleted file mode 100644
index 8e02e47c20fb..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += debug.h
include/uapi/linux/tc_act/Kbuild deleted +0 -16
deleted file mode 100644
index ba62ddf0e58a..000000000000
@@ -1,16 +0,0 @@
-# UAPI Header export list
-header-y += tc_csum.h
-header-y += tc_defact.h
-header-y += tc_gact.h
-header-y += tc_ipt.h
-header-y += tc_mirred.h
-header-y += tc_sample.h
-header-y += tc_nat.h
-header-y += tc_pedit.h
-header-y += tc_skbedit.h
-header-y += tc_vlan.h
-header-y += tc_bpf.h
-header-y += tc_connmark.h
-header-y += tc_ife.h
-header-y += tc_tunnel_key.h
-header-y += tc_skbmod.h
include/uapi/linux/tc_ematch/Kbuild deleted +0 -5
deleted file mode 100644
index 53fca3925535..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += tc_em_cmp.h
-header-y += tc_em_meta.h
-header-y += tc_em_nbyte.h
-header-y += tc_em_text.h
include/uapi/linux/usb/Kbuild deleted +0 -12
deleted file mode 100644
index 4cc4d6e7e523..000000000000
@@ -1,12 +0,0 @@
-# UAPI Header export list
-header-y += audio.h
-header-y += cdc.h
-header-y += cdc-wdm.h
-header-y += ch11.h
-header-y += ch9.h
-header-y += functionfs.h
-header-y += g_printer.h
-header-y += gadgetfs.h
-header-y += midi.h
-header-y += tmc.h
-header-y += video.h
include/uapi/linux/wimax/Kbuild deleted +0 -2
deleted file mode 100644
index 1c97be49971f..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += i2400m.h
include/uapi/misc/Kbuild deleted +0 -2
deleted file mode 100644
index e96cae7d58c9..000000000000
@@ -1,2 +0,0 @@
-# misc Header export list
-header-y += cxl.h
include/uapi/mtd/Kbuild deleted +0 -6
deleted file mode 100644
index 5a691e10cd0e..000000000000
@@ -1,6 +0,0 @@
-# UAPI Header export list
-header-y += inftl-user.h
-header-y += mtd-abi.h
-header-y += mtd-user.h
-header-y += nftl-user.h
-header-y += ubi-user.h
include/uapi/rdma/Kbuild deleted +0 -20
deleted file mode 100644
index 1e0af1ff75c3..000000000000
@@ -1,20 +0,0 @@
-# UAPI Header export list
-header-y += ib_user_cm.h
-header-y += rdma_user_ioctl.h
-header-y += ib_user_mad.h
-header-y += ib_user_sa.h
-header-y += ib_user_verbs.h
-header-y += rdma_netlink.h
-header-y += rdma_user_cm.h
-header-y += hfi/
-header-y += rdma_user_rxe.h
-header-y += cxgb3-abi.h
-header-y += cxgb4-abi.h
-header-y += mlx4-abi.h
-header-y += mlx5-abi.h
-header-y += mthca-abi.h
-header-y += nes-abi.h
-header-y += ocrdma-abi.h
-header-y += hns-abi.h
-header-y += vmw_pvrdma-abi.h
-header-y += qedr-abi.h
include/uapi/rdma/hfi/Kbuild deleted +0 -3
deleted file mode 100644
index b65b0b3a5f63..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += hfi1_user.h
-header-y += hfi1_ioctl.h
include/uapi/scsi/Kbuild deleted +0 -6
deleted file mode 100644
index d791e0ad509d..000000000000
@@ -1,6 +0,0 @@
-# UAPI Header export list
-header-y += fc/
-header-y += scsi_bsg_fc.h
-header-y += scsi_netlink.h
-header-y += scsi_netlink_fc.h
-header-y += cxlflash_ioctl.h
include/uapi/scsi/fc/Kbuild deleted +0 -5
deleted file mode 100644
index 5ead9fac265c..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += fc_els.h
-header-y += fc_fs.h
-header-y += fc_gs.h
-header-y += fc_ns.h
include/uapi/sound/Kbuild deleted +0 -16
deleted file mode 100644
index 9578d8bdbf31..000000000000
@@ -1,16 +0,0 @@
-# UAPI Header export list
-header-y += asequencer.h
-header-y += asoc.h
-header-y += asound.h
-header-y += asound_fm.h
-header-y += compress_offload.h
-header-y += compress_params.h
-header-y += emu10k1.h
-header-y += firewire.h
-header-y += hdsp.h
-header-y += hdspm.h
-header-y += sb16_csp.h
-header-y += sfnt_info.h
-header-y += tlv.h
-header-y += usb_stream.h
-header-y += snd_sst_tokens.h
include/uapi/video/Kbuild deleted +0 -4
deleted file mode 100644
index ac7203bb32cc..000000000000
@@ -1,4 +0,0 @@
-# UAPI Header export list
-header-y += edid.h
-header-y += sisfb.h
-header-y += uvesafb.h
include/uapi/xen/Kbuild deleted +0 -5
deleted file mode 100644
index 5c459628e8c7..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += evtchn.h
-header-y += gntalloc.h
-header-y += gntdev.h
-header-y += privcmd.h
include/video/Kbuild deleted +0 -0
deleted file mode 100644
index e69de29bb2d1..000000000000
scripts/Makefile.headersinst +27 -24

86 lines not on this page · raw message

Signature · 6 lines
2.8.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#183 lore raw

PATCH v9 11/11 uapi: export all arch specifics directories

In reply to Nicolas Dichtel

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.

---
 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(-)
Documentation/kbuild/makefiles.txt +1 -14
index 91ffb391ed54..223b33d5195a 100644
@@ -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:
Makefile +3 -3
index 4cb6b0a1152b..e9ac52330215 100644
@@ -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
arch/cris/include/uapi/asm/Kbuild +0 -3
index d0c5471856e0..b15bf6bc0e94 100644
@@ -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/
arch/tile/include/uapi/asm/Kbuild +0 -2
index e0a50111e07f..0c74c3c5ebfa 100644
@@ -2,5 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += ucontext.h
-
-subdir-y += ../arch
scripts/Makefile.headersinst +1 -2
index 122945618ae2..1aeb4f45208f 100644
@@ -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))
Signature · 1 line
2.8.1
#184 lore raw

Re: [PATCH v9 00/11] uapi: export all headers under uapi directories

In reply to Nicolas Dichtel
Quoted 13 lines · Nicolas Dichtel

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.

Quoted 6 lines

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?

I'm a bit pushy on this, but it would be nice to get this series in before the rc1. In fact, it would certainly be better to have this living some times in -next, but it would probably generate a lot of conflicts in linux-next. OTOH those conflicts would be easy to solve.

Regards,
Nicolas

#185 lore raw

Re: [PATCH v9 00/11] uapi: export all headers under uapi directories

In reply to Nicolas Dichtel
Quoted 13 lines · Nicolas Dichtel

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.

Quoted 6 lines

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?

Still waiting to know who may take this series in its tree ;-) kbuild tree has not been updated since two months (4.10-rc1) :/

Regards,
Nicolas

#186 lore raw

Re: [PATCH v9 00/11] uapi: export all headers under uapi directories

Hi Nicolas,

2017-03-11 1:34 GMT+09:00 Nicolas Dichtel <[email protected]>:

Quoted 14 lines · Nicolas Dichtel
Quoted 13 lines

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.

Quoted 7 lines
Quoted 6 lines

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?

Still waiting to know who may take this series in its tree ;-)

I will take care of this.

Quoted 1 line

kbuild tree has not been updated since two months (4.10-rc1) :/

Michal's tree is not active these days.
Going forward, I will queue up Kbuild patches in my repository.

BTW, this series does not apply cleanly.

If you could rebase it onto v4.11-rc1 tag,
it would be helpful.

Thanks!

Signature · 2 lines
Best Regards
Masahiro Yamada
#187 lore raw

Re: [PATCH v9 00/11] uapi: export all headers under uapi directories

Le 11/03/2017 à 06:43, Masahiro Yamada a écrit :
[snip]

Quoted 2 lines

I will take care of this.

Thank you.

Quoted 6 lines
Quoted 4 lines

kbuild tree has not been updated since two months (4.10-rc1) :/

Michal's tree is not active these days.

Ok, I didn't know that.

Quoted 8 lines

Going forward, I will queue up Kbuild patches in my repository.

BTW, this series does not apply cleanly.

If you could rebase it onto v4.11-rc1 tag,
it would be helpful.

You really want this on top of 4.11-rc1 or the last linus tag, ie v4.11-rc2?

Regards,
Nicolas

#188 lore raw

Re: [PATCH v9 00/11] uapi: export all headers under uapi directories

Ni Nicolas,

2017-03-14 1:57 GMT+09:00 Nicolas Dichtel <[email protected]>:

Quoted 6 lines
Quoted 4 lines

BTW, this series does not apply cleanly.

If you could rebase it onto v4.11-rc1 tag,
it would be helpful.

You really want this on top of 4.11-rc1 or the last linus tag, ie v4.11-rc2?

Basically, I queue up patches based on -rc1 tag unless there is a particular reason for otherwise.

If it is based on -rc1, will it cause conflicts with Linus tree?

Signature · 2 lines
Best Regards
Masahiro Yamada
#189 lore raw

Re: [PATCH v9 00/11] uapi: export all headers under uapi directories

Quoted 6 lines · Masahiro Yamada

Ni Nicolas,

2017-03-14 1:57 GMT+09:00 Nicolas Dichtel <[email protected]>:

Quoted 2 lines
Quoted 2 lines

BTW, this series does not apply cleanly.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

If you could rebase it onto v4.11-rc1 tag,
it would be helpful.

You really want this on top of 4.11-rc1 or the last linus tag, ie v4.11-rc2?

Basically, I queue up patches based on -rc1 tag unless there is a particular reason for otherwise.

Ok, thank you for the explanation.

Quoted 2 lines

If it is based on -rc1, will it cause conflicts with Linus tree?

I will check and let you know in the v10 submission.

Thank you,
Nicolas

#190 lore raw

v10 cover uapi: export all headers under uapi directories

In reply to Masahiro Yamada

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 on top of masahiroy/linux-kbuild.git#for-next (v4.11-rc1). I didn't find any conflict with v4.11-rc2.

v9 -> v10:
- rebase on top of masahiroy/linux-kbuild.git#for-next
- patch #4 & #10: fix dependency check
- fix some typos in commits logs

v8 -> v9:
- rebase on top of linus tree
- patch #8: add include/uapi/linux/crypto.h

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

#191 lore raw

PATCH v10 1/11 h8300: put bitsperlong.h in uapi

This header file is exported, thus move it to uapi.

---
 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
arch/h8300/include/asm/bitsperlong.h deleted +0 -14
deleted file mode 100644
index e140e46729ac..000000000000
@@ -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 */
arch/h8300/include/uapi/asm/bitsperlong.h new file +14 -0
new file mode 100644
index 000000000000..e56cf72369b6
@@ -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 */
Signature · 1 line
2.8.1
#192 lore raw

Re: [PATCH v10 01/11] h8300: put bitsperlong.h in uapi

Hi Nicolas,

2017-03-14 21:54 GMT+09:00 Nicolas Dichtel <[email protected]>:

Quoted 13 lines

This header file is exported, thus move it to uapi.

arch/h8300/include/asm/bitsperlong.h deleted +0 -1
-#endif /* __ASM_H8300_BITS_PER_LONG */
arch/h8300/include/uapi/asm/bitsperlong.h new file +0 -0
new file mode 100644
index 000000000000..e56cf72369b6

arch/h8300/include/uapi/asm/bitsperlong.h line 2

Quoted 2 lines
arch/h8300/include/uapi/asm/bitsperlong.h new file +2 -0
@@ -0,0 +1,14 @@
+#ifndef _UAPI_ASM_H8300_BITS_PER_LONG
+#define _UAPI_ASM_H8300_BITS_PER_LONG

Just a minor comment.

The include guard was originally __ASM_H8300_BITS_PER_LONG. This will change it into _ASM_H8300_BITS_PER_LONG (after _UAPI is stripped by headers_install.sh)

I just thought _UAPI__ASM_H8300_BITS_PER_LONG might be even safer, but I know I am nit-picking. I can apply this as-is.
I leave it to you.

Signature · 2 lines
Best Regards
Masahiro Yamada
#193 lore raw

Re: [PATCH v10 01/11] h8300: put bitsperlong.h in uapi

Le 27/03/2017 à 07:31, Masahiro Yamada a écrit :
[snip]

Quoted 13 lines

arch/h8300/include/uapi/asm/bitsperlong.h line 2

Quoted 9 lines
arch/h8300/include/asm/bitsperlong.h deleted +0 -1
-#endif /* __ASM_H8300_BITS_PER_LONG */
arch/h8300/include/uapi/asm/bitsperlong.h new file +2 -0
new file mode 100644
index 000000000000..e56cf72369b6
@@ -0,0 +1,14 @@
+#ifndef _UAPI_ASM_H8300_BITS_PER_LONG
+#define _UAPI_ASM_H8300_BITS_PER_LONG

Just a minor comment.

Quoted 7 lines

The include guard was originally __ASM_H8300_BITS_PER_LONG. This will change it into _ASM_H8300_BITS_PER_LONG (after _UAPI is stripped by headers_install.sh)

I just thought _UAPI__ASM_H8300_BITS_PER_LONG might be even safer, but I know I am nit-picking. I can apply this as-is.
I leave it to you.

I intentionnaly "clean" that, but I will restore it, no problem ;-)

Regards,
Nicolas

#194 lore raw

PATCH v10 2/11 nios2: put setup.h in uapi

In reply to Nicolas Dichtel

This header file is exported, but from a userland pov, it's just a wrapper to asm-generic/setup.h.

---
 arch/nios2/include/uapi/asm/Kbuild | 1 +
 1 file changed, 1 insertion(+)
arch/nios2/include/uapi/asm/Kbuild +1 -0
index e0bb972a50d7..69c965304146 100644
@@ -2,4 +2,5 @@ include include/uapi/asm-generic/Kbuild.asm
 
 header-y += elf.h
 
+generic-y += setup.h
 generic-y += ucontext.h
Signature · 1 line
2.8.1
#195 lore raw

PATCH v10 3/11 x86: stop exporting msr-index.h to userland

In reply to Nicolas Dichtel

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")
CC Ingo Molnar <[email protected]>
---
 arch/x86/include/uapi/asm/Kbuild | 1 -
 1 file changed, 1 deletion(-)
arch/x86/include/uapi/asm/Kbuild +0 -1
index 3dec769cadf7..1c532b3f18ea 100644
@@ -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
Signature · 1 line
2.8.1
#196 lore raw

PATCH v10 4/11 Makefile.headersinst: cleanup input files

In reply to Nicolas Dichtel

After the last three 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.

---
 scripts/Makefile.headersinst | 38 ++++++++++++++------------------------
 1 file changed, 14 insertions(+), 24 deletions(-)
scripts/Makefile.headersinst +14 -24
index 1106d6ca3a38..7bd9df6efe2f 100644
@@ -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;                                                           \
@@ -106,7 +94,9 @@ __headersinst: $(subdirs) $(install-file)
 	@:
 
 targets += $(install-file)
-$(install-file): scripts/headers_install.sh $(input-files1) $(input-files2) $(input-files3) FORCE
+$(install-file): scripts/headers_install.sh \
+		 $(addprefix $(srcdir)/,$(header-y)) \
+		 $(addprefix $(gendir)/,$(genhdr-y)) FORCE
 	$(if $(unwanted),$(call cmd,remove),)
 	$(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@)))
 	$(call if_changed,install)
Signature · 1 line
2.8.1
#197 lore raw

PATCH v10 5/11 Makefile.headersinst: remove destination-y option

In reply to Nicolas Dichtel

This option was added in commit c7bb349e7c25 ("kbuild: introduce destination-y for exported headers") but never used in-tree.

---
 Documentation/kbuild/makefiles.txt | 23 ++++-------------------
 scripts/Makefile.headersinst       |  2 +-
 2 files changed, 5 insertions(+), 20 deletions(-)
Documentation/kbuild/makefiles.txt +4 -19
index 9b9c4797fc55..37b525d329ae 100644
@@ -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
scripts/Makefile.headersinst +1 -1
index 7bd9df6efe2f..ca5d439c9abf 100644
@@ -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)),)
Signature · 1 line
2.8.1
#198 lore raw

PATCH v10 6/11 uapi: includes linux/types.h before exporting files

In reply to Nicolas Dichtel

Some files will be exported after a following 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>

---
 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(-)
include/uapi/linux/bcache.h +1 -1
index 22b6ad31c706..e3bb0635e94a 100644
@@ -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)				\
include/uapi/linux/btrfs_tree.h +2 -0
index d5ad15a106a7..6a261cb52d95 100644
@@ -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
include/uapi/linux/cryptouser.h +2 -0
index 11d21fce14d6..c6a09c5261e7 100644
@@ -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,
include/uapi/linux/pr.h +2 -0
index 57d7c0f916b6..645ef3cf3dd0 100644
@@ -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,
include/uapi/linux/qrtr.h +1 -0
index 66c0748d26e2..b14ee91ec387 100644
@@ -1,6 +1,7 @@
 #ifndef _LINUX_QRTR_H
 #define _LINUX_QRTR_H
 
+#include <linux/types.h>
 #include <linux/socket.h>
 
 struct sockaddr_qrtr {
include/uapi/rdma/bnxt_re-abi.h +2 -0
index e2c8a3f0ccec..74018bd18d72 100644
@@ -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 {
Signature · 1 line
2.8.1
#199 lore raw

PATCH v10 7/11 btrfs_tree.h: fix include from userland

In reply to Nicolas Dichtel

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];

---
 include/uapi/linux/btrfs_tree.h | 1 +
 1 file changed, 1 insertion(+)
include/uapi/linux/btrfs_tree.h +1 -0
index 6a261cb52d95..6a754ada59af 100644
@@ -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
Signature · 1 line
2.8.1
#200 lore raw

Re: [PATCH v10 07/11] btrfs_tree.h: fix include from userland

Hi Nicolas,

2017-03-14 21:54 GMT+09:00 Nicolas Dichtel <[email protected]>:

Quoted 21 lines

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];

---
 include/uapi/linux/btrfs_tree.h | 1 +
 1 file changed, 1 insertion(+)
include/uapi/linux/btrfs_tree.h +0 -0
index 6a261cb52d95..6a754ada59af 100644

include/uapi/linux/btrfs_tree.h line 6

Quoted 5 lines
include/uapi/linux/btrfs_tree.h +1 -0
@@ -2,6 +2,7 @@
 #define _BTRFS_CTREE_H_
 
 #include <linux/types.h>
+#include <linux/btrfs.h>
 

Can you move <linux/types.h> below <linux/btrfs.h> to sort the includes alphabetically?

This also applies to:

include/uapi/linux/qrtr.h in 06/11
include/uapi/linux/cryptouser.h in 08/11

Signature · 2 lines
Best Regards
Masahiro Yamada
#201 lore raw

Re: [PATCH v10 07/11] btrfs_tree.h: fix include from userland

Hi Masahiro,

Quoted 4 lines · Masahiro Yamada

Hi Nicolas,

2017-03-14 21:54 GMT+09:00 Nicolas Dichtel <[email protected]>:

[snip]

Quoted 7 lines
Quoted 7 lines
include/uapi/linux/btrfs_tree.h +0 -0
index 6a261cb52d95..6a754ada59af 100644
@@ -2,6 +2,7 @@
 #define _BTRFS_CTREE_H_
 
Quoted 6 lines

include/uapi/linux/btrfs_tree.h line 6

Quoted 3 lines
include/uapi/linux/btrfs_tree.h +1 -0
 #include <linux/types.h>
+#include <linux/btrfs.h>
 

Can you move <linux/types.h> below <linux/btrfs.h> to sort the includes alphabetically?

Ok.

Quoted 5 lines

This also applies to:

include/uapi/linux/qrtr.h in 06/11
include/uapi/linux/cryptouser.h in 08/11

Ok.

Regards,
Nicolas

#202 lore raw

PATCH v10 8/11 cryptouser.h: fix include from userland

In reply to Nicolas Dichtel

This patch prepares the uapi export by fixing the following error:

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

---
 include/linux/crypto.h          |  2 +-
 include/uapi/linux/crypto.h     | 14 ++++++++++++++
 include/uapi/linux/cryptouser.h |  6 ++++++
 3 files changed, 21 insertions(+), 1 deletion(-)
 create mode 100644 include/uapi/linux/crypto.h
include/linux/crypto.h +1 -1
index c0b0cf3d2d2f..cc2425ba8527 100644
@@ -24,6 +24,7 @@
 #include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/uaccess.h>
+#include <uapi/linux/crypto.h>
 
 /*
  * Autoloaded crypto modules should only use a prefixed name to avoid allowing
@@ -123,7 +124,6 @@
 /*
  * Miscellaneous stuff.
  */
-#define CRYPTO_MAX_ALG_NAME		64
 
 /*
  * The macro CRYPTO_MINALIGN_ATTR (along with the void * type in the actual
include/uapi/linux/crypto.h new file +14 -0
new file mode 100644
index 000000000000..e342c5a5ac50
@@ -0,0 +1,14 @@
+/*
+ * Copyright (c) 2017 Nicolas Dichtel <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ */
+
+#ifndef _UAPI_CRYPTO_H
+#define _UAPI_CRYPTO_H
+
+#define CRYPTO_MAX_ALG_NAME		64
+
+#endif /* _UAPI_CRYPTO_H */
include/uapi/linux/cryptouser.h +6 -0
index c6a09c5261e7..ce3c64fb89e1 100644
@@ -18,7 +18,11 @@
  * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
+#ifndef _UAPI_CRYPTOUSER_H
+#define _UAPI_CRYPTOUSER_H
+
 #include <linux/types.h>
+#include <linux/crypto.h>
 
 /* Netlink configuration messages.  */
 enum {
@@ -121,3 +125,5 @@ struct crypto_report_acomp {
 
 #define CRYPTO_REPORT_MAXSIZE (sizeof(struct crypto_user_alg) + \
 			       sizeof(struct crypto_report_blkcipher))
+
+#endif /* _UAPI_CRYPTOUSER_H */
Signature · 1 line
2.8.1
#203 lore raw

PATCH v10 9/11 smc_diag.h: fix include from userland

In reply to Nicolas Dichtel

This patch prepares the uapi export by fixing the following error:

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

---
 include/rdma/ib_verbs.h           | 3 +--
 include/uapi/linux/smc_diag.h     | 2 +-
 include/uapi/rdma/ib_user_verbs.h | 2 ++
 3 files changed, 4 insertions(+), 3 deletions(-)
include/rdma/ib_verbs.h +1 -2
index 0f1813c13687..50f276a4afdc 100644
@@ -61,6 +61,7 @@
 #include <linux/mmu_notifier.h>
 #include <linux/uaccess.h>
 #include <linux/cgroup_rdma.h>
+#include <uapi/rdma/ib_user_verbs.h>
 
 extern struct workqueue_struct *ib_wq;
 extern struct workqueue_struct *ib_comp_wq;
@@ -1838,8 +1839,6 @@ enum ib_mad_result {
 	IB_MAD_RESULT_CONSUMED = 1 << 2  /* Packet consumed: stop processing */
 };
 
-#define IB_DEVICE_NAME_MAX 64
-
 struct ib_port_cache {
 	struct ib_pkey_cache  *pkey;
 	struct ib_gid_table   *gid;
include/uapi/linux/smc_diag.h +1 -1
index 0063919fea34..87712bfaa9dd 100644
@@ -3,7 +3,7 @@
 
 #include <linux/types.h>
 #include <linux/inet_diag.h>
-#include <rdma/ib_verbs.h>
+#include <rdma/ib_user_verbs.h>
 
 /* Request structure */
 struct smc_diag_req {
include/uapi/rdma/ib_user_verbs.h +2 -0
index 997f904c7692..8edce2b65903 100644
@@ -1124,4 +1124,6 @@ struct ib_uverbs_ex_destroy_rwq_ind_table  {
 	__u32 ind_tbl_handle;
 };
 
+#define IB_DEVICE_NAME_MAX 64
+
 #endif /* IB_USER_VERBS_H */
Signature · 1 line
2.8.1
#204 lore raw

PATCH v10 10/11 uapi: export all headers under uapi directories

In reply to Nicolas Dichtel

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/cifs_mount.h
linux/coresight-stm.h
linux/crypto.h
linux/cryptouser.h
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/sched/types.h
linux/sed-opal.h
linux/smc.h
linux/smc_diag.h
linux/stm.h
linux/userio.h
linux/virtio_mmio.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 <[email protected]> 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.

---
 Documentation/kbuild/makefiles.txt          |  66 ++--
 arch/alpha/include/uapi/asm/Kbuild          |  41 ---
 arch/arc/include/uapi/asm/Kbuild            |   3 -
 arch/arm/include/uapi/asm/Kbuild            |  17 -
 arch/arm64/include/uapi/asm/Kbuild          |  18 -
 arch/avr32/include/uapi/asm/Kbuild          |  20 --
 arch/blackfin/include/uapi/asm/Kbuild       |  17 -
 arch/c6x/include/uapi/asm/Kbuild            |   8 -
 arch/cris/include/uapi/arch-v10/arch/Kbuild |   5 -
 arch/cris/include/uapi/arch-v32/arch/Kbuild |   3 -
 arch/cris/include/uapi/asm/Kbuild           |  43 +--
 arch/frv/include/uapi/asm/Kbuild            |  33 --
 arch/h8300/include/uapi/asm/Kbuild          |  28 --
 arch/hexagon/include/asm/Kbuild             |   3 -
 arch/hexagon/include/uapi/asm/Kbuild        |  13 -
 arch/ia64/include/uapi/asm/Kbuild           |  45 ---
 arch/m32r/include/uapi/asm/Kbuild           |  31 --
 arch/m68k/include/uapi/asm/Kbuild           |  24 --
 arch/metag/include/uapi/asm/Kbuild          |   8 -
 arch/microblaze/include/uapi/asm/Kbuild     |  32 --
 arch/mips/include/uapi/asm/Kbuild           |  37 ---
 arch/mn10300/include/uapi/asm/Kbuild        |  32 --
 arch/nios2/include/uapi/asm/Kbuild          |   3 +-
 arch/openrisc/include/asm/Kbuild            |   3 -
 arch/openrisc/include/uapi/asm/Kbuild       |   8 -
 arch/parisc/include/uapi/asm/Kbuild         |  28 --
 arch/powerpc/include/uapi/asm/Kbuild        |  45 ---
 arch/s390/include/uapi/asm/Kbuild           |  53 ---
 arch/score/include/asm/Kbuild               |   3 -
 arch/score/include/uapi/asm/Kbuild          |  32 --
 arch/sh/include/uapi/asm/Kbuild             |  23 --
 arch/sparc/include/uapi/asm/Kbuild          |  48 ---
 arch/tile/include/asm/Kbuild                |   3 -
 arch/tile/include/uapi/arch/Kbuild          |  17 -
 arch/tile/include/uapi/asm/Kbuild           |  19 +-
 arch/unicore32/include/uapi/asm/Kbuild      |   6 -
 arch/x86/include/uapi/asm/Kbuild            |  58 ----
 arch/xtensa/include/uapi/asm/Kbuild         |  23 --
 include/Kbuild                              |   2 -
 include/asm-generic/Kbuild.asm              |   1 -
 include/scsi/fc/Kbuild                      |   0
 include/uapi/Kbuild                         |  15 -
 include/uapi/asm-generic/Kbuild             |  36 --
 include/uapi/asm-generic/Kbuild.asm         |  62 ++--
 include/uapi/drm/Kbuild                     |  23 --
 include/uapi/linux/Kbuild                   | 494 +---------------------------
 include/uapi/linux/android/Kbuild           |   2 -
 include/uapi/linux/byteorder/Kbuild         |   3 -
 include/uapi/linux/caif/Kbuild              |   3 -
 include/uapi/linux/can/Kbuild               |   6 -
 include/uapi/linux/dvb/Kbuild               |   9 -
 include/uapi/linux/hdlc/Kbuild              |   2 -
 include/uapi/linux/hsi/Kbuild               |   2 -
 include/uapi/linux/iio/Kbuild               |   3 -
 include/uapi/linux/isdn/Kbuild              |   2 -
 include/uapi/linux/mmc/Kbuild               |   2 -
 include/uapi/linux/netfilter/Kbuild         |  89 -----
 include/uapi/linux/netfilter/ipset/Kbuild   |   5 -
 include/uapi/linux/netfilter_arp/Kbuild     |   3 -
 include/uapi/linux/netfilter_bridge/Kbuild  |  18 -
 include/uapi/linux/netfilter_ipv4/Kbuild    |  10 -
 include/uapi/linux/netfilter_ipv6/Kbuild    |  13 -
 include/uapi/linux/nfsd/Kbuild              |   6 -
 include/uapi/linux/raid/Kbuild              |   3 -
 include/uapi/linux/spi/Kbuild               |   2 -
 include/uapi/linux/sunrpc/Kbuild            |   2 -
 include/uapi/linux/tc_act/Kbuild            |  16 -
 include/uapi/linux/tc_ematch/Kbuild         |   5 -
 include/uapi/linux/usb/Kbuild               |  12 -
 include/uapi/linux/wimax/Kbuild             |   2 -
 include/uapi/misc/Kbuild                    |   2 -
 include/uapi/mtd/Kbuild                     |   6 -
 include/uapi/rdma/Kbuild                    |  20 --
 include/uapi/rdma/hfi/Kbuild                |   3 -
 include/uapi/scsi/Kbuild                    |   6 -
 include/uapi/scsi/fc/Kbuild                 |   5 -
 include/uapi/sound/Kbuild                   |  16 -
 include/uapi/video/Kbuild                   |   4 -
 include/uapi/xen/Kbuild                     |   5 -
 include/video/Kbuild                        |   0
 scripts/Makefile.headersinst                |  55 ++--
 81 files changed, 115 insertions(+), 1759 deletions(-)
 delete mode 100644 arch/cris/include/uapi/arch-v10/arch/Kbuild
 delete mode 100644 arch/cris/include/uapi/arch-v32/arch/Kbuild
 delete mode 100644 arch/tile/include/uapi/arch/Kbuild
 delete mode 100644 include/Kbuild
 delete mode 100644 include/asm-generic/Kbuild.asm
 delete mode 100644 include/scsi/fc/Kbuild
 delete mode 100644 include/uapi/Kbuild
 delete mode 100644 include/uapi/asm-generic/Kbuild
 delete mode 100644 include/uapi/drm/Kbuild
 delete mode 100644 include/uapi/linux/android/Kbuild
 delete mode 100644 include/uapi/linux/byteorder/Kbuild
 delete mode 100644 include/uapi/linux/caif/Kbuild
 delete mode 100644 include/uapi/linux/can/Kbuild
 delete mode 100644 include/uapi/linux/dvb/Kbuild
 delete mode 100644 include/uapi/linux/hdlc/Kbuild
 delete mode 100644 include/uapi/linux/hsi/Kbuild
 delete mode 100644 include/uapi/linux/iio/Kbuild
 delete mode 100644 include/uapi/linux/isdn/Kbuild
 delete mode 100644 include/uapi/linux/mmc/Kbuild
 delete mode 100644 include/uapi/linux/netfilter/Kbuild
 delete mode 100644 include/uapi/linux/netfilter/ipset/Kbuild
 delete mode 100644 include/uapi/linux/netfilter_arp/Kbuild
 delete mode 100644 include/uapi/linux/netfilter_bridge/Kbuild
 delete mode 100644 include/uapi/linux/netfilter_ipv4/Kbuild
 delete mode 100644 include/uapi/linux/netfilter_ipv6/Kbuild
 delete mode 100644 include/uapi/linux/nfsd/Kbuild
 delete mode 100644 include/uapi/linux/raid/Kbuild
 delete mode 100644 include/uapi/linux/spi/Kbuild
 delete mode 100644 include/uapi/linux/sunrpc/Kbuild
 delete mode 100644 include/uapi/linux/tc_act/Kbuild
 delete mode 100644 include/uapi/linux/tc_ematch/Kbuild
 delete mode 100644 include/uapi/linux/usb/Kbuild
 delete mode 100644 include/uapi/linux/wimax/Kbuild
 delete mode 100644 include/uapi/misc/Kbuild
 delete mode 100644 include/uapi/mtd/Kbuild
 delete mode 100644 include/uapi/rdma/Kbuild
 delete mode 100644 include/uapi/rdma/hfi/Kbuild
 delete mode 100644 include/uapi/scsi/Kbuild
 delete mode 100644 include/uapi/scsi/fc/Kbuild
 delete mode 100644 include/uapi/sound/Kbuild
 delete mode 100644 include/uapi/video/Kbuild
 delete mode 100644 include/uapi/xen/Kbuild
 delete mode 100644 include/video/Kbuild
Documentation/kbuild/makefiles.txt +41 -25
index 37b525d329ae..91ffb391ed54 100644
@@ -44,10 +44,12 @@ This document describes the Linux kernel Makefiles.
 	   --- 6.11 Post-link pass
 
 	=== 7 Kbuild syntax for exported headers
-		--- 7.1 header-y
+		--- 7.1 header-n
 		--- 7.2 genhdr-y
 		--- 7.3 generic-y
 		--- 7.4 generated-y
+		--- 7.5 mandatory-y
+		--- 7.6 subdir-y
 
 	=== 8 Kbuild Variables
 	=== 9 Makefile language
@@ -1235,7 +1237,7 @@ When kbuild executes, the following steps are followed (roughly):
 	that may be shared between individual architectures.
 	The recommended approach how to use a generic header file is
 	to list the file in the Kbuild file.
-	See "7.4 generic-y" for further info on syntax etc.
+	See "7.3 generic-y" for further info on syntax etc.
 
 --- 6.11 Post-link pass
 
@@ -1262,37 +1264,30 @@ The pre-processing does:
 - drop include of compiler.h
 - drop all sections that are kernel internal (guarded by ifdef __KERNEL__)
 
-Each relevant directory contains a file name "Kbuild" which specifies the
-headers to be exported.
-See subsequent chapter for the syntax of the Kbuild file.
-
-	--- 7.1 header-y
-
-	header-y specifies header files to be exported.
-
-		Example:
-			#include/linux/Kbuild
-			header-y += usb/
-			header-y += aio_abi.h
+All headers under include/uapi/, include/generated/uapi/,
+arch/<arch>/include/uapi/asm/ and arch/<arch>/include/generated/uapi/asm/
+are exported.
 
-	The convention is to list one file per line and
-	preferably in alphabetic order.
+A Kbuild file may be defined under arch/<arch>/include/uapi/asm/ and
+arch/<arch>/include/asm/ to list asm files coming from asm-generic.
+See subsequent chapter for the syntax of the Kbuild file.
 
-	header-y also specifies which subdirectories to visit.
-	A subdirectory is identified by a trailing '/' which
-	can be seen in the example above for the usb subdirectory.
+	--- 7.1 header-n
 
-	Subdirectories are visited before their parent directories.
+	header-n is essentially used by include/uapi/linux/Kbuild to avoid
+	exporting specific headers (e.g. kvm.h) on architectures that do not
+	support it. It should be avoided as much as possible.
 
 	--- 7.2 genhdr-y
 
-	genhdr-y specifies generated files to be exported.
-	Generated files are special as they need to be looked
-	up in another directory when doing 'make O=...' builds.
+	genhdr-y specifies asm files to be generated.
 
 		Example:
-			#include/linux/Kbuild
-			genhdr-y += version.h
+			#arch/x86/include/uapi/asm/Kbuild
+			genhdr-y += unistd_32.h
+			genhdr-y += unistd_64.h
+			genhdr-y += unistd_x32.h
+
 
 	--- 7.3 generic-y
 
@@ -1334,6 +1329,27 @@ See subsequent chapter for the syntax of the Kbuild file.
 			#arch/x86/include/asm/Kbuild
 			generated-y += syscalls_32.h
 
+	--- 7.5 mandatory-y
+
+	mandatory-y is essentially used by include/uapi/asm-generic/Kbuild.asm
+	to define the minimun set of headers that must be exported in
+	include/asm.
+
+	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:
arch/alpha/include/uapi/asm/Kbuild +0 -41

43 lines not on this page · raw message

arch/arc/include/uapi/asm/Kbuild +0 -3
index f50d02df78d5..b15bf6bc0e94 100644
@@ -1,5 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-header-y += elf.h
-header-y += page.h
-header-y += cachectl.h
arch/arm/include/uapi/asm/Kbuild +0 -17
index 46a76cd6acb6..607f702c2d62 100644
@@ -1,23 +1,6 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += auxvec.h
-header-y += byteorder.h
-header-y += fcntl.h
-header-y += hwcap.h
-header-y += ioctls.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += perf_regs.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += unistd.h
 genhdr-y += unistd-common.h
 genhdr-y += unistd-oabi.h
 genhdr-y += unistd-eabi.h
arch/arm64/include/uapi/asm/Kbuild +0 -18
index 825b0fe51c2b..13a97aa2285f 100644
@@ -2,21 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += kvm_para.h
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += fcntl.h
-header-y += hwcap.h
-header-y += kvm_para.h
-header-y += perf_regs.h
-header-y += param.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += stat.h
-header-y += statfs.h
-header-y += ucontext.h
-header-y += unistd.h
arch/avr32/include/uapi/asm/Kbuild +0 -20
index 08d8a3d76ea8..610395083364 100644
@@ -1,26 +1,6 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += auxvec.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
 generic-y += bitsperlong.h
 generic-y += errno.h
 generic-y += fcntl.h
arch/blackfin/include/uapi/asm/Kbuild +0 -17
index 0bd28f77abc3..b15bf6bc0e94 100644
@@ -1,19 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += bfin_sport.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += fcntl.h
-header-y += fixed_code.h
-header-y += ioctls.h
-header-y += kvm_para.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += stat.h
-header-y += swab.h
-header-y += unistd.h
arch/c6x/include/uapi/asm/Kbuild +0 -8
index e9bc2b2b8147..13a97aa2285f 100644
@@ -2,11 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += kvm_para.h
-
-header-y += byteorder.h
-header-y += kvm_para.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += swab.h
-header-y += unistd.h
arch/cris/include/uapi/arch-v10/arch/Kbuild deleted +0 -5
deleted file mode 100644
index 9048c87a782b..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += sv_addr.agh
-header-y += sv_addr_ag.h
-header-y += svinto.h
-header-y += user.h
arch/cris/include/uapi/arch-v32/arch/Kbuild deleted +0 -3
deleted file mode 100644
index 59efffd16b61..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += cryptocop.h
-header-y += user.h
arch/cris/include/uapi/asm/Kbuild +2 -41

46 lines not on this page · raw message

arch/frv/include/uapi/asm/Kbuild +0 -33
index 42a2b33461c0..b15bf6bc0e94 100644
@@ -1,35 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += registers.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/h8300/include/uapi/asm/Kbuild +0 -28
index fb6101a5d4f1..b15bf6bc0e94 100644
@@ -1,30 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += siginfo.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/hexagon/include/asm/Kbuild +0 -3
index 797b64a4b80b..65f48073f8ac 100644
@@ -1,6 +1,3 @@
-
-header-y += ucontext.h
-
 generic-y += auxvec.h
 generic-y += barrier.h
 generic-y += bug.h
arch/hexagon/include/uapi/asm/Kbuild +0 -13
index c31706c38631..b15bf6bc0e94 100644
@@ -1,15 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += kvm_para.h
-header-y += param.h
-header-y += ptrace.h
-header-y += registers.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += swab.h
-header-y += unistd.h
-header-y += user.h
arch/ia64/include/uapi/asm/Kbuild +0 -45

48 lines not on this page · raw message

arch/m32r/include/uapi/asm/Kbuild +0 -31
index 43937a61d6cf..b15bf6bc0e94 100644
@@ -1,33 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/m68k/include/uapi/asm/Kbuild +0 -24
index 6a2d257bdfb2..64368077235a 100644
@@ -9,27 +9,3 @@ generic-y += socket.h
 generic-y += sockios.h
 generic-y += termbits.h
 generic-y += termios.h
-
-header-y += a.out.h
-header-y += bootinfo.h
-header-y += bootinfo-amiga.h
-header-y += bootinfo-apollo.h
-header-y += bootinfo-atari.h
-header-y += bootinfo-hp300.h
-header-y += bootinfo-mac.h
-header-y += bootinfo-q40.h
-header-y += bootinfo-vme.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += fcntl.h
-header-y += ioctls.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += stat.h
-header-y += swab.h
-header-y += unistd.h
arch/metag/include/uapi/asm/Kbuild +0 -8
index ab78be2b6eb0..b29731ebd7a9 100644
@@ -1,14 +1,6 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += byteorder.h
-header-y += ech.h
-header-y += ptrace.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += swab.h
-header-y += unistd.h
-
 generic-y += mman.h
 generic-y += resource.h
 generic-y += setup.h
arch/microblaze/include/uapi/asm/Kbuild +0 -32
index 1aac99f87df1..2178c78c7c1a 100644
@@ -2,35 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += types.h
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += elf.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += unistd.h
arch/mips/include/uapi/asm/Kbuild +0 -37
index f2cf41461146..a0266feba9e6 100644
@@ -2,40 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += ipcbuf.h
-
-header-y += auxvec.h
-header-y += bitfield.h
-header-y += bitsperlong.h
-header-y += break.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += inst.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += sgidefs.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += sysmips.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/mn10300/include/uapi/asm/Kbuild +0 -32
index 040178cdb3eb..b15bf6bc0e94 100644
@@ -1,34 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/nios2/include/uapi/asm/Kbuild +1 -2
index 69c965304146..374bd123329f 100644
@@ -1,6 +1,5 @@
+# UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += elf.h
-
 generic-y += setup.h
 generic-y += ucontext.h
arch/openrisc/include/asm/Kbuild +0 -3
index fb01873a5aad..1b533a107f19 100644
@@ -1,6 +1,3 @@
-
-header-y += ucontext.h
-
 generic-y += auxvec.h
 generic-y += barrier.h
 generic-y += bitsperlong.h
arch/openrisc/include/uapi/asm/Kbuild +0 -8
index 80761eb82b5f..b15bf6bc0e94 100644
@@ -1,10 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += byteorder.h
-header-y += elf.h
-header-y += kvm_para.h
-header-y += param.h
-header-y += ptrace.h
-header-y += sigcontext.h
-header-y += unistd.h
arch/parisc/include/uapi/asm/Kbuild +0 -28
index 348356c99514..3971c60a7e7f 100644
@@ -2,31 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += resource.h
-
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += pdc.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/powerpc/include/uapi/asm/Kbuild +0 -45

47 lines not on this page · raw message

arch/s390/include/uapi/asm/Kbuild +0 -53

55 lines not on this page · raw message

arch/score/include/asm/Kbuild +0 -3
index 926943a49ea5..4ee7fc77d23c 100644
@@ -1,6 +1,3 @@
-
-header-y +=
-
 generic-y += barrier.h
 generic-y += clkdev.h
 generic-y += current.h
arch/score/include/uapi/asm/Kbuild +0 -32
index 040178cdb3eb..b15bf6bc0e94 100644
@@ -1,34 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += unistd.h
arch/sh/include/uapi/asm/Kbuild +0 -23
index 60613ae78513..b15bf6bc0e94 100644
@@ -1,25 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += cpu-features.h
-header-y += hw_breakpoint.h
-header-y += ioctls.h
-header-y += posix_types.h
-header-y += posix_types_32.h
-header-y += posix_types_64.h
-header-y += ptrace.h
-header-y += ptrace_32.h
-header-y += ptrace_64.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += sockios.h
-header-y += stat.h
-header-y += swab.h
-header-y += types.h
-header-y += unistd.h
-header-y += unistd_32.h
-header-y += unistd_64.h
arch/sparc/include/uapi/asm/Kbuild +0 -48

50 lines not on this page · raw message

arch/tile/include/asm/Kbuild +0 -3
index aa48b6eaff2d..61157a7e8532 100644
@@ -1,6 +1,3 @@
-
-header-y += ../arch/
-
 generic-y += bug.h
 generic-y += bugs.h
 generic-y += clkdev.h
arch/tile/include/uapi/arch/Kbuild deleted +0 -17
deleted file mode 100644
index 97dfbecec6b6..000000000000
@@ -1,17 +0,0 @@
-# UAPI Header export list
-header-y += abi.h
-header-y += chip.h
-header-y += chip_tilegx.h
-header-y += chip_tilepro.h
-header-y += icache.h
-header-y += interrupts.h
-header-y += interrupts_32.h
-header-y += interrupts_64.h
-header-y += opcode.h
-header-y += opcode_tilegx.h
-header-y += opcode_tilepro.h
-header-y += sim.h
-header-y += sim_def.h
-header-y += spr_def.h
-header-y += spr_def_32.h
-header-y += spr_def_64.h
arch/tile/include/uapi/asm/Kbuild +2 -17
index c20db8e428bf..e0a50111e07f 100644
@@ -1,21 +1,6 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += byteorder.h
-header-y += cachectl.h
-header-y += hardwall.h
-header-y += kvm_para.h
-header-y += mman.h
-header-y += ptrace.h
-header-y += setup.h
-header-y += sigcontext.h
-header-y += siginfo.h
-header-y += signal.h
-header-y += stat.h
-header-y += swab.h
-header-y += ucontext.h
-header-y += unistd.h
-
 generic-y += ucontext.h
+
+subdir-y += ../arch
arch/unicore32/include/uapi/asm/Kbuild +0 -6
index 0514d7ad6855..13a97aa2285f 100644
@@ -1,10 +1,4 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
 
-header-y += byteorder.h
-header-y += kvm_para.h
-header-y += ptrace.h
-header-y += sigcontext.h
-header-y += unistd.h
-
 generic-y += kvm_para.h
arch/x86/include/uapi/asm/Kbuild +0 -58

61 lines not on this page · raw message

arch/xtensa/include/uapi/asm/Kbuild +0 -23
index 56aad54e7fb7..b15bf6bc0e94 100644
@@ -1,25 +1,2 @@
 # UAPI Header export list
 include include/uapi/asm-generic/Kbuild.asm
-
-header-y += auxvec.h
-header-y += byteorder.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += ptrace.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += sigcontext.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += swab.h
-header-y += termbits.h
-header-y += types.h
-header-y += unistd.h
include/Kbuild deleted +0 -2
deleted file mode 100644
index bab1145bc7a7..000000000000
@@ -1,2 +0,0 @@
-# Top-level Makefile calls into asm-$(ARCH)
-# List only non-arch directories below
include/asm-generic/Kbuild.asm deleted +0 -1
deleted file mode 100644
index d2ee86b4c091..000000000000
@@ -1 +0,0 @@
-include include/uapi/asm-generic/Kbuild.asm
include/scsi/fc/Kbuild deleted +0 -0
deleted file mode 100644
index e69de29bb2d1..000000000000
include/uapi/Kbuild deleted +0 -15
deleted file mode 100644
index 245aa6e05e6a..000000000000
@@ -1,15 +0,0 @@
-# UAPI Header export list
-# Top-level Makefile calls into asm-$(ARCH)
-# List only non-arch directories below
-
-
-header-y += asm-generic/
-header-y += linux/
-header-y += sound/
-header-y += mtd/
-header-y += rdma/
-header-y += video/
-header-y += drm/
-header-y += xen/
-header-y += scsi/
-header-y += misc/
include/uapi/asm-generic/Kbuild deleted +0 -36
deleted file mode 100644
index b73de7bb7a62..000000000000
@@ -1,36 +0,0 @@
-# UAPI Header export list
-header-y += auxvec.h
-header-y += bitsperlong.h
-header-y += errno-base.h
-header-y += errno.h
-header-y += fcntl.h
-header-y += int-l64.h
-header-y += int-ll64.h
-header-y += ioctl.h
-header-y += ioctls.h
-header-y += ipcbuf.h
-header-y += kvm_para.h
-header-y += mman-common.h
-header-y += mman.h
-header-y += msgbuf.h
-header-y += param.h
-header-y += poll.h
-header-y += posix_types.h
-header-y += resource.h
-header-y += sembuf.h
-header-y += setup.h
-header-y += shmbuf.h
-header-y += shmparam.h
-header-y += siginfo.h
-header-y += signal-defs.h
-header-y += signal.h
-header-y += socket.h
-header-y += sockios.h
-header-y += stat.h
-header-y += statfs.h
-header-y += swab.h
-header-y += termbits.h
-header-y += termios.h
-header-y += types.h
-header-y += ucontext.h
-header-y += unistd.h
include/uapi/asm-generic/Kbuild.asm +31 -31

69 lines not on this page · raw message

include/uapi/drm/Kbuild deleted +0 -23
deleted file mode 100644
index c97addd08f8c..000000000000
@@ -1,23 +0,0 @@
-# UAPI Header export list
-header-y += drm.h
-header-y += drm_fourcc.h
-header-y += drm_mode.h
-header-y += drm_sarea.h
-header-y += amdgpu_drm.h
-header-y += exynos_drm.h
-header-y += i810_drm.h
-header-y += i915_drm.h
-header-y += mga_drm.h
-header-y += nouveau_drm.h
-header-y += omap_drm.h
-header-y += qxl_drm.h
-header-y += r128_drm.h
-header-y += radeon_drm.h
-header-y += savage_drm.h
-header-y += sis_drm.h
-header-y += tegra_drm.h
-header-y += via_drm.h
-header-y += vmwgfx_drm.h
-header-y += msm_drm.h
-header-y += vc4_drm.h
-header-y += virtgpu_drm.h
include/uapi/linux/Kbuild +9 -485

501 lines not on this page · raw message

include/uapi/linux/android/Kbuild deleted +0 -2
deleted file mode 100644
index ca011eec252a..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += binder.h
include/uapi/linux/byteorder/Kbuild deleted +0 -3
deleted file mode 100644
index 619225b9ff2e..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += big_endian.h
-header-y += little_endian.h
include/uapi/linux/caif/Kbuild deleted +0 -3
deleted file mode 100644
index 43396612d3a3..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += caif_socket.h
-header-y += if_caif.h
include/uapi/linux/can/Kbuild deleted +0 -6
deleted file mode 100644
index 21c91bf25a29..000000000000
@@ -1,6 +0,0 @@
-# UAPI Header export list
-header-y += bcm.h
-header-y += error.h
-header-y += gw.h
-header-y += netlink.h
-header-y += raw.h
include/uapi/linux/dvb/Kbuild deleted +0 -9
deleted file mode 100644
index d40942cfc627..000000000000
@@ -1,9 +0,0 @@
-# UAPI Header export list
-header-y += audio.h
-header-y += ca.h
-header-y += dmx.h
-header-y += frontend.h
-header-y += net.h
-header-y += osd.h
-header-y += version.h
-header-y += video.h
include/uapi/linux/hdlc/Kbuild deleted +0 -2
deleted file mode 100644
index 8c1d2cb75e33..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += ioctl.h
include/uapi/linux/hsi/Kbuild deleted +0 -2
deleted file mode 100644
index a16a00544258..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += hsi_char.h cs-protocol.h
include/uapi/linux/iio/Kbuild deleted +0 -3
deleted file mode 100644
index 86f76d84c44f..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += events.h
-header-y += types.h
include/uapi/linux/isdn/Kbuild deleted +0 -2
deleted file mode 100644
index 89e52850bf29..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += capicmd.h
include/uapi/linux/mmc/Kbuild deleted +0 -2
deleted file mode 100644
index 8c1d2cb75e33..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += ioctl.h
include/uapi/linux/netfilter/Kbuild deleted +0 -89

89 lines not on this page · raw message

include/uapi/linux/netfilter/ipset/Kbuild deleted +0 -5
deleted file mode 100644
index d2680423d9ab..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += ip_set.h
-header-y += ip_set_bitmap.h
-header-y += ip_set_hash.h
-header-y += ip_set_list.h
include/uapi/linux/netfilter_arp/Kbuild deleted +0 -3
deleted file mode 100644
index 62d5637cc0ac..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += arp_tables.h
-header-y += arpt_mangle.h
include/uapi/linux/netfilter_bridge/Kbuild deleted +0 -18
deleted file mode 100644
index 0fbad8ef96de..000000000000
@@ -1,18 +0,0 @@
-# UAPI Header export list
-header-y += ebt_802_3.h
-header-y += ebt_among.h
-header-y += ebt_arp.h
-header-y += ebt_arpreply.h
-header-y += ebt_ip.h
-header-y += ebt_ip6.h
-header-y += ebt_limit.h
-header-y += ebt_log.h
-header-y += ebt_mark_m.h
-header-y += ebt_mark_t.h
-header-y += ebt_nat.h
-header-y += ebt_nflog.h
-header-y += ebt_pkttype.h
-header-y += ebt_redirect.h
-header-y += ebt_stp.h
-header-y += ebt_vlan.h
-header-y += ebtables.h
include/uapi/linux/netfilter_ipv4/Kbuild deleted +0 -10
deleted file mode 100644
index ecb291df390e..000000000000
@@ -1,10 +0,0 @@
-# UAPI Header export list
-header-y += ip_tables.h
-header-y += ipt_CLUSTERIP.h
-header-y += ipt_ECN.h
-header-y += ipt_LOG.h
-header-y += ipt_REJECT.h
-header-y += ipt_TTL.h
-header-y += ipt_ah.h
-header-y += ipt_ecn.h
-header-y += ipt_ttl.h
include/uapi/linux/netfilter_ipv6/Kbuild deleted +0 -13
deleted file mode 100644
index 75a668ca2353..000000000000
@@ -1,13 +0,0 @@
-# UAPI Header export list
-header-y += ip6_tables.h
-header-y += ip6t_HL.h
-header-y += ip6t_LOG.h
-header-y += ip6t_NPT.h
-header-y += ip6t_REJECT.h
-header-y += ip6t_ah.h
-header-y += ip6t_frag.h
-header-y += ip6t_hl.h
-header-y += ip6t_ipv6header.h
-header-y += ip6t_mh.h
-header-y += ip6t_opts.h
-header-y += ip6t_rt.h
include/uapi/linux/nfsd/Kbuild deleted +0 -6
deleted file mode 100644
index c11bc404053c..000000000000
@@ -1,6 +0,0 @@
-# UAPI Header export list
-header-y += cld.h
-header-y += debug.h
-header-y += export.h
-header-y += nfsfh.h
-header-y += stats.h
include/uapi/linux/raid/Kbuild deleted +0 -3
deleted file mode 100644
index e2c3d25405d7..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += md_p.h
-header-y += md_u.h
include/uapi/linux/spi/Kbuild deleted +0 -2
deleted file mode 100644
index 0cc747eff165..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += spidev.h
include/uapi/linux/sunrpc/Kbuild deleted +0 -2
deleted file mode 100644
index 8e02e47c20fb..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += debug.h
include/uapi/linux/tc_act/Kbuild deleted +0 -16
deleted file mode 100644
index ba62ddf0e58a..000000000000
@@ -1,16 +0,0 @@
-# UAPI Header export list
-header-y += tc_csum.h
-header-y += tc_defact.h
-header-y += tc_gact.h
-header-y += tc_ipt.h
-header-y += tc_mirred.h
-header-y += tc_sample.h
-header-y += tc_nat.h
-header-y += tc_pedit.h
-header-y += tc_skbedit.h
-header-y += tc_vlan.h
-header-y += tc_bpf.h
-header-y += tc_connmark.h
-header-y += tc_ife.h
-header-y += tc_tunnel_key.h
-header-y += tc_skbmod.h
include/uapi/linux/tc_ematch/Kbuild deleted +0 -5
deleted file mode 100644
index 53fca3925535..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += tc_em_cmp.h
-header-y += tc_em_meta.h
-header-y += tc_em_nbyte.h
-header-y += tc_em_text.h
include/uapi/linux/usb/Kbuild deleted +0 -12
deleted file mode 100644
index 4cc4d6e7e523..000000000000
@@ -1,12 +0,0 @@
-# UAPI Header export list
-header-y += audio.h
-header-y += cdc.h
-header-y += cdc-wdm.h
-header-y += ch11.h
-header-y += ch9.h
-header-y += functionfs.h
-header-y += g_printer.h
-header-y += gadgetfs.h
-header-y += midi.h
-header-y += tmc.h
-header-y += video.h
include/uapi/linux/wimax/Kbuild deleted +0 -2
deleted file mode 100644
index 1c97be49971f..000000000000
@@ -1,2 +0,0 @@
-# UAPI Header export list
-header-y += i2400m.h
include/uapi/misc/Kbuild deleted +0 -2
deleted file mode 100644
index e96cae7d58c9..000000000000
@@ -1,2 +0,0 @@
-# misc Header export list
-header-y += cxl.h
include/uapi/mtd/Kbuild deleted +0 -6
deleted file mode 100644
index 5a691e10cd0e..000000000000
@@ -1,6 +0,0 @@
-# UAPI Header export list
-header-y += inftl-user.h
-header-y += mtd-abi.h
-header-y += mtd-user.h
-header-y += nftl-user.h
-header-y += ubi-user.h
include/uapi/rdma/Kbuild deleted +0 -20
deleted file mode 100644
index 1e0af1ff75c3..000000000000
@@ -1,20 +0,0 @@
-# UAPI Header export list
-header-y += ib_user_cm.h
-header-y += rdma_user_ioctl.h
-header-y += ib_user_mad.h
-header-y += ib_user_sa.h
-header-y += ib_user_verbs.h
-header-y += rdma_netlink.h
-header-y += rdma_user_cm.h
-header-y += hfi/
-header-y += rdma_user_rxe.h
-header-y += cxgb3-abi.h
-header-y += cxgb4-abi.h
-header-y += mlx4-abi.h
-header-y += mlx5-abi.h
-header-y += mthca-abi.h
-header-y += nes-abi.h
-header-y += ocrdma-abi.h
-header-y += hns-abi.h
-header-y += vmw_pvrdma-abi.h
-header-y += qedr-abi.h
include/uapi/rdma/hfi/Kbuild deleted +0 -3
deleted file mode 100644
index b65b0b3a5f63..000000000000
@@ -1,3 +0,0 @@
-# UAPI Header export list
-header-y += hfi1_user.h
-header-y += hfi1_ioctl.h
include/uapi/scsi/Kbuild deleted +0 -6
deleted file mode 100644
index d791e0ad509d..000000000000
@@ -1,6 +0,0 @@
-# UAPI Header export list
-header-y += fc/
-header-y += scsi_bsg_fc.h
-header-y += scsi_netlink.h
-header-y += scsi_netlink_fc.h
-header-y += cxlflash_ioctl.h
include/uapi/scsi/fc/Kbuild deleted +0 -5
deleted file mode 100644
index 5ead9fac265c..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += fc_els.h
-header-y += fc_fs.h
-header-y += fc_gs.h
-header-y += fc_ns.h
include/uapi/sound/Kbuild deleted +0 -16
deleted file mode 100644
index 9578d8bdbf31..000000000000
@@ -1,16 +0,0 @@
-# UAPI Header export list
-header-y += asequencer.h
-header-y += asoc.h
-header-y += asound.h
-header-y += asound_fm.h
-header-y += compress_offload.h
-header-y += compress_params.h
-header-y += emu10k1.h
-header-y += firewire.h
-header-y += hdsp.h
-header-y += hdspm.h
-header-y += sb16_csp.h
-header-y += sfnt_info.h
-header-y += tlv.h
-header-y += usb_stream.h
-header-y += snd_sst_tokens.h
include/uapi/video/Kbuild deleted +0 -4
deleted file mode 100644
index ac7203bb32cc..000000000000
@@ -1,4 +0,0 @@
-# UAPI Header export list
-header-y += edid.h
-header-y += sisfb.h
-header-y += uvesafb.h
include/uapi/xen/Kbuild deleted +0 -5
deleted file mode 100644
index 5c459628e8c7..000000000000
@@ -1,5 +0,0 @@
-# UAPI Header export list
-header-y += evtchn.h
-header-y += gntalloc.h
-header-y += gntdev.h
-header-y += privcmd.h
include/video/Kbuild deleted +0 -0
deleted file mode 100644
index e69de29bb2d1..000000000000
scripts/Makefile.headersinst +29 -26

96 lines not on this page · raw message

Signature · 1 line
2.8.1
#205 lore raw

PATCH v10 11/11 uapi: export all arch specifics directories

In reply to Nicolas Dichtel

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.

---
 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(-)
Documentation/kbuild/makefiles.txt +1 -14
index 91ffb391ed54..223b33d5195a 100644
@@ -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:
Makefile +3 -3
index 165cf9783a5d..954b20072c42 100644
@@ -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
arch/cris/include/uapi/asm/Kbuild +0 -3
index d0c5471856e0..b15bf6bc0e94 100644
@@ -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/
arch/tile/include/uapi/asm/Kbuild +0 -2
index e0a50111e07f..0c74c3c5ebfa 100644
@@ -2,5 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += ucontext.h
-
-subdir-y += ../arch
scripts/Makefile.headersinst +1 -2
index 6e56155579d8..3d692b650687 100644
@@ -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))
Signature · 1 line
2.8.1
#206 lore raw

Re: [PATCH v10 11/11] uapi: export all arch specifics directories

Hi Nicolas,

2017-03-14 21:54 GMT+09:00 Nicolas Dichtel <[email protected]>:

arch/cris/include/uapi/asm/Kbuild line 5

Quoted 10 lines
arch/cris/include/uapi/asm/Kbuild +0 -3
index d0c5471856e0..b15bf6bc0e94 100644
@@ -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/

Can you remove
arch/cris/include/arch-v32/arch/Kbuild
arch/cris/include/arch-v10/arch/Kbuild
as well?

Or, not sure if they are still needed?

arch/tile/include/uapi/asm/Kbuild line 6

Quoted 10 lines
arch/tile/include/uapi/asm/Kbuild +0 -2
index e0a50111e07f..0c74c3c5ebfa 100644
@@ -2,5 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += ucontext.h
-
-subdir-y += ../arch

Can you remove arch/tile/include/arch/Kbuild as well?

Signature · 2 lines
Best Regards
Masahiro Yamada
#207 lore raw

Re: [PATCH v10 11/11] uapi: export all arch specifics directories

Hi Masahiro,

Quoted 4 lines · Masahiro Yamada

Hi Nicolas,

2017-03-14 21:54 GMT+09:00 Nicolas Dichtel <[email protected]>:

Quoted 16 lines

arch/cris/include/uapi/asm/Kbuild line 5

Quoted 10 lines
arch/cris/include/uapi/asm/Kbuild +0 -3
index d0c5471856e0..b15bf6bc0e94 100644
@@ -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/

Can you remove
arch/cris/include/arch-v32/arch/Kbuild
arch/cris/include/arch-v10/arch/Kbuild
as well?

Ok.

Quoted 2 lines

Or, not sure if they are still needed?

I don't think so. Have a look to 77c8006d8df4 ("UAPI: Fix up empty files in arch/cris/") for more details.

Quoted 10 lines
Quoted 10 lines
arch/tile/include/uapi/asm/Kbuild +0 -0
index e0a50111e07f..0c74c3c5ebfa 100644
@@ -2,5 +2,3 @@
 include include/uapi/asm-generic/Kbuild.asm
 
Quoted 5 lines

arch/tile/include/uapi/asm/Kbuild line 6

Quoted 3 lines
arch/tile/include/uapi/asm/Kbuild +0 -2
 generic-y += ucontext.h
-
-subdir-y += ../arch

Can you remove arch/tile/include/arch/Kbuild as well?

Ok.

Because this removal is not directly related to this patch, I will add another patch in the series.

Regards,
Nicolas

#208 lore raw

Re: [PATCH v10 00/11] uapi: export all headers under uapi directories

In reply to Nicolas Dichtel
Quoted 13 lines · Nicolas Dichtel

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.

Quoted 5 lines

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 on top of masahiroy/linux-kbuild.git#for-next (v4.11-rc1). I didn't find any conflict with v4.11-rc2.

Masahiro, is this series under review or do you expect something else on my side?

Regards,
Nicolas

#209 lore raw

Re: [PATCH v10 00/11] uapi: export all headers under uapi directories

Hi Nicolas,

2017-03-24 17:32 GMT+09:00 Nicolas Dichtel <[email protected]>:

Quoted 14 lines · Nicolas Dichtel
Quoted 13 lines

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.

Quoted 7 lines
Quoted 5 lines

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 on top of masahiroy/linux-kbuild.git#for-next (v4.11-rc1). I didn't find any conflict with v4.11-rc2.

Masahiro, is this series under review or do you expect something else on my side?

Under review.
Please give me time to take a closer look.
Sorry for the delay.

Signature · 2 lines
Best Regards
Masahiro Yamada
#210 lore raw

Re: [PATCH v10 00/11] uapi: export all headers under uapi directories

Quoted 21 lines · Masahiro Yamada

Hi Nicolas,

2017-03-24 17:32 GMT+09:00 Nicolas Dichtel <[email protected]>:

Quoted 17 lines · Nicolas Dichtel
Quoted 16 lines

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.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

This patch is built on top of masahiroy/linux-kbuild.git#for-next (v4.11-rc1). I didn't find any conflict with v4.11-rc2.

Masahiro, is this series under review or do you expect something else on my side?

Under review.
Please give me time to take a closer look.
Sorry for the delay.

No problem, take your time. I just wanted to be sure to not miss something ;-)

Thank you,
Nicolas

#211 lore raw

Re: [PATCH v10 00/11] uapi: export all headers under uapi directories

Hi Nocolas,

2017-03-24 18:03 GMT+09:00 Nicolas Dichtel <[email protected]>:

Quoted 24 lines · Masahiro Yamada
Quoted 23 lines

Hi Nicolas,

2017-03-24 17:32 GMT+09:00 Nicolas Dichtel <[email protected]>:

Quoted 19 lines · Nicolas Dichtel
Quoted 18 lines

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 on top of masahiroy/linux-kbuild.git#for-next (v4.11-rc1). I didn't find any conflict with v4.11-rc2.

Quoted 9 lines
Quoted 6 lines
Quoted 2 lines

Masahiro, is this series under review or do you expect something else on my side?

Under review.
Please give me time to take a closer look.
Sorry for the delay.

No problem, take your time. I just wanted to be sure to not miss something ;-)

As a whole, this series is amazing. Thanks for your great work!

I added some comments, but they are trivial.

I wanted to leave comments/questions on 10/11,
but I could not find 10/11 in my mailbox. I do not know why.

I am leaving comments on the cover-letter,
the following are related to 10/11.

[1]

Quoted 8 lines
mandatory-y += $(foreach hdr,$(opt-header), \
             $(if \
               $(wildcard \
                       $(srctree)/arch/$(SRCARCH)/include/uapi/asm/$(hdr) \
                       $(srctree)/arch/$(SRCARCH)/include/asm/$(hdr) \
               ), \
               $(hdr) \
               ))

What is this actually checking?

If ARCH has its own (uapi/)asm/{kvm.h,kvm_para.h,a.out.h}, they are added to mandatory-y, then they are checked if they exist. But, we know they exist.

This check reminds us only when we added asm/*.h
but forgot to add uapi/asm/*.h

$(srctree)/arch/$(SRCARCH)/include/uapi/asm/$(hdr) seems unneeded at least. (perhaps, the whole hunk might be unneeded.)

[2]

Quoted 7 lines
ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/a.out.h \
                $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h),)

header-n += a.out.h
endif

ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm.h \
                $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h),)
Quoted 7 lines

header-n += kvm.h
endif

ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm_para.h \
                $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h),)

header-n += kvm_para.h
endif

This series intends all headers are exported from uapi/, correct? Do we still need to check $(srctree)/arch/$(SRCARCH)/include/asm/*.h ? (related to [1])

[3]

Quoted 5 lines

--- 7.1 header-n

header-n is essentially used by include/uapi/linux/Kbuild to avoid exporting specific headers (e.g. kvm.h) on architectures that do not support it. It should be avoided as much as possible.

Going forward, header-y will be never used
because uapi/ is exported by default.

So, I wonder if we could rename this into something clearer.

Kbuild supports "no-clean-files".
(Please see ./Kbuild for its usage)
I guess this notation seems clearer
when we want to negate the default behavior.

Can you consider "no-export", "no-export-files", "no-export-headers" or whatever you like?

Thanks!

Signature · 2 lines
Best Regards
Masahiro Yamada
#212 lore raw

Re: [PATCH v10 00/11] uapi: export all headers under uapi directories

Hi Masahiro,

Quoted 4 lines · Masahiro Yamada

Hi Nocolas,

2017-03-24 18:03 GMT+09:00 Nicolas Dichtel <[email protected]>:

[snip]

Quoted 3 lines

As a whole, this series is amazing. Thanks for your great work!

Thank you. And thank you for taking time to review it.

Quoted 9 lines

I added some comments, but they are trivial.

I wanted to leave comments/questions on 10/11,
but I could not find 10/11 in my mailbox. I do not know why.

Note that you can download the mail from the kbuild patchwork, open it with your email client and do a reply ;-)

Quoted 18 lines

I am leaving comments on the cover-letter,
the following are related to 10/11.

[1]

Quoted 8 lines
mandatory-y += $(foreach hdr,$(opt-header), \
             $(if \
               $(wildcard \
                       $(srctree)/arch/$(SRCARCH)/include/uapi/asm/$(hdr) \
                       $(srctree)/arch/$(SRCARCH)/include/asm/$(hdr) \
               ), \
               $(hdr) \
               ))
Quoted 5 lines

What is this actually checking?

If ARCH has its own (uapi/)asm/{kvm.h,kvm_para.h,a.out.h}, they are added to mandatory-y, then they are checked if they exist. But, we know they exist.

Yes, you're right. With english words : 'those files are mandatory only if they exist', thus they are not mandatory at all :)

Quoted 7 lines

This check reminds us only when we added asm/*.h
but forgot to add uapi/asm/*.h

$(srctree)/arch/$(SRCARCH)/include/uapi/asm/$(hdr) seems unneeded at least. (perhaps, the whole hunk might be unneeded.)

I think we can remove the whole hunk (see also [2]).

Quoted 15 lines

[2]

Quoted 10 lines
ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/a.out.h \
                $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h),)

header-n += a.out.h
endif

ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm.h \
                $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h),)

header-n += kvm.h
endif

Quoted 8 lines
Quoted 4 lines
ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm_para.h \
                $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h),)

header-n += kvm_para.h
endif

This series intends all headers are exported from uapi/, correct? Do we still need to check $(srctree)/arch/$(SRCARCH)/include/asm/*.h ? (related to [1])

No you're right, uapi/asm/*.h is enough. Those files should be exported only if the uapi/asm/ counterpart exists.

Quoted 17 lines

[3]

Quoted 5 lines

--- 7.1 header-n

header-n is essentially used by include/uapi/linux/Kbuild to avoid exporting specific headers (e.g. kvm.h) on architectures that do not support it. It should be avoided as much as possible.

Going forward, header-y will be never used
because uapi/ is exported by default.

So, I wonder if we could rename this into something clearer.

Quoted 7 lines

Kbuild supports "no-clean-files".
(Please see ./Kbuild for its usage)
I guess this notation seems clearer
when we want to negate the default behavior.

Can you consider "no-export", "no-export-files", "no-export-headers" or whatever you like?

No problem, let's use no-export-headers.

Thank you,
Nicolas

#213 lore raw

Re: [PATCH v10 00/11] uapi: export all headers under uapi directories

Hi Nicolas,

2017-03-27 18:45 GMT+09:00 Nicolas Dichtel <[email protected]>:

Quoted 4 lines
Quoted 2 lines

I wanted to leave comments/questions on 10/11,
but I could not find 10/11 in my mailbox. I do not know why.

Note that you can download the mail from the kbuild patchwork, open it with your email client and do a reply ;-)

I took the patch from the patchwork for git-am,
but I was too lazy to import it to my mailer. I will try it next time. Thanks for the tip!

Signature · 2 lines
Best Regards
Masahiro Yamada
#214 lore raw

v11 cover uapi: export all headers under uapi directories

In reply to Masahiro Yamada

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.
Patch #12 is also a small cleanup.

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 on top of masahiroy/linux-kbuild.git#for-next (v4.11-rc1). I didn't find any conflict with v4.11-rc4.

v10 -> v11:
- patch #1: restore the double '_' in the header guard
- patch #6, #7, #8: order '#include' in alphabetical order
- patch #10: rename header-n to no-export-headers cleanup management of kvm.h, kvm_para.h and a.out.h
- patch #12: add it
- rebase on top of masahiroy/linux-kbuild.git#for-next

v9 -> v10:
- rebase on top of masahiroy/linux-kbuild.git#for-next
- patch #4 & #10: fix dependency check
- fix some typos in commits logs

v8 -> v9:
- rebase on top of linus tree
- patch #8: add include/uapi/linux/crypto.h

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

#215 lore raw

PATCH v11 1/12 h8300: put bitsperlong.h in uapi

This header file is exported, thus move it to uapi.

---
 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
arch/h8300/include/asm/bitsperlong.h deleted +0 -14
deleted file mode 100644
index e140e46729ac..000000000000
@@ -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 */
arch/h8300/include/uapi/asm/bitsperlong.h new file +14 -0
new file mode 100644
index 000000000000..34212608371e
@@ -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 */
Signature · 6 lines
2.8.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#216 lore raw

PATCH v11 2/12 nios2: put setup.h in uapi

In reply to Nicolas Dichtel

This header file is exported, but from a userland pov, it's just a wrapper to asm-generic/setup.h.

---
 arch/nios2/include/uapi/asm/Kbuild | 1 +
 1 file changed, 1 insertion(+)
arch/nios2/include/uapi/asm/Kbuild +1 -0
index e0bb972a50d7..69c965304146 100644
@@ -2,4 +2,5 @@ include include/uapi/asm-generic/Kbuild.asm
 
 header-y += elf.h
 
+generic-y += setup.h
 generic-y += ucontext.h
Signature · 6 lines
2.8.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#217 lore raw

PATCH v11 3/12 x86: stop exporting msr-index.h to userland

In reply to Nicolas Dichtel

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")
CC Ingo Molnar <[email protected]>
---
 arch/x86/include/uapi/asm/Kbuild | 1 -
 1 file changed, 1 deletion(-)
arch/x86/include/uapi/asm/Kbuild +0 -1
index 3dec769cadf7..1c532b3f18ea 100644
@@ -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
Signature · 1 line
2.8.1
#218 lore raw

PATCH v11 4/12 Makefile.headersinst: cleanup input files

In reply to Nicolas Dichtel

After the last three 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.

---
 scripts/Makefile.headersinst | 38 ++++++++++++++------------------------
 1 file changed, 14 insertions(+), 24 deletions(-)
scripts/Makefile.headersinst +14 -24
index 1106d6ca3a38..7bd9df6efe2f 100644
@@ -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;                                                           \
@@ -106,7 +94,9 @@ __headersinst: $(subdirs) $(install-file)
 	@:
 
 targets += $(install-file)
-$(install-file): scripts/headers_install.sh $(input-files1) $(input-files2) $(input-files3) FORCE
+$(install-file): scripts/headers_install.sh \
+		 $(addprefix $(srcdir)/,$(header-y)) \
+		 $(addprefix $(gendir)/,$(genhdr-y)) FORCE
 	$(if $(unwanted),$(call cmd,remove),)
 	$(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@)))
 	$(call if_changed,install)
Signature · 6 lines
2.8.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#219 lore raw

PATCH v11 5/12 Makefile.headersinst: remove destination-y option

In reply to Nicolas Dichtel

This option was added in commit c7bb349e7c25 ("kbuild: introduce destination-y for exported headers") but never used in-tree.

---
 Documentation/kbuild/makefiles.txt | 23 ++++-------------------
 scripts/Makefile.headersinst       |  2 +-
 2 files changed, 5 insertions(+), 20 deletions(-)
Documentation/kbuild/makefiles.txt +4 -19
index 9b9c4797fc55..37b525d329ae 100644
@@ -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
scripts/Makefile.headersinst +1 -1
index 7bd9df6efe2f..ca5d439c9abf 100644
@@ -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)),)
Signature · 1 line
2.8.1