diff --git a/drivers/virt/gunyah/rsc_mgr.c b/drivers/virt/gunyah/rsc_mgr.c index ab29e7687e3b..dd6fe39f652d 100644 --- a/drivers/virt/gunyah/rsc_mgr.c +++ b/drivers/virt/gunyah/rsc_mgr.c @@ -300,7 +300,7 @@ struct gh_resource *gh_rm_alloc_resource(struct gh_rm *rm, struct gh_rm_hyp_reso ghrsc->capid = le64_to_cpu(hyp_resource->cap_id); ghrsc->irq = IRQ_NOTCONNECTED; ghrsc->rm_label = le32_to_cpu(hyp_resource->resource_label); - if (hyp_resource->virq) { + if (hyp_resource->virq && hyp_resource->virq != GH_RM_RESOURCE_NO_VIRQ) { struct gh_irq_chip_data irq_data = { .gh_virq = le32_to_cpu(hyp_resource->virq), }; diff --git a/include/linux/gunyah_rsc_mgr.h b/include/linux/gunyah_rsc_mgr.h index bc55be6d8d33..0d9ec6d5162d 100644 --- a/include/linux/gunyah_rsc_mgr.h +++ b/include/linux/gunyah_rsc_mgr.h @@ -139,6 +139,7 @@ struct gh_rm_hyp_resource { __le32 resource_label; __le64 cap_id; __le32 virq_handle; +#define GH_RM_RESOURCE_NO_VIRQ 0xFFFFFFFF __le32 virq; __le64 base; __le64 size;