From: James Hogan <james.hogan@imgtec.com>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: David Daney <ddaney@caviumnetworks.com>,
Huacai Chen <chenhc@lemote.com>,
James Hogan <james@albanarts.com>,
Linux MIPS Mailing List <linux-mips@linux-mips.org>,
Ralf Baechle <ralf@linux-mips.org>,
John Crispin <john@phrozen.org>,
"Steven J. Hill" <Steven.Hill@imgtec.com>,
Fuxin Zhang <zhangfx@lemote.com>,
Zhangjin Wu <wuzhangjin@gmail.com>,
Binbin Zhou <zhoubb@lemote.com>, stable <stable@vger.kernel.org>
Subject: Re: [PATCH] MIPS: tlbex: fix a missing statement for HUGETLB
Date: Mon, 4 Aug 2014 14:10:35 +0100 [thread overview]
Message-ID: <53DF864B.6000702@imgtec.com> (raw)
In-Reply-To: <20140804130506.GA27352@hall.aurel32.net>
On 04/08/14 14:05, Aurelien Jarno wrote:
> On Mon, Aug 04, 2014 at 11:08:50AM +0100, James Hogan wrote:
>> Hi Aurelien,
>>
>> On 02/08/14 22:35, Aurelien Jarno wrote:
>>> On Thu, Jul 31, 2014 at 10:33:55AM -0700, David Daney wrote:
>>>> diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
>>>> index f99ec587..341add1 100644
>>>> --- a/arch/mips/mm/tlbex.c
>>>> +++ b/arch/mips/mm/tlbex.c
>>>> @@ -1299,6 +1299,8 @@ static void build_r4000_tlb_refill_handler(void)
>>>> }
>>>> #ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT
>>>> uasm_l_tlb_huge_update(&l, p);
>>>> + if (!use_bbit_insns())
>>>> + UASM_i_LW(&p, K0, 0, K1);
>>>> build_huge_update_entries(&p, htlb_info.huge_pte, K1);
>>>> build_huge_tlb_write_entry(&p, &l, &r, K0, tlb_random,
>>>> htlb_info.restore_scratch);
>>>
>>> This patch fixes the issue, thanks. That said it doesn't look fully
>>> correct. The test should be done the same way as for
>>> build_fast_tlb_refill_handler. For example the fast handler is not
>>> called on a 32-bit machine with bbit instructions, so it would need
>>> to reload K0.
>>
>> In the non fast case build_is_huge_pte() will still use bbit1 if
>> available after restoring K0, and I don't think the bbit1 would clobber
>> K0 when the branch is taken, so I think the test for !use_bbit_insns()
>> is correct.
>>
> Oh you are right! Therefore this second patch is:
>
> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Likewise:
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Cheers
James
> Tested-by: Aurelien Jarno <aurelien@aurel32.net>
>
next prev parent reply other threads:[~2014-08-04 13:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-29 6:54 [PATCH] MIPS: tlbex: fix a missing statement for HUGETLB Huacai Chen
2014-07-29 6:54 ` Huacai Chen
2014-07-30 16:37 ` Aurelien Jarno
2014-07-30 21:41 ` James Hogan
2014-07-30 21:44 ` David Daney
2014-07-30 21:44 ` David Daney
2014-07-31 0:48 ` Huacai Chen
2014-07-31 1:13 ` David Daney
2014-07-31 11:54 ` James Hogan
2014-07-31 17:33 ` David Daney
2014-08-02 21:35 ` Aurelien Jarno
2014-08-04 10:08 ` James Hogan
2014-08-04 13:05 ` Aurelien Jarno
2014-08-04 13:10 ` James Hogan [this message]
2014-08-05 7:09 ` Huacai Chen
2014-08-06 16:27 ` Ralf Baechle
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=53DF864B.6000702@imgtec.com \
--to=james.hogan@imgtec.com \
--cc=Steven.Hill@imgtec.com \
--cc=aurelien@aurel32.net \
--cc=chenhc@lemote.com \
--cc=ddaney@caviumnetworks.com \
--cc=james@albanarts.com \
--cc=john@phrozen.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=stable@vger.kernel.org \
--cc=wuzhangjin@gmail.com \
--cc=zhangfx@lemote.com \
--cc=zhoubb@lemote.com \
/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