Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 593292df authored by Mitchel Humpherys's avatar Mitchel Humpherys Committed by Matt Wagantall
Browse files

iommu/arm-smmu: use a threaded handler for context interrupts



Context interrupts can call domain-specific handlers which might sleep.
Currently we register our handler with request_irq, so our handler is
called in atomic context, so domain handlers that sleep result in an
invalid context BUG.  Fix this by using request_threaded_irq.

This also prepares the way for doing things like enabling clocks within
our interrupt handler.

Change-Id: I2f12f2aa234b62532807a208cd70f2d705083343
Signed-off-by: default avatarMitchel Humpherys <mitchelh@codeaurora.org>
parent fe92d4be
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1144,7 +1144,8 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
	spin_unlock_irqrestore(&smmu_domain->lock, flags);

	irq = smmu->irqs[smmu->num_global_irqs + cfg->irptndx];
	ret = request_irq(irq, arm_smmu_context_fault, IRQF_SHARED,
	ret = request_threaded_irq(irq, NULL, arm_smmu_context_fault,
				IRQF_ONESHOT | IRQF_SHARED,
				"arm-smmu-context-fault", domain);
	if (IS_ERR_VALUE(ret)) {
		dev_err(smmu->dev, "failed to request context IRQ %d (%u)\n",