03 Sep, 2020

2 commits

  • commit e4a42c82e943b97ce124539fcd7a47445b43fa0d upstream.

    Redefine GZIP, BZIP2, LZOP variables as KGZIP, KBZIP2, KLZOP resp.
    GZIP, BZIP2, LZOP env variables are reserved by the tools. The original
    attempt to redefine them internally doesn't work in makefiles/scripts
    intercall scenarios, e.g., "make GZIP=gzip bindeb-pkg" and results in
    broken builds. There can be other broken build commands because of this,
    so the universal solution is to use non-reserved env variables for the
    compression tools.

    Fixes: 8dfb61dcbace ("kbuild: add variables for compression tools")
    Signed-off-by: Denis Efremov
    Tested-by: Guenter Roeck
    Signed-off-by: Masahiro Yamada
    Cc: Matthias Maennich
    Signed-off-by: Greg Kroah-Hartman

    Denis Efremov
     
  • commit 8dfb61dcbaceb19a5ded5e9c9dcf8d05acc32294 upstream.

    Allow user to use alternative implementations of compression tools,
    such as pigz, pbzip2, pxz. For example, multi-threaded tools to
    speed up the build:
    $ make GZIP=pigz BZIP2=pbzip2

    Variables _GZIP, _BZIP2, _LZOP are used internally because original env
    vars are reserved by the tools. The use of GZIP in gzip tool is obsolete
    since 2015. However, alternative implementations (e.g., pigz) still rely
    on it. BZIP2, BZIP, LZOP vars are not obsolescent.

    The credit goes to @grsecurity.

    As a sidenote, for multi-threaded lzma, xz compression one can use:
    $ export XZ_OPT="--threads=0"

    Signed-off-by: Denis Efremov
    Signed-off-by: Masahiro Yamada
    Signed-off-by: Matthias Maennich
    Signed-off-by: Greg Kroah-Hartman

    Denis Efremov
     

19 Aug, 2020

5 commits


05 Aug, 2020

1 commit

  • [ Upstream commit b344d6a83d01c52fddbefa6b3b4764da5b1022a0 ]

    The kernel test bot reported[1] that using set_mask_bits on a u8 causes
    the following issue on parisc:

    hppa-linux-ld: drivers/phy/ti/phy-tusb1210.o: in function `tusb1210_probe':
    >> (.text+0x2f4): undefined reference to `__cmpxchg_called_with_bad_pointer'
    >> hppa-linux-ld: (.text+0x324): undefined reference to `__cmpxchg_called_with_bad_pointer'
    hppa-linux-ld: (.text+0x354): undefined reference to `__cmpxchg_called_with_bad_pointer'

    Add support for cmpxchg on u8 pointers.

    [1] https://lore.kernel.org/patchwork/patch/1272617/#1468946

    Reported-by: kernel test robot
    Signed-off-by: Liam Beguin
    Tested-by: Dave Anglin
    Signed-off-by: Helge Deller
    Signed-off-by: Sasha Levin

    Liam Beguin
     

29 Jul, 2020

1 commit

  • commit be6577af0cef934ccb036445314072e8cb9217b9 upstream.

    Stalls are quite frequent with recent kernels. I enabled
    CONFIG_SOFTLOCKUP_DETECTOR and I caught the following stall:

    watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [cc1:22803]
    CPU: 0 PID: 22803 Comm: cc1 Not tainted 5.6.17+ #3
    Hardware name: 9000/800/rp3440
    IAOQ[0]: d_alloc_parallel+0x384/0x688
    IAOQ[1]: d_alloc_parallel+0x388/0x688
    RP(r2): d_alloc_parallel+0x134/0x688
    Backtrace:
    [] __lookup_slow+0xa4/0x200
    [] walk_component+0x288/0x458
    [] path_lookupat+0x88/0x198
    [] filename_lookup+0xa0/0x168
    [] user_path_at_empty+0x64/0x80
    [] vfs_statx+0x104/0x158
    [] __do_sys_lstat64+0x44/0x80
    [] sys_lstat64+0x20/0x38
    [] syscall_exit+0x0/0x14

    The code was stuck in this loop in d_alloc_parallel:

    4037d414: 0e 00 10 dc ldd 0(r16),ret0
    4037d418: c7 fc 5f ed bb,< ret0,1f,4037d414
    4037d41c: 08 00 02 40 nop

    This is the inner loop of bit_spin_lock which is called by hlist_bl_unlock in
    d_alloc_parallel:

    static inline void bit_spin_lock(int bitnum, unsigned long *addr)
    {
    /*
    * Assuming the lock is uncontended, this never enters
    * the body of the outer loop. If it is contended, then
    * within the inner loop a non-atomic test is used to
    * busywait with less bus contention for a good time to
    * attempt to acquire the lock bit.
    */
    preempt_disable();
    #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
    while (unlikely(test_and_set_bit_lock(bitnum, addr))) {
    preempt_enable();
    do {
    cpu_relax();
    } while (test_bit(bitnum, addr));
    preempt_disable();
    }
    #endif
    __acquire(bitlock);
    }

    After consideration, I realized that we must be losing bit unlocks.
    Then, I noticed that we missed defining atomic64_set_release().
    Adding this define fixes the stalls in bit operations.

    Signed-off-by: Dave Anglin
    Cc: stable@vger.kernel.org
    Signed-off-by: Helge Deller
    Signed-off-by: Greg Kroah-Hartman

    John David Anglin
     

03 Jun, 2020

1 commit

  • [ Upstream commit bf71bc16e02162388808949b179d59d0b571b965 ]

    The Debian kernel v5.6 triggers this kernel panic:

    Kernel panic - not syncing: Bad Address (null pointer deref?)
    Bad Address (null pointer deref?): Code=26 (Data memory access rights trap) at addr 0000000000000000
    CPU: 0 PID: 0 Comm: swapper Not tainted 5.6.0-2-parisc64 #1 Debian 5.6.14-1
    IAOQ[0]: mem_init+0xb0/0x150
    IAOQ[1]: mem_init+0xb4/0x150
    RP(r2): start_kernel+0x6c8/0x1190
    Backtrace:
    [] start_kernel+0x6c8/0x1190
    [] start_parisc+0x158/0x1b8

    on a HP-PARISC rp3440 machine with this memory layout:
    Memory Ranges:
    0) Start 0x0000000000000000 End 0x000000003fffffff Size 1024 MB
    1) Start 0x0000004040000000 End 0x00000040ffdfffff Size 3070 MB

    Fix the crash by avoiding virt_to_page() and similar functions in
    mem_init() until the memory zones have been fully set up.

    Signed-off-by: Helge Deller
    Cc: stable@vger.kernel.org # v5.0+
    Signed-off-by: Sasha Levin

    Helge Deller
     

06 Feb, 2020

1 commit

  • [ Upstream commit 4f80b70e1953cb846dbdd1ce72cb17333d4c8d11 ]

    resource_size_t should be printed with its own size-independent format
    to fix warnings when compiling on 64-bit platform (e.g. with
    COMPILE_TEST):

    arch/parisc/kernel/drivers.c: In function 'print_parisc_device':
    arch/parisc/kernel/drivers.c:892:9: warning:
    format '%p' expects argument of type 'void *',
    but argument 4 has type 'resource_size_t {aka unsigned int}' [-Wformat=]

    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Helge Deller
    Signed-off-by: Sasha Levin

    Krzysztof Kozlowski
     

15 Jan, 2020

1 commit

  • commit d2f36c787b2181561d8b95814f8cdad64b348ad7 upstream.

    This is required for clone3 which passes the TLS value through a
    struct rather than a register.

    Signed-off-by: Amanieu d'Antras
    Cc: linux-parisc@vger.kernel.org
    Cc: # 5.3.x
    Link: https://lore.kernel.org/r/20200102172413.654385-5-amanieu@gmail.com
    Signed-off-by: Christian Brauner
    Signed-off-by: Greg Kroah-Hartman

    Amanieu d'Antras
     

12 Jan, 2020

3 commits

  • [ Upstream commit 75cf9797006a3a9f29a3a25c1febd6842a4a9eb2 ]

    Fix this compiler warning:
    kernel/debug/debug_core.c: In function ‘kgdb_cpu_enter’:
    arch/parisc/include/asm/cmpxchg.h:48:3: warning: value computed is not used [-Wunused-value]
    48 | ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr))))
    arch/parisc/include/asm/atomic.h:78:30: note: in expansion of macro ‘xchg’
    78 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new))
    | ^~~~
    kernel/debug/debug_core.c:596:4: note: in expansion of macro ‘atomic_xchg’
    596 | atomic_xchg(&kgdb_active, cpu);
    | ^~~~~~~~~~~

    Signed-off-by: Helge Deller
    Signed-off-by: Sasha Levin

    Helge Deller
     
  • [ Upstream commit aeea5eae4fd54e94d820ed17ea3b238160be723e ]

    compilation failed with:

    MODPOST vmlinux.o
    WARNING: vmlinux.o(.text.unlikely+0xa0c): Section mismatch in reference from the function walk_lower_bus() to the function .init.text:walk_native_bus()
    The function walk_lower_bus() references
    the function __init walk_native_bus().
    This is often because walk_lower_bus lacks a __init
    annotation or the annotation of walk_native_bus is wrong.

    FATAL: modpost: Section mismatches detected.
    Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them.
    make[2]: *** [/home/svens/linux/parisc-linux/src/scripts/Makefile.modpost:64: __modpost] Error 1
    make[1]: *** [/home/svens/linux/parisc-linux/src/Makefile:1077: vmlinux] Error 2
    make[1]: Leaving directory '/home/svens/linux/parisc-linux/build'
    make: *** [Makefile:179: sub-make] Error 2

    Signed-off-by: Sven Schnelle
    Signed-off-by: Helge Deller
    Signed-off-by: Sasha Levin

    Sven Schnelle
     
  • [ Upstream commit e16260c21f87b16a33ae8ecac9e8c79f3a8b89bd ]

    Fix compilation when the CONFIG_KEXEC_FILE=y and
    CONFIG_KEXEC=n.

    Reported-by: kbuild test robot
    Signed-off-by: Sven Schnelle
    Signed-off-by: Helge Deller
    Signed-off-by: Sasha Levin

    Sven Schnelle
     

31 Oct, 2019

1 commit

  • The current code in ftrace_regs_caller() doesn't assign
    %r3 to contain the address of the current frame. This
    is hidden if the kernel is compiled with FRAME_POINTER,
    but without it just crashes because it tries to dereference
    an arbitrary address. Fix this by always setting %r3 to the
    current stack frame.

    Signed-off-by: Sven Schnelle
    Signed-off-by: Helge Deller

    Sven Schnelle
     

15 Oct, 2019

2 commits


26 Sep, 2019

