From: David Hildenbrand <dahi@linux.vnet.ibm.com>
To: linux-sh@vger.kernel.org
Subject: Re: sh7724 regression: commit 8222dbe21e79338de92d5e1956cd1e3994cc9f93
Date: Mon, 29 Feb 2016 08:24:41 +0000 [thread overview]
Message-ID: <20160229092441.2e999f8d@thinkpad-w530> (raw)
In-Reply-To: <CAMuHMdWR0RZhGrX4qW+fHwOYxAXffNinUdhrL=SZsMn5BUKoeA@mail.gmail.com>
> On 02/27/2016 03:28 PM, John Paul Adrian Glaubitz wrote:
> > Hi Hans!
> >
> > On 02/27/2016 03:20 PM, Geert Uytterhoeven wrote:
> >>> I noticed that 4.1 was ok and v4.2 wasn't, so I did a git bisect and ended up with
> >>> commit 8222dbe21e79338de92d5e1956cd1e3994cc9f93 (sched/preempt, mm/fault: Decouple
> >>> preemption from the page fault logic) as the culprit.
> >
> > If you like, please report this the kernel bug tracker and set
> > "Hardware" to "SuperH". This way we are able to keep track of
> > the issue.
> >
> > I think Yoshinori Sato and Rich Felker will have a look at this.
> >
> > Adrian
> >
>
> Done: https://bugzilla.kernel.org/show_bug.cgi?id\x113321
>
> Regards,
>
> Hans
>
Looks like the code then requires to not be allowed to sleep/preempt in these
sections (just like kmap_atomic, or kmap_coherent on mips).
So the fix should be simple as (untested):
From d29f0d0cb670175c688cdd181c7a693d28b27a33 Mon Sep 17 00:00:00 2001
From: David Hildenbrand <dahi@linux.vnet.ibm.com>
Date: Mon, 29 Feb 2016 09:19:24 +0100
Subject: [PATCH] sched/preempt, sh: kmap_coherent relies on disabled
preemption
kmap_coherent needs disabled preemption to not schedule in the critical
section, just like kmap_coherent on mips and kmap_atomic in general.
Fixes: 8222dbe21e79 "sched/preempt, mm/fault: Decouple preemption from the page fault logic"
Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
---
arch/sh/mm/kmap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/sh/mm/kmap.c b/arch/sh/mm/kmap.c
index ec29e14..bf25d7c 100644
--- a/arch/sh/mm/kmap.c
+++ b/arch/sh/mm/kmap.c
@@ -36,6 +36,7 @@ void *kmap_coherent(struct page *page, unsigned long addr)
BUG_ON(!test_bit(PG_dcache_clean, &page->flags));
+ preempt_disable();
pagefault_disable();
idx = FIX_CMAP_END -
@@ -64,4 +65,5 @@ void kunmap_coherent(void *kvaddr)
}
pagefault_enable();
+ preempt_enable();
}
--
2.3.9
David
next prev parent reply other threads:[~2016-02-29 8:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-27 14:20 sh7724 regression: commit 8222dbe21e79338de92d5e1956cd1e3994cc9f93 Geert Uytterhoeven
2016-02-27 14:28 ` John Paul Adrian Glaubitz
2016-02-27 14:33 ` Hans Verkuil
2016-02-29 8:24 ` David Hildenbrand [this message]
2016-02-29 9:01 ` Hans Verkuil
2016-02-29 11:03 ` David Hildenbrand
2016-03-02 0:20 ` Simon Horman
2016-03-11 11:06 ` David Hildenbrand
2016-03-13 19:08 ` Rich Felker
2016-03-17 0:35 ` Rich Felker
2016-03-17 17:38 ` Rich Felker
2016-03-29 6:33 ` David Hildenbrand
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=20160229092441.2e999f8d@thinkpad-w530 \
--to=dahi@linux.vnet.ibm.com \
--cc=linux-sh@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).