1. 10 5月, 2017 4 次提交
    • N
      uapi: export all arch specifics directories · 61562f98
      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.
      Signed-off-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      61562f98
    • N
      uapi: export all headers under uapi directories · fcc8487d
      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-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/aspeed-lpc-ctrl.h
      linux/auto_dev-ioctl.h
      linux/bcache.h
      linux/btrfs_tree.h
      linux/can/vxcan.h
      linux/cifs/cifs_mount.h
      linux/coresight-stm.h
      linux/cryptouser.h
      linux/fsmap.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/nbd-netlink.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/switchtec_ioctl.h
      linux/vfio_ccw.h
      linux/wil6210_uapi.h
      rdma/bnxt_re-abi.h
      
      Note that I have removed from this list the files which are generated in every
      exported directories (like .install or .install.cmd).
      
      Thanks to Julien Floret <julien.floret@6wind.com> for the tip to get all
      subdirs with a pure makefile command.
      
      For the record, note that exported files for asm directories are a mix of
      files listed by:
       - include/uapi/asm-generic/Kbuild.asm;
       - arch/<arch>/include/uapi/asm/Kbuild;
       - arch/<arch>/include/asm/Kbuild.
      Signed-off-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Acked-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Acked-by: NMark Salter <msalter@redhat.com>
      Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      fcc8487d
    • N
      Makefile.headersinst: remove destination-y option · bd73a328
      Nicolas Dichtel 提交于
      This option was added in commit c7bb349e ("kbuild: introduce destination-y
      for exported headers") but never used in-tree.
      Signed-off-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
      Acked-by: NPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      bd73a328
    • N
      Makefile.headersinst: cleanup input files · 7c025b2a
      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.
      Signed-off-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      7c025b2a
  2. 26 11月, 2014 1 次提交
  3. 18 5月, 2013 1 次提交
  4. 09 4月, 2013 1 次提交
  5. 05 3月, 2013 1 次提交
  6. 22 2月, 2013 1 次提交
    • J
      kbuild: Fix destination-y for installed headers · 9b58b928
      Jesper Nilsson 提交于
      Commit 10b63956 which plumbed in UAPI
      broke the destination-y functionality of scripts/Makefile.headersinst.
      
      The variable destination-y is used in a := assignment and so is expanded at
      declaration time, and the include of the Kbuild fragments that set
      destination-y to something is after this time, so it now always expands empty.
      
      There are no in-tree users of destination-y, but it allows any
      Kbuild-fragment to redirect where headers are installed.
      
      Just move the assignment of the variable that uses it below the include
      of the Kbuild fragment.
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: David Howells <dhowells@redhat.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      9b58b928
  7. 03 10月, 2012 2 次提交
  8. 18 11月, 2011 1 次提交
  9. 29 4月, 2011 1 次提交
    • S
      kbuild: asm-generic support · d8ecc5cd
      Sam Ravnborg 提交于
      There is an increasing amount of header files
      shared between individual architectures in asm-generic.
      To avoid a lot of dummy wrapper files that just
      include the corresponding file in asm-generic provide
      some basic support in kbuild for this.
      
      With the following patch an architecture can maintain
      a list of files in the file arch/$(ARCH)/include/asm/Kbuild
      
      To use a generic file just add:
      
              generic-y += <name-of-header-file.h>
      
      For each file listed kbuild will generate the necessary
      wrapper in arch/$(ARCH)/include/generated/asm.
      
      When installing userspace headers a wrapper is likewise created.
      
      The original inspiration for this came from the unicore32
      patchset - although a different method is used.
      
      The patch includes several improvements from Arnd Bergmann.
      Michael Marek contributed Makefile.asm-generic.
      
      Remis Baima did an intial implementation along to achive
      the same - see https://patchwork.kernel.org/patch/13352/Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Acked-by: NGuan Xuetao <guanxuetao@mprc.pku.edu.cn>
      Tested-by: NGuan Xuetao <guanxuetao@mprc.pku.edu.cn>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Remis Lima Baima <remis.developer@googlemail.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      d8ecc5cd
  10. 15 8月, 2010 1 次提交
  11. 10 6月, 2009 1 次提交
    • S
      kbuild: fix "Argument list too long" error for "make headers_check", · 7211b8b9
      Sergei Poselenov 提交于
      I'm trying to install kernel headers to build a cross-toolchain, but got
      the following:
      
      make ARCH=arm
      INSTALL_HDR_PATH=/work/psl/eldk-builds/arm-2009-04-21/work/var/tmp/crosstool-0.43-3-root/usr/crosstool/gcc-4.2.2-glibc-20070515T2025-eldk/
      +arm-linux-gnueabi/arm-linux-gnueabi/
      headers_check
      ...
        CHECK   include/linux/raid (2 files)
        CHECK   include/linux/spi (1 files)
        CHECK   include/linux/sunrpc (1 files)
        CHECK   include/linux/tc_act (6 files)
        CHECK   include/linux/tc_ematch (4 files)
        CHECK   include/linux/usb (8 files)
      make[2]: execvp: /bin/sh: Argument list too long
      make[2]: ***
      [/work/psl/eldk-builds/arm-2009-04-21/work/var/tmp/crosstool-0.43-3-root/usr/crosstool/gcc-4.2.2-glibc-20070515T2025-eldk/arm-linux-gnueab
      +i/arm-linux-gnueabi//include/linux/.check]
      Error 127
      make[1]: *** [linux] Error 2
      make: *** [headers_check] Error 2
      ->
      
      Introduce use of xargs to fix this.
      Signed-off-by: NSergei Poselenov <sposelenov@emcraft.com>
      Cc: Wolfgang Denk <wd@denx.de>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      7211b8b9
  12. 11 4月, 2009 1 次提交
    • S
      kbuild: introduce destination-y for exported headers · c7bb349e
      Sam Ravnborg 提交于
      xtensa and arm have asked for a possibility to export headers
      and locate them in a specific directory when exported.
      Introduce destiantion-y to support this.
      
      This patch in additiona adds some limited
      documentation for the variables used for exported headers.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Oskar Schirmer <os@emlix.com>
      Cc: Mikael Starvik <mikael.starvik@axis.com>
      c7bb349e
  13. 26 7月, 2008 6 次提交
    • S
      kbuild: install all headers when arch is changed · db1bec4f
      Sam Ravnborg 提交于
      We see some header files that are selected dependent on
      the actual architecture so force a reinstallation
      of all header files when the arch changes.
      This slows down "make headers_check_all" but then
      we better reflect reality.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      db1bec4f
    • S
      kbuild: optimize headers_* targets · 7712401a
      Sam Ravnborg 提交于
      Move the core functionality of headers_install
      and headers_check to two small perl scripts.
      The makefile is adapted to use the perl scrip and
      changed to operate on all files in a directory.
      So if one file is changed then all files in the
      directory is processed.
      
      perl were chosen for the helper scripts because this
      is pure text processing which perl is good at and
      especially the headers_check.pl script are expected to
      see changes / new checks implmented.
      
      The speed is ~300% faster on this box.
      And the output generated to the screen is now down to
      two lines per directory (one for install, one for check)
      so it is easier to scroll back after a kernel build.
      
      The perl scripts has been brought to sanity by patient
      feedback from: Vegard Nossum <vegard.nossum@gmail.com>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      7712401a
    • S
      kbuild: only one call for include/ in make headers_* · 88181ec3
      Sam Ravnborg 提交于
      Move it to the top-level file to decide if we install/check
      the generic headers or the arch specific headers.
      
      This revealed a long standing bug where "make headers_check_all"
      relied on the files in asm/ for the current architecture.
      So make headers_check_all is now broken by this commit.
      
      In addition:
      
      o add a simpler way to detect if an arch support
        exporting header files.
      
      o add 'set -e;' so we error out early if
        make headers_check_all fails.
      
      o add sparc64 and cris to arch we do not process
        in make headers_*_all because:
      
          sparc64 - use sparc to export headers
          cris    - is know seriously broken
      
      Includes suggestions from: David Woodhouse
      <dwmw2@infradead.org>.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: David Woodhouse <dwmw2@infradead.org>
      88181ec3
    • S
      kbuild: code refactoring in Makefile.headerinst · 62284a37
      Sam Ravnborg 提交于
      No functional changes just improved readability
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      62284a37
    • S
      kbuild: drop support of ALTARCH for headers_* · 283039fb
      Sam Ravnborg 提交于
      ALTARCH is no longer used by any arch(*) so drop
      support for this from Makefile.headerinst
      
      Dropping ALTARCH support simplifies Makefile.headerinst
      
      (*) sparc64 uses it but work is ongoing to drop it
      and no furter usage is planned.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: David Miller <davem@davemloft.net>
      283039fb
    • S
      kbuild: always unifdef files in headers_install* · 4e420aa9
      Sam Ravnborg 提交于
      unifdef utility is fast enough to warrant that we always
      run the scripts through unifdef.
      
      This patch runs all headers listed with header-y and unifdef-y
      through unifdef.
      Next step is to drop unifdef-y in all Kbuild files and
      that can now be done in smaller steps.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Adrian Bunk <bunk@kernel.org>
      4e420aa9
  14. 17 7月, 2007 1 次提交
  15. 07 7月, 2007 1 次提交
  16. 29 6月, 2007 2 次提交
  17. 22 5月, 2007 1 次提交
    • D
      Make 'headerscheck' stop immediately on an error · df5f6311
      David Woodhouse 提交于
      This should make it stop immediately after printing the _helpful_ error
      message, rather than continuing to spit out many pages more of 'CHECK
      include/linux/foo.h' before eventually coming to a halt with something
      less obvious.
      
      Now I get this...
        CHECK   include/linux/smb_fs.h
      /shiny/git/linux-2.6/usr/include/linux/smb_fs.h requires linux/jiffies.h, which does not exist in exported headers
      make[2]: *** [/shiny/git/linux-2.6/usr/include/linux/.check.smb_fs.h] Error 1
      make[1]: *** [linux] Error 2
      make: *** [headers_check] Error 2
      
      Signed-off-by-if-Sam-says-so: David Woodhouse <dwmw2@infradead.org>
      [ Sam had better say so! This made me waste way too much time. - Linus]
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      df5f6311
  18. 31 1月, 2007 1 次提交
  19. 17 10月, 2006 1 次提交
  20. 04 10月, 2006 1 次提交
  21. 25 9月, 2006 2 次提交
  22. 17 9月, 2006 1 次提交
    • D
      [PATCH] Fix 'make headers_check' on biarch architectures · b5122177
      David Woodhouse 提交于
      We generate an <asm/foo.h> which includes either <asm-$ARCH/foo.h> or
      <asm-$ALTARCH/foo.h> as appropriate.  But we were doing this dependent on
      whether the file in question existed in the _unexported_ tree, not the
      exported tree.  So if a file was exported to userspace in one asm- directory
      but not the other, the generated file in asm/ was incorrect.
      
      This only changed the failure mode if it _was_ included from a nice #error to
      a less explicable #include failure -- but it also gave false errors in 'make
      headers_check' output.  Fix it by looking in the right place instead.
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b5122177
  23. 18 6月, 2006 2 次提交
    • D
      Basic implementation of 'make headers_check' · 68475359
      David Woodhouse 提交于
      Based on the 'headers_install' target, this performs a basic sanity check
      on the exported headers -- so far only checking that they do not include
      any other headers which aren't selected for import, but easily extendable.
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      68475359
    • D
      Basic implementation of 'make headers_install' · 8d730cfb
      David Woodhouse 提交于
      This adds a make target which exports a subset of headers which contain
      definitions which are useful for system libraries and tools. It uses the
      BSD 'unifdef' tool to remove instances of #ifdef __KERNEL__, and uses
      sed to remove markers like __user.
      
      Based on an original implementation by Arnd Bergmann <arnd@arndb.de>
      Hacked about by David Woodhouse <dwmw2@infradead.org>
      Reviewed and cleaned up by Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      8d730cfb