linux-stable/drivers/hwtracing/coresight
Suzuki K Poulose e502801188 coresight: tmc-etr: Disable warnings for allocation failures
Running the following command on Juno triggers the warning:

 $ perf record -e cs_etm// -m ,128M ...

 ------------[ cut here ]------------
 WARNING: CPU: 1 PID: 412 at mm/page_alloc.c:4453 __alloc_pages+0x334/0x1420
 CPU: 1 PID: 412 Comm: perf Not tainted 6.5.0-rc3+ #181
 Hardware name: ARM LTD ARM Juno Development Platform/ARM Juno Development Platform, BIOS EDK II Feb  1 2019
 pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
 pc : __alloc_pages+0x334/0x1420
 lr : dma_common_alloc_pages+0x108/0x138
 sp : ffffffc087fb7440
 x29: ffffffc087fb7440 x28: 0000000000000000 x27: ffffffc07e48fba0
 x26: 0000000000000001 x25: 000000000000000f x24: ffffffc081f24880
 x23: 0000000000000cc0 x22: ffffff88012b6f08 x21: 0000000008000000
 x20: ffffff8801433000 x19: 0000000000000000 x18: 0000000000000000
 x17: ffffffc080316e5c x16: ffffffc07e46406c x15: ffffffc0803af580
 x14: ffffffc08036b460 x13: ffffffc080025cbc x12: ffffffb8108c3fc4
 x11: 1ffffff8108c3fc3 x10: 1ffffff810ff6eac x9 : 00000000f204f204
 x8 : 000000000000f204 x7 : 00000000f2f2f2f2 x6 : 00000000f3f3f3f3
 x5 : 0000000000000001 x4 : 0000000000000000 x3 : 0000000000000000
 x2 : 0000000000000cc0 x1 : 0000000000000000 x0 : ffffffc085333000
 Call trace:
  __alloc_pages+0x334/0x1420
  dma_common_alloc_pages+0x108/0x138
  __dma_alloc_pages+0xf4/0x108
  dma_alloc_pages+0x18/0x30
  tmc_etr_alloc_flat_buf+0xa0/0x190 [coresight_tmc]
  tmc_alloc_etr_buf.constprop.0+0x124/0x298 [coresight_tmc]
  alloc_etr_buf.constprop.0.isra.0+0x88/0xc8 [coresight_tmc]
  tmc_alloc_etr_buffer+0x164/0x2f0 [coresight_tmc]
  etm_setup_aux+0x32c/0x520 [coresight]
  rb_alloc_aux+0x29c/0x3f8
  perf_mmap+0x59c/0xce0
  mmap_region+0x340/0x10e0
  do_mmap+0x48c/0x580
  vm_mmap_pgoff+0x160/0x248
  ksys_mmap_pgoff+0x1e8/0x278
  __arm64_sys_mmap+0x8c/0xb8

With the flat mode, we only attempt to allocate large memory if there is an IOMMU
connected to the ETR. If the allocation fails, we always have a fallback path
and return an error if nothing else worked. So, suppress the warning for flat
mode allocations.

