Sheetal Sahasrabudhe | fa00345 | 2014-01-08 16:50:42 -0500 | [diff] [blame] | 1 | /* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. |
Neil Leeder | b0c8ec5 | 2013-01-07 15:12:45 -0500 | [diff] [blame] | 2 | * |
| 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 | */ |
| 24 | static char *descriptions = |
| 25 | "0 msm: perf: add debug patch logging framework\n" |
Ashwin Chaugule | ff0eb8d | 2013-01-08 15:55:06 -0500 | [diff] [blame] | 26 | "1 Perf: Restore counter after powercollapse for generic ARM PMU's\n" |
Ashwin Chaugule | 20c4e99 | 2013-01-16 11:22:08 -0500 | [diff] [blame] | 27 | "2 Perf: Toggle PMU IRQ when CPU's are hotplugged\n" |
Neil Leeder | f7804d4 | 2013-02-19 16:10:10 -0500 | [diff] [blame] | 28 | "3 Perf: Correct irq for CPU hotplug detection\n" |
Ashwin Chaugule | 692d420 | 2013-02-20 19:12:56 -0500 | [diff] [blame] | 29 | "4 Perf: Check perf activity on correct CPU\n" |
Ashwin Chaugule | 50d5989 | 2013-03-12 12:58:51 -0400 | [diff] [blame] | 30 | "5 Perf: Add DT support for L1 and L2 PMU\n" |
Neil Leeder | 04a9b20 | 2013-03-26 17:00:54 -0400 | [diff] [blame] | 31 | "6 Perf: Add cortex A5 device tree support\n" |
Ashwin Chaugule | 4eaee1a | 2013-03-14 18:37:49 -0400 | [diff] [blame] | 32 | "7 Perf: Add L1 counters to tracepoints\n" |
Neil Leeder | 0e0944f | 2013-06-04 10:45:17 -0400 | [diff] [blame] | 33 | "8 Perf: Add cortex A7 perf support\n" |
Neil Leeder | 45fb9f6 | 2013-06-04 10:46:41 -0400 | [diff] [blame] | 34 | "9 ARM: dts: msm: add perf-events support for msm8226\n" |
Sheetal Sahasrabudhe | 71a6c65 | 2013-06-18 15:42:41 -0400 | [diff] [blame] | 35 | "10 Perf: Fix counts across power collapse\n" |
Neil Leeder | 23b9fa4 | 2013-07-11 09:23:45 -0400 | [diff] [blame] | 36 | "11 ARM: dts: msm: add perf-events support for msm8x10, msm8x12\n" |
Sheetal Sahasrabudhe | 711300e | 2013-07-10 12:18:59 -0400 | [diff] [blame] | 37 | "12 Perf: Make per-process counters configurable\n" |
Sheetal Sahasrabudhe | 1b3051e | 2013-07-23 10:54:06 -0400 | [diff] [blame] | 38 | "13 msm: perf: Add L2 support for tracecounters\n" |
Neil Leeder | 8a64588 | 2013-04-08 17:13:21 -0400 | [diff] [blame] | 39 | "14 Perf: keep events across hotplug\n" |
Neil Leeder | 3034ad7 | 2013-08-28 14:31:18 -0400 | [diff] [blame] | 40 | "15 Perf: bring CPU online if needed when disabling irq\n" |
Neil Leeder | ee237a7 | 2013-08-30 13:47:36 -0400 | [diff] [blame] | 41 | "16 Perf: Support sw events across hotplug\n" |
Neil Leeder | 11c1bcf | 2013-09-20 11:37:28 -0400 | [diff] [blame] | 42 | "17 msm: perf: initialise krait perf L2 counter enables\n" |
Neil Leeder | 7a7a064 | 2013-10-21 17:58:20 -0400 | [diff] [blame] | 43 | "18 msm: perf: clean up duplicate constraint events\n" |
Sheetal Sahasrabudhe | e2ec980 | 2013-10-15 14:48:52 -0400 | [diff] [blame] | 44 | "19 Perf: Make per-process counters cumulative\n" |
Sheetal Sahasrabudhe | 0b9db08 | 2013-11-20 15:04:04 -0500 | [diff] [blame] | 45 | "20 Perf: Fix PID for tracepoints\n" |
Neil Leeder | e9dea60 | 2013-12-05 14:45:54 -0500 | [diff] [blame] | 46 | "21 Perf: preserve registers across hotplug\n" |
Neil Leeder | 3e908cd | 2013-12-18 13:10:04 -0500 | [diff] [blame] | 47 | "22 msm: perf: fix formatting of trace entry\n" |
Sheetal Sahasrabudhe | fa00345 | 2014-01-08 16:50:42 -0500 | [diff] [blame] | 48 | "23 msm: perf: Fix cpu id logic in tracectr notifier\n" |
Sheetal Sahasrabudhe | 954248e | 2014-02-07 12:21:17 -0500 | [diff] [blame] | 49 | "24 msm: perf: tracectr: Initialize cnts after hotplug\n" |
Sheetal Sahasrabudhe | 93adb0a | 2014-02-07 13:47:00 -0500 | [diff] [blame] | 50 | "25 Perf: Reset pmu after hotplug\n" |
Neil Leeder | 27f786e | 2014-05-14 11:33:47 -0400 | [diff] [blame] | 51 | "26 msm: perf: set filter bits for cycle counter on krait\n" |
Neil Leeder | b0c8ec5 | 2013-01-07 15:12:45 -0500 | [diff] [blame] | 52 | ; |
| 53 | |
| 54 | static 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 | |
| 61 | static const struct file_operations perf_debug_desc_fops = { |
| 62 | .read = desc_read, |
| 63 | }; |
| 64 | |
| 65 | static 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 | |
| 87 | init_exit: |
| 88 | return ret; |
| 89 | } |
| 90 | late_initcall(msm_perf_debugfs_init); |