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=-14.1 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 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 B1D38C433B4 for ; Tue, 18 May 2021 12:37:52 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 6D45961185 for ; Tue, 18 May 2021 12:37:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D45961185 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=desiato.20200630; 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=0TuxC7wlRupoX2Wj/sK/9uDfhK9e++qt+0BV3E/rqzM=; b=O6Quwb5M0nD6WcMZxGKyQad/j 3OahAnzPpewKu2IxPxcUWqdLQK12RdU3iOzBnuDiKqcRvQwkRMQOVdszGyEap17LssaQ/dOpHbJRZ h+u5l58ISmzJ3GnBY4ZGtGzFCp9Xj23giF4pv2LYr6rlem4gTcbDs42m2QFzL5M8IX4ATWhXyDyJL DfpJnyoeitbKxtzhrsbkQqISF5oh6h8w6B4Qu+hkk3NHoJTbwdbvKd5Kw3wGu2y/wAxIO0CIUAPCZ 0rKVdpw5/UA5cjvy2Zet/4wXb3iNGSxuyfRixJ5Ctb3Bf4QSdc11EY8WmbWOm96yM4JOasA42k7oc +X+u9Agaw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1liywV-000mHK-22; Tue, 18 May 2021 12:35:24 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liywS-000mGm-PT for linux-arm-kernel@desiato.infradead.org; Tue, 18 May 2021 12:35:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=6QaL1XybTgNrYkLhNh7RqB5reUiokUAJ/UO+Qmf+gE8=; b=W2gomX21icjtuPrRhsggpjlZSA 9IMz4XZ7Ypb9nZ/FllTUNj6CnCU9/pfGlVCv3IE9rQ5acfdlv0SkX4fFLaIpiutNX/mMexttLURjh zXSZ3CC5KcPIeI7QVVAcHaAxH09mevKG9W1Q7zyWjTNQr5fwp55+RLLecnAbSSlDw+f8zNeSNK1bN OkJ5qU9E5q+HM//a9OcUn+t3L+D+Nl4x2wrXqSW2Q11dq+amKfxn6a2Ux6iu5YZmt8/auaBq7gQeO 4CibMrtxGYfvH3nvQOsUYanVeqF5cqNzd5xWi8+7Xi3hh/ko8+3j/BTuUfFFOKJnWgXzQy4sgzz00 d1w0P3sQ==; Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1liywO-00EeXy-Pc for linux-arm-kernel@lists.infradead.org; Tue, 18 May 2021 12:35:19 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A325A6D; Tue, 18 May 2021 05:35:14 -0700 (PDT) Received: from C02TD0UTHF1T.local (unknown [10.57.6.226]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C131F3F73B; Tue, 18 May 2021 05:35:13 -0700 (PDT) Date: Tue, 18 May 2021 13:35:11 +0100 From: Mark Rutland To: Dong Aisheng , Steve Capper Cc: linux-arm-kernel@lists.infradead.org, dongas86@gmail.com Subject: Re: [PATCH 2/4] arm64: mm: fix the count comments in compute_indices Message-ID: <20210518123511.GI82842@C02TD0UTHF1T.local> References: <20210518101405.1048860-1-aisheng.dong@nxp.com> <20210518101405.1048860-3-aisheng.dong@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210518101405.1048860-3-aisheng.dong@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_053516_902617_B4DF191E X-CRM114-Status: GOOD ( 17.95 ) 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 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 > > lsr \istart, \vstart, \shift > -- > 2.25.1 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel