aboutsummaryrefslogtreecommitdiff
path: root/driver/gator_events_armv7.c
diff options
context:
space:
mode:
authorDrew Richardson <drew.richardson@arm.com>2012-12-14 12:00:00 -0800
committerDrew Richardson <drew.richardson@arm.com>2014-12-19 15:33:02 -0800
commita01058e248133bb7c1ba0238ab380e4fac924e97 (patch)
tree8fc08c126fcb711fc9a2011eb6314c68d429b800 /driver/gator_events_armv7.c
parentb04e8aefeed42f23955e88c7aa1611e49bdf5909 (diff)
downloadgator-a01058e248133bb7c1ba0238ab380e4fac924e97.tar.gz
gator: Version 5.135.13
Signed-off-by: Drew Richardson <drew.richardson@arm.com>
Diffstat (limited to 'driver/gator_events_armv7.c')
-rw-r--r--driver/gator_events_armv7.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/driver/gator_events_armv7.c b/driver/gator_events_armv7.c
index 590421d..212b17b 100644
--- a/driver/gator_events_armv7.c
+++ b/driver/gator_events_armv7.c
@@ -22,7 +22,7 @@
#define PMNC_E (1 << 0) /* Enable all counters */
#define PMNC_P (1 << 1) /* Reset all counters */
#define PMNC_C (1 << 2) /* Cycle counter reset */
-#define PMNC_MASK 0x3f /* Mask for writable bits */
+#define PMNC_MASK 0x3f /* Mask for writable bits */
// ccnt reg
#define CCNT_REG (1 << 31)
@@ -63,7 +63,7 @@ inline u32 armv7_ccnt_read(u32 reset_value)
local_irq_save(flags);
asm volatile("mcr p15, 0, %0, c9, c12, 2" : : "r" (den)); // disable
asm volatile("mrc p15, 0, %0, c9, c13, 0" : "=r" (val)); // read
- asm volatile("mcr p15, 0, %0, c9, c13, 0" : : "r" (newval));// new value
+ asm volatile("mcr p15, 0, %0, c9, c13, 0" : : "r" (newval)); // new value
asm volatile("mcr p15, 0, %0, c9, c12, 1" : : "r" (den)); // enable
local_irq_restore(flags);
@@ -82,7 +82,7 @@ inline u32 armv7_cntn_read(unsigned int cnt, u32 reset_value)
asm volatile("mcr p15, 0, %0, c9, c12, 2" : : "r" (den)); // disable
asm volatile("mcr p15, 0, %0, c9, c12, 5" : : "r" (sel)); // select
asm volatile("mrc p15, 0, %0, c9, c13, 2" : "=r" (oldval)); // read
- asm volatile("mcr p15, 0, %0, c9, c13, 2" : : "r" (newval));// new value
+ asm volatile("mcr p15, 0, %0, c9, c13, 2" : : "r" (newval)); // new value
asm volatile("mcr p15, 0, %0, c9, c12, 1" : : "r" (den)); // enable
local_irq_restore(flags);
@@ -143,7 +143,7 @@ static int gator_events_armv7_create_files(struct super_block *sb, struct dentry
if (i == 0) {
snprintf(buf, sizeof buf, "ARM_%s_ccnt", pmnc_name);
} else {
- snprintf(buf, sizeof buf, "ARM_%s_cnt%d", pmnc_name, i-1);
+ snprintf(buf, sizeof buf, "ARM_%s_cnt%d", pmnc_name, i - 1);
}
dir = gatorfs_mkdir(sb, root, buf);
if (!dir) {
@@ -159,7 +159,7 @@ static int gator_events_armv7_create_files(struct super_block *sb, struct dentry
return 0;
}
-static int gator_events_armv7_online(int** buffer)
+static int gator_events_armv7_online(int **buffer)
{
unsigned int cnt, len = 0, cpu = smp_processor_id();
@@ -214,11 +214,11 @@ static int gator_events_armv7_online(int** buffer)
return len;
}
-static int gator_events_armv7_offline(int** buffer)
+static int gator_events_armv7_offline(int **buffer)
{
- // disbale all counters, including PMCCNTR; overflow IRQs will not be signaled
+ // disable all counters, including PMCCNTR; overflow IRQs will not be signaled
armv7_pmnc_write(armv7_pmnc_read() & ~PMNC_E);
-
+
return 0;
}
@@ -298,7 +298,7 @@ int gator_events_armv7_init(void)
return -1;
}
- pmnc_counters++; // CNT[n] + CCNT
+ pmnc_counters++; // CNT[n] + CCNT
for (cnt = CCNT; cnt < CNTMAX; cnt++) {
pmnc_enabled[cnt] = 0;