Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 30 Jul 2014 23:41:32 +0200 (CEST) Received: from mail-we0-f170.google.com ([74.125.82.170]:64824 "EHLO mail-we0-f170.google.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S6860084AbaG3Vl3jXaCW (ORCPT ); Wed, 30 Jul 2014 23:41:29 +0200 Received: by mail-we0-f170.google.com with SMTP id w62so1881914wes.15 for ; Wed, 30 Jul 2014 14:41:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=CM2l41KvWNOUA9vWIdKumoBb0MyDuRflSHr1sY0fMaw=; b=HMhS8UHkH3xnvXGbqYJ1s1yuP0JAg8/2fz3R6fFWyUPKccKfuvdFByPxaA/DwMZ82y 25YINd5Iii0r+SR33nKd84jp6u9Wjic/xbNLvFC9uOHW2a8nZl5+kD5GVpFifuO8tDil EHceUdNvuGYaKrZ/jwtI6yzPQnBAmYRrvptaw+DUN9DikbTQtg3YgvQnKczP0CTAtpNo oTGUyCH7MV4ergfq6hne4jaxTaee4ZKwh9dy0tSL1nJe3tCNUrse6CDwrUPLyr46vUYG mCcUJWqlVmNkvu+fiUY6MJtGctk/NT99+Pz0DgWSCDFa6mnpjkjGu5zk8WtFg9jFCG9L k+cQ== X-Gm-Message-State: ALoCoQn1UIsgOaC+KHeqodbh4H+0dPB5BygngHjVtwTV+WUoS6torL6RA+YgX3ET4ZIrY0nBJDHz X-Received: by 10.194.91.228 with SMTP id ch4mr10196601wjb.59.1406756483867; Wed, 30 Jul 2014 14:41:23 -0700 (PDT) Received: from radagast.localnet (jahogan.plus.com. [212.159.75.221]) by mx.google.com with ESMTPSA id ca8sm8519790wjc.0.2014.07.30.14.41.21 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 30 Jul 2014 14:41:22 -0700 (PDT) From: James Hogan To: linux-mips@linux-mips.org Cc: Huacai Chen , Ralf Baechle , John Crispin , "Steven J. Hill" , Fuxin Zhang , Zhangjin Wu , Binbin Zhou , stable@vger.kernel.org, David Daney Subject: Re: [PATCH] MIPS: tlbex: fix a missing statement for HUGETLB Date: Wed, 30 Jul 2014 22:41:02 +0100 Message-ID: <2357839.vPXx615ci5@radagast> User-Agent: KMail/4.12.5 (Linux/3.15.6+; KDE/4.12.5; x86_64; ; ) In-Reply-To: <1406616880-17142-1-git-send-email-chenhc@lemote.com> References: <1406616880-17142-1-git-send-email-chenhc@lemote.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 41824 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: james@albanarts.com Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips Hi Huacai, On Tuesday 29 July 2014 14:54:40 Huacai Chen wrote: > In commit 2c8c53e28f1 (MIPS: Optimize TLB handlers for Octeon CPUs) > build_r4000_tlb_refill_handler() is modified. But it doesn't compatible > with the original code in HUGETLB case. Because there is a copy & paste > error and one line of code is missing. It is very easy to produce a bug > with LTP's hugemmap05 test. > > Signed-off-by: Huacai Chen > Signed-off-by: Binbin Zhou > Cc: > --- > arch/mips/mm/tlbex.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c > index e80e10b..343fe0f 100644 > --- a/arch/mips/mm/tlbex.c > +++ b/arch/mips/mm/tlbex.c > @@ -1299,6 +1299,7 @@ static void build_r4000_tlb_refill_handler(void) > } > #ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT > uasm_l_tlb_huge_update(&l, p); > + 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); build_huge_tlb_write_entry only uses K0 as a temp and clobbers without using the value, so the K0 must be being used by the code generated by build_huge_update_entires, but the patch you mentioned changed the second argument from K0 to htlb_info.huge_pte. So should the K0 in the new UASM_i_LW call be changed to htlb_info.huge_pte too? (David Daney on Cc) Thanks James