08 Aug, 2020

1 commit

  • After removal of CONFIG_HAVE_MEMBLOCK_NODE_MAP we have two equivalent
    functions that call memory_present() for each region in memblock.memory:
    sparse_memory_present_with_active_regions() and membocks_present().

    Moreover, all architectures have a call to either of these functions
    preceding the call to sparse_init() and in the most cases they are called
    one after the other.

    Mark the regions from memblock.memory as present during sparce_init() by
    making sparse_init() call memblocks_present(), make memblocks_present()
    and memory_present() functions static and remove redundant
    sparse_memory_present_with_active_regions() function.

    Also remove no longer required HAVE_MEMORY_PRESENT configuration option.

    Signed-off-by: Mike Rapoport
    Signed-off-by: Andrew Morton
    Link: http://lkml.kernel.org/r/20200712083130.22919-1-rppt@kernel.org
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     

10 Jun, 2020

1 commit

  • Patch series "mm: consolidate definitions of page table accessors", v2.

    The low level page table accessors (pXY_index(), pXY_offset()) are
    duplicated across all architectures and sometimes more than once. For
    instance, we have 31 definition of pgd_offset() for 25 supported
    architectures.

    Most of these definitions are actually identical and typically it boils
    down to, e.g.

    static inline unsigned long pmd_index(unsigned long address)
    {
    return (address >> PMD_SHIFT) & (PTRS_PER_PMD - 1);
    }

    static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address)
    {
    return (pmd_t *)pud_page_vaddr(*pud) + pmd_index(address);
    }

    These definitions can be shared among 90% of the arches provided
    XYZ_SHIFT, PTRS_PER_XYZ and xyz_page_vaddr() are defined.

    For architectures that really need a custom version there is always
    possibility to override the generic version with the usual ifdefs magic.

    These patches introduce include/linux/pgtable.h that replaces
    include/asm-generic/pgtable.h and add the definitions of the page table
    accessors to the new header.

    This patch (of 12):

    The linux/mm.h header includes to allow inlining of the
    functions involving page table manipulations, e.g. pte_alloc() and
    pmd_alloc(). So, there is no point to explicitly include
    in the files that include .

    The include statements in such cases are remove with a simple loop:

    for f in $(git grep -l "include ") ; do
    sed -i -e '/include / d' $f
    done

    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: Mike Rapoport
    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-1-rppt@kernel.org
    Link: http://lkml.kernel.org/r/20200514170327.31389-2-rppt@kernel.org
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     

04 Jun, 2020

2 commits

  • Merge more updates from Andrew Morton:
    "More mm/ work, plenty more to come

    Subsystems affected by this patch series: slub, memcg, gup, kasan,
    pagealloc, hugetlb, vmscan, tools, mempolicy, memblock, hugetlbfs,
    thp, mmap, kconfig"

    * akpm: (131 commits)
    arm64: mm: use ARCH_HAS_DEBUG_WX instead of arch defined
    x86: mm: use ARCH_HAS_DEBUG_WX instead of arch defined
    riscv: support DEBUG_WX
    mm: add DEBUG_WX support
    drivers/base/memory.c: cache memory blocks in xarray to accelerate lookup
    mm/thp: rename pmd_mknotpresent() as pmd_mkinvalid()
    powerpc/mm: drop platform defined pmd_mknotpresent()
    mm: thp: don't need to drain lru cache when splitting and mlocking THP
    hugetlbfs: get unmapped area below TASK_UNMAPPED_BASE for hugetlbfs
    sparc32: register memory occupied by kernel as memblock.memory
    include/linux/memblock.h: fix minor typo and unclear comment
    mm, mempolicy: fix up gup usage in lookup_node
    tools/vm/page_owner_sort.c: filter out unneeded line
    mm: swap: memcg: fix memcg stats for huge pages
    mm: swap: fix vmstats for huge pages
    mm: vmscan: limit the range of LRU type balancing
    mm: vmscan: reclaim writepage is IO cost
    mm: vmscan: determine anon/file pressure balance at the reclaim root
    mm: balance LRU lists based on relative thrashing
    mm: only count actual rotations as LRU reclaim cost
    ...

    Linus Torvalds
     
  • free_area_init() has effectively became a wrapper for
    free_area_init_nodes() and there is no point of keeping it. Still
    free_area_init() name is shorter and more general as it does not imply
    necessity to initialize multiple nodes.

    Rename free_area_init_nodes() to free_area_init(), update the callers and
    drop old version of free_area_init().

    Signed-off-by: Mike Rapoport
    Signed-off-by: Andrew Morton
    Tested-by: Hoan Tran [arm64]
    Reviewed-by: Baoquan He
    Acked-by: Catalin Marinas
    Cc: Brian Cain
    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: "James E.J. Bottomley"
    Cc: Jonathan Corbet
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Matt Turner
    Cc: Max Filippov
    Cc: Michael Ellerman
    Cc: Michal Hocko
    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: Tony Luck
    Cc: Vineet Gupta
    Cc: Yoshinori Sato
    Link: http://lkml.kernel.org/r/20200412194859.12663-6-rppt@kernel.org
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     

21 May, 2020

1 commit


20 May, 2020

1 commit


19 May, 2020

1 commit


13 May, 2020

1 commit


10 Jan, 2020

14 commits


26 Nov, 2019

1 commit

  • Pull MIPS updates from Paul Burton:
    "The main MIPS changes for 5.5:

    - Atomics-related code sees some rework & cleanup, most notably
    allowing Loongson LL/SC errata workarounds to be more bulletproof &
    their correctness to be checked at build time.

    - Command line setup code is simplified somewhat, resolving various
    corner cases.

    - MIPS kernels can now be built with kcov code coverage support.

    - We can now build with CONFIG_FORTIFY_SOURCE=y.

    - Miscellaneous cleanups.

    And some platform specific changes:

    - We now disable some broken TLB functionality on certain Ingenic
    systems, and JZ4780 systems gain some devicetree nodes to support
    more devices.

    - Loongson support sees a number of cleanups, and we gain initial
    support for Loongson 3A R4 systems.

    - We gain support for MediaTek MT7688-based GARDENA Smart Gateway
    systems.

    - SGI IP27 (Origin 2*) see a number of fixes, cleanups &
    simplifications.

    - SGI IP30 (Octane) systems are now supported"

    * tag 'mips_5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (107 commits)
    MIPS: SGI-IP27: Enable ethernet phy on second Origin 200 module
    MIPS: PCI: Fix fake subdevice ID for IOC3
    MIPS: Ingenic: Disable abandoned HPTLB function.
    MIPS: PCI: remember nasid changed by set interrupt affinity
    MIPS: SGI-IP27: Fix crash, when CPUs are disabled via nr_cpus parameter
    mips: add support for folded p4d page tables
    mips: drop __pXd_offset() macros that duplicate pXd_index() ones
    mips: fix build when "48 bits virtual memory" is enabled
    MIPS: math-emu: Reuse name array in debugfs_fpuemu()
    MIPS: allow building with kcov coverage
    MIPS: Loongson64: Drop setup_pcimap
    MIPS: Loongson2ef: Convert to early_printk_8250
    MIPS: Drop CPU_SUPPORTS_UNCACHED_ACCELERATED
    MIPS: Loongson{2ef, 32, 64} convert to generic fw cmdline
    MIPS: Drop pmon.h
    MIPS: Loongson: Unify LOONGSON3/LOONGSON64 Kconfig usage
    MIPS: Loongson: Rename LOONGSON1 to LOONGSON32
    MIPS: Loongson: Fix return value of loongson_hwmon_init
    MIPS: add support for SGI Octane (IP30)
    MIPS: PCI: make phys_to_dma/dma_to_phys for pci-xtalk-bridge common
    ...

    Linus Torvalds
     

23 Nov, 2019

1 commit

  • If number of CPUs are limited by the kernel commandline parameter nr_cpus
    assignment of interrupts accourding to numa rules might not be possibe.
    As a fallback use one of the online CPUs as interrupt destination.

    Fixes: 69a07a41d908 ("MIPS: SGI-IP27: rework HUB interrupts")
    Signed-off-by: Thomas Bogendoerfer
    Signed-off-by: Paul Burton
    Cc: Ralf Baechle
    Cc: James Hogan
    Cc: linux-mips@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org

    Thomas Bogendoerfer
     

02 Nov, 2019

1 commit


01 Nov, 2019

1 commit

  • Commit 775b089aeffa ("MIPS: tlbex: Remove cpu_has_local_ebase") removed
    generating tlb refill handlers for every CPU, which was needed for
    generating per node exception handlers on IP27. Instead of resurrecting
    (and fixing) refill handler generation, we simply copy all exception
    vectors from the boot node to the other nodes. Also remove the config
    option since the memory tradeoff for expection handler replication
    is just 8k per node.

    Signed-off-by: Thomas Bogendoerfer
    Signed-off-by: Paul Burton
    Cc: Ralf Baechle
    Cc: Paul Burton
    Cc: James Hogan
    Cc: linux-mips@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org

    Thomas Bogendoerfer
     

24 Oct, 2019

3 commits

  • IP27 uses ARC prom only for parsing prom arguments and has a hack
    for IP27 to make the ARC code behave. By introducing config symbol
    ARC_CMDLINE_ONLY IP27 only drags in ARC cmdline parsing and does
    everything else in IP27 specific code.

    Signed-off-by: Thomas Bogendoerfer
    Signed-off-by: Paul Burton
    Cc: Ralf Baechle
    Cc: Paul Burton
    Cc: James Hogan
    Cc: linux-mips@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org

    Thomas Bogendoerfer
     
  • Calling register_smp_ops() in plat_mem_setup() is still early enough.
    So by doing this we could remove the ugly #ifdef CONFIG_SGI_IP27 in
    fw/arc/init.c.

    Signed-off-by: Thomas Bogendoerfer
    Signed-off-by: Paul Burton
    Cc: Ralf Baechle
    Cc: Paul Burton
    Cc: James Hogan
    Cc: linux-mips@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org

    Thomas Bogendoerfer
     
  • IP27 code has a few externs distributed over .c files. Collect them
    together into one commcon header file.

    Signed-off-by: Thomas Bogendoerfer
    Signed-off-by: Paul Burton
    Cc: Ralf Baechle
    Cc: Paul Burton
    Cc: James Hogan
    Cc: linux-mips@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org

    Thomas Bogendoerfer
     

08 Oct, 2019

3 commits

  • IOC3 chips in SGI system are conntected to a bridge ASIC, which has
    a 1-wire prom attached with part number information. This changeset
    uses this information to create PCI subsystem information, which
    the MFD driver uses for further platform device setup.

    Signed-off-by: Thomas Bogendoerfer
    Signed-off-by: Paul Burton
    Cc: Jonathan Corbet
    Cc: Ralf Baechle
    Cc: James Hogan
    Cc: Lee Jones
    Cc: David S. Miller
    Cc: Srinivas Kandagatla
    Cc: Alessandro Zummo
    Cc: Alexandre Belloni
    Cc: Greg Kroah-Hartman
    Cc: Jiri Slaby
    Cc: linux-doc@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-mips@vger.kernel.org
    Cc: netdev@vger.kernel.org
    Cc: linux-rtc@vger.kernel.org
    Cc: linux-serial@vger.kernel.org

    Thomas Bogendoerfer
     
  • The memory initialization of SGI-IP27 is already half-way to support
    SPARSEMEM. It only had free_bootmem_with_active_regions() left-overs
    interfering with sparse_memory_present_with_active_regions().

    Replace these calls with simpler memblocks_present() call in prom_meminit()
    and adjust arch/mips/Kconfig to enable SPARSEMEM and SPARSEMEM_EXTREME for
    SGI-IP27.

    Co-developed-by: Thomas Bogendoerfer
    Signed-off-by: Thomas Bogendoerfer
    Signed-off-by: Mike Rapoport
    Signed-off-by: Paul Burton
    Cc: linux-mips@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org

    Mike Rapoport
     
  • Node ids don't need to be contiguous in Linux, so the concept to
    use compact node ids to make them contiguous isn't needed at all.
    This patchset therefore removes it.

    Signed-off-by: Thomas Bogendoerfer
    Signed-off-by: Paul Burton
    Cc: Ralf Baechle
    Cc: James Hogan
    Cc: linux-mips@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org

    Thomas Bogendoerfer
     

31 Aug, 2019

2 commits


09 Jul, 2019

1 commit

  • …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
     

31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    released under gpl v2

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

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

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

    Thomas Gleixner
     

27 May, 2019

1 commit


10 May, 2019

2 commits

  • Bridge ASIC is widely used in different SGI systems, but the connected
    chipset is either HUB, HEART or BEDROCK. This commit switches to
    irq domain hierarchy for hub and bridge interrupts to get bridge
    setup out of hub interrupt code.

    Signed-off-by: Thomas Bogendoerfer
    [paul.burton@mips.com:
    Resolve conflict with commit 69a07a41d908 ("MIPS: SGI-IP27: rework HUB
    interrupts").]
    Signed-off-by: Paul Burton
    Cc: Ralf Baechle
    Cc: James Hogan
    Cc: linux-mips@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org

    Thomas Bogendoerfer
     
  • Converted bridge code to a platform driver using the PCI generic driver
    framework and use adding platform devices during xtalk scan. This allows
    easier sharing bridge driver for other SGI platforms like IP30 (Octane) and
    IP35 (Origin 3k, Fuel, Tezro).

    Signed-off-by: Thomas Bogendoerfer
    [paul.burton@mips.com:
    - Leave __phys_to_dma(), __dma_to_phys() & pcibus_to_node() in
    arch/mips/pci/pci-ip27.c since the motivation for moving them
    disappeared when the driver stopped being moved to drivers/pci.]
    Signed-off-by: Paul Burton
    Cc: Ralf Baechle
    Cc: James Hogan
    Cc: linux-mips@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org

    Thomas Bogendoerfer
     

20 Feb, 2019

1 commit

  • This commit rearranges the HUB interrupt code by using MIPS_IRQ_CPU
    interrupt handling code and modern Linux IRQ framework features to get
    rid of global arrays. It also adds support for irq affinity setting.

    Signed-off-by: Thomas Bogendoerfer
    Signed-off-by: Paul Burton
    Cc: Ralf Baechle
    Cc: James Hogan
    Cc: linux-mips@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org

    Thomas Bogendoerfer