1. 01 Mar, 2022 25 commits
  2. 28 Feb, 2022 1 commit
  3. 24 Feb, 2022 2 commits
  4. 23 Feb, 2022 1 commit
  5. 16 Feb, 2022 5 commits
  6. 15 Feb, 2022 1 commit
  7. 14 Feb, 2022 1 commit
  8. 12 Feb, 2022 4 commits
    • Michael Ellerman's avatar
      powerpc: Fix STACKTRACE=n build · 5a72345e
      Michael Ellerman authored
      Our skiroot_defconfig doesn't enable FTRACE, and so doesn't get
      STACKTRACE enabled either. That leads to a build failure since commit
      1614b2b1 ("arch: Make ARCH_STACKWALK independent of STACKTRACE")
      made stacktrace.c build even when STACKTRACE=n.
      
        arch/powerpc/kernel/stacktrace.c: In function ‘handle_backtrace_ipi’:
        arch/powerpc/kernel/stacktrace.c:171:2: error: implicit declaration of function ‘nmi_cpu_backtrace’
          171 |  nmi_cpu_backtrace(regs);
              |  ^~~~~~~~~~~~~~~~~
        arch/powerpc/kernel/stacktrace.c: In function ‘arch_trigger_cpumask_backtrace’:
        arch/powerpc/kernel/stacktrace.c:226:2: error: implicit declaration of function ‘nmi_trigger_cpumask_backtrace’
          226 |  nmi_trigger_cpumask_backtrace(mask, exclude_self, raise_backtrace_ipi);
              |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      This happens because our headers haven't defined
      arch_trigger_cpumask_backtrace, which causes lib/nmi_backtrace.c not to
      build nmi_cpu_backtrace().
      
      The code in question doesn't actually depend on STACKTRACE=y, that was
      just added because arch_trigger_cpumask_backtrace() lived in
      stacktrace.c for convenience. So drop the dependency on
      CONFIG_STACKTRACE, that causes lib/nmi_backtrace.c to build
      nmi_cpu_backtrace() etc. and fixes the build.
      
      Fixes: 1614b2b1 ("arch: Make ARCH_STACKWALK independent of STACKTRACE")
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20220212111349.2806972-1-mpe@ellerman.id.au
      5a72345e
    • Aneesh Kumar K.V's avatar
      powerpc/mm: Update default hugetlb size early · 2354ad25
      Aneesh Kumar K.V authored
      commit: d9c23400 ("Do not depend on MAX_ORDER when grouping pages by mobility")
      introduced pageblock_order which will be used to group pages better.
      The kernel now groups pages based on the value of HPAGE_SHIFT. Hence HPAGE_SHIFT
      should be set before we call set_pageblock_order.
      
      set_pageblock_order happens early in the boot and default hugetlb page size
      should be initialized before that to compute the right pageblock_order value.
      
      Currently, default hugetlbe page size is set via arch_initcalls which happens
      late in the boot as shown via the below callstack:
      
      [c000000007383b10] [c000000001289328] hugetlbpage_init+0x2b8/0x2f8
      [c000000007383bc0] [c0000000012749e4] do_one_initcall+0x14c/0x320
      [c000000007383c90] [c00000000127505c] kernel_init_freeable+0x410/0x4e8
      [c000000007383da0] [c000000000012664] kernel_init+0x30/0x15c
      [c000000007383e10] [c00000000000cf14] ret_from_kernel_thread+0x5c/0x64
      
      and the pageblock_order initialization is done early during the boot.
      
      [c0000000018bfc80] [c0000000012ae120] set_pageblock_order+0x50/0x64
      [c0000000018bfca0] [c0000000012b3d94] sparse_init+0x188/0x268
      [c0000000018bfd60] [c000000001288bfc] initmem_init+0x28c/0x328
      [c0000000018bfe50] [c00000000127b370] setup_arch+0x410/0x480
      [c0000000018bfed0] [c00000000127401c] start_kernel+0xb8/0x934
      [c0000000018bff90] [c00000000000d984] start_here_common+0x1c/0x98
      
      delaying default hugetlb page size initialization implies the kernel will
      initialize pageblock_order to (MAX_ORDER - 1) which is not an optimal
      value for mobility grouping. IIUC we always had this issue. But it was not
      a problem for hash translation mode because (MAX_ORDER - 1) is the same as
      HUGETLB_PAGE_ORDER (8) in the case of hash (16MB). With radix,
      HUGETLB_PAGE_ORDER will be 5 (2M size) and hence pageblock_order should be
      5 instead of 8.
      Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20220211065215.101767-1-aneesh.kumar@linux.ibm.com
      2354ad25
    • Ritesh Harjani's avatar
      selftests/powerpc/copyloops: Add memmove_64 test · 2504e5b9
      Ritesh Harjani authored
      While debugging an issue, we wanted to check whether the arch specific
      kernel memmove implementation is correct.
      This selftest could help test that.
      Suggested-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Suggested-by: default avatarVaibhav Jain <vaibhav@linux.ibm.com>
      Signed-off-by: default avatarRitesh Harjani <riteshh@linux.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/57242c1fe7aba6b7f0fcd0490303bfd5f222ee00.1631512686.git.riteshh@linux.ibm.com
      2504e5b9
    • Nathan Lynch's avatar
      powerpc/pseries: make pseries_devicetree_update() static · 92e6dc25
      Nathan Lynch authored
      pseries_devicetree_update() has only one call site, in the same file in
      which it is defined. Make it static.
      Signed-off-by: default avatarNathan Lynch <nathanl@linux.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20220207221247.354454-1-nathanl@linux.ibm.com
      92e6dc25