Skip to content

Commit b608fe3

Browse files
KAGA-KOKOingomolnar
authored andcommitted
iommu/vt-d: Adjust system_state checks
To enable smp_processor_id() and might_sleep() debug checks earlier, it's required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING. Adjust the system_state checks in dmar_parse_one_atsr() and dmar_iommu_notify_scope_dev() to handle the extra states. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Joerg Roedel <joro@8bytes.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: iommu@lists.linux-foundation.org Link: http://lkml.kernel.org/r/20170516184735.712365947@linutronix.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent d04e31a commit b608fe3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/iommu/intel-iommu.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4315,7 +4315,7 @@ int dmar_parse_one_atsr(struct acpi_dmar_header *hdr, void *arg)
43154315
struct acpi_dmar_atsr *atsr;
43164316
struct dmar_atsr_unit *atsru;
43174317

4318-
if (system_state != SYSTEM_BOOTING && !intel_iommu_enabled)
4318+
if (system_state >= SYSTEM_RUNNING && !intel_iommu_enabled)
43194319
return 0;
43204320

43214321
atsr = container_of(hdr, struct acpi_dmar_atsr, header);
@@ -4565,7 +4565,7 @@ int dmar_iommu_notify_scope_dev(struct dmar_pci_notify_info *info)
45654565
struct acpi_dmar_atsr *atsr;
45664566
struct acpi_dmar_reserved_memory *rmrr;
45674567

4568-
if (!intel_iommu_enabled && system_state != SYSTEM_BOOTING)
4568+
if (!intel_iommu_enabled && system_state >= SYSTEM_RUNNING)
45694569
return 0;
45704570

45714571
list_for_each_entry(rmrru, &dmar_rmrr_units, list) {

0 commit comments

Comments
 (0)