hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/misc/cxl/fault.c
....@@ -1,10 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright 2014 IBM Corp.
3
- *
4
- * This program is free software; you can redistribute it and/or
5
- * modify it under the terms of the GNU General Public License
6
- * as published by the Free Software Foundation; either version
7
- * 2 of the License, or (at your option) any later version.
84 */
95
106 #include <linux/workqueue.h>
....@@ -168,7 +164,7 @@
168164 if (dsisr & CXL_PSL_DSISR_An_S)
169165 access |= _PAGE_WRITE;
170166
171
- if (!mm && (REGION_ID(dar) != USER_REGION_ID))
167
+ if (!mm && (get_region_id(dar) != USER_REGION_ID))
172168 access |= _PAGE_PRIVILEGED;
173169
174170 if (dsisr & DSISR_NOHPTE)
....@@ -325,7 +321,7 @@
325321 return;
326322 }
327323
328
- down_read(&mm->mmap_sem);
324
+ mmap_read_lock(mm);
329325 for (vma = mm->mmap; vma; vma = vma->vm_next) {
330326 for (ea = vma->vm_start; ea < vma->vm_end;
331327 ea = next_segment(ea, slb.vsid)) {
....@@ -340,7 +336,7 @@
340336 last_esid = slb.esid;
341337 }
342338 }
343
- up_read(&mm->mmap_sem);
339
+ mmap_read_unlock(mm);
344340
345341 mmput(mm);
346342 }