02 Nov, 2017

2 commits

  • 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
     

07 Jul, 2017

1 commit


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
     

04 Jun, 2017

1 commit

  • By moving the kernel side __SI_* defintions right next to the userspace
    ones we can kill the non-uapi versions of include
    include/asm-generic/siginfo.h and untangle the unholy mess of includes.

    [ tglx: Removed uapi/asm/siginfo.h from m32r, microblaze, mn10300 and score ]

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Thomas Gleixner
    Cc: linux-arch@vger.kernel.org
    Cc: Fenghua Yu
    Cc: Tony Luck
    Cc: linux-ia64@vger.kernel.org
    Cc: Arnd Bergmann
    Cc: sparclinux@vger.kernel.org
    Cc: "David S. Miller"
    Link: http://lkml.kernel.org/r/20170603190102.28866-6-hch@lst.de

    Christoph Hellwig
     

16 May, 2017

1 commit


10 May, 2017

1 commit

  • 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 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//include/uapi/asm/Kbuild;
    - arch//include/asm/Kbuild.

    Signed-off-by: Nicolas Dichtel
    Acked-by: Daniel Vetter
    Acked-by: Russell King
    Acked-by: Mark Salter
    Acked-by: Michael Ellerman (powerpc)
    Signed-off-by: Masahiro Yamada

    Nicolas Dichtel
     

02 May, 2017

1 commit

  • Pull timer updates from Thomas Gleixner:
    "The timer departement delivers:

    - more year 2038 rework

    - a massive rework of the arm achitected timer

    - preparatory patches to allow NTP correction of clock event devices
    to avoid early expiry

    - the usual pile of fixes and enhancements all over the place"

    * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (91 commits)
    timer/sysclt: Restrict timer migration sysctl values to 0 and 1
    arm64/arch_timer: Mark errata handlers as __maybe_unused
    Clocksource/mips-gic: Remove redundant non devicetree init
    MIPS/Malta: Probe gic-timer via devicetree
    clocksource: Use GENMASK_ULL in definition of CLOCKSOURCE_MASK
    acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver
    clocksource: arm_arch_timer: add GTDT support for memory-mapped timer
    acpi/arm64: Add memory-mapped timer support in GTDT driver
    clocksource: arm_arch_timer: simplify ACPI support code.
    acpi/arm64: Add GTDT table parse driver
    clocksource: arm_arch_timer: split MMIO timer probing.
    clocksource: arm_arch_timer: add structs to describe MMIO timer
    clocksource: arm_arch_timer: move arch_timer_needs_of_probing into DT init call
    clocksource: arm_arch_timer: refactor arch_timer_needs_probing
    clocksource: arm_arch_timer: split dt-only rate handling
    x86/uv/time: Set ->min_delta_ticks and ->max_delta_ticks
    unicore32/time: Set ->min_delta_ticks and ->max_delta_ticks
    um/time: Set ->min_delta_ticks and ->max_delta_ticks
    tile/time: Set ->min_delta_ticks and ->max_delta_ticks
    score/time: Set ->min_delta_ticks and ->max_delta_ticks
    ...

    Linus Torvalds
     

27 Apr, 2017

2 commits


15 Apr, 2017

1 commit

  • In preparation for making the clockevents core NTP correction aware,
    all clockevent device drivers must set ->min_delta_ticks and
    ->max_delta_ticks rather than ->min_delta_ns and ->max_delta_ns: a
    clockevent device's rate is going to change dynamically and thus, the
    ratio of ns to ticks ceases to stay invariant.

    Make the score arch's clockevent driver initialize these fields properly.

    This patch alone doesn't introduce any change in functionality as the
    clockevents core still looks exclusively at the (untouched) ->min_delta_ns
    and ->max_delta_ns. As soon as this has changed, a followup patch will
    purge the initialization of ->min_delta_ns and ->max_delta_ns from this
    driver.

    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Daniel Lezcano
    Cc: Richard Cochran
    Cc: Prarit Bhargava
    Cc: Stephen Boyd
    Cc: Chen Liqin
    Cc: Lennox Wu
    Signed-off-by: Nicolai Stange
    Signed-off-by: John Stultz

    Nicolai Stange
     

02 Apr, 2017

1 commit


29 Mar, 2017

3 commits


12 Mar, 2017

2 commits

  • Pull extable.h fix from Paul Gortmaker:
    "Fixup for arch/score after extable.h introduction.

    It seems that Guenter is the only one on the planet doing builds for
    arch/score -- we don't have compile coverage for it in linux-next or
    in the kbuild-bot either. Guenter couldn't even recall where he got
    his toolchain, but was kind enough to share it with me so I could
    validate this change and also add arch/score to my build coverage.

    I sat on this a bit in case there was any other fallout in other arch
    dirs, but since this still seems to be the only one, I might as well
    send it on its way"

    * tag 'extable-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
    score: Fix implicit includes now failing build after extable change

    Linus Torvalds
     
  • After changing from module.h to extable.h, score builds fail with:

    arch/score/kernel/traps.c: In function 'do_ri':
    arch/score/kernel/traps.c:248:4: error: implicit declaration of function 'user_disable_single_step'
    arch/score/mm/extable.c: In function 'fixup_exception':
    arch/score/mm/extable.c:32:38: error: dereferencing pointer to incomplete type
    arch/score/mm/extable.c:34:24: error: dereferencing pointer to incomplete type

    because extable.h doesn't drag in the same amount of headers as the
    module.h did. Add in the headers which were implicitly expected.

    Fixes: 90858794c960 ("module.h: remove extable.h include now users have migrated")
    Signed-off-by: Guenter Roeck
    [PG: tweak commit log; refresh for sched header refactoring.]
    Signed-off-by: Paul Gortmaker

    Guenter Roeck
     

10 Mar, 2017

1 commit

  • If an architecture uses 4level-fixup.h we don't need to do anything as
    it includes 5level-fixup.h.

    If an architecture uses pgtable-nop*d.h, define __ARCH_USE_5LEVEL_HACK
    before inclusion of the header. It makes asm-generic code to use
    5level-fixup.h.

    If an architecture has 4-level paging or folds levels on its own,
    include 5level-fixup.h directly.

    Signed-off-by: Kirill A. Shutemov
    Acked-by: Michal Hocko
    Signed-off-by: Linus Torvalds

    Kirill A. Shutemov
     

06 Mar, 2017

2 commits


03 Mar, 2017

