Hi Oleksandr, On Fri, May 17, 2019 at 11:58 AM Oleksandr Tyshchenko <olekst...@gmail.com> wrote: > From: Oleksandr Tyshchenko <oleksandr_tyshche...@epam.com> > > If PSCI is available then most likely we are running on PSCI-enabled > U-Boot which, we assume, has already taken care of resetting CNTVOFF > and updating counter module before switching to non-secure mode > and we don't need to. > > As the psci_smp_available() helper always returns false if CONFIG_SMP > is disabled, it can't be used safely as an indicator of PSCI usage. > For that reason, we check for the mandatory PSCI operation to be > available. > > Please note, an extra check to prevent secure_cntvoff_init() from > being called for secondary CPUs in headsmp-apmu.S is not needed, > as SMP code for APMU based system is not executed if PSCI is in use. > > Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshche...@epam.com>
> Changes in v5: > - Check for psci_ops.cpu_on if CONFIG_ARM_PSCI_FW is defined Thanks for the update! Reviewed-by: Geert Uytterhoeven <geert+rene...@glider.be> Two cosmetic comments below. I'll leave it to Simon to ignore them for applying ;-) > @@ -62,6 +63,21 @@ void __init rcar_gen2_timer_init(void) > { > void __iomem *base; > u32 freq; > + bool need_update = true; Some people like reverse Xmas tree declaration order... > + > + /* > + * If PSCI is available then most likely we are running on > PSCI-enabled > + * U-Boot which, we assume, has already taken care of resetting > CNTVOFF > + * and updating counter module before switching to non-secure mode > + * and we don't need to. > + */ > +#if defined(CONFIG_ARM_PSCI_FW) #ifdef CONFIG_ARM_PSCI_FW ? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds