diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2013-07-19 07:52:42 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-09-03 22:52:46 -0400 |
| commit | ef7bca1456e7f65e66b9466c3b149601fe32eec0 (patch) | |
| tree | 84cca2e208e1d482cdcdba49e69bd9a149728709 | |
| parent | a9e599e558da15e092cd55a743d57d83daaac0b2 (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.c | 22 | ||||
| -rw-r--r-- | arch/avr32/oprofile/op_model_avr32.c | 17 | ||||
| -rw-r--r-- | arch/mips/oprofile/common.c | 20 | ||||
| -rw-r--r-- | arch/powerpc/oprofile/common.c | 28 | ||||
| -rw-r--r-- | arch/s390/oprofile/init.c | 35 | ||||
| -rw-r--r-- | arch/x86/oprofile/nmi_int.c | 18 | ||||
| -rw-r--r-- | arch/x86/oprofile/op_model_amd.c | 24 | ||||
| -rw-r--r-- | drivers/oprofile/oprofile_files.c | 2 | ||||
| -rw-r--r-- | drivers/oprofile/oprofile_perf.c | 16 | ||||
| -rw-r--r-- | include/linux/oprofile.h | 2 |
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 | ||
| 108 | static int | 108 | static int |
| 109 | op_axp_create_files(struct super_block *sb, struct dentry *root) | 109 | op_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 | ||
| 100 | static int avr32_perf_counter_create_files(struct super_block *sb, | 100 | static 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 | ||
| 36 | static int op_mips_create_files(struct super_block *sb, struct dentry *root) | 36 | static 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 | ||
| 122 | static int op_powerpc_create_files(struct super_block *sb, struct dentry *root) | 122 | static 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); | 145 | oprofilefs_create_ulong(root->d_sb, root, "cell_support", &sys.cell_support); |
| 146 | sys.cell_support = 0x1; /* Note, the user OProfile tool must check | 146 | sys.cell_support = 0x1; /* Note, the user OProfile tool must check |
| 147 | * that this bit is set before attempting to | 147 | * that this bit is set before attempting to |
| 148 | * user SPU event profiling. Older kernels | 148 | * user SPU event profiling. Older kernels |
| @@ -160,11 +160,11 @@ static int op_powerpc_create_files(struct super_block *sb, struct dentry *root) | |||
| 160 | char buf[4]; | 160 | char buf[4]; |
| 161 | 161 | ||
| 162 | snprintf(buf, sizeof buf, "%d", i); | 162 | snprintf(buf, sizeof buf, "%d", i); |
| 163 | dir = oprofilefs_mkdir(sb, root, buf); | 163 | dir = oprofilefs_mkdir(root->d_sb, root, buf); |
| 164 | 164 | ||
| 165 | oprofilefs_create_ulong(sb, dir, "enabled", &ctr[i].enabled); | 165 | oprofilefs_create_ulong(root->d_sb, dir, "enabled", &ctr[i].enabled); |
| 166 | oprofilefs_create_ulong(sb, dir, "event", &ctr[i].event); | 166 | oprofilefs_create_ulong(root->d_sb, dir, "event", &ctr[i].event); |
| 167 | oprofilefs_create_ulong(sb, dir, "count", &ctr[i].count); | 167 | oprofilefs_create_ulong(root->d_sb, dir, "count", &ctr[i].count); |
| 168 | 168 | ||
| 169 | /* | 169 | /* |
| 170 | * Classic PowerPC doesn't support per-counter | 170 | * Classic PowerPC doesn't support per-counter |
| @@ -173,14 +173,14 @@ static int op_powerpc_create_files(struct super_block *sb, struct dentry *root) | |||
| 173 | * Book-E style performance monitors, we do | 173 | * Book-E style performance monitors, we do |
| 174 | * support them. | 174 | * support them. |
| 175 | */ | 175 | */ |
| 176 | oprofilefs_create_ulong(sb, dir, "kernel", &ctr[i].kernel); | 176 | oprofilefs_create_ulong(root->d_sb, dir, "kernel", &ctr[i].kernel); |
| 177 | oprofilefs_create_ulong(sb, dir, "user", &ctr[i].user); | 177 | oprofilefs_create_ulong(root->d_sb, dir, "user", &ctr[i].user); |
| 178 | 178 | ||
| 179 | oprofilefs_create_ulong(sb, dir, "unit_mask", &ctr[i].unit_mask); | 179 | oprofilefs_create_ulong(root->d_sb, dir, "unit_mask", &ctr[i].unit_mask); |
| 180 | } | 180 | } |
| 181 | 181 | ||
| 182 | oprofilefs_create_ulong(sb, root, "enable_kernel", &sys.enable_kernel); | 182 | oprofilefs_create_ulong(root->d_sb, root, "enable_kernel", &sys.enable_kernel); |
| 183 | oprofilefs_create_ulong(sb, root, "enable_user", &sys.enable_user); | 183 | oprofilefs_create_ulong(root->d_sb, root, "enable_user", &sys.enable_user); |
| 184 | 184 | ||
| 185 | /* Default to tracing both kernel and user */ | 185 | /* Default to tracing both kernel and user */ |
| 186 | sys.enable_kernel = 1; | 186 | sys.enable_kernel = 1; |
diff --git a/arch/s390/oprofile/init.c b/arch/s390/oprofile/init.c index 930783d2c99b..712d57bb783a 100644 --- a/arch/s390/oprofile/init.c +++ b/arch/s390/oprofile/init.c | |||
| @@ -346,16 +346,15 @@ static const struct file_operations timer_enabled_fops = { | |||
| 346 | }; | 346 | }; |
| 347 | 347 | ||
| 348 | 348 | ||
| 349 | static int oprofile_create_hwsampling_files(struct super_block *sb, | 349 | static int oprofile_create_hwsampling_files(struct dentry *root) |
| 350 | struct dentry *root) | ||
| 351 | { | 350 | { |
| 352 | struct dentry *dir; | 351 | struct dentry *dir; |
| 353 | 352 | ||
| 354 | dir = oprofilefs_mkdir(sb, root, "timer"); | 353 | dir = oprofilefs_mkdir(root->d_sb, root, "timer"); |
| 355 | if (!dir) | 354 | if (!dir) |
| 356 | return -EINVAL; | 355 | return -EINVAL; |
| 357 | 356 | ||
| 358 | oprofilefs_create_file(sb, dir, "enabled", &timer_enabled_fops); | 357 | oprofilefs_create_file(root->d_sb, dir, "enabled", &timer_enabled_fops); |
| 359 | 358 | ||
| 360 | if (!hwsampler_available) | 359 | if (!hwsampler_available) |
| 361 | return 0; | 360 | return 0; |
| @@ -376,17 +375,17 @@ static int oprofile_create_hwsampling_files(struct super_block *sb, | |||
| 376 | * and can only be set to 0. | 375 | * and can only be set to 0. |
| 377 | */ | 376 | */ |
| 378 | 377 | ||
| 379 | dir = oprofilefs_mkdir(sb, root, "0"); | 378 | dir = oprofilefs_mkdir(root->d_sb, root, "0"); |
| 380 | if (!dir) | 379 | if (!dir) |
| 381 | return -EINVAL; | 380 | return -EINVAL; |
| 382 | 381 | ||
| 383 | oprofilefs_create_file(sb, dir, "enabled", &hwsampler_fops); | 382 | oprofilefs_create_file(root->d_sb, dir, "enabled", &hwsampler_fops); |
| 384 | oprofilefs_create_file(sb, dir, "event", &zero_fops); | 383 | oprofilefs_create_file(root->d_sb, dir, "event", &zero_fops); |
| 385 | oprofilefs_create_file(sb, dir, "count", &hw_interval_fops); | 384 | oprofilefs_create_file(root->d_sb, dir, "count", &hw_interval_fops); |
| 386 | oprofilefs_create_file(sb, dir, "unit_mask", &zero_fops); | 385 | oprofilefs_create_file(root->d_sb, dir, "unit_mask", &zero_fops); |
| 387 | oprofilefs_create_file(sb, dir, "kernel", &kernel_fops); | 386 | oprofilefs_create_file(root->d_sb, dir, "kernel", &kernel_fops); |
| 388 | oprofilefs_create_file(sb, dir, "user", &user_fops); | 387 | oprofilefs_create_file(root->d_sb, dir, "user", &user_fops); |
| 389 | oprofilefs_create_ulong(sb, dir, "hw_sdbt_blocks", | 388 | oprofilefs_create_ulong(root->d_sb, dir, "hw_sdbt_blocks", |
| 390 | &oprofile_sdbt_blocks); | 389 | &oprofile_sdbt_blocks); |
| 391 | 390 | ||
| 392 | } else { | 391 | } else { |
| @@ -396,19 +395,19 @@ static int oprofile_create_hwsampling_files(struct super_block *sb, | |||
| 396 | * space tools. The /dev/oprofile/hwsampling fs is | 395 | * space tools. The /dev/oprofile/hwsampling fs is |
| 397 | * provided in that case. | 396 | * provided in that case. |
| 398 | */ | 397 | */ |
| 399 | dir = oprofilefs_mkdir(sb, root, "hwsampling"); | 398 | dir = oprofilefs_mkdir(root->d_sb, root, "hwsampling"); |
| 400 | if (!dir) | 399 | if (!dir) |
| 401 | return -EINVAL; | 400 | return -EINVAL; |
| 402 | 401 | ||
| 403 | oprofilefs_create_file(sb, dir, "hwsampler", | 402 | oprofilefs_create_file(root->d_sb, dir, "hwsampler", |
| 404 | &hwsampler_fops); | 403 | &hwsampler_fops); |
| 405 | oprofilefs_create_file(sb, dir, "hw_interval", | 404 | oprofilefs_create_file(root->d_sb, dir, "hw_interval", |
| 406 | &hw_interval_fops); | 405 | &hw_interval_fops); |
| 407 | oprofilefs_create_ro_ulong(sb, dir, "hw_min_interval", | 406 | oprofilefs_create_ro_ulong(root->d_sb, dir, "hw_min_interval", |
| 408 | &oprofile_min_interval); | 407 | &oprofile_min_interval); |
| 409 | oprofilefs_create_ro_ulong(sb, dir, "hw_max_interval", | 408 | oprofilefs_create_ro_ulong(root->d_sb, dir, "hw_max_interval", |
| 410 | &oprofile_max_interval); | 409 | &oprofile_max_interval); |
| 411 | oprofilefs_create_ulong(sb, dir, "hw_sdbt_blocks", | 410 | oprofilefs_create_ulong(root->d_sb, dir, "hw_sdbt_blocks", |
| 412 | &oprofile_sdbt_blocks); | 411 | &oprofile_sdbt_blocks); |
| 413 | } | 412 | } |
| 414 | return 0; | 413 | return 0; |
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index 48768df2471a..483f02b8c1a8 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c | |||
| @@ -403,7 +403,7 @@ static void nmi_cpu_down(void *dummy) | |||
| 403 | nmi_cpu_shutdown(dummy); | 403 | nmi_cpu_shutdown(dummy); |
| 404 | } | 404 | } |
| 405 | 405 | ||
| 406 | static int nmi_create_files(struct super_block *sb, struct dentry *root) | 406 | static int nmi_create_files(struct dentry *root) |
| 407 | { | 407 | { |
| 408 | unsigned int i; | 408 | unsigned int i; |
| 409 | 409 | ||
| @@ -420,14 +420,14 @@ static int nmi_create_files(struct super_block *sb, struct dentry *root) | |||
| 420 | continue; | 420 | continue; |
| 421 | 421 | ||
| 422 | snprintf(buf, sizeof(buf), "%d", i); | 422 | snprintf(buf, sizeof(buf), "%d", i); |
| 423 | dir = oprofilefs_mkdir(sb, root, buf); | 423 | dir = oprofilefs_mkdir(root->d_sb, root, buf); |
| 424 | oprofilefs_create_ulong(sb, dir, "enabled", &counter_config[i].enabled); | 424 | oprofilefs_create_ulong(root->d_sb, dir, "enabled", &counter_config[i].enabled); |
| 425 | oprofilefs_create_ulong(sb, dir, "event", &counter_config[i].event); | 425 | oprofilefs_create_ulong(root->d_sb, dir, "event", &counter_config[i].event); |
| 426 | oprofilefs_create_ulong(sb, dir, "count", &counter_config[i].count); | 426 | oprofilefs_create_ulong(root->d_sb, dir, "count", &counter_config[i].count); |
| 427 | oprofilefs_create_ulong(sb, dir, "unit_mask", &counter_config[i].unit_mask); | 427 | oprofilefs_create_ulong(root->d_sb, dir, "unit_mask", &counter_config[i].unit_mask); |
| 428 | oprofilefs_create_ulong(sb, dir, "kernel", &counter_config[i].kernel); | 428 | oprofilefs_create_ulong(root->d_sb, dir, "kernel", &counter_config[i].kernel); |
| 429 | oprofilefs_create_ulong(sb, dir, "user", &counter_config[i].user); | 429 | oprofilefs_create_ulong(root->d_sb, dir, "user", &counter_config[i].user); |
| 430 | oprofilefs_create_ulong(sb, dir, "extra", &counter_config[i].extra); | 430 | oprofilefs_create_ulong(root->d_sb, dir, "extra", &counter_config[i].extra); |
| 431 | } | 431 | } |
| 432 | 432 | ||
| 433 | return 0; | 433 | return 0; |
diff --git a/arch/x86/oprofile/op_model_amd.c b/arch/x86/oprofile/op_model_amd.c index b2b94438ff05..34e16c2fe357 100644 --- a/arch/x86/oprofile/op_model_amd.c +++ b/arch/x86/oprofile/op_model_amd.c | |||
| @@ -454,16 +454,16 @@ static void init_ibs(void) | |||
| 454 | printk(KERN_INFO "oprofile: AMD IBS detected (0x%08x)\n", ibs_caps); | 454 | printk(KERN_INFO "oprofile: AMD IBS detected (0x%08x)\n", ibs_caps); |
| 455 | } | 455 | } |
| 456 | 456 | ||
| 457 | static int (*create_arch_files)(struct super_block *sb, struct dentry *root); | 457 | static int (*create_arch_files)(struct dentry *root); |
| 458 | 458 | ||
| 459 | static int setup_ibs_files(struct super_block *sb, struct dentry *root) | 459 | static int setup_ibs_files(struct dentry *root) |
| 460 | { | 460 | { |
| 461 | struct dentry *dir; | 461 | struct dentry *dir; |
| 462 | int ret = 0; | 462 | int ret = 0; |
| 463 | 463 | ||
| 464 | /* architecture specific files */ | 464 | /* architecture specific files */ |
| 465 | if (create_arch_files) | 465 | if (create_arch_files) |
| 466 | ret = create_arch_files(sb, root); | 466 | ret = create_arch_files(root); |
| 467 | 467 | ||
| 468 | if (ret) | 468 | if (ret) |
| 469 | return ret; | 469 | return ret; |
| @@ -479,26 +479,26 @@ static int setup_ibs_files(struct super_block *sb, struct dentry *root) | |||
| 479 | ibs_config.max_cnt_op = 250000; | 479 | ibs_config.max_cnt_op = 250000; |
| 480 | 480 | ||
| 481 | if (ibs_caps & IBS_CAPS_FETCHSAM) { | 481 | if (ibs_caps & IBS_CAPS_FETCHSAM) { |
| 482 | dir = oprofilefs_mkdir(sb, root, "ibs_fetch"); | 482 | dir = oprofilefs_mkdir(root->d_sb, root, "ibs_fetch"); |
| 483 | oprofilefs_create_ulong(sb, dir, "enable", | 483 | oprofilefs_create_ulong(root->d_sb, dir, "enable", |
| 484 | &ibs_config.fetch_enabled); | 484 | &ibs_config.fetch_enabled); |
| 485 | oprofilefs_create_ulong(sb, dir, "max_count", | 485 | oprofilefs_create_ulong(root->d_sb, dir, "max_count", |
| 486 | &ibs_config.max_cnt_fetch); | 486 | &ibs_config.max_cnt_fetch); |
| 487 | oprofilefs_create_ulong(sb, dir, "rand_enable", | 487 | oprofilefs_create_ulong(root->d_sb, dir, "rand_enable", |
| 488 | &ibs_config.rand_en); | 488 | &ibs_config.rand_en); |
| 489 | } | 489 | } |
| 490 | 490 | ||
| 491 | if (ibs_caps & IBS_CAPS_OPSAM) { | 491 | if (ibs_caps & IBS_CAPS_OPSAM) { |
| 492 | dir = oprofilefs_mkdir(sb, root, "ibs_op"); | 492 | dir = oprofilefs_mkdir(root->d_sb, root, "ibs_op"); |
| 493 | oprofilefs_create_ulong(sb, dir, "enable", | 493 | oprofilefs_create_ulong(root->d_sb, dir, "enable", |
| 494 | &ibs_config.op_enabled); | 494 | &ibs_config.op_enabled); |
| 495 | oprofilefs_create_ulong(sb, dir, "max_count", | 495 | oprofilefs_create_ulong(root->d_sb, dir, "max_count", |
| 496 | &ibs_config.max_cnt_op); | 496 | &ibs_config.max_cnt_op); |
| 497 | if (ibs_caps & IBS_CAPS_OPCNT) | 497 | if (ibs_caps & IBS_CAPS_OPCNT) |
| 498 | oprofilefs_create_ulong(sb, dir, "dispatched_ops", | 498 | oprofilefs_create_ulong(root->d_sb, dir, "dispatched_ops", |
| 499 | &ibs_config.dispatched_ops); | 499 | &ibs_config.dispatched_ops); |
| 500 | if (ibs_caps & IBS_CAPS_BRNTRGT) | 500 | if (ibs_caps & IBS_CAPS_BRNTRGT) |
| 501 | oprofilefs_create_ulong(sb, dir, "branch_target", | 501 | oprofilefs_create_ulong(root->d_sb, dir, "branch_target", |
| 502 | &ibs_config.branch_target); | 502 | &ibs_config.branch_target); |
| 503 | } | 503 | } |
| 504 | 504 | ||
diff --git a/drivers/oprofile/oprofile_files.c b/drivers/oprofile/oprofile_files.c index 97c345ff62c4..ffc30ee641d4 100644 --- a/drivers/oprofile/oprofile_files.c +++ b/drivers/oprofile/oprofile_files.c | |||
| @@ -197,5 +197,5 @@ void oprofile_create_files(struct dentry *root) | |||
| 197 | #endif | 197 | #endif |
| 198 | oprofile_create_stats_files(root->d_sb, root); | 198 | oprofile_create_stats_files(root->d_sb, root); |
| 199 | if (oprofile_ops.create_files) | 199 | if (oprofile_ops.create_files) |
| 200 | oprofile_ops.create_files(root->d_sb, root); | 200 | oprofile_ops.create_files(root); |
| 201 | } | 201 | } |
diff --git a/drivers/oprofile/oprofile_perf.c b/drivers/oprofile/oprofile_perf.c index f3cfa0b9adfa..52ad942df04e 100644 --- a/drivers/oprofile/oprofile_perf.c +++ b/drivers/oprofile/oprofile_perf.c | |||
| @@ -138,7 +138,7 @@ static void op_perf_stop(void) | |||
| 138 | op_destroy_counter(cpu, event); | 138 | op_destroy_counter(cpu, event); |
| 139 | } | 139 | } |
| 140 | 140 | ||
| 141 | static int oprofile_perf_create_files(struct super_block *sb, struct dentry *root) | 141 | static int oprofile_perf_create_files(struct dentry *root) |
| 142 | { | 142 | { |
| 143 | unsigned int i; | 143 | unsigned int i; |
| 144 | 144 | ||
| @@ -147,13 +147,13 @@ static int oprofile_perf_create_files(struct super_block *sb, struct dentry *roo | |||
| 147 | char buf[4]; | 147 | char buf[4]; |
| 148 | 148 | ||
| 149 | snprintf(buf, sizeof buf, "%d", i); | 149 | snprintf(buf, sizeof buf, "%d", i); |
| 150 | dir = oprofilefs_mkdir(sb, root, buf); | 150 | dir = oprofilefs_mkdir(root->d_sb, root, buf); |
| 151 | oprofilefs_create_ulong(sb, dir, "enabled", &counter_config[i].enabled); | 151 | oprofilefs_create_ulong(root->d_sb, dir, "enabled", &counter_config[i].enabled); |
| 152 | oprofilefs_create_ulong(sb, dir, "event", &counter_config[i].event); | 152 | oprofilefs_create_ulong(root->d_sb, dir, "event", &counter_config[i].event); |
| 153 | oprofilefs_create_ulong(sb, dir, "count", &counter_config[i].count); | 153 | oprofilefs_create_ulong(root->d_sb, dir, "count", &counter_config[i].count); |
| 154 | oprofilefs_create_ulong(sb, dir, "unit_mask", &counter_config[i].unit_mask); | 154 | oprofilefs_create_ulong(root->d_sb, dir, "unit_mask", &counter_config[i].unit_mask); |
| 155 | oprofilefs_create_ulong(sb, dir, "kernel", &counter_config[i].kernel); | 155 | oprofilefs_create_ulong(root->d_sb, dir, "kernel", &counter_config[i].kernel); |
| 156 | oprofilefs_create_ulong(sb, dir, "user", &counter_config[i].user); | 156 | oprofilefs_create_ulong(root->d_sb, dir, "user", &counter_config[i].user); |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | return 0; | 159 | return 0; |
diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h index a4c562453f6b..8a906b4034a7 100644 --- a/include/linux/oprofile.h +++ b/include/linux/oprofile.h | |||
| @@ -51,7 +51,7 @@ struct pt_regs; | |||
| 51 | struct oprofile_operations { | 51 | struct oprofile_operations { |
| 52 | /* create any necessary configuration files in the oprofile fs. | 52 | /* create any necessary configuration files in the oprofile fs. |
| 53 | * Optional. */ | 53 | * Optional. */ |
| 54 | int (*create_files)(struct super_block * sb, struct dentry * root); | 54 | int (*create_files)(struct dentry * root); |
| 55 | /* Do any necessary interrupt setup. Optional. */ | 55 | /* Do any necessary interrupt setup. Optional. */ |
| 56 | int (*setup)(void); | 56 | int (*setup)(void); |
| 57 | /* Do any necessary interrupt shutdown. Optional. */ | 57 | /* Do any necessary interrupt shutdown. Optional. */ |
