mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
hv/mod_irq: hide arch specific data in irq_desc
Arch specific IRQ data is now an opaque pointer in irq_desc. This is a preparation step for spliting IRQ handling into common and architecture specific parts. Tracked-On: #5825 Signed-off-by: Peter Fang <peter.fang@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
@@ -247,6 +247,18 @@ extern uint64_t irq_alloc_bitmap[IRQ_ALLOC_BITMAP_SIZE];
|
||||
|
||||
typedef void (*irq_action_t)(uint32_t irq, void *priv_data);
|
||||
|
||||
/*
|
||||
* x86 irq data
|
||||
*/
|
||||
struct x86_irq_data {
|
||||
uint32_t vector; /**< assigned vector */
|
||||
#ifdef PROFILING_ON
|
||||
uint64_t ctx_rip;
|
||||
uint64_t ctx_rflags;
|
||||
uint64_t ctx_cs;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Interrupt descriptor
|
||||
*
|
||||
@@ -254,18 +266,14 @@ typedef void (*irq_action_t)(uint32_t irq, void *priv_data);
|
||||
*/
|
||||
struct irq_desc {
|
||||
uint32_t irq; /**< index to irq_desc_base */
|
||||
uint32_t vector; /**< assigned vector */
|
||||
|
||||
void *arch_data; /**< arch-specific data */
|
||||
|
||||
irq_action_t action; /**< callback registered from component */
|
||||
void *priv_data; /**< irq_action private data */
|
||||
uint32_t flags; /**< flags for trigger mode/ptdev */
|
||||
|
||||
spinlock_t lock;
|
||||
#ifdef PROFILING_ON
|
||||
uint64_t ctx_rip;
|
||||
uint64_t ctx_rflags;
|
||||
uint64_t ctx_cs;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user