ARM: smp: Add initialization of CNTVOFF
authorMylène Josserand <mylene.josserand@bootlin.com>
Fri, 4 May 2018 19:05:39 +0000 (21:05 +0200)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Tue, 8 May 2018 12:50:42 +0000 (14:50 +0200)
commit7c607944bc65761666dcccc1170398f17d1f919e
treeb385455227e96fd7219855f1078406962962eb45
parentdff052ccf3650264a03dd8f0413c922337048e41
ARM: smp: Add initialization of CNTVOFF

The CNTVOFF register from arch timer is uninitialized.
It should be done by the bootloader but it is currently not the case,
even for boot CPU because this SoC is booting in secure mode.
It leads to an random offset value meaning that each CPU will have a
different time, which isn't working very well.

Add assembly code used for boot CPU and secondary CPU cores to make
sure that the CNTVOFF register is initialized. Because this code can
be used by different platforms, add this assembly file in ARM's common
folder.

Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
arch/arm/common/Makefile
arch/arm/common/secure_cntvoff.S [new file with mode: 0644]
arch/arm/include/asm/secure_cntvoff.h [new file with mode: 0644]