Skip to content
Snippets Groups Projects
This project is mirrored from https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9.git. Pull mirroring updated .
  1. Apr 11, 2025
  2. Apr 10, 2025
  3. Apr 07, 2025
    • Mamatha Inamdar's avatar
      powerpc/rtas: avoid scheduling in rtas_os_term() · f8ee5789
      Mamatha Inamdar authored
      JIRA: https://issues.redhat.com/browse/RHEL-81040
      
      
      
      commit 6c606e57eecc37d6b36d732b1ff7e55b7dc32dd4
      Author: Nathan Lynch <nathanl@linux.ibm.com>
      Date:   Fri Nov 18 09:07:42 2022 -0600
      
          powerpc/rtas: avoid scheduling in rtas_os_term()
      
          It's unsafe to use rtas_busy_delay() to handle a busy status from
          the ibm,os-term RTAS function in rtas_os_term():
      
          Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
          BUG: sleeping function called from invalid context at arch/powerpc/kernel/rtas.c:618
          in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 1, name: swapper/0
          preempt_count: 2, expected: 0
          CPU: 7 PID: 1 Comm: swapper/0 Tainted: G      D            6.0.0-rc5-02182-gf8553a572277-dirty #9
          Call Trace:
          [c000000007b8f000] [c000000001337110] dump_stack_lvl+0xb4/0x110 (unreliable)
          [c000000007b8f040] [c0000000002440e4] __might_resched+0x394/0x3c0
          [c000000007b8f0e0] [c00000000004f680] rtas_busy_delay+0x120/0x1b0
          [c000000007b8f100] [c000000000052d04] rtas_os_term+0xb8/0xf4
          [c000000007b8f180] [c0000000001150fc] pseries_panic+0x50/0x68
          [c000000007b8f1f0] [c000000000036354] ppc_panic_platform_handler+0x34/0x50
          [c000000007b8f210] [c0000000002303c4] notifier_call_chain+0xd4/0x1c0
          [c000000007b8f2b0] [c0000000002306cc] atomic_notifier_call_chain+0xac/0x1c0
          [c000000007b8f2f0] [c0000000001d62b8] panic+0x228/0x4d0
          [c000000007b8f390] [c0000000001e573c] do_exit+0x140c/0x1420
          [c000000007b8f480] [c0000000001e586c] make_task_dead+0xdc/0x200
      
          Use rtas_busy_delay_time() instead, which signals without side effects
          whether to attempt the ibm,os-term RTAS call again.
      
      Signed-off-by: default avatarNathan Lynch <nathanl@linux.ibm.com>
      Reviewed-by: default avatarNicholas Piggin <npiggin@gmail.com>
      Reviewed-by: default avatarAndrew Donnellan <ajd@linux.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
          Link: https://lore.kernel.org/r/20221118150751.469393-5-nathanl@linux.ibm.com
      
      
      
      Signed-off-by: default avatarMamatha Inamdar <minamdar@redhat.com>
      f8ee5789
  4. Apr 04, 2025
  5. Apr 03, 2025
    • Li Wang's avatar
      selftest/mm: va_high_addr_switch: add ppc64 support check · 7f77300f
      Li Wang authored
      JIRA: https://issues.redhat.com/browse/RHEL-85318
      
      commit 983e760bcdb6f41ff3cf59e70e32a529537d6ef2
      Author: Li Wang <liwang@redhat.com>
      Date:   Thu Mar 27 19:48:13 2025 +0800
      
          selftest/mm: va_high_addr_switch: add ppc64 support check
      
          Add PPC64 Radix MMU support to the va_high_addr_switch.sh by introducing
          check_supported_ppc64().  The function verifies:
      
            - 5-level paging (PGTABLE_LEVELS >= 5) enable in kernel config
            - Radix MMU (required for PPC64 5-level translation)
            - HugePages availability (needed for some tests)
      
          If any check fails, the test is skipped (ksft_skip).  This ensures
          compatibility with Power9/Power10 systems running in Radix MMU mode.
      
          Avoid failures on 4-level paging system:
      
            # mmap(NULL, MAP_HUGETLB): 0xffffffffffffffff - FAILED
            # mmap(LOW_ADDR, MAP_HUGETLB): 0xffffffffffffffff - FAILED
            # mmap(HIGH_ADDR, MAP_HUGETLB): 0xffffffffffffffff - FAILED
            # mmap(HIGH_ADDR, MAP_HUGETLB) again: 0xffffffffffffffff - FAILED
            # mmap(HIGH_ADDR, MAP_FIXED | MAP_HUGETLB): 0xffffffffffffffff - FAILED
            # mmap(-1, MAP_HUGETLB): 0xffffffffffffffff - FAILED
            # mmap(-1, MAP_HUGETLB) again: 0xffffffffffffffff - FAILED
            # mmap(ADDR_SWITCH_HINT - PAGE_SIZE, 2*HUGETLB_SIZE, MAP_HUGETLB): 0xffffffffffffffff - FAILED
            # mmap(ADDR_SWITCH_HINT , 2*HUGETLB_SIZE, MAP_FIXED | MAP_HUGETLB): 0xffffffffffffffff - FAILED
      
          Link: https://lkml.kernel.org/r/20250327114813.25980-1-liwang@redhat.com
      
      
      Signed-off-by: default avatarLi Wang <liwang@redhat.com>
          Cc: Anshuman Khandual <anshuman.khandual@arm.com>
          Cc: Dev Jain <dev.jain@arm.com>
          Cc: Kirill A. Shuemov <kirill.shutemov@linux.intel.com>
          Cc: Shuah Khan <shuah@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      
      Signed-off-by: default avatarLi Wang <liwang@redhat.com>
      7f77300f
    • Li Wang's avatar
      selftests/mm: va_high_addr_switch: reduce test noise · f4b06636
      Li Wang authored
      JIRA: https://issues.redhat.com/browse/RHEL-85318
      
      commit 85e8bcb4190efb0b4443b637fd7a62ca2f05de6f
      Author: Dev Jain <dev.jain@arm.com>
      Date:   Wed May 22 12:34:34 2024 +0530
      
          selftests/mm: va_high_addr_switch: reduce test noise
      
          Patch series "Restructure va_high_addr_switch".
      
          The va_high_addr_switch memory selftest tests out some corner cases
          related to allocation and page/hugepage faulting around the switch
          boundary.  Currently, the page size and hugepage size have been statically
          defined.  Post FEAT_LPA2, the Aarch64 Linux kernel adds support for 4k and
          16k translation granules on higher addresses; we restructure the test to
          support the same.  In addition, we avoid invocation of the binary twice,
          in the shell script, to reduce test noise.
      
          This patch (of 2):
      
          When invoking the binary with "--run-hugetlb" flag, the testcases
          involving the base page are anyways going to be run.  Therefore, remove
          duplication by invoking the binary only once.
      
          Link: https://lkml.kernel.org/r/20240522070435.773918-1-dev.jain@arm.com
          Link: https://lkml.kernel.org/r/20240522070435.773918-2-dev.jain@arm.com
      
      
      Signed-off-by: default avatarDev Jain <dev.jain@arm.com>
          Cc: Anshuman Khandual <anshuman.khandual@arm.com>
          Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
          Cc: Shuah Khan <shuah@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      
      Signed-off-by: default avatarLi Wang <liwang@redhat.com>
      f4b06636
Loading