Cc: Mike Leach <mike.leach@linaro.org>
Cc: James Clark <james.clark@arm.com>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Reviewed-by: James Clark <james.clark@arm.com>
Link: https://lore.kernel.org/r/20230817161951.658534-1-suzuki.poulose@arm.com
2023-09-20 10:46:30 +01:00
..
Kconfig Coresight: Add coresight dummy driver 2023-06-15 08:50:23 +01:00
Makefile Coresight: Add coresight dummy driver 2023-06-15 08:50:23 +01:00
coresight-catu.c coresight: Enable and disable helper devices adjacent to the path 2023-06-05 15:46:47 +01:00
coresight-catu.h coresight: Make new csdev_access offsets unsigned 2022-08-31 10:56:36 -06:00
coresight-cfg-afdo.c coresight: config: Add preloaded configurations 2021-08-18 22:33:28 +02:00
coresight-cfg-preload.c coresight: configuration: Update API to introduce load owner concept 2021-11-26 11:27:21 -07:00
coresight-cfg-preload.h coresight: config: Add preloaded configurations 2021-08-18 22:33:28 +02:00
coresight-config.c coresight: config: Add configuration and feature generic functions 2021-08-18 22:33:27 +02:00
coresight-config.h coresight: syscfg: Update load and unload operations 2022-06-29 09:35:58 -06:00
coresight-core.c hwtracing: coresight: Explicitly include correct DT includes 2023-07-26 16:46:24 +01:00
coresight-cpu-debug.c coresight: cpu-debug: Replace mutex with mutex_trylock on panic notifier 2022-05-09 16:03:24 +01:00
coresight-cti-core.c coresight: Fix all W=1 build warnings 2023-07-26 18:01:52 +01:00
coresight-cti-platform.c coresight: cti: Reduce scope for the variable 'cs_fwnode' in cti_plat_create_connection() 2021-02-04 17:00:32 +01:00
coresight-cti-sysfs.c coresight: Fix CTI module refcount leak by making it a helper device 2023-06-05 15:46:47 +01:00
coresight-cti.h coresight: Fix CTI module refcount leak by making it a helper device 2023-06-05 15:46:47 +01:00
coresight-dummy.c coresight: dummy: simplify the code with module_platform_driver 2023-08-04 14:17:30 +01:00
coresight-etb10.c coresight: Make refcount a property of the connection 2023-06-05 15:46:46 +01:00
coresight-etm-cp14.c coresight: Moving framework and drivers to SPDX identifier 2018-05-14 16:19:59 +02:00
coresight-etm-perf.c coresight: Enable and disable helper devices adjacent to the path 2023-06-05 15:46:47 +01:00
coresight-etm-perf.h coresight: perf: Output trace id only once 2023-01-24 10:41:46 +00:00
coresight-etm.h coresight: etmX.X: stm: Remove trace_id() callback 2023-01-19 10:16:47 +00:00
coresight-etm3x-core.c coresight: Use enum type for cs_mode wherever possible 2023-06-05 15:46:45 +01:00
coresight-etm3x-sysfs.c coresight: etm3x: Update ETM3 driver to use Trace ID API 2023-01-19 10:16:47 +00:00
coresight-etm4x-cfg.c coresight: Fix all W=1 build warnings 2023-07-26 18:01:52 +01:00
coresight-etm4x-cfg.h coresight: config: Add preloaded configurations 2021-08-18 22:33:28 +02:00
coresight-etm4x-core.c coresight: etm4x: Ensure valid drvdata and clock before clk_put() 2023-08-17 11:49:21 +01:00
coresight-etm4x-sysfs.c coresight: etm4x: Fix missing trctraceidr file in sysfs 2023-06-06 10:39:15 +01:00
coresight-etm4x.h coresight: etm4x: Change etm4_platform_driver driver for MMIO devices 2023-07-26 16:46:25 +01:00
coresight-funnel.c coresight: Make refcount a property of the connection 2023-06-05 15:46:46 +01:00
coresight-platform.c coresight: Fix memory leak in acpi_buffer->pointer 2023-08-18 11:23:47 +01:00
coresight-priv.h coresight: etm4x: Match all ETM4 instances based on DEVARCH and DEVTYPE 2023-06-07 12:07:10 +01:00
coresight-replicator.c coresight: Make refcount a property of the connection 2023-06-05 15:46:46 +01:00
coresight-self-hosted-trace.h coresight: trbe: Prohibit trace before disabling TRBE 2021-10-27 11:45:33 -06:00
coresight-stm.c coresight: Use enum type for cs_mode wherever possible 2023-06-05 15:46:45 +01:00
coresight-syscfg-configfs.c coresight: configfs: Allow configfs to activate configuration 2021-11-26 11:34:27 -07:00
coresight-syscfg-configfs.h coresight: configfs: Allow configfs to activate configuration 2021-11-26 11:34:27 -07:00
coresight-syscfg.c coresight: syscfg: Update load and unload operations 2022-06-29 09:35:58 -06:00
coresight-syscfg.h coresight: syscfg: Update load and unload operations 2022-06-29 09:35:58 -06:00
coresight-sysfs.c coresight: Fix CTI module refcount leak by making it a helper device 2023-06-05 15:46:47 +01:00
coresight-tmc-core.c coresight: tmc: Don't enable TMC when it's not ready. 2023-01-30 11:45:32 +00:00
coresight-tmc-etf.c coresight: tmc: Explicit type conversions to prevent integer overflow 2023-08-04 10:52:32 +01:00
coresight-tmc-etr.c coresight: tmc-etr: Disable warnings for allocation failures 2023-09-20 10:46:30 +01:00
coresight-tmc.h coresight: tmc: Explicit type conversions to prevent integer overflow 2023-08-04 10:52:32 +01:00
coresight-tpda.c coresight: Make refcount a property of the connection 2023-06-05 15:46:46 +01:00
coresight-tpda.h Coresight: Add TPDA link driver 2023-01-20 11:39:03 +00:00
coresight-tpdm.c coresight: Use enum type for cs_mode wherever possible 2023-06-05 15:46:45 +01:00
coresight-tpdm.h coresight-tpdm: Add integration test support 2023-01-20 11:39:03 +00:00
coresight-tpiu.c coresight: Make refcount a property of the connection 2023-06-05 15:46:46 +01:00
coresight-trace-id.c coresight: trace-id: Add debug & test macros to Trace ID allocation 2023-01-19 10:16:47 +00:00
coresight-trace-id.h coresight: trace-id: Add API to dynamically assign Trace ID values 2023-01-19 10:16:46 +00:00
coresight-trbe.c coresight: trbe: Fix TRBE potential sleep in atomic context 2023-08-18 16:42:26 +01:00
coresight-trbe.h coresight: trbe: Directly use ID_AA64DFR0_EL1_TraceBuffer_IMP 2023-08-02 12:53:28 +01:00
ultrasoc-smb.c coresight: Make refcount a property of the connection 2023-06-05 15:46:46 +01:00
ultrasoc-smb.h coresight: Use enum type for cs_mode wherever possible 2023-06-05 15:46:45 +01:00