If the schedular doesn't run how did we get from 4 -> 5?
Maybe the issue is the shutdown handler here is running in the wrong
time and it should not be running after the scheduler has been shut
down.
I don't think removing the lock is a great idea without more
explanation.
Seems it is not so simple job to explain why there is no race window between
this iommu_shutdown() and following dmar_global_lock holders.
1. PCIe hotplug dmar_pci_bus_notifier()
2. mm_core_init detect_intel_iommu()
3. late_initcall dmar_free_unused_resources()
4. acpi attach dmar_device_hotplug()
5. pci_iommu_init intel_iommu_init() init_dmars()
6. rootfs_initcall ir_dev_scope_init()
though here is the last stage of reboot. then how about we turn back to v1
Just repalce with own_write() with down_write_trylock().