blob: 67bf05d5b3e84852c22eea38c239ecfc989636e5 [file] [log] [blame]
Ashwin Chaugule4bacd562013-02-20 19:12:56 -05001/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
Neil Leedera320a282013-01-07 15:12:45 -05002 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#include <linux/types.h>
14#include <linux/uaccess.h>
15#include <linux/debugfs.h>
16
17/*
18 * Subsequent patches should add an entry to end of this string.
19 * Format is incrementing sequence number followed by text of
20 * patch commit title with newline.
21 * Note trailing ';' is on its own line to simplify addition of
22 * future strings.
23 */
24static char *descriptions =
25 "0 msm: perf: add debug patch logging framework\n"
Ashwin Chaugulec4c5fc12013-01-08 15:55:06 -050026 "1 Perf: Restore counter after powercollapse for generic ARM PMU's\n"
Ashwin Chaugule4cdf85a2013-01-16 11:22:08 -050027 "2 Perf: Toggle PMU IRQ when CPU's are hotplugged\n"
Neil Leeder05cfbed2013-02-19 16:10:10 -050028 "3 Perf: Correct irq for CPU hotplug detection\n"
Ashwin Chaugule4bacd562013-02-20 19:12:56 -050029 "4 Perf: Check perf activity on correct CPU\n"
Ashwin Chauguledbeaf182013-03-14 18:37:49 -040030 "7 Perf: Add L1 counters to tracepoints\n"
Sheetal Sahasrabudhed0080dd2013-06-18 15:42:41 -040031 "10 Perf: Fix counts across power collapse\n"
Sheetal Sahasrabudhe12f2d6e2013-07-10 12:18:59 -040032 "12 Perf: Make per-process counters configurable\n"
Sheetal Sahasrabudhe811f4b02013-07-23 10:54:06 -040033 "13 msm: perf: Add L2 support for tracecounters\n"
Neil Leeder8165d842013-04-08 17:13:21 -040034 "14 Perf: keep events across hotplug\n"
Neil Leeder44971e32013-08-28 14:31:18 -040035 "15 Perf: bring CPU online if needed when disabling irq\n"
Neil Leeder13f898a2013-08-30 13:47:36 -040036 "16 Perf: Support sw events across hotplug\n"
Neil Leederdc223ce2013-09-20 11:37:28 -040037 "17 msm: perf: initialise krait perf L2 counter enables\n"
Neil Leeder15d8f1e2013-10-21 17:58:20 -040038 "18 msm: perf: clean up duplicate constraint events\n"
Neil Leedera320a282013-01-07 15:12:45 -050039;
40
41static ssize_t desc_read(struct file *fp, char __user *buf,
42 size_t count, loff_t *pos)
43{
44 return simple_read_from_buffer(buf, count, pos, descriptions,
45 strlen(descriptions));
46}
47
48static const struct file_operations perf_debug_desc_fops = {
49 .read = desc_read,
50};
51
52static int msm_perf_debugfs_init(void)
53{
54 int ret = 0;
55 struct dentry *dir;
56 struct dentry *file;
57
58 dir = debugfs_create_dir("msm-perf-patches", NULL);
59 if (IS_ERR_OR_NULL(dir)) {
60 pr_err("failed to create msm-perf-patches dir in debugfs\n");
61 ret = PTR_ERR(dir);
62 goto init_exit;
63 }
64
65 file = debugfs_create_file("descriptions", 0444, dir, NULL,
66 &perf_debug_desc_fops);
67 if (IS_ERR_OR_NULL(file)) {
68 debugfs_remove(dir);
69 pr_err("failed to create descriptions file for msm-perf-patches\n");
70 ret = PTR_ERR(file);
71 goto init_exit;
72 }
73
74init_exit:
75 return ret;
76}
77late_initcall(msm_perf_debugfs_init);