1 commit

  • Move the following task->mm helper APIs into a new header file,
    , to further reduce the size and complexity
    of .

    Here are how the APIs are used in various kernel files:

    # mm_alloc():
    arch/arm/mach-rpc/ecard.c
    fs/exec.c
    include/linux/sched/mm.h
    kernel/fork.c

    # __mmdrop():
    arch/arc/include/asm/mmu_context.h
    include/linux/sched/mm.h
    kernel/fork.c

    # mmdrop():
    arch/arm/mach-rpc/ecard.c
    arch/m68k/sun3/mmu_emu.c
    arch/x86/mm/tlb.c
    drivers/gpu/drm/amd/amdkfd/kfd_process.c
    drivers/gpu/drm/i915/i915_gem_userptr.c
    drivers/infiniband/hw/hfi1/file_ops.c
    drivers/vfio/vfio_iommu_spapr_tce.c
    fs/exec.c
    fs/proc/base.c
    fs/proc/task_mmu.c
    fs/proc/task_nommu.c
    fs/userfaultfd.c
    include/linux/mmu_notifier.h
    include/linux/sched/mm.h
    kernel/fork.c
    kernel/futex.c
    kernel/sched/core.c
    mm/khugepaged.c
    mm/ksm.c
    mm/mmu_context.c
    mm/mmu_notifier.c
    mm/oom_kill.c
    virt/kvm/kvm_main.c

    # mmdrop_async_fn():
    include/linux/sched/mm.h

    # mmdrop_async():
    include/linux/sched/mm.h
    kernel/fork.c

    # mmget_not_zero():
    fs/userfaultfd.c
    include/linux/sched/mm.h
    mm/oom_kill.c

    # mmput():
    arch/arc/include/asm/mmu_context.h
    arch/arc/kernel/troubleshoot.c
    arch/frv/mm/mmu-context.c
    arch/powerpc/platforms/cell/spufs/context.c
    arch/sparc/include/asm/mmu_context_32.h
    drivers/android/binder.c
    drivers/gpu/drm/etnaviv/etnaviv_gem.c
    drivers/gpu/drm/i915/i915_gem_userptr.c
    drivers/infiniband/core/umem.c
    drivers/infiniband/core/umem_odp.c
    drivers/infiniband/core/uverbs_main.c
    drivers/infiniband/hw/mlx4/main.c
    drivers/infiniband/hw/mlx5/main.c
    drivers/infiniband/hw/usnic/usnic_uiom.c
    drivers/iommu/amd_iommu_v2.c
    drivers/iommu/intel-svm.c
    drivers/lguest/lguest_user.c
    drivers/misc/cxl/fault.c
    drivers/misc/mic/scif/scif_rma.c
    drivers/oprofile/buffer_sync.c
    drivers/vfio/vfio_iommu_type1.c
    drivers/vhost/vhost.c
    drivers/xen/gntdev.c
    fs/exec.c
    fs/proc/array.c
    fs/proc/base.c
    fs/proc/task_mmu.c
    fs/proc/task_nommu.c
    fs/userfaultfd.c
    include/linux/sched/mm.h
    kernel/cpuset.c
    kernel/events/core.c
    kernel/events/uprobes.c
    kernel/exit.c
    kernel/fork.c
    kernel/ptrace.c
    kernel/sys.c
    kernel/trace/trace_output.c
    kernel/tsacct.c
    mm/memcontrol.c
    mm/memory.c
    mm/mempolicy.c
    mm/migrate.c
    mm/mmu_notifier.c
    mm/nommu.c
    mm/oom_kill.c
    mm/process_vm_access.c
    mm/rmap.c
    mm/swapfile.c
    mm/util.c
    virt/kvm/async_pf.c

    # mmput_async():
    include/linux/sched/mm.h
    kernel/fork.c
    mm/oom_kill.c

    # get_task_mm():
    arch/arc/kernel/troubleshoot.c
    arch/powerpc/platforms/cell/spufs/context.c
    drivers/android/binder.c
    drivers/gpu/drm/etnaviv/etnaviv_gem.c
    drivers/infiniband/core/umem.c
    drivers/infiniband/core/umem_odp.c
    drivers/infiniband/hw/mlx4/main.c
    drivers/infiniband/hw/mlx5/main.c
    drivers/infiniband/hw/usnic/usnic_uiom.c
    drivers/iommu/amd_iommu_v2.c
    drivers/iommu/intel-svm.c
    drivers/lguest/lguest_user.c
    drivers/misc/cxl/fault.c
    drivers/misc/mic/scif/scif_rma.c
    drivers/oprofile/buffer_sync.c
    drivers/vfio/vfio_iommu_type1.c
    drivers/vhost/vhost.c
    drivers/xen/gntdev.c
    fs/proc/array.c
    fs/proc/base.c
    fs/proc/task_mmu.c
    include/linux/sched/mm.h
    kernel/cpuset.c
    kernel/events/core.c
    kernel/exit.c
    kernel/fork.c
    kernel/ptrace.c
    kernel/sys.c
    kernel/trace/trace_output.c
    kernel/tsacct.c
    mm/memcontrol.c
    mm/memory.c
    mm/mempolicy.c
    mm/migrate.c
    mm/mmu_notifier.c
    mm/nommu.c
    mm/util.c

    # mm_access():
    fs/proc/base.c
    include/linux/sched/mm.h
    kernel/fork.c
    mm/process_vm_access.c

    # mm_release():
    arch/arc/include/asm/mmu_context.h
    fs/exec.c
    include/linux/sched/mm.h
    include/uapi/linux/sched.h
    kernel/exit.c
    kernel/fork.c

    Acked-by: Linus Torvalds
    Cc: Mike Galbraith
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

02 Mar, 2017

5 commits


28 Feb, 2017

