15 Jun, 2018

2 commits

  • Hexagon arch does not seem to have subscribed to _HAVE_COLOR_ZERO_PAGE
    framework. Hence zero_page_mask variable is not needed.

    Link: http://lkml.kernel.org/r/20180517061105.30447-1-khandual@linux.vnet.ibm.com
    Signed-off-by: Anshuman Khandual
    Reviewed-by: Andrew Morton
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anshuman Khandual
     
  • Fix printk format warning in hexagon/kernel/setup.c:

    ../arch/hexagon/kernel/setup.c: In function 'setup_arch':
    ../arch/hexagon/kernel/setup.c:69:2: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'long unsigned int' [-Wformat]

    where:
    extern unsigned long __phys_offset;
    #define PHYS_OFFSET __phys_offset

    Link: http://lkml.kernel.org/r/adce8db5-4b01-dc10-7fbb-6a64e0787eb5@infradead.org
    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

05 Jun, 2018

2 commits

  • 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
     
  • …iederm/user-namespace

    Pull siginfo updates from Eric Biederman:
    "This set of changes close the known issues with setting si_code to an
    invalid value, and with not fully initializing struct siginfo. There
    remains work to do on nds32, arc, unicore32, powerpc, arm, arm64, ia64
    and x86 to get the code that generates siginfo into a simpler and more
    maintainable state. Most of that work involves refactoring the signal
    handling code and thus careful code review.

    Also not included is the work to shrink the in kernel version of
    struct siginfo. That depends on getting the number of places that
    directly manipulate struct siginfo under control, as it requires the
    introduction of struct kernel_siginfo for the in kernel things.

    Overall this set of changes looks like it is making good progress, and
    with a little luck I will be wrapping up the siginfo work next
    development cycle"

    * 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: (46 commits)
    signal/sh: Stop gcc warning about an impossible case in do_divide_error
    signal/mips: Report FPE_FLTUNK for undiagnosed floating point exceptions
    signal/um: More carefully relay signals in relay_signal.
    signal: Extend siginfo_layout with SIL_FAULT_{MCEERR|BNDERR|PKUERR}
    signal: Remove unncessary #ifdef SEGV_PKUERR in 32bit compat code
    signal/signalfd: Add support for SIGSYS
    signal/signalfd: Remove __put_user from signalfd_copyinfo
    signal/xtensa: Use force_sig_fault where appropriate
    signal/xtensa: Consistenly use SIGBUS in do_unaligned_user
    signal/um: Use force_sig_fault where appropriate
    signal/sparc: Use force_sig_fault where appropriate
    signal/sparc: Use send_sig_fault where appropriate
    signal/sh: Use force_sig_fault where appropriate
    signal/s390: Use force_sig_fault where appropriate
    signal/riscv: Replace do_trap_siginfo with force_sig_fault
    signal/riscv: Use force_sig_fault where appropriate
    signal/parisc: Use force_sig_fault where appropriate
    signal/parisc: Use force_sig_mceerr where appropriate
    signal/openrisc: Use force_sig_fault where appropriate
    signal/nios2: Use force_sig_fault where appropriate
    ...

    Linus Torvalds
     

09 May, 2018

1 commit


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
     

02 May, 2018

2 commits

  • This is needed to link ipv6 as a loadable module, which in turn happens
    in allmodconfig.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Richard Kuo

    Arnd Bergmann
     
  • We already have memcpy_toio(), but not memset_io(), so let's
    add the obvious version to allow building an allmodconfig kernel
    without errors like

    drivers/gpu/drm/ttm/ttm_bo_util.c: In function 'ttm_bo_move_memcpy':
    drivers/gpu/drm/ttm/ttm_bo_util.c:390:3: error: implicit declaration of function 'memset_io' [-Werror=implicit-function-declaration]

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Richard Kuo

    Arnd Bergmann
     

25 Apr, 2018

2 commits

  • Filling in struct siginfo before calling force_sig_info a tedious and
    error prone process, where once in a great while the wrong fields
    are filled out, and siginfo has been inconsistently cleared.

    Simplify this process by using the helper force_sig_fault. Which
    takes as a parameters all of the information it needs, ensures
    all of the fiddly bits of filling in struct siginfo are done properly
    and then calls force_sig_info.

    In short about a 5 line reduction in code for every time force_sig_info
    is called, which makes the calling function clearer.

    Cc: Richard Kuo
    Cc: linux-hexagon@vger.kernel.org
    Signed-off-by: "Eric W. Biederman"

    Eric W. Biederman
     
  • Call clear_siginfo to ensure every stack allocated siginfo is properly
    initialized before being passed to the signal sending functions.

    Note: It is not safe to depend on C initializers to initialize struct
    siginfo on the stack because C is allowed to skip holes when
    initializing a structure.

    The initialization of struct siginfo in tracehook_report_syscall_exit
    was moved from the helper user_single_step_siginfo into
    tracehook_report_syscall_exit itself, to make it clear that the local
    variable siginfo gets fully initialized.

    In a few cases the scope of struct siginfo has been reduced to make it
    clear that siginfo siginfo is not used on other paths in the function
    in which it is declared.

    Instances of using memset to initialize siginfo have been replaced
    with calls clear_siginfo for clarity.

    Signed-off-by: "Eric W. Biederman"

    Eric W. Biederman
     

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
     

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
     

10 Jan, 2018

3 commits

  • Signed-off-by: Christoph Hellwig
    Acked-by: Richard Kuo

    Christoph Hellwig
     
  • 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
     
  • Make THREAD_SIZE available to vmlinux.lds on hexagon by including
    asm/thread_info.h the linker script.

    This allows init_stack to be allocated in the linker script in a subsequent
    patch.

    Reported-by: Guenter Roeck
    Signed-off-by: David Howells
    Reviewed-by: Guenter Roeck
    Acked-by: Richard Kuo
    cc: linux-hexagon@vger.kernel.org

    David Howells
     

09 Jan, 2018

1 commit


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
     

18 Nov, 2017

1 commit

  • Pull Kbuild updates from Masahiro Yamada:
    "One of the most remarkable improvements in this cycle is, Kbuild is
    now able to cache the result of shell commands. Some variables are
    expensive to compute, for example, $(call cc-option,...) invokes the
    compiler. It is not efficient to redo this computation every time,
    even when we are not actually building anything. Kbuild creates a
    hidden file ".cache.mk" that contains invoked shell commands and their
    results. The speed-up should be noticeable.

    Summary:

    - Fix arch build issues (hexagon, sh)

    - Clean up various Makefiles and scripts

    - Fix wrong usage of {CFLAGS,LDFLAGS}_MODULE in arch Makefiles

    - Cache variables that are expensive to compute

    - Improve cc-ldopton and ld-option for Clang

    - Optimize output directory creation"

    * tag 'kbuild-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (30 commits)
    kbuild: move coccicheck help from scripts/Makefile.help to top Makefile
    sh: decompressor: add shipped files to .gitignore
    frv: .gitignore: ignore vmlinux.lds
    selinux: remove unnecessary assignment to subdir-
    kbuild: specify FORCE in Makefile.headersinst as .PHONY target
    kbuild: remove redundant mkdir from ./Kbuild
    kbuild: optimize object directory creation for incremental build
    kbuild: create object directories simpler and faster
    kbuild: filter-out PHONY targets from "targets"
    kbuild: remove redundant $(wildcard ...) for cmd_files calculation
    kbuild: create directory for make cache only when necessary
    sh: select KBUILD_DEFCONFIG depending on ARCH
    kbuild: fix linker feature test macros when cross compiling with Clang
    kbuild: shrink .cache.mk when it exceeds 1000 lines
    kbuild: do not call cc-option before KBUILD_CFLAGS initialization
    kbuild: Cache a few more calls to the compiler
    kbuild: Add a cache for generated variables
    kbuild: add forward declaration of default target to Makefile.asm-generic
    kbuild: remove KBUILD_SUBDIR_ASFLAGS and KBUILD_SUBDIR_CCFLAGS
    hexagon/kbuild: replace CFLAGS_MODULE with KBUILD_CFLAGS_MODULE
    ...

    Linus Torvalds
     

15 Nov, 2017

1 commit

  • Pull dma-mapping updates from Christoph Hellwig:

    - turn dma_cache_sync into a dma_map_ops instance and remove
    implementation that purely are dead because the architecture doesn't
    support noncoherent allocations

    - add a flag for busses that need DMA configuration (Robin Murphy)

    * tag 'dma-mapping-4.15' of git://git.infradead.org/users/hch/dma-mapping:
    dma-mapping: turn dma_cache_sync into a dma_map_ops method
    sh: make dma_cache_sync a no-op
    xtensa: make dma_cache_sync a no-op
    unicore32: make dma_cache_sync a no-op
    powerpc: make dma_cache_sync a no-op
    mn10300: make dma_cache_sync a no-op
    microblaze: make dma_cache_sync a no-op
    ia64: make dma_cache_sync a no-op
    frv: make dma_cache_sync a no-op
    x86: make dma_cache_sync a no-op
    floppy: consolidate the dummy fd_cacheflush definition
    drivers: flag buses which demand DMA configuration

    Linus Torvalds
     

07 Nov, 2017

1 commit


02 Nov, 2017

3 commits

  • Many user space API headers have licensing information, which is either
    incomplete, badly formatted or just a shorthand for referring to the
    license under which the file is supposed to be. This makes it hard for
    compliance tools to determine the correct license.

    Update these files with an SPDX license identifier. The identifier was
    chosen based on the license information in the file.

    GPL/LGPL licensed headers get the matching GPL/LGPL SPDX license
    identifier with the added 'WITH Linux-syscall-note' exception, which is
    the officially assigned exception identifier for the kernel syscall
    exception:

    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".

    This exception makes it possible to include GPL headers into non GPL
    code, without confusing license compliance tools.

    Headers which have either explicit dual licensing or are just licensed
    under a non GPL license are updated with the corresponding SPDX
    identifier and the GPLv2 with syscall exception identifier. The format
    is:
    ((GPL-2.0 WITH Linux-syscall-note) OR SPDX-ID-OF-OTHER-LICENSE)

    SPDX license identifiers are a legally binding shorthand, which can be
    used instead of the full boiler plate text. The update does not remove
    existing license information as this has to be done on a case by case
    basis and the copyright holders might have to be consulted. This will
    happen in a separate step.

    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
     
  • 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
     
  • 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
     

30 Oct, 2017

1 commit

  • As kbuild document & commit 6588169d51 says: KBUILD_CFLAGS_MODULE is
    used to add arch-specific options for $(CC). From commandline,
    CFLAGS_MODULE shall be used.
    Doesn't have any functional change, but just follow kbuild rules.

    Signed-off-by: Cao jin
    CC: linux-hexagon@vger.kernel.org
    Acked-by: Richard Kuo
    Signed-off-by: Masahiro Yamada

    Cao jin
     

19 Oct, 2017

1 commit

  • After we removed all the dead wood it turns out only two architectures
    actually implement dma_cache_sync as a real op: mips and parisc. Add
    a cache_sync method to struct dma_map_ops and implement it for the
    mips defualt DMA ops, and the parisc pa11 ops.

    Note that arm, arc and openrisc support DMA_ATTR_NON_CONSISTENT, but
    never provided a functional dma_cache_sync implementations, which
    seems somewhat odd.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Robin Murphy

    Christoph Hellwig
     

10 Oct, 2017

2 commits

  • The arch_{read,spin,write}_lock_flags() macros are simply mapped to the
    non-flags versions by the majority of architectures, so do this in core
    code and remove the dummy implementations. Also remove the implementation
    in spinlock_up.h, since all callers of do_raw_spin_lock_flags() call
    local_irq_save(flags) anyway.

    Signed-off-by: Will Deacon
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: paulmck@linux.vnet.ibm.com
    Link: http://lkml.kernel.org/r/1507055129-12300-4-git-send-email-will.deacon@arm.com
    Signed-off-by: Ingo Molnar

    Will Deacon
     
  • Outside of the locking code itself, {read,spin,write}_can_lock() have no
    users in tree. Apparmor (the last remaining user of write_can_lock()) got
    moved over to lockdep by the previous patch.

    This patch removes the use of {read,spin,write}_can_lock() from the
    BUILD_LOCK_OPS macro, deferring to the trylock operation for testing the
    lock status, and subsequently removes the unused macros altogether. They
    aren't guaranteed to work in a concurrent environment and can give
    incorrect results in the case of qrwlock.

    Signed-off-by: Will Deacon
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: paulmck@linux.vnet.ibm.com
    Link: http://lkml.kernel.org/r/1507055129-12300-2-git-send-email-will.deacon@arm.com
    Signed-off-by: Ingo Molnar

    Will Deacon
     

09 Oct, 2017

1 commit

  • is created (or updated) when Kbuild descends
    into the init/ directory. In parallel building from a pristine
    source tree, there is no guarantee exists when
    arch/hexagon/kernel/ptrace.c is compiled.

    For hexagon architecture, we know UTS_MACHINE is a fixed string
    "hexagon", so let's hard-code it, like many architectures do.

    Signed-off-by: Masahiro Yamada
    Acked-by: Richard Kuo

    Masahiro Yamada
     

05 Sep, 2017

1 commit

  • Pull locking updates from Ingo Molnar:

    - Add 'cross-release' support to lockdep, which allows APIs like
    completions, where it's not the 'owner' who releases the lock, to be
    tracked. It's all activated automatically under
    CONFIG_PROVE_LOCKING=y.

    - Clean up (restructure) the x86 atomics op implementation to be more
    readable, in preparation of KASAN annotations. (Dmitry Vyukov)

    - Fix static keys (Paolo Bonzini)

    - Add killable versions of down_read() et al (Kirill Tkhai)

    - Rework and fix jump_label locking (Marc Zyngier, Paolo Bonzini)

    - Rework (and fix) tlb_flush_pending() barriers (Peter Zijlstra)

    - Remove smp_mb__before_spinlock() and convert its usages, introduce
    smp_mb__after_spinlock() (Peter Zijlstra)

    * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (56 commits)
    locking/lockdep/selftests: Fix mixed read-write ABBA tests
    sched/completion: Avoid unnecessary stack allocation for COMPLETION_INITIALIZER_ONSTACK()
    acpi/nfit: Fix COMPLETION_INITIALIZER_ONSTACK() abuse
    locking/pvqspinlock: Relax cmpxchg's to improve performance on some architectures
    smp: Avoid using two cache lines for struct call_single_data
    locking/lockdep: Untangle xhlock history save/restore from task independence
    locking/refcounts, x86/asm: Disable CONFIG_ARCH_HAS_REFCOUNT for the time being
    futex: Remove duplicated code and fix undefined behaviour
    Documentation/locking/atomic: Finish the document...
    locking/lockdep: Fix workqueue crossrelease annotation
    workqueue/lockdep: 'Fix' flush_work() annotation
    locking/lockdep/selftests: Add mixed read-write ABBA tests
    mm, locking/barriers: Clarify tlb_flush_pending() barriers
    locking/lockdep: Make CONFIG_LOCKDEP_CROSSRELEASE and CONFIG_LOCKDEP_COMPLETIONS truly non-interactive
    locking/lockdep: Explicitly initialize wq_barrier::done::map
    locking/lockdep: Rename CONFIG_LOCKDEP_COMPLETE to CONFIG_LOCKDEP_COMPLETIONS
    locking/lockdep: Reword title of LOCKDEP_CROSSRELEASE config
    locking/lockdep: Make CONFIG_LOCKDEP_CROSSRELEASE part of CONFIG_PROVE_LOCKING
    locking/refcounts, x86/asm: Implement fast refcount overflow protection
    locking/lockdep: Fix the rollback and overwrite detection logic in crossrelease
    ...

    Linus Torvalds
     

26 Aug, 2017

