Re: [PATCH 3/3] mm, arch: add generic implementation of pfn_valid() for FLATMEM

2023-01-27 Thread Huacai Chen
For LoongArch part: Acked-by: Huacai Chen On Fri, Jan 27, 2023 at 9:58 AM Guo Ren wrote: > > On Thu, Jan 26, 2023 at 3:08 AM Mike Rapoport wrote: > > > > From: "Mike Rapoport (IBM)" > > > > Every architecture that supports FLATMEM memory model defines its own > > version of pfn_valid() that

Re: [PATCH v2 00/33] Per-VMA locks

2023-01-27 Thread Suren Baghdasaryan
On Fri, Jan 27, 2023 at 3:26 PM Matthew Wilcox wrote: > > On Fri, Jan 27, 2023 at 02:51:38PM -0800, Andrew Morton wrote: > > On Fri, 27 Jan 2023 11:40:37 -0800 Suren Baghdasaryan > > wrote: > > > > > Per-vma locks idea that was discussed during SPF [1] discussion at LSF/MM > > > last year [2],

Re: [PATCH v2 00/33] Per-VMA locks

2023-01-27 Thread Matthew Wilcox
On Fri, Jan 27, 2023 at 02:51:38PM -0800, Andrew Morton wrote: > On Fri, 27 Jan 2023 11:40:37 -0800 Suren Baghdasaryan > wrote: > > > Per-vma locks idea that was discussed during SPF [1] discussion at LSF/MM > > last year [2], which concluded with suggestion that “a reader/writer > > semaphore

Re: [PATCH v2] vdso: Improve cmd_vdso_check to check all dynamic relocations

2023-01-27 Thread Fangrui Song
On Thu, Dec 29, 2022 at 11:22 AM Palmer Dabbelt wrote: > > On Wed, 21 Dec 2022 15:51:47 PST (-0800), mask...@google.com wrote: > > The actual intention is that no dynamic relocation exists. However, some > > GNU ld ports produce unneeded R_*_NONE. (If a port fails to determine > > the exact

Re: [PATCH v2 00/33] Per-VMA locks

2023-01-27 Thread Andrew Morton
On Fri, 27 Jan 2023 11:40:37 -0800 Suren Baghdasaryan wrote: > Per-vma locks idea that was discussed during SPF [1] discussion at LSF/MM > last year [2], which concluded with suggestion that “a reader/writer > semaphore could be put into the VMA itself; that would have the effect of > using the

Re: [PATCH v9 04/10] clk: Add Lynx 10G SerDes PLL driver

2023-01-27 Thread Sean Anderson
On 1/27/23 15:59, Stephen Boyd wrote: > Quoting Sean Anderson (2022-12-29 16:01:33) >> This adds support for the PLLs found in Lynx 10G "SerDes" devices found on >> various NXP QorIQ SoCs. There are two PLLs in each SerDes. This driver has >> been split from the main PHY driver to allow for better

Re: [PATCH v9 04/10] clk: Add Lynx 10G SerDes PLL driver

2023-01-27 Thread Stephen Boyd
Quoting Sean Anderson (2022-12-29 16:01:33) > This adds support for the PLLs found in Lynx 10G "SerDes" devices found on > various NXP QorIQ SoCs. There are two PLLs in each SerDes. This driver has > been split from the main PHY driver to allow for better review, even though > these PLLs are not

Re: [PATCH v4 3/7] mm: replace VM_LOCKED_CLEAR_MASK with VM_LOCKED_MASK

2023-01-27 Thread Suren Baghdasaryan
On Fri, Jan 27, 2023 at 10:12 AM Davidlohr Bueso wrote: > > On Thu, 26 Jan 2023, Suren Baghdasaryan wrote: > > >To simplify the usage of VM_LOCKED_CLEAR_MASK in vm_flags_clear(), > >replace it with VM_LOCKED_MASK bitmask and convert all users. > > Might be good to mention explicitly no change in

Re: [PATCH] scripts/spelling.txt: add "exsits" pattern and fix typo instances

2023-01-27 Thread Andrew Morton
On Fri, 27 Jan 2023 09:27:08 +0100 Luca Ceresoli wrote: > > On Thu, 26 Jan 2023 16:22:05 +0100 Luca Ceresoli wrote: > > > Fix typos and add the following to the scripts/spelling.txt: > > > > > > exsits||exists > > > > > > Signed-off-by: Luca Ceresoli > > > > You need to split this up

[PATCH v2 33/33] mm: separate vma->lock from vm_area_struct

2023-01-27 Thread Suren Baghdasaryan
vma->lock being part of the vm_area_struct causes performance regression during page faults because during contention its count and owner fields are constantly updated and having other parts of vm_area_struct used during page fault handling next to them causes constant cache line bouncing. Fix

[PATCH v2 32/33] mm/mmap: free vm_area_struct without call_rcu in exit_mmap

2023-01-27 Thread Suren Baghdasaryan
call_rcu() can take a long time when callback offloading is enabled. Its use in the vm_area_free can cause regressions in the exit path when multiple VMAs are being freed. Because exit_mmap() is called only after the last mm user drops its refcount, the page fault handlers can't be racing with it.

[PATCH v2 31/33] powerc/mm: try VMA lock-based page fault handling first

2023-01-27 Thread Suren Baghdasaryan
From: Laurent Dufour Attempt VMA lock-based page fault handling first, and fall back to the existing mmap_lock-based handling if that fails. Copied from "x86/mm: try VMA lock-based page fault handling first" Signed-off-by: Laurent Dufour Signed-off-by: Suren Baghdasaryan ---

[PATCH v2 30/33] arm64/mm: try VMA lock-based page fault handling first

2023-01-27 Thread Suren Baghdasaryan
Attempt VMA lock-based page fault handling first, and fall back to the existing mmap_lock-based handling if that fails. Signed-off-by: Suren Baghdasaryan --- arch/arm64/Kconfig| 1 + arch/arm64/mm/fault.c | 36 2 files changed, 37 insertions(+) diff

[PATCH v2 29/33] x86/mm: try VMA lock-based page fault handling first

2023-01-27 Thread Suren Baghdasaryan
Attempt VMA lock-based page fault handling first, and fall back to the existing mmap_lock-based handling if that fails. Signed-off-by: Suren Baghdasaryan --- arch/x86/Kconfig| 1 + arch/x86/mm/fault.c | 36 2 files changed, 37 insertions(+) diff --git

[PATCH v2 28/33] mm: introduce per-VMA lock statistics

2023-01-27 Thread Suren Baghdasaryan
Add a new CONFIG_PER_VMA_LOCK_STATS config option to dump extra statistics about handling page fault under VMA lock. Signed-off-by: Suren Baghdasaryan --- include/linux/vm_event_item.h | 6 ++ include/linux/vmstat.h| 6 ++ mm/Kconfig.debug | 7 +++ mm/vmstat.c

[PATCH v2 27/33] mm: prevent userfaults to be handled under per-vma lock

2023-01-27 Thread Suren Baghdasaryan
Due to the possibility of handle_userfault dropping mmap_lock, avoid fault handling under VMA lock and retry holding mmap_lock. This can be handled more gracefully in the future. Signed-off-by: Suren Baghdasaryan Suggested-by: Peter Xu --- mm/memory.c | 9 + 1 file changed, 9

Re: [PATCH v5 00/15] jevents/pmu-events improvements

2023-01-27 Thread Ian Rogers
On Fri, Jan 27, 2023, 5:20 AM John Garry wrote: > On 26/01/2023 23:36, Ian Rogers wrote: > > Hi Ian, > > At a glance, none of this series has your Signed-off-by tag.. > > Thanks, > John > Thanks John, will fix. Is there anything else? Ian > Add an optimization to jevents using the metric

[PATCH v2 26/33] mm: prevent do_swap_page from handling page faults under VMA lock

2023-01-27 Thread Suren Baghdasaryan
Due to the possibility of do_swap_page dropping mmap_lock, abort fault handling under VMA lock and retry holding mmap_lock. This can be handled more gracefully in the future. Signed-off-by: Suren Baghdasaryan Reviewed-by: Laurent Dufour --- mm/memory.c | 5 + 1 file changed, 5

[PATCH v2 24/33] mm: fall back to mmap_lock if vma->anon_vma is not yet set

2023-01-27 Thread Suren Baghdasaryan
When vma->anon_vma is not set, page fault handler will set it by either reusing anon_vma of an adjacent VMA if VMAs are compatible or by allocating a new one. find_mergeable_anon_vma() walks VMA tree to find a compatible adjacent VMA and that requires not only the faulting VMA to be stable but

[PATCH v2 25/33] mm: add FAULT_FLAG_VMA_LOCK flag

2023-01-27 Thread Suren Baghdasaryan
Add a new flag to distinguish page faults handled under protection of per-vma lock. Signed-off-by: Suren Baghdasaryan Reviewed-by: Laurent Dufour --- include/linux/mm.h | 3 ++- include/linux/mm_types.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH v2 23/33] mm: introduce lock_vma_under_rcu to be used from arch-specific code

2023-01-27 Thread Suren Baghdasaryan
Introduce lock_vma_under_rcu function to lookup and lock a VMA during page fault handling. When VMA is not found, can't be locked or changes after being locked, the function returns NULL. The lookup is performed under RCU protection to prevent the found VMA from being destroyed before the VMA lock

[PATCH v2 22/33] mm/mmap: prevent pagefault handler from racing with mmu_notifier registration

2023-01-27 Thread Suren Baghdasaryan
Page fault handlers might need to fire MMU notifications while a new notifier is being registered. Modify mm_take_all_locks to write-lock all VMAs and prevent this race with page fault handlers that would hold VMA locks. VMAs are locked before i_mmap_rwsem and anon_vma to keep the same locking

[PATCH v2 21/33] kernel/fork: assert no VMA readers during its destruction

2023-01-27 Thread Suren Baghdasaryan
Assert there are no holders of VMA lock for reading when it is about to be destroyed. Signed-off-by: Suren Baghdasaryan --- kernel/fork.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/fork.c b/kernel/fork.c index 9141427a98b2..a08cc0e2bfde 100644 --- a/kernel/fork.c +++

[PATCH v2 20/33] mm/mmap: write-lock adjacent VMAs if they can grow into unmapped area

2023-01-27 Thread Suren Baghdasaryan
While unmapping VMAs, adjacent VMAs might be able to grow into the area being unmapped. In such cases write-lock adjacent VMAs to prevent this growth. Signed-off-by: Suren Baghdasaryan --- mm/mmap.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mm/mmap.c

[PATCH v2 19/33] mm: conditionally write-lock VMA in free_pgtables

2023-01-27 Thread Suren Baghdasaryan
Normally free_pgtables needs to lock affected VMAs except for the case when VMAs were isolated under VMA write-lock. munmap() does just that, isolating while holding appropriate locks and then downgrading mmap_lock and dropping per-VMA locks before freeing page tables. Add a parameter to

[PATCH v2 18/33] mm: write-lock VMAs before removing them from VMA tree

2023-01-27 Thread Suren Baghdasaryan
Write-locking VMAs before isolating them ensures that page fault handlers don't operate on isolated VMAs. Signed-off-by: Suren Baghdasaryan --- mm/mmap.c | 1 + mm/nommu.c | 5 + 2 files changed, 6 insertions(+) diff --git a/mm/mmap.c b/mm/mmap.c index b3c247073aa0..5bdfd087b632 100644

[PATCH v2 17/33] mm/mremap: write-lock VMA while remapping it to a new address range

2023-01-27 Thread Suren Baghdasaryan
Write-lock VMA as locked before copying it and when copy_vma produces a new VMA. Signed-off-by: Suren Baghdasaryan Reviewed-by: Laurent Dufour --- mm/mmap.c | 1 + mm/mremap.c | 1 + 2 files changed, 2 insertions(+) diff --git a/mm/mmap.c b/mm/mmap.c index 60038c24d836..b3c247073aa0 100644

[PATCH v2 16/33] mm/mmap: write-lock VMA before shrinking or expanding it

2023-01-27 Thread Suren Baghdasaryan
vma_expand and vma_shrink change VMA boundaries. Expansion might also result in freeing of an adjacent VMA. Write-lock affected VMAs to prevent concurrent page faults. Signed-off-by: Suren Baghdasaryan --- mm/mmap.c | 5 + 1 file changed, 5 insertions(+) diff --git a/mm/mmap.c b/mm/mmap.c

[PATCH v2 15/33] mm/mmap: write-lock VMAs before merging, splitting or expanding them

2023-01-27 Thread Suren Baghdasaryan
Decisions about whether VMAs can be merged, split or expanded must be made while VMAs are protected from the changes which can affect that decision. For example, merge_vma uses vma->anon_vma in its decision whether the VMA can be merged. Meanwhile, page fault handler changes vma->anon_vma during

[PATCH v2 14/33] mm/khugepaged: write-lock VMA while collapsing a huge page

2023-01-27 Thread Suren Baghdasaryan
Protect VMA from concurrent page fault handler while collapsing a huge page. Page fault handler needs a stable PMD to use PTL and relies on per-VMA lock to prevent concurrent PMD changes. pmdp_collapse_flush(), set_huge_pmd() and collapse_and_free_pmd() can modify a PMD, which will not be detected

[PATCH v2 13/33] mm/mmap: move VMA locking before vma_adjust_trans_huge call

2023-01-27 Thread Suren Baghdasaryan
vma_adjust_trans_huge() modifies the VMA and such modifications should be done after VMA is marked as being written. Therefore move VMA flag modifications before vma_adjust_trans_huge() so that VMA is marked before all these modifications. Signed-off-by: Suren Baghdasaryan --- mm/mmap.c | 3 ++-

[PATCH v2 12/33] mm: mark VMA as being written when changing vm_flags

2023-01-27 Thread Suren Baghdasaryan
Updates to vm_flags have to be done with VMA marked as being written for preventing concurrent page faults or other modifications. Signed-off-by: Suren Baghdasaryan --- include/linux/mm.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/mm.h

[PATCH v2 11/33] mm: add per-VMA lock and helper functions to control it

2023-01-27 Thread Suren Baghdasaryan
Introduce per-VMA locking. The lock implementation relies on a per-vma and per-mm sequence counters to note exclusive locking: - read lock - (implemented by vma_start_read) requires the vma (vm_lock_seq) and mm (mm_lock_seq) sequence counters to differ. If they match then there must be a

[PATCH v2 10/33] mm: move mmap_lock assert function definitions

2023-01-27 Thread Suren Baghdasaryan
Move mmap_lock assert function definitions up so that they can be used by other mmap_lock routines. Signed-off-by: Suren Baghdasaryan --- include/linux/mmap_lock.h | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/include/linux/mmap_lock.h

[PATCH v2 09/33] mm: rcu safe VMA freeing

2023-01-27 Thread Suren Baghdasaryan
From: Michel Lespinasse This prepares for page faults handling under VMA lock, looking up VMAs under protection of an rcu read lock, instead of the usual mmap read lock. Signed-off-by: Michel Lespinasse Signed-off-by: Suren Baghdasaryan --- include/linux/mm_types.h | 13 ++---

[PATCH v2 08/33] mm: introduce CONFIG_PER_VMA_LOCK

2023-01-27 Thread Suren Baghdasaryan
This configuration variable will be used to build the support for VMA locking during page fault handling. This is enabled on supported architectures with SMP and MMU set. The architecture support is needed since the page fault handler is called from the architecture's page faulting code which

[PATCH v2 07/33] mm: Enable maple tree RCU mode by default.

2023-01-27 Thread Suren Baghdasaryan
From: "Liam R. Howlett" Use the maple tree in RCU mode for VMA tracking. This is necessary for the use of per-VMA locking. RCU mode is enabled by default but disabled when exiting an mm and for the new tree during a fork. Also enable RCU for the tree used in munmap operations to ensure the

[PATCH v2 06/33] maple_tree: Add smp_rmb() to dead node detection

2023-01-27 Thread Suren Baghdasaryan
From: "Liam R. Howlett" Add an smp_rmb() before reading the parent pointer to ensure that anything read from the node prior to the parent pointer hasn't been reordered ahead of this check. The is necessary for RCU mode. Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by:

[PATCH v2 05/33] maple_tree: Fix write memory barrier of nodes once dead for RCU mode

2023-01-27 Thread Suren Baghdasaryan
From: "Liam R. Howlett" During the development of the maple tree, the strategy of freeing multiple nodes changed and, in the process, the pivots were reused to store pointers to dead nodes. To ensure the readers see accurate pivots, the writers need to mark the nodes as dead and call smp_wmb()

[PATCH v2 04/33] maple_tree: remove extra smp_wmb() from mas_dead_leaves()

2023-01-27 Thread Suren Baghdasaryan
From: Liam Howlett The call to mte_set_dead_node() before the smp_wmb() already calls smp_wmb() so this is not needed. This is an optimization for the RCU mode of the maple tree. Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Liam Howlett Signed-off-by: Suren

[PATCH v2 03/33] maple_tree: Fix freeing of nodes in rcu mode

2023-01-27 Thread Suren Baghdasaryan
From: Liam Howlett The walk to destroy the nodes was not always setting the node type and would result in a destroy method potentially using the values as nodes. Avoid this by setting the correct node types. This is necessary for the RCU mode of the maple tree. Fixes: 54a611b60590 ("Maple

[PATCH v2 02/33] maple_tree: Detect dead nodes in mas_start()

2023-01-27 Thread Suren Baghdasaryan
From: Liam Howlett When initially starting a search, the root node may already be in the process of being replaced in RCU mode. Detect and restart the walk if this is the case. This is necessary for RCU mode of the maple tree. Fixes: 54a611b60590 ("Maple Tree: add new data structure")

[PATCH v2 01/33] maple_tree: Be more cautious about dead nodes

2023-01-27 Thread Suren Baghdasaryan
From: Liam Howlett ma_pivots() and ma_data_end() may be called with a dead node. Ensure to that the node isn't dead before using the returned values. This is necessary for RCU mode of the maple tree. Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Liam Howlett

[PATCH v2 00/33] Per-VMA locks

2023-01-27 Thread Suren Baghdasaryan
Previous version: v1: https://lore.kernel.org/all/20230109205336.3665937-1-sur...@google.com/ RFC: https://lore.kernel.org/all/20220901173516.702122-1-sur...@google.com/ LWN article describing the feature: https://lwn.net/Articles/906852/ Per-vma locks idea that was discussed during SPF [1]

Re: [PATCH] powerpc/rtas: Replace one-element arrays with flexible arrays

2023-01-27 Thread Kees Cook
On Fri, Jan 27, 2023 at 07:10:28AM -0600, Nathan Lynch wrote: > Andrew Donnellan writes: > > Using a one-element array as a fake flexible array is deprecated. > > > > Replace the one-element flexible arrays in rtas-types.h with C99 standard > > flexible array members instead. > > > > This helps

Re: [PATCH v4 3/7] mm: replace VM_LOCKED_CLEAR_MASK with VM_LOCKED_MASK

2023-01-27 Thread Davidlohr Bueso
On Thu, 26 Jan 2023, Suren Baghdasaryan wrote: To simplify the usage of VM_LOCKED_CLEAR_MASK in vm_flags_clear(), replace it with VM_LOCKED_MASK bitmask and convert all users. Might be good to mention explicitly no change in semantics, but otherwise lgtm Reviewed-by: Davidlohr Bueso

Re: [PATCH v9 07/10] arm64: dts: ls1046ardb: Add serdes bindings

2023-01-27 Thread Krzysztof Kozlowski
On 27/01/2023 17:42, Sean Anderson wrote: > On 1/27/23 11:41, Krzysztof Kozlowski wrote: >> On 27/01/2023 17:22, Sean Anderson wrote: >>> On 1/27/23 11:15, Krzysztof Kozlowski wrote: On 27/01/2023 17:11, Sean Anderson wrote: > > .../boot/dts/freescale/fsl-ls1046a-rdb.dts|

Re: [PATCH v9 07/10] arm64: dts: ls1046ardb: Add serdes bindings

2023-01-27 Thread Sean Anderson
On 1/27/23 11:41, Krzysztof Kozlowski wrote: > On 27/01/2023 17:22, Sean Anderson wrote: >> On 1/27/23 11:15, Krzysztof Kozlowski wrote: >>> On 27/01/2023 17:11, Sean Anderson wrote: .../boot/dts/freescale/fsl-ls1046a-rdb.dts| 112 ++

Re: [PATCH v9 07/10] arm64: dts: ls1046ardb: Add serdes bindings

2023-01-27 Thread Krzysztof Kozlowski
On 27/01/2023 17:22, Sean Anderson wrote: > On 1/27/23 11:15, Krzysztof Kozlowski wrote: >> On 27/01/2023 17:11, Sean Anderson wrote: >>> >>> .../boot/dts/freescale/fsl-ls1046a-rdb.dts| 112 ++ >>> drivers/phy/freescale/Kconfig | 1 + >> >>

Re: [PATCH v9 07/10] arm64: dts: ls1046ardb: Add serdes bindings

2023-01-27 Thread Sean Anderson
On 1/27/23 11:15, Krzysztof Kozlowski wrote: > On 27/01/2023 17:11, Sean Anderson wrote: >> >> .../boot/dts/freescale/fsl-ls1046a-rdb.dts| 112 ++ >> drivers/phy/freescale/Kconfig | 1 + > > The phy driver Kconfig change shouldn't be part

Re: [PATCH v9 07/10] arm64: dts: ls1046ardb: Add serdes bindings

2023-01-27 Thread Krzysztof Kozlowski
On 27/01/2023 17:11, Sean Anderson wrote: > > .../boot/dts/freescale/fsl-ls1046a-rdb.dts| 112 ++ > drivers/phy/freescale/Kconfig | 1 + The phy driver Kconfig change shouldn't be part of this patch. >>> >>> I put it here for

Re: [PATCH v9 07/10] arm64: dts: ls1046ardb: Add serdes bindings

2023-01-27 Thread Sean Anderson
On 1/27/23 02:52, Shawn Guo wrote: > On Thu, Jan 26, 2023 at 11:48:53AM -0500, Sean Anderson wrote: >> On 1/25/23 18:43, Shawn Guo wrote: >> > On Thu, Dec 29, 2022 at 07:01:36PM -0500, Sean Anderson wrote: >> >> This adds appropriate bindings for the macs which use the SerDes. The >> >> 156.25MHz

Re: [PATCH v4 4/7] mm: replace vma->vm_flags direct modifications with modifier calls

2023-01-27 Thread Liam R. Howlett
* Suren Baghdasaryan [230126 14:38]: > Replace direct modifications to vma->vm_flags with calls to modifier > functions to be able to track flag changes and to keep vma locking > correctness. > That was long, but it all looks good! Reviewed-by: Liam R. Howlett > Signed-off-by: Suren

Re: [PATCH v5 00/15] jevents/pmu-events improvements

2023-01-27 Thread John Garry
On 27/01/2023 13:48, Ian Rogers wrote: On Fri, Jan 27, 2023, 5:20 AM John Garry > wrote: On 26/01/2023 23:36, Ian Rogers wrote: Hi Ian, At a glance, none of this series has your Signed-off-by tag.. Thanks, John Thanks John, will fix. Is

Re: [PATCH 0/2] powerpc: Fix livepatch module re-patching issue

2023-01-27 Thread Joe Lawrence
On Tue, Jan 24, 2023 at 07:38:03PM -0800, Josh Poimboeuf wrote: > Fix a livepatch bug seen when reloading a patched module. > > This is the powerpc counterpart to Song Liu's fix for a similar issue on > x86: > > https://lkml.kernel.org/lkml/20230121004945.697003-2-s...@kernel.org > > Josh

Re: [PATCH v5 00/15] jevents/pmu-events improvements

2023-01-27 Thread John Garry
On 26/01/2023 23:36, Ian Rogers wrote: Hi Ian, At a glance, none of this series has your Signed-off-by tag.. Thanks, John Add an optimization to jevents using the metric code, rewrite metrics in terms of each other in order to minimize size and improve readability. For example, on Power8

Re: [PATCH v5 12/15] perf pmu-events: Fix testing with JEVENTS_ARCH=all

2023-01-27 Thread John Garry
On 26/01/2023 23:36, Ian Rogers wrote: The #slots literal will return NAN when not on ARM64 which causes a perf test failure when not on an ARM64 for a JEVENTS_ARCH=all build: .. 10.4: Parsing of PMU event table metrics with fake PMUs : FAILED! .. Add an is_test boolean so that the

[PATCH v2] powerpc/mce: log the error for all unrecoverable errors

2023-01-27 Thread Ganesh Goudar
For all unrecoverable errors we are missing to log the error, Since machine_check_log_err() is not getting called for unrecoverable errors. Raise irq work in save_mce_event() for unrecoverable errors, So that we log the error from MCE event handling block in timer handler. Log without this

Re: [PATCH v5 11/15] perf jevents: Add model list option

2023-01-27 Thread John Garry
On 26/01/2023 23:36, Ian Rogers wrote: This allows the set of generated jevents events and metrics be limited to a subset of the model names. Appropriate if trying to minimize the binary size where only a set of models are possible. No SoB or RB tags at all. Thanks, John ---

Re: [PATCH] powerpc/rtas: Replace one-element arrays with flexible arrays

2023-01-27 Thread Nathan Lynch
Andrew Donnellan writes: > Using a one-element array as a fake flexible array is deprecated. > > Replace the one-element flexible arrays in rtas-types.h with C99 standard > flexible array members instead. > > This helps us move towards enabling -fstrict-flex-arrays=3 in future. > > Found using

Re: [PATCH 2/2] powerpc/module_64: Fix "expected nop" error on module re-patching

2023-01-27 Thread Miroslav Benes
On Tue, 24 Jan 2023, Josh Poimboeuf wrote: > When a module with a livepatched function is unloaded and then reloaded, > klp attempts to dynamically re-patch it. On ppc64, that fails with the > following error: > > module_64: livepatch_nfsd: Expected nop after call, got e8410018 at >

Re: [PATCH] powerpc/rtas: Drop unused export symbols

2023-01-27 Thread Nathan Lynch
Michael Ellerman writes: > Some RTAS symbols are never used by modular code, drop their exports. > > Signed-off-by: Michael Ellerman > --- > arch/powerpc/kernel/rtas.c | 4 > 1 file changed, 4 deletions(-) > > FYI: I'll slot this in prior to Nathan's series changing the exports > to GPL.

Re: [PATCH 1/2] powerpc/module_64: Improve restore_r2() return semantics

2023-01-27 Thread Miroslav Benes
On Tue, 24 Jan 2023, Josh Poimboeuf wrote: > restore_r2() returns 1 on success, which is surprising for a non-boolean > function. Change it to return 0 on success and -errno on error to match > kernel coding convention. > > Signed-off-by: Josh Poimboeuf Reviewed-by: Miroslav Benes M

Re: [PATCH v2 01/16] of: device: make of_device_uevent_modalias() take a const device *

2023-01-27 Thread Greg Kroah-Hartman
On Wed, Jan 11, 2023 at 08:54:04AM -0600, Rob Herring wrote: > On Wed, Jan 11, 2023 at 5:30 AM Greg Kroah-Hartman > wrote: > > > > of_device_uevent_modalias() does not modify the device pointer passed to > > it, so mark it constant. In order to properly do this, a number of > > busses need to

[PATCH] powerpc/rtas: Drop unused export symbols

2023-01-27 Thread Michael Ellerman
Some RTAS symbols are never used by modular code, drop their exports. Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/rtas.c | 4 1 file changed, 4 deletions(-) FYI: I'll slot this in prior to Nathan's series changing the exports to GPL. diff --git a/arch/powerpc/kernel/rtas.c

Re: [PATCH v4 02/24] powerpc/pseries: Fix alignment of PLPKS structures and buffers

2023-01-27 Thread Michael Ellerman
Andrew Donnellan writes: > On Thu, 2023-01-26 at 17:31 +, David Laight wrote: >> Changing the size to kzalloc() doesn't help. >> The alignment depends on the allocator and is only required to have >> a relatively small alignment (ARCH_MINALIGN?) regardless of the size. >> >> IIRC one of the

Re: [PATCH v4 02/24] powerpc/pseries: Fix alignment of PLPKS structures and buffers

2023-01-27 Thread Michael Ellerman
Segher Boessenkool writes: > On Thu, Jan 26, 2023 at 12:09:53AM +1100, Michael Ellerman wrote: >> Andrew Donnellan writes: >> > A number of structures and buffers passed to PKS hcalls have alignment >> > requirements, which could on occasion cause problems: >> > >> > - Authorisation structures

RE: [PATCH v4 02/24] powerpc/pseries: Fix alignment of PLPKS structures and buffers

2023-01-27 Thread David Laight
From: Andrew Donnellan > Sent: 27 January 2023 03:21 > > On Thu, 2023-01-26 at 17:31 +, David Laight wrote: > > Changing the size to kzalloc() doesn't help. > > The alignment depends on the allocator and is only required to have > > a relatively small alignment (ARCH_MINALIGN?) regardless of

Re: [PATCH] powerpc/rtas: Replace one-element arrays with flexible arrays

2023-01-27 Thread Leonardo Brás
On Fri, 2023-01-27 at 19:50 +1100, Andrew Donnellan wrote: > Using a one-element array as a fake flexible array is deprecated. > > Replace the one-element flexible arrays in rtas-types.h with C99 standard > flexible array members instead. > > This helps us move towards enabling

[PATCH] powerpc/rtas: Replace one-element arrays with flexible arrays

2023-01-27 Thread Andrew Donnellan
Using a one-element array as a fake flexible array is deprecated. Replace the one-element flexible arrays in rtas-types.h with C99 standard flexible array members instead. This helps us move towards enabling -fstrict-flex-arrays=3 in future. Found using

Re: [PATCH] scripts/spelling.txt: add "exsits" pattern and fix typo instances

2023-01-27 Thread Luca Ceresoli
Hello Jakub, thanks for our review. On Thu, 26 Jan 2023 15:55:26 -0800 Jakub Kicinski wrote: > On Thu, 26 Jan 2023 16:22:05 +0100 Luca Ceresoli wrote: > > Fix typos and add the following to the scripts/spelling.txt: > > > > exsits||exists > > > > Signed-off-by: Luca Ceresoli > > You