25 Dec, 2017

1 commit

  • commit d15155824c5014803d91b829736d249c500bdda6 upstream.

    linux/compiler.h is included indirectly by linux/types.h via
    uapi/linux/types.h -> uapi/linux/posix_types.h -> linux/stddef.h
    -> uapi/linux/stddef.h and is needed to provide a proper definition of
    offsetof.

    Unfortunately, compiler.h requires a definition of
    smp_read_barrier_depends() for defining lockless_dereference() and soon
    for defining READ_ONCE(), which means that all
    users of READ_ONCE() will need to include asm/barrier.h to avoid splats
    such as:

    In file included from include/uapi/linux/stddef.h:1:0,
    from include/linux/stddef.h:4,
    from arch/h8300/kernel/asm-offsets.c:11:
    include/linux/list.h: In function 'list_empty':
    >> include/linux/compiler.h:343:2: error: implicit declaration of function 'smp_read_barrier_depends' [-Werror=implicit-function-declaration]
    smp_read_barrier_depends(); /* Enforce dependency ordering from x */ \
    ^

    A better alternative is to include asm/barrier.h in linux/compiler.h,
    but this requires a type definition for "bool" on some architectures
    (e.g. x86), which is defined later by linux/types.h. Type "bool" is also
    used directly in linux/compiler.h, so the whole thing is pretty fragile.

    This patch splits compiler.h in two: compiler_types.h contains type
    annotations, definitions and the compiler-specific parts, whereas
    compiler.h #includes compiler-types.h and additionally defines macros
    such as {READ,WRITE.ACCESS}_ONCE().

    uapi/linux/stddef.h and linux/linkage.h are then moved over to include
    linux/compiler_types.h, which fixes the build for h8 and blackfin.

    Signed-off-by: Will Deacon
    Cc: Linus Torvalds
    Cc: Paul E. McKenney
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1508840570-22169-2-git-send-email-will.deacon@arm.com
    Signed-off-by: Ingo Molnar
    Signed-off-by: Greg Kroah-Hartman

    Will Deacon
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

14 Oct, 2014

2 commits

  • Pull kbuild changes from Michal Marek:
    - fix for handling dependencies of *-objs targets by Masahiro Yamada
    - lots of cleanups in the kbuild machinery, also by Masahiro
    - fixes for the kconfig build to use an UTF-8 capable ncurses library
    if possible and to build on not-so-standard installs
    - some more minor fixes

    * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    kbuild: Do not reference *-n variables in the Makefile
    kbuild: simplify build, clean, modbuiltin shorthands
    kbuild: arm: Do not define "comma" twice
    kbuild: remove obj-n and lib-n handling
    kbuild: remove unnecessary variable initializaions
    kbuild: remove unnecessary "obj- := dummy.o" trick
    kbuild: handle C=... and M=... after entering into build directory
    kbuild: use $(Q) for sub-make target
    kbuild: fake the "Entering directory ..." message more simply
    kconfig/lxdialog: get ncurses CFLAGS with pkg-config
    kconfig: nconfig: fix multi-byte UTF handling
    kconfig: lxdialog: fix spelling
    kbuild: Make scripts executable
    kbuild: remove redundant clean-files from scripts/kconfig/Makefile
    kbuild: refactor script/kconfig/Makefile
    kbuild: handle the dependency of multi-objs hostprogs appropriately
    kbuild: handle multi-objs dependency appropriately

    Linus Torvalds
     
  • - headers_install requires at least two arguments

    - missed closing quote

    Signed-off-by: Javier Barrio
    Cc: Michal Marek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Javier Barrio
     

20 Aug, 2014

1 commit


18 May, 2013

1 commit

  • If headers_install is executed from a deep/long directory structure, the
    shell's maximum argument length can be execeeded, which breaks the operation
    with:

    | make[2]: execvp: /bin/sh: Argument list too long
    | make[2]: ***

    Instead of passing each files name with the entire path, I give only the file
    name without the source path and give this path as a new argument to
    headers_install.pl.

    Because there is three possible paths, I have tree input-files list, one per
    path.

    Signed-off-by: Nicolas Dichtel
    Tested-by: Bruce Ashfield
    Signed-off-by: Michal Marek

    Nicolas Dichtel
     

09 Apr, 2013

1 commit

  • Remove perl from make headers_install by replacing a perl script (doing a
    simple regex search and replace) with a smaller, faster, simpler,
    POSIX-2008 shell script implementation. The new shell script is a single
    for loop calling sed and piping its output through unifdef to produce the
    target file.

    Same as last time except for minor tweak to deal with code review from
    here: http://lkml.indiana.edu/hypermail/linux/kernel/1302.3/00078.html

    (Note that this drops the "arch" argument, which isn't used. Kbuild
    already points to the right input files on the command line.)

    Signed-off-by: Rob Landley
    Cc: Thomas Gleixner
    Cc: Josh Boyer
    Cc: "Paul E. McKenney"
    Cc: David Howells
    Acked-by: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Michal Marek

    Rob Landley