aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-07-19 07:52:42 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-09-03 22:52:46 -0400
commitef7bca1456e7f65e66b9466c3b149601fe32eec0 (patch)
tree84cca2e208e1d482cdcdba49e69bd9a149728709
parenta9e599e558da15e092cd55a743d57d83daaac0b2 (diff)
oprofile: don't bother with passing superblock to ->create_files()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--arch/alpha/oprofile/common.c22
-rw-r--r--arch/avr32/oprofile/op_model_avr32.c17
-rw-r--r--arch/mips/oprofile/common.c20
-rw-r--r--arch/powerpc/oprofile/common.c28
-rw-r--r--arch/s390/oprofile/init.c35
-rw-r--r--arch/x86/oprofile/nmi_int.c18
-rw-r--r--arch/x86/oprofile/op_model_amd.c24
-rw-r--r--drivers/oprofile/oprofile_files.c2
-rw-r--r--drivers/oprofile/oprofile_perf.c16
-rw-r--r--include/linux/oprofile.h2
10 files changed, 91 insertions, 93 deletions
diff --git a/arch/alpha/oprofile/common.c b/arch/alpha/oprofile/common.c
index b8ce18f485d3..d79bf68caee2 100644
--- a/arch/alpha/oprofile/common.c
+++ b/arch/alpha/oprofile/common.c
@@ -106,7 +106,7 @@ op_axp_stop(void)
106} 106}
107 107
108static int 108static int
109op_axp_create_files(struct super_block *sb, struct dentry *root) 109op_axp_create_files(struct dentry *root)
110{ 110{
111 int i; 111 int i;
112 112
@@ -115,23 +115,23 @@ op_axp_create_files(struct super_block *sb, struct dentry *root)
115 char buf[4]; 115 char buf[4];
116 116
117 snprintf(buf, sizeof buf, "%d", i); 117 snprintf(buf, sizeof buf, "%d", i);
118 dir = oprofilefs_mkdir(sb, root, buf); 118 dir = oprofilefs_mkdir(root->d_sb, root, buf);
119 119
120 oprofilefs_create_ulong(sb, dir, "enabled", &ctr[i].enabled); 120 oprofilefs_create_ulong(root->d_sb, dir, "enabled", &ctr[i].enabled);
121 oprofilefs_create_ulong(sb, dir, "event", &ctr[i].event); 121 oprofilefs_create_ulong(root->d_sb, dir, "event", &ctr[i].event);
122 oprofilefs_create_ulong(sb, dir, "count", &ctr[i].count); 122 oprofilefs_create_ulong(root->d_sb, dir, "count", &ctr[i].count);
123 /* Dummies. */ 123 /* Dummies. */
124 oprofilefs_create_ulong(sb, dir, "kernel", &ctr[i].kernel); 124 oprofilefs_create_ulong(root->d_sb, dir, "kernel", &ctr[i].kernel);
125 oprofilefs_create_ulong(sb, dir, "user", &ctr[i].user); 125 oprofilefs_create_ulong(root->d_sb, dir, "user", &ctr[i].user);
126 oprofilefs_create_ulong(sb, dir, "unit_mask", &ctr[i].unit_mask); 126 oprofilefs_create_ulong(root->d_sb, dir, "unit_mask", &ctr[i].unit_mask);
127 } 127 }
128 128
129 if (model->can_set_proc_mode) { 129 if (model->can_set_proc_mode) {
130 oprofilefs_create_ulong(sb, root, "enable_pal", 130 oprofilefs_create_ulong(root->d_sb, root, "enable_pal",
131 &sys.enable_pal); 131 &sys.enable_pal);
132 oprofilefs_create_ulong(sb, root, "enable_kernel", 132 oprofilefs_create_ulong(root->d_sb, root, "enable_kernel",
133 &sys.enable_kernel); 133 &sys.enable_kernel);
134 oprofilefs_create_ulong(sb, root, "enable_user", 134 oprofilefs_create_ulong(root->d_sb, root, "enable_user",
135 &sys.enable_user); 135 &sys.enable_user);
136 } 136 }
137 137
diff --git a/arch/avr32/oprofile/op_model_avr32.c b/arch/avr32/oprofile/op_model_avr32.c
index f74b7809e089..80a06158da82 100644
--- a/arch/avr32/oprofile/op_model_avr32.c
+++ b/arch/avr32/oprofile/op_model_avr32.c
@@ -97,8 +97,7 @@ static irqreturn_t avr32_perf_counter_interrupt(int irq, void *dev_id)
97 return IRQ_HANDLED; 97 return IRQ_HANDLED;
98} 98}
99 99
100static int avr32_perf_counter_create_files(struct super_block *sb, 100static int avr32_perf_counter_create_files(struct dentry *root)
101 struct dentry *root)
102{ 101{
103 struct dentry *dir; 102 struct dentry *dir;
104 unsigned int i; 103 unsigned int i;
@@ -106,21 +105,21 @@ static int avr32_perf_counter_create_files(struct super_block *sb,
106 105
107 for (i = 0; i < NR_counter; i++) { 106 for (i = 0; i < NR_counter; i++) {
108 snprintf(filename, sizeof(filename), "%u", i); 107 snprintf(filename, sizeof(filename), "%u", i);
109 dir = oprofilefs_mkdir(sb, root, filename); 108 dir = oprofilefs_mkdir(root->d_sb, root, filename);
110 109
111 oprofilefs_create_ulong(sb, dir, "enabled", 110 oprofilefs_create_ulong(root->d_sb, dir, "enabled",
112 &counter[i].enabled); 111 &counter[i].enabled);
113 oprofilefs_create_ulong(sb, dir, "event", 112 oprofilefs_create_ulong(root->d_sb, dir, "event",
114 &counter[i].event); 113 &counter[i].event);
115 oprofilefs_create_ulong(sb, dir, "count", 114 oprofilefs_create_ulong(root->d_sb, dir, "count",
116 &counter[i].count); 115 &counter[i].count);
117 116
118 /* Dummy entries */ 117 /* Dummy entries */
119 oprofilefs_create_ulong(sb, dir, "kernel", 118 oprofilefs_create_ulong(root->d_sb, dir, "kernel",
120 &counter[i].kernel); 119 &counter[i].kernel);
121 oprofilefs_create_ulong(sb, dir, "user", 120 oprofilefs_create_ulong(root->d_sb, dir, "user",
122 &counter[i].user); 121 &counter[i].user);
123 oprofilefs_create_ulong(sb, dir, "unit_mask", 122 oprofilefs_create_ulong(root->d_sb, dir, "unit_mask",
124 &counter[i].unit_mask); 123 &counter[i].unit_mask);
125 } 124 }
126 125
diff --git a/arch/mips/oprofile/common.c b/arch/mips/oprofile/common.c
index af763e838fdd..7439ae2df05c 100644
--- a/arch/mips/oprofile/common.c
+++ b/arch/mips/oprofile/common.c
@@ -33,7 +33,7 @@ static int op_mips_setup(void)
33 return 0; 33 return 0;
34} 34}
35 35
36static int op_mips_create_files(struct super_block *sb, struct dentry *root) 36static int op_mips_create_files(struct dentry *root)
37{ 37{
38 int i; 38 int i;
39 39
@@ -42,16 +42,16 @@ static int op_mips_create_files(struct super_block *sb, struct dentry *root)
42 char buf[4]; 42 char buf[4];
43 43
44 snprintf(buf, sizeof buf, "%d", i); 44 snprintf(buf, sizeof buf, "%d", i);
45 dir = oprofilefs_mkdir(sb, root, buf); 45 dir = oprofilefs_mkdir(root->d_sb, root, buf);
46 46
47 oprofilefs_create_ulong(sb, dir, "enabled", &ctr[i].enabled); 47 oprofilefs_create_ulong(root->d_sb, dir, "enabled", &ctr[i].enabled);
48 oprofilefs_create_ulong(sb, dir, "event", &ctr[i].event); 48 oprofilefs_create_ulong(root->d_sb, dir, "event", &ctr[i].event);
49 oprofilefs_create_ulong(sb, dir, "count", &ctr[i].count); 49 oprofilefs_create_ulong(root->d_sb, dir, "count", &ctr[i].count);
50 oprofilefs_create_ulong(sb, dir, "kernel", &ctr[i].kernel); 50 oprofilefs_create_ulong(root->d_sb, dir, "kernel", &ctr[i].kernel);
51 oprofilefs_create_ulong(sb, dir, "user", &ctr[i].user); 51 oprofilefs_create_ulong(root->d_sb, dir, "user", &ctr[i].user);
52 oprofilefs_create_ulong(sb, dir, "exl", &ctr[i].exl); 52 oprofilefs_create_ulong(root->d_sb, dir, "exl", &ctr[i].exl);
53 /* Dummy. */ 53 /* Dummy. */
54 oprofilefs_create_ulong(sb, dir, "unit_mask", &ctr[i].unit_mask); 54 oprofilefs_create_ulong(root->d_sb, dir, "unit_mask", &ctr[i].unit_mask);
55 } 55 }
56 56
57 return 0; 57 return 0;
diff --git a/arch/powerpc/oprofile/common.c b/arch/powerpc/oprofile/common.c
index 4f51025f5b00..addc62317f45 100644
--- a/arch/powerpc/oprofile/common.c
+++ b/arch/powerpc/oprofile/common.c
@@ -119,7 +119,7 @@ static void op_powerpc_stop(void)
119 model->global_stop(); 119 model->global_stop();
120} 120}
121 121
122static int op_powerpc_create_files(struct super_block *sb, struct dentry *root) 122static int op_powerpc_create_files(struct dentry *root)
123{ 123{
124 int i; 124 int i;
125 125
@@ -128,9 +128,9 @@ static int op_powerpc_create_files(struct super_block *sb, struct dentry *root)
128 * There is one mmcr0, mmcr1 and mmcra for setting the events for 128 * There is one mmcr0, mmcr1 and mmcra for setting the events for
129 * all of the counters. 129 * all of the counters.
130 */ 130 */
131 oprofilefs_create_ulong(sb, root, "mmcr0", &sys.mmcr0); 131 oprofilefs_create_ulong(root->d_sb, root, "mmcr0", &sys.mmcr0);
132 oprofilefs_create_ulong(sb, root, "mmcr1", &sys.mmcr1); 132 oprofilefs_create_ulong(root->d_sb, root, "mmcr1", &sys.mmcr1);
133 oprofilefs_create_ulong(sb, root, "mmcra", &sys.mmcra); 133 oprofilefs_create_ulong(root->d_sb, root, "mmcra", &sys.mmcra);
134#ifdef CONFIG_OPROFILE_CELL 134#ifdef CONFIG_OPROFILE_CELL
135 /* create a file the user tool can check to see what level of profiling 135 /* create a file the user tool can check to see what level of profiling
136 * support exits with this kernel. Initialize bit mask to indicate 136 * support exits with this kernel. Initialize bit mask to indicate
@@ -142,7 +142,7 @@ static int op_powerpc_create_files(struct super_block *sb, struct dentry *root)
142 * If the file does not exist, then the kernel only supports SPU 142 * If the file does not exist, then the kernel only supports SPU
143 * cycle profiling, PPU event and cycle profiling. 143 * cycle profiling, PPU event and cycle profiling.
144 */ 144 */
145 oprofilefs_create_ulong(sb, root, "cell_support", &sys.cell_support);