13 Jan, 2021

1 commit

  • [ Upstream commit 87dbc209ea04645fd2351981f09eff5d23f8e2e9 ]

    Make mandatory in include/asm-generic/Kbuild and
    remove all arch/*/include/asm/local64.h arch-specific files since they
    only #include .

    This fixes build errors on arch/c6x/ and arch/nios2/ for
    block/blk-iocost.c.

    Build-tested on 21 of 25 arch-es. (tools problems on the others)

    Yes, we could even rename to
    and change all #includes to use
    instead.

    Link: https://lkml.kernel.org/r/20201227024446.17018-1-rdunlap@infradead.org
    Signed-off-by: Randy Dunlap
    Suggested-by: Christoph Hellwig
    Reviewed-by: Masahiro Yamada
    Cc: Jens Axboe
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Aurelien Jacquiot
    Cc: Peter Zijlstra
    Cc: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Sasha Levin

    Randy Dunlap
     

21 Aug, 2020

1 commit

  • quite a few architectures have the same csum_partial_copy_nocheck() -
    simply memcpy() the data and then return the csum of the copy.

    hexagon, parisc, ia64, s390, um: explicitly spelled out that way.

    arc, arm64, csky, h8300, m68k/nommu, microblaze, mips/GENERIC_CSUM, nds32,
    nios2, openrisc, riscv, unicore32: end up picking the same thing spelled
    out in lib/checksum.h (with varying amounts of perversions along the way).

    everybody else (alpha, arm, c6x, m68k/mmu, mips/!GENERIC_CSUM, powerpc,
    sh, sparc, x86, xtensa) have non-generic variants. For all except c6x
    the declaration is in their asm/checksum.h. c6x uses the wrapper
    from asm-generic/checksum.h that would normally lead to the lib/checksum.h
    instance, but in case of c6x we end up using an asm function from arch/c6x
    instead.

    Screw that mess - have architectures with private instances define
    _HAVE_ARCH_CSUM_AND_COPY in their asm/checksum.h and have the default
    one right in net/checksum.h conditional on _HAVE_ARCH_CSUM_AND_COPY
    *not* defined.

    Signed-off-by: Al Viro

    Al Viro
     

08 Aug, 2020

1 commit

  • Most architectures define pgd_free() as a wrapper for free_page().

    Provide a generic version in asm-generic/pgalloc.h and enable its use for
    most architectures.

    Signed-off-by: Mike Rapoport
    Signed-off-by: Andrew Morton
    Reviewed-by: Pekka Enberg
    Acked-by: Geert Uytterhoeven [m68k]
    Cc: Abdul Haleem
    Cc: Andy Lutomirski
    Cc: Arnd Bergmann
    Cc: Christophe Leroy
    Cc: Joerg Roedel
    Cc: Joerg Roedel
    Cc: Max Filippov
    Cc: Peter Zijlstra (Intel)
    Cc: Satheesh Rajendran
    Cc: Stafford Horne
    Cc: Stephen Rothwell
    Cc: Steven Rostedt
    Cc: Matthew Wilcox
    Link: http://lkml.kernel.org/r/20200627143453.31835-7-rppt@kernel.org
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     

29 Jul, 2020

1 commit

  • This patch moves ATOMIC_INIT from asm/atomic.h into linux/types.h.
    This allows users of atomic_t to use ATOMIC_INIT without having to
    include atomic.h as that way may lead to header loops.

    Signed-off-by: Herbert Xu
    Signed-off-by: Peter Zijlstra (Intel)
    Acked-by: Waiman Long
    Link: https://lkml.kernel.org/r/20200729123105.GB7047@gondor.apana.org.au

    Herbert Xu
     

10 Jun, 2020

3 commits

  • All architectures define pte_index() as

    (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)

    and all architectures define pte_offset_kernel() as an entry in the array
    of PTEs indexed by the pte_index().

    For the most architectures the pte_offset_kernel() implementation relies
    on the availability of pmd_page_vaddr() that converts a PMD entry value to
    the virtual address of the page containing PTEs array.

    Let's move x86 definitions of the PTE accessors to the generic place in
    and then simply drop the respective definitions from the
    other architectures.

    The architectures that didn't provide pmd_page_vaddr() are updated to have
    that defined.

    The generic implementation of pte_offset_kernel() can be overridden by an
    architecture and alpha makes use of this because it has special ordering
    requirements for its version of pte_offset_kernel().

    [rppt@linux.ibm.com: v2]
    Link: http://lkml.kernel.org/r/20200514170327.31389-11-rppt@kernel.org
    [rppt@linux.ibm.com: update]
    Link: http://lkml.kernel.org/r/20200514170327.31389-12-rppt@kernel.org
    [rppt@linux.ibm.com: update]
    Link: http://lkml.kernel.org/r/20200514170327.31389-13-rppt@kernel.org
    [akpm@linux-foundation.org: fix x86 warning]
    [sfr@canb.auug.org.au: fix powerpc build]
    Link: http://lkml.kernel.org/r/20200607153443.GB738695@linux.ibm.com

    Signed-off-by: Mike Rapoport
    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Cc: Arnd Bergmann
    Cc: Borislav Petkov
    Cc: Brian Cain
    Cc: Catalin Marinas
    Cc: Chris Zankel
    Cc: "David S. Miller"
    Cc: Geert Uytterhoeven
    Cc: Greentime Hu
    Cc: Greg Ungerer
    Cc: Guan Xuetao
    Cc: Guo Ren
    Cc: Heiko Carstens
    Cc: Helge Deller
    Cc: Ingo Molnar
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Matthew Wilcox
    Cc: Matt Turner
    Cc: Max Filippov
    Cc: Michael Ellerman
    Cc: Michal Simek
    Cc: Nick Hu
    Cc: Paul Walmsley
    Cc: Richard Weinberger
    Cc: Rich Felker
    Cc: Russell King
    Cc: Stafford Horne
    Cc: Thomas Bogendoerfer
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Vincent Chen
    Cc: Vineet Gupta
    Cc: Will Deacon
    Cc: Yoshinori Sato
    Link: http://lkml.kernel.org/r/20200514170327.31389-10-rppt@kernel.org
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     
  • The powerpc 32-bit implementation of pgtable has nice shortcuts for
    accessing kernel PMD and PTE for a given virtual address. Make these
    helpers available for all architectures.

    [rppt@linux.ibm.com: microblaze: fix page table traversal in setup_rt_frame()]
    Link: http://lkml.kernel.org/r/20200518191511.GD1118872@kernel.org
    [akpm@linux-foundation.org: s/pmd_ptr_k/pmd_off_k/ in various powerpc places]

    Signed-off-by: Mike Rapoport
    Signed-off-by: Andrew Morton
    Cc: Arnd Bergmann
    Cc: Borislav Petkov
    Cc: Brian Cain
    Cc: Catalin Marinas
    Cc: Chris Zankel
    Cc: "David S. Miller"
    Cc: Geert Uytterhoeven
    Cc: Greentime Hu
    Cc: Greg Ungerer
    Cc: Guan Xuetao
    Cc: Guo Ren
    Cc: Heiko Carstens
    Cc: Helge Deller
    Cc: Ingo Molnar
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Matthew Wilcox
    Cc: Matt Turner
    Cc: Max Filippov
    Cc: Michael Ellerman
    Cc: Michal Simek
    Cc: Nick Hu
    Cc: Paul Walmsley
    Cc: Richard Weinberger
    Cc: Rich Felker
    Cc: Russell King
    Cc: Stafford Horne
    Cc: Thomas Bogendoerfer
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Vincent Chen
    Cc: Vineet Gupta
    Cc: Will Deacon
    Cc: Yoshinori Sato
    Link: http://lkml.kernel.org/r/20200514170327.31389-9-rppt@kernel.org
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     
  • The include/linux/pgtable.h is going to be the home of generic page table
    manipulation functions.

    Start with moving asm-generic/pgtable.h to include/linux/pgtable.h and
    make the latter include asm/pgtable.h.

    Signed-off-by: Mike Rapoport
    Signed-off-by: Andrew Morton
    Cc: Arnd Bergmann
    Cc: Borislav Petkov
    Cc: Brian Cain
    Cc: Catalin Marinas
    Cc: Chris Zankel
    Cc: "David S. Miller"
    Cc: Geert Uytterhoeven
    Cc: Greentime Hu
    Cc: Greg Ungerer
    Cc: Guan Xuetao
    Cc: Guo Ren
    Cc: Heiko Carstens
    Cc: Helge Deller
    Cc: Ingo Molnar
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Matthew Wilcox
    Cc: Matt Turner
    Cc: Max Filippov
    Cc: Michael Ellerman
    Cc: Michal Simek
    Cc: Nick Hu
    Cc: Paul Walmsley
    Cc: Richard Weinberger
    Cc: Rich Felker
    Cc: Russell King
    Cc: Stafford Horne
    Cc: Thomas Bogendoerfer
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Vincent Chen
    Cc: Vineet Gupta
    Cc: Will Deacon
    Cc: Yoshinori Sato
    Link: http://lkml.kernel.org/r/20200514170327.31389-3-rppt@kernel.org
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     

09 Jun, 2020

1 commit

  • Hexagon needs almost no cache flushing routines of its own. Rely on
    asm-generic/cacheflush.h for the defaults.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Acked-by: Brian Cain
    Link: http://lkml.kernel.org/r/20200515143646.3857579-12-hch@lst.de
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

05 Jun, 2020

1 commit

  • The hexagon architecture has 2 level page tables and as such most of the
    page table folding is already implemented in asm-generic/pgtable-nopmd.h.

    Fixup the only place in arch/hexagon to unfold the p4d level and remove
    __ARCH_USE_5LEVEL_HACK.

    Signed-off-by: Mike Rapoport
    Signed-off-by: Andrew Morton
    Cc: Arnd Bergmann
    Cc: Benjamin Herrenschmidt
    Cc: Brian Cain
    Cc: Catalin Marinas
    Cc: Christophe Leroy
    Cc: Fenghua Yu
    Cc: Geert Uytterhoeven
    Cc: Guan Xuetao
    Cc: James Morse
    Cc: Jonas Bonn
    Cc: Julien Thierry
    Cc: Ley Foon Tan
    Cc: Marc Zyngier
    Cc: Michael Ellerman
    Cc: Paul Mackerras
    Cc: Rich Felker
    Cc: Russell King
    Cc: Stafford Horne
    Cc: Stefan Kristiansson
    Cc: Suzuki K Poulose
    Cc: Tony Luck
    Cc: Will Deacon
    Cc: Yoshinori Sato
    Link: http://lkml.kernel.org/r/20200414153455.21744-5-rppt@kernel.org
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     

23 Apr, 2020

1 commit

  • As the bug report [1] pointed out, must be included
    after .

    I believe we should not impose any include order restriction. We often
    sort include directives alphabetically, but it is just coding style
    convention. Technically, we can include header files in any order by
    making every header self-contained.

    Currently, arch-specific MODULE_ARCH_VERMAGIC is defined in
    , which is not included from .

    Hence, the straight-forward fix-up would be as follows:

    |--- a/include/linux/vermagic.h
    |+++ b/include/linux/vermagic.h
    |@@ -1,5 +1,6 @@
    | /* SPDX-License-Identifier: GPL-2.0 */
    | #include
    |+#include
    |
    | /* Simply sanity version stamp for modules. */
    | #ifdef CONFIG_SMP

    This works enough, but for further cleanups, I split MODULE_ARCH_VERMAGIC
    definitions into .

    With this, and will be orthogonal,
    and the location of MODULE_ARCH_VERMAGIC definitions will be consistent.

    For arc and ia64, MODULE_PROC_FAMILY is only used for defining
    MODULE_ARCH_VERMAGIC. I squashed it.

    For hexagon, nds32, and xtensa, I removed entirely
    because they contained nothing but MODULE_ARCH_VERMAGIC definition.
    Kbuild will automatically generate at build-time,
    wrapping .

    [1] https://lore.kernel.org/lkml/20200411155623.GA22175@zn.tnic

    Reported-by: Borislav Petkov
    Signed-off-by: Masahiro Yamada
    Acked-by: Jessica Yu

    Masahiro Yamada
     

