Commit
32a5ea00ec75ef53e ("IOMMU/x86: remove indirection from certain
IOMMU hook accesses") introduced iommu_ops initialized at boot time
with data declared as __initconstrel.
On Intel systems there is another path where iommu_ops is initialized
and this path is relevant on resume after returning from system suspend.
As the initialization data is no longer accessible in this case that
second initialization must be dropped in case the system isn't just
booting.
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
if ( !platform_supports_x2apic() )
return -ENXIO;
+
+ iommu_ops = intel_iommu_ops;
}
else if ( !x2apic_enabled )
return -EOPNOTSUPP;
- iommu_ops = intel_iommu_ops;
-
for_each_drhd_unit ( drhd )
{
iommu = drhd->iommu;