Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/fdt Add support for ARMv7 performance monitor (...



details:   https://anonhg.NetBSD.org/src/rev/80eb15348619
branches:  trunk
changeset: 991492:80eb15348619
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Jul 15 23:48:08 2018 +0000

description:
Add support for ARMv7 performance monitor (PMU).

diffstat:

 sys/arch/arm/fdt/files.fdt |   3 ++-
 sys/arch/arm/fdt/pmu_fdt.c |  19 ++++++++++++++++---
 2 files changed, 18 insertions(+), 4 deletions(-)

diffs (67 lines):

diff -r 35f049c6f0a2 -r 80eb15348619 sys/arch/arm/fdt/files.fdt
--- a/sys/arch/arm/fdt/files.fdt        Sun Jul 15 23:47:29 2018 +0000
+++ b/sys/arch/arm/fdt/files.fdt        Sun Jul 15 23:48:08 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.fdt,v 1.20 2018/07/15 16:07:49 jmcneill Exp $
+# $NetBSD: files.fdt,v 1.21 2018/07/15 23:48:08 jmcneill Exp $
 
 include        "dev/pckbport/files.pckbport"
 
@@ -53,6 +53,7 @@
 device armpmu
 attach armpmu at fdt with pmu_fdt
 file   arch/arm/fdt/pmu_fdt.c                  pmu_fdt
+file   dev/tprof/tprof_armv7.c                 pmu_fdt & arm32
 file   dev/tprof/tprof_armv8.c                 pmu_fdt & aarch64
 
 attach genfb at fdt with plfb_fdt: fdt_display_timing
diff -r 35f049c6f0a2 -r 80eb15348619 sys/arch/arm/fdt/pmu_fdt.c
--- a/sys/arch/arm/fdt/pmu_fdt.c        Sun Jul 15 23:47:29 2018 +0000
+++ b/sys/arch/arm/fdt/pmu_fdt.c        Sun Jul 15 23:48:08 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmu_fdt.c,v 1.1 2018/07/15 16:07:49 jmcneill Exp $ */
+/* $NetBSD: pmu_fdt.c,v 1.2 2018/07/15 23:48:08 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmu_fdt.c,v 1.1 2018/07/15 16:07:49 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmu_fdt.c,v 1.2 2018/07/15 23:48:08 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -39,10 +39,14 @@
 
 #include <dev/fdt/fdtvar.h>
 
-#if defined(__aarch64__)
+#if defined(_ARM_ARCH_8)
 #include <dev/tprof/tprof_armv8.h>
 #define arm_pmu_intr armv8_pmu_intr
 #define arm_pmu_init armv8_pmu_init
+#elif defined(_ARM_ARCH_7)
+#include <dev/tprof/tprof_armv7.h>
+#define arm_pmu_intr armv7_pmu_intr
+#define arm_pmu_init armv7_pmu_init
 #endif
 
 #include <arm/armreg.h>
@@ -59,6 +63,15 @@
        "arm,cortex-a72-pmu",
        "arm,cortex-a57-pmu",
        "arm,cortex-a53-pmu",
+
+       "arm,cortex-a35-pmu",
+       "arm,cortex-a17-pmu",
+       "arm,cortex-a12-pmu",
+       "arm,cortex-a9-pmu",
+       "arm,cortex-a8-pmu",
+       "arm,cortex-a7-pmu",
+       "arm,cortex-a5-pmu",
+
        NULL
 };
 



Home | Main Index | Thread Index | Old Index