Re: [PATCH v2] powerpc: setup_64: set up PACA earlier to avoid kcov problems

2020-03-05 Thread Andrew Donnellan
On 6/3/20 3:40 pm, Daniel Axtens wrote: There's some special handling for CPU_FTR_HVMODE in cpufeatures_setup_cpu() in kernel/dt_cpu_ftrs.c: /* Initialize the base environment -- clear FSCR/HFSCR. */ hv_mode = !!(mfmsr() & MSR_HV); if (hv_mode) {

Re: [PATCH v2] powerpc: setup_64: set up PACA earlier to avoid kcov problems

2020-03-05 Thread Daniel Axtens
> There's some special handling for CPU_FTR_HVMODE in > cpufeatures_setup_cpu() in kernel/dt_cpu_ftrs.c: > > /* Initialize the base environment -- clear FSCR/HFSCR. */ > hv_mode = !!(mfmsr() & MSR_HV); > if (hv_mode) { > /* CPU_FTR_HVMODE is used early

Re: [PATCH v2] powerpc: setup_64: set up PACA earlier to avoid kcov problems

2020-02-13 Thread Andrew Donnellan
On 13/2/20 4:23 pm, Daniel Axtens wrote: kcov instrumentation is collected the __sanitizer_cov_trace_pc hook in kernel/kcov.c. The compiler inserts these hooks into every basic block unless kcov is disabled for that file. We then have a deep call-chain: - __sanitizer_cov_trace_pc calls to

Re: [PATCH v2] powerpc: setup_64: set up PACA earlier to avoid kcov problems

2020-02-12 Thread Christophe Leroy
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

[PATCH v2] powerpc: setup_64: set up PACA earlier to avoid kcov problems

2020-02-12 Thread Daniel Axtens
kcov instrumentation is collected the __sanitizer_cov_trace_pc hook in kernel/kcov.c. The compiler inserts these hooks into every basic block unless kcov is disabled for that file. We then have a deep call-chain: - __sanitizer_cov_trace_pc calls to check_kcov_mode() - check_kcov_mode()