blob: c4f7d454c8089d5097efa6a1d27f86480bc6d9a8 [file] [log] [blame]
Sheetal Sahasrabudhefa003452014-01-08 16:50:42 -05001/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
Neil Leederb0c8ec52013-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 Chauguleff0eb8d2013-01-08 15:55:06 -050026 "1 Perf: Restore counter after powercollapse for generic ARM PMU's\n"
Ashwin Chaugule20c4e992013-01-16 11:22:08 -050027 "2 Perf: Toggle PMU IRQ when CPU's are hotplugged\n"
Neil Leederf7804d42013-02-19 16:10:10 -050028 "3 Perf: Correct irq for CPU hotplug detection\n"
Ashwin Chaugule692d4202013-02-20 19:12:56 -050029 "4 Perf: Check perf activity on correct CPU\n"
Ashwin Chaugule50d59892013-03-12 12:58:51 -040030 "5 Perf: Add DT support for L1 and L2 PMU\n"
Neil Leeder04a9b202013-03-26 17:00:54 -040031 "6 Perf: Add cortex A5 device tree support\n"
Ashwin Chaugule4eaee1a2013-03-14 18:37:49 -040032 "7 Perf: Add L1 counters to tracepoints\n"
Neil Leeder0e0944f2013-06-04 10:45:17 -040033 "8 Perf: Add cortex A7 perf support\n"
Neil Leeder45fb9f62013-06-04 10:46:41 -040034 "9 ARM: dts: msm: add perf-events support for msm8226\n"
Sheetal Sahasrabudhe71a6c652013-06-18 15:42:41 -040035 "10 Perf: Fix counts across power collapse\n"
Neil Leeder23b9fa42013-07-11 09:23:45 -040036 "11 ARM: dts: msm: add perf-events support for msm8x10, msm8x12\n"
Sheetal Sahasrabudhe711300e2013-07-10 12:18:59 -040037 "12 Perf: Make per-process counters configurable\n"
Sheetal Sahasrabudhe1b3051e2013-07-23 10:54:06 -040038 "13 msm: perf: Add L2 support for tracecounters\n"
Neil Leeder8a645882013-04-08 17:13:21 -040039 "14 Perf: keep events across hotplug\n"
Neil Leeder3034ad72013-08-28 14:31:18 -040040 "15 Perf: bring CPU online if needed when disabling irq\n"
Neil Leederee237a72013-08-30 13:47:36 -040041 "16 Perf: Support sw events across hotplug\n"
Neil Leeder11c1bcf2013-09-20 11:37:28 -040042 "17 msm: perf: initialise krait perf L2 counter enables\n"
Neil Leeder7a7a0642013-10-21 17:58:20 -040043 "18 msm: perf: clean up duplicate constraint events\n"
Sheetal Sahasrabudhee2ec9802013-10-15 14:48:52 -040044 "19 Perf: Make per-process counters cumulative\n"
Sheetal Sahasrabudhe0b9db082013-11-20 15:04:04 -050045 "20 Perf: Fix PID for tracepoints\n"
Neil Leedere9dea602013-12-05 14:45:54 -050046 "21 Perf: preserve registers across hotplug\n"
Neil Leeder3e908cd2013-12-18 13:10:04 -050047 "22 msm: perf: fix formatting of trace entry\n"
Sheetal Sahasrabudhefa003452014-01-08 16:50:42 -050048 "23 msm: perf: Fix cpu id logic in tracectr notifier\n"
Sheetal Sahasrabudhe954248e2014-02-07 12:21:17 -050049 "24 msm: perf: tracectr: Initialize cnts after hotplug\n"
Sheetal Sahasrabudhe93adb0a2014-02-07 13:47:00 -050050 "25 Perf: Reset pmu after hotplug\n"
Neil Leeder27f786e2014-05-14 11:33:47 -040051 "26 msm: perf: set filter bits for cycle counter on krait\n"
Neil Leederb0c8ec52013-01-07 15:12:45 -050052;
53
54static ssize_t desc_read(struct file *fp, char __user *buf,
55 size_t count, loff_t *pos)
56{
57 return simple_read_from_buffer(buf, count, pos, descriptions,
58 strlen(descriptions));
59}
60
61static const struct file_operations perf_debug_desc_fops = {
62 .read = desc_read,
63};
64
65static int msm_perf_debugfs_init(void)
66{
67 int ret = 0;
68 struct dentry *dir;
69 struct dentry *file;
70
71 dir = debugfs_create_dir("msm-perf-patches", NULL);
72 if (IS_ERR_OR_NULL(dir)) {
73 pr_err("failed to create msm-perf-patches dir in debugfs\n");
74 ret = PTR_ERR(dir);
75 goto init_exit;
76 }
77
78 file = debugfs_create_file("descriptions", 0444, dir, NULL,
79 &perf_debug_desc_fops);
80 if (IS_ERR_OR_NULL(file)) {
81 debugfs_remove(dir);
82 pr_err("failed to create descriptions file for msm-perf-patches\n");
83 ret = PTR_ERR(file);
84 goto init_exit;
85 }
86
87init_exit:
88 return ret;
89}
90late_initcall(msm_perf_debugfs_init);