diff options
Diffstat (limited to 'arch/ia64/kernel/perfmon.c')
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index f1782705b1f7..5246285a95fb 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -522,42 +522,37 @@ EXPORT_SYMBOL(pfm_sysctl); | |||
522 | 522 | ||
523 | static ctl_table pfm_ctl_table[]={ | 523 | static ctl_table pfm_ctl_table[]={ |
524 | { | 524 | { |
525 | .ctl_name = CTL_UNNUMBERED, | ||
526 | .procname = "debug", | 525 | .procname = "debug", |
527 | .data = &pfm_sysctl.debug, | 526 | .data = &pfm_sysctl.debug, |
528 | .maxlen = sizeof(int), | 527 | .maxlen = sizeof(int), |
529 | .mode = 0666, | 528 | .mode = 0666, |
530 | .proc_handler = &proc_dointvec, | 529 | .proc_handler = proc_dointvec, |
531 | }, | 530 | }, |
532 | { | 531 | { |
533 | .ctl_name = CTL_UNNUMBERED, | ||
534 | .procname = "debug_ovfl", | 532 | .procname = "debug_ovfl", |
535 | .data = &pfm_sysctl.debug_ovfl, | 533 | .data = &pfm_sysctl.debug_ovfl, |
536 | .maxlen = sizeof(int), | 534 | .maxlen = sizeof(int), |
537 | .mode = 0666, | 535 | .mode = 0666, |
538 | .proc_handler = &proc_dointvec, | 536 | .proc_handler = proc_dointvec, |
539 | }, | 537 | }, |
540 | { | 538 | { |
541 | .ctl_name = CTL_UNNUMBERED, | ||
542 | .procname = "fastctxsw", | 539 | .procname = "fastctxsw", |
543 | .data = &pfm_sysctl.fastctxsw, | 540 | .data = &pfm_sysctl.fastctxsw, |
544 | .maxlen = sizeof(int), | 541 | .maxlen = sizeof(int), |
545 | .mode = 0600, | 542 | .mode = 0600, |
546 | .proc_handler = &proc_dointvec, | 543 | .proc_handler = proc_dointvec, |
547 | }, | 544 | }, |
548 | { | 545 | { |
549 | .ctl_name = CTL_UNNUMBERED, | ||
550 | .procname = "expert_mode", | 546 | .procname = "expert_mode", |
551 | .data = &pfm_sysctl.expert_mode, | 547 | .data = &pfm_sysctl.expert_mode, |
552 | .maxlen = sizeof(int), | 548 | .maxlen = sizeof(int), |
553 | .mode = 0600, | 549 | .mode = 0600, |
554 | .proc_handler = &proc_dointvec, | 550 | .proc_handler = proc_dointvec, |
555 | }, | 551 | }, |
556 | {} | 552 | {} |
557 | }; | 553 | }; |
558 | static ctl_table pfm_sysctl_dir[] = { | 554 | static ctl_table pfm_sysctl_dir[] = { |
559 | { | 555 | { |
560 | .ctl_name = CTL_UNNUMBERED, | ||
561 | .procname = "perfmon", | 556 | .procname = "perfmon", |
562 | .mode = 0555, | 557 | .mode = 0555, |
563 | .child = pfm_ctl_table, | 558 | .child = pfm_ctl_table, |
@@ -566,7 +561,6 @@ static ctl_table pfm_sysctl_dir[] = { | |||
566 | }; | 561 | }; |
567 | static ctl_table pfm_sysctl_root[] = { | 562 | static ctl_table pfm_sysctl_root[] = { |
568 | { | 563 | { |
569 | .ctl_name = CTL_KERN, | ||
570 | .procname = "kernel", | 564 | .procname = "kernel", |
571 | .mode = 0555, | 565 | .mode = 0555, |
572 | .child = pfm_sysctl_dir, | 566 | .child = pfm_sysctl_dir, |
@@ -2206,7 +2200,7 @@ pfm_alloc_file(pfm_context_t *ctx) | |||
2206 | { | 2200 | { |
2207 | struct file *file; | 2201 | struct file *file; |
2208 | struct inode *inode; | 2202 | struct inode *inode; |
2209 | struct dentry *dentry; | 2203 | struct path path; |
2210 | char name[32]; | 2204 | char name[32]; |
2211 | struct qstr this; | 2205 | struct qstr this; |
2212 | 2206 | ||
@@ -2231,18 +2225,19 @@ pfm_alloc_file(pfm_context_t *ctx) | |||
2231 | /* | 2225 | /* |
2232 | * allocate a new dcache entry | 2226 | * allocate a new dcache entry |
2233 | */ | 2227 | */ |
2234 | dentry = d_alloc(pfmfs_mnt->mnt_sb->s_root, &this); | 2228 | path.dentry = d_alloc(pfmfs_mnt->mnt_sb->s_root, &this); |
2235 | if (!dentry) { | 2229 | if (!path.dentry) { |
2236 | iput(inode); | 2230 | iput(inode); |
2237 | return ERR_PTR(-ENOMEM); | 2231 | return ERR_PTR(-ENOMEM); |
2238 | } | 2232 | } |
2233 | path.mnt = mntget(pfmfs_mnt); | ||
2239 | 2234 | ||
2240 | dentry->d_op = &pfmfs_dentry_operations; | 2235 | path.dentry->d_op = &pfmfs_dentry_operations; |
2241 | d_add(dentry, inode); | 2236 | d_add(path.dentry, inode); |
2242 | 2237 | ||
2243 | file = alloc_file(pfmfs_mnt, dentry, FMODE_READ, &pfm_file_ops); | 2238 | file = alloc_file(&path, FMODE_READ, &pfm_file_ops); |
2244 | if (!file) { | 2239 | if (!file) { |
2245 | dput(dentry); | 2240 | path_put(&path); |
2246 | return ERR_PTR(-ENFILE); | 2241 | return ERR_PTR(-ENFILE); |
2247 | } | 2242 | } |
2248 | 2243 | ||
@@ -3523,7 +3518,7 @@ pfm_use_debug_registers(struct task_struct *task) | |||
3523 | * IA64_THREAD_DBG_VALID set. This indicates a task which was | 3518 | * IA64_THREAD_DBG_VALID set. This indicates a task which was |
3524 | * able to use the debug registers for debugging purposes via | 3519 | * able to use the debug registers for debugging purposes via |
3525 | * ptrace(). Therefore we know it was not using them for | 3520 | * ptrace(). Therefore we know it was not using them for |
3526 | * perfmormance monitoring, so we only decrement the number | 3521 | * performance monitoring, so we only decrement the number |
3527 | * of "ptraced" debug register users to keep the count up to date | 3522 | * of "ptraced" debug register users to keep the count up to date |
3528 | */ | 3523 | */ |
3529 | int | 3524 | int |