mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 10:17:28 +00:00
hv: softirq: refine softirq
1. add register_softirq to register a softirq handler 2. rename exec_softirq to do_softirq; raise_softirq to fire_softirq. 3. in do_softirq call registered softirq handler not call the device softirq handle function directly 4. enable irq after vm exit and disable irq after the first call do_softirq before vm enter. 5. call do_softirq again when irq disabled to handle the risk unhandled softirq. 6. rename SOFTIRQ_DEV_ASSIGN to SOFTIRQ_PTDEV 7. remove SOFTIRQ_ATOMIC Signed-off-by: Li, Fei1 <fei1.li@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -54,7 +54,6 @@ static inline void initialize_timer(struct hv_timer *timer,
|
||||
int add_timer(struct hv_timer *timer);
|
||||
void del_timer(struct hv_timer *timer);
|
||||
|
||||
void timer_softirq(uint16_t pcpu_id);
|
||||
void timer_init(void);
|
||||
void timer_cleanup(void);
|
||||
void check_tsc(void);
|
||||
|
@@ -8,16 +8,14 @@
|
||||
#define SOFTIRQ_H
|
||||
|
||||
#define SOFTIRQ_TIMER 0U
|
||||
#define SOFTIRQ_DEV_ASSIGN 1U
|
||||
#define SOFTIRQ_MAX 2U
|
||||
#define SOFTIRQ_MASK ((1UL<<SOFTIRQ_MAX)-1)
|
||||
#define SOFTIRQ_PTDEV 1U
|
||||
#define NR_SOFTIRQS 2U
|
||||
#define SOFTIRQ_MASK ((1UL << NR_SOFTIRQS) - 1UL)
|
||||
|
||||
/* used for atomic value for prevent recursive */
|
||||
#define SOFTIRQ_ATOMIC 63U
|
||||
typedef void (*softirq_handler)(uint16_t cpu_id);
|
||||
|
||||
void enable_softirq(uint16_t cpu_id);
|
||||
void disable_softirq(uint16_t cpu_id);
|
||||
void init_softirq(void);
|
||||
void raise_softirq(uint16_t softirq_id);
|
||||
void exec_softirq(void);
|
||||
void register_softirq(uint16_t nr, softirq_handler handler);
|
||||
void fire_softirq(uint16_t nr);
|
||||
void do_softirq(void);
|
||||
#endif /* SOFTIRQ_H */
|
||||
|
Reference in New Issue
Block a user