Skip to content

Commit bdbe871

Browse files
jonhunterbrgl
authored andcommitted
gpio: tegra186: Don't set parent IRQ affinity
When hotplugging CPUs on Tegra186 and Tegra194 errors such as the following are seen ... IRQ63: set affinity failed(-22). IRQ65: set affinity failed(-22). IRQ66: set affinity failed(-22). IRQ67: set affinity failed(-22). Looking at the /proc/interrupts the above are all interrupts associated with GPIOs. The reason why these error messages occur is because there is no 'parent_data' associated with any of the GPIO interrupts and so tegra186_irq_set_affinity() simply returns -EINVAL. To understand why there is no 'parent_data' it is first necessary to understand that in addition to the GPIO interrupts being routed to the interrupt controller (GIC), the interrupts for some GPIOs are also routed to the Tegra Power Management Controller (PMC) to wake up the system from low power states. In order to configure GPIO events as wake events in the PMC, the PMC is configured as IRQ parent domain for the GPIO IRQ domain. Originally the GIC was the IRQ parent domain of the PMC and although this was working, this started causing issues once commit 64a267e ("irqchip/gic: Configure SGIs as standard interrupts") was added, because technically, the GIC is not a parent of the PMC. Commit c351ab7 ("soc/tegra: pmc: Don't create fake interrupt hierarchy levels") fixed this by severing the IRQ domain hierarchy for the Tegra GPIOs and hence, there may be no IRQ parent domain for the GPIOs. The GPIO controllers on Tegra186 and Tegra194 have either one or six interrupt lines to the interrupt controller. For GPIO controllers with six interrupts, the mapping of the GPIO interrupt to the controller interrupt is configurable within the GPIO controller. Currently a default mapping is used, however, it could be possible to use the set affinity callback for the Tegra186 GPIO driver to do something a bit more interesting. Currently, because interrupts for all GPIOs are have the same mapping and any attempts to configure the affinity for a given GPIO can conflict with another that shares the same IRQ, for now it is simpler to just remove set affinity support and this avoids the above warnings being seen. Cc: <[email protected]> Fixes: c4e1f7d ("gpio: tegra186: Set affinity callback to parent") Signed-off-by: Jon Hunter <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent a057947 commit bdbe871

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

drivers/gpio/gpio-tegra186.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -444,16 +444,6 @@ static int tegra186_irq_set_wake(struct irq_data *data, unsigned int on)
444444
return 0;
445445
}
446446

447-
static int tegra186_irq_set_affinity(struct irq_data *data,
448-
const struct cpumask *dest,
449-
bool force)
450-
{
451-
if (data->parent_data)
452-
return irq_chip_set_affinity_parent(data, dest, force);
453-
454-
return -EINVAL;
455-
}
456-
457447
static void tegra186_gpio_irq(struct irq_desc *desc)
458448
{
459449
struct tegra_gpio *gpio = irq_desc_get_handler_data(desc);
@@ -700,7 +690,6 @@ static int tegra186_gpio_probe(struct platform_device *pdev)
700690
gpio->intc.irq_unmask = tegra186_irq_unmask;
701691
gpio->intc.irq_set_type = tegra186_irq_set_type;
702692
gpio->intc.irq_set_wake = tegra186_irq_set_wake;
703-
gpio->intc.irq_set_affinity = tegra186_irq_set_affinity;
704693

705694
irq = &gpio->gpio.irq;
706695
irq->chip = &gpio->intc;

0 commit comments

Comments
 (0)