All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@denx.de>
To: Chris.Paterson2@renesas.com, ben.hutchings@codethink.co.uk,
	cip-dev@lists.cip-project.org
Subject: [cip-dev] 4.4-rt: Need testing on arm32
Date: Sun, 29 Mar 2020 12:57:52 +0200	[thread overview]
Message-ID: <20200329105752.GA8804@duo.ucw.cz> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 2430 bytes --]

Hi!

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,
								Pavel

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:
    
    https://lava.ciplatform.org/scheduler/job/13037
    
    [    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;
 
-	if (IS_ENABLED(CONFIG_PREEMPT_RT_FULL) && !(work->flags & IRQ_WORK_HARD_IRQ))
+	if ((IS_ENABLED(CONFIG_PREEMPT_RT_FULL) && !(work->flags & IRQ_WORK_HARD_IRQ))
+	    || (work->flags & IRQ_WORK_LAZY))
 		list = &per_cpu(lazy_list, cpu);
 	else
 		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

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
cip-dev mailing list
cip-dev@lists.cip-project.org
https://lists.cip-project.org/mailman/listinfo/cip-dev

             reply	other threads:[~2020-03-29 10:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-29 10:57 Pavel Machek [this message]
2020-03-29 17:57 ` [cip-dev] 4.4-rt: Need testing on arm32 Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200329105752.GA8804@duo.ucw.cz \
    --to=pavel@denx.de \
    --cc=Chris.Paterson2@renesas.com \
    --cc=ben.hutchings@codethink.co.uk \
    --cc=cip-dev@lists.cip-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.