Skip to content
Permalink
Nicholas-Piggi…
Switch branches/tags

Commits on Jun 16, 2021

  1. powerpc/build: vdso linker warning for orphan sections

    Add --orphan-handling=warn for vdsos, and adjust vdso linker scripts to
    deal with orphan sections.
    
    Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
    npiggin authored and intel-lab-lkp committed Jun 16, 2021

Commits on Jun 15, 2021

  1. powerpc/tau: Remove superfluous parameter in alloc_workqueue() call

    This avoids an (optional) compiler warning:
    
    arch/powerpc/kernel/tau_6xx.c: In function 'TAU_init':
    arch/powerpc/kernel/tau_6xx.c:204:30: error: too many arguments for format [-Werror=format-extra-args]
      tau_workq = alloc_workqueue("tau", WQ_UNBOUND, 1, 0);
    
    Fixes: b1c6a0a ("powerpc/tau: Convert from timer to workqueue")
    Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
    Signed-off-by: Finn Thain <fthain@linux-m68k.org>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/a1456e8bbd33ef702e3ff6f14b1bf3919241c62b.1623398307.git.fthain@linux-m68k.org
    fthain authored and mpe committed Jun 15, 2021
  2. powerpc/perf: Simplify Makefile

    arch/powerpc/Kbuild decend into arch/powerpc/perf/ only when
    CONFIG_PERF_EVENTS is selected, so there is not need to take
    CONFIG_PERF_EVENTS into account in arch/powerpc/perf/Makefile.
    
    Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
    Reviewed-by: Michal Suchánek <msuchanek@suse.de>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/d37f61afca55b5b33787b643890e061ae1c18f5f.1620396045.git.christophe.leroy@csgroup.eu
    chleroy authored and mpe committed Jun 15, 2021
  3. powerpc/prom_init: Move custom isspace() to its own namespace

    If by some reason any of the headers will include ctype.h
    we will have a name collision. Avoid this by moving isspace()
    to the dedicate namespace.
    
    First appearance of the code is in the commit cf68787
    ("powerpc/prom_init: Evaluate mem kernel parameter for early allocation").
    
    Reported-by: kernel test robot <lkp@intel.com>
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    [mpe: Reformat prom_isxdigit() now that we allow longer lines]
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/20210510144925.58195-1-andriy.shevchenko@linux.intel.com
    andy-shev authored and mpe committed Jun 15, 2021
  4. selftests/powerpc: Remove the repeated declaration

    Function 'event_ebb_init' and 'event_leader_ebb_init' are declared
    twice in the header file, so remove the repeated declaration.
    
    Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/1622529385-5938-1-git-send-email-zhangshaokun@hisilicon.com
    zhangshk authored and mpe committed Jun 15, 2021
  5. powerpc/spider-pci: Remove set but not used variable 'val'

    Fixes gcc '-Wunused-but-set-variable' warning:
    # WARNING: Fixes tag on line 3 doesn't match correct format
    # WARNING: Fixes tag on line 3 doesn't match correct format
    # WARNING: Fixes tag on line 3 doesn't match correct format
    # WARNING: Fixes tag on line 3 doesn't match correct format
    # WARNING: Fixes tag on line 3 doesn't match correct format
    # WARNING: Fixes tag on line 3 doesn't match correct format
    
    arch/powerpc/platforms/cell/spider-pci.c: In function 'spiderpci_io_flush':
    arch/powerpc/platforms/cell/spider-pci.c:28:6: warning:
    variable ‘val’ set but not used [-Wunused-but-set-variable]
    
    It never used since introduction.
    
    Signed-off-by: Baokun Li <libaokun1@huawei.com>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/20210601085319.140461-1-libaokun1@huawei.com
    Baokun Li authored and mpe committed Jun 15, 2021
  6. powerpc/spufs: Remove set but not used variable 'dummy'

    Fixes gcc '-Wunused-but-set-variable' warning:
    # WARNING: Fixes tag on line 3 doesn't match correct format
    # WARNING: Fixes tag on line 3 doesn't match correct format
    # WARNING: Fixes tag on line 3 doesn't match correct format
    # WARNING: Fixes tag on line 3 doesn't match correct format
    # WARNING: Fixes tag on line 3 doesn't match correct format
    
    arch/powerpc/platforms/cell/spufs/switch.c: In function 'check_ppu_mb_stat':
    arch/powerpc/platforms/cell/spufs/switch.c:1660:6: warning:
    variable ‘dummy’ set but not used [-Wunused-but-set-variable]
    
    arch/powerpc/platforms/cell/spufs/switch.c: In function 'check_ppuint_mb_stat':
    arch/powerpc/platforms/cell/spufs/switch.c:1675:6: warning:
    variable ‘dummy’ set but not used [-Wunused-but-set-variable]
    
    It never used since introduction.
    
    Signed-off-by: Baokun Li <libaokun1@huawei.com>
    Acked-by: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/20210601085127.139598-1-libaokun1@huawei.com
    Baokun Li authored and mpe committed Jun 15, 2021
  7. powerpc/52xx: Add fallthrough in mpc52xx_wdt_ioctl()

    With gcc 10.3, there is this compiler error:
    
      compiler.h:56:26: error: this statement may fall through
      mpc52xx_gpt.c:586:2: note: here
        586 |  case WDIOC_GETTIMEOUT:
            |  ^~~~
    
    So add the fallthrough pseudo keyword.
    
    Signed-off-by: Tom Rix <trix@redhat.com>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/20210601190200.2637776-1-trix@redhat.com
    trixirt authored and mpe committed Jun 15, 2021

Commits on Jun 10, 2021

  1. powerpc/ps3: Add dma_mask to ps3_dma_region

    Commit f959dcd (dma-direct: Fix
    potential NULL pointer dereference) added a null check on the
    dma_mask pointer of the kernel's device structure.
    
    Add a dma_mask variable to the ps3_dma_region structure and set
    the device structure's dma_mask pointer to point to this new variable.
    
    Fixes runtime errors like these:
    # WARNING: Fixes tag on line 10 doesn't match correct format
    # WARNING: Fixes tag on line 10 doesn't match correct format
    
      ps3_system_bus_match:349: dev=8.0(sb_01), drv=8.0(ps3flash): match
      WARNING: CPU: 0 PID: 1 at kernel/dma/mapping.c:151 .dma_map_page_attrs+0x34/0x1e0
      ps3flash sb_01: ps3stor_setup:193: map DMA region failed
    
    Signed-off-by: Geoff Levand <geoff@infradead.org>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/562d0c9ea0100a30c3b186bcc7adb34b0bbd2cd7.1622746428.git.geoff@infradead.org
    glevand authored and mpe committed Jun 10, 2021
  2. powerpc/ps3: Warn on PS3 device errors

    To aid debugging PS3 boot problems change the log level
    of several PS3 device errors from pr_debug to pr_warn.
    
    Signed-off-by: Geoff Levand <geoff@infradead.org>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/eb5c1c10da0bbdeb27c8b069187b4f58e429e837.1622746428.git.geoff@infradead.org
    glevand authored and mpe committed Jun 10, 2021
  3. powerpc/ps3: Add CONFIG_PS3_VERBOSE_RESULT option

    To aid debugging, add a new PS3 kernel config option
    PS3_VERBOSE_RESULT that, when enabled, will print more
    verbose messages for the result of LV1 hypercalls.
    
    Signed-off-by: Geoff Levand <geoff@infradead.org>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/0ce4b6969a08094a747bd382dbfd30b72ebc192d.1622746428.git.geoff@infradead.org
    glevand authored and mpe committed Jun 10, 2021
  4. powerpc/ps3: Re-align DTB in image

    Change the PS3 linker script to align the DTB at 8 bytes,
    the same alignment as that of the of the 'generic' powerpc
    linker script.
    
    Signed-off-by: Geoff Levand <geoff@infradead.org>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/245897ed65e402686a4b114ba618e935cb5c6506.1622822173.git.geoff@infradead.org
    glevand authored and mpe committed Jun 10, 2021
  5. powerpc/ps3: Add firmware version to sysfs

    Add a new sysfs entry /sys/firmware/ps3/fw-version that exports
    the PS3's firmware version.
    
    The firmware version is available through an LV1 hypercall, and we've
    been printing it to the boot log, but haven't provided an easy way for
    user utilities to get it.
    
    Signed-off-by: Geoff Levand <geoff@infradead.org>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/41509b2da647cd34b1331cc4756c8774b1e284eb.1622822173.git.geoff@infradead.org
    glevand authored and mpe committed Jun 10, 2021
  6. powerpc/barrier: Avoid collision with clang's __lwsync macro

    A change in clang 13 results in the __lwsync macro being defined as
    __builtin_ppc_lwsync, which emits 'lwsync' or 'msync' depending on what
    the target supports. This breaks the build because of -Werror in
    arch/powerpc, along with thousands of warnings:
    
     In file included from arch/powerpc/kernel/pmc.c:12:
     In file included from include/linux/bug.h:5:
     In file included from arch/powerpc/include/asm/bug.h:109:
     In file included from include/asm-generic/bug.h:20:
     In file included from include/linux/kernel.h:12:
     In file included from include/linux/bitops.h:32:
     In file included from arch/powerpc/include/asm/bitops.h:62:
     arch/powerpc/include/asm/barrier.h:49:9: error: '__lwsync' macro redefined [-Werror,-Wmacro-redefined]
     #define __lwsync()      __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory")
            ^
     <built-in>:308:9: note: previous definition is here
     #define __lwsync __builtin_ppc_lwsync
            ^
     1 error generated.
    
    Undefine this macro so that the runtime patching introduced by
    commit 2d1b202 ("powerpc: Fixup lwsync at runtime") continues to
    work properly with clang and the build no longer breaks.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Nathan Chancellor <nathan@kernel.org>
    Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: ClangBuiltLinux#1386
    Link: llvm/llvm-project@62b5df7
    Link: https://lore.kernel.org/r/20210528182752.1852002-1-nathan@kernel.org
    nathanchance authored and mpe committed Jun 10, 2021

Commits on May 23, 2021

  1. tty: hvc: udbg_hvc: retry putc on -EAGAIN

    hvterm_raw_put_chars() calls hvc_put_chars(), which may return -EAGAIN
    when the underlying hcall returns a "busy" status, but udbg_hvc_putc()
    doesn't handle this. When using xmon on a PowerVM guest, this can
    result in incomplete or garbled output when printing relatively large
    amounts of data quickly, such as when dumping the kernel log buffer.
    
    Call again on -EAGAIN.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/20210514214422.3019105-1-nathanl@linux.ibm.com
    nathanlynch authored and mpe committed May 23, 2021
  2. powerpc/xmon: make dumping log buffer contents more reliable

    Log buffer entries that are too long for dump_log_buf()'s small
    local buffer are:
    
    * silently discarded when a single-line entry is too long;
      kmsg_dump_get_line() returns true but sets &len to 0.
    * silently truncated to the last fitting new line when a multi-line
      entry is too long, e.g. register dumps from __show_regs(); this
      seems undetectable via the kmsg_dump API.
    
    xmon_printf()'s internal buffer is already 1KB; enlarge
    dump_log_buf()'s own buffer to match and make it statically
    allocated. Verified that this allows complete printing of register
    dumps on ppc64le with both CONFIG_PRINTK_TIME=y and
    CONFIG_PRINTK_CALLER=y.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/20210514162420.2911458-1-nathanl@linux.ibm.com
    nathanlynch authored and mpe committed May 23, 2021
  3. powerpc/kprobes: Replace ppc_optinsn by common optinsn

    Commit 51c9c08 ("powerpc/kprobes: Implement Optprobes")
    implemented a powerpc specific version of optinsn in order
    to workaround the 32Mb limitation for direct branches.
    
    Instead of implementing a dedicated powerpc version, use the
    common optinsn and override the allocation and freeing functions.
    
    This also indirectly remove the CLANG warning about
    is_kprobe_ppc_optinsn_slot() not being use, and the powerpc will
    now benefit from commit 5b48562 ("kprobes, extable: Identify
    kprobes trampolines as kernel text area")
    
    Suggested-by: Masami Hiramatsu <mhiramat@kernel.org>
    Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
    Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/ec5e85f9f9abcfecc959a03495f4a7858eb4d203.1620896780.git.christophe.leroy@csgroup.eu
    chleroy authored and mpe committed May 23, 2021
  4. kprobes: Allow architectures to override optinsn page allocation

    Some architectures like powerpc require a non standard
    allocation of optinsn page, because module pages are
    too far from the kernel for direct branches.
    
    Define weak alloc_optinsn_page() and free_optinsn_page(), that
    fall back on alloc_insn_page() and free_insn_page() when not
    overridden by the architecture.
    
    Suggested-by: Masami Hiramatsu <mhiramat@kernel.org>
    Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
    Reviewed-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
    Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/40a43d6df1fdf41ade36e9a46e60a4df774ca9f6.1620896780.git.christophe.leroy@csgroup.eu
    chleroy authored and mpe committed May 23, 2021
  5. powerpc: Kconfig: disable CONFIG_COMPAT for clang < 12

    Until clang-12, clang would attempt to assemble 32b powerpc assembler in
    64b emulation mode when using a 64b target triple with -m32, leading to
    errors during the build of the compat VDSO. Simply disable all of
    CONFIG_COMPAT; users should upgrade to the latest release of clang for
    proper support.
    
    Suggested-by: Nathan Chancellor <nathan@kernel.org>
    Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
    Reviewed-by: Nathan Chancellor <nathan@kernel.org>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: ClangBuiltLinux#1160
    Link: https://github.com/llvm/llvm-project/commits/2288319733cd5f525bf7e24dece08bfcf9d0ff9e
    Link: https://groups.google.com/g/clang-built-linux/c/ayNmi3HoNdY/m/XJAGj_G2AgAJ
    Link: https://lore.kernel.org/r/20210518205858.2440344-1-ndesaulniers@google.com
    nickdesaulniers authored and mpe committed May 23, 2021
  6. powerpc/powernv/pci: fix header guard

    While looking at -Wundef warnings, the #if CONFIG_EEH stood out as a
    possible candidate to convert to #ifdef CONFIG_EEH.
    
    It seems that based on Kconfig dependencies it's not possible to build
    this file without CONFIG_EEH enabled, but based on upstream discussion,
    it's not clear yet that CONFIG_EEH should be enabled by default.
    
    For now, simply fix the -Wundef warning.
    
    Suggested-by: Nathan Chancellor <nathan@kernel.org>
    Suggested-by: Joe Perches <joe@perches.com>
    Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
    Reviewed-by: Nathan Chancellor <nathan@kernel.org>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: ClangBuiltLinux#570
    Link: https://lore.kernel.org/lkml/67f6cd269684c9aa8463ff4812c3b4605e6739c3.camel@perches.com/
    Link: https://lore.kernel.org/lkml/CAOSf1CGoN5R0LUrU=Y=UWho1Z_9SLgCX8s3SbFJXwJXc5BYz4A@mail.gmail.com/
    Link: https://lore.kernel.org/r/20210518204044.2390064-1-ndesaulniers@google.com
    nickdesaulniers authored and mpe committed May 23, 2021
  7. powerpc/sstep: Add tests for setb instruction

    This adds selftests for setb instruction.
    
    Signed-off-by: Sathvika Vasireddy <sathvika@linux.vnet.ibm.com>
    Tested-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/b05b61ccb5f10279d46fed490796f32ea2ccc270.1620727160.git.sathvika@linux.vnet.ibm.com
    Sathvika Vasireddy authored and mpe committed May 23, 2021
  8. powerpc/sstep: Add emulation support for ‘setb’ instruction

    This adds emulation support for the following instruction:
       * Set Boolean (setb)
    
    Signed-off-by: Sathvika Vasireddy <sathvika@linux.vnet.ibm.com>
    Tested-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
    Reviewed-by: Segher Boessenkool <segher@kernel.crashing.org>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/7b735b0c898da0db2af8628a64df2f5114596f22.1620727160.git.sathvika@linux.vnet.ibm.com
    Sathvika Vasireddy authored and mpe committed May 23, 2021
  9. powerpc/Makefile: Add ppc32/ppc64_randconfig targets

    Make it easier to generate a 32 or 64-bit specific randconfig.
    
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Tested-by: Randy Dunlap <rdunlap@infradead.org>
    Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
    Requested-by: Randy Dunlap <rdunlap@infradead.org>
    Link: https://lore.kernel.org/r/20210428132700.3426100-1-mpe@ellerman.id.au
    mpe committed May 23, 2021
  10. powerpc/pseries: minor enhancements in dlpar_memory_remove_by_ic()

    We don't need the 'lmbs_available' variable to count the valid LMBs and
    to check if we have less than 'lmbs_to_remove'. We must ensure that the
    entire LMB range must be removed, so we can error out immediately if any
    LMB in the range is marked as reserved.
    
    Add a couple of comments explaining the reasoning behind the differences
    we have in this function in contrast to what it is done in its sister
    function, dlpar_memory_remove_by_count().
    
    Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
    Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/20210512202809.95363-5-danielhb413@gmail.com
    danielhb authored and mpe committed May 23, 2021
  11. powerpc/pseries: break early in dlpar_memory_remove_by_count() loops

    After marking the LMBs as reserved depending on dlpar_remove_lmb() rc,
    we evaluate whether we need to add the LMBs back or if we can release
    the LMB DRCs. In both cases, a for_each_drmem_lmb() loop without a break
    condition is used. This means that we're going to cycle through all LMBs
    of the partition even after we're done with what we were going to do.
    
    This patch adds break conditions in both loops to avoid this. The
    'lmbs_removed' variable was renamed to 'lmbs_reserved', and it's now
    being decremented each time a lmb reservation is removed, indicating
    that the operation we're doing (adding back LMBs or releasing DRCs) is
    completed.
    
    Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
    Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/20210512202809.95363-4-danielhb413@gmail.com
    danielhb authored and mpe committed May 23, 2021
  12. powerpc/pseries: check DRCONF_MEM_RESERVED in lmb_is_removable()

    DRCONF_MEM_RESERVED is a flag that represents the "Reserved Memory"
    status in LOPAR v2.10, section 4.2.8. If a LMB is marked as reserved,
    quoting LOPAR, "is not to be used or altered by the base OS". This flag
    is read only in the kernel, being set by the firmware/hypervisor in the
    DT. As an example, QEMU will set this flag in hw/ppc/spapr.c,
    spapr_dt_dynamic_memory().
    
    lmb_is_removable() does not check for DRCONF_MEM_RESERVED. This function
    is used in dlpar_remove_lmb() as a guard before the removal logic. Since
    it is failing to check for !RESERVED, dlpar_remove_lmb() will fail in a
    later stage instead of failing in the validation when receiving a
    reserved LMB as input.
    
    lmb_is_removable() is also used in dlpar_memory_remove_by_count() to
    evaluate if we have enough LMBs to complete the request. The missing
    !RESERVED check in this case is causing dlpar_memory_remove_by_count()
    to miscalculate the number of elegible LMBs for the removal, and can
    make it error out later on instead of failing in the validation with the
    'not enough LMBs to satisfy request' message.
    
    Making a DRCONF_MEM_RESERVED check in lmb_is_removable() fixes all these
    issues.
    
    Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
    Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/20210512202809.95363-3-danielhb413@gmail.com
    danielhb authored and mpe committed May 23, 2021
  13. powerpc/pseries: Set UNISOLATE on dlpar_memory_remove_by_ic() error

    As previously done in dlpar_cpu_remove() for CPUs, this patch changes
    dlpar_memory_remove_by_ic() to unisolate the LMB DRC when the LMB is
    failed to be removed. The hypervisor, seeing a LMB DRC that was supposed
    to be removed being unisolated instead, can do error recovery on its
    side.
    
    This change is done in dlpar_memory_remove_by_ic() only because, as of
    today, only QEMU is using this code path for error recovery (via the
    PSERIES_HP_ELOG_ID_DRC_IC event). phyp treats it as a no-op.
    
    Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
    Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/20210512202809.95363-2-danielhb413@gmail.com
    danielhb authored and mpe committed May 23, 2021
  14. powerpc/pseries/ras: Delete a redundant condition branch

    The statement of the last "if (xxx)" branch is the same as the "else"
    branch. Delete it to simplify code.
    
    No functional change.
    
    Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/20210510131924.3907-1-thunder.leizhen@huawei.com
    Zhen Lei authored and mpe committed May 23, 2021
  15. selftests/powerpc: Fix duplicate included pthread.h

    Clean up the following includecheck warning:
    
    ./tools/testing/selftests/powerpc/tm/tm-vmx-unavail.c: pthread.h is
    included more than once.
    
    No functional change.
    
    Reported-by: Abaci Robot <abaci@linux.alibaba.com>
    Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/1620903820-68213-1-git-send-email-jiapeng.chong@linux.alibaba.com
    Jiapeng Chong authored and mpe committed May 23, 2021
  16. powerpc/pseries/memhotplug: Remove unused inline function dlpar_memor…

    …y_remove()
    
    dlpar_memory_remove() is never used, so can be removed.
    
    Signed-off-by: YueHaibing <yuehaibing@huawei.com>
    Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/20210514071041.17432-1-yuehaibing@huawei.com
    YueHaibing authored and mpe committed May 23, 2021

Commits on May 17, 2021

  1. selftests/powerpc: Add test of mitigation patching

    We recently discovered some of our mitigation patching was not safe
    against other CPUs running concurrently.
    
    Add a test which enable/disables all mitigations in a tight loop while
    also running some stress load. On an unpatched system this almost always
    leads to an oops and panic/reboot, but we also check if the kernel
    becomes tainted in case we have a non-fatal oops.
    
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/20210507064225.1556312-1-mpe@ellerman.id.au
    mpe committed May 17, 2021
  2. powerpc/32s: Remove asm/book3s/32/hash.h

    Move the PAGE bits into pgtable.h to be more similar to book3s/64.
    
    Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/7f4aaa479569328a1e5b07c96c08fbca0cd7dd88.1620307890.git.christophe.leroy@csgroup.eu
    chleroy authored and mpe committed May 17, 2021
  3. powerpc: Only pad struct pt_regs when needed

    If neither KUAP nor PPC64 is selected, there is nothing in the second
    union of struct pt_regs, so the alignment padding is waste of memory.
    
    Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/d536bbc46094f66b24d3017343be25164f232933.1620307840.git.christophe.leroy@csgroup.eu
    chleroy authored and mpe committed May 17, 2021
  4. powerpc/32s: Speed up likely path of kuap_update_sr()

    In most cases, kuap_update_sr() will update a single segment
    register.
    
    We know that first update will always be done, if there is no
    segment register to update at all, kuap_update_sr() is not
    called.
    
    Avoid recurring calculations and tests in that case.
    
    Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/848f18d213b8341939add7302dc4ef80cc7a12e3.1620307636.git.christophe.leroy@csgroup.eu
    chleroy authored and mpe committed May 17, 2021
  5. powerpc/mmu: Remove leftover CONFIG_E200

    Commit 39c8bf2 ("powerpc: Retire e200 core (mpc555x processor)")
    removed CONFIG_E200.
    Commit f9158d5 ("powerpc/mm: Add mask of always present MMU
    features") was merged in the same cycle and added a new use of
    CONFIG_E200.
    
    Remove that use.
    
    Fixes: f9158d5 ("powerpc/mm: Add mask of always present MMU features")
    Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/594fa3cc0df11e21644fd6a584851ae4f164b2bf.1620367249.git.christophe.leroy@csgroup.eu
    chleroy authored and mpe committed May 17, 2021
Older