mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-04 23:24:56 +00:00
hv: pirq: use a bitmap to maintain irq use status
This commit replaces the "used" field of irq_desc with a bitmap to maintain the irq use status to save memory and LOC, and improve the efficiency as well. Signed-off-by: Yan, Like <like.yan@intel.com> Reviewed-by: Li, Fei1 <fei1.li@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -17,17 +17,11 @@ enum irq_mode {
|
||||
IRQ_DEASSERT,
|
||||
};
|
||||
|
||||
enum irq_use_state {
|
||||
IRQ_NOT_ASSIGNED = 0,
|
||||
IRQ_ASSIGNED,
|
||||
};
|
||||
|
||||
typedef int (*irq_action_t)(uint32_t irq, void *priv_data);
|
||||
|
||||
/* any field change in below required irq_lock protection with irqsave */
|
||||
struct irq_desc {
|
||||
uint32_t irq; /* index to irq_desc_base */
|
||||
enum irq_use_state used; /* this irq have assigned to device */
|
||||
uint32_t vector; /* assigned vector */
|
||||
|
||||
irq_action_t action; /* callback registered from component */
|
||||
|
||||
Reference in New Issue
Block a user