linux/drivers/hwtracing
Ilkka Koskinen 473362787f coresight: catu: Fix number of pages while using 64k pages
[ Upstream commit 0e14e062f5 ]

Trying to record a trace on kernel with 64k pages resulted in -ENOMEM.
This happens due to a bug in calculating the number of table pages, which
returns zero. Fix the issue by rounding up.

$ perf record --kcore -e cs_etm/@tmc_etr55,cycacc,branch_broadcast/k --per-thread taskset --cpu-list 1 dd if=/dev/zero of=/dev/null
failed to mmap with 12 (Cannot allocate memory)

Fixes: 8ed536b1e2 ("coresight: catu: Add support for scatter gather tables")
Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20250109215348.5483-1-ilkka@os.amperecomputing.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-04-10 14:32:01 +02:00
..
coresight coresight: catu: Fix number of pages while using 64k pages 2025-04-10 14:32:01 +02:00
intel_th intel_th: pci: Add Panther Lake-P/U support 2025-03-13 12:51:10 +01:00
stm stm class: Fix a double free in stm_register_device() 2024-06-16 13:39:39 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00