From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 488B2C48BE8 for ; Tue, 15 Jun 2021 14:02:12 +0000 (UTC) Received: from bombadil.infradead.org (unknown [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 099EE61477 for ; Tue, 15 Jun 2021 14:02:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 099EE61477 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6EXAFkwrlHl9CoVBFX7eXgZH4ozisyK00CfhLimpIkw=; b=Wa07RL8y/W/aaP 4+X1oT0Qz5LvlIYz2ksE2KHt6agnLPIh5w2vf7EkJGAtUiX6eM2GZE51WTnqrqwCnZTQuy0bOVDCk OfBFdcsPdvx/JhB8wK0tsHCKXWzpVaU0s4VT1wVJ3GdxRozS5MNagRwrBzRtiwImCs2hZzkZpruKR UKIf01A/YhFvtHIpHBM5K/oRe1dHUm4eTzmS9Mx2lBZ4wIJn7ocyrDp+R/8PLxOSP9N7QLooHRe15 0UrKMQZ/DI6x4SWbleY2ZNwOlnZwFgWQhgKLU8dRq6yXXne1NGZxFCDtsLZiBZRE2erq4RJ3gzl+z I8vA6LrhMTAAngEdJ16Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lt9BQ-000CIX-06; Tue, 15 Jun 2021 13:32:48 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lt9Ac-000ByJ-4z for linux-arm-kernel@bombadil.infradead.org; Tue, 15 Jun 2021 13:31:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=NTf9KlfK1zTuUtUZPTViOylCya5fVv3B9lm7H18aWC0=; b=M3hFNDptNlGvkl01pfJMp3KMtN w/HjwN+wTpTWJaEQvtWfpv/WsRY2PY4fiB4BvZuWCDchGwpKgw+Kmpf3GQCFfLfNyMVbrMRS7GkUL KxKYcO9rJSfBgqvzKMaonL5S23t19v9/ErCvV3RoRzVWZQGkhwh4Faa+mpTZW9xqDB3tzh4GrpPyG wZA896Tbn+/mxPcWOSU00rToKnc3U7WpvGZaDOG7rVXBcRDQdz4nRfkFqHveLdAQ14Q/EOp0Juh+B WwpXyensP7ODS1Frh3G7A/kS17NksOn01Wh9CcjL0g19G0R6TMiEt5WgIZnWCHOSInbwZ/StK7H74 I5PwOtPw==; Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lt98a-007w53-Fp for linux-arm-kernel@lists.infradead.org; Tue, 15 Jun 2021 13:30:01 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id C085E61460; Tue, 15 Jun 2021 13:29:56 +0000 (UTC) Date: Tue, 15 Jun 2021 14:29:54 +0100 From: Catalin Marinas To: Mark Rutland Cc: Dong Aisheng , Steve Capper , linux-arm-kernel@lists.infradead.org, dongas86@gmail.com, Will Deacon Subject: Re: [PATCH 2/4] arm64: mm: fix the count comments in compute_indices Message-ID: <20210615132953.GE26027@arm.com> References: <20210518101405.1048860-1-aisheng.dong@nxp.com> <20210518101405.1048860-3-aisheng.dong@nxp.com> <20210518123511.GI82842@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210518123511.GI82842@C02TD0UTHF1T.local> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210615_142959_540518_8D9668F4 X-CRM114-Status: GOOD ( 19.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, May 18, 2021 at 01:35:11PM +0100, Mark Rutland wrote: > On Tue, May 18, 2021 at 06:14:03PM +0800, Dong Aisheng wrote: > > 'count - 1' is confusing and not comply with the real code running. > > 'count' actually represents the extra entries required, no need minus 1. > > > > Signed-off-by: Dong Aisheng > > This looks right to me, but I'm not all that familiar with this code. > > Steve, does this make sense to you? > > Mark. > > > --- > > arch/arm64/kernel/head.S | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S > > index 96873dfa67fd..b70db34458ec 100644 > > --- a/arch/arm64/kernel/head.S > > +++ b/arch/arm64/kernel/head.S > > @@ -195,7 +195,7 @@ SYM_CODE_END(preserve_boot_args) > > and \iend, \iend, \istart // iend = (vend >> shift) & (ptrs - 1) > > mov \istart, \ptrs > > mul \istart, \istart, \count > > - add \iend, \iend, \istart // iend += (count - 1) * ptrs > > + add \iend, \iend, \istart // iend += count * ptrs > > // our entries span multiple tables The comment was updated to match the code. The code also looks ok to me: iend is inclusive and count denotes the extra entries required rather than the actual number of entries. Also cc'ing Will, I think he missed this series. Acked-by: Catalin Marinas _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel