diff options
author | James Morris <james.l.morris@oracle.com> | 2012-05-03 22:46:40 -0400 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2012-05-03 22:46:40 -0400 |
commit | 898bfc1d46bd76f8ea2a0fbd239dd2073efe2aa3 (patch) | |
tree | e6e666085abe674dbf6292555961fe0a0f2e2d2f /arch/ia64/kernel/perfmon.c | |
parent | 08162e6a23d476544adfe1164afe9ea8b34ab859 (diff) | |
parent | 69964ea4c7b68c9399f7977aa5b9aa6539a6a98a (diff) |
Merge tag 'v3.4-rc5' into next
Linux 3.4-rc5
Merge to pull in prerequisite change for Smack:
86812bb0de1a3758dc6c7aa01a763158a7c0638a
Requested by Casey.
Diffstat (limited to 'arch/ia64/kernel/perfmon.c')
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 9d0fd7d5bb82..f00ba025375d 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -604,12 +604,6 @@ pfm_unprotect_ctx_ctxsw(pfm_context_t *x, unsigned long f) | |||
604 | spin_unlock(&(x)->ctx_lock); | 604 | spin_unlock(&(x)->ctx_lock); |
605 | } | 605 | } |
606 | 606 | ||
607 | static inline unsigned int | ||
608 | pfm_do_munmap(struct mm_struct *mm, unsigned long addr, size_t len, int acct) | ||
609 | { | ||
610 | return do_munmap(mm, addr, len); | ||
611 | } | ||
612 | |||
613 | static inline unsigned long | 607 | static inline unsigned long |
614 | pfm_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags, unsigned long exec) | 608 | pfm_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags, unsigned long exec) |
615 | { | 609 | { |
@@ -1458,8 +1452,9 @@ pfm_unreserve_session(pfm_context_t *ctx, int is_syswide, unsigned int cpu) | |||
1458 | * a PROTECT_CTX() section. | 1452 | * a PROTECT_CTX() section. |
1459 | */ | 1453 | */ |
1460 | static int | 1454 | static int |
1461 | pfm_remove_smpl_mapping(struct task_struct *task, void *vaddr, unsigned long size) | 1455 | pfm_remove_smpl_mapping(void *vaddr, unsigned long size) |
1462 | { | 1456 | { |
1457 | struct task_struct *task = current; | ||
1463 | int r; | 1458 | int r; |
1464 | 1459 | ||
1465 | /* sanity checks */ | 1460 | /* sanity checks */ |
@@ -1473,13 +1468,8 @@ pfm_remove_smpl_mapping(struct task_struct *task, void *vaddr, unsigned long siz | |||
1473 | /* | 1468 | /* |
1474 | * does the actual unmapping | 1469 | * does the actual unmapping |
1475 | */ | 1470 | */ |
1476 | down_write(&task->mm->mmap_sem); | 1471 | r = vm_munmap((unsigned long)vaddr, size); |
1477 | 1472 | ||
1478 | DPRINT(("down_write done smpl_vaddr=%p size=%lu\n", vaddr, size)); | ||
1479 | |||
1480 | r = pfm_do_munmap(task->mm, (unsigned long)vaddr, size, 0); | ||
1481 | |||
1482 | up_write(&task->mm->mmap_sem); | ||
1483 | if (r !=0) { | 1473 | if (r !=0) { |
1484 | printk(KERN_ERR "perfmon: [%d] unable to unmap sampling buffer @%p size=%lu\n", task_pid_nr(task), vaddr, size); | 1474 | printk(KERN_ERR "perfmon: [%d] unable to unmap sampling buffer @%p size=%lu\n", task_pid_nr(task), vaddr, size); |
1485 | } | 1475 | } |
@@ -1945,7 +1935,7 @@ pfm_flush(struct file *filp, fl_owner_t id) | |||
1945 | * because some VM function reenables interrupts. | 1935 | * because some VM function reenables interrupts. |
1946 | * | 1936 | * |
1947 | */ | 1937 | */ |
1948 | if (smpl_buf_vaddr) pfm_remove_smpl_mapping(current, smpl_buf_vaddr, smpl_buf_size); | 1938 | if (smpl_buf_vaddr) pfm_remove_smpl_mapping(smpl_buf_vaddr, smpl_buf_size); |
1949 | 1939 | ||
1950 | return 0; | 1940 | return 0; |
1951 | } | 1941 | } |