2 commits

  • When a process expects no accesses to a certain memory range for a long
    time, it could hint kernel that the pages can be reclaimed instantly but
    data should be preserved for future use. This could reduce workingset
    eviction so it ends up increasing performance.

    This patch introduces the new MADV_PAGEOUT hint to madvise(2) syscall.
    MADV_PAGEOUT can be used by a process to mark a memory range as not
    expected to be used for a long time so that kernel reclaims *any LRU*
    pages instantly. The hint can help kernel in deciding which pages to
    evict proactively.

    A note: It doesn't apply SWAP_CLUSTER_MAX LRU page isolation limit
    intentionally because it's automatically bounded by PMD size. If PMD
    size(e.g., 256) makes some trouble, we could fix it later by limit it to
    SWAP_CLUSTER_MAX[1].

    - man-page material

    MADV_PAGEOUT (since Linux x.x)

    Do not expect access in the near future so pages in the specified
    regions could be reclaimed instantly regardless of memory pressure.
    Thus, access in the range after successful operation could cause
    major page fault but never lose the up-to-date contents unlike
    MADV_DONTNEED. Pages belonging to a shared mapping are only processed
    if a write access is allowed for the calling process.

    MADV_PAGEOUT cannot be applied to locked pages, Huge TLB pages, or
    VM_PFNMAP pages.

    [1] https://lore.kernel.org/lkml/20190710194719.GS29695@dhcp22.suse.cz/

    [minchan@kernel.org: clear PG_active on MADV_PAGEOUT]
    Link: http://lkml.kernel.org/r/20190802200643.GA181880@google.com
    [akpm@linux-foundation.org: resolve conflicts with hmm.git]
    Link: http://lkml.kernel.org/r/20190726023435.214162-5-minchan@kernel.org
    Signed-off-by: Minchan Kim
    Reported-by: kbuild test robot
    Acked-by: Michal Hocko
    Cc: James E.J. Bottomley
    Cc: Richard Henderson
    Cc: Ralf Baechle
    Cc: Chris Zankel
    Cc: Daniel Colascione
    Cc: Dave Hansen
    Cc: Hillf Danton
    Cc: Joel Fernandes (Google)
    Cc: Johannes Weiner
    Cc: Kirill A. Shutemov
    Cc: Oleksandr Natalenko
    Cc: Shakeel Butt
    Cc: Sonny Rao
    Cc: Suren Baghdasaryan
    Cc: Tim Murray
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Minchan Kim
     
  • Patch series "Introduce MADV_COLD and MADV_PAGEOUT", v7.

    - Background

    The Android terminology used for forking a new process and starting an app
    from scratch is a cold start, while resuming an existing app is a hot
    start. While we continually try to improve the performance of cold
    starts, hot starts will always be significantly less power hungry as well
    as faster so we are trying to make hot start more likely than cold start.

    To increase hot start, Android userspace manages the order that apps
    should be killed in a process called ActivityManagerService.
    ActivityManagerService tracks every Android app or service that the user
    could be interacting with at any time and translates that into a ranked
    list for lmkd(low memory killer daemon). They are likely to be killed by
    lmkd if the system has to reclaim memory. In that sense they are similar
    to entries in any other cache. Those apps are kept alive for
    opportunistic performance improvements but those performance improvements
    will vary based on the memory requirements of individual workloads.

    - Problem

    Naturally, cached apps were dominant consumers of memory on the system.
    However, they were not significant consumers of swap even though they are
    good candidate for swap. Under investigation, swapping out only begins
    once the low zone watermark is hit and kswapd wakes up, but the overall
    allocation rate in the system might trip lmkd thresholds and cause a
    cached process to be killed(we measured performance swapping out vs.
    zapping the memory by killing a process. Unsurprisingly, zapping is 10x
    times faster even though we use zram which is much faster than real
    storage) so kill from lmkd will often satisfy the high zone watermark,
    resulting in very few pages actually being moved to swap.

    - Approach

    The approach we chose was to use a new interface to allow userspace to
    proactively reclaim entire processes by leveraging platform information.
    This allowed us to bypass the inaccuracy of the kernel’s LRUs for pages
    that are known to be cold from userspace and to avoid races with lmkd by
    reclaiming apps as soon as they entered the cached state. Additionally,
    it could provide many chances for platform to use much information to
    optimize memory efficiency.

    To achieve the goal, the patchset introduce two new options for madvise.
    One is MADV_COLD which will deactivate activated pages and the other is
    MADV_PAGEOUT which will reclaim private pages instantly. These new
    options complement MADV_DONTNEED and MADV_FREE by adding non-destructive
    ways to gain some free memory space. MADV_PAGEOUT is similar to
    MADV_DONTNEED in a way that it hints the kernel that memory region is not
    currently needed and should be reclaimed immediately; MADV_COLD is similar
    to MADV_FREE in a way that it hints the kernel that memory region is not
    currently needed and should be reclaimed when memory pressure rises.

    This patch (of 5):

    When a process expects no accesses to a certain memory range, it could
    give a hint to kernel that the pages can be reclaimed when memory pressure
    happens but data should be preserved for future use. This could reduce
    workingset eviction so it ends up increasing performance.

    This patch introduces the new MADV_COLD hint to madvise(2) syscall.
    MADV_COLD can be used by a process to mark a memory range as not expected
    to be used in the near future. The hint can help kernel in deciding which
    pages to evict early during memory pressure.

    It works for every LRU pages like MADV_[DONTNEED|FREE]. IOW, It moves

    active file page -> inactive file LRU
    active anon page -> inacdtive anon LRU

    Unlike MADV_FREE, it doesn't move active anonymous pages to inactive file
    LRU's head because MADV_COLD is a little bit different symantic.
    MADV_FREE means it's okay to discard when the memory pressure because the
    content of the page is *garbage* so freeing such pages is almost zero
    overhead since we don't need to swap out and access afterward causes just
    minor fault. Thus, it would make sense to put those freeable pages in
    inactive file LRU to compete other used-once pages. It makes sense for
    implmentaion point of view, too because it's not swapbacked memory any
    longer until it would be re-dirtied. Even, it could give a bonus to make
    them be reclaimed on swapless system. However, MADV_COLD doesn't mean
    garbage so reclaiming them requires swap-out/in in the end so it's bigger
    cost. Since we have designed VM LRU aging based on cost-model, anonymous
    cold pages would be better to position inactive anon's LRU list, not file
    LRU. Furthermore, it would help to avoid unnecessary scanning if system
    doesn't have a swap device. Let's start simpler way without adding
    complexity at this moment. However, keep in mind, too that it's a caveat
    that workloads with a lot of pages cache are likely to ignore MADV_COLD on
    anonymous memory because we rarely age anonymous LRU lists.

    * man-page material

    MADV_COLD (since Linux x.x)

    Pages in the specified regions will be treated as less-recently-accessed
    compared to pages in the system with similar access frequencies. In
    contrast to MADV_FREE, the contents of the region are preserved regardless
    of subsequent writes to pages.

    MADV_COLD cannot be applied to locked pages, Huge TLB pages, or VM_PFNMAP
    pages.

    [akpm@linux-foundation.org: resolve conflicts with hmm.git]
    Link: http://lkml.kernel.org/r/20190726023435.214162-2-minchan@kernel.org
    Signed-off-by: Minchan Kim
    Reported-by: kbuild test robot
    Acked-by: Michal Hocko
    Acked-by: Johannes Weiner
    Cc: James E.J. Bottomley
    Cc: Richard Henderson
    Cc: Ralf Baechle
    Cc: Chris Zankel
    Cc: Johannes Weiner
    Cc: Daniel Colascione
    Cc: Dave Hansen
    Cc: Hillf Danton
    Cc: Joel Fernandes (Google)
    Cc: Kirill A. Shutemov
    Cc: Oleksandr Natalenko
    Cc: Shakeel Butt
    Cc: Sonny Rao
    Cc: Suren Baghdasaryan
    Cc: Tim Murray
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Minchan Kim
     

25 Sep, 2019

2 commits

  • Both pgtable_cache_init() and pgd_cache_init() are used to initialize kmem
    cache for page table allocations on several architectures that do not use
    PAGE_SIZE tables for one or more levels of the page table hierarchy.

    Most architectures do not implement these functions and use __weak default
    NOP implementation of pgd_cache_init(). Since there is no such default
    for pgtable_cache_init(), its empty stub is duplicated among most
    architectures.

    Rename the definitions of pgd_cache_init() to pgtable_cache_init() and
    drop empty stubs of pgtable_cache_init().

    Link: http://lkml.kernel.org/r/1566457046-22637-1-git-send-email-rppt@linux.ibm.com
    Signed-off-by: Mike Rapoport
    Acked-by: Will Deacon [arm64]
    Acked-by: Thomas Gleixner [x86]
    Cc: Catalin Marinas
    Cc: Ingo Molnar
    Cc: Borislav Petkov
    Cc: Matthew Wilcox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     
  • Patch series "mm: remove quicklist page table caches".

    A while ago Nicholas proposed to remove quicklist page table caches [1].

    I've rebased his patch on the curren upstream and switched ia64 and sh to
    use generic versions of PTE allocation.

    [1] https://lore.kernel.org/linux-mm/20190711030339.20892-1-npiggin@gmail.com

    This patch (of 3):

    Remove page table allocator "quicklists". These have been around for a
    long time, but have not got much traction in the last decade and are only
    used on ia64 and sh architectures.

    The numbers in the initial commit look interesting but probably don't
    apply anymore. If anybody wants to resurrect this it's in the git
    history, but it's unhelpful to have this code and divergent allocator
    behaviour for minor archs.

    Also it might be better to instead make more general improvements to page
    allocator if this is still so slow.

    Link: http://lkml.kernel.org/r/1565250728-21721-2-git-send-email-rppt@linux.ibm.com
    Signed-off-by: Nicholas Piggin
    Signed-off-by: Mike Rapoport
    Cc: Tony Luck
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nicholas Piggin
     

20 Sep, 2019

2 commits

  • Pull Kbuild updates from Masahiro Yamada:

    - add modpost warn exported symbols marked as 'static' because 'static'
    and EXPORT_SYMBOL is an odd combination

    - break the build early if gold linker is used

    - optimize the Bison rule to produce .c and .h files by a single
    pattern rule

    - handle PREEMPT_RT in the module vermagic and UTS_VERSION

    - warn CONFIG options leaked to the user-space except existing ones

    - make single targets work properly

    - rebuild modules when module linker scripts are updated

    - split the module final link stage into scripts/Makefile.modfinal

    - fix the missed error code in merge_config.sh

    - improve the error message displayed on the attempt of the O= build in
    unclean source tree

    - remove 'clean-dirs' syntax

    - disable -Wimplicit-fallthrough warning for Clang

    - add CONFIG_CC_OPTIMIZE_FOR_SIZE_O3 for ARC

    - remove ARCH_{CPP,A,C}FLAGS variables

    - add $(BASH) to run bash scripts

    - change *CFLAGS_.o to take the relative path to $(obj)
    instead of the basename

    - stop suppressing Clang's -Wunused-function warnings when W=1

    - fix linux/export.h to avoid genksyms calculating CRC of trimmed
    exported symbols

    - misc cleanups

    * tag 'kbuild-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (63 commits)
    genksyms: convert to SPDX License Identifier for lex.l and parse.y
    modpost: use __section in the output to *.mod.c
    modpost: use MODULE_INFO() for __module_depends
    export.h, genksyms: do not make genksyms calculate CRC of trimmed symbols
    export.h: remove defined(__KERNEL__), which is no longer needed
    kbuild: allow Clang to find unused static inline functions for W=1 build
    kbuild: rename KBUILD_ENABLE_EXTRA_GCC_CHECKS to KBUILD_EXTRA_WARN
    kbuild: refactor scripts/Makefile.extrawarn
    merge_config.sh: ignore unwanted grep errors
    kbuild: change *FLAGS_.o to take the path relative to $(obj)
    modpost: add NOFAIL to strndup
    modpost: add guid_t type definition
    kbuild: add $(BASH) to run scripts with bash-extension
    kbuild: remove ARCH_{CPP,A,C}FLAGS
    kbuild,arc: add CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 for ARC
    kbuild: Do not enable -Wimplicit-fallthrough for clang for now
    kbuild: clean up subdir-ymn calculation in Makefile.clean
    kbuild: remove unneeded '+' marker from cmd_clean
    kbuild: remove clean-dirs syntax
    kbuild: check clean srctree even earlier
    ...

    Linus Torvalds
     
  • Pull dma-mapping updates from Christoph Hellwig:

    - add dma-mapping and block layer helpers to take care of IOMMU merging
    for mmc plus subsequent fixups (Yoshihiro Shimoda)

    - rework handling of the pgprot bits for remapping (me)

    - take care of the dma direct infrastructure for swiotlb-xen (me)

    - improve the dma noncoherent remapping infrastructure (me)

    - better defaults for ->mmap, ->get_sgtable and ->get_required_mask
    (me)

    - cleanup mmaping of coherent DMA allocations (me)

    - various misc cleanups (Andy Shevchenko, me)

    * tag 'dma-mapping-5.4' of git://git.infradead.org/users/hch/dma-mapping: (41 commits)
    mmc: renesas_sdhi_internal_dmac: Add MMC_CAP2_MERGE_CAPABLE
    mmc: queue: Fix bigger segments usage
    arm64: use asm-generic/dma-mapping.h
    swiotlb-xen: merge xen_unmap_single into xen_swiotlb_unmap_page
    swiotlb-xen: simplify cache maintainance
    swiotlb-xen: use the same foreign page check everywhere
    swiotlb-xen: remove xen_swiotlb_dma_mmap and xen_swiotlb_dma_get_sgtable
    xen: remove the exports for xen_{create,destroy}_contiguous_region
    xen/arm: remove xen_dma_ops
    xen/arm: simplify dma_cache_maint
    xen/arm: use dev_is_dma_coherent
    xen/arm: consolidate page-coherent.h
    xen/arm: use dma-noncoherent.h calls for xen-swiotlb cache maintainance
    arm: remove wrappers for the generic dma remap helpers
    dma-mapping: introduce a dma_common_find_pages helper
    dma-mapping: always use VM_DMA_COHERENT for generic DMA remap
    vmalloc: lift the arm flag for coherent mappings to common code
    dma-mapping: provide a better default ->get_required_mask
    dma-mapping: remove the dma_declare_coherent_memory export
    remoteproc: don't allow modular build
    ...

    Linus Torvalds
     

17 Sep, 2019

1 commit

  • Pull parisc updates from Helge Deller:

    - Make the powerpc implementation to read elf files available as a
    public kexec interface so it can be re-used on other architectures
    (Sven)

    - Implement kexec on parisc (Sven)

    - Add kprobes on ftrace on parisc (Sven)

    - Fix kernel crash with HSC-PCI cards based on card-mode Dino

    - Add assembly implementations for memset, strlen, strcpy, strncpy and
    strcat

    - Some cleanups, documentation updates, warning fixes, ...

    * 'parisc-5.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: (25 commits)
    parisc: Have git ignore generated real2.S and firmware.c
    parisc: Disable HP HSC-PCI Cards to prevent kernel crash
    parisc: add support for kexec_file_load() syscall
    parisc: wire up kexec_file_load syscall
    parisc: add kexec syscall support
    parisc: add __pdc_cpu_rendezvous()
    kprobes/parisc: remove arch_kprobe_on_func_entry()
    kexec_elf: support 32 bit ELF files
    kexec_elf: remove unused variable in kexec_elf_load()
    kexec_elf: remove Elf_Rel macro
    kexec_elf: remove PURGATORY_STACK_SIZE
    kexec_elf: remove parsing of section headers
    kexec_elf: change order of elf_*_to_cpu() functions
    kexec: add KEXEC_ELF
    parisc: Save some bytes in dino driver
    parisc: Drop comments which are already in pci.h
    parisc: Convert eisa_enumerator to use pr_cont()
    parisc: Avoid warning when loading hppb driver
    parisc: speed up flush_tlb_all_local with qemu
    parisc: Add ALTERNATIVE_CODE() and ALT_COND_RUN_ON_QEMU
    ...

    Linus Torvalds
     

12 Sep, 2019

1 commit


08 Sep, 2019

4 commits


07 Sep, 2019

1 commit


05 Sep, 2019

1 commit


04 Sep, 2019

1 commit

  • parisc is the only architecture that sets ARCH_NO_COHERENT_DMA_MMAP
    when an MMU is enabled. AFAIK this is because parisc CPUs use VIVT
    caches, which means exporting normally cachable memory to userspace is
    relatively dangrous due to cache aliasing.

    But normally cachable memory is only allocated by dma_alloc_coherent
    on parisc when using the sba_iommu or ccio_iommu drivers, so just
    remove the .mmap implementation for them so that we don't have to set
    ARCH_NO_COHERENT_DMA_MMAP, which I plan to get rid of.

    Signed-off-by: Christoph Hellwig

    Christoph Hellwig
     

25 Aug, 2019

1 commit

  • Commit 0cfaee2af3a0 ("include/asm-generic/5level-fixup.h: fix variable
    'p4d' set but not used") converted a few functions from macros to static
    inline, which causes parisc to complain,

    In file included from include/asm-generic/4level-fixup.h:38:0,
    from arch/parisc/include/asm/pgtable.h:5,
    from arch/parisc/include/asm/io.h:6,
    from include/linux/io.h:13,
    from sound/core/memory.c:9:
    include/asm-generic/5level-fixup.h:14:18: error: unknown type name 'pgd_t'; did you mean 'pid_t'?
    #define p4d_t pgd_t
    ^
    include/asm-generic/5level-fixup.h:24:28: note: in expansion of macro 'p4d_t'
    static inline int p4d_none(p4d_t p4d)
    ^~~~~

    It is because "4level-fixup.h" is included before "asm/page.h" where
    "pgd_t" is defined.

    Link: http://lkml.kernel.org/r/20190815205305.1382-1-cai@lca.pw
    Fixes: 0cfaee2af3a0 ("include/asm-generic/5level-fixup.h: fix variable 'p4d' set but not used")
    Signed-off-by: Qian Cai
    Reported-by: Guenter Roeck
    Tested-by: Guenter Roeck
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Qian Cai
     

21 Aug, 2019

1 commit


13 Aug, 2019

2 commits


11 Aug, 2019

1 commit

  • A compilation -Wimplicit-fallthrough warning was enabled by commit
    a035d552a93b ("Makefile: Globally enable fall-through warning")

    Even though clang 10.0.0 does not currently support this warning without
    a patch, clang currently does not support a value for this option.

    Link: https://bugs.llvm.org/show_bug.cgi?id=39382

    The gcc default for this warning is 3 so removing the =3 has no effect
    for gcc and enables the warning for patched versions of clang.

    Also remove the =3 from an existing use in a parisc Makefile:
    arch/parisc/math-emu/Makefile

    Signed-off-by: Joe Perches
    Reviewed-and-tested-by: Nathan Chancellor
    Cc: Gustavo A. R. Silva
    Signed-off-by: Linus Torvalds

    Joe Perches
     

03 Aug, 2019

2 commits