void cf_check amd_iommu_ioapic_update_ire(
unsigned int apic, unsigned int pin, uint64_t rte)
{
- struct IO_APIC_route_entry old_rte;
- struct IO_APIC_route_entry new_rte = { .raw = rte };
+ struct IO_APIC_route_entry old_rte, new_rte;
int seg, bdf, rc;
struct amd_iommu *iommu;
unsigned int idx;
if ( idx == MAX_IO_APICS )
return;
+ /* Not the initializer, for old gcc to cope. */
+ new_rte.raw = rte;
+
/* get device id of ioapic devices */
bdf = ioapic_sbdf[idx].bdf;
seg = ioapic_sbdf[idx].seg;
void cf_check io_apic_write_remap_rte(
unsigned int apic, unsigned int pin, uint64_t rte)
{
- struct IO_xAPIC_route_entry new_rte = { .raw = rte };
- struct IO_xAPIC_route_entry old_rte = { };
+ struct IO_xAPIC_route_entry old_rte = {}, new_rte;
struct vtd_iommu *iommu = ioapic_to_iommu(IO_APIC_ID(apic));
bool masked = true;
int rc;
}
}
+ /* Not the initializer, for old gcc to cope. */
+ new_rte.raw = rte;
+
rc = ioapic_rte_to_remap_entry(iommu, apic, pin, &old_rte, new_rte);
if ( rc )
{