summaryrefslogtreecommitdiff
path: root/drivers/perf
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2019-05-13 19:53:03 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-19 09:00:06 +0300
commit212a1e05849d34df95bf56c6e9fb3da8d2dd5678 (patch)
treef640e89473a8e60a4ff9d42a56c9ac4772c79c05 /drivers/perf
parent980628e34fef39f05eee1c3a1d575bf181abfdf6 (diff)
downloadlinux-212a1e05849d34df95bf56c6e9fb3da8d2dd5678.tar.xz
drivers/perf: arm_spe: Don't error on high-order pages for aux buf
[ Upstream commit 14ae42a6f0b13130a97d94d23481128961de5d38 ] Since commit 5768402fd9c6 ("perf/ring_buffer: Use high order allocations for AUX buffers optimistically"), the perf core tends to back aux buffer allocations with high-order pages with the order encoded in the PagePrivate data. The Arm SPE driver explicitly rejects such pages, causing the perf tool to fail with: | failed to mmap with 12 (Cannot allocate memory) In actual fact, we can simply treat these pages just like any other since the perf core takes care to populate the page array appropriately. In theory we could try to map with PMDs where possible, but for now, let's just get things working again. Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Fixes: 5768402fd9c6 ("perf/ring_buffer: Use high order allocations for AUX buffers optimistically") Reported-by: Hanjun Guo <guohanjun@huawei.com> Tested-by: Hanjun Guo <guohanjun@huawei.com> Tested-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/perf')
-rw-r--r--drivers/perf/arm_spe_pmu.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c
index 7cb766dafe85..e120f933412a 100644
--- a/drivers/perf/arm_spe_pmu.c
+++ b/drivers/perf/arm_spe_pmu.c
@@ -855,16 +855,8 @@ static void *arm_spe_pmu_setup_aux(struct perf_event *event, void **pages,
if (!pglist)
goto out_free_buf;
- for (i = 0; i < nr_pages; ++i) {
- struct page *page = virt_to_page(pages[i]);
-
- if (PagePrivate(page)) {
- pr_warn("unexpected high-order page for auxbuf!");
- goto out_free_pglist;
- }
-
+ for (i = 0; i < nr_pages; ++i)
pglist[i] = virt_to_page(pages[i]);
- }
buf->base = vmap(pglist, nr_pages, VM_MAP, PAGE_KERNEL);
if (!buf->base)