diff options
author | 2019-02-24 22:21:23 -0800 | |
---|---|---|
committer | 2019-02-24 22:21:23 -0800 | |
commit | 169431ed16a3d275c403c85a26fc788187e6d09e (patch) | |
tree | aee18de53cd077094d7451ce8788320198460b6b | |
parent | ip_tunnel: Add dst_cache support in lwtunnel_state of ip tunnel (diff) | |
parent | net: dsa: mv88e6xxx: Release lock while requesting IRQ (diff) | |
download | linux-dev-169431ed16a3d275c403c85a26fc788187e6d09e.tar.xz linux-dev-169431ed16a3d275c403c85a26fc788187e6d09e.zip |
Merge branch 'dsa-mv88e6xxx-lockdep'
Andrew Lunn says:
====================
mv88e6xxx: Avoid false positive Lockdep splats
When acquiring the GPIO interrupt line for the switch, it is possible
to trigger lockdep splats. These are false positives, the mutex is in
a different IRQ descriptor. But fix it anyway, since it could mask
real locking issues.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/chip.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 3f9a3fc52a0e..d30336f259ce 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -442,16 +442,26 @@ out_mapping: static int mv88e6xxx_g1_irq_setup(struct mv88e6xxx_chip *chip) { + static struct lock_class_key lock_key; + static struct lock_class_key request_key; int err; err = mv88e6xxx_g1_irq_setup_common(chip); if (err) return err; + /* These lock classes tells lockdep that global 1 irqs are in + * a different category than their parent GPIO, so it won't + * report false recursion. + */ + irq_set_lockdep_class(chip->irq, &lock_key, &request_key); + + mutex_unlock(&chip->reg_lock); err = request_threaded_irq(chip->irq, NULL, mv88e6xxx_g1_irq_thread_fn, IRQF_ONESHOT | IRQF_SHARED, dev_name(chip->dev), chip); + mutex_lock(&chip->reg_lock); if (err) mv88e6xxx_g1_irq_free_common(chip); |