iommu: fix iommu_ops initialization

Commit 32a5ea00ec ("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>
This commit is contained in:
Juergen Gross authored and Jan Beulich committed 2019-02-12 11:54:07 +01:00
1 parent 09fc4de4a8
commit 88b92c3820
1 file changed
+2 -2
+2 -2
View File
@@ -893,12 +893,12 @@ int iommu_enable_x2apic_IR(void)
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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.