mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 05:55:44 +02:00
ANDROID: gic: Add vendor hook for gic-v3 resume
Add vendor hook for gic-v3 resume to allow vendor GIC enhancement. Bug: 168730134 Change-Id: Id3298715355c8f592f58393db6aa903b18dd812c Signed-off-by: Elliot Berman <eberman@codeaurora.org>
This commit is contained in:
parent
f14e5bfb39
commit
0df7b95498
|
|
@ -17,6 +17,7 @@
|
|||
#include <trace/hooks/cpuidle.h>
|
||||
#include <trace/hooks/topology.h>
|
||||
#include <trace/hooks/mpam.h>
|
||||
#include <trace/hooks/gic.h>
|
||||
|
||||
/*
|
||||
* Export tracepoints that act as a bare tracehook (ie: have no trace event
|
||||
|
|
@ -55,3 +56,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sched_show_task);
|
|||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpu_idle);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mpam_set);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_find_busiest_group);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_gic_resume);
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
#include <linux/percpu.h>
|
||||
#include <linux/refcount.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/syscore_ops.h>
|
||||
#include <linux/wakeup_reason.h>
|
||||
|
||||
|
||||
|
|
@ -31,6 +32,8 @@
|
|||
#include <asm/smp_plat.h>
|
||||
#include <asm/virt.h>
|
||||
|
||||
#include <trace/hooks/gic.h>
|
||||
|
||||
#include "irq-gic-common.h"
|
||||
|
||||
#define GICD_INT_NMI_PRI (GICD_INT_DEF_PRI & ~0x80)
|
||||
|
|
@ -1240,6 +1243,26 @@ static void gic_cpu_pm_init(void)
|
|||
static inline void gic_cpu_pm_init(void) { }
|
||||
#endif /* CONFIG_CPU_PM */
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static void gic_resume(void)
|
||||
{
|
||||
trace_android_vh_gic_resume(gic_data.domain, gic_data.dist_base);
|
||||
}
|
||||
|
||||
static struct syscore_ops gic_syscore_ops = {
|
||||
.resume = gic_resume,
|
||||
};
|
||||
|
||||
static void gic_syscore_init(void)
|
||||
{
|
||||
register_syscore_ops(&gic_syscore_ops);
|
||||
}
|
||||
|
||||
#else
|
||||
static inline void gic_syscore_init(void) { }
|
||||
#endif
|
||||
|
||||
|
||||
static struct irq_chip gic_chip = {
|
||||
.name = "GICv3",
|
||||
.irq_mask = gic_mask_irq,
|
||||
|
|
@ -1653,6 +1676,7 @@ static int __init gic_init_bases(void __iomem *dist_base,
|
|||
gic_dist_init();
|
||||
gic_cpu_init();
|
||||
gic_cpu_pm_init();
|
||||
gic_syscore_init();
|
||||
|
||||
if (gic_dist_supports_lpis()) {
|
||||
its_init(handle, &gic_data.rdists, gic_data.domain);
|
||||
|
|
|
|||
29
include/trace/hooks/gic.h
Normal file
29
include/trace/hooks/gic.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/* 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 <linux/irqdomain.h>
|
||||
|
||||
#include <linux/tracepoint.h>
|
||||
#include <trace/hooks/vendor_hooks.h>
|
||||
|
||||
#if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS)
|
||||
|
||||
DECLARE_HOOK(android_vh_gic_resume,
|
||||
TP_PROTO(struct irq_domain *domain, void __iomem *dist_base),
|
||||
TP_ARGS(domain, dist_base));
|
||||
|
||||
#else
|
||||
|
||||
#define trace_android_vh_gic_resume(domain, dist_base)
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _TRACE_HOOK_GIC_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
Loading…
Reference in New Issue
Block a user