Quoting Linus Walleij (2020-03-06 04:12:21) > In the commit setting up the qcom/msm pin controller to > be hierarchical some callbacks were careful to check that > d->parent_data on irq_data was valid before calling the > parent function, however irq_chip_eoi_parent() was called > unconditionally which doesn't work with elder Qualcomm > platforms such as APQ8060. > > When the drivers/mfd/qcom-pm8xxx.c driver calls > chained_irq_exit() that call will in turn call chip->irq_eoi() > which is set to irq_chip_eoi_parent() by default on a > hierachical IRQ chip, and the parent is pinctrl-msm.c > so that will in turn unconditionally call > irq_chip_eoi_parent() again, but its parent is invalid > so we get the following crash: > > Unnable to handle kernel NULL pointer dereference at > virtual address 00000010 > pgd = (ptrval) > [00000010] *pgd=00000000 > Internal error: Oops: 5 [#1] PREEMPT SMP ARM > (...) > PC is at irq_chip_eoi_parent+0x4/0x10 > LR is at pm8xxx_irq_handler+0x1b4/0x2d8 > > Implement a local stub just avoiding to call down to > irq_chip_eoi_parent() if d->parent_data is not set. > > Cc: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx> > Cc: Lina Iyer <ilina@xxxxxxxxxxxxxx> > Cc: Marc Zyngier <maz@xxxxxxxxxx> > Cc: Stephen Boyd <swboyd@xxxxxxxxxxxx> > Cc: stable@xxxxxxxxxxxxxxx > Fixes: e35a6ae0eb3a ("pinctrl/msm: Setup GPIO chip in hierarchy") > Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx> > --- Reviewed-by: Stephen Boyd <swboyd@xxxxxxxxxxxx>