mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Add kernel 5.15 for RPI4 support
This commit is contained in:
parent
e961d478cd
commit
df88a19bbd
638 changed files with 239907 additions and 0 deletions
|
@ -0,0 +1,63 @@
|
|||
From d5fdbbc0de13fa9a40f02e1efb2a141bed7d7c26 Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.com>
|
||||
Date: Tue, 3 Nov 2020 11:49:53 +0000
|
||||
Subject: [PATCH 037/634] Revert "mailbox: avoid timer start from callback"
|
||||
|
||||
This reverts commit c7dacf5b0f32957b24ef29df1207dc2cd8307743.
|
||||
|
||||
The Pi 400 shutdown/poweroff mechanism relies on being able to set
|
||||
a GPIO on the expander in the pm_power_off handler, something that
|
||||
requires two mailbox calls - GET_GPIO_STATE and SET_GPIO_STATE. A
|
||||
recent kernel change introduces a reasonable possibility that the
|
||||
GET call doesn't completes, and bisecting led to a commit from
|
||||
October that changes the timer usage of the mailbox.
|
||||
|
||||
My theory is that there is a race condition in the new code that breaks
|
||||
the poll timer, but that it normally goes unnoticed because subsequent
|
||||
mailbox activity wakes it up again. The power-off mailbox calls happen
|
||||
at a time when other subsystems have been shut down, so if one of them
|
||||
fails then there is nothing to allow it to recover.
|
||||
|
||||
See: https://github.com/raspberrypi/linux/issues/3941
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
||||
---
|
||||
drivers/mailbox/mailbox.c | 12 +++++-------
|
||||
1 file changed, 5 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c
|
||||
index 3e7d4b20ab34..0b821a5b2db8 100644
|
||||
--- a/drivers/mailbox/mailbox.c
|
||||
+++ b/drivers/mailbox/mailbox.c
|
||||
@@ -82,12 +82,9 @@ static void msg_submit(struct mbox_chan *chan)
|
||||
exit:
|
||||
spin_unlock_irqrestore(&chan->lock, flags);
|
||||
|
||||
- /* kick start the timer immediately to avoid delays */
|
||||
- if (!err && (chan->txdone_method & TXDONE_BY_POLL)) {
|
||||
- /* but only if not already active */
|
||||
- if (!hrtimer_active(&chan->mbox->poll_hrt))
|
||||
- hrtimer_start(&chan->mbox->poll_hrt, 0, HRTIMER_MODE_REL);
|
||||
- }
|
||||
+ if (!err && (chan->txdone_method & TXDONE_BY_POLL))
|
||||
+ /* kick start the timer immediately to avoid delays */
|
||||
+ hrtimer_start(&chan->mbox->poll_hrt, 0, HRTIMER_MODE_REL);
|
||||
}
|
||||
|
||||
static void tx_tick(struct mbox_chan *chan, int r)
|
||||
@@ -125,10 +122,11 @@ static enum hrtimer_restart txdone_hrtimer(struct hrtimer *hrtimer)
|
||||
struct mbox_chan *chan = &mbox->chans[i];
|
||||
|
||||
if (chan->active_req && chan->cl) {
|
||||
- resched = true;
|
||||
txdone = chan->mbox->ops->last_tx_done(chan);
|
||||
if (txdone)
|
||||
tx_tick(chan, 0);
|
||||
+ else
|
||||
+ resched = true;
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.33.1
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue