refactor: move interrupt_type to arch header
Move enum interrupt_type definition from the generic types.h header to
the aarch64 specific types header.
The call.h interface is included in the linux driver, so pass a generic
uint32_t value such that hf_interrupt_enable remains implementation
agnostic.
Include the arch specific types.h wherever it's needed in vcpu header
and test framework.
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I27b016e2cef615d2d97340cc6efd76edf93e0d17
diff --git a/inc/hf/vcpu.h b/inc/hf/vcpu.h
index 9dec951..fe2b5b8 100644
--- a/inc/hf/vcpu.h
+++ b/inc/hf/vcpu.h
@@ -8,6 +8,8 @@
#pragma once
+#include "hf/arch/types.h"
+
#include "hf/addr.h"
#include "hf/interrupt_desc.h"
#include "hf/spinlock.h"
diff --git a/inc/vmapi/hf/call.h b/inc/vmapi/hf/call.h
index 245be99..3ec64dd 100644
--- a/inc/vmapi/hf/call.h
+++ b/inc/vmapi/hf/call.h
@@ -348,7 +348,7 @@
* Returns 0 on success, or -1 if the intid is invalid.
*/
static inline int64_t hf_interrupt_enable(uint32_t intid, bool enable,
- enum interrupt_type type)
+ uint32_t type)
{
return hf_call(HF_INTERRUPT_ENABLE, intid, enable, type);
}
diff --git a/inc/vmapi/hf/types.h b/inc/vmapi/hf/types.h
index 843861b..b7bbd13 100644
--- a/inc/vmapi/hf/types.h
+++ b/inc/vmapi/hf/types.h
@@ -59,9 +59,3 @@
/** The physical interrupt ID use for the schedule receiver interrupt. */
#define HF_SCHEDULE_RECEIVER_INTID 8
-
-/** Type of interrupts */
-enum interrupt_type {
- INTERRUPT_TYPE_IRQ,
- INTERRUPT_TYPE_FIQ,
-};