2021-08-02 18:21:33

by Gabriel C

[permalink] [raw]
Subject: [pinctrl-amd] 5.14-rcX, d62bd5ce12d79bcd6a6c3e4381daa7375dc21158 breaks poweroff/shutdown on ThinkPads

Hello,

while doing S0ix testing on my P14s gen1 AMD I noticed the machine won't
poweroff/shutdown anymore starting with 5.14-rc1,

it just reboots. The machine set to S3 in BIOS works as expected.

I haveĀ  confirmed the T14/T14s/X13 AMD gen1 models have the same problem
so I've run a bisect.


crazy@ThinkPad-P14s:~/Work/kernel/git/linux$ git bisect log
git bisect start
# bad: [e73f0f0ee7541171d89f2e2491130c7771ba58d3] Linux 5.14-rc1
git bisect bad e73f0f0ee7541171d89f2e2491130c7771ba58d3
# good: [62fb9874f5da54fdb243003b386128037319b219] Linux 5.13
git bisect good 62fb9874f5da54fdb243003b386128037319b219
# good: [e058a84bfddc42ba356a2316f2cf1141974625c9] Merge tag
'drm-next-2021-07-01' of git://anongit.freedesktop.org/drm/drm
git bisect good e058a84bfddc42ba356a2316f2cf1141974625c9
# bad: [eed0218e8cae9fcd186c30e9fcf5fe46a87e056e] Merge tag
'char-misc-5.14-rc1' of
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
git bisect bad eed0218e8cae9fcd186c30e9fcf5fe46a87e056e
# bad: [bd31b9efbf549d9630bf2f269a3a56dcb29fcac1] Merge tag 'scsi-misc'
of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
git bisect bad bd31b9efbf549d9630bf2f269a3a56dcb29fcac1
# bad: [406254918b232db198ed60f5bf1f8b84d96bca00] Merge tag
'perf-tools-for-v5.14-2021-07-01' of
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
git bisect bad 406254918b232db198ed60f5bf1f8b84d96bca00
# good: [e04360a2ea01bf42aa639b65aad81f502e896c7f] Merge tag 'for-linus'
of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
git bisect good e04360a2ea01bf42aa639b65aad81f502e896c7f
# good: [b869d5be0acf0e125e69adcffdca04000dc5b17c] ipc/util.c: use
binary search for max_idx
git bisect good b869d5be0acf0e125e69adcffdca04000dc5b17c
# good: [6495e762522d4cf73d0b339830091799881eb025] perf dlfilter: Add
attr() to perf_dlfilter_fns
git bisect good 6495e762522d4cf73d0b339830091799881eb025
# bad: [a32b344e6f4375c5bdc3e89d0997b7eae187a3b1] Merge tag
'pinctrl-v5.14-1' of
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
git bisect bad a32b344e6f4375c5bdc3e89d0997b7eae187a3b1
# bad: [897120d41e7afd9da435cb00041a142aeeb53c07] pinctrl: mcp23s08: fix
race condition in irq handler
git bisect bad 897120d41e7afd9da435cb00041a142aeeb53c07
# bad: [8b4c397d88d97d4fd9c3f3527aa66688b1a3387a] dt-bindings: pinctrl:
mt65xx: add mt8365 SoC binding
git bisect bad 8b4c397d88d97d4fd9c3f3527aa66688b1a3387a
# bad: [ef9385fbf30e9484e4291db76e000b8961419782] pinctrl: iproc-gpio:
Remove redundant error printing in iproc_gpio_probe()
git bisect bad ef9385fbf30e9484e4291db76e000b8961419782
# bad: [969ef42b1ae094da99b8acbf14864f94d37f6e58] pinctrl: qcom:
spmi-mpp: Add compatible for pmi8994
git bisect bad 969ef42b1ae094da99b8acbf14864f94d37f6e58
# bad: [d62bd5ce12d79bcd6a6c3e4381daa7375dc21158] pinctrl: amd:
Implement irq_set_wake
git bisect bad d62bd5ce12d79bcd6a6c3e4381daa7375dc21158
# good: [ac5f8197d15cf37d7ae37ff5b6438abe6c8509a6] dt-bindings: pinctrl:
convert Broadcom Northstar to the json-schema
git bisect good ac5f8197d15cf37d7ae37ff5b6438abe6c8509a6
# first bad commit: [d62bd5ce12d79bcd6a6c3e4381daa7375dc21158] pinctrl:
amd: Implement irq_set_wake


Reverting d62bd5ce12d79bcd6a6c3e4381daa7375dc21158 fixes the problem.


Best Regards,


Gabriel C.



2021-08-04 22:58:55

by Gabriel C

[permalink] [raw]
Subject: Re: [pinctrl-amd] 5.14-rcX, d62bd5ce12d79bcd6a6c3e4381daa7375dc21158 breaks poweroff/shutdown on ThinkPads

Adding gpio list to CC


Am Mo., 2. Aug. 2021 um 20:18 Uhr schrieb Gabriel C <[email protected]>:
>
> Hello,
>
> while doing S0ix testing on my P14s gen1 AMD I noticed the machine won't
> poweroff/shutdown anymore starting with 5.14-rc1,
>
> it just reboots. The machine set to S3 in BIOS works as expected.
>
> I have confirmed the T14/T14s/X13 AMD gen1 models have the same problem
> so I've run a bisect.
>
>
> crazy@ThinkPad-P14s:~/Work/kernel/git/linux$ git bisect log
> git bisect start
> # bad: [e73f0f0ee7541171d89f2e2491130c7771ba58d3] Linux 5.14-rc1
> git bisect bad e73f0f0ee7541171d89f2e2491130c7771ba58d3
> # good: [62fb9874f5da54fdb243003b386128037319b219] Linux 5.13
> git bisect good 62fb9874f5da54fdb243003b386128037319b219
> # good: [e058a84bfddc42ba356a2316f2cf1141974625c9] Merge tag
> 'drm-next-2021-07-01' of git://anongit.freedesktop.org/drm/drm
> git bisect good e058a84bfddc42ba356a2316f2cf1141974625c9
> # bad: [eed0218e8cae9fcd186c30e9fcf5fe46a87e056e] Merge tag
> 'char-misc-5.14-rc1' of
> git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
> git bisect bad eed0218e8cae9fcd186c30e9fcf5fe46a87e056e
> # bad: [bd31b9efbf549d9630bf2f269a3a56dcb29fcac1] Merge tag 'scsi-misc'
> of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
> git bisect bad bd31b9efbf549d9630bf2f269a3a56dcb29fcac1
> # bad: [406254918b232db198ed60f5bf1f8b84d96bca00] Merge tag
> 'perf-tools-for-v5.14-2021-07-01' of
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
> git bisect bad 406254918b232db198ed60f5bf1f8b84d96bca00
> # good: [e04360a2ea01bf42aa639b65aad81f502e896c7f] Merge tag 'for-linus'
> of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
> git bisect good e04360a2ea01bf42aa639b65aad81f502e896c7f
> # good: [b869d5be0acf0e125e69adcffdca04000dc5b17c] ipc/util.c: use
> binary search for max_idx
> git bisect good b869d5be0acf0e125e69adcffdca04000dc5b17c
> # good: [6495e762522d4cf73d0b339830091799881eb025] perf dlfilter: Add
> attr() to perf_dlfilter_fns
> git bisect good 6495e762522d4cf73d0b339830091799881eb025
> # bad: [a32b344e6f4375c5bdc3e89d0997b7eae187a3b1] Merge tag
> 'pinctrl-v5.14-1' of
> git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
> git bisect bad a32b344e6f4375c5bdc3e89d0997b7eae187a3b1
> # bad: [897120d41e7afd9da435cb00041a142aeeb53c07] pinctrl: mcp23s08: fix
> race condition in irq handler
> git bisect bad 897120d41e7afd9da435cb00041a142aeeb53c07
> # bad: [8b4c397d88d97d4fd9c3f3527aa66688b1a3387a] dt-bindings: pinctrl:
> mt65xx: add mt8365 SoC binding
> git bisect bad 8b4c397d88d97d4fd9c3f3527aa66688b1a3387a
> # bad: [ef9385fbf30e9484e4291db76e000b8961419782] pinctrl: iproc-gpio:
> Remove redundant error printing in iproc_gpio_probe()
> git bisect bad ef9385fbf30e9484e4291db76e000b8961419782
> # bad: [969ef42b1ae094da99b8acbf14864f94d37f6e58] pinctrl: qcom:
> spmi-mpp: Add compatible for pmi8994
> git bisect bad 969ef42b1ae094da99b8acbf14864f94d37f6e58
> # bad: [d62bd5ce12d79bcd6a6c3e4381daa7375dc21158] pinctrl: amd:
> Implement irq_set_wake
> git bisect bad d62bd5ce12d79bcd6a6c3e4381daa7375dc21158
> # good: [ac5f8197d15cf37d7ae37ff5b6438abe6c8509a6] dt-bindings: pinctrl:
> convert Broadcom Northstar to the json-schema
> git bisect good ac5f8197d15cf37d7ae37ff5b6438abe6c8509a6
> # first bad commit: [d62bd5ce12d79bcd6a6c3e4381daa7375dc21158] pinctrl:
> amd: Implement irq_set_wake
>
>
> Reverting d62bd5ce12d79bcd6a6c3e4381daa7375dc21158 fixes the problem.
>
>
> Best Regards,
>
>
> Gabriel C.
>

2021-08-11 12:51:31

by Linus Walleij

[permalink] [raw]
Subject: Re: [pinctrl-amd] 5.14-rcX, d62bd5ce12d79bcd6a6c3e4381daa7375dc21158 breaks poweroff/shutdown on ThinkPads

Hi Gabriel,

On Mon, Aug 2, 2021 at 8:18 PM Gabriel C <[email protected]> wrote:

> Reverting d62bd5ce12d79bcd6a6c3e4381daa7375dc21158 fixes the problem.

Maintenance of the AMD pin controller is a constant headache for me.
The chromium people step in I think out of necessity, I bet there is
some interesting discussions between Google and AMD about this.

I don't know if Raul if unavailable, let's check with Doug Anderson, I
am sure he knows how to raise awareness about this at Chromium
if Raul is off duty.

If the problem persists, please send a proper revert patch.

Yours,
Linus Walleij

2021-08-11 12:56:50

by Gabriel C

[permalink] [raw]
Subject: Re: [pinctrl-amd] 5.14-rcX, d62bd5ce12d79bcd6a6c3e4381daa7375dc21158 breaks poweroff/shutdown on ThinkPads

Am Mi., 11. Aug. 2021 um 14:46 Uhr schrieb Linus Walleij
<[email protected]>:
>
> Hi Gabriel,
>

Hi Linus,

> On Mon, Aug 2, 2021 at 8:18 PM Gabriel C <[email protected]> wrote:
>
> > Reverting d62bd5ce12d79bcd6a6c3e4381daa7375dc21158 fixes the problem.
>
> Maintenance of the AMD pin controller is a constant headache for me.
> The chromium people step in I think out of necessity, I bet there is
> some interesting discussions between Google and AMD about this.


AMD people fixed it, see :

https://lore.kernel.org/linux-gpio/[email protected]/

I tested the fix and can confirm is working fine.


> Yours,
> Linus Walleij

Best Regards,

Gabriel C