27 Nov, 2018

3 commits

  • Layout of coprocessor registers in the elf_xtregs_t and
    xtregs_coprocessor_t may be different due to alignment. Thus it is not
    always possible to copy data between the xtregs_coprocessor_t structure
    and the elf_xtregs_t and get correct values for all registers.
    Use a table of offsets and sizes of individual coprocessor register
    groups to do coprocessor context copying in the ptrace_getxregs and
    ptrace_setxregs.
    This fixes incorrect coprocessor register values reading from the user
    process by the native gdb on an xtensa core with multiple coprocessors
    and registers with high alignment requirements.

    Cc: stable@vger.kernel.org
    Signed-off-by: Max Filippov

    Max Filippov
     
  • Coprocessor context offsets are used by the assembly code that moves
    coprocessor context between the individual fields of the
    thread_info::xtregs_cp structure and coprocessor registers.
    This fixes coprocessor context clobbering on flushing and reloading
    during normal user code execution and user process debugging in the
    presence of more than one coprocessor in the core configuration.

    Cc: stable@vger.kernel.org
    Signed-off-by: Max Filippov

    Max Filippov
     
  • coprocessor_flush_all may be called from a context of a thread that is
    different from the thread being flushed. In that case contents of the
    cpenable special register may not match ti->cpenable of the target
    thread, resulting in unhandled coprocessor exception in the kernel
    context.
    Set cpenable special register to the ti->cpenable of the target register
    for the duration of the flush and restore it afterwards.
    This fixes the following crash caused by coprocessor register inspection
    in native gdb:

    (gdb) p/x $w0
    Illegal instruction in kernel: sig: 9 [#1] PREEMPT
    Call Trace:
    ___might_sleep+0x184/0x1a4
    __might_sleep+0x41/0xac
    exit_signals+0x14/0x218
    do_exit+0xc9/0x8b8
    die+0x99/0xa0
    do_illegal_instruction+0x18/0x6c
    common_exception+0x77/0x77
    coprocessor_flush+0x16/0x3c
    arch_ptrace+0x46c/0x674
    sys_ptrace+0x2ce/0x3b4
    system_call+0x54/0x80
    common_exception+0x77/0x77
    note: gdb[100] exited with preempt_count 1
    Killed

    Cc: stable@vger.kernel.org
    Signed-off-by: Max Filippov

    Max Filippov
     

17 Nov, 2018

1 commit


14 Nov, 2018

1 commit

  • The bootloader may pass physical address of the boot parameters structure
    to the MMUv3 kernel in the register a2. Code in the _SetupMMU block in
    the arch/xtensa/kernel/head.S is supposed to map that physical address to
    the virtual address in the configured virtual memory layout.

    This code haven't been updated when additional 256+256 and 512+512
    memory layouts were introduced and it may produce wrong addresses when
    used with these layouts.

    Cc: stable@vger.kernel.org
    Signed-off-by: Max Filippov

    Max Filippov
     

06 Nov, 2018

1 commit

  • Xtensa ABI requires stack alignment to be at least 16. In noMMU
    configuration ARCH_SLAB_MINALIGN is used to align stack. Make it at
    least 16.

    This fixes the following runtime error in noMMU configuration, caused by
    interaction between insufficiently aligned stack and alloca function,
    that results in corruption of on-stack variable in the libc function
    glob:

    Caught unhandled exception in 'sh' (pid = 47, pc = 0x02d05d65)
    - should not happen
    EXCCAUSE is 15

    Cc: stable@vger.kernel.org
    Signed-off-by: Max Filippov

    Max Filippov
     

02 Nov, 2018

1 commit

  • Pull Xtensa fixes and cleanups from Max Filippov:

    - use ZONE_NORMAL instead of ZONE_DMA

    - fix Image.elf build error caused by assignment of incorrect address
    to the .note.Linux section

    - clean up debug and property sections in the vmlinux.lds.S

    * tag 'xtensa-20181101' of git://github.com/jcmvbkbc/linux-xtensa:
    xtensa: clean up xtensa-specific property sections
    xtensa: use DWARF_DEBUG in the vmlinux.lds.S
    xtensa: add NOTES section to the linker script
    xtensa: remove ZONE_DMA

    Linus Torvalds
     

31 Oct, 2018

9 commits

  • When a memblock allocation APIs are called with align = 0, the alignment
    is implicitly set to SMP_CACHE_BYTES.

    Implicit alignment is done deep in the memblock allocator and it can
    come as a surprise. Not that such an alignment would be wrong even
    when used incorrectly but it is better to be explicit for the sake of
    clarity and the prinicple of the least surprise.

    Replace all such uses of memblock APIs with the 'align' parameter
    explicitly set to SMP_CACHE_BYTES and stop implicit alignment assignment
    in the memblock internal allocation functions.

    For the case when memblock APIs are used via helper functions, e.g. like
    iommu_arena_new_node() in Alpha, the helper functions were detected with
    Coccinelle's help and then manually examined and updated where
    appropriate.

    The direct memblock APIs users were updated using the semantic patch below:

    @@
    expression size, min_addr, max_addr, nid;
    @@
    (
    |
    - memblock_alloc_try_nid_raw(size, 0, min_addr, max_addr, nid)
    + memblock_alloc_try_nid_raw(size, SMP_CACHE_BYTES, min_addr, max_addr,
    nid)
    |
    - memblock_alloc_try_nid_nopanic(size, 0, min_addr, max_addr, nid)
    + memblock_alloc_try_nid_nopanic(size, SMP_CACHE_BYTES, min_addr, max_addr,
    nid)
    |
    - memblock_alloc_try_nid(size, 0, min_addr, max_addr, nid)
    + memblock_alloc_try_nid(size, SMP_CACHE_BYTES, min_addr, max_addr, nid)
    |
    - memblock_alloc(size, 0)
    + memblock_alloc(size, SMP_CACHE_BYTES)
    |
    - memblock_alloc_raw(size, 0)
    + memblock_alloc_raw(size, SMP_CACHE_BYTES)
    |
    - memblock_alloc_from(size, 0, min_addr)
    + memblock_alloc_from(size, SMP_CACHE_BYTES, min_addr)
    |
    - memblock_alloc_nopanic(size, 0)
    + memblock_alloc_nopanic(size, SMP_CACHE_BYTES)
    |
    - memblock_alloc_low(size, 0)
    + memblock_alloc_low(size, SMP_CACHE_BYTES)
    |
    - memblock_alloc_low_nopanic(size, 0)
    + memblock_alloc_low_nopanic(size, SMP_CACHE_BYTES)
    |
    - memblock_alloc_from_nopanic(size, 0, min_addr)
    + memblock_alloc_from_nopanic(size, SMP_CACHE_BYTES, min_addr)
    |
    - memblock_alloc_node(size, 0, nid)
    + memblock_alloc_node(size, SMP_CACHE_BYTES, nid)
    )

    [mhocko@suse.com: changelog update]
    [akpm@linux-foundation.org: coding-style fixes]
    [rppt@linux.ibm.com: fix missed uses of implicit alignment]
    Link: http://lkml.kernel.org/r/20181016133656.GA10925@rapoport-lnx
    Link: http://lkml.kernel.org/r/1538687224-17535-1-git-send-email-rppt@linux.vnet.ibm.com
    Signed-off-by: Mike Rapoport
    Suggested-by: Michal Hocko
    Acked-by: Paul Burton [MIPS]
    Acked-by: Michael Ellerman [powerpc]
    Acked-by: Michal Hocko
    Cc: Catalin Marinas
    Cc: Chris Zankel
    Cc: Geert Uytterhoeven
    Cc: Guan Xuetao
    Cc: Ingo Molnar
    Cc: Matt Turner
    Cc: Michal Simek
    Cc: Richard Weinberger
    Cc: Russell King
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     
  • Move remaining definitions and declarations from include/linux/bootmem.h
    into include/linux/memblock.h and remove the redundant header.

    The includes were replaced with the semantic patch below and then
    semi-automated removal of duplicated '#include

    @@
    @@
    - #include
    + #include

    [sfr@canb.auug.org.au: dma-direct: fix up for the removal of linux/bootmem.h]
    Link: http://lkml.kernel.org/r/20181002185342.133d1680@canb.auug.org.au
    [sfr@canb.auug.org.au: powerpc: fix up for removal of linux/bootmem.h]
    Link: http://lkml.kernel.org/r/20181005161406.73ef8727@canb.auug.org.au
    [sfr@canb.auug.org.au: x86/kaslr, ACPI/NUMA: fix for linux/bootmem.h removal]
    Link: http://lkml.kernel.org/r/20181008190341.5e396491@canb.auug.org.au
    Link: http://lkml.kernel.org/r/1536927045-23536-30-git-send-email-rppt@linux.vnet.ibm.com
    Signed-off-by: Mike Rapoport
    Signed-off-by: Stephen Rothwell
    Acked-by: Michal Hocko
    Cc: Catalin Marinas
    Cc: Chris Zankel
    Cc: "David S. Miller"
    Cc: Geert Uytterhoeven
    Cc: Greentime Hu
    Cc: Greg Kroah-Hartman
    Cc: Guan Xuetao
    Cc: Ingo Molnar
    Cc: "James E.J. Bottomley"
    Cc: Jonas Bonn
    Cc: Jonathan Corbet
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Martin Schwidefsky
    Cc: Matt Turner
    Cc: Michael Ellerman
    Cc: Michal Simek
    Cc: Palmer Dabbelt
    Cc: Paul Burton
    Cc: Richard Kuo
    Cc: Richard Weinberger
    Cc: Rich Felker
    Cc: Russell King
    Cc: Serge Semin
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Vineet Gupta
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     
  • The conversion is done using

    sed -i 's@free_all_bootmem@memblock_free_all@' \
    $(git grep -l free_all_bootmem)

    Link: http://lkml.kernel.org/r/1536927045-23536-26-git-send-email-rppt@linux.vnet.ibm.com
    Signed-off-by: Mike Rapoport
    Acked-by: Michal Hocko
    Cc: Catalin Marinas
    Cc: Chris Zankel
    Cc: "David S. Miller"
    Cc: Geert Uytterhoeven
    Cc: Greentime Hu
    Cc: Greg Kroah-Hartman
    Cc: Guan Xuetao
    Cc: Ingo Molnar
    Cc: "James E.J. Bottomley"
    Cc: Jonas Bonn
    Cc: Jonathan Corbet
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Martin Schwidefsky
    Cc: Matt Turner
    Cc: Michael Ellerman
    Cc: Michal Simek
    Cc: Palmer Dabbelt
    Cc: Paul Burton
    Cc: Richard Kuo
    Cc: Richard Weinberger
    Cc: Rich Felker
    Cc: Russell King
    Cc: Serge Semin
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Vineet Gupta
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     
  • The alloc_bootmem(size) is a shortcut for allocation of SMP_CACHE_BYTES
    aligned memory. When the align parameter of memblock_alloc() is 0, the
    alignment is implicitly set to SMP_CACHE_BYTES and thus alloc_bootmem(size)
    and memblock_alloc(size, 0) are equivalent.

    The conversion is done using the following semantic patch:

    @@
    expression size;
    @@
    - alloc_bootmem(size)
    + memblock_alloc(size, 0)

    Link: http://lkml.kernel.org/r/1536927045-23536-22-git-send-email-rppt@linux.vnet.ibm.com
    Signed-off-by: Mike Rapoport
    Cc: Catalin Marinas
    Cc: Chris Zankel
    Cc: "David S. Miller"
    Cc: Geert Uytterhoeven
    Cc: Greentime Hu
    Cc: Greg Kroah-Hartman
    Cc: Guan Xuetao
    Cc: Ingo Molnar
    Cc: "James E.J. Bottomley"
    Cc: Jonas Bonn
    Cc: Jonathan Corbet
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Martin Schwidefsky
    Cc: Matt Turner
    Cc: Michael Ellerman
    Cc: Michal Hocko
    Cc: Michal Simek
    Cc: Palmer Dabbelt
    Cc: Paul Burton
    Cc: Richard Kuo
    Cc: Richard Weinberger
    Cc: Rich Felker
    Cc: Russell King
    Cc: Serge Semin
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Vineet Gupta
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     
  • The alloc_bootmem_low_pages() function allocates PAGE_SIZE aligned regions
    from low memory. memblock_alloc_low() with alignment set to PAGE_SIZE does
    exactly the same thing.

    The conversion is done using the following semantic patch:

    @@
    expression e;
    @@
    - alloc_bootmem_low_pages(e)
    + memblock_alloc_low(e, PAGE_SIZE)

    Link: http://lkml.kernel.org/r/1536927045-23536-19-git-send-email-rppt@linux.vnet.ibm.com
    Signed-off-by: Mike Rapoport
    Acked-by: Michal Hocko
    Cc: Catalin Marinas
    Cc: Chris Zankel
    Cc: "David S. Miller"
    Cc: Geert Uytterhoeven
    Cc: Greentime Hu
    Cc: Greg Kroah-Hartman
    Cc: Guan Xuetao
    Cc: Ingo Molnar
    Cc: "James E.J. Bottomley"
    Cc: Jonas Bonn
    Cc: Jonathan Corbet
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Martin Schwidefsky
    Cc: Matt Turner
    Cc: Michael Ellerman
    Cc: Michal Simek
    Cc: Palmer Dabbelt
    Cc: Paul Burton
    Cc: Richard Kuo
    Cc: Richard Weinberger
    Cc: Rich Felker
    Cc: Russell King
    Cc: Serge Semin
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Vineet Gupta
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     
  • The conversion is done using

    sed -i 's@memblock_virt_alloc@memblock_alloc@g' \
    $(git grep -l memblock_virt_alloc)

    Link: http://lkml.kernel.org/r/1536927045-23536-8-git-send-email-rppt@linux.vnet.ibm.com
    Signed-off-by: Mike Rapoport
    Cc: Catalin Marinas
    Cc: Chris Zankel
    Cc: "David S. Miller"
    Cc: Geert Uytterhoeven
    Cc: Greentime Hu
    Cc: Greg Kroah-Hartman
    Cc: Guan Xuetao
    Cc: Ingo Molnar
    Cc: "James E.J. Bottomley"
    Cc: Jonas Bonn
    Cc: Jonathan Corbet
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Martin Schwidefsky
    Cc: Matt Turner
    Cc: Michael Ellerman
    Cc: Michal Hocko
    Cc: Michal Simek
    Cc: Palmer Dabbelt
    Cc: Paul Burton
    Cc: Richard Kuo
    Cc: Richard Weinberger
    Cc: Rich Felker
    Cc: Russell King
    Cc: Serge Semin
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Vineet Gupta
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     
  • All architecures use memblock for early memory management. There is no need
    for the CONFIG_HAVE_MEMBLOCK configuration option.

    [rppt@linux.vnet.ibm.com: of/fdt: fixup #ifdefs]
    Link: http://lkml.kernel.org/r/20180919103457.GA20545@rapoport-lnx
    [rppt@linux.vnet.ibm.com: csky: fixups after bootmem removal]
    Link: http://lkml.kernel.org/r/20180926112744.GC4628@rapoport-lnx
    [rppt@linux.vnet.ibm.com: remove stale #else and the code it protects]
    Link: http://lkml.kernel.org/r/1538067825-24835-1-git-send-email-rppt@linux.vnet.ibm.com
    Link: http://lkml.kernel.org/r/1536927045-23536-4-git-send-email-rppt@linux.vnet.ibm.com
    Signed-off-by: Mike Rapoport
    Acked-by: Michal Hocko
    Tested-by: Jonathan Cameron
    Cc: Catalin Marinas
    Cc: Chris Zankel
    Cc: "David S. Miller"
    Cc: Geert Uytterhoeven
    Cc: Greentime Hu
    Cc: Greg Kroah-Hartman
    Cc: Guan Xuetao
    Cc: Ingo Molnar
    Cc: "James E.J. Bottomley"
    Cc: Jonas Bonn
    Cc: Jonathan Corbet
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Martin Schwidefsky
    Cc: Matt Turner
    Cc: Michael Ellerman
    Cc: Michal Simek
    Cc: Palmer Dabbelt
    Cc: Paul Burton
    Cc: Richard Kuo
    Cc: Richard Weinberger
    Cc: Rich Felker
    Cc: Russell King
    Cc: Serge Semin
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Vineet Gupta
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     
  • All achitectures select NO_BOOTMEM which essentially becomes 'Y' for any
    kernel configuration and therefore it can be removed.

    [alexander.h.duyck@linux.intel.com: remove now defunct NO_BOOTMEM from depends list for deferred init]
    Link: http://lkml.kernel.org/r/20180925201814.3576.15105.stgit@localhost.localdomain
    Link: http://lkml.kernel.org/r/1536927045-23536-3-git-send-email-rppt@linux.vnet.ibm.com
    Signed-off-by: Mike Rapoport
    Signed-off-by: Alexander Duyck
    Acked-by: Michal Hocko
    Cc: Catalin Marinas
    Cc: Chris Zankel
    Cc: "David S. Miller"
    Cc: Geert Uytterhoeven
    Cc: Greentime Hu
    Cc: Greg Kroah-Hartman
    Cc: Guan Xuetao
    Cc: Ingo Molnar
    Cc: "James E.J. Bottomley"
    Cc: Jonas Bonn
    Cc: Jonathan Corbet
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Martin Schwidefsky
    Cc: Matt Turner
    Cc: Michael Ellerman
    Cc: Michal Simek
    Cc: Palmer Dabbelt
    Cc: Paul Burton
    Cc: Richard Kuo
    Cc: Richard Weinberger
    Cc: Rich Felker
    Cc: Russell King
    Cc: Serge Semin
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Vineet Gupta
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     
  • Prefer _THIS_IP_ defined in linux/kernel.h.

    Most definitions of current_text_addr were the same as _THIS_IP_, but
    a few archs had inline assembly instead.

    This patch removes the final call site of current_text_addr, making all
    of the definitions dead code.

    [akpm@linux-foundation.org: fix arch/csky/include/asm/processor.h]
    Link: http://lkml.kernel.org/r/20180911182413.180715-1-ndesaulniers@google.com
    Signed-off-by: Nick Desaulniers
    Cc: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Desaulniers
     

30 Oct, 2018

4 commits

  • xtensa-specific property sections may be section-specific. They should
    be collected in the order of appearance. .gnu.linkonce.prop.* input
    sections should be collected into the .xt.prop output section.

    Signed-off-by: Max Filippov

    Max Filippov
     
  • Xtensa doesn't have anything custom in its debug sections list. Use
    macro DWARF_DEBUG instead of opencoding it.

    Signed-off-by: Max Filippov

    Max Filippov
     
  • This section collects all source .note.* sections together in the
    vmlinux image. Without it .note.Linux section may be placed at address
    0, while the rest of the kernel is at its normal address, resulting in a
    huge vmlinux.bin image that may not be linked into the xtensa Image.elf.

    Cc: stable@vger.kernel.org
    Signed-off-by: Max Filippov

    Max Filippov
     
  • Pull tty/serial updates from Greg KH:
    "Here is the big tty and serial pull request for 4.20-rc1

    Lots of little things here, including a merge from the SPI tree in
    order to keep things simpler for everyone to sync around for one
    platform.

    Major stuff is:

    - tty buffer clearing after use

    - atmel_serial fixes and additions

    - xilinx uart driver updates

    and of course, lots of tiny fixes and additions to individual serial
    drivers.

    All of these have been in linux-next with no reported issues for a
    while"

    * tag 'tty-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (66 commits)
    of: base: Change logic in of_alias_get_alias_list()
    of: base: Fix english spelling in of_alias_get_alias_list()
    serial: sh-sci: do not warn if DMA transfers are not supported
    serial: uartps: Do not allow use aliases >= MAX_UART_INSTANCES
    tty: check name length in tty_find_polling_driver()
    serial: sh-sci: Add r8a77990 support
    tty: wipe buffer if not echoing data
    tty: wipe buffer.
    serial: fsl_lpuart: Remove the alias node dependence
    TTY: sn_console: Replace spin_is_locked() with spin_trylock()
    Revert "serial:serial_core: Allow use of CTS for PPS line discipline"
    serial: 8250_uniphier: add auto-flow-control support
    serial: 8250_uniphier: flatten probe function
    serial: 8250_uniphier: remove unused "fifo-size" property
    dt-bindings: serial: sh-sci: Document r8a7744 bindings
    serial: uartps: Fix missing unlock on error in cdns_get_id()
    tty/serial: atmel: add ISO7816 support
    tty/serial_core: add ISO7816 infrastructure
    serial:serial_core: Allow use of CTS for PPS line discipline
    serial: docs: Fix filename for serial reference implementation
    ...

    Linus Torvalds
     

27 Oct, 2018

3 commits

  • Merge updates from Andrew Morton:

    - a few misc things

    - ocfs2 updates

    - most of MM

    * emailed patches from Andrew Morton : (132 commits)
    hugetlbfs: dirty pages as they are added to pagecache
    mm: export add_swap_extent()
    mm: split SWP_FILE into SWP_ACTIVATED and SWP_FS
    tools/testing/selftests/vm/map_fixed_noreplace.c: add test for MAP_FIXED_NOREPLACE
    mm: thp: relocate flush_cache_range() in migrate_misplaced_transhuge_page()
    mm: thp: fix mmu_notifier in migrate_misplaced_transhuge_page()
    mm: thp: fix MADV_DONTNEED vs migrate_misplaced_transhuge_page race condition
    mm/kasan/quarantine.c: make quarantine_lock a raw_spinlock_t
    mm/gup: cache dev_pagemap while pinning pages
    Revert "x86/e820: put !E820_TYPE_RAM regions into memblock.reserved"
    mm: return zero_resv_unavail optimization
    mm: zero remaining unavailable struct pages
    tools/testing/selftests/vm/gup_benchmark.c: add MAP_HUGETLB option
    tools/testing/selftests/vm/gup_benchmark.c: add MAP_SHARED option
    tools/testing/selftests/vm/gup_benchmark.c: allow user specified file
    tools/testing/selftests/vm/gup_benchmark.c: fix 'write' flag usage
    mm/gup_benchmark.c: add additional pinning methods
    mm/gup_benchmark.c: time put_page()
    mm: don't raise MEMCG_OOM event due to failed high-order allocation
    mm/page-writeback.c: fix range_cyclic writeback vs writepages deadlock
    ...

    Linus Torvalds
     
  • What xtensa has in asm/vga.h is the same as what can be found in
    asm-generic/vga.h. So use the latter header.

    Link: http://lkml.kernel.org/r/20180907132219.12979-1-jslaby@suse.cz
    Signed-off-by: Jiri Slaby
    Acked-by: Max Filippov
    Cc: Chris Zankel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     
  • Pull Devicetree updates from Rob Herring:
    "A bit bigger than normal as I've been busy this cycle.

    There's a few things with dependencies and a few things subsystem
    maintainers didn't pick up, so I'm taking them thru my tree.

    The fixes from Johan didn't get into linux-next, but they've been
    waiting for some time now and they are what's left of what subsystem
    maintainers didn't pick up.

    Summary:

    - Sync dtc with upstream version v1.4.7-14-gc86da84d30e4

    - Work to get rid of direct accesses to struct device_node name and
    type pointers in preparation for removing them. New helpers for
    parsing DT cpu nodes and conversions to use the helpers. printk
    conversions to %pOFn for printing DT node names. Most went thru
    subystem trees, so this is the remainder.

    - Fixes to DT child node lookups to actually be restricted to child
    nodes instead of treewide.

    - Refactoring of dtb targets out of arch code. This makes the support
    more uniform and enables building all dtbs on c6x, microblaze, and
    powerpc.

    - Various DT binding updates for Renesas r8a7744 SoC

    - Vendor prefixes for Facebook, OLPC

    - Restructuring of some ARM binding docs moving some peripheral
    bindings out of board/SoC binding files

    - New "secure-chosen" binding for secure world settings on ARM

    - Dual licensing of 2 DT IRQ binding headers"

    * tag 'devicetree-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (78 commits)
    ARM: dt: relicense two DT binding IRQ headers
    power: supply: twl4030-charger: fix OF sibling-node lookup
    NFC: nfcmrvl_uart: fix OF child-node lookup
    net: stmmac: dwmac-sun8i: fix OF child-node lookup
    net: bcmgenet: fix OF child-node lookup
    drm/msm: fix OF child-node lookup
    drm/mediatek: fix OF sibling-node lookup
    of: Add missing exports of node name compare functions
    dt-bindings: Add OLPC vendor prefix
    dt-bindings: misc: bk4: Add device tree binding for Liebherr's BK4 SPI bus
    dt-bindings: thermal: samsung: Add SPDX license identifier
    dt-bindings: clock: samsung: Add SPDX license identifiers
    dt-bindings: timer: ostm: Add R7S9210 support
    dt-bindings: phy: rcar-gen2: Add r8a7744 support
    dt-bindings: can: rcar_can: Add r8a7744 support
    dt-bindings: timer: renesas, cmt: Document r8a7744 CMT support
    dt-bindings: watchdog: renesas-wdt: Document r8a7744 support
    dt-bindings: thermal: rcar: Add device tree support for r8a7744
    Documentation: dt: Add binding for /secure-chosen/stdout-path
    dt-bindings: arm: zte: Move sysctrl bindings to their own doc
    ...

    Linus Torvalds
     

26 Oct, 2018

1 commit

  • Pull timekeeping updates from Thomas Gleixner:
    "The timers and timekeeping departement provides:

    - Another large y2038 update with further preparations for providing
    the y2038 safe timespecs closer to the syscalls.

    - An overhaul of the SHCMT clocksource driver

    - SPDX license identifier updates

    - Small cleanups and fixes all over the place"

    * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (31 commits)
    tick/sched : Remove redundant cpu_online() check
    clocksource/drivers/dw_apb: Add reset control
    clocksource: Remove obsolete CLOCKSOURCE_OF_DECLARE
    clocksource/drivers: Unify the names to timer-* format
    clocksource/drivers/sh_cmt: Add R-Car gen3 support
    dt-bindings: timer: renesas: cmt: document R-Car gen3 support
    clocksource/drivers/sh_cmt: Properly line-wrap sh_cmt_of_table[] initializer
    clocksource/drivers/sh_cmt: Fix clocksource width for 32-bit machines
    clocksource/drivers/sh_cmt: Fixup for 64-bit machines
    clocksource/drivers/sh_tmu: Convert to SPDX identifiers
    clocksource/drivers/sh_mtu2: Convert to SPDX identifiers
    clocksource/drivers/sh_cmt: Convert to SPDX identifiers
    clocksource/drivers/renesas-ostm: Convert to SPDX identifiers
    clocksource: Convert to using %pOFn instead of device_node.name
    tick/broadcast: Remove redundant check
    RISC-V: Request newstat syscalls
    y2038: signal: Change rt_sigtimedwait to use __kernel_timespec
    y2038: socket: Change recvmmsg to use __kernel_timespec
    y2038: sched: Change sched_rr_get_interval to use __kernel_timespec
    y2038: utimes: Rework #ifdef guards for compat syscalls
    ...

    Linus Torvalds
     

24 Oct, 2018

1 commit

  • Pull security subsystem updates from James Morris:
    "In this patchset, there are a couple of minor updates, as well as some
    reworking of the LSM initialization code from Kees Cook (these prepare
    the way for ordered stackable LSMs, but are a valuable cleanup on
    their own)"

    * 'next-general' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
    LSM: Don't ignore initialization failures
    LSM: Provide init debugging infrastructure
    LSM: Record LSM name in struct lsm_info
    LSM: Convert security_initcall() into DEFINE_LSM()
    vmlinux.lds.h: Move LSM_TABLE into INIT_DATA
    LSM: Convert from initcall to struct lsm_info
    LSM: Remove initcall tracing
    LSM: Rename .security_initcall section to .lsm_info
    vmlinux.lds.h: Avoid copy/paste of security_init section
    LSM: Correctly announce start of LSM initialization
    security: fix LSM description location
    keys: Fix the use of the C++ keyword "private" in uapi/linux/keyctl.h
    seccomp: remove unnecessary unlikely()
    security: tomoyo: Fix obsolete function
    security/capabilities: remove check for -EINVAL

    Linus Torvalds
     

23 Oct, 2018

2 commits

  • Pull locking and misc x86 updates from Ingo Molnar:
    "Lots of changes in this cycle - in part because locking/core attracted
    a number of related x86 low level work which was easier to handle in a
    single tree:

    - Linux Kernel Memory Consistency Model updates (Alan Stern, Paul E.
    McKenney, Andrea Parri)

    - lockdep scalability improvements and micro-optimizations (Waiman
    Long)

    - rwsem improvements (Waiman Long)

    - spinlock micro-optimization (Matthew Wilcox)

    - qspinlocks: Provide a liveness guarantee (more fairness) on x86.
    (Peter Zijlstra)

    - Add support for relative references in jump tables on arm64, x86
    and s390 to optimize jump labels (Ard Biesheuvel, Heiko Carstens)

    - Be a lot less permissive on weird (kernel address) uaccess faults
    on x86: BUG() when uaccess helpers fault on kernel addresses (Jann
    Horn)

    - macrofy x86 asm statements to un-confuse the GCC inliner. (Nadav
    Amit)

    - ... and a handful of other smaller changes as well"

    * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (57 commits)
    locking/lockdep: Make global debug_locks* variables read-mostly
    locking/lockdep: Fix debug_locks off performance problem
    locking/pvqspinlock: Extend node size when pvqspinlock is configured
    locking/qspinlock_stat: Count instances of nested lock slowpaths
    locking/qspinlock, x86: Provide liveness guarantee
    x86/asm: 'Simplify' GEN_*_RMWcc() macros
    locking/qspinlock: Rework some comments
    locking/qspinlock: Re-order code
    locking/lockdep: Remove duplicated 'lock_class_ops' percpu array
    x86/defconfig: Enable CONFIG_USB_XHCI_HCD=y
    futex: Replace spin_is_locked() with lockdep
    locking/lockdep: Make class->ops a percpu counter and move it under CONFIG_DEBUG_LOCKDEP=y
    x86/jump-labels: Macrofy inline assembly code to work around GCC inlining bugs
    x86/cpufeature: Macrofy inline assembly code to work around GCC inlining bugs
    x86/extable: Macrofy inline assembly code to work around GCC inlining bugs
    x86/paravirt: Work around GCC inlining bugs when compiling paravirt ops
    x86/bug: Macrofy the BUG table section handling, to work around GCC inlining bugs
    x86/alternatives: Macrofy lock prefixes to work around GCC inlining bugs
    x86/refcount: Work around GCC inlining bug
    x86/objtool: Use asm macros to work around GCC inlining bugs
    ...

    Linus Torvalds
     
  • Pull dma mapping updates from Christoph Hellwig:
    "First batch of dma-mapping changes for 4.20.

    There will be a second PR as some big changes were only applied just
    before the end of the merge window, and I want to give them a few more
    days in linux-next.

    Summary:

    - mostly more consolidation of the direct mapping code, including
    converting over hexagon, and merging the coherent and non-coherent
    code into a single dma_map_ops instance (me)

    - cleanups for the dma_configure/dma_unconfigure callchains (me)

    - better handling of dma_masks in odd setups (me, Alexander Duyck)

    - better debugging of passing vmalloc address to the DMA API (Stephen
    Boyd)

    - CMA command line parsing fix (He Zhe)"

    * tag 'dma-mapping-4.20' of git://git.infradead.org/users/hch/dma-mapping: (27 commits)
    dma-direct: respect DMA_ATTR_NO_WARN
    dma-mapping: translate __GFP_NOFAIL to DMA_ATTR_NO_WARN
    dma-direct: document the zone selection logic
    dma-debug: Check for drivers mapping invalid addresses in dma_map_single()
    dma-direct: fix return value of dma_direct_supported
    dma-mapping: move dma_default_get_required_mask under ifdef
    dma-direct: always allow dma mask t select DMA_MAYBE_COHERENT from DMA_PERDEV_COHERENT
    dma-mapping: add the missing ARCH_HAS_SYNC_DMA_FOR_CPU_ALL declaration
    dma-mapping: fix panic caused by passing empty cma command line argument
    ...

    Linus Torvalds
     

16 Oct, 2018

1 commit

  • ZONE_DMA is intended for magic < 32-bit pools (usually ISA DMA), which
    isn't required on xtensa. Move all the non-highmem memory into
    ZONE_NORMAL instead to match other architectures.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Max Filippov

    Christoph Hellwig
     

11 Oct, 2018

1 commit

  • Since the struct lsm_info table is not an initcall, we can just move it
    into INIT_DATA like all the other tables.

    Signed-off-by: Kees Cook
    Reviewed-by: Casey Schaufler
    Reviewed-by: John Johansen
    Reviewed-by: James Morris
    Signed-off-by: James Morris

    Kees Cook
     

05 Oct, 2018

1 commit


04 Oct, 2018

1 commit

  • Define the LINKER_SCRIPT when building the linker script as being done
    in other architectures. This is required, because upcoming Makefile changes
    would otherwise break things.

    Signed-off-by: Nadav Amit
    Acked-by: Max Filippov
    Cc: Borislav Petkov
    Cc: Chris Zankel
    Cc: Linus Torvalds
    Cc: Masahiro Yamada
    Cc: Michal Marek
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-xtensa@linux-xtensa.org
    Link: http://lkml.kernel.org/r/20181003213100.189959-2-namit@vmware.com
    Signed-off-by: Ingo Molnar

    Nadav Amit
     

03 Oct, 2018

1 commit

  • Add the ISO7816 ioctl and associated accessors and data structure.
    Drivers can then use this common implementation to handle ISO7816
    (smart cards).

    Signed-off-by: Nicolas Ferre
    [ludovic.desroches@microchip.com: squash and rebase, removal of gpios, checkpatch fixes]
    Signed-off-by: Ludovic Desroches
    Signed-off-by: Greg Kroah-Hartman

    Nicolas Ferre
     

02 Oct, 2018

1 commit

  • There is nothing arch specific about building dtb files other than their
    location under /arch/*/boot/dts/. Keeping each arch aligned is a pain.
    The dependencies and supported targets are all slightly different.
    Also, a cross-compiler for each arch is needed, but really the host
    compiler preprocessor is perfectly fine for building dtbs. Move the
    build rules to a common location and remove the arch specific ones. This
    is done in a single step to avoid warnings about overriding rules.

    The build dependencies had been a mixture of 'scripts' and/or 'prepare'.
    These pull in several dependencies some of which need a target compiler
    (specifically devicetable-offsets.h) and aren't needed to build dtbs.
    All that is really needed is dtc, so adjust the dependencies to only be
    dtc.

    This change enables support 'dtbs_install' on some arches which were
    missing the target.

    Acked-by: Will Deacon
    Acked-by: Paul Burton
    Acked-by: Ley Foon Tan
    Acked-by: Masahiro Yamada
    Cc: Michal Marek
    Cc: Vineet Gupta
    Cc: Russell King
    Cc: Catalin Marinas
    Cc: Yoshinori Sato
    Cc: Michal Simek
    Cc: Ralf Baechle
    Cc: James Hogan
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Chris Zankel
    Cc: Max Filippov
    Cc: linux-kbuild@vger.kernel.org
    Cc: linux-snps-arc@lists.infradead.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: uclinux-h8-devel@lists.sourceforge.jp
    Cc: linux-mips@linux-mips.org
    Cc: nios2-dev@lists.rocketboards.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: linux-xtensa@linux-xtensa.org
    Signed-off-by: Rob Herring

    Rob Herring
     

29 Sep, 2018

1 commit


20 Sep, 2018

1 commit


12 Sep, 2018

2 commits


07 Sep, 2018

1 commit


29 Aug, 2018

2 commits

  • The sys_llseek sytem call is needed on all 32-bit architectures and
    none of the 64-bit ones, so we can remove the __ARCH_WANT_SYS_LLSEEK guard
    and simplify the include/asm-generic/unistd.h header further.

    Since 32-bit tasks can run either natively or in compat mode on 64-bit
    architectures, we have to check for both !CONFIG_64BIT and CONFIG_COMPAT.

    There are a few 64-bit architectures that also reference sys_llseek
    in their 64-bit ABI (e.g. sparc), but I verified that those all
    select CONFIG_COMPAT, so the #if check is still correct here. It's
    a bit odd to include it in the syscall table though, as it's the
    same as sys_lseek() on 64-bit, but with strange calling conventions.

    Acked-by: Geert Uytterhoeven
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     
  • We have four generations of stat() syscalls:
    - the oldstat syscalls that are only used on the older architectures
    - the newstat family that is used on all 64-bit architectures but
    lacked support for large files on 32-bit architectures.
    - the stat64 family that is used mostly on 32-bit architectures to
    replace newstat
    - statx() to replace all of the above, adding 64-bit timestamps among
    other things.

    We already compile stat64 only on those architectures that need it,
    but newstat is always built, including on those that don't reference
    it. This adds a new __ARCH_WANT_NEW_STAT symbol along the lines of
    __ARCH_WANT_OLD_STAT and __ARCH_WANT_STAT64 to control compilation of
    newstat. All architectures that need it use an explict define, the
    others now get a little bit smaller, and future architecture (including
    64-bit targets) won't ever see it.

    Acked-by: Geert Uytterhoeven
    Signed-off-by: Arnd Bergmann

    Arnd Bergmann