2 commits

  • Apart from adding the helper function itself, the rest of the kernel is
    converted mechanically using:

    git grep -l 'atomic_inc.*mm_count' | xargs sed -i 's/atomic_inc(&\(.*\)->mm_count);/mmgrab\(\1\);/'
    git grep -l 'atomic_inc.*mm_count' | xargs sed -i 's/atomic_inc(&\(.*\)\.mm_count);/mmgrab\(\&\1\);/'

    This is needed for a later patch that hooks into the helper, but might
    be a worthwhile cleanup on its own.

    (Michal Hocko provided most of the kerneldoc comment.)

    Link: http://lkml.kernel.org/r/20161218123229.22952-1-vegard.nossum@oracle.com
    Signed-off-by: Vegard Nossum
    Acked-by: Michal Hocko
    Acked-by: Peter Zijlstra (Intel)
    Acked-by: David Rientjes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vegard Nossum
     
  • Often all is needed is these small helpers, instead of compiler.h or a
    full kprobes.h. This is important for asm helpers, in fact even some
    asm/kprobes.h make use of these helpers... instead just keep a generic
    asm file with helpers useful for asm code with the least amount of
    clutter as possible.

    Likewise we need now to also address what to do about this file for both
    when architectures have CONFIG_HAVE_KPROBES, and when they do not. Then
    for when architectures have CONFIG_HAVE_KPROBES but have disabled
    CONFIG_KPROBES.

    Right now most asm/kprobes.h do not have guards against CONFIG_KPROBES,
    this means most architecture code cannot include asm/kprobes.h safely.
    Correct this and add guards for architectures missing them.
    Additionally provide architectures that not have kprobes support with
    the default asm-generic solution. This lets us force asm/kprobes.h on
    the header include/linux/kprobes.h always, but most importantly we can
    now safely include just asm/kprobes.h on architecture code without
    bringing the full kitchen sink of header files.

    Two architectures already provided a guard against CONFIG_KPROBES on its
    kprobes.h: sh, arch. The rest of the architectures needed gaurds added.
    We avoid including any not-needed headers on asm/kprobes.h unless
    kprobes have been enabled.

    In a subsequent atomic change we can try now to remove compiler.h from
    include/linux/kprobes.h.

    During this sweep I've also identified a few architectures defining a
    common macro needed for both kprobes and ftrace, that of the definition
    of the breakput instruction up. Some refer to this as
    BREAKPOINT_INSTRUCTION. This must be kept outside of the #ifdef
    CONFIG_KPROBES guard.

    [mcgrof@kernel.org: fix arm64 build]
    Link: http://lkml.kernel.org/r/CAB=NE6X1WMByuARS4mZ1g9+W=LuVBnMDnh_5zyN0CLADaVh=Jw@mail.gmail.com
    [sfr@canb.auug.org.au: fixup for kprobes declarations moving]
    Link: http://lkml.kernel.org/r/20170214165933.13ebd4f4@canb.auug.org.au
    Link: http://lkml.kernel.org/r/20170203233139.32682-1-mcgrof@kernel.org
    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: Stephen Rothwell
    Acked-by: Masami Hiramatsu
    Cc: Arnd Bergmann
    Cc: Masami Hiramatsu
    Cc: Ananth N Mavinakayanahalli
    Cc: Anil S Keshavamurthy
    Cc: David S. Miller
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: H. Peter Anvin
    Cc: Andy Lutomirski
    Cc: Steven Rostedt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Luis R. Rodriguez
     

23 Feb, 2017

1 commit

  • ... it's already using the generic version anyways, so just drop the file
    as do the other archs that do not implement their own version of the
    current macro.

    Link: http://lkml.kernel.org/r/1485992878-4780-5-git-send-email-dave@stgolabs.net
    Signed-off-by: Davidlohr Bueso
    Cc: Chen Liqin
    Cc: Lennox Wu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Davidlohr Bueso
     

22 Feb, 2017

