10 Oct, 2018

1 commit

  • [ Upstream commit 200f351e27f014fcbf69b544b0b4b72aeaf45fd3 ]

    Fix build warning in arch/hexagon/kernel/dma.c by casting a void *
    to unsigned long to match the function parameter type.

    ../arch/hexagon/kernel/dma.c: In function 'arch_dma_alloc':
    ../arch/hexagon/kernel/dma.c:51:5: warning: passing argument 2 of 'gen_pool_add' makes integer from pointer without a cast [enabled by default]
    ../include/linux/genalloc.h:112:19: note: expected 'long unsigned int' but argument is of type 'void *'

    Signed-off-by: Randy Dunlap
    Cc: Yoshinori Sato
    Cc: Rich Felker
    Cc: linux-sh@vger.kernel.org
    Patch-mainline: linux-kernel @ 07/20/2018, 20:17
    [rkuo@codeaurora.org: fixed architecture name]
    Signed-off-by: Richard Kuo
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Randy Dunlap
     

02 Nov, 2017

1 commit

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

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

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

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

    How this work was done:

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

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

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

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

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

    Greg Kroah-Hartman
     

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
     

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
     

28 Jun, 2017

2 commits


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
     

25 Apr, 2017

1 commit


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 hexagon 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: Richard Kuo
    Cc: linux-hexagon@vger.kernel.org
    Acked-by: Richard Kuo
    Signed-off-by: Nicolai Stange
    Signed-off-by: John Stultz

    Nicolai Stange
     

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

1 commit

  • 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
     

25 Jan, 2017

1 commit

  • Most dma_map_ops structures are never modified. Constify these
    structures such that these can be write-protected. This patch
    has been generated as follows:

    git grep -l 'struct dma_map_ops' |
    xargs -d\\n sed -i \
    -e 's/struct dma_map_ops/const struct dma_map_ops/g' \
    -e 's/const struct dma_map_ops {/struct dma_map_ops {/g' \
    -e 's/^const struct dma_map_ops;$/struct dma_map_ops;/' \
    -e 's/const const struct dma_map_ops /const struct dma_map_ops /g';
    sed -i -e 's/const \(struct dma_map_ops intel_dma_ops\)/\1/' \
    $(git grep -l 'struct dma_map_ops intel_dma_ops');
    sed -i -e 's/const \(struct dma_map_ops dma_iommu_ops\)/\1/' \
    $(git grep -l 'struct dma_map_ops' | grep ^arch/powerpc);
    sed -i -e '/^struct vmd_dev {$/,/^};$/ s/const \(struct dma_map_ops[[:blank:]]dma_ops;\)/\1/' \
    -e '/^static void vmd_setup_dma_ops/,/^}$/ s/const \(struct dma_map_ops \*dest\)/\1/' \
    -e 's/const \(struct dma_map_ops \*dest = \&vmd->dma_ops\)/\1/' \
    drivers/pci/host/*.c
    sed -i -e '/^void __init pci_iommu_alloc(void)$/,/^}$/ s/dma_ops->/intel_dma_ops./' arch/ia64/kernel/pci-dma.c
    sed -i -e 's/static const struct dma_map_ops sn_dma_ops/static struct dma_map_ops sn_dma_ops/' arch/ia64/sn/pci/pci_dma.c
    sed -i -e 's/(const struct dma_map_ops \*)//' drivers/misc/mic/bus/vop_bus.c

    Signed-off-by: Bart Van Assche
    Reviewed-by: Christoph Hellwig
    Cc: Benjamin Herrenschmidt
    Cc: Boris Ostrovsky
    Cc: David Woodhouse
    Cc: Juergen Gross
    Cc: H. Peter Anvin
    Cc: Ingo Molnar
    Cc: linux-arch@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: Russell King
    Cc: x86@kernel.org
    Signed-off-by: Doug Ledford

    Bart Van Assche
     

25 Dec, 2016

2 commits


15 Dec, 2016

1 commit

  • This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to
    avoid invoking cache line invalidation if the driver will just handle it
    later via a sync_for_cpu or sync_for_device call.

    Link: http://lkml.kernel.org/r/20161110113452.76501.45864.stgit@ahduyck-blue-test.jf.intel.com
    Signed-off-by: Alexander Duyck
    Cc: Richard Kuo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Duyck
     

08 Oct, 2016

1 commit

  • When doing an nmi backtrace of many cores, most of which are idle, the
    output is a little overwhelming and very uninformative. Suppress
    messages for cpus that are idling when they are interrupted and just
    emit one line, "NMI backtrace for N skipped: idling at pc 0xNNN".

    We do this by grouping all the cpuidle code together into a new
    .cpuidle.text section, and then checking the address of the interrupted
    PC to see if it lies within that section.

    This commit suitably tags x86 and tile idle routines, and only adds in
    the minimal framework for other architectures.

    Link: http://lkml.kernel.org/r/1472487169-14923-5-git-send-email-cmetcalf@mellanox.com
    Signed-off-by: Chris Metcalf
    Acked-by: Peter Zijlstra (Intel)
    Tested-by: Peter Zijlstra (Intel)
    Tested-by: Daniel Thompson [arm]
    Tested-by: Petr Mladek
    Cc: Aaron Tomlin
    Cc: Peter Zijlstra (Intel)
    Cc: "Rafael J. Wysocki"
    Cc: Russell King
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Metcalf
     

04 Aug, 2016

1 commit

  • The dma-mapping core and the implementations do not change the DMA
    attributes passed by pointer. Thus the pointer can point to const data.
    However the attributes do not have to be a bitfield. Instead unsigned
    long will do fine:

    1. This is just simpler. Both in terms of reading the code and setting
    attributes. Instead of initializing local attributes on the stack
    and passing pointer to it to dma_set_attr(), just set the bits.

    2. It brings safeness and checking for const correctness because the
    attributes are passed by value.

    Semantic patches for this change (at least most of them):

    virtual patch
    virtual context

    @r@
    identifier f, attrs;

    @@
    f(...,
    - struct dma_attrs *attrs
    + unsigned long attrs
    , ...)
    {
    ...
    }

    @@
    identifier r.f;
    @@
    f(...,
    - NULL
    + 0
    )

    and

    // Options: --all-includes
    virtual patch
    virtual context

    @r@
    identifier f, attrs;
    type t;

    @@
    t f(..., struct dma_attrs *attrs);

    @@
    identifier r.f;
    @@
    f(...,
    - NULL
    + 0
    )

    Link: http://lkml.kernel.org/r/1468399300-5399-2-git-send-email-k.kozlowski@samsung.com
    Signed-off-by: Krzysztof Kozlowski
    Acked-by: Vineet Gupta
    Acked-by: Robin Murphy
    Acked-by: Hans-Christian Noren Egtvedt
    Acked-by: Mark Salter [c6x]
    Acked-by: Jesper Nilsson [cris]
    Acked-by: Daniel Vetter [drm]
    Reviewed-by: Bart Van Assche
    Acked-by: Joerg Roedel [iommu]
    Acked-by: Fabien Dessenne [bdisp]
    Reviewed-by: Marek Szyprowski [vb2-core]
    Acked-by: David Vrabel [xen]
    Acked-by: Konrad Rzeszutek Wilk [xen swiotlb]
    Acked-by: Joerg Roedel [iommu]
    Acked-by: Richard Kuo [hexagon]
    Acked-by: Geert Uytterhoeven [m68k]
    Acked-by: Gerald Schaefer [s390]
    Acked-by: Bjorn Andersson
    Acked-by: Hans-Christian Noren Egtvedt [avr32]
    Acked-by: Vineet Gupta [arc]
    Acked-by: Robin Murphy [arm64 and dma-iommu]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Kozlowski
     

24 May, 2016

1 commit

  • most architectures are relying on mmap_sem for write in their
    arch_setup_additional_pages. If the waiting task gets killed by the oom
    killer it would block oom_reaper from asynchronous address space reclaim
    and reduce the chances of timely OOM resolving. Wait for the lock in
    the killable mode and return with EINTR if the task got killed while
    waiting.

    Signed-off-by: Michal Hocko
    Acked-by: Andy Lutomirski [x86 vdso]
    Acked-by: Vlastimil Babka
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michal Hocko
     

21 May, 2016

1 commit

  • Define HAVE_EXIT_THREAD for archs which want to do something in
    exit_thread. For others, let's define exit_thread as an empty inline.

    This is a cleanup before we change the prototype of exit_thread to
    accept a task parameter.

    [akpm@linux-foundation.org: fix mips]
    Signed-off-by: Jiri Slaby
    Cc: "David S. Miller"
    Cc: "H. Peter Anvin"
    Cc: "James E.J. Bottomley"
    Cc: Aurelien Jacquiot
    Cc: Benjamin Herrenschmidt
    Cc: Catalin Marinas
    Cc: Chen Liqin
    Cc: Chris Metcalf
    Cc: Chris Zankel
    Cc: David Howells
    Cc: Fenghua Yu
    Cc: Geert Uytterhoeven
    Cc: Guan Xuetao
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Heiko Carstens
    Cc: Helge Deller
    Cc: Ingo Molnar
    Cc: Ivan Kokshaysky
    Cc: James Hogan
    Cc: Jeff Dike
    Cc: Jesper Nilsson
    Cc: Jiri Slaby
    Cc: Jonas Bonn
    Cc: Koichi Yasutake
    Cc: Lennox Wu
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Martin Schwidefsky
    Cc: Matt Turner
    Cc: Max Filippov
    Cc: Michael Ellerman
    Cc: Michal Simek
    Cc: Mikael Starvik
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Ralf Baechle
    Cc: Rich Felker
    Cc: Richard Henderson
    Cc: Richard Kuo
    Cc: Richard Weinberger
    Cc: Russell King
    Cc: Steven Miao
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Vineet Gupta
    Cc: Will Deacon
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     

18 Apr, 2016

1 commit


02 Mar, 2016

1 commit

  • Let the non boot cpus call into idle with the corresponding hotplug state, so
    the hotplug core can handle the further bringup. That's a first step to
    convert the boot side of the hotplugged cpus to do all the synchronization
    with the other side through the state machine. For now it'll only start the
    hotplug thread and kick the full bringup of the cpu.

    Signed-off-by: Thomas Gleixner
    Cc: linux-arch@vger.kernel.org
    Cc: Rik van Riel
    Cc: Rafael Wysocki
    Cc: "Srivatsa S. Bhat"
    Cc: Peter Zijlstra
    Cc: Arjan van de Ven
    Cc: Sebastian Siewior
    Cc: Rusty Russell
    Cc: Steven Rostedt
    Cc: Oleg Nesterov
    Cc: Tejun Heo
    Cc: Andrew Morton
    Cc: Paul McKenney
    Cc: Linus Torvalds
    Cc: Paul Turner
    Link: http://lkml.kernel.org/r/20160226182341.614102639@linutronix.de
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

11 Sep, 2015

2 commits

  • Merge third patch-bomb from Andrew Morton:

    - even more of the rest of MM

    - lib/ updates

    - checkpatch updates

    - small changes to a few scruffy filesystems

    - kmod fixes/cleanups

    - kexec updates

    - a dma-mapping cleanup series from hch

    * emailed patches from Andrew Morton : (81 commits)
    dma-mapping: consolidate dma_set_mask
    dma-mapping: consolidate dma_supported
    dma-mapping: cosolidate dma_mapping_error
    dma-mapping: consolidate dma_{alloc,free}_noncoherent
    dma-mapping: consolidate dma_{alloc,free}_{attrs,coherent}
    mm: use vma_is_anonymous() in create_huge_pmd() and wp_huge_pmd()
    mm: make sure all file VMAs have ->vm_ops set
    mm, mpx: add "vm_flags_t vm_flags" arg to do_mmap_pgoff()
    mm: mark most vm_operations_struct const
    namei: fix warning while make xmldocs caused by namei.c
    ipc: convert invalid scenarios to use WARN_ON
    zlib_deflate/deftree: remove bi_reverse()
    lib/decompress_unlzma: Do a NULL check for pointer
    lib/decompressors: use real out buf size for gunzip with kernel
    fs/affs: make root lookup from blkdev logical size
    sysctl: fix int -> unsigned long assignments in INT_MIN case
    kexec: export KERNEL_IMAGE_SIZE to vmcoreinfo
    kexec: align crash_notes allocation to make it be inside one physical page
    kexec: remove unnecessary test in kimage_alloc_crash_control_pages()
    kexec: split kexec_load syscall from kexec core code
    ...

    Linus Torvalds
     
  • Almost everyone implements dma_set_mask the same way, although some time
    that's hidden in ->set_dma_mask methods.

    This patch consolidates those into a common implementation that either
    calls ->set_dma_mask if present or otherwise uses the default
    implementation. Some architectures used to only call ->set_dma_mask
    after the initial checks, and those instance have been fixed to do the
    full work. h8300 implemented dma_set_mask bogusly as a no-ops and has
    been fixed.

    Unfortunately some architectures overload unrelated semantics like changing
    the dma_ops into it so we still need to allow for an architecture override
    for now.

    [jcmvbkbc@gmail.com: fix xtensa]
    Signed-off-by: Christoph Hellwig
    Cc: Arnd Bergmann
    Cc: Russell King
    Cc: Catalin Marinas
    Cc: Will Deacon
    Cc: Yoshinori Sato
    Cc: Michal Simek
    Cc: Jonas Bonn
    Cc: Chris Metcalf
    Cc: Guan Xuetao
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: Andy Shevchenko
    Signed-off-by: Max Filippov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

09 Sep, 2015

1 commit

  • Migrate hexagon driver to the new 'set-state' interface provided by
    clockevents core, the earlier 'set-mode' interface is marked obsolete
    now.

    This also enables us to implement callbacks for new states of clockevent
    devices, for example: ONESHOT_STOPPED.

    We weren't doing anything in the ->set_mode() callback. So, this patch
    doesn't provide any set-state callbacks.

    Cc: linux-hexagon@vger.kernel.org
    Signed-off-by: Viresh Kumar
    Signed-off-by: Richard Kuo

    Viresh Kumar
     

12 Apr, 2015

1 commit


13 Feb, 2015

1 commit

  • If an attacker can cause a controlled kernel stack overflow, overwriting
    the restart block is a very juicy exploit target. This is because the
    restart_block is held in the same memory allocation as the kernel stack.

    Moving the restart block to struct task_struct prevents this exploit by
    making the restart_block harder to locate.

    Note that there are other fields in thread_info that are also easy
    targets, at least on some architectures.

    It's also a decent simplification, since the restart code is more or less
    identical on all architectures.

    [james.hogan@imgtec.com: metag: align thread_info::supervisor_stack]
    Signed-off-by: Andy Lutomirski
    Cc: Thomas Gleixner
    Cc: Al Viro
    Cc: "H. Peter Anvin"
    Cc: Ingo Molnar
    Cc: Kees Cook
    Cc: David Miller
    Acked-by: Richard Weinberger
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Matt Turner
    Cc: Vineet Gupta
    Cc: Russell King
    Cc: Catalin Marinas
    Cc: Will Deacon
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Steven Miao
    Cc: Mark Salter
    Cc: Aurelien Jacquiot
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc: David Howells
    Cc: Richard Kuo
    Cc: "Luck, Tony"
    Cc: Geert Uytterhoeven
    Cc: Michal Simek
    Cc: Ralf Baechle
    Cc: Jonas Bonn
    Cc: "James E.J. Bottomley"
    Cc: Helge Deller
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Acked-by: Michael Ellerman (powerpc)
    Tested-by: Michael Ellerman (powerpc)
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Chen Liqin
    Cc: Lennox Wu
    Cc: Chris Metcalf
    Cc: Guan Xuetao
    Cc: Chris Zankel
    Cc: Max Filippov
    Cc: Oleg Nesterov
    Cc: Guenter Roeck
    Signed-off-by: James Hogan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Lutomirski
     

17 Dec, 2014

3 commits

  • Signed-off-by: Richard Kuo

    Richard Kuo
     
  • Signed-off-by: Richard Kuo

    Richard Kuo
     
  • hexagon:defconfig fails to build in linux-next since commit 332fd7c4fef5
    ("genirq: Generic chip: Change irq_reg_{readl,writel} arguments").

    The primary build failure is

    arch/hexagon/include/asm/cacheflush.h: In function 'copy_to_user_page':
    arch/hexagon/include/asm/cacheflush.h:89:22: error: 'VM_EXEC' undeclared

    This is the result of including of from ,
    which is now necessary due to the use of readl and writel from irq.h.
    This causes recursive inclusions in hexagon code; cacheflush.h is included
    from mm.h prior to the definition of VM_EXEC.

    Fix the problem by moving copy_to_user_page from the hexagon include file to
    arch/hexagon/mm/cache.c, similar to other architectures. After this change,
    several redefinitions of readl and writel are reported. Those are caused
    by recursive inclusions of io.h and asm/cacheflush.h. Fix those problems by
    reducing the number of files included from those files. Also, it was necessary
    to stop including asm-generic/cacheflush.h from asm/cacheflush.h. Instead,
    functionality originally provided by asm-generic/cacheflush.h is now coded
    in asm/cacheflush.h directly.

    Cc: Kevin Cernekee
    Cc: Jason Cooper
    Signed-off-by: Guenter Roeck
    signed-off-by: Richard Kuo

    Guenter Roeck
     

06 Aug, 2014

2 commits


05 Apr, 2014

2 commits