11 Apr, 2020

2 commits

  • Currently there are many platforms that dont enable ARCH_HAS_PTE_SPECIAL
    but required to define quite similar fallback stubs for special page
    table entry helpers such as pte_special() and pte_mkspecial(), as they
    get build in generic MM without a config check. This creates two
    generic fallback stub definitions for these helpers, eliminating much
    code duplication.

    mips platform has a special case where pte_special() and pte_mkspecial()
    visibility is wider than what ARCH_HAS_PTE_SPECIAL enablement requires.
    This restricts those symbol visibility in order to avoid redefinitions
    which is now exposed through this new generic stubs and subsequent build
    failure. arm platform set_pte_at() definition needs to be moved into a
    C file just to prevent a build failure.

    [anshuman.khandual@arm.com: use defined(CONFIG_ARCH_HAS_PTE_SPECIAL) in mips per Thomas]
    Link: http://lkml.kernel.org/r/1583851924-21603-1-git-send-email-anshuman.khandual@arm.com
    Signed-off-by: Anshuman Khandual
    Signed-off-by: Andrew Morton
    Acked-by: Guo Ren [csky]
    Acked-by: Geert Uytterhoeven [m68k]
    Acked-by: Stafford Horne [openrisc]
    Acked-by: Helge Deller [parisc]
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Matt Turner
    Cc: Russell King
    Cc: Brian Cain
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: Sam Creasey
    Cc: Michal Simek
    Cc: Ralf Baechle
    Cc: Paul Burton
    Cc: Nick Hu
    Cc: Greentime Hu
    Cc: Vincent Chen
    Cc: Ley Foon Tan
    Cc: Jonas Bonn
    Cc: Stefan Kristiansson
    Cc: "James E.J. Bottomley"
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Richard Weinberger
    Cc: Anton Ivanov
    Cc: Guan Xuetao
    Cc: Chris Zankel
    Cc: Max Filippov
    Cc: Thomas Bogendoerfer
    Link: http://lkml.kernel.org/r/1583802551-15406-1-git-send-email-anshuman.khandual@arm.com
    Signed-off-by: Linus Torvalds

    Anshuman Khandual
     
  • There are many platforms with exact same value for VM_DATA_DEFAULT_FLAGS
    This creates a default value for VM_DATA_DEFAULT_FLAGS in line with the
    existing VM_STACK_DEFAULT_FLAGS. While here, also define some more
    macros with standard VMA access flag combinations that are used
    frequently across many platforms. Apart from simplification, this
    reduces code duplication as well.

    Signed-off-by: Anshuman Khandual
    Signed-off-by: Andrew Morton
    Reviewed-by: Vlastimil Babka
    Acked-by: Geert Uytterhoeven
    Cc: Richard Henderson
    Cc: Vineet Gupta
    Cc: Russell King
    Cc: Catalin Marinas
    Cc: Mark Salter
    Cc: Guo Ren
    Cc: Yoshinori Sato
    Cc: Brian Cain
    Cc: Tony Luck
    Cc: Michal Simek
    Cc: Ralf Baechle
    Cc: Paul Burton
    Cc: Nick Hu
    Cc: Ley Foon Tan
    Cc: Jonas Bonn
    Cc: "James E.J. Bottomley"
    Cc: Michael Ellerman
    Cc: Paul Walmsley
    Cc: Heiko Carstens
    Cc: Rich Felker
    Cc: "David S. Miller"
    Cc: Guan Xuetao
    Cc: Thomas Gleixner
    Cc: Jeff Dike
    Cc: Chris Zankel
    Link: http://lkml.kernel.org/r/1583391014-8170-2-git-send-email-anshuman.khandual@arm.com
    Signed-off-by: Linus Torvalds

    Anshuman Khandual
     

03 Apr, 2020

1 commit

  • Change a header to mandatory-y if both of the following are met:

    [1] At least one architecture (except um) specifies it as generic-y in
    arch/*/include/asm/Kbuild

    [2] Every architecture (except um) either has its own implementation
    (arch/*/include/asm/*.h) or specifies it as generic-y in
    arch/*/include/asm/Kbuild

    This commit was generated by the following shell script.

    ----------------------------------->8-----------------------------------

    arches=$(cd arch; ls -1 | sed -e '/Kconfig/d' -e '/um/d')

    tmpfile=$(mktemp)

    grep "^mandatory-y +=" include/asm-generic/Kbuild > $tmpfile

    find arch -path 'arch/*/include/asm/Kbuild' |
    xargs sed -n 's/^generic-y += \(.*\)/\1/p' | sort -u |
    while read header
    do
    mandatory=yes

    for arch in $arches
    do
    if ! grep -q "generic-y += $header" arch/$arch/include/asm/Kbuild &&
    ! [ -f arch/$arch/include/asm/$header ]; then
    mandatory=no
    break
    fi
    done

    if [ "$mandatory" = yes ]; then
    echo "mandatory-y += $header" >> $tmpfile

    for arch in $arches
    do
    sed -i "/generic-y += $header/d" arch/$arch/include/asm/Kbuild
    done
    fi

    done

    sed -i '/^mandatory-y +=/d' include/asm-generic/Kbuild

    LANG=C sort $tmpfile >> include/asm-generic/Kbuild

    ----------------------------------->8-----------------------------------

    One obvious benefit is the diff stat:

    25 files changed, 52 insertions(+), 557 deletions(-)

    It is tedious to list generic-y for each arch that needs it.

    So, mandatory-y works like a fallback default (by just wrapping
    asm-generic one) when arch does not have a specific header
    implementation.

    See the following commits:

    def3f7cefe4e81c296090e1722a76551142c227c
    a1b39bae16a62ce4aae02d958224f19316d98b24

    It is tedious to convert headers one by one, so I processed by a shell
    script.

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Andrew Morton
    Cc: Michal Simek
    Cc: Christoph Hellwig
    Cc: Arnd Bergmann
    Link: http://lkml.kernel.org/r/20200210175452.5030-1-masahiroy@kernel.org
    Signed-off-by: Linus Torvalds

    Masahiro Yamada
     