1 commit

  • Pull exception table module split from Paul Gortmaker:
    "Final extable.h related changes.

    This completes the separation of exception table content from the
    module.h header file. This is achieved with the final commit that
    removes the one line back compatible change that sourced extable.h
    into the module.h file.

    The commits are unchanged since January, with the exception of a
    couple Acks that came in for the last two commits a bit later. The
    changes have been in linux-next for quite some time[1] and have got
    widespread arch coverage via toolchains I have and also from
    additional ones the kbuild bot has.

    Maintaners of the various arch were Cc'd during the postings to
    lkml[2] and informed that the intention was to take the remaining arch
    specific changes and lump them together with the final two non-arch
    specific changes and submit for this merge window.

    The ia64 diffstat stands out and probably warrants a mention. In an
    earlier review, Al Viro made a valid comment that the original header
    separation of content left something to be desired, and that it get
    fixed as a part of this change, hence the larger diffstat"

    * tag 'extable-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (21 commits)
    module.h: remove extable.h include now users have migrated
    core: migrate exception table users off module.h and onto extable.h
    cris: migrate exception table users off module.h and onto extable.h
    hexagon: migrate exception table users off module.h and onto extable.h
    microblaze: migrate exception table users off module.h and onto extable.h
    unicore32: migrate exception table users off module.h and onto extable.h
    score: migrate exception table users off module.h and onto extable.h
    metag: migrate exception table users off module.h and onto extable.h
    arc: migrate exception table users off module.h and onto extable.h
    nios2: migrate exception table users off module.h and onto extable.h
    sparc: migrate exception table users onto extable.h
    openrisc: migrate exception table users off module.h and onto extable.h
    frv: migrate exception table users off module.h and onto extable.h
    sh: migrate exception table users off module.h and onto extable.h
    xtensa: migrate exception table users off module.h and onto extable.h
    mn10300: migrate exception table users off module.h and onto extable.h
    alpha: migrate exception table users off module.h and onto extable.h
    arm: migrate exception table users off module.h and onto extable.h
    m32r: migrate exception table users off module.h and onto extable.h
    ia64: ensure exception table search users include extable.h
    ...

    Linus Torvalds
     

01 Feb, 2017

1 commit

  • cputime_t is now only used by two architectures:

    * powerpc (when CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y)
    * s390

    And since the core doesn't use it anymore, we don't need any arch support
    from the others. So we can remove their stub implementations.

    A final cleanup would be to provide an efficient pure arch
    implementation of cputime_to_nsec() for s390 and powerpc and finally
    remove include/linux/cputime.h .

    Signed-off-by: Frederic Weisbecker
    Cc: Benjamin Herrenschmidt
    Cc: Fenghua Yu
    Cc: Heiko Carstens
    Cc: Linus Torvalds
    Cc: Martin Schwidefsky
    Cc: Michael Ellerman
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Rik van Riel
    Cc: Stanislaw Gruszka
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Wanpeng Li
    Link: http://lkml.kernel.org/r/1485832191-26889-36-git-send-email-fweisbec@gmail.com
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     

26 Jan, 2017

1 commit


25 Dec, 2016

1 commit


17 Nov, 2016

1 commit

  • No need to duplicate the same define everywhere. Since
    the only user is stop-machine and the only provider is
    s390, we can use a default implementation of cpu_relax_yield()
    in sched.h.

    Suggested-by: Russell King
    Signed-off-by: Christian Borntraeger
    Reviewed-by: David Hildenbrand
    Acked-by: Russell King
    Cc: Andrew Morton
    Cc: Catalin Marinas
    Cc: Heiko Carstens
    Cc: Linus Torvalds
    Cc: Martin Schwidefsky
    Cc: Nicholas Piggin
    Cc: Noam Camus
    Cc: Paul E. McKenney
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: Will Deacon
    Cc: kvm@vger.kernel.org
    Cc: linux-arch@vger.kernel.org
    Cc: linux-s390
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: sparclinux@vger.kernel.org
    Cc: virtualization@lists.linux-foundation.org
    Cc: xen-devel@lists.xenproject.org
    Link: http://lkml.kernel.org/r/1479298985-191589-1-git-send-email-borntraeger@de.ibm.com
    Signed-off-by: Ingo Molnar

    Christian Borntraeger
     

16 Nov, 2016

2 commits

  • As there are no users left, we can remove cpu_relax_lowlatency()
    implementations from every architecture.

    Signed-off-by: Christian Borntraeger
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Catalin Marinas
    Cc: Heiko Carstens
    Cc: Linus Torvalds
    Cc: Martin Schwidefsky
    Cc: Nicholas Piggin
    Cc: Noam Camus
    Cc: Peter Zijlstra
    Cc: Russell King
    Cc: Thomas Gleixner
    Cc: Will Deacon
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: virtualization@lists.linux-foundation.org
    Cc: xen-devel@lists.xenproject.org
    Cc:
    Link: http://lkml.kernel.org/r/1477386195-32736-6-git-send-email-borntraeger@de.ibm.com
    Signed-off-by: Ingo Molnar

    Christian Borntraeger
     
  • For spinning loops people do often use barrier() or cpu_relax().
    For most architectures cpu_relax and barrier are the same, but on
    some architectures cpu_relax can add some latency.
    For example on power,sparc64 and arc, cpu_relax can shift the CPU
    towards other hardware threads in an SMT environment.
    On s390 cpu_relax does even more, it uses an hypercall to the
    hypervisor to give up the timeslice.
    In contrast to the SMT yielding this can result in larger latencies.
    In some places this latency is unwanted, so another variant
    "cpu_relax_lowlatency" was introduced. Before this is used in more
    and more places, lets revert the logic and provide a cpu_relax_yield
    that can be called in places where yielding is more important than
    latency. By default this is the same as cpu_relax on all architectures.

    Signed-off-by: Christian Borntraeger
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Catalin Marinas
    Cc: Heiko Carstens
    Cc: Linus Torvalds
    Cc: Martin Schwidefsky
    Cc: Nicholas Piggin
    Cc: Noam Camus
    Cc: Peter Zijlstra
    Cc: Russell King
    Cc: Thomas Gleixner
    Cc: Will Deacon
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: virtualization@lists.linux-foundation.org
    Cc: xen-devel@lists.xenproject.org
    Link: http://lkml.kernel.org/r/1477386195-32736-2-git-send-email-borntraeger@de.ibm.com
    Signed-off-by: Ingo Molnar

    Christian Borntraeger
     

25 Oct, 2016

1 commit

  • Its all generic atomic_long_t stuff now.

    Tested-by: Jason Low
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Andrew Morton
    Cc: Linus Torvalds
    Cc: Paul E. McKenney
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-arch@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

19 Oct, 2016

2 commits

  • Merge the gup_flags cleanups from Lorenzo Stoakes:
    "This patch series adjusts functions in the get_user_pages* family such
    that desired FOLL_* flags are passed as an argument rather than
    implied by flags.

    The purpose of this change is to make the use of FOLL_FORCE explicit
    so it is easier to grep for and clearer to callers that this flag is
    being used. The use of FOLL_FORCE is an issue as it overrides missing
    VM_READ/VM_WRITE flags for the VMA whose pages we are reading
    from/writing to, which can result in surprising behaviour.

    The patch series came out of the discussion around commit 38e088546522
    ("mm: check VMA flags to avoid invalid PROT_NONE NUMA balancing"),
    which addressed a BUG_ON() being triggered when a page was faulted in
    with PROT_NONE set but having been overridden by FOLL_FORCE.
    do_numa_page() was run on the assumption the page _must_ be one marked
    for NUMA node migration as an actual PROT_NONE page would have been
    dealt with prior to this code path, however FOLL_FORCE introduced a
    situation where this assumption did not hold.

    See

    https://marc.info/?l=linux-mm&m=147585445805166

    for the patch proposal"

    Additionally, there's a fix for an ancient bug related to FOLL_FORCE and
    FOLL_WRITE by me.

    [ This branch was rebased recently to add a few more acked-by's and
    reviewed-by's ]

    * gup_flag-cleanups:
    mm: replace access_process_vm() write parameter with gup_flags
    mm: replace access_remote_vm() write parameter with gup_flags
    mm: replace __access_remote_vm() write parameter with gup_flags
    mm: replace get_user_pages_remote() write/force parameters with gup_flags
    mm: replace get_user_pages() write/force parameters with gup_flags
    mm: replace get_vaddr_frames() write/force parameters with gup_flags
    mm: replace get_user_pages_locked() write/force parameters with gup_flags
    mm: replace get_user_pages_unlocked() write/force parameters with gup_flags
    mm: remove write/force parameters from __get_user_pages_unlocked()
    mm: remove write/force parameters from __get_user_pages_locked()
    mm: remove gup_flags FOLL_WRITE games from __get_user_pages()

    Linus Torvalds
     
  • This removes the 'write' argument from access_process_vm() and replaces
    it with 'gup_flags' as use of this function previously silently implied
    FOLL_FORCE, whereas after this patch callers explicitly pass this flag.

    We make this explicit as use of FOLL_FORCE can result in surprising
    behaviour (and hence bugs) within the mm subsystem.

    Signed-off-by: Lorenzo Stoakes
    Acked-by: Jesper Nilsson
    Acked-by: Michal Hocko
    Acked-by: Michael Ellerman
    Signed-off-by: Linus Torvalds

    Lorenzo Stoakes