You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2022/05/13 15:55:38 UTC

[incubator-nuttx] 01/04: arm/cortex-r: add _pmu_* perfix for performance monitor functions

This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 34b124bc14e6ab60946296fdc51b15265c5ce43d
Author: chao.an <an...@xiaomi.com>
AuthorDate: Fri May 13 17:03:14 2022 +0800

    arm/cortex-r: add _pmu_* perfix for performance monitor functions
    
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 arch/arm/src/armv7-r/sctlr.h      | 4 ++--
 arch/arm/src/tms570/tms570_boot.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/src/armv7-r/sctlr.h b/arch/arm/src/armv7-r/sctlr.h
index 98db4980af..bdc2b77c12 100644
--- a/arch/arm/src/armv7-r/sctlr.h
+++ b/arch/arm/src/armv7-r/sctlr.h
@@ -526,7 +526,7 @@ static inline void cp15_wractlr(unsigned int actlr)
 
 /* Read/write the Performance Monitor Control Register (PMCR) */
 
-static inline unsigned int cp15_rdpmcr(void)
+static inline unsigned int cp15_pmu_rdpmcr(void)
 {
   unsigned int pmcr;
   __asm__ __volatile__
@@ -540,7 +540,7 @@ static inline unsigned int cp15_rdpmcr(void)
   return pmcr;
 }
 
-static inline void cp15_wrpmcr(unsigned int pmcr)
+static inline void cp15_pmu_wrpmcr(unsigned int pmcr)
 {
   __asm__ __volatile__
     (
diff --git a/arch/arm/src/tms570/tms570_boot.c b/arch/arm/src/tms570/tms570_boot.c
index dfdadd8dd7..363a3a6c5d 100644
--- a/arch/arm/src/tms570/tms570_boot.c
+++ b/arch/arm/src/tms570/tms570_boot.c
@@ -104,9 +104,9 @@
 
 static inline void tms570_event_export(void)
 {
-  uint32_t pmcr = cp15_rdpmcr();
+  uint32_t pmcr = cp15_pmu_rdpmcr();
   pmcr |= PCMR_X;
-  cp15_wrpmcr(pmcr);
+  cp15_pmu_wrpmcr(pmcr);
 }
 
 /****************************************************************************