diff options
author | Mylène Josserand <mylene.josserand@bootlin.com> | 2018-05-04 21:05:39 +0200 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@bootlin.com> | 2018-05-08 14:50:42 +0200 |
commit | 7c607944bc65761666dcccc1170398f17d1f919e (patch) | |
tree | b385455227e96fd7219855f1078406962962eb45 /arch/arm/include/asm/secure_cntvoff.h | |
parent | dff052ccf3650264a03dd8f0413c922337048e41 (diff) | |
download | lwn-7c607944bc65761666dcccc1170398f17d1f919e.tar.gz lwn-7c607944bc65761666dcccc1170398f17d1f919e.zip |
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>
Diffstat (limited to 'arch/arm/include/asm/secure_cntvoff.h')
-rw-r--r-- | arch/arm/include/asm/secure_cntvoff.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/include/asm/secure_cntvoff.h b/arch/arm/include/asm/secure_cntvoff.h new file mode 100644 index 000000000000..1f93aee1f630 --- /dev/null +++ b/arch/arm/include/asm/secure_cntvoff.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef __ASMARM_ARCH_CNTVOFF_H +#define __ASMARM_ARCH_CNTVOFF_H + +extern void secure_cntvoff_init(void); + +#endif |