[PATCH v4 2/2] powerpc/mce: Remove per cpu variables from MCE handlers
Christophe Leroy
christophe.leroy at csgroup.eu
Mon Jan 25 20:24:21 AEDT 2021
Le 22/01/2021 à 13:32, Ganesh Goudar a écrit :
> Access to per-cpu variables requires translation to be enabled on
> pseries machine running in hash mmu mode, Since part of MCE handler
> runs in realmode and part of MCE handling code is shared between ppc
> architectures pseries and powernv, it becomes difficult to manage
> these variables differently on different architectures, So have
> these variables in paca instead of having them as per-cpu variables
> to avoid complications.
>
> Signed-off-by: Ganesh Goudar <ganeshgr at linux.ibm.com>
> ---
> v2: Dynamically allocate memory for machine check event info
>
> v3: Remove check for hash mmu lpar, use memblock_alloc_try_nid
> to allocate memory.
>
> v4: Spliting the patch into two.
> ---
> arch/powerpc/include/asm/mce.h | 18 +++++++
> arch/powerpc/include/asm/paca.h | 4 ++
> arch/powerpc/kernel/mce.c | 79 ++++++++++++++++++------------
> arch/powerpc/kernel/setup-common.c | 2 +-
> 4 files changed, 70 insertions(+), 33 deletions(-)
>
> diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
> index 71f38e9248be..17dc451f0e45 100644
> --- a/arch/powerpc/kernel/setup-common.c
> +++ b/arch/powerpc/kernel/setup-common.c
> @@ -916,7 +916,6 @@ void __init setup_arch(char **cmdline_p)
> /* On BookE, setup per-core TLB data structures. */
> setup_tlb_core_data();
> #endif
> -
This line removal is really required for this patch ?
> /* Print various info about the machine that has been gathered so far. */
> print_system_info();
>
> @@ -938,6 +937,7 @@ void __init setup_arch(char **cmdline_p)
> exc_lvl_early_init();
> emergency_stack_init();
>
> + mce_init();
You have to include mce.h to avoid build failure on PPC32.
> smp_release_cpus();
>
> initmem_init();
>
More information about the Linuxppc-dev
mailing list