28 Mar, 2020

2 commits


21 Mar, 2020

1 commit

  • The defconfig compiles without linux/mm.h. With mm.h included the
    include chain leands to:
    | CC kernel/locking/percpu-rwsem.o
    | In file included from include/linux/huge_mm.h:8,
    | from include/linux/mm.h:567,
    | from arch/hexagon/include/asm/uaccess.h:,
    | from include/linux/uaccess.h:11,
    | from include/linux/sched/task.h:11,
    | from include/linux/sched/signal.h:9,
    | from include/linux/rcuwait.h:6,
    | from include/linux/percpu-rwsem.h:8,
    | from kernel/locking/percpu-rwsem.c:6:
    | include/linux/fs.h:1422:29: error: array type has incomplete element type 'struct percpu_rw_semaphore'
    | 1422 | struct percpu_rw_semaphore rw_sem[SB_FREEZE_LEVELS];

    once rcuwait.h includes linux/sched/signal.h.

    Remove the linux/mm.h include.

    Reported-by: kbuild test robot
    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Peter Zijlstra (Intel)
    Link: https://lkml.kernel.org/r/20200321113241.531525286@linutronix.de

    Sebastian Andrzej Siewior
     

29 Jan, 2020

1 commit

  • Pull EFI updates from Ingo Molnar:
    "The main changes in this cycle were:

    - Cleanup of the GOP [graphics output] handling code in the EFI stub

    - Complete refactoring of the mixed mode handling in the x86 EFI stub

    - Overhaul of the x86 EFI boot/runtime code

    - Increase robustness for mixed mode code

    - Add the ability to disable DMA at the root port level in the EFI
    stub

    - Get rid of RWX mappings in the EFI memory map and page tables,
    where possible

    - Move the support code for the old EFI memory mapping style into its
    only user, the SGI UV1+ support code.

    - plus misc fixes, updates, smaller cleanups.

    ... and due to interactions with the RWX changes, another round of PAT
    cleanups make a guest appearance via the EFI tree - with no side
    effects intended"

    * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (75 commits)
    efi/x86: Disable instrumentation in the EFI runtime handling code
    efi/libstub/x86: Fix EFI server boot failure
    efi/x86: Disallow efi=old_map in mixed mode
    x86/boot/compressed: Relax sed symbol type regex for LLVM ld.lld
    efi/x86: avoid KASAN false positives when accessing the 1: 1 mapping
    efi: Fix handling of multiple efi_fake_mem= entries
    efi: Fix efi_memmap_alloc() leaks
    efi: Add tracking for dynamically allocated memmaps
    efi: Add a flags parameter to efi_memory_map
    efi: Fix comment for efi_mem_type() wrt absent physical addresses
    efi/arm: Defer probe of PCIe backed efifb on DT systems
    efi/x86: Limit EFI old memory map to SGI UV machines
    efi/x86: Avoid RWX mappings for all of DRAM
    efi/x86: Don't map the entire kernel text RW for mixed mode
    x86/mm: Fix NX bit clearing issue in kernel_map_pages_in_pgd
    efi/libstub/x86: Fix unused-variable warning
    efi/libstub/x86: Use mandatory 16-byte stack alignment in mixed mode
    efi/libstub/x86: Use const attribute for efi_is_64bit()
    efi: Allow disabling PCI busmastering on bridges during boot
    efi/x86: Allow translating 64-bit arguments for mixed mode calls
    ...

    Linus Torvalds
     

