[PATCH v2] powerpc: setup_64: set up PACA earlier to avoid kcov problems
Christophe Leroy
christophe.leroy at c-s.fr
Thu Feb 13 17:23:32 AEDT 2020
Le 13/02/2020 à 06:23, Daniel Axtens a écrit :
> diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
> index e05e6dd67ae6..ef455da7efa3 100644
> --- a/arch/powerpc/kernel/setup_64.c
> +++ b/arch/powerpc/kernel/setup_64.c
> @@ -285,18 +285,25 @@ void __init early_setup(unsigned long dt_ptr)
>
> /* -------- printk is _NOT_ safe to use here ! ------- */
>
> - /* Try new device tree based feature discovery ... */
> - if (!dt_cpu_ftrs_init(__va(dt_ptr)))
> - /* Otherwise use the old style CPU table */
> - identify_cpu(0, mfspr(SPRN_PVR));
> + /* Assume we're on cpu 0 for now. Don't write to the paca yet!
> + *
> + * We need to load a PACA very early if we are using kcov. kcov will
> + * call in_task() in its instrumentation, which relies on the current
> + * task from the PACA. dt_cpu_ftrs_init is coveraged-enabled and also
> + * calls into the coverage-enabled generic dt library.
> + */
Checkpatch won't be happy I guess. For multiline comments, there should
be no text on the first line starting with /*
Christophe
More information about the Linuxppc-dev
mailing list