4.4-rt: Need testing on arm32

Pavel Machek


I tried to prepare next 4.4-rt release. I have code ready, but while
running tests I realized that only two targets are used to run them.

We 4.19-rt has known bugs breaking boot on de0-nano (and probably
other) boards, and according to code inspection, same bug is present
in 4.4-rt. Fix is not complex, but I'm not comfortable applying it
without _any_ testing.

If I'm right, 4.4-rt should be broken on socfpga boards (arm32) in
non-realtime configuration; it should panic on boot in cca 50% of
cases. Patch below should fix it.

Best regards,

commit 20124aef8572b764ffd90d836253153102c763c5
Author: Pavel Machek <pavel@ucw.cz>
Date: Sat Mar 21 22:58:43 2020 +0100

With -rt tree but prempt-rt not enabled, de0-nano was getting failures
during boot, such as this:


[ 6.813352] Freeing unused kernel memory: 1024K
[ 6.817927] Unable to handle kernel paging request at virtual address e7fddef0
[ 6.825121] pgd = (ptrval)
[ 6.827816] [e7fddef0] *pgd=27e1141e(bad)
[ 6.831818] Internal error: Oops: 8000000d [#1] SMP ARM
[ 6.837019] Modules linked in:
[ 6.840067] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.19.106-cip21-gc82fe0af5 #1
[ 6.847601] Hardware name: Altera SOCFPGA
[ 6.851596] PC is at 0xe7fddef0
[ 6.854733] LR is at irq_work_run_list+0x84/0xc0

Bisect revealed fc9f4631a290 is the problematic commit, and some code
auditing revealed that it is working with wrong list. Fix it.

Signed-off-by: Pavel Machek <pavel@denx.de>
Fixes: fc9f4631a290 ("irqwork: push most work into softirq context")

diff --git a/kernel/irq_work.c b/kernel/irq_work.c
index 2899ba0d23d1..19896e6f1b2a 100644
--- a/kernel/irq_work.c
+++ b/kernel/irq_work.c
@@ -78,7 +78,8 @@ bool irq_work_queue_on(struct irq_work *work, int cpu)
if (!irq_work_claim(work))
return false;

+ || (work->flags & IRQ_WORK_LAZY))
list = &per_cpu(lazy_list, cpu);
list = &per_cpu(raised_list, cpu);

(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Join cip-dev@lists.cip-project.org to automatically receive all group messages.