06 Apr, 2019

1 commit

  • [ Upstream commit fc2b47b55f17fd996f7a01975ce1c33c2f2513f6 ]

    It believe it is a bad idea to hardcode a specific compiler prefix
    that may or may not be installed on a user's system. It is annoying
    when testing features that should not require compilers at all.

    For example, mrproper, headers_install, etc. should work without
    any compiler.

    They look like follows on my machine.

    $ make ARCH=h8300 mrproper
    ./scripts/gcc-version.sh: line 26: h8300-unknown-linux-gcc: command not found
    ./scripts/gcc-version.sh: line 27: h8300-unknown-linux-gcc: command not found
    make: h8300-unknown-linux-gcc: Command not found
    make: h8300-unknown-linux-gcc: Command not found
    [ a bunch of the same error messages continue ]

    $ make ARCH=h8300 headers_install
    ./scripts/gcc-version.sh: line 26: h8300-unknown-linux-gcc: command not found
    ./scripts/gcc-version.sh: line 27: h8300-unknown-linux-gcc: command not found
    make: h8300-unknown-linux-gcc: Command not found
    HOSTCC scripts/basic/fixdep
    make: h8300-unknown-linux-gcc: Command not found
    WRAP arch/h8300/include/generated/uapi/asm/kvm_para.h
    [ snip ]

    The solution is to delete this line, or to use cc-cross-prefix like
    some architectures do. I chose the latter as a moderate fixup.

    I added an alternative 'h8300-linux-' because it is available at:

    https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/8.1.0/

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Sasha Levin

    Masahiro Yamada
     

26 Aug, 2018

1 commit

  • Pull more Kbuild updates from Masahiro Yamada:

    - add build_{menu,n,g,x}config targets for compile-testing Kconfig

    - fix and improve recursive dependency detection in Kconfig

    - fix parallel building of menuconfig/nconfig

    - fix syntax error in clang-version.sh

    - suppress distracting log from syncconfig

    - remove obsolete "rpm" target

    - remove VMLINUX_SYMBOL(_STR) macro entirely

    - fix microblaze build with CONFIG_DYNAMIC_FTRACE

    - move compiler test for dead code/data elimination to Kconfig

    - rename well-known LDFLAGS variable to KBUILD_LDFLAGS

    - misc fixes and cleanups

    * tag 'kbuild-v4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kbuild: rename LDFLAGS to KBUILD_LDFLAGS
    kbuild: pass LDFLAGS to recordmcount.pl
    kbuild: test dead code/data elimination support in Kconfig
    initramfs: move gen_initramfs_list.sh from scripts/ to usr/
    vmlinux.lds.h: remove stale include
    export.h: remove VMLINUX_SYMBOL() and VMLINUX_SYMBOL_STR()
    Coccinelle: remove pci_alloc_consistent semantic to detect in zalloc-simple.cocci
    kbuild: make sorting initramfs contents independent of locale
    kbuild: remove "rpm" target, which is alias of "rpm-pkg"
    kbuild: Fix LOADLIBES rename in Documentation/kbuild/makefiles.txt
    kconfig: suppress "configuration written to .config" for syncconfig
    kconfig: fix "Can't open ..." in parallel build
    kbuild: Add a space after `!` to prevent parsing as file pattern
    scripts: modpost: check memory allocation results
    kconfig: improve the recursive dependency report
    kconfig: report recursive dependency involving 'imply'
    kconfig: error out when seeing recursive dependency
    kconfig: add build-only configurator targets
    scripts/dtc: consolidate include path options in Makefile

    Linus Torvalds
     

24 Aug, 2018

