)]}'
{
  "commit": "f779faba6a1cd3285ef9d30e0fa2ca903dea4de7",
  "tree": "a43e6a19cd72c4c95dfd0db64c8583c1748d4286",
  "parents": [
    "682102eabe8ea42e6c03786575c464e27b7c00c3"
  ],
  "author": {
    "name": "Mark Brown",
    "email": "broonie@kernel.org",
    "time": "Thu Jul 31 18:32:17 2025 +0100"
  },
  "committer": {
    "name": "Mark Brown",
    "email": "broonie@kernel.org",
    "time": "Thu Jul 31 18:32:17 2025 +0100"
  },
  "message": "regmap: irq: Avoid lockdep warnings with nested regmap-irq chips\n\nWhile handling interrupts through regmap-irq we use a mutex to protect the\nupdates we are caching while genirq runs in atomic context. Russell King\nreported that while running on the nVidia Jetson Xavier NX this generates\nlockdep warnings since that platform has a regmap-irq for the max77686 RTC\nwhich is a child of a max77620 which also uses regmap-irq.\n\n[   46.723127] rtcwake/3984 is trying to acquire lock:\n[   46.723235] ffff0000813b2c68 (\u0026d-\u003elock){+.+.}-{4:4}, at: regmap_irq_lock+0x18/0x24\n[   46.723452]\n               but task is already holding lock:\n[   46.723556] ffff00008504dc68 (\u0026d-\u003elock){+.+.}-{4:4}, at: regmap_irq_lock+0x18/0x24\n\nThis happens because by default lockdep uses a single lockdep class for all\nmutexes initialised from a single mutex_init() call and is unable to tell\nthat two distinct mutex are being taken and verify that the ordering of\noperations is safe. This should be a very rare situation since normally\nanything using regmap-irq will be a leaf interrupt controller due to being\non a slow bus like I2C.\n\nWe can avoid these warnings by providing the lockdep key for the regmap-irq\nexplicitly, allocating one for each chip so that lockdep can distinguish\nbetween them.\n\nThanks to Russell for the report and analysis.\n\nReported-by: \"Russell King (Oracle)\" \u003clinux@armlinux.org.uk\u003e\nSigned-off-by: Mark Brown \u003cbroonie@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4aac12d38215f12353cba7f201e176c11bff36c0",
      "old_mode": 33188,
      "old_path": "drivers/base/regmap/regmap-irq.c",
      "new_id": "6112d942499be267214b1aa835410c879aecffa0",
      "new_mode": 33188,
      "new_path": "drivers/base/regmap/regmap-irq.c"
    }
  ]
}
