return 0;
}
-int gicv3_its_init(void)
-{
- struct host_its *hw_its;
- int ret;
-
- list_for_each_entry(hw_its, &host_its_list, entry)
- {
- ret = gicv3_its_init_single_its(hw_its);
- if ( ret )
- return ret;
- }
-
- return 0;
-}
-
/*
* TODO: Investigate the interaction when a guest removes a device while
* some LPIs are still in flight.
}
/* Scan the DT for any ITS nodes and create a list of host ITSes out of it. */
-void gicv3_its_dt_init(const struct dt_device_node *node)
+static void gicv3_its_dt_init(const struct dt_device_node *node)
{
const struct dt_device_node *its = NULL;
return 0;
}
-void gicv3_its_acpi_init(void)
+static void gicv3_its_acpi_init(void)
{
/* Parse ITS information */
acpi_table_parse_madt(ACPI_MADT_TYPE_GENERIC_TRANSLATOR,
return sizeof(struct acpi_madt_generic_translator) * vgic_v3_its_count(d);
}
+#else /* !CONFIG_ACPI */
+
+static void gicv3_its_acpi_init(void)
+{
+ ASSERT_UNREACHABLE();
+}
+
#endif
+int gicv3_its_init(void)
+{
+ struct host_its *hw_its;
+ int ret;
+
+ if ( acpi_disabled )
+ gicv3_its_dt_init(dt_interrupt_controller);
+ else
+ gicv3_its_acpi_init();
+
+ list_for_each_entry(hw_its, &host_its_list, entry)
+ {
+ ret = gicv3_its_init_single_its(hw_its);
+ if ( ret )
+ return ret;
+ }
+
+ return 0;
+}
+
+
/*
* Local variables:
* mode: C
if ( !res )
dt_device_get_address(node, 1 + gicv3.rdist_count + 2,
&vbase, &vsize);
-
- /* Check for ITS child nodes and build the host ITS list accordingly. */
- gicv3_its_dt_init(node);
}
static int gicv3_iomem_deny_access(const struct domain *d)
gicv3.rdist_stride = 0;
- gicv3_its_acpi_init();
-
/*
* In ACPI, 0 is considered as the invalid address. However the rest
* of the initialization rely on the invalid address to be
extern struct list_head host_its_list;
-/* Parse the host DT and pick up all host ITSes. */
-void gicv3_its_dt_init(const struct dt_device_node *node);
-
#ifdef CONFIG_ACPI
-void gicv3_its_acpi_init(void);
unsigned long gicv3_its_make_hwdom_madt(const struct domain *d,
void *base_ptr);
#endif
#else
-static inline void gicv3_its_dt_init(const struct dt_device_node *node)
-{
-}
-
#ifdef CONFIG_ACPI
-static inline void gicv3_its_acpi_init(void)
-{
-}
-
static inline unsigned long gicv3_its_make_hwdom_madt(const struct domain *d,
void *base_ptr)
{