ANDROID: gic: Add affinity-setting vendor hooks to gic
Add vendor hooks to allow vendor enhancements to GIC, specifically implementation-defined multi-CPU IRQ target affinity setting. This patch is a refactored version of the android13-5.15 commit 9c25e5d6f583 ("ANDROID: gic: Add vendor hook to GIC"). Bug: 266450121 Change-Id: I4a17ed20f8e868a6479fd53c0230b22652595b01 Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
This commit is contained in:
parent
818d44dd84
commit
4cd99f6a6f
@ -43,6 +43,7 @@
|
||||
#include <trace/hooks/futex.h>
|
||||
#include <trace/hooks/fips140.h>
|
||||
#include <trace/hooks/dmabuf.h>
|
||||
#include <trace/hooks/gic.h>
|
||||
#include <trace/hooks/timer.h>
|
||||
#include <trace/hooks/topology.h>
|
||||
#include <trace/hooks/hung_task.h>
|
||||
@ -136,5 +137,6 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_aes_expandkey);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_aes_encrypt);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_aes_decrypt);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_timer_calc_index);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_gic_set_affinity);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_uninterrupt_tasks);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_uninterrupt_tasks_done);
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include <linux/irqchip.h>
|
||||
#include <linux/irqchip/chained_irq.h>
|
||||
#include <linux/irqchip/arm-gic.h>
|
||||
#include <trace/hooks/gic.h>
|
||||
|
||||
#include <asm/cputype.h>
|
||||
#include <asm/irq.h>
|
||||
@ -816,6 +817,8 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
|
||||
writeb_relaxed(gic_cpu_map[cpu], reg);
|
||||
irq_data_update_effective_affinity(d, cpumask_of(cpu));
|
||||
|
||||
trace_android_vh_gic_set_affinity(d, mask_val, force, gic_cpu_map, reg);
|
||||
|
||||
return IRQ_SET_MASK_OK_DONE;
|
||||
}
|
||||
|
||||
|
20
include/trace/hooks/gic.h
Normal file
20
include/trace/hooks/gic.h
Normal file
@ -0,0 +1,20 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM gic
|
||||
|
||||
#define TRACE_INCLUDE_PATH trace/hooks
|
||||
|
||||
#if !defined(_TRACE_HOOK_GIC_H) || defined(TRACE_HEADER_MULTI_READ)
|
||||
#define _TRACE_HOOK_GIC_H
|
||||
|
||||
#include <trace/hooks/vendor_hooks.h>
|
||||
|
||||
struct irq_data;
|
||||
DECLARE_HOOK(android_vh_gic_set_affinity,
|
||||
TP_PROTO(struct irq_data *d, const struct cpumask *mask_val,
|
||||
bool force, u8 *gic_cpu_map, void __iomem *reg),
|
||||
TP_ARGS(d, mask_val, force, gic_cpu_map, reg));
|
||||
|
||||
#endif /* _TRACE_HOOK_GIC_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
Loading…
Reference in New Issue
Block a user