1 commit

  • Commit a0f97e06a43c ("kbuild: enable 'make CFLAGS=...' to add
    additional options to CC") renamed CFLAGS to KBUILD_CFLAGS.

    Commit 222d394d30e7 ("kbuild: enable 'make AFLAGS=...' to add
    additional options to AS") renamed AFLAGS to KBUILD_AFLAGS.

    Commit 06c5040cdb13 ("kbuild: enable 'make CPPFLAGS=...' to add
    additional options to CPP") renamed CPPFLAGS to KBUILD_CPPFLAGS.

    For some reason, LDFLAGS was not renamed.

    Using a well-known variable like LDFLAGS may result in accidental
    override of the variable.

    Kbuild generally uses KBUILD_ prefixed variables for the internally
    appended options, so here is one more conversion to sanitize the
    naming convention.

    I did not touch Makefiles under tools/ since the tools build system
    is a different world.

    Signed-off-by: Masahiro Yamada
    Acked-by: Kirill A. Shutemov
    Reviewed-by: Palmer Dabbelt

    Masahiro Yamada
     

22 Aug, 2018

12 commits

  • Pull arch/h8300 updates from Yoshinori Sato.

    * tag 'for-4.19' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux:
    h8300: fix IRQ no
    arch/h8300: add a defconfig target
    arch/h8300: eliminate kgbd.c warning
    arch/h8300: eliminate ptrace.h warnings
    h8300:let the checker know that size_t is ulong
    h8300: Don't include linux/kernel.h in asm/atomic.h
    h8300: remove unnecessary of_platform_populate call
    h8300: Correct signature of test_bit()
    h8300: irqchip: fix warning
    h8300: switch to NO_BOOTMEM
    h8300: gcc-8.1 fix
    h8300: Add missing output register.

    Linus Torvalds
     
  • Old timer handler use 24 (Compare match A).
    But current timer handler use 26 (Overflow).

    Signed-off-by: Yoshinori Sato

    Yoshinori Sato
     
  • Make the "defconfig" target valid for arch/h8300. Currently
    "make ARCH=h8300 defconfig" produces:

    *** Can't find default configuration "arch/h8300/defconfig"!
    ../scripts/kconfig/Makefile:87: recipe for target 'defconfig' failed

    By adding a value for KBUILD_DEFCONFIG, "make ARCH=h8300 defconfig"
    successfully produces a kernel .config file:

    *** Default configuration is based on 'edosk2674_defconfig'

    This is useful for Kconfig editing/testing.

    Signed-off-by: Randy Dunlap
    Cc: Yoshinori Sato
    Cc: uclinux-h8-devel@lists.sourceforge.jp (moderated for non-subscribers)
    Signed-off-by: Yoshinori Sato

    Randy Dunlap
     
  • Drop the "const" qualifier from arch_kgdb_ops to eliminate the gcc
    warning (gcc version is 8.1.0).

    arch/h8300/kernel/kgdb.c:132:24: error: conflicting type qualifiers for 'arch_kgdb_ops'
    const struct kgdb_arch arch_kgdb_ops = {
    In file included from ../arch/h8300/kernel/kgdb.c:12:
    ../include/linux/kgdb.h:284:26: note: previous declaration of 'arch_kgdb_ops' was here
    extern struct kgdb_arch arch_kgdb_ops;

    Signed-off-by: Randy Dunlap
    Cc: Yoshinori Sato
    Cc: uclinux-h8-devel@lists.sourceforge.jp
    Signed-off-by: Yoshinori Sato

    Randy Dunlap
     
  • Add a "struct task_struct;" stub to arch/h8300's ptrace.h header to
    eliminate gcc warnings (gcc version is 8.1.0).

    ../arch/h8300/include/asm/ptrace.h:32:34: warning: 'struct task_struct' declared inside parameter list will not be visible outside of this definition or declaration
    extern long h8300_get_reg(struct task_struct *task, int regno);
    ../arch/h8300/include/asm/ptrace.h:33:33: warning: 'struct task_struct' declared inside parameter list will not be visible outside of this definition or declaration
    extern int h8300_put_reg(struct task_struct *task, int regno,

    Signed-off-by: Randy Dunlap
    Cc: Yoshinori Sato
    Cc: uclinux-h8-devel@lists.sourceforge.jp
    Signed-off-by: Yoshinori Sato

    Randy Dunlap
     
  • All 64bit archs use unsigned long for size_t and most 32bit
    archs use 'unsigned int'. By default, this is what is assumed
    by sparse.

    However, on h8300 (a 32bit arch) size_t is unsigned long which
    can led sparse to emit wrong warnings.

    Fix this by passing to sparse the flag -msize-long, telling it
    that size_t is unsigned long.

    Signed-off-by: Luc Van Oostenryck
    Signed-off-by: Yoshinori Sato

    Luc Van Oostenryck
     
  • linux/kernel.h isn't needed by asm/atomic.h and will result in circular
    dependencies when the asm-generic atomic bitops are built around the
    tomic_long_t interface.

    Remove the broad include and replace it with linux/compiler.h for
    READ_ONCE etc and asm/irqflags.h for arch_local_irq_save etc.

    Cc: Yoshinori Sato
    Signed-off-by: Will Deacon
    Signed-off-by: Yoshinori Sato

    Will Deacon
     
  • The DT core will call of_platform_populate, so it is not necessary for
    arch specific code to call it unless there are custom match entries,
    auxdata or parent device. Neither of those apply here, so remove the call.

    Cc: Yoshinori Sato
    Cc: uclinux-h8-devel@lists.sourceforge.jp
    Signed-off-by: Rob Herring
    Signed-off-by: Yoshinori Sato

    Rob Herring
     
  • mm/filemap.c: In function 'clear_bit_unlock_is_negative_byte':
    mm/filemap.c:1181:30: warning: passing argument 2 of 'test_bit' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]
    return test_bit(PG_waiters, mem);
    ^~~
    In file included from include/linux/bitops.h:38,
    from include/linux/kernel.h:11,
    from include/linux/list.h:9,
    from include/linux/wait.h:7,
    from include/linux/wait_bit.h:8,
    from include/linux/fs.h:6,
    from include/linux/dax.h:5,
    from mm/filemap.c:14:
    arch/h8300/include/asm/bitops.h:69:57: note: expected 'const long unsigned int *' but argument is of type 'volatile void *'
    static inline int test_bit(int nr, const unsigned long *addr)
    ~~~~~~~~~~~~~~~~~~~~~^~~~

    Make the bitmask pointed to by the "addr" parameter volatile to fix
    this, like is done on other architectures.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Yoshinori Sato

    Geert Uytterhoeven
     
  • Commit 0fa1c579349f ("of/fdt: use memblock_virt_alloc for early alloc")
    inadvertently switched the DT unflattening allocations from memblock to
    bootmem which doesn't work because the unflattening happens before
    bootmem is initialized. Swapping the order of bootmem init and
    unflattening could also fix this, but removing bootmem is desired. So
    enable NO_BOOTMEM on h8300 like other architectures have done.

    Fixes: 0fa1c579349f ("of/fdt: use memblock_virt_alloc for early alloc")
    Cc: Yoshinori Sato
    Cc: uclinux-h8-devel@lists.sourceforge.jp
    Signed-off-by: Rob Herring
    Signed-off-by: Yoshinori Sato

    Rob Herring
     
  • Since gcc 8.1 does not generate an assignment statement to er 0,
    we had to explicitly write it.

    Signed-off-by: Yoshinori Sato

    Yoshinori Sato
     
  • Signed-off-by: Yoshinori Sato

    Yoshinori Sato
     

16 Aug, 2018

1 commit

  • Pull Kconfig consolidation from Masahiro Yamada:
    "Consolidation of Kconfig files by Christoph Hellwig.

    Move the source statements of arch-independent Kconfig files instead
    of duplicating the includes in every arch/$(SRCARCH)/Kconfig"

    * tag 'kconfig-v4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kconfig: add a Memory Management options" menu
    kconfig: move the "Executable file formats" menu to fs/Kconfig.binfmt
    kconfig: use a menu in arch/Kconfig to reduce clutter
    kconfig: include kernel/Kconfig.preempt from init/Kconfig
    Kconfig: consolidate the "Kernel hacking" menu
    kconfig: include common Kconfig files from top-level Kconfig
    kconfig: remove duplicate SWAP symbol defintions
    um: create a proper drivers Kconfig
    um: cleanup Kconfig files
    um: stop abusing KBUILD_KCONFIG

    Linus Torvalds
     

02 Aug, 2018

3 commits

  • Almost all architectures include it. Add a ARCH_NO_PREEMPT symbol to
    disable preempt support for alpha, hexagon, non-coldfire m68k and
    user mode Linux.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Masahiro Yamada

    Christoph Hellwig
     
  • Move the source of lib/Kconfig.debug and arch/$(ARCH)/Kconfig.debug to
    the top-level Kconfig. For two architectures that means moving their
    arch-specific symbols in that menu into a new arch Kconfig.debug file,
    and for a few more creating a dummy file so that we can include it
    unconditionally.

    Also move the actual 'Kernel hacking' menu to lib/Kconfig.debug, where
    it belongs.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Masahiro Yamada

    Christoph Hellwig
     
  • Instead of duplicating the source statements in every architecture just
    do it once in the toplevel Kconfig file.

    Note that with this the inclusion of arch/$(SRCARCH/Kconfig moves out of
    the top-level Kconfig into arch/Kconfig so that don't violate ordering
    constraits while keeping a sensible menu structure.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Masahiro Yamada

    Christoph Hellwig
     

21 Jun, 2018

5 commits

  • Many of the inc/dec ops are mandatory, but for most architectures inc/dec are
    simply trivial wrappers around their corresponding add/sub ops.

    Let's make all the inc/dec ops optional, so that we can get rid of these
    boilerplate wrappers.

    The instrumented atomics are updated accordingly.

    There should be no functional change as a result of this patch.

    Signed-off-by: Mark Rutland
    Reviewed-by: Will Deacon
    Acked-by: Peter Zijlstra (Intel)
    Acked-by: Palmer Dabbelt
    Cc: Boqun Feng
    Cc: Linus Torvalds
    Cc: Thomas Gleixner
    Link: https://lore.kernel.org/lkml/20180621121321.4761-17-mark.rutland@arm.com
    Signed-off-by: Ingo Molnar

    Mark Rutland
     
  • Some of the atomics return the result of a test applied after the atomic
    operation, and almost all architectures implement these as trivial
    wrappers around the underlying atomic. Specifically:

    * _inc_and_test(v) is (_inc_return(v) == 0)
    * _dec_and_test(v) is (_dec_return(v) == 0)
    * _sub_and_test(i, v) is (_sub_return(i, v) == 0)
    * _add_negative(i, v) is (_add_return(i, v) < 0)

    Rather than have these definitions duplicated in all architectures, with
    minor inconsistencies in formatting and documentation, let's make these
    operations optional, with default fallbacks as above. Implementations
    must now provide a preprocessor symbol.

    The instrumented atomics are updated accordingly.

    Both x86 and m68k have custom implementations, which are left as-is,
    given preprocessor symbols to avoid being overridden.

    There should be no functional change as a result of this patch.

    Signed-off-by: Mark Rutland
    Reviewed-by: Will Deacon
    Acked-by: Geert Uytterhoeven
    Acked-by: Peter Zijlstra (Intel)
    Acked-by: Palmer Dabbelt
    Cc: Boqun Feng
    Cc: Linus Torvalds
    Cc: Thomas Gleixner
    Link: https://lore.kernel.org/lkml/20180621121321.4761-16-mark.rutland@arm.com
    Signed-off-by: Ingo Molnar

    Mark Rutland
     
  • Several architectures these have a near-identical implementation based
    on atomic_read() and atomic_cmpxchg() which we can instead define in
    , so let's do so, using something close to the existing
    x86 implementation with try_cmpxchg().

    Where an architecture provides its own atomic_fetch_add_unless(), it
    must define a preprocessor symbol for it. The instrumented atomics are
    updated accordingly.

    Note that arch/arc's existing atomic_fetch_add_unless() had redundant
    barriers, as these are already present in its atomic_cmpxchg()
    implementation.

    There should be no functional change as a result of this patch.

    Signed-off-by: Mark Rutland
    Reviewed-by: Geert Uytterhoeven
    Reviewed-by: Will Deacon
    Acked-by: Geert Uytterhoeven
    Acked-by: Peter Zijlstra (Intel)
    Acked-by: Palmer Dabbelt
    Cc: Boqun Feng
    Cc: Linus Torvalds
    Cc: Thomas Gleixner
    Cc: Vineet Gupta
    Link: https://lore.kernel.org/lkml/20180621121321.4761-7-mark.rutland@arm.com
    Signed-off-by: Ingo Molnar

    Mark Rutland
     
  • While __atomic_add_unless() was originally intended as a building-block
    for atomic_add_unless(), it's now used in a number of places around the
    kernel. It's the only common atomic operation named __atomic*(), rather
    than atomic_*(), and for consistency it would be better named
    atomic_fetch_add_unless().

    This lack of consistency is slightly confusing, and gets in the way of
    scripting atomics. Given that, let's clean things up and promote it to
    an official part of the atomics API, in the form of
    atomic_fetch_add_unless().

    This patch converts definitions and invocations over to the new name,
    including the instrumented version, using the following script:

    ----
    git grep -w __atomic_add_unless | while read line; do
    sed -i '{s/\/atomic_fetch_add_unless/}' "${line%%:*}";
    done
    git grep -w __arch_atomic_add_unless | while read line; do
    sed -i '{s/\/arch_atomic_fetch_add_unless/}' "${line%%:*}";
    done
    ----

    Note that we do not have atomic{64,_long}_fetch_add_unless(), which will
    be introduced by later patches.

    There should be no functional change as a result of this patch.

    Signed-off-by: Mark Rutland
    Reviewed-by: Will Deacon
    Acked-by: Geert Uytterhoeven
    Acked-by: Peter Zijlstra (Intel)
    Acked-by: Palmer Dabbelt
    Cc: Boqun Feng
    Cc: Linus Torvalds
    Cc: Thomas Gleixner
    Link: https://lore.kernel.org/lkml/20180621121321.4761-2-mark.rutland@arm.com
    Signed-off-by: Ingo Molnar

    Mark Rutland
     
  • isn't needed by and will result in circular
    dependencies when the asm-generic atomic bitops are built around the
    atomic_long_t interface.

    Remove the broad include and replace it with for
    READ_ONCE() etc and for arch_local_irq_save() etc.

    Signed-off-by: Will Deacon
    Acked-by: Peter Zijlstra (Intel)
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: Yoshinori Sato
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: yamada.masahiro@socionext.com
    Link: https://lore.kernel.org/lkml/1529412794-17720-2-git-send-email-will.deacon@arm.com
    Signed-off-by: Ingo Molnar

    Will Deacon
     

05 Jun, 2018

1 commit

  • Pull timers and timekeeping updates from Thomas Gleixner:

    - Core infrastucture work for Y2038 to address the COMPAT interfaces:

    + Add a new Y2038 safe __kernel_timespec and use it in the core
    code

    + Introduce config switches which allow to control the various
    compat mechanisms

    + Use the new config switch in the posix timer code to control the
    32bit compat syscall implementation.

    - Prevent bogus selection of CPU local clocksources which causes an
    endless reselection loop

    - Remove the extra kthread in the clocksource code which has no value
    and just adds another level of indirection

    - The usual bunch of trivial updates, cleanups and fixlets all over the
    place

    - More SPDX conversions

    * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits)
    clocksource/drivers/mxs_timer: Switch to SPDX identifier
    clocksource/drivers/timer-imx-tpm: Switch to SPDX identifier
    clocksource/drivers/timer-imx-gpt: Switch to SPDX identifier
    clocksource/drivers/timer-imx-gpt: Remove outdated file path
    clocksource/drivers/arc_timer: Add comments about locking while read GFRC
    clocksource/drivers/mips-gic-timer: Add pr_fmt and reword pr_* messages
    clocksource/drivers/sprd: Fix Kconfig dependency
    clocksource: Move inline keyword to the beginning of function declarations
    timer_list: Remove unused function pointer typedef
    timers: Adjust a kernel-doc comment
    tick: Prefer a lower rating device only if it's CPU local device
    clocksource: Remove kthread
    time: Change nanosleep to safe __kernel_* types
    time: Change types to new y2038 safe __kernel_* types
    time: Fix get_timespec64() for y2038 safe compat interfaces
    time: Add new y2038 safe __kernel_timespec
    posix-timers: Make compat syscalls depend on CONFIG_COMPAT_32BIT_TIME
    time: Introduce CONFIG_COMPAT_32BIT_TIME
    time: Introduce CONFIG_64BIT_TIME in architectures
    compat: Enable compat_get/put_timespec64 always
    ...

    Linus Torvalds
     

07 May, 2018

1 commit

  • This was used by the ide, scsi and networking code in the past to
    determine if they should bounce payloads. Now that the dma mapping
    always have to support dma to all physical memory (thanks to swiotlb
    for non-iommu systems) there is no need to this crude hack any more.

    Signed-off-by: Christoph Hellwig
    Acked-by: Palmer Dabbelt (for riscv)
    Reviewed-by: Jens Axboe

    Christoph Hellwig
     

19 Apr, 2018

1 commit

  • We have a couple of files that try to include asm/compat.h on
    architectures where this is available. Those should generally use the
    higher-level linux/compat.h file, but that in turn fails to include
    asm/compat.h when CONFIG_COMPAT is disabled, unless we can provide
    that header on all architectures.

    This adds the asm/compat.h for all remaining architectures to
    simplify the dependencies.

    Architectures that are getting removed in linux-4.17 are not changed
    here, to avoid needless conflicts with the removal patches. Those
    architectures are broken by this patch, but we have already shown
    that they have no users.

    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     

23 Mar, 2018

1 commit

  • A bugfix I did earlier caused a build regression on h8300, which defines
    the __BIG_ENDIAN macro in a slightly different way than the generic
    code:

    arch/h8300/include/asm/byteorder.h:5:0: warning: "__BIG_ENDIAN" redefined

    We don't need to define it here, as the same macro is already provided
    by the linux/byteorder/big_endian.h, and that version does not conflict.

    While this is a v4.16 regression, my earlier patch also got backported
    to the 4.14 and 4.15 stable kernels, so we need the fixup there as well.

    Link: http://lkml.kernel.org/r/20180313120752.2645129-1-arnd@arndb.de
    Fixes: 101110f6271c ("Kbuild: always define endianess in kconfig.h")
    Signed-off-by: Arnd Bergmann
    Cc: Yoshinori Sato
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     

02 Feb, 2018

1 commit

  • Pull clk updates from Stephen Boyd:
    "The core framework has a handful of patches this time around, mostly
    due to the clk rate protection support added by Jerome Brunet.

    This feature will allow consumers to lock in a certain rate on the
    output of a clk so that things like audio playback don't hear pops
    when the clk frequency changes due to shared parent clks changing
    rates. Currently the clk API doesn't guarantee the rate of a clk stays
    at the rate you request after clk_set_rate() is called, so this new
    API will allow drivers to express that requirement.

    Beyond this, the core got some debugfs pretty printing patches and a
    couple minor non-critical fixes.

    Looking outside of the core framework diff we have some new driver
    additions and the removal of a legacy TI clk driver. Both of these hit
    high in the dirstat. Also, the removal of the asm-generic/clkdev.h
    file causes small one-liners in all the architecture Kbuild files.

    Overall, the driver diff seems to be the normal stuff that comes all
    the time to fix little problems here and there and to support new
    hardware.

    Summary:

    Core:
    - Clk rate protection
    - Symbolic clk flags in debugfs output
    - Clk registration enabled clks while doing bookkeeping updates

    New Drivers:
    - Spreadtrum SC9860
    - HiSilicon hi3660 stub
    - Qualcomm A53 PLL, SPMI clkdiv, and MSM8916 APCS
    - Amlogic Meson-AXG
    - ASPEED BMC

    Removed Drivers:
    - TI OMAP 3xxx legacy clk (non-DT) support
    - asm*/clkdev.h got removed (not really a driver)

    Updates:
    - Renesas FDP1-0 module clock on R-Car M3-W
    - Renesas LVDS module clock on R-Car V3M
    - Misc fixes to pr_err() prints
    - Qualcomm MSM8916 audio fixes
    - Qualcomm IPQ8074 rounded out support for more peripherals
    - Qualcomm Alpha PLL variants
    - Divider code was using container_of() on bad pointers
    - Allwinner DE2 clks on H3
    - Amlogic minor data fixes and dropping of CLK_IGNORE_UNUSED
    - Mediatek clk driver compile test support
    - AT91 PMC clk suspend/resume restoration support
    - PLL issues fixed on si5351
    - Broadcom IProc PLL calculation updates
    - DVFS support for Armada mvebu CPU clks
    - Allwinner fixed post-divider support
    - TI clkctrl fixes and support for newer SoCs"

    * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (125 commits)
    clk: aspeed: Handle inverse polarity of USB port 1 clock gate
    clk: aspeed: Fix return value check in aspeed_cc_init()
    clk: aspeed: Add reset controller
    clk: aspeed: Register gated clocks
    clk: aspeed: Add platform driver and register PLLs
    clk: aspeed: Register core clocks
    clk: Add clock driver for ASPEED BMC SoCs
    clk: mediatek: adjust dependency of reset.c to avoid unexpectedly being built
    clk: fix reentrancy of clk_enable() on UP systems
    clk: meson-axg: fix potential NULL dereference in axg_clkc_probe()
    clk: Simplify debugfs registration
    clk: Fix debugfs_create_*() usage
    clk: Show symbolic clock flags in debugfs
    clk: renesas: r8a7796: Add FDP clock
    clk: Move __clk_{get,put}() into private clk.h API
    clk: sunxi: Use CLK_IS_CRITICAL flag for critical clks
    clk: Improve flags doc for of_clk_detect_critical()
    arch: Remove clkdev.h asm-generic from Kbuild
    clk: sunxi-ng: a83t: Add M divider to TCON1 clock
    clk: Prepare to remove asm-generic/clkdev.h
    ...

    Linus Torvalds
     

01 Feb, 2018

1 commit

  • Pull dma mapping updates from Christoph Hellwig:
    "Except for a runtime warning fix from Christian this is all about
    consolidation of the generic no-IOMMU code, a well as the glue code
    for swiotlb.

    All the code is based on the x86 implementation with hooks to allow
    all architectures that aren't cache coherent to use it.

    The x86 conversion itself has been deferred because the x86
    maintainers were a little busy in the last months"

    * tag 'dma-mapping-4.16' of git://git.infradead.org/users/hch/dma-mapping: (57 commits)
    MAINTAINERS: add the iommu list for swiotlb and xen-swiotlb
    arm64: use swiotlb_alloc and swiotlb_free
    arm64: replace ZONE_DMA with ZONE_DMA32
    mips: use swiotlb_{alloc,free}
    mips/netlogic: remove swiotlb support
    tile: use generic swiotlb_ops
    tile: replace ZONE_DMA with ZONE_DMA32
    unicore32: use generic swiotlb_ops
    ia64: remove an ifdef around the content of pci-dma.c
    ia64: clean up swiotlb support
    ia64: use generic swiotlb_ops
    ia64: replace ZONE_DMA with ZONE_DMA32
    swiotlb: remove various exports
    swiotlb: refactor coherent buffer allocation
    swiotlb: refactor coherent buffer freeing
    swiotlb: wire up ->dma_supported in swiotlb_dma_ops
    swiotlb: add common swiotlb_map_ops
    swiotlb: rename swiotlb_free to swiotlb_exit
    x86: rename swiotlb_dma_ops
    powerpc: rename swiotlb_dma_ops
    ...

    Linus Torvalds
     

15 Jan, 2018

2 commits


10 Jan, 2018

1 commit

  • Construct the init thread stack in the linker script rather than doing it
    by means of a union so that ia64's init_task.c can be got rid of.

    The following symbols are then made available from INIT_TASK_DATA() linker
    script macro:

    init_thread_union
    init_stack

    INIT_TASK_DATA() also expands the region to THREAD_SIZE to accommodate the
    size of the init stack. init_thread_union is given its own section so that
    it can be placed into the stack space in the right order. I'm assuming
    that the ia64 ordering is correct and that the task_struct is first and the
    thread_info second.

    Signed-off-by: David Howells
    Tested-by: Tony Luck
    Tested-by: Will Deacon (arm64)
    Tested-by: Palmer Dabbelt
    Acked-by: Thomas Gleixner

    David Howells
     

04 Jan, 2018

1 commit


05 Dec, 2017

1 commit

  • Commit 0515e5999a466dfe ("bpf: introduce BPF_PROG_TYPE_PERF_EVENT
    program type") introduced the bpf_perf_event_data structure which
    exports the pt_regs structure. This is OK for multiple architectures
    but fail for s390 and arm64 which do not export pt_regs. Programs
    using them, for example, the bpf selftest fail to compile on these
    architectures.

    For s390, exporting the pt_regs is not an option because s390 wants
    to allow changes to it. For arm64, there is a user_pt_regs structure
    that covers parts of the pt_regs structure for use by user space.

    To solve the broken uapi for s390 and arm64, introduce an abstract
    type for pt_regs and add an asm/bpf_perf_event.h file that concretes
    the type. An asm-generic header file covers the architectures that
    export pt_regs today.

    The arch-specific enablement for s390 and arm64 follows in separate
    commits.

    Reported-by: Thomas Richter
    Fixes: 0515e5999a466dfe ("bpf: introduce BPF_PROG_TYPE_PERF_EVENT program type")
    Signed-off-by: Hendrik Brueckner
    Reviewed-and-tested-by: Thomas Richter
    Acked-by: Alexei Starovoitov
    Cc: Arnaldo Carvalho de Melo
    Cc: Peter Zijlstra
    Cc: Ingo Molnar
    Cc: Alexander Shishkin
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Arnd Bergmann
    Cc: Daniel Borkmann
    Signed-off-by: Daniel Borkmann

    Hendrik Brueckner
     

16 Nov, 2017

1 commit

  • empty_bad_page() and empty_bad_pte_table() seem to be relics from old
    days which is not used by any code for a long time. I have tried to
    find when exactly but this is not really all that straightforward due to
    many code movements - traces disappear around 2.4 times.

    Anyway no code really references neither empty_bad_page nor
    empty_bad_pte_table. We only allocate the storage which is not used by
    anybody so remove them.

    Link: http://lkml.kernel.org/r/20171004150045.30755-1-mhocko@kernel.org
    Signed-off-by: Michal Hocko
    Acked-by: Ralf Baechle
    Acked-by: Ingo Molnar
    Cc: Yoshinori Sato
    Cc: David Howells
    Cc: Rich Felker
    Cc: Jeff Dike
    Cc: Richard Weinberger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michal Hocko
     

15 Nov, 2017

1 commit

  • Pull DeviceTree updates from Rob Herring:
    "A bigger diffstat than usual with the kbuild changes and a tree wide
    fix in the binding documentation.

    Summary:

    - kbuild cleanups and improvements for dtbs

    - Code clean-up of overlay code and fixing for some long standing
    memory leak and race condition in applying overlays

    - Improvements to DT memory usage making sysfs/kobjects optional and
    skipping unflattening of disabled nodes. This is part of kernel
    tinification efforts.

    - Final piece of removing storing the full path for every DT node.
    The prerequisite conversion of printk's to use device_node format
    specifier happened in 4.14.

    - Sync with current upstream dtc. This brings additional checks to
    dtb compiling.

    - Binding doc tree wide removal of leading 0s from examples

    - RTC binding documentation adding missing devices and some
    consolidation of duplicated bindings

    - Vendor prefix documentation for nutsboard, Silicon Storage
    Technology, shimafuji, Tecon Microprocessor Technologies, DH
    electronics GmbH, Opal Kelly, and Next Thing"

    * tag 'devicetree-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (55 commits)
    dt-bindings: usb: add #phy-cells to usb-nop-xceiv
    dt-bindings: Remove leading zeros from bindings notation
    kbuild: handle dtb-y and CONFIG_OF_ALL_DTBS natively in Makefile.lib
    MIPS: dts: remove bogus bcm96358nb4ser.dtb from dtb-y entry
    kbuild: clean up *.dtb and *.dtb.S patterns from top-level Makefile
    .gitignore: move *.dtb and *.dtb.S patterns to the top-level .gitignore
    .gitignore: sort normal pattern rules alphabetically
    dt-bindings: add vendor prefix for Next Thing Co.
    scripts/dtc: Update to upstream version v1.4.5-6-gc1e55a5513e9
    of: dynamic: fix memory leak related to properties of __of_node_dup
    of: overlay: make pr_err() string unique
    of: overlay: pr_err from return NOTIFY_OK to overlay apply/remove
    of: overlay: remove unneeded check for NULL kbasename()
    of: overlay: remove a dependency on device node full_name
    of: overlay: simplify applying symbols from an overlay
    of: overlay: avoid race condition between applying multiple overlays
    of: overlay: loosen overly strict phandle clash check
    of: overlay: expand check of whether overlay changeset can be removed
    of: overlay: detect cases where device tree may become corrupt
    of: overlay: minor restructuring
    ...

    Linus Torvalds
     

10 Nov, 2017

1 commit

  • If CONFIG_OF_ALL_DTBS is enabled, "make ARCH=arm64 dtbs" compiles each
    DTB twice; one from arch/arm64/boot/dts/*/Makefile and the other from
    the dtb-$(CONFIG_OF_ALL_DTBS) line in arch/arm64/boot/dts/Makefile.
    It could be a race problem when building DTBS in parallel.

    Another minor issue is CONFIG_OF_ALL_DTBS covers only *.dts in vendor
    sub-directories, so this broke when Broadcom added one more hierarchy
    in arch/arm64/boot/dts/broadcom//.

    One idea to fix the issues in a clean way is to move DTB handling
    to Kbuild core scripts. Makefile.dtbinst already recognizes dtb-y
    natively, so it should not hurt to do so.

    Add $(dtb-y) to extra-y, and $(dtb-) as well if CONFIG_OF_ALL_DTBS is
    enabled. All clutter things in Makefiles go away.

    As a bonus clean-up, I also removed dts-dirs. Just use subdir-y
    directly to traverse sub-directories.

    Signed-off-by: Masahiro Yamada
    Acked-by: Arnd Bergmann
    [robh: corrected BUILTIN_DTB to CONFIG_BUILTIN_DTB]
    Signed-off-by: Rob Herring

    Masahiro Yamada
     

09 Nov, 2017

1 commit


02 Nov, 2017

1 commit

  • Many user space API headers are missing licensing information, which
    makes it hard for compliance tools to determine the correct license.

    By default are files without license information under the default
    license of the kernel, which is GPLV2. Marking them GPLV2 would exclude
    them from being included in non GPLV2 code, which is obviously not
    intended. The user space API headers fall under the syscall exception
    which is in the kernels COPYING file:

    NOTE! This copyright does *not* cover user programs that use kernel
    services by normal system calls - this is merely considered normal use
    of the kernel, and does *not* fall under the heading of "derived work".

    otherwise syscall usage would not be possible.

    Update the files which contain no license information with an SPDX
    license identifier. The chosen identifier is 'GPL-2.0 WITH
    Linux-syscall-note' which is the officially assigned identifier for the
    Linux syscall exception. SPDX license identifiers are 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. See the previous patch in this series for the
    methodology of how this patch was researched.

    Reviewed-by: Kate Stewart
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman