Replace TCR_NFD[0|1] (used in TCR_CLEAR_FUJITSU_ERRATUM_010001) with field
definitions which are available in tool sysreg format. Helps in completely
dropping off the adhoc TCR_NFD[0|1] macros later.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Leo Yan <leo.yan@arm.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
tools/arch/arm64/include/asm/cputype.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/arch/arm64/include/asm/cputype.h b/tools/arch/arm64/include/asm/cputype.h
index 139d5e87dc95..dfa12df5e290 100644
--- a/tools/arch/arm64/include/asm/cputype.h
+++ b/tools/arch/arm64/include/asm/cputype.h
@@ -243,7 +243,7 @@
/* Fujitsu Erratum 010001 affects A64FX 1.0 and 1.1, (v0r0 and v1r0) */
#define MIDR_FUJITSU_ERRATUM_010001 MIDR_FUJITSU_A64FX
#define MIDR_FUJITSU_ERRATUM_010001_MASK (~MIDR_CPU_VAR_REV(1, 0))
-#define TCR_CLEAR_FUJITSU_ERRATUM_010001 (TCR_NFD1 | TCR_NFD0)
+#define TCR_CLEAR_FUJITSU_ERRATUM_010001 (TCR_EL1_NFD1 | TCR_EL1_NFD0)
#ifndef __ASSEMBLY__
--
2.25.1
On Mon, Oct 13, 2025 at 10:59:43AM +0530, Anshuman Khandual wrote: > Replace TCR_NFD[0|1] (used in TCR_CLEAR_FUJITSU_ERRATUM_010001) with field > definitions which are available in tool sysreg format. Helps in completely > dropping off the adhoc TCR_NFD[0|1] macros later. > > Cc: Catalin Marinas <catalin.marinas@arm.com> > Cc: Will Deacon <will@kernel.org> > Cc: Arnaldo Carvalho de Melo <acme@redhat.com> > Cc: Namhyung Kim <namhyung@kernel.org> > Cc: Leo Yan <leo.yan@arm.com> > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> > --- > tools/arch/arm64/include/asm/cputype.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/arch/arm64/include/asm/cputype.h b/tools/arch/arm64/include/asm/cputype.h > index 139d5e87dc95..dfa12df5e290 100644 > --- a/tools/arch/arm64/include/asm/cputype.h > +++ b/tools/arch/arm64/include/asm/cputype.h > @@ -243,7 +243,7 @@ > /* Fujitsu Erratum 010001 affects A64FX 1.0 and 1.1, (v0r0 and v1r0) */ > #define MIDR_FUJITSU_ERRATUM_010001 MIDR_FUJITSU_A64FX > #define MIDR_FUJITSU_ERRATUM_010001_MASK (~MIDR_CPU_VAR_REV(1, 0)) > -#define TCR_CLEAR_FUJITSU_ERRATUM_010001 (TCR_NFD1 | TCR_NFD0) > +#define TCR_CLEAR_FUJITSU_ERRATUM_010001 (TCR_EL1_NFD1 | TCR_EL1_NFD0) Isn't this file usually updated automatically (well, someone running a script to sync) from the corresponding arch/arm64/ one? -- Catalin
On Mon, Nov 03, 2025 at 05:31:27PM +0000, Catalin Marinas wrote: > On Mon, Oct 13, 2025 at 10:59:43AM +0530, Anshuman Khandual wrote: > > Replace TCR_NFD[0|1] (used in TCR_CLEAR_FUJITSU_ERRATUM_010001) with field > > definitions which are available in tool sysreg format. Helps in completely > > dropping off the adhoc TCR_NFD[0|1] macros later. > > > > Cc: Catalin Marinas <catalin.marinas@arm.com> > > Cc: Will Deacon <will@kernel.org> > > Cc: Arnaldo Carvalho de Melo <acme@redhat.com> > > Cc: Namhyung Kim <namhyung@kernel.org> > > Cc: Leo Yan <leo.yan@arm.com> > > Cc: linux-kernel@vger.kernel.org > > Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> > > --- > > tools/arch/arm64/include/asm/cputype.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tools/arch/arm64/include/asm/cputype.h b/tools/arch/arm64/include/asm/cputype.h > > index 139d5e87dc95..dfa12df5e290 100644 > > --- a/tools/arch/arm64/include/asm/cputype.h > > +++ b/tools/arch/arm64/include/asm/cputype.h > > @@ -243,7 +243,7 @@ > > /* Fujitsu Erratum 010001 affects A64FX 1.0 and 1.1, (v0r0 and v1r0) */ > > #define MIDR_FUJITSU_ERRATUM_010001 MIDR_FUJITSU_A64FX > > #define MIDR_FUJITSU_ERRATUM_010001_MASK (~MIDR_CPU_VAR_REV(1, 0)) > > -#define TCR_CLEAR_FUJITSU_ERRATUM_010001 (TCR_NFD1 | TCR_NFD0) > > +#define TCR_CLEAR_FUJITSU_ERRATUM_010001 (TCR_EL1_NFD1 | TCR_EL1_NFD0) > > Isn't this file usually updated automatically (well, someone running a > script to sync) from the corresponding arch/arm64/ one? Yes, usually perf tools maintainers (Arnaldo or Namhyung) will sync headers in tools. Seems to me, it is also fine to send this patch. Please kindly remind perf maintainers after the kernel changes have been merged, so it is safe for picking up the change in tools. BTW, I built the perf with this series and did not see any issue. Thanks, Leo
On 03/11/25 11:33 PM, Leo Yan wrote: > On Mon, Nov 03, 2025 at 05:31:27PM +0000, Catalin Marinas wrote: >> On Mon, Oct 13, 2025 at 10:59:43AM +0530, Anshuman Khandual wrote: >>> Replace TCR_NFD[0|1] (used in TCR_CLEAR_FUJITSU_ERRATUM_010001) with field >>> definitions which are available in tool sysreg format. Helps in completely >>> dropping off the adhoc TCR_NFD[0|1] macros later. >>> >>> Cc: Catalin Marinas <catalin.marinas@arm.com> >>> Cc: Will Deacon <will@kernel.org> >>> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> >>> Cc: Namhyung Kim <namhyung@kernel.org> >>> Cc: Leo Yan <leo.yan@arm.com> >>> Cc: linux-kernel@vger.kernel.org >>> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> >>> --- >>> tools/arch/arm64/include/asm/cputype.h | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/tools/arch/arm64/include/asm/cputype.h b/tools/arch/arm64/include/asm/cputype.h >>> index 139d5e87dc95..dfa12df5e290 100644 >>> --- a/tools/arch/arm64/include/asm/cputype.h >>> +++ b/tools/arch/arm64/include/asm/cputype.h >>> @@ -243,7 +243,7 @@ >>> /* Fujitsu Erratum 010001 affects A64FX 1.0 and 1.1, (v0r0 and v1r0) */ >>> #define MIDR_FUJITSU_ERRATUM_010001 MIDR_FUJITSU_A64FX >>> #define MIDR_FUJITSU_ERRATUM_010001_MASK (~MIDR_CPU_VAR_REV(1, 0)) >>> -#define TCR_CLEAR_FUJITSU_ERRATUM_010001 (TCR_NFD1 | TCR_NFD0) >>> +#define TCR_CLEAR_FUJITSU_ERRATUM_010001 (TCR_EL1_NFD1 | TCR_EL1_NFD0) >> >> Isn't this file usually updated automatically (well, someone running a >> script to sync) from the corresponding arch/arm64/ one? > > Yes, usually perf tools maintainers (Arnaldo or Namhyung) will sync > headers in tools. > > Seems to me, it is also fine to send this patch. Please kindly remind > perf maintainers after the kernel changes have been merged, so it is > safe for picking up the change in tools. > > BTW, I built the perf with this series and did not see any issue. Agreed. I have not seen any problem around this as well.
© 2016 - 2025 Red Hat, Inc.