1 commit

  • There is code duplicated over all architecture's headers for
    futex_atomic_op_inuser. Namely op decoding, access_ok check for uaddr,
    and comparison of the result.

    Remove this duplication and leave up to the arches only the needed
    assembly which is now in arch_futex_atomic_op_inuser.

    This effectively distributes the Will Deacon's arm64 fix for undefined
    behaviour reported by UBSAN to all architectures. The fix was done in
    commit 5f16a046f8e1 (arm64: futex: Fix undefined behaviour with
    FUTEX_OP_OPARG_SHIFT usage). Look there for an example dump.

    And as suggested by Thomas, check for negative oparg too, because it was
    also reported to cause undefined behaviour report.

    Note that s390 removed access_ok check in d12a29703 ("s390/uaccess:
    remove pointless access_ok() checks") as access_ok there returns true.
    We introduce it back to the helper for the sake of simplicity (it gets
    optimized away anyway).

    Signed-off-by: Jiri Slaby
    Signed-off-by: Thomas Gleixner
    Acked-by: Russell King
    Acked-by: Michael Ellerman (powerpc)
    Acked-by: Heiko Carstens [s390]
    Acked-by: Chris Metcalf [for tile]
    Reviewed-by: Darren Hart (VMware)
    Reviewed-by: Will Deacon [core/arm64]
    Cc: linux-mips@linux-mips.org
    Cc: Rich Felker
    Cc: linux-ia64@vger.kernel.org
    Cc: linux-sh@vger.kernel.org
    Cc: peterz@infradead.org
    Cc: Benjamin Herrenschmidt
    Cc: Max Filippov
    Cc: Paul Mackerras
    Cc: sparclinux@vger.kernel.org
    Cc: Jonas Bonn
    Cc: linux-s390@vger.kernel.org
    Cc: linux-arch@vger.kernel.org
    Cc: Yoshinori Sato
    Cc: linux-hexagon@vger.kernel.org
    Cc: Helge Deller
    Cc: "James E.J. Bottomley"
    Cc: Catalin Marinas
    Cc: Matt Turner
    Cc: linux-snps-arc@lists.infradead.org
    Cc: Fenghua Yu
    Cc: Arnd Bergmann
    Cc: linux-xtensa@linux-xtensa.org
    Cc: Stefan Kristiansson
    Cc: openrisc@lists.librecores.org
    Cc: Ivan Kokshaysky
    Cc: Stafford Horne
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Richard Henderson
    Cc: Chris Zankel
    Cc: Michal Simek
    Cc: Tony Luck
    Cc: linux-parisc@vger.kernel.org
    Cc: Vineet Gupta
    Cc: Ralf Baechle
    Cc: Richard Kuo
    Cc: linux-alpha@vger.kernel.org
    Cc: Martin Schwidefsky
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: "David S. Miller"
    Link: http://lkml.kernel.org/r/20170824073105.3901-1-jslaby@suse.cz

    Jiri Slaby
     

17 Aug, 2017

1 commit

  • There is no agreed-upon definition of spin_unlock_wait()'s semantics,
    and it appears that all callers could do just as well with a lock/unlock
    pair. This commit therefore removes the underlying arch-specific
    arch_spin_unlock_wait() for all architectures providing them.

    Signed-off-by: Paul E. McKenney
    Cc:
    Cc: Peter Zijlstra
    Cc: Alan Stern
    Cc: Andrea Parri
    Cc: Linus Torvalds
    Acked-by: Will Deacon
    Acked-by: Boqun Feng

    Paul E. McKenney
     

10 Aug, 2017

1 commit

  • Those architectures that have a special atomic_set implementation also
    need a special atomic_set_release(), because for the very same reason
    WRITE_ONCE() is broken for them, smp_store_release() is too.

    The vast majority is architectures that have spinlock hash based atomic
    implementation except hexagon which seems to have a hardware 'feature'.

    The spinlock based atomics should be SC, that is, none of them appear to
    place extra barriers in atomic_cmpxchg() or any of the other SC atomic
    primitives and therefore seem to rely on their spinlock implementation
    being SC (I did not fully validate all that).

    Therefore, the normal atomic_set() is SC and can be used at
    atomic_set_release().

    Signed-off-by: Peter Zijlstra (Intel)
    Acked-by: Chris Metcalf [for tile]
    Cc: Boqun Feng
    Cc: Linus Torvalds
    Cc: Paul McKenney
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: Will Deacon
    Cc: davem@davemloft.net
    Cc: james.hogan@imgtec.com
    Cc: jejb@parisc-linux.org
    Cc: rkuo@codeaurora.org
    Cc: vgupta@synopsys.com
    Link: http://lkml.kernel.org/r/20170609110506.yod47flaav3wgoj5@hirez.programming.kicks-ass.net
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

10 Jul, 2017

1 commit

  • Since commit fcc8487d477a ("uapi: export all headers under uapi
    directories"), all (and only) headers under uapi directories are
    exported, but asm-generic wrappers are still exceptions.

    To complete de-coupling the uapi from kernel headers, move generic-y
    of exported headers to uapi/asm/Kbuild.

    With this change, "make headers_install" will just need to parse
    uapi/asm/Kbuild to build up exported headers.

    Also, move "generic-y += kprobes.h" up in order to keep the entries
    sorted.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

07 Jul, 2017

3 commits

  • Merge misc updates from Andrew Morton:

    - a few hotfixes

    - various misc updates

    - ocfs2 updates

    - most of MM

    * emailed patches from Andrew Morton : (108 commits)
    mm, memory_hotplug: move movable_node to the hotplug proper
    mm, memory_hotplug: drop CONFIG_MOVABLE_NODE
    mm, memory_hotplug: drop artificial restriction on online/offline
    mm: memcontrol: account slab stats per lruvec
    mm: memcontrol: per-lruvec stats infrastructure
    mm: memcontrol: use generic mod_memcg_page_state for kmem pages
    mm: memcontrol: use the node-native slab memory counters
    mm: vmstat: move slab statistics from zone to node counters
    mm/zswap.c: delete an error message for a failed memory allocation in zswap_dstmem_prepare()
    mm/zswap.c: improve a size determination in zswap_frontswap_init()
    mm/zswap.c: delete an error message for a failed memory allocation in zswap_pool_create()
    mm/swapfile.c: sort swap entries before free
    mm/oom_kill: count global and memory cgroup oom kills
    mm: per-cgroup memory reclaim stats
    mm: kmemleak: treat vm_struct as alternative reference to vmalloc'ed objects
    mm: kmemleak: factor object reference updating out of scan_block()
    mm: kmemleak: slightly reduce the size of some structures on 64-bit architectures
    mm, mempolicy: don't check cpuset seqlock where it doesn't matter
    mm, cpuset: always use seqlock when changing task's nodemask
    mm, mempolicy: simplify rebinding mempolicies when updating cpusets
    ...

    Linus Torvalds
     
  • Pull dma-mapping infrastructure from Christoph Hellwig:
    "This is the first pull request for the new dma-mapping subsystem

    In this new subsystem we'll try to properly maintain all the generic
    code related to dma-mapping, and will further consolidate arch code
    into common helpers.

    This pull request contains:

    - removal of the DMA_ERROR_CODE macro, replacing it with calls to
    ->mapping_error so that the dma_map_ops instances are more self
    contained and can be shared across architectures (me)

    - removal of the ->set_dma_mask method, which duplicates the
    ->dma_capable one in terms of functionality, but requires more
    duplicate code.

    - various updates for the coherent dma pool and related arm code
    (Vladimir)

    - various smaller cleanups (me)"

    * tag 'dma-mapping-4.13' of git://git.infradead.org/users/hch/dma-mapping: (56 commits)
    ARM: dma-mapping: Remove traces of NOMMU code
    ARM: NOMMU: Set ARM_DMA_MEM_BUFFERABLE for M-class cpus
    ARM: NOMMU: Introduce dma operations for noMMU
    drivers: dma-mapping: allow dma_common_mmap() for NOMMU
    drivers: dma-coherent: Introduce default DMA pool
    drivers: dma-coherent: Account dma_pfn_offset when used with device tree
    dma: Take into account dma_pfn_offset
    dma-mapping: replace dmam_alloc_noncoherent with dmam_alloc_attrs
    dma-mapping: remove dmam_free_noncoherent
    crypto: qat - avoid an uninitialized variable warning
    au1100fb: remove a bogus dma_free_nonconsistent call
    MAINTAINERS: add entry for dma mapping helpers
    powerpc: merge __dma_set_mask into dma_set_mask
    dma-mapping: remove the set_dma_mask method
    powerpc/cell: use the dma_supported method for ops switching
    powerpc/cell: clean up fixed mapping dma_ops initialization
    tile: remove dma_supported and mapping_error methods
    xen-swiotlb: remove xen_swiotlb_set_dma_mask
    arm: implement ->dma_supported instead of ->set_dma_mask
    mips/loongson64: implement ->dma_supported instead of ->set_dma_mask
    ...

    Linus Torvalds
     
  • lruvecs are at the intersection of the NUMA node and memcg, which is the
    scope for most paging activity.

    Introduce a convenient accounting infrastructure that maintains
    statistics per node, per memcg, and the lruvec itself.

    Then convert over accounting sites for statistics that are already
    tracked in both nodes and memcgs and can be easily switched.

    [hannes@cmpxchg.org: fix crash in the new cgroup stat keeping code]
    Link: http://lkml.kernel.org/r/20170531171450.GA10481@cmpxchg.org
    [hannes@cmpxchg.org: don't track uncharged pages at all
    Link: http://lkml.kernel.org/r/20170605175254.GA8547@cmpxchg.org
    [hannes@cmpxchg.org: add missing free_percpu()]
    Link: http://lkml.kernel.org/r/20170605175354.GB8547@cmpxchg.org
    [linux@roeck-us.net: hexagon: fix build error caused by include file order]
    Link: http://lkml.kernel.org/r/20170617153721.GA4382@roeck-us.net
    Link: http://lkml.kernel.org/r/20170530181724.27197-6-hannes@cmpxchg.org
    Signed-off-by: Johannes Weiner
    Signed-off-by: Guenter Roeck
    Acked-by: Vladimir Davydov
    Cc: Josef Bacik
    Cc: Michal Hocko
    Cc: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     

04 Jul, 2017

1 commit

  • Pull timer updates from Thomas Gleixner:
    "A rather large update for timers/timekeeping:

    - compat syscall consolidation (Al Viro)

    - Posix timer consolidation (Christoph Helwig / Thomas Gleixner)

    - Cleanup of the device tree based initialization for clockevents and
    clocksources (Daniel Lezcano)

    - Consolidation of the FTTMR010 clocksource/event driver (Linus
    Walleij)

    - The usual set of small fixes and updates all over the place"

    * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (93 commits)
    timers: Make the cpu base lock raw
    clocksource/drivers/mips-gic-timer: Fix an error code in 'gic_clocksource_of_init()'
    clocksource/drivers/fsl_ftm_timer: Unmap region obtained by of_iomap
    clocksource/drivers/tcb_clksrc: Make IO endian agnostic
    clocksource/drivers/sun4i: Switch to the timer-of common init
    clocksource/drivers/timer-of: Fix invalid iomap check
    Revert "ktime: Simplify ktime_compare implementation"
    clocksource/drivers: Fix uninitialized variable use in timer_of_init
    kselftests: timers: Add test for frequency step
    kselftests: timers: Fix inconsistency-check to not ignore first timestamp
    time: Add warning about imminent deprecation of CONFIG_GENERIC_TIME_VSYSCALL_OLD
    time: Clean up CLOCK_MONOTONIC_RAW time handling
    posix-cpu-timers: Make timespec to nsec conversion safe
    itimer: Make timeval to nsec conversion range limited
    timers: Fix parameter description of try_to_del_timer_sync()
    ktime: Simplify ktime_compare implementation
    clocksource/drivers/fttmr010: Factor out clock read code
    clocksource/drivers/fttmr010: Implement delay timer
    clocksource/drivers: Add timer-of common init routine
    clocksource/drivers/tcb_clksrc: Save timer context on suspend/resume
    ...

    Linus Torvalds
     

29 Jun, 2017

1 commit

  • The only user of thread_saved_pc() in non-arch-specific code was removed
    in commit 8243d5597793 ("sched/core: Remove pointless printout in
    sched_show_task()"). Remove the implementations as well.

    Some architectures use thread_saved_pc() in their arch-specific code.
    Leave their thread_saved_pc() intact.

    Signed-off-by: Tobias Klauser
    Acked-by: Geert Uytterhoeven
    Cc: Ingo Molnar
    Signed-off-by: Linus Torvalds

    Tobias Klauser