From: Yang Shi <yang.shi@windriver.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: <tglx@linutronix.de>, <rostedt@goodmis.org>,
<linux-rt-users@vger.kernel.org>, <paul.gortmaker@windriver.com>
Subject: Re: [PATCH v3.14-rt] mips: rt: Replace pagefault_* to raw version
Date: Tue, 17 Feb 2015 13:40:01 -0800 [thread overview]
Message-ID: <54E3B531.8050600@windriver.com> (raw)
In-Reply-To: <20150217135404.GM26177@linutronix.de>
On 2/17/2015 5:54 AM, Sebastian Andrzej Siewior wrote:
> * Yang Shi | 2014-11-06 15:45:27 [-0800]:
>
>> In k{un}map_coherent, pagefault_disable and pagefault_enable are called
>> respectively, but k{un}map_coherent needs preempt disabled according to
>> commit f8829caee311207afbc882794bdc5aa0db5caf33 ("[MIPS] Fix aliasing bug
>> in copy_to_user_page / copy_from_user_page") to avoid dcache alias on COW.
>>
>> k{un}map_coherent are just called when cpu_has_dc_aliases == 1 with VIPT cache.
>> However, actually, the most modern MIPS processors have PIPT dcache without
>> dcache alias issue. In such case, k{un}map_atomic will be called with preempt
>> enabled.
>>
>> To fix this, we replace pagefault_* to raw version in k{un}map_coherent, which
>> disables preempt, otherwise the following kernel panic may be caught:
> And this works? One thing that confuses me is that you talk about kmap()
> while there is no HIGHMEM support in MIPS. The other thing is that I had
> a longson a while ago and I don't remember this. But it could have no
> dcache alias problem :)
Yes, it works. I found it on mips64 target.
>
> Your registers look 64bit wide so this highpage thingy is probably
> just to deal with the dcache alias. So if this is the only problem you
> have I would be happy to take your patch. Could you please rebase it
> against v3.18? The code changed slightly and I would not want to touch
> and break it :)
Yes, the highpage is just used for dealing with MIPS dcache alias issue.
I'm going to rebase it onto 3.18.
Thanks,
Yang
>
> Sebastian
prev parent reply other threads:[~2015-02-17 21:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-06 23:45 [PATCH v3.14-rt] mips: rt: Replace pagefault_* to raw version Yang Shi
2015-02-17 13:54 ` Sebastian Andrzej Siewior
2015-02-17 21:40 ` Yang Shi [this message]
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=54E3B531.8050600@windriver.com \
--to=yang.shi@windriver.com \
--cc=bigeasy@linutronix.de \
--cc=linux-rt-users@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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).