mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
firmware: arm_sdei: add some functions for fiq debugger.
1. add sdei_event_routing_set() 2. add sdei_event_routing_set_nolock() 3. add sdei_event_enable_nolock() and sdei_event_disable_nolock() Signed-off-by: Tony Xie <tony.xie@rock-chips.com> Change-Id: Ia2471a3ac6a9189888a465a529875957ab9661b6
This commit is contained in:
@@ -887,6 +887,45 @@ static void sdei_smccc_hvc(unsigned long function_id,
|
||||
arm_smccc_hvc(function_id, arg0, arg1, arg2, arg3, arg4, 0, 0, res);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FIQ_DEBUGGER_TRUST_ZONE
|
||||
int sdei_event_enable_nolock(u32 event_num)
|
||||
{
|
||||
return sdei_api_event_enable(event_num);
|
||||
}
|
||||
|
||||
int sdei_event_disable_nolock(u32 event_num)
|
||||
{
|
||||
return sdei_api_event_disable(event_num);
|
||||
}
|
||||
|
||||
int sdei_event_routing_set_nolock(u32 event_num, unsigned long flags,
|
||||
unsigned long affinity)
|
||||
{
|
||||
return invoke_sdei_fn(SDEI_1_0_FN_SDEI_EVENT_ROUTING_SET, event_num,
|
||||
(unsigned long)flags, (unsigned long)affinity,
|
||||
0, 0, 0);
|
||||
}
|
||||
|
||||
int sdei_event_routing_set(u32 event_num, unsigned long flags,
|
||||
unsigned long affinity)
|
||||
{
|
||||
int err = -EINVAL;
|
||||
struct sdei_event *event;
|
||||
|
||||
mutex_lock(&sdei_events_lock);
|
||||
event = sdei_event_find(event_num);
|
||||
if (!event) {
|
||||
mutex_unlock(&sdei_events_lock);
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
err = sdei_event_routing_set_nolock(event_num, flags, affinity);
|
||||
mutex_unlock(&sdei_events_lock);
|
||||
|
||||
return err;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int sdei_get_conduit(struct platform_device *pdev)
|
||||
{
|
||||
const char *method;
|
||||
|
||||
@@ -39,6 +39,15 @@ int sdei_event_unregister(u32 event_num);
|
||||
int sdei_event_enable(u32 event_num);
|
||||
int sdei_event_disable(u32 event_num);
|
||||
|
||||
#ifdef CONFIG_FIQ_DEBUGGER_TRUST_ZONE
|
||||
int sdei_event_enable_nolock(u32 event_num);
|
||||
int sdei_event_disable_nolock(u32 event_num);
|
||||
int sdei_event_routing_set_nolock(u32 event_num, unsigned long flags,
|
||||
unsigned long affinity);
|
||||
int sdei_event_routing_set(u32 event_num, unsigned long flags,
|
||||
unsigned long affinity);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARM_SDE_INTERFACE
|
||||
/* For use by arch code when CPU hotplug notifiers are not appropriate. */
|
||||
int sdei_mask_local_cpu(void);
|
||||
|
||||
Reference in New Issue
Block a user