[PATCH 4/4] selftests/powerpc/pmu: Add interface test for extended reg support

2024-12-20 Thread Athira Rajeev
From: Kajol Jain The testcase uses check_extended_regs_support and perf_get_platform_reg_mask function to check if the platform has extended reg support. This will help to check if sampling pmu selftest is enabled or not for a given platform. Signed-off-by: Kajol Jain Signed-off-by: Athira Raje

[PATCH 3/4] tools/testing/selftests/powerpc/pmu: Update comment description to mention ISA v3.1 for power10 and above

2024-12-20 Thread Athira Rajeev
Updated the comments in the pmu selftests to include power11/ISA v3.1 where ever required. Signed-off-by: Athira Rajeev --- .../event_code_tests/group_constraint_l2l3_sel_test.c | 2 +- .../group_constraint_radix_scope_qual_test.c | 2 +- .../group_constraint_thresh_cmp_test.c

[PATCH 1/4] tools/testing/selftests/powerpc: Enable pmu selftests for power11

2024-12-20 Thread Athira Rajeev
Add check for power11 pvr in the selftest utility functions. Selftests uses pvr value to check for platform support inorder to run the tests. pvr is also used to send the extended mask value to capture sampling registers. Update some of the utility functions to use hwcap2 inorder to return platfor

[PATCH 2/4] tools/testing/selftests/powerpc: Add check for power11 pvr for pmu selfests

2024-12-20 Thread Athira Rajeev
Some of the tests depends on pvr value to choose the event. Example: - event_alternatives_tests_p10: alternative event depends on registered PMU driver which is based on pvr - generic_events_valid_test varies based on platform - bhrb_filter_map_test: again its dependent on pmu to decide which b

[PATCH] mm/memblock: Add memblock_alloc_or_panic interface

2024-12-20 Thread Guo Weikang
Before SLUB initialization, various subsystems used memblock_alloc to allocate memory. In most cases, when memory allocation fails, an immediate panic is required. To simplify this behavior and reduce repetitive checks, introduce `memblock_alloc_or_panic`. This function ensures that memory allocati

Re: [PATCH] mm/memblock: Add memblock_alloc_or_panic interface

2024-12-20 Thread Andrew Morton
On Fri, 20 Dec 2024 17:26:38 +0800 Guo Weikang wrote: > Before SLUB initialization, various subsystems used memblock_alloc to > allocate memory. In most cases, when memory allocation fails, an immediate > panic is required. To simplify this behavior and reduce repetitive checks, > introduce `mem

[RESEND PATCH] powerpc: Use str_on_off() helper in check_cache_coherency()

2024-12-20 Thread Thorsten Blum
Remove hard-coded strings by using the str_on_off() helper function. Signed-off-by: Thorsten Blum --- arch/powerpc/kernel/setup-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 6fa17944

Re: [PATCH v4 12/25] mm/memory: Enhance insert_page_into_pte_locked() to create writable mappings

2024-12-20 Thread David Hildenbrand
On 20.12.24 20:01, David Hildenbrand wrote: On 17.12.24 06:12, Alistair Popple wrote: In preparation for using insert_page() for DAX, enhance insert_page_into_pte_locked() to handle establishing writable mappings. Recall that DAX returns VM_FAULT_NOPAGE after installing a PTE which bypasses the

Re: [PATCH v4 12/25] mm/memory: Enhance insert_page_into_pte_locked() to create writable mappings

2024-12-20 Thread David Hildenbrand
On 17.12.24 06:12, Alistair Popple wrote: In preparation for using insert_page() for DAX, enhance insert_page_into_pte_locked() to handle establishing writable mappings. Recall that DAX returns VM_FAULT_NOPAGE after installing a PTE which bypasses the typical set_pte_range() in finish_fault. Si

Re: [PATCH v4 15/25] huge_memory: Add vmf_insert_folio_pud()

2024-12-20 Thread David Hildenbrand
On 17.12.24 06:12, Alistair Popple wrote: Currently DAX folio/page reference counts are managed differently to normal pages. To allow these to be managed the same as normal pages introduce vmf_insert_folio_pud. This will map the entire PUD-sized folio and take references as it would for a normall

Re: [PATCH v4 16/25] huge_memory: Add vmf_insert_folio_pmd()

2024-12-20 Thread David Hildenbrand
+vm_fault_t vmf_insert_folio_pmd(struct vm_fault *vmf, struct folio *folio, bool write) +{ + struct vm_area_struct *vma = vmf->vma; + unsigned long addr = vmf->address & PMD_MASK; + pfn_t pfn = pfn_to_pfn_t(folio_pfn(folio)); + struct mm_struct *mm = vma->vm_mm; +

Re: [PATCH v4 17/25] memremap: Add is_device_dax_page() and is_fsdax_page() helpers

2024-12-20 Thread David Hildenbrand
On 17.12.24 06:13, Alistair Popple wrote: Add helpers to determine if a page or folio is a device dax or fs dax page or folio. ... why is it "device_dax" but "fsdax" ? In particular because you wrote "fs dax" above. I see "fsdax" getting used in some functions. But then, people usually say

Re: [PATCH v4 19/25] proc/task_mmu: Ignore ZONE_DEVICE pages

2024-12-20 Thread David Hildenbrand
On 19.12.24 00:11, Alistair Popple wrote: On Tue, Dec 17, 2024 at 11:31:25PM +0100, David Hildenbrand wrote: On 17.12.24 06:13, Alistair Popple wrote: The procfs mmu files such as smaps currently ignore device dax and fs dax pages because these pages are considered special. To maintain existing

Re: [PATCH v4 14/25] rmap: Add support for PUD sized mappings to rmap

2024-12-20 Thread David Hildenbrand
return -EBUSY; diff --git a/mm/rmap.c b/mm/rmap.c index c6c4d4e..39d0439 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -1203,6 +1203,11 @@ static __always_inline unsigned int __folio_add_rmap(struct folio *folio, } atomic_inc(&folio->_la

Re: [PATCH v4 10/25] mm/mm_init: Move p2pdma page refcount initialisation to p2pdma

2024-12-20 Thread David Hildenbrand
But that's a bit weird: we call __init_single_page()->init_page_count() to initialize it to 1, to then set it back to 0. Maybe we can just pass to __init_single_page() the refcount we want to have directly? Can be a patch on top of course. Once the dust settles on this series we won't nee

[PATCH v2 20/28] powerpc/ftrace: Use RCU in all users of __module_text_address().

2024-12-20 Thread Sebastian Andrzej Siewior
__module_text_address() can be invoked within a RCU section, there is no requirement to have preemption disabled. Replace the preempt_disable() section around __module_text_address() with RCU. Cc: Christophe Leroy Cc: Madhavan Srinivasan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Michael Eller

[PATCH v2 01/28] module: Extend the preempt disabled section in dereference_symbol_descriptor().

2024-12-20 Thread Sebastian Andrzej Siewior
dereference_symbol_descriptor() needs to obtain the module pointer belonging to pointer in order to resolve that pointer. The returned mod pointer is obtained under RCU-sched/ preempt_disable() guarantees and needs to be used within this section to ensure that the module is not removed in the meant

Re: (subset) [PATCH 00/35] Reorganize kerneldoc parameter names

2024-12-20 Thread Srinivas Kandagatla
On Mon, 30 Sep 2024 13:20:46 +0200, Julia Lawall wrote: > Reorganize kerneldoc parameter names to match the parameter > order in the function header. > > The misordered cases were identified using the following > Coccinelle semantic patch: > > // > @initialize:ocaml@ > @@ > > [...] Applied,

Re: [PATCH v2 24/25] net: spider_net: Remove powerpc Cell driver

2024-12-20 Thread Michael Ellerman
Jakub Kicinski writes: > On Wed, 18 Dec 2024 17:59:17 -0800 Jakub Kicinski wrote: >> On Wed, 18 Dec 2024 21:55:12 +1100 Michael Ellerman wrote: >> > This driver can no longer be built since support for IBM Cell Blades was >> > removed, in particular PPC_IBM_CELL_BLADE. >> > >> > Remove the driver

Re: KVM: PPC: Book3E: KVM HV host module doesn't work anymore

2024-12-20 Thread Christian Zigotzky
On 20/12/24 13:08 Christian Zigotzky wrote: On 18/12/24 15:41, Christian Zigotzky wrote: On 18/12/24 12:10, Christian Zigotzky wrote: Hello, The KVM HV host module doesn't work anymore since the PowerPC updates 6.13-1 [1] and PowerPC MM updates [2]. We have tested it with our FSL P5020/P504

KVM: PPC: Book3E: KVM HV host module doesn't work anymore

2024-12-20 Thread Christian Zigotzky
On 18/12/24 15:41, Christian Zigotzky wrote: On 18/12/24 12:10, Christian Zigotzky wrote: Hello, The KVM HV host module doesn't work anymore since the PowerPC updates 6.13-1 [1] and PowerPC MM updates [2]. We have tested it with our FSL P5020/P5040 boards [3]. The guest kernel doesn't boot.