Lines Matching full:trbe

3  * This driver enables Trace Buffer Extension (TRBE) as a per-cpu coresight
22 #include "coresight-trbe.h"
29 * data which could not be decoded. TRBE doesn't support
62 /* The base programmed into the TRBE */
73 * TRBE erratum list
77 * to the affected CPUs inside the TRBE driver, we need to know if
79 * work arounds, TRBE driver needs to check multiple times during
82 * We keep a set of the affected errata in trbe_cpudata, per TRBE.
85 * TRBE erratum. We map the given cpucap into a TRBE internal number
117 * struct trbe_cpudata: TRBE instance specific data
118 * @trbe_flag - TRBE dirty/access flag support
119 * @trbe_hw_align - Actual TRBE alignment required for TRBPTR_EL1.
121 * @cpu - CPU this TRBE belongs to.
123 * @drvdata - TRBE specific drvdata
124 * @errata - Bit map for the errata on this TRBE.
179 * Errata affected TRBE implementation will need TSB CSYNC and in trbe_needs_drain_after_disable()
180 * DSB in order to prevent subsequent writes into certain TRBE in trbe_needs_drain_after_disable()
189 * Errata affected TRBE implementation will need an additional in trbe_needs_ctxt_sync_after_enable()
191 * TRBE prohibited region view on the CPU which could possibly in trbe_needs_ctxt_sync_after_enable()
192 * corrupt the TRBE buffer or the TRBE state. in trbe_needs_ctxt_sync_after_enable()
218 * Enable the TRBE without clearing LIMITPTR which in set_trbe_enabled()
224 /* Synchronize the TRBE enable event */ in set_trbe_enabled()
236 * Disable the TRBE without clearing LIMITPTR which in set_trbe_disabled()
267 * the TRBE trace collection was stopped without stopping the in trbe_report_wrap_event()
289 * at event_stop(). So disable the TRBE here and leave in trbe_stop_and_truncate_event()
299 * TRBE Buffer Management
301 * The TRBE buffer spans from the base pointer till the limit pointer. When enabled,
304 * wrapped around again to the base pointer. This is called a TRBE wrap event, which
306 * uses FILL mode, where the TRBE stops the trace collection at wrap event. The IRQ
307 * handler updates the AUX buffer and re-enables the TRBE with updated WRITE and
321 * pointer can be aligned to the implementation defined TRBE trace buffer alignment
334 * the wakeup is behind the tail. Enabled TRBE buffer span needs to be adjusted and
337 * consumed from the user space. The enabled TRBE buffer area is a moving subset of
375 * When the TRBE is affected by an erratum that could make it in trbe_min_trace_buf_size()
388 * TRBE Limit Calculation
390 * The following markers are used to illustrate various TRBE buffer situations.
411 * head TRBE align tail in __trbe_normal_offset()
419 * needs to be aligned before TRBE can be configured. Pad the alignment in __trbe_normal_offset()
448 * Lets calculate the buffer area which TRBE could write into. There in __trbe_normal_offset()
450 * PAGE_SIZE per the TRBE requirement. Always avoid clobbering the in __trbe_normal_offset()
461 * TRBE could write into [head..tail] area. Unless the tail is right at in __trbe_normal_offset()
473 * TRBE should just write into [head..base + nr_pages] area even though in __trbe_normal_offset()
486 * TRBE should just write into [head..base + nr_pages] area even though in __trbe_normal_offset()
513 * the head and hence TRBE cannot be configured. in __trbe_normal_offset()
609 * TRBE for trace capture. In this particular mode, the trace in set_trbe_limit_pointer_enabled()
614 * the TRBE. in set_trbe_limit_pointer_enabled()
620 * Trigger mode is not used here while configuring the TRBE for in set_trbe_limit_pointer_enabled()
641 * till now before enabling the TRBE. in trbe_enable_hw()
663 * If the trbe is affected by TRBE_WORKAROUND_OVERWRITE_FILL_MODE, in trbe_get_fault_act()
684 * If the TRBE has wrapped around the write pointer has in trbe_get_trace_size()
687 * When the TRBE is affected by TRBE_WORKAROUND_WRITE_OUT_OF_RANGE, in trbe_get_trace_size()
704 * TRBE may use a different base address than the base in trbe_get_trace_size()
716 * If the TRBE is affected by the following erratum, we must fill in trbe_get_trace_size()
736 * TRBE LIMIT and TRBE WRITE pointers must be page aligned. But with in arm_trbe_alloc_buffer()
738 * into a partially filled TRBE buffer after the page size alignment. in arm_trbe_alloc_buffer()
799 * We are about to disable the TRBE. And this could in turn in arm_trbe_update_buffer()
810 * If the TRBE was disabled due to lack of space in the AUX buffer or a in arm_trbe_update_buffer()
821 * perf handle structure needs to be shared with the TRBE IRQ handler for in arm_trbe_update_buffer()
824 * while a TRBE IRQ also getting processed. This happens due the release in arm_trbe_update_buffer()
826 * the TRBE here will ensure that no IRQ could be generated when the perf in arm_trbe_update_buffer()
871 * TRBE_WORKAROUND_OVERWRITE_FILL_MODE causes the TRBE to overwrite a few cache in trbe_apply_work_around_before_enable()
885 * the TRBE could overwrite the contents at the "normal-BASE", after in trbe_apply_work_around_before_enable()
932 * - At TRBE enable: in trbe_apply_work_around_before_enable()
951 * TRBE_WORKAROUND_WRITE_OUT_OF_RANGE could cause the TRBE to write to in trbe_apply_work_around_before_enable()
954 * - The page beyond the ring buffer. This could mean, TRBE could in trbe_apply_work_around_before_enable()
965 * the TRBE's range (i.e [TRBBASER, TRBLIMITR.LIMI] ). in trbe_apply_work_around_before_enable()
971 * range for the TRBE. in trbe_apply_work_around_before_enable()
994 /* Set the base of the TRBE to the buffer base */ in __arm_trbe_enable()
1054 * If the IRQ was spurious, simply re-enable the TRBE in trbe_handle_spurious()
1078 * thus leave the TRBE disabled. The etm-perf driver in trbe_handle_overflow()
1122 /* Reads to TRBSR_EL1 is fine when TRBE is active */ in arm_trbe_irq_handler()
1131 /* Prohibit the CPU from tracing before we disable the TRBE */ in arm_trbe_irq_handler()
1248 /* If the TRBE was not probed on the CPU, we shouldn't be here */ in arm_trbe_register_coresight_cpu()
1253 desc.name = devm_kasprintf(dev, GFP_KERNEL, "trbe%d", cpu); in arm_trbe_register_coresight_cpu()
1257 * TRBE coresight devices do not need regular connections in arm_trbe_register_coresight_cpu()
1261 * platform_data, which TRBE devices do not have. As they in arm_trbe_register_coresight_cpu()
1301 pr_err("TRBE is not implemented on cpu %d\n", cpu); in arm_trbe_probe_cpu()
1307 pr_err("TRBE is owned in higher exception level on cpu %d\n", cpu); in arm_trbe_probe_cpu()
1318 * Run the TRBE erratum checks, now that we know in arm_trbe_probe_cpu()
1324 pr_err("Disabling TRBE on cpu%d due to erratum\n", cpu); in arm_trbe_probe_cpu()
1329 * If the TRBE is affected by erratum TRBE_WORKAROUND_OVERWRITE_FILL_MODE, in arm_trbe_probe_cpu()
1332 * TRBE over-writing 256bytes at TRBBASER_EL1 on FILL event. in arm_trbe_probe_cpu()
1408 * If this CPU was not probed for TRBE, in arm_trbe_cpu_startup()
1503 pr_err("TRBE wouldn't work if kernel gets unmapped at EL0\n"); in arm_trbe_device_probe()
1587 MODULE_DESCRIPTION("Arm Trace Buffer Extension (TRBE) driver");