11 Jan, 2020

1 commit


06 Jan, 2020

1 commit


05 Jan, 2020

2 commits

  • Similar to commit 38e45d81d14e ("sparc64: implement ioremap_uc") define
    ioremap_uc for hexagon to avoid errors from
    -Wimplicit-function-definition.

    Link: http://lkml.kernel.org/r/20191209222956.239798-2-ndesaulniers@google.com
    Link: https://github.com/ClangBuiltLinux/linux/issues/797
    Fixes: e537654b7039 ("lib: devres: add a helper function for ioremap_uc")
    Signed-off-by: Nick Desaulniers
    Suggested-by: Nathan Chancellor
    Acked-by: Brian Cain
    Cc: Lee Jones
    Cc: Andy Shevchenko
    Cc: Tuowen Zhao
    Cc: Mika Westerberg
    Cc: Luis Chamberlain
    Cc: Greg Kroah-Hartman
    Cc: Alexios Zavras
    Cc: Allison Randal
    Cc: Will Deacon
    Cc: Richard Fontana
    Cc: Thomas Gleixner
    Cc: Peter Zijlstra
    Cc: Boqun Feng
    Cc: Ingo Molnar
    Cc: Geert Uytterhoeven
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Desaulniers
     
  • Hexagon requires that register predicates in assembly be parenthesized.

    Link: https://github.com/ClangBuiltLinux/linux/issues/754
    Link: http://lkml.kernel.org/r/20191209222956.239798-3-ndesaulniers@google.com
    Signed-off-by: Nick Desaulniers
    Suggested-by: Sid Manning
    Acked-by: Brian Cain
    Cc: Lee Jones
    Cc: Andy Shevchenko
    Cc: Tuowen Zhao
    Cc: Mika Westerberg
    Cc: Luis Chamberlain
    Cc: Greg Kroah-Hartman
    Cc: Alexios Zavras
    Cc: Allison Randal
    Cc: Will Deacon
    Cc: Richard Fontana
    Cc: Thomas Gleixner
    Cc: Peter Zijlstra
    Cc: Boqun Feng
    Cc: Ingo Molnar
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Desaulniers
     

