aboutsummaryrefslogtreecommitdiff
path: root/driver/gator_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver/gator_main.c')
-rw-r--r--driver/gator_main.c35
1 files changed, 19 insertions, 16 deletions
diff --git a/driver/gator_main.c b/driver/gator_main.c
index 2bb3e87..1dcca0e 100644
--- a/driver/gator_main.c
+++ b/driver/gator_main.c
@@ -1,5 +1,5 @@
/**
- * Copyright (C) ARM Limited 2010-2014. All rights reserved.
+ * Copyright (C) ARM Limited 2010-2015. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -8,7 +8,7 @@
*/
/* This version must match the gator daemon version */
-#define PROTOCOL_VERSION 20
+#define PROTOCOL_VERSION 21
static unsigned long gator_protocol_version = PROTOCOL_VERSION;
#include <linux/slab.h>
@@ -92,21 +92,17 @@ static unsigned long gator_protocol_version = PROTOCOL_VERSION;
/* Name Frame Messages */
#define MESSAGE_COOKIE 1
#define MESSAGE_THREAD_NAME 2
-#define MESSAGE_LINK 4
/* Scheduler Trace Frame Messages */
#define MESSAGE_SCHED_SWITCH 1
#define MESSAGE_SCHED_EXIT 2
-/* Idle Frame Messages */
-#define MESSAGE_IDLE_ENTER 1
-#define MESSAGE_IDLE_EXIT 2
-
/* Summary Frame Messages */
#define MESSAGE_SUMMARY 1
#define MESSAGE_CORE_NAME 3
/* Activity Frame Messages */
+#define MESSAGE_LINK 1
#define MESSAGE_SWITCH 2
#define MESSAGE_EXIT 3
@@ -267,6 +263,10 @@ GATOR_EVENTS_LIST
* Misc
******************************************************************************/
+MODULE_PARM_DESC(gator_src_md5, "Gator driver source code md5sum");
+extern char *gator_src_md5;
+module_param_named(src_md5, gator_src_md5, charp, 0444);
+
static const struct gator_cpu gator_cpus[] = {
{
.cpuid = ARM1136,
@@ -332,6 +332,13 @@ static const struct gator_cpu gator_cpus[] = {
.pmnc_counters = 6,
},
{
+ .cpuid = CORTEX_A12,
+ .core_name = "Cortex-A17",
+ .pmnc_name = "ARMv7_Cortex_A17",
+ .dt_name = "arm,cortex-a17",
+ .pmnc_counters = 6,
+ },
+ {
.cpuid = CORTEX_A17,
.core_name = "Cortex-A17",
.pmnc_name = "ARMv7_Cortex_A17",
@@ -390,12 +397,6 @@ static const struct gator_cpu gator_cpus[] = {
.pmnc_counters = 6,
},
{
- .cpuid = AARCH64,
- .core_name = "AArch64",
- .pmnc_name = "ARM_AArch64",
- .pmnc_counters = 6,
- },
- {
.cpuid = OTHER,
.core_name = "Other",
.pmnc_name = "Other",
@@ -450,7 +451,7 @@ u32 gator_cpuid(void)
#else
asm volatile("mrs %0, midr_el1" : "=r" (val));
#endif
- return (val >> 4) & 0xfff;
+ return ((val & 0xff000000) >> 12) | ((val & 0xfff0) >> 4);
#else
return OTHER;
#endif
@@ -604,7 +605,7 @@ static void gator_send_core_name(const int cpu, const u32 cpuid)
if (cpuid == -1)
snprintf(core_name_buf, sizeof(core_name_buf), "Unknown");
else
- snprintf(core_name_buf, sizeof(core_name_buf), "Unknown (0x%.3x)", cpuid);
+ snprintf(core_name_buf, sizeof(core_name_buf), "Unknown (0x%.5x)", cpuid);
core_name = core_name_buf;
}
@@ -874,7 +875,9 @@ static void gator_summary(void)
marshal_summary(timestamp, uptime, gator_monotonic_started, uname_buf);
gator_sync_time = 0;
- gator_emit_perf_time(gator_monotonic_started);
+ gator_emit_perf_time(gator_monotonic_started);
+ /* Always flush COUNTER_BUF so that the initial perf_time is received before it's used */
+ gator_commit_buffer(get_physical_cpu(), COUNTER_BUF, 0);
preempt_enable();
}