hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/arch/powerpc/oprofile/cell/spu_task_sync.c
....@@ -1,14 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Cell Broadband Engine OProfile Support
34 *
45 * (C) Copyright IBM Corporation 2006
56 *
67 * Author: Maynard Johnson <maynardj@us.ibm.com>
7
- *
8
- * This program is free software; you can redistribute it and/or
9
- * modify it under the terms of the GNU General Public License
10
- * as published by the Free Software Foundation; either version
11
- * 2 of the License, or (at your option) any later version.
128 */
139
1410 /* The purpose of this file is to handle SPU event task switching
....@@ -336,7 +332,7 @@
336332 fput(exe_file);
337333 }
338334
339
- down_read(&mm->mmap_sem);
335
+ mmap_read_lock(mm);
340336 for (vma = mm->mmap; vma; vma = vma->vm_next) {
341337 if (vma->vm_start > spu_ref || vma->vm_end <= spu_ref)
342338 continue;
....@@ -353,13 +349,13 @@
353349 *spu_bin_dcookie = fast_get_dcookie(&vma->vm_file->f_path);
354350 pr_debug("got dcookie for %pD\n", vma->vm_file);
355351
356
- up_read(&mm->mmap_sem);
352
+ mmap_read_unlock(mm);
357353
358354 out:
359355 return app_cookie;
360356
361357 fail_no_image_cookie:
362
- up_read(&mm->mmap_sem);
358
+ mmap_read_unlock(mm);
363359
364360 printk(KERN_ERR "SPU_PROF: "
365361 "%s, line %d: Cannot find dcookie for SPU binary\n",
....@@ -576,7 +572,7 @@
576572 * samples are recorded.
577573 * No big deal -- so we just drop a few samples.
578574 */
579
- pr_debug("SPU_PROF: No cached SPU contex "
575
+ pr_debug("SPU_PROF: No cached SPU context "
580576 "for SPU #%d. Dropping samples.\n", spu_num);
581577 goto out;
582578 }