10 Dec, 2019

1 commit


03 Dec, 2019

1 commit

  • Pull Kbuild updates from Masahiro Yamada:

    - remove unneeded asm headers from hexagon, ia64

    - add 'dir-pkg' target, which works like 'tar-pkg' but skips archiving

    - add 'helpnewconfig' target, which shows help for new CONFIG options

    - support 'make nsdeps' for external modules

    - make rebuilds faster by deleting $(wildcard $^) checks

    - remove compile tests for kernel-space headers

    - refactor modpost to simplify modversion handling

    - make single target builds faster

    - optimize and clean up scripts/kallsyms.c

    - refactor various Makefiles and scripts

    * tag 'kbuild-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (59 commits)
    MAINTAINERS: update Kbuild/Kconfig maintainer's email address
    scripts/kallsyms: remove redundant initializers
    scripts/kallsyms: put check_symbol_range() calls close together
    scripts/kallsyms: make check_symbol_range() void function
    scripts/kallsyms: move ignored symbol types to is_ignored_symbol()
    scripts/kallsyms: move more patterns to the ignored_prefixes array
    scripts/kallsyms: skip ignored symbols very early
    scripts/kallsyms: add const qualifiers where possible
    scripts/kallsyms: make find_token() return (unsigned char *)
    scripts/kallsyms: replace prefix_underscores_count() with strspn()
    scripts/kallsyms: add sym_name() to mitigate cast ugliness
    scripts/kallsyms: remove unneeded length check for prefix matching
    scripts/kallsyms: remove redundant is_arm_mapping_symbol()
    scripts/kallsyms: set relative_base more effectively
    scripts/kallsyms: shrink table before sorting it
    scripts/kallsyms: fix definitely-lost memory leak
    scripts/kallsyms: remove unneeded #ifndef ARRAY_SIZE
    kbuild: make single target builds even faster
    modpost: respect the previous export when 'exported twice' is warned
    modpost: do not set ->preloaded for symbols from Module.symvers
    ...

    Linus Torvalds
     

12 Nov, 2019

2 commits


11 Nov, 2019

1 commit


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
     

22 Jul, 2019

1 commit

  • The hexagon implementation pte_alloc_one(), pte_alloc_one_kernel(),
    pte_free_kernel() and pte_free() is identical to the generic except of
    lack of __GFP_ACCOUNT for the user PTEs allocation.

    Switch hexagon to use generic version of these functions.

    Signed-off-by: Mike Rapoport
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     

17 Jul, 2019

1 commit

  • syscall_get_* functions are required to be implemented on all
    architectures in order to extend the generic ptrace API with
    PTRACE_GET_SYSCALL_INFO request.

    This adds remaining 2 syscall_get_* functions as documented in
    asm-generic/syscall.h: syscall_get_error and syscall_get_return_value.

    Link: http://lkml.kernel.org/r/20190510152756.GB28558@altlinux.org
    Signed-off-by: Dmitry V. Levin
    Cc: Richard Kuo
    Cc: Elvira Khabirova
    Cc: Eugene Syromyatnikov
    Cc: Oleg Nesterov
    Cc: Andy Lutomirski
    Cc: Benjamin Herrenschmidt
    Cc: Greentime Hu
    Cc: Helge Deller [parisc]
    Cc: James E.J. Bottomley
    Cc: James Hogan
    Cc: kbuild test robot
    Cc: Kees Cook
    Cc: Michael Ellerman
    Cc: Paul Burton
    Cc: Paul Mackerras
    Cc: Ralf Baechle
    Cc: Shuah Khan
    Cc: Vincent Chen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dmitry V. Levin
     

