Commit 98123ff5 authored by Hongzhan Chen's avatar Hongzhan Chen Committed by Jan Kiszka

cobalt/kernel: dovetail: implement sirq services

inband sirq request through synthetic_irq_domain and free and post
srq.
Signed-off-by: default avatarHongzhan Chen <hongzhan.chen@intel.com>
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 2492e0a1
......@@ -23,9 +23,24 @@ int pipeline_create_inband_sirq(irqreturn_t (*handler)(int irq, void *dev_id))
* Allocate an IRQ from the synthetic interrupt domain then
* trap it to @handler, to be fired from the in-band stage.
*/
TODO();
int sirq, ret;
return 0;
sirq = irq_create_direct_mapping(synthetic_irq_domain);
if (sirq == 0)
return -EAGAIN;
ret = __request_percpu_irq(sirq,
handler,
IRQF_NO_THREAD,
"Inband sirq",
&cobalt_machine_cpudata);
if (ret) {
irq_dispose_mapping(sirq);
return ret;
}
return sirq;
}
static inline
......@@ -35,13 +50,16 @@ void pipeline_delete_inband_sirq(int sirq)
* Free the synthetic IRQ then deallocate it to its
* originating domain.
*/
TODO();
free_percpu_irq(sirq,
&cobalt_machine_cpudata);
irq_dispose_mapping(sirq);
}
static inline void pipeline_post_sirq(int sirq)
{
/* Trigger the synthetic IRQ */
TODO();
irq_post_inband(sirq);
}
#endif /* !_COBALT_KERNEL_IPIPE_SIRQ_H */
#endif /* !_COBALT_KERNEL_DOVETAIL_SIRQ_H */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment