hv: pirq: remove support of physical irq sharing

Because multiple physical devices sharing a single physical pin would be
assigned to a same VM, so UOS could handle the irq sharing. So that we could
remove the physical irq sharing support in HV.

This commit removes the irq sharing support, changes including:
 - removed the dev_list field in irq_desc, and clean up codes for the list
   operation;
 - replace IRQ_ASSIGNED_SHARED and IRQ_ASSIGNED_NOSHARE with IRQ_ASSIGNED;
 - remove argument indicating irq is shared;
 - revise irq request flow for pt devices to remove dependency on irq sharing:
   register irq on adding remapping entery and unregister irq on removal an
   entry, and do not register/unregister at remapping an entry.

Signed-off-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Yan, Like
2018-08-09 16:44:04 +08:00
committed by lijinxia
parent 6744a179fc
commit d773df9135
5 changed files with 62 additions and 132 deletions

View File

@@ -15,8 +15,7 @@ enum irq_mode {
enum irq_state {
IRQ_NOT_ASSIGNED = 0,
IRQ_ASSIGNED_SHARED,
IRQ_ASSIGNED_NOSHARE,
IRQ_ASSIGNED,
};
enum irq_desc_state {
@@ -32,7 +31,6 @@ struct irq_request_info {
uint32_t vector;
dev_handler_t func;
void *dev_data;
bool share;
char *name;
};
@@ -44,7 +42,7 @@ struct irq_desc {
uint32_t vector; /* assigned vector */
void *handler_data; /* irq_handler private data */
int (*irq_handler)(struct irq_desc *irq_desc, void *handler_data);
struct dev_handler_node *dev_list;
struct dev_handler_node *action;
spinlock_t irq_lock;
uint64_t *irq_cnt; /* this irq cnt happened on CPUs */
uint64_t irq_lost_cnt;
@@ -78,7 +76,6 @@ struct dev_handler_node*
normal_register_handler(uint32_t irq,
dev_handler_t func,
void *dev_data,
bool share,
const char *name);
void unregister_handler_common(struct dev_handler_node *node);