lkml.org 
[lkml]   [2019]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V5] ARM: mach-shmobile: Don't init CNTVOFF/counter if PSCI is available
On Tue, May 28, 2019 at 10:27:56AM +0200, Geert Uytterhoeven wrote:
> Hi Oleksandr,
>
> On Fri, May 17, 2019 at 11:58 AM Oleksandr Tyshchenko
> <olekstysh@gmail.com> wrote:
> > From: Oleksandr Tyshchenko <oleksandr_tyshchenko@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_tyshchenko@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+renesas@glider.be>
>
> Two cosmetic comments below. I'll leave it to Simon to ignore them for
> applying ;-)

Oleksandr, could I trouble you to respin with the
changes suggested by Geert?

>
> > @@ -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 -- geert@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
>

\
 
 \ /
  Last update: 2019-05-28 18:06    [W:0.061 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site