17 Sep, 2020

3 commits

  • [ Upstream commit 26907eb605fbc3ba9dbf888f21d9d8d04471271d ]

    HSDK board has Micrel KSZ9031, recent commit
    bcf3440c6dd ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY")
    caused a breakdown of Ethernet.
    Using 'phy-mode = "rgmii"' is not correct because accodring RGMII
    specification it is necessary to have delay on RX (PHY to MAX)
    which is not generated in case of "rgmii".
    Using "rgmii-id" adds necessary delay and solves the issue.

    Also adding name of PHY placed on HSDK board.

    Signed-off-by: Evgeniy Didin
    Cc: Eugeniy Paltsev
    Cc: Alexey Brodkin
    Signed-off-by: Vineet Gupta
    Signed-off-by: Sasha Levin

    Evgeniy Didin
     
  • [ Upstream commit 89d29997f103d08264b0685796b420d911658b96 ]

    eznps driver is supposed to be platform independent however it ends up
    including stuff from inside arch/arc headers leading to rand config
    build errors.

    The quick hack to fix this (proper fix is too much chrun for non active
    user-base) is to add following to nps platform agnostic header.
    - copy AUX_IENABLE from arch/arc header
    - move CTOP_AUX_IACK from arch/arc/plat-eznps/*/**

    Reported-by: kernel test robot
    Reported-by: Sebastian Andrzej Siewior
    Link: https://lkml.kernel.org/r/20200824095831.5lpkmkafelnvlpi2@linutronix.de
    Signed-off-by: Vineet Gupta
    Signed-off-by: Sasha Levin

    Vineet Gupta
     
  • [ Upstream commit fe81d927b78c4f0557836661d32e41ebc957b024 ]

    Newer version of HSDK aka HSDK-4xD (with dual issue HS48x4 CPU) wired up
    the perf interrupt, so enable that in DT.
    This is OK for old HSDK where this irq is ignored because pct irq is not
    wired up in hardware.

    Signed-off-by: Vineet Gupta
    Signed-off-by: Sasha Levin

    Vineet Gupta
     

10 Sep, 2020

1 commit

  • commit feb92d7d3813456c11dce215b3421801a78a8986 upstream.

    Current code inadventely bails if hardware supports sampling/overflow
    interrupts, but the irq is missing from device tree.

    |
    | # perf stat -e cycles,instructions,major-faults,minor-faults ../hackbench
    | Running with 10 groups 400 process
    | Time: 0.921
    |
    | Performance counter stats for '../hackbench':
    |
    | cycles
    | instructions
    | 0 major-faults
    | 8679 minor-faults

    This need not be as we can still do simple counting based perf stat.
    This unborks perf on HSDK-4xD

    Cc:
    Signed-off-by: Vineet Gupta
    Signed-off-by: Greg Kroah-Hartman

    Vineet Gupta
     

16 Jul, 2020

2 commits

  • commit b7faf971081a4e56147f082234bfff55135305cb upstream.

    Cc:
    Signed-off-by: Vineet Gupta
    Signed-off-by: Greg Kroah-Hartman

    Vineet Gupta
     
  • commit 00fdec98d9881bf5173af09aebd353ab3b9ac729 upstream.

    Trap handler for syscall tracing reads EFA (Exception Fault Address),
    in case strace wants PC of trap instruction (EFA is not part of pt_regs
    as of current code).

    However this EFA read is racy as it happens after dropping to pure
    kernel mode (re-enabling interrupts). A taken interrupt could
    context-switch, trigger a different task's trap, clobbering EFA for this
    execution context.

    Fix this by reading EFA early, before re-enabling interrupts. A slight
    side benefit is de-duplication of FAKE_RET_FROM_EXCPN in trap handler.
    The trap handler is common to both ARCompact and ARCv2 builds too.

    This just came out of code rework/review and no real problem was reported
    but is clearly a potential problem specially for strace.

    Cc:
    Signed-off-by: Vineet Gupta
    Signed-off-by: Greg Kroah-Hartman

    Vineet Gupta
     

07 Jun, 2020

2 commits

  • [ Upstream commit 799587d5731db9dcdafaac4002463aa7d9cd6cf7 ]

    Elide invalid configuration EZNPS + ARCv2, triggered by a
    make allyesconfig build.

    Granted the root cause is in source code (asm/barrier.h) where we check
    for ARCv2 before PLAT_EZNPS, but it is better to avoid such combinations
    at onset rather then baking subtle nuances into code.

    Reported-by: kbuild test robot
    Signed-off-by: Vineet Gupta
    Signed-off-by: Sasha Levin

    Vineet Gupta
     
  • [ Upstream commit 43900edf67d7ef3ac8909854d75b8a1fba2d570c ]

    As of today the ICCM and DCCM size checks are incorrectly using
    mismatched units (KiB checked against bytes). The CONFIG_ARC_DCCM_SZ
    and CONFIG_ARC_ICCM_SZ are in KiB, but the size calculated in
    runtime and stored in cpu->dccm.sz and cpu->iccm.sz is in bytes.

    Fix that.

    Reported-by: Paul Greco
    Signed-off-by: Eugeniy Paltsev
    Signed-off-by: Vineet Gupta
    Signed-off-by: Sasha Levin

    Eugeniy Paltsev
     

18 Mar, 2020

1 commit

  • commit 8d92e992a785f35d23f845206cf8c6cafbc264e0 upstream.

    The default defintions use fill pattern 0x90 for padding which for ARC
    generates unintended "ldh_s r12,[r0,0x20]" corresponding to opcode 0x9090

    So use ".align 4" which insert a "nop_s" instruction instead.

    Cc: stable@vger.kernel.org
    Acked-by: Vineet Gupta
    Signed-off-by: Eugeniy Paltsev
    Signed-off-by: Vineet Gupta
    Signed-off-by: Greg Kroah-Hartman

    Eugeniy Paltsev
     

15 Feb, 2020

1 commit

  • commit 7980dff398f86a618f502378fa27cf7e77449afa upstream.

    Add a missing property to GMAC node so that multicast filtering works
    correctly.

    Fixes: 556cc1c5f528 ("ARC: [axs101] Add support for AXS101 SDP (software development platform)")
    Acked-by: Alexey Brodkin
    Signed-off-by: Jose Abreu
    Signed-off-by: Vineet Gupta
    Signed-off-by: Greg Kroah-Hartman

    Jose Abreu
     

01 Feb, 2020

1 commit

  • [ Upstream commit 1928b36cfa4df1aeedf5f2644d0c33f3a1fcfd7b ]

    Fix kconfig warning for arch/arc/plat-eznps/Kconfig allmodconfig:

    WARNING: unmet direct dependencies detected for CLKSRC_NPS
    Depends on [n]: GENERIC_CLOCKEVENTS [=y] && !PHYS_ADDR_T_64BIT [=y]
    Selected by [y]:
    - ARC_PLAT_EZNPS [=y]

    Signed-off-by: Randy Dunlap
    Cc: Vineet Gupta
    Cc: Ofer Levi
    Cc: linux-snps-arc@lists.infradead.org
    Signed-off-by: Vineet Gupta
    Signed-off-by: Sasha Levin

    Randy Dunlap
     

23 Oct, 2019

3 commits

  • 8-letter strings representing ARC perf events are stores in two
    32-bit registers as ASCII characters like that: "IJMP", "IALL", "IJMPTAK" etc.

    And the same order of bytes in the word is used regardless CPU endianness.

    Which means in case of big-endian CPU core we need to swap bytes to get
    the same order as if it was on little-endian CPU.

    Otherwise we're seeing the following error message on boot:
    ------------------------->8----------------------
    ARC perf : 8 counters (32 bits), 40 conditions, [overflow IRQ support]
    sysfs: cannot create duplicate filename '/devices/arc_pct/events/pmji'
    CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.2.18 #3
    Stack Trace:
    arc_unwind_core+0xd4/0xfc
    dump_stack+0x64/0x80
    sysfs_warn_dup+0x46/0x58
    sysfs_add_file_mode_ns+0xb2/0x168
    create_files+0x70/0x2a0
    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 1 at kernel/events/core.c:12144 perf_event_sysfs_init+0x70/0xa0
    Failed to register pmu: arc_pct, reason -17
    Modules linked in:
    CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.2.18 #3
    Stack Trace:
    arc_unwind_core+0xd4/0xfc
    dump_stack+0x64/0x80
    __warn+0x9c/0xd4
    warn_slowpath_fmt+0x22/0x2c
    perf_event_sysfs_init+0x70/0xa0
    ---[ end trace a75fb9a9837bd1ec ]---
    ------------------------->8----------------------

    What happens here we're trying to register more than one raw perf event
    with the same name "PMJI". Why? Because ARC perf events are 4 to 8 letters
    and encoded into two 32-bit words. In this particular case we deal with 2
    events:
    * "IJMP____" which counts all jump & branch instructions
    * "IJMPC___" which counts only conditional jumps & branches

    Those strings are split in two 32-bit words this way "IJMP" + "____" &
    "IJMP" + "C___" correspondingly. Now if we read them swapped due to CPU core
    being big-endian then we read "PMJI" + "____" & "PMJI" + "___C".

    And since we interpret read array of ASCII letters as a null-terminated string
    on big-endian CPU we end up with 2 events of the same name "PMJI".

    Signed-off-by: Alexey Brodkin
    Cc: stable@vger.kernel.org
    Signed-off-by: Vineet Gupta

    Alexey Brodkin
     
  • HSDK board has adc108s102 SPI ADC IC installed, enable it.

    Acked-by: Alexey Brodkin
    Signed-off-by: Eugeniy Paltsev
    Signed-off-by: Vineet Gupta

    Eugeniy Paltsev
     
  • HSDK board has sst26wf016b SPI NOR flash IC installed, enable it.

    Acked-by: Alexey Brodkin
    Signed-off-by: Eugeniy Paltsev
    Signed-off-by: Vineet Gupta

    Eugeniy Paltsev
     

27 Sep, 2019

1 commit

  • The naming of pgtable_page_{ctor,dtor}() seems to have confused a few
    people, and until recently arm64 used these erroneously/pointlessly for
    other levels of page table.

    To make it incredibly clear that these only apply to the PTE level, and to
    align with the naming of pgtable_pmd_page_{ctor,dtor}(), let's rename them
    to pgtable_pte_page_{ctor,dtor}().

    These changes were generated with the following shell script:

    ----
    git grep -lw 'pgtable_page_.tor' | while read FILE; do
    sed -i '{s/pgtable_page_ctor/pgtable_pte_page_ctor/}' $FILE;
    sed -i '{s/pgtable_page_dtor/pgtable_pte_page_dtor/}' $FILE;
    done
    ----

    ... with the documentation re-flowed to remain under 80 columns, and
    whitespace fixed up in macros to keep backslashes aligned.

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

    Link: http://lkml.kernel.org/r/20190722141133.3116-1-mark.rutland@arm.com
    Signed-off-by: Mark Rutland
    Reviewed-by: Mike Rapoport
    Acked-by: Geert Uytterhoeven [m68k]
    Cc: Anshuman Khandual
    Cc: Matthew Wilcox
    Cc: Michal Hocko
    Cc: Yu Zhao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Rutland
     

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
     

04 Sep, 2019

1 commit

  • arch/arc/Makefile overrides -O2 with -O3. This is the only user of
    ARCH_CFLAGS. There is no user of ARCH_CPPFLAGS or ARCH_AFLAGS.
    My plan is to remove ARCH_{CPP,A,C}FLAGS after refactoring the ARC
    Makefile.

    Currently, ARC has no way to enable -Wmaybe-uninitialized because both
    -O3 and -Os disable it. Enabling it will be useful for compile-testing.
    This commit allows allmodconfig (, which defaults to -O2) to enable it.

    Add CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y to all the defconfig files
    in arch/arc/configs/ in order to keep the current config settings.

    Signed-off-by: Masahiro Yamada
    Acked-by: Vineet Gupta

    Masahiro Yamada
     

30 Aug, 2019

2 commits

  • …kernel/git/gustavoars/linux

    Pull fallthrough fixes from Gustavo A. R. Silva:
    "Fix fall-through warnings on arc and nds32 for multiple
    configurations"

    * tag 'Wimplicit-fallthrough-5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux:
    nds32: Mark expected switch fall-throughs
    ARC: unwind: Mark expected switch fall-through

    Linus Torvalds
     
  • Mark switch cases where we are expecting to fall through.

    This patch fixes the following warnings (Building: haps_hs_defconfig arc):

    arch/arc/kernel/unwind.c: In function ‘read_pointer’:
    ./include/linux/compiler.h:328:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
    do { \
    ^
    ./include/linux/compiler.h:338:2: note: in expansion of macro ‘__compiletime_assert’
    __compiletime_assert(condition, msg, prefix, suffix)
    ^~~~~~~~~~~~~~~~~~~~
    ./include/linux/compiler.h:350:2: note: in expansion of macro ‘_compiletime_assert’
    _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
    ^~~~~~~~~~~~~~~~~~~
    ./include/linux/build_bug.h:39:37: note: in expansion of macro ‘compiletime_assert’
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
    ^~~~~~~~~~~~~~~~~~
    ./include/linux/build_bug.h:50:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
    BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
    ^~~~~~~~~~~~~~~~
    arch/arc/kernel/unwind.c:573:3: note: in expansion of macro ‘BUILD_BUG_ON’
    BUILD_BUG_ON(sizeof(u32) != sizeof(value));
    ^~~~~~~~~~~~
    arch/arc/kernel/unwind.c:575:2: note: here
    case DW_EH_PE_native:
    ^~~~

    Signed-off-by: Gustavo A. R. Silva

    Gustavo A. R. Silva
     

29 Aug, 2019

1 commit


27 Aug, 2019

2 commits


06 Aug, 2019

1 commit

  • Mark switch cases where we are expecting to fall through.

    This patch fixes the following warnings (Building: haps_hs_defconfig arc):

    arch/arc/kernel/unwind.c:827:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
    arch/arc/kernel/unwind.c:836:20: warning: this statement may fall through [-Wimplicit-fallthrough=]

    Reviewed-by: Kees Cook
    Signed-off-by: Gustavo A. R. Silva
    Signed-off-by: Vineet Gupta

    Gustavo A. R. Silva
     

05 Aug, 2019

3 commits

  • We want to use DW AXI DMAC on HSDK board in our automated verification
    to test cache & dma kernel code changes. This is perfect candidate
    as we don't depend on any external peripherals like MMC card / USB
    storage / etc.
    To increase test coverage we want to test both options:
    * DW AXI DMAC is connected through IOC port & dma direct ops used
    * DW AXI DMAC is connected to DDR port & dma noncoherent ops used

    Introduce 'arc_hsdk_axi_dmac_coherent' global variable which can be
    modified by debugger (same way as we patch 'ioc_enable') to switch
    between these options without recompiling the kernel.
    Depend on this value we tweak memory bridge configuration and
    "dma-coherent" DTS property of DW AXI DMAC.

    Signed-off-by: Eugeniy Paltsev
    Acked-by: Alexey Brodkin
    Signed-off-by: Vineet Gupta

    Eugeniy Paltsev
     
  • Signed-off-by: Eugeniy Paltsev
    Signed-off-by: Vineet Gupta

    Eugeniy Paltsev
     
  • Exception handlers call FAKE_RET_FROM_EXCPN to
    - clear AE bit: drop down from exception active to pure kernel mode
    allowing further excptions
    - set IE bit: re-enable interrupts

    It additionally also clears U bit (user mode) and DE bit (delay slot
    execution) which is redundant as hardware does that already on any taken
    exception. Morevoer the current software clearing is bogus anyways as
    the KFLAG instruction being used for purpose can't possibly write those
    bits anyways.

    So don't pretend to clear them.

    Signed-off-by: Alexey Brodkin
    Signed-off-by: Vineet Gupta
    [vgupta: rewrote changelog]

    Alexey Brodkin
     

17 Jul, 2019

3 commits

  • Merge more updates from Andrew Morton:
    "VM:
    - z3fold fixes and enhancements by Henry Burns and Vitaly Wool

    - more accurate reclaimed slab caches calculations by Yafang Shao

    - fix MAP_UNINITIALIZED UAPI symbol to not depend on config, by
    Christoph Hellwig

    - !CONFIG_MMU fixes by Christoph Hellwig

    - new novmcoredd parameter to omit device dumps from vmcore, by
    Kairui Song

    - new test_meminit module for testing heap and pagealloc
    initialization, by Alexander Potapenko

    - ioremap improvements for huge mappings, by Anshuman Khandual

    - generalize kprobe page fault handling, by Anshuman Khandual

    - device-dax hotplug fixes and improvements, by Pavel Tatashin

    - enable synchronous DAX fault on powerpc, by Aneesh Kumar K.V

    - add pte_devmap() support for arm64, by Robin Murphy

    - unify locked_vm accounting with a helper, by Daniel Jordan

    - several misc fixes

    core/lib:
    - new typeof_member() macro including some users, by Alexey Dobriyan

    - make BIT() and GENMASK() available in asm, by Masahiro Yamada

    - changed LIST_POISON2 on x86_64 to 0xdead000000000122 for better
    code generation, by Alexey Dobriyan

    - rbtree code size optimizations, by Michel Lespinasse

    - convert struct pid count to refcount_t, by Joel Fernandes

    get_maintainer.pl:
    - add --no-moderated switch to skip moderated ML's, by Joe Perches

    misc:
    - ptrace PTRACE_GET_SYSCALL_INFO interface

    - coda updates

    - gdb scripts, various"

    [ Using merge message suggestion from Vlastimil Babka, with some editing - Linus ]

    * emailed patches from Andrew Morton : (100 commits)
    fs/select.c: use struct_size() in kmalloc()
    mm: add account_locked_vm utility function
    arm64: mm: implement pte_devmap support
    mm: introduce ARCH_HAS_PTE_DEVMAP
    mm: clean up is_device_*_page() definitions
    mm/mmap: move common defines to mman-common.h
    mm: move MAP_SYNC to asm-generic/mman-common.h
    device-dax: "Hotremove" persistent memory that is used like normal RAM
    mm/hotplug: make remove_memory() interface usable
    device-dax: fix memory and resource leak if hotplug fails
    include/linux/lz4.h: fix spelling and copy-paste errors in documentation
    ipc/mqueue.c: only perform resource calculation if user valid
    include/asm-generic/bug.h: fix "cut here" for WARN_ON for __WARN_TAINT architectures
    scripts/gdb: add helpers to find and list devices
    scripts/gdb: add lx-genpd-summary command
    drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl
    kernel/pid.c: convert struct pid count to refcount_t
    drivers/rapidio/devices/rio_mport_cdev.c: NUL terminate some strings
    select: shift restore_saved_sigmask_unless() into poll_select_copy_remaining()
    select: change do_poll() to return -ERESTARTNOHAND rather than -EINTR
    ...

    Linus Torvalds
     
  • Now that BIT() can be used from assembly code, we can safely replace
    _BITUL() with equivalent BIT().

    UAPI headers are still required to use _BITUL(), but there is no more
    reason to use it in kernel headers. BIT() is shorter.

    Link: http://lkml.kernel.org/r/20190609153941.17249-2-yamada.masahiro@socionext.com
    Signed-off-by: Masahiro Yamada
    Cc: Heiko Carstens
    Cc: Vasily Gorbik
    Cc: Christian Borntraeger
    Cc: Vineet Gupta
    Cc: Catalin Marinas
    Cc: Will Deacon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Masahiro Yamada
     
  • Pull ARC updates from Vineet Gupta:

    - long due rewrite of do_page_fault

    - refactoring of entry/exit code to utilize the double load/store
    instructions

    - hsdk platform updates

    * tag 'arc-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
    ARC: [plat-hsdk]: Enable AXI DW DMAC in defconfig
    ARC: [plat-hsdk]: enable DW SPI controller
    ARC: hide unused function unw_hdr_alloc
    ARC: [haps] Add Virtio support
    ARCv2: entry: simplify return to Delay Slot via interrupt
    ARC: entry: EV_Trap expects r10 (vs. r9) to have exception cause
    ARCv2: entry: rewrite to enable use of double load/stores LDD/STD
    ARCv2: entry: avoid a branch
    ARCv2: entry: push out the Z flag unclobber from common EXCEPTION_PROLOGUE
    ARCv2: entry: comments about hardware auto-save on taken interrupts
    ARC: mm: do_page_fault refactor #8: release mmap_sem sooner
    ARC: mm: do_page_fault refactor #7: fold the various error handling
    ARC: mm: do_page_fault refactor #6: error handlers to use same pattern
    ARC: mm: do_page_fault refactor #5: scoot no_context to end
    ARC: mm: do_page_fault refactor #4: consolidate retry related logic
    ARC: mm: do_page_fault refactor #3: tidyup vma access permission code
    ARC: mm: do_page_fault refactor #2: remove short lived variable
    ARC: mm: do_page_fault refactor #1: remove label @good_area

    Linus Torvalds
     

13 Jul, 2019

2 commits

  • Pull Kbuild updates from Masahiro Yamada:

    - remove headers_{install,check}_all targets

    - remove unreasonable 'depends on !UML' from CONFIG_SAMPLES

    - re-implement 'make headers_install' more cleanly

    - add new header-test-y syntax to compile-test headers

    - compile-test exported headers to ensure they are compilable in
    user-space

    - compile-test headers under include/ to ensure they are self-contained

    - remove -Waggregate-return, -Wno-uninitialized, -Wno-unused-value
    flags

    - add -Werror=unknown-warning-option for Clang

    - add 128-bit built-in types support to genksyms

    - fix missed rebuild of modules.builtin

    - propagate 'No space left on device' error in fixdep to Make

    - allow Clang to use its integrated assembler

    - improve some coccinelle scripts

    - add a new flag KBUILD_ABS_SRCTREE to request Kbuild to use absolute
    path for $(srctree).

    - do not ignore errors when compression utility is missing

    - misc cleanups

    * tag 'kbuild-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (49 commits)
    kbuild: use -- separater intead of $(filter-out ...) for cc-cross-prefix
    kbuild: Inform user to pass ARCH= for make mrproper
    kbuild: fix compression errors getting ignored
    kbuild: add a flag to force absolute path for srctree
    kbuild: replace KBUILD_SRCTREE with boolean building_out_of_srctree
    kbuild: remove src and obj from the top Makefile
    scripts/tags.sh: remove unused environment variables from comments
    scripts/tags.sh: drop SUBARCH support for ARM
    kbuild: compile-test kernel headers to ensure they are self-contained
    kheaders: include only headers into kheaders_data.tar.xz
    kheaders: remove meaningless -R option of 'ls'
    kbuild: support header-test-pattern-y
    kbuild: do not create wrappers for header-test-y
    kbuild: compile-test exported headers to ensure they are self-contained
    init/Kconfig: add CONFIG_CC_CAN_LINK
    kallsyms: exclude kasan local symbols on s390
    kbuild: add more hints about SUBDIRS replacement
    coccinelle: api/stream_open: treat all wait_.*() calls as blocking
    coccinelle: put_device: Add a cast to an expression for an assignment
    coccinelle: put_device: Adjust a message construction
    ...

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

    - move the USB special case that bounced DMA through a device bar into
    the USB code instead of handling it in the common DMA code (Laurentiu
    Tudor and Fredrik Noring)

    - don't dip into the global CMA pool for single page allocations
    (Nicolin Chen)

    - fix a crash when allocating memory for the atomic pool failed during
    boot (Florian Fainelli)

    - move support for MIPS-style uncached segments to the common code and
    use that for MIPS and nios2 (me)

    - make support for DMA_ATTR_NON_CONSISTENT and
    DMA_ATTR_NO_KERNEL_MAPPING generic (me)

    - convert nds32 to the generic remapping allocator (me)

    * tag 'dma-mapping-5.3' of git://git.infradead.org/users/hch/dma-mapping: (29 commits)
    dma-mapping: mark dma_alloc_need_uncached as __always_inline
    MIPS: only select ARCH_HAS_UNCACHED_SEGMENT for non-coherent platforms
    usb: host: Fix excessive alignment restriction for local memory allocations
    lib/genalloc.c: Add algorithm, align and zeroed family of DMA allocators
    nios2: use the generic uncached segment support in dma-direct
    nds32: use the generic remapping allocator for coherent DMA allocations
    arc: use the generic remapping allocator for coherent DMA allocations
    dma-direct: handle DMA_ATTR_NO_KERNEL_MAPPING in common code
    dma-direct: handle DMA_ATTR_NON_CONSISTENT in common code
    dma-mapping: add a dma_alloc_need_uncached helper
    openrisc: remove the partial DMA_ATTR_NON_CONSISTENT support
    arc: remove the partial DMA_ATTR_NON_CONSISTENT support
    arm-nommu: remove the partial DMA_ATTR_NON_CONSISTENT support
    ARM: dma-mapping: allow larger DMA mask than supported
    dma-mapping: truncate dma masks to what dma_addr_t can hold
    iommu/dma: Apply dma_{alloc,free}_contiguous functions
    dma-remap: Avoid de-referencing NULL atomic_pool
    MIPS: use the generic uncached segment support in dma-direct
    dma-direct: provide generic support for uncached kernel segments
    au1100fb: fix DMA API abuse
    ...

    Linus Torvalds
     

10 Jul, 2019

2 commits

  • Replace $(src) and $(obj) with $(srctree) and $(objtree), respectively.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • Pull Documentation updates from Jonathan Corbet:
    "It's been a relatively busy cycle for docs:

    - A fair pile of RST conversions, many from Mauro. These create more
    than the usual number of simple but annoying merge conflicts with
    other trees, unfortunately. He has a lot more of these waiting on
    the wings that, I think, will go to you directly later on.

    - A new document on how to use merges and rebases in kernel repos,
    and one on Spectre vulnerabilities.

    - Various improvements to the build system, including automatic
    markup of function() references because some people, for reasons I
    will never understand, were of the opinion that
    :c:func:``function()`` is unattractive and not fun to type.

    - We now recommend using sphinx 1.7, but still support back to 1.4.

    - Lots of smaller improvements, warning fixes, typo fixes, etc"

    * tag 'docs-5.3' of git://git.lwn.net/linux: (129 commits)
    docs: automarkup.py: ignore exceptions when seeking for xrefs
    docs: Move binderfs to admin-guide
    Disable Sphinx SmartyPants in HTML output
    doc: RCU callback locks need only _bh, not necessarily _irq
    docs: format kernel-parameters -- as code
    Doc : doc-guide : Fix a typo
    platform: x86: get rid of a non-existent document
    Add the RCU docs to the core-api manual
    Documentation: RCU: Add TOC tree hooks
    Documentation: RCU: Rename txt files to rst
    Documentation: RCU: Convert RCU UP systems to reST
    Documentation: RCU: Convert RCU linked list to reST
    Documentation: RCU: Convert RCU basic concepts to reST
    docs: filesystems: Remove uneeded .rst extension on toctables
    scripts/sphinx-pre-install: fix out-of-tree build
    docs: zh_CN: submitting-drivers.rst: Remove a duplicated Documentation/
    Documentation: PGP: update for newer HW devices
    Documentation: Add section about CPU vulnerabilities for Spectre
    Documentation: platform: Delete x86-laptop-drivers.txt
    docs: Note that :c:func: should no longer be used
    ...

    Linus Torvalds
     

09 Jul, 2019

2 commits

  • …iederm/user-namespace

    Pull force_sig() argument change from Eric Biederman:
    "A source of error over the years has been that force_sig has taken a
    task parameter when it is only safe to use force_sig with the current
    task.

    The force_sig function is built for delivering synchronous signals
    such as SIGSEGV where the userspace application caused a synchronous
    fault (such as a page fault) and the kernel responded with a signal.

    Because the name force_sig does not make this clear, and because the
    force_sig takes a task parameter the function force_sig has been
    abused for sending other kinds of signals over the years. Slowly those
    have been fixed when the oopses have been tracked down.

    This set of changes fixes the remaining abusers of force_sig and
    carefully rips out the task parameter from force_sig and friends
    making this kind of error almost impossible in the future"

    * 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: (27 commits)
    signal/x86: Move tsk inside of CONFIG_MEMORY_FAILURE in do_sigbus
    signal: Remove the signal number and task parameters from force_sig_info
    signal: Factor force_sig_info_to_task out of force_sig_info
    signal: Generate the siginfo in force_sig
    signal: Move the computation of force into send_signal and correct it.
    signal: Properly set TRACE_SIGNAL_LOSE_INFO in __send_signal
    signal: Remove the task parameter from force_sig_fault
    signal: Use force_sig_fault_to_task for the two calls that don't deliver to current
    signal: Explicitly call force_sig_fault on current
    signal/unicore32: Remove tsk parameter from __do_user_fault
    signal/arm: Remove tsk parameter from __do_user_fault
    signal/arm: Remove tsk parameter from ptrace_break
    signal/nds32: Remove tsk parameter from send_sigtrap
    signal/riscv: Remove tsk parameter from do_trap
    signal/sh: Remove tsk parameter from force_sig_info_fault
    signal/um: Remove task parameter from send_sigtrap
    signal/x86: Remove task parameter from send_sigtrap
    signal: Remove task parameter from force_sig_mceerr
    signal: Remove task parameter from force_sig
    signal: Remove task parameter from force_sigsegv
    ...

    Linus Torvalds
     
  • Pull locking updates from Ingo Molnar:
    "The main changes in this cycle are:

    - rwsem scalability improvements, phase #2, by Waiman Long, which are
    rather impressive:

    "On a 2-socket 40-core 80-thread Skylake system with 40 reader
    and writer locking threads, the min/mean/max locking operations
    done in a 5-second testing window before the patchset were:

    40 readers, Iterations Min/Mean/Max = 1,807/1,808/1,810
    40 writers, Iterations Min/Mean/Max = 1,807/50,344/151,255

    After the patchset, they became:

    40 readers, Iterations Min/Mean/Max = 30,057/31,359/32,741
    40 writers, Iterations Min/Mean/Max = 94,466/95,845/97,098"

    There's a lot of changes to the locking implementation that makes
    it similar to qrwlock, including owner handoff for more fair
    locking.

    Another microbenchmark shows how across the spectrum the
    improvements are:

    "With a locking microbenchmark running on 5.1 based kernel, the
    total locking rates (in kops/s) on a 2-socket Skylake system
    with equal numbers of readers and writers (mixed) before and
    after this patchset were:

    # of Threads Before Patch After Patch
    ------------ ------------ -----------
    2 2,618 4,193
    4 1,202 3,726
    8 802 3,622
    16 729 3,359
    32 319 2,826
    64 102 2,744"

    The changes are extensive and the patch-set has been through
    several iterations addressing various locking workloads. There
    might be more regressions, but unless they are pathological I
    believe we want to use this new implementation as the baseline
    going forward.

    - jump-label optimizations by Daniel Bristot de Oliveira: the primary
    motivation was to remove IPI disturbance of isolated RT-workload
    CPUs, which resulted in the implementation of batched jump-label
    updates. Beyond the improvement of the real-time characteristics
    kernel, in one test this patchset improved static key update
    overhead from 57 msecs to just 1.4 msecs - which is a nice speedup
    as well.

    - atomic64_t cross-arch type cleanups by Mark Rutland: over the last
    ~10 years of atomic64_t existence the various types used by the
    APIs only had to be self-consistent within each architecture -
    which means they became wildly inconsistent across architectures.
    Mark puts and end to this by reworking all the atomic64
    implementations to use 's64' as the base type for atomic64_t, and
    to ensure that this type is consistently used for parameters and
    return values in the API, avoiding further problems in this area.

    - A large set of small improvements to lockdep by Yuyang Du: type
    cleanups, output cleanups, function return type and othr cleanups
    all around the place.

    - A set of percpu ops cleanups and fixes by Peter Zijlstra.

    - Misc other changes - please see the Git log for more details"

    * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (82 commits)
    locking/lockdep: increase size of counters for lockdep statistics
    locking/atomics: Use sed(1) instead of non-standard head(1) option
    locking/lockdep: Move mark_lock() inside CONFIG_TRACE_IRQFLAGS && CONFIG_PROVE_LOCKING
    x86/jump_label: Make tp_vec_nr static
    x86/percpu: Optimize raw_cpu_xchg()
    x86/percpu, sched/fair: Avoid local_clock()
    x86/percpu, x86/irq: Relax {set,get}_irq_regs()
    x86/percpu: Relax smp_processor_id()
    x86/percpu: Differentiate this_cpu_{}() and __this_cpu_{}()
    locking/rwsem: Guard against making count negative
    locking/rwsem: Adaptive disabling of reader optimistic spinning
    locking/rwsem: Enable time-based spinning on reader-owned rwsem
    locking/rwsem: Make rwsem->owner an atomic_long_t
    locking/rwsem: Enable readers spinning on writer
    locking/rwsem: Clarify usage of owner's nonspinaable bit
    locking/rwsem: Wake up almost all readers in wait queue
    locking/rwsem: More optimal RT task handling of null owner
    locking/rwsem: Always release wait_lock before waking up tasks
    locking/rwsem: Implement lock handoff to prevent lock starvation
    locking/rwsem: Make rwsem_spin_on_owner() return owner state
    ...

    Linus Torvalds
     

08 Jul, 2019

2 commits