.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * 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. |
---|
8 | 4 | */ |
---|
9 | 5 | |
---|
10 | 6 | #include <linux/workqueue.h> |
---|
.. | .. |
---|
168 | 164 | if (dsisr & CXL_PSL_DSISR_An_S) |
---|
169 | 165 | access |= _PAGE_WRITE; |
---|
170 | 166 | |
---|
171 | | - if (!mm && (REGION_ID(dar) != USER_REGION_ID)) |
---|
| 167 | + if (!mm && (get_region_id(dar) != USER_REGION_ID)) |
---|
172 | 168 | access |= _PAGE_PRIVILEGED; |
---|
173 | 169 | |
---|
174 | 170 | if (dsisr & DSISR_NOHPTE) |
---|
.. | .. |
---|
325 | 321 | return; |
---|
326 | 322 | } |
---|
327 | 323 | |
---|
328 | | - down_read(&mm->mmap_sem); |
---|
| 324 | + mmap_read_lock(mm); |
---|
329 | 325 | for (vma = mm->mmap; vma; vma = vma->vm_next) { |
---|
330 | 326 | for (ea = vma->vm_start; ea < vma->vm_end; |
---|
331 | 327 | ea = next_segment(ea, slb.vsid)) { |
---|
.. | .. |
---|
340 | 336 | last_esid = slb.esid; |
---|
341 | 337 | } |
---|
342 | 338 | } |
---|
343 | | - up_read(&mm->mmap_sem); |
---|
| 339 | + mmap_read_unlock(mm); |
---|
344 | 340 | |
---|
345 | 341 | mmput(mm); |
---|
346 | 342 | } |
---|