ANDROID: irqchip/irq-gic-v3: Add vendor hook for gic suspend
This change adds vendor hook for gic suspend syscore ops callback. And it is invoked during deepsleep and hibernation to store gic register snapshot. Bug: 340049585 Change-Id: I4e3729afa4daf18d73e00ee9601b6da72a578b4a Signed-off-by: Nagireddy Annem <quic_nannem@quicinc.com> Signed-off-by: Kamati Srinivas <quic_kamasrin@quicinc.com>
This commit is contained in:
parent
6e318661f7
commit
826acfacd4
4 changed files with 26 additions and 3 deletions
|
@ -145,6 +145,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpu_idle_enter);
|
|||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpu_idle_exit);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_find_busiest_group);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_gic_resume);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_gic_suspend);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_wq_lockup_pool);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ipi_stop);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_dump_throttled_rt_tasks);
|
||||
|
|
|
@ -217,10 +217,11 @@ static void gic_do_wait_for_rwp(void __iomem *base, u32 bit)
|
|||
}
|
||||
|
||||
/* Wait for completion of a distributor change */
|
||||
static void gic_dist_wait_for_rwp(void)
|
||||
void gic_dist_wait_for_rwp(void)
|
||||
{
|
||||
gic_do_wait_for_rwp(gic_data.dist_base, GICD_CTLR_RWP);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(gic_dist_wait_for_rwp);
|
||||
|
||||
/* Wait for completion of a redistributor change */
|
||||
static void gic_redist_wait_for_rwp(void)
|
||||
|
@ -804,7 +805,7 @@ static bool gic_has_group0(void)
|
|||
return val != 0;
|
||||
}
|
||||
|
||||
static void __init gic_dist_init(void)
|
||||
void gic_dist_init(void)
|
||||
{
|
||||
unsigned int i;
|
||||
u64 affinity;
|
||||
|
@ -862,6 +863,7 @@ static void __init gic_dist_init(void)
|
|||
for (i = 0; i < GIC_ESPI_NR; i++)
|
||||
gic_write_irouter(affinity, base + GICD_IROUTERnE + i * 8);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(gic_dist_init);
|
||||
|
||||
static int gic_iterate_rdists(int (*fn)(struct redist_region *, void __iomem *))
|
||||
{
|
||||
|
@ -1143,7 +1145,7 @@ static int gic_dist_supports_lpis(void)
|
|||
!gicv3_nolpi);
|
||||
}
|
||||
|
||||
static void gic_cpu_init(void)
|
||||
void gic_cpu_init(void)
|
||||
{
|
||||
void __iomem *rbase;
|
||||
int i;
|
||||
|
@ -1170,6 +1172,7 @@ static void gic_cpu_init(void)
|
|||
/* initialise system registers */
|
||||
gic_cpu_sys_reg_init();
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(gic_cpu_init);
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
|
||||
|
@ -1370,8 +1373,17 @@ void gic_resume(void)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(gic_resume);
|
||||
|
||||
static int gic_suspend(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
trace_android_vh_gic_suspend(&gic_data, &ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct syscore_ops gic_syscore_ops = {
|
||||
.resume = gic_resume,
|
||||
.suspend = gic_suspend,
|
||||
};
|
||||
|
||||
static void gic_syscore_init(void)
|
||||
|
@ -1382,6 +1394,7 @@ static void gic_syscore_init(void)
|
|||
#else
|
||||
static inline void gic_syscore_init(void) { }
|
||||
void gic_resume(void) { }
|
||||
static int gic_suspend(void) { return 0; }
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -723,6 +723,9 @@ static inline bool gic_enable_sre(void)
|
|||
}
|
||||
|
||||
void gic_resume(void);
|
||||
void gic_dist_init(void);
|
||||
void gic_cpu_init(void);
|
||||
void gic_dist_wait_for_rwp(void);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -19,6 +19,9 @@ struct irq_data;
|
|||
/* struct irq_data */
|
||||
#include <linux/irq.h>
|
||||
#endif /* __GENKSYMS__ */
|
||||
|
||||
struct gic_chip_data;
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_gic_v3_set_affinity,
|
||||
TP_PROTO(struct irq_data *d, const struct cpumask *mask_val,
|
||||
u64 *affinity, bool force, void __iomem *base),
|
||||
|
@ -26,6 +29,9 @@ DECLARE_RESTRICTED_HOOK(android_rvh_gic_v3_set_affinity,
|
|||
1);
|
||||
|
||||
/* macro versions of hooks are no longer required */
|
||||
DECLARE_HOOK(android_vh_gic_suspend,
|
||||
TP_PROTO(struct gic_chip_data *gd, int *ret),
|
||||
TP_ARGS(gd, ret));
|
||||
|
||||
#endif /* _TRACE_HOOK_GIC_V3_H */
|
||||
/* This part must be outside protection */
|
||||
|
|
Loading…
Reference in a new issue