arm64: arch_timer: Add workaround for hisilicon-161601 erratum
Get series with b4
b4 am [email protected]Versions newest first
- v5 Latest0 of 6 patches 0 repliesNew
Patches in v5 No applies recorded yet
None of the 6 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.
Cover letter [PATCH v5 0/6] arm64: arch_timer: Add workaround for hisilicon-161601 erratum
Hi Ding,
Quoted 50 lines · Ding Tianhong
Erratum Hisilicon-161601 says that the ARM generic timer counter "has the potential to contain an erroneous value when the timer value changes". Accesses to TVAL (both read and write) are also affected due to the implicit counter read. Accesses to CVAL are not affected.
The workaround is to reread the system count registers until the value of the second read is larger than the first one by less than 32, the system counter can be guaranteed not to return wrong value twice by back-to-back read and the error value is always larger than the correct one by 32. Writes to TVAL are replaced with an equivalent write to CVAL.
v2: Introducing a new generic erratum handling mechanism for fsl,a008585 and hisilicon,161601.
Significant rework based on feedback, including seperate the fsl erratum a008585 to another patch, update the erratum name and remove unwanted code.v3: Introducing the
erratum_workaround_set_snegeneric function for fsl erratum a008585
and make the #define__fsl_a008585_read_regto be private to the .c file instead of being globally visible. After discussion with Marc and Will, a consensus decision was made to remove the commandline parameter for enabling fsl,erratum-a008585 erratum, and make some generic name more specific, exporttimer_unstable_counter_workaroundfor module access.Significant rework based on feedback, including fix some alignment problem, make the #define
__hisi_161601_read_regto be private to the .c file instead of being globally visible, add more accurate annotation and modify a bit of logical format to enablearch_timer_read_ool_enabled, remove the kernel commandline parameter clocksource.arm_arch_timer.hisilicon-161601.Introduce a generic aquick framework for erratum in ACPI mode.
v4: rename the quirk handler parameter to make it more generic, and
avoid break loop when handling the quirk becasue it need to support multi quirks handler.update some data structures for acpi mode.
v5: Adapt the new kernel-parameters.txt for latest kernel version.
Set the retries of reread system counter to 50, because it is possible that some interrupts may lead to more than twice read errors and break the loop, it will trigger the warning, so we set the number of retries far beyond the number of iterations the loop has been observed to take.Ding Tianhong (4):
arm64:arch_timer: Add device tree binding for hisilicon-161601
erratum
arm64:arch_timer: Introduce a generic erratum handing mechanism forfsl-a008585 arm64: arch_timer: Work around Erratum Hisilicon-161601 arm64: arch timer: Add timer erratum property for Hip05-d02 and Hip06-d03
Quoted 4 lines
Hanjun Guo (2):
arm64:arch_timer: apci: Introduce a generic aquirk framework for
erratum
arm64:arch_timer: acpi: add hisi timer errata data
Since the ACPI code is conflict with Fuwei's GTDT patch set, let's split this patch set into two parts, one is the DT based code, and the other is the ACPI part, I will rebase ACPI code on top of Fuwei's patch set so please go upstream first.
Thanks
Hanjun