hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/parisc/kernel/perf.c
....@@ -1,22 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Parisc performance counters
34 * Copyright (C) 2001 Randolph Chung <tausq@debian.org>
45 *
56 * This code is derived, with permission, from HP/UX sources.
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License as published by
9
- * the Free Software Foundation; either version 2, or (at your option)
10
- * any later version.
11
- *
12
- * This program is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- * GNU General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU General Public License
18
- * along with this program; if not, write to the Free Software
19
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
207 */
218
229 /*
....@@ -313,7 +300,7 @@
313300 else
314301 return -EFAULT;
315302
316
- if (!capable(CAP_SYS_ADMIN))
303
+ if (!perfmon_capable())
317304 return -EACCES;
318305
319306 if (count != sizeof(uint32_t))
....@@ -805,7 +792,7 @@
805792 return -1;
806793 }
807794
808
- runway = ioremap_nocache(cpu_device->hpa.start, 4096);
795
+ runway = ioremap(cpu_device->hpa.start, 4096);
809796 if (!runway) {
810797 pr_err("perf_write_image: ioremap failed!\n");
811798 return -ENOMEM;