05 Jun, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 and
    only version 2 as published by the free software foundation this
    program is distributed in the hope that it will be useful but
    without any warranty without even the implied warranty of
    merchantability or fitness for a particular purpose see the gnu
    general public license for more details you should have received a
    copy of the gnu general public license along with this program if
    not write to the free software foundation inc 51 franklin street
    fifth floor boston ma 02110 1301 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 94 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Reviewed-by: Alexios Zavras
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190529141334.043630402@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

31 May, 2019

1 commit

  • Add SPDX license identifiers to all Make/Kconfig files which:

    - Have no license information of any form

    These files fall under the project license, GPL v2 only. The resulting SPDX
    license identifier is:

    GPL-2.0

    Reported-by: Masahiro Yamada
    Signed-off-by: Greg Kroah-Hartman
    Reviewed-by: Kate Stewart
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

17 May, 2019

1 commit

  • Pull nommu generic uaccess updates from Arnd Bergmann:
    "asm-generic: kill and improve nommu generic uaccess helpers

    Christoph Hellwig writes:

    This is a series doing two somewhat interwinded things. It improves
    the asm-generic nommu uaccess helper to optionally be entirely
    generic and not require any arch helpers for the actual uaccess.
    For the generic uaccess.h to actually be generically useful I also
    had to kill off the mess we made of , which really
    shouldn't exist on most architectures"

    * tag 'asm-generic-nommu' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
    asm-generic: optimize generic uaccess for 8-byte loads and stores
    asm-generic: provide entirely generic nommu uaccess
    arch: mostly remove
    asm-generic: don't include from

    Linus Torvalds
     

15 May, 2019

1 commit


08 May, 2019

1 commit

  • Pull audit updates from Paul Moore:
    "We've got a reasonably broad set of audit patches for the v5.2 merge
    window, the highlights are below:

    - The biggest change, and the source of all the arch/* changes, is
    the patchset from Dmitry to help enable some of the work he is
    doing around PTRACE_GET_SYSCALL_INFO.

    To be honest, including this in the audit tree is a bit of a
    stretch, but it does help move audit a little further along towards
    proper syscall auditing for all arches, and everyone else seemed to
    agree that audit was a "good" spot for this to land (or maybe they
    just didn't want to merge it? dunno.).

    - We can now audit time/NTP adjustments.

    - We continue the work to connect associated audit records into a
    single event"

    * tag 'audit-pr-20190507' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: (21 commits)
    audit: fix a memory leak bug
    ntp: Audit NTP parameters adjustment
    timekeeping: Audit clock adjustments
    audit: purge unnecessary list_empty calls
    audit: link integrity evm_write_xattrs record to syscall event
    syscall_get_arch: add "struct task_struct *" argument
    unicore32: define syscall_get_arch()
    Move EM_UNICORE to uapi/linux/elf-em.h
    nios2: define syscall_get_arch()
    nds32: define syscall_get_arch()
    Move EM_NDS32 to uapi/linux/elf-em.h
    m68k: define syscall_get_arch()
    hexagon: define syscall_get_arch()
    Move EM_HEXAGON to uapi/linux/elf-em.h
    h8300: define syscall_get_arch()
    c6x: define syscall_get_arch()
    arc: define syscall_get_arch()
    Move EM_ARCOMPACT and EM_ARCV2 to uapi/linux/elf-em.h
    audit: Make audit_log_cap and audit_copy_inode static
    audit: connect LOGIN record to its syscall record
    ...

    Linus Torvalds
     

07 May, 2019

3 commits

  • Pull mmiowb removal from Will Deacon:
    "Remove Mysterious Macro Intended to Obscure Weird Behaviours (mmiowb())

    Remove mmiowb() from the kernel memory barrier API and instead, for
    architectures that need it, hide the barrier inside spin_unlock() when
    MMIO has been performed inside the critical section.

    The only relatively recent changes have been addressing review
    comments on the documentation, which is in a much better shape thanks
    to the efforts of Ben and Ingo.

    I was initially planning to split this into two pull requests so that
    you could run the coccinelle script yourself, however it's been plain
    sailing in linux-next so I've just included the whole lot here to keep
    things simple"

    * tag 'arm64-mmiowb' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (23 commits)
    docs/memory-barriers.txt: Update I/O section to be clearer about CPU vs thread
    docs/memory-barriers.txt: Fix style, spacing and grammar in I/O section
    arch: Remove dummy mmiowb() definitions from arch code
    net/ethernet/silan/sc92031: Remove stale comment about mmiowb()
    i40iw: Redefine i40iw_mmiowb() to do nothing
    scsi/qla1280: Remove stale comment about mmiowb()
    drivers: Remove explicit invocations of mmiowb()
    drivers: Remove useless trailing comments from mmiowb() invocations
    Documentation: Kill all references to mmiowb()
    riscv/mmiowb: Hook up mmwiob() implementation to asm-generic code
    powerpc/mmiowb: Hook up mmwiob() implementation to asm-generic code
    ia64/mmiowb: Add unconditional mmiowb() to arch_spin_unlock()
    mips/mmiowb: Add unconditional mmiowb() to arch_spin_unlock()
    sh/mmiowb: Add unconditional mmiowb() to arch_spin_unlock()
    m68k/io: Remove useless definition of mmiowb()
    nds32/io: Remove useless definition of mmiowb()
    x86/io: Remove useless definition of mmiowb()
    arm64/io: Remove useless definition of mmiowb()
    ARM/io: Remove useless definition of mmiowb()
    mmiowb: Hook up mmiowb helpers to spinlocks and generic I/O accessors
    ...

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

    - rwsem unification and simpler micro-optimizations to prepare for
    more intrusive (and more lucrative) scalability improvements in
    v5.3 (Waiman Long)

    - Lockdep irq state tracking flag usage cleanups (Frederic
    Weisbecker)

    - static key improvements (Jakub Kicinski, Peter Zijlstra)

    - misc updates, cleanups and smaller fixes"

    * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (26 commits)
    locking/lockdep: Remove unnecessary unlikely()
    locking/static_key: Don't take sleeping locks in __static_key_slow_dec_deferred()
    locking/static_key: Factor out the fast path of static_key_slow_dec()
    locking/static_key: Add support for deferred static branches
    locking/lockdep: Test all incompatible scenarios at once in check_irq_usage()
    locking/lockdep: Avoid bogus Clang warning
    locking/lockdep: Generate LOCKF_ bit composites
    locking/lockdep: Use expanded masks on find_usage_*() functions
    locking/lockdep: Map remaining magic numbers to lock usage mask names
    locking/lockdep: Move valid_state() inside CONFIG_TRACE_IRQFLAGS && CONFIG_PROVE_LOCKING
    locking/rwsem: Prevent unneeded warning during locking selftest
    locking/rwsem: Optimize rwsem structure for uncontended lock acquisition
    locking/rwsem: Enable lock event counting
    locking/lock_events: Don't show pvqspinlock events on bare metal
    locking/lock_events: Make lock_events available for all archs & other locks
    locking/qspinlock_stat: Introduce generic lockevent_*() counting APIs
    locking/rwsem: Enhance DEBUG_RWSEMS_WARN_ON() macro
    locking/rwsem: Add debug check for __down_read*()
    locking/rwsem: Micro-optimize rwsem_try_read_lock_unqueued()
    locking/rwsem: Move rwsem internal function declarations to rwsem-xadd.h
    ...

    Linus Torvalds
     
  • Pull unified TLB flushing from Ingo Molnar:
    "This contains the generic mmu_gather feature from Peter Zijlstra,
    which is an all-arch unification of TLB flushing APIs, via the
    following (broad) steps:

    - enhance the APIs to cover more arch details

    - convert most TLB flushing arch implementations to the generic
    APIs.

    - remove leftovers of per arch implementations

    After this series every single architecture makes use of the unified
    TLB flushing APIs"

    * 'core-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    mm/resource: Use resource_overlaps() to simplify region_intersects()
    ia64/tlb: Eradicate tlb_migrate_finish() callback
    asm-generic/tlb: Remove tlb_table_flush()
    asm-generic/tlb: Remove tlb_flush_mmu_free()
    asm-generic/tlb: Remove CONFIG_HAVE_GENERIC_MMU_GATHER
    asm-generic/tlb: Remove arch_tlb*_mmu()
    s390/tlb: Convert to generic mmu_gather
    asm-generic/tlb: Introduce CONFIG_HAVE_MMU_GATHER_NO_GATHER=y
    arch/tlb: Clean up simple architectures
    um/tlb: Convert to generic mmu_gather
    sh/tlb: Convert SH to generic mmu_gather
    ia64/tlb: Convert to generic mmu_gather
    arm/tlb: Convert to generic mmu_gather
    asm-generic/tlb, arch: Invert CONFIG_HAVE_RCU_TABLE_INVALIDATE
    asm-generic/tlb, ia64: Conditionally provide tlb_migrate_finish()
    asm-generic/tlb: Provide generic tlb_flush() based on flush_tlb_mm()
    asm-generic/tlb, arch: Provide generic tlb_flush() based on flush_tlb_range()
    asm-generic/tlb, arch: Provide generic VIPT cache flush
    asm-generic/tlb, arch: Provide CONFIG_HAVE_MMU_GATHER_PAGE_SIZE
    asm-generic/tlb: Provide a comment

    Linus Torvalds
     

24 Apr, 2019

1 commit