/**
- * Copyright (C) ARM Limited 2010-2013. All rights reserved.
+ * Copyright (C) ARM Limited 2010-2014. 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
#define CORTEX_A9 0xc09
#define CORTEX_A12 0xc0d
#define CORTEX_A15 0xc0f
+#define CORTEX_A17 0xc0e
#define SCORPION 0x00f
#define SCORPIONMP 0x02d
#define KRAITSIM 0x049
#define AARCH64 0xd0f
#define OTHER 0xfff
+// gpu enums
+#define MALI_4xx 1
+#define MALI_T6xx 2
+
#define MAXSIZE_CORE_NAME 32
struct gator_cpu {
const int cpuid;
// Human readable name
const char core_name[MAXSIZE_CORE_NAME];
- // Perf PMU name
- const char * const pmu_name;
- // gatorfs event name
+ // gatorfs event and Perf PMU name
const char * const pmnc_name;
// compatible from Documentation/devicetree/bindings/arm/cpus.txt
const char * const dt_name;
/******************************************************************************
* Filesystem
******************************************************************************/
-int gatorfs_create_file_perm(struct super_block *sb, struct dentry *root,
- char const *name,
- const struct file_operations *fops, int perm);
-
struct dentry *gatorfs_mkdir(struct super_block *sb, struct dentry *root,
char const *name);
int gatorfs_create_ro_ulong(struct super_block *sb, struct dentry *root,
char const *name, unsigned long *val);
-void gator_op_create_files(struct super_block *sb, struct dentry *root);
-
/******************************************************************************
* Tracepoints
******************************************************************************/
register_trace_##probe_name(probe_##probe_name)
# define GATOR_UNREGISTER_TRACE(probe_name) \
unregister_trace_##probe_name(probe_##probe_name)
-#else
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0)
# define GATOR_DEFINE_PROBE(probe_name, proto) \
static void probe_##probe_name(void *data, PARAMS(proto))
# define GATOR_REGISTER_TRACE(probe_name) \
register_trace_##probe_name(probe_##probe_name, NULL)
# define GATOR_UNREGISTER_TRACE(probe_name) \
unregister_trace_##probe_name(probe_##probe_name, NULL)
+#else
+# define GATOR_DEFINE_PROBE(probe_name, proto) \
+ extern struct tracepoint *gator_tracepoint_##probe_name; \
+ static void probe_##probe_name(void *data, PARAMS(proto))
+# define GATOR_REGISTER_TRACE(probe_name) \
+ tracepoint_probe_register(gator_tracepoint_##probe_name, probe_##probe_name, NULL)
+# define GATOR_UNREGISTER_TRACE(probe_name) \
+ tracepoint_probe_unregister(gator_tracepoint_##probe_name, probe_##probe_name, NULL)
#endif
/******************************************************************************
void (*offline_dispatch)(int cpu, bool migrate); // called in process context but may not be running on core 'cpu'
int (*read)(int **buffer);
int (*read64)(long long **buffer);
+ int (*read_proc)(long long **buffer, struct task_struct *);
struct list_head list;
};
-// gator_events_init is used as a search term in gator_events.sh
-#define gator_events_init(initfn) \
- static inline int __gator_events_init_test(void) \
- { return initfn(); }
-
int gator_events_install(struct gator_interface *interface);
int gator_events_get_key(void);
u32 gator_cpuid(void);
void gator_backtrace_handler(struct pt_regs *const regs);
+void gator_marshal_activity_switch(int core, int key, int activity, int pid);
+
#if !GATOR_IKS_SUPPORT
#define get_physical_cpu() smp_processor_id()