Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4088564pxj; Mon, 24 May 2021 23:39:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJab41wwhfiDVznCxbx8SGrcLSLgUZ8pvNFDJMlei//FcM79J/awbOhhpjxF2m0bM3kBBN X-Received: by 2002:a17:907:abc:: with SMTP id bz28mr26647052ejc.262.1621924786679; Mon, 24 May 2021 23:39:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621924786; cv=none; d=google.com; s=arc-20160816; b=iWtEE1enJH8ANh0XebsBY/Kqd00eUuRyXz09kSKfxK4lX7DqVgNcY9eWLnC+bvF0Il rDX9VLVSGLVXij1slEPZ62/PFJ/ek6Z4mo+KwjtXyP6EaLLBPTKEE8St+7jybQhFl1Qo mLclfPqiCAg8wK+JTZ7W3M6A7/tEzyxmVrXn3POhuvIxTTOxaoVqjjIH+i+5e6jiv3I4 gukYUptGF1KaWiPZLGEnEd7SmcKq2tjQVDiPpyAO423Wb4xlZC53eIJIiCzRJ79QQIKv 4mSfaRIrdq8DYXtt7nY5vUDbVThT674meVh/YtVH+LIZuZW/qaXWD6X/pE7JjULvvI+S w1Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=l76PMWwpyUywZLSPQWxlVCkV0Gpx/Lj+papEoZT+usU=; b=PzRB+urrI2ix1SOCWkLH9n8z5rEat8Q2T7mLE7ICCmuD46/So2FDk4rixyAgrV9943 YuyD+vpjQ62zpBrIGAbwsARJdS+oR+bB3YO4+QueovwDUHp/qOu4hTkQjEMx+eXMfr0r W9Y8vO7axrfLZaFnst9apT0OkY+d5U5jfbvdWzGr/yhYjP2iYoHIu2uejuS3xzndxQmT oE/8680AOeHI3a/+apfqzCNST8MNVcroPhq8T3SzbVBjXe9uLUCVoV/y48rbHL8kdC35 cwOd3LKN/h4DdhV6HfSf7Gag1rzj9mjBML9ysLrFgEQ4/wri9xMMVntaeagYdJwarg4B MQog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=nxMsfjJ5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h16si16155361edv.607.2021.05.24.23.39.24; Mon, 24 May 2021 23:39:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=nxMsfjJ5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231284AbhEYGgn (ORCPT + 99 others); Tue, 25 May 2021 02:36:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231197AbhEYGgl (ORCPT ); Tue, 25 May 2021 02:36:41 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91595C061574; Mon, 24 May 2021 23:35:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=l76PMWwpyUywZLSPQWxlVCkV0Gpx/Lj+papEoZT+usU=; b=nxMsfjJ56nJZsedt7pMMtsU2dQ s66X+UHTPW9Pvr0NZFeGrpkRebz0bVJXAj3WwNMKN4BMYNNtm7QF8q/k4gireJ5A1/O0yIe6iHpf1 fNaEzyiT88Zio+afVonMcWw4AacHG94txCxY8e/BB9s3e1x99e5jtgaj80W/Ly5hGzqijngVgbn+4 Gquox9i4ezhDsq0BG2/77r09PwciTdFQ3Ma19fsTqnkX2Nr3pZycMg5b37lefHHng7Hcrc0EWOx2M 8eGIQQZ7JSsIPBCKMVMGQocha9Qv9qyzoDZPY6OJi4N8Z7ub+8+en2hmHKdgDcv8EX7Z5wBr9PUTx P+dJps9A==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1llQeB-003C3l-RS; Tue, 25 May 2021 06:34:41 +0000 Date: Tue, 25 May 2021 07:34:35 +0100 From: Christoph Hellwig To: guoren@kernel.org Cc: anup.patel@wdc.com, palmerdabbelt@google.com, arnd@arndb.de, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-sunxi@lists.linux.dev, Guo Ren Subject: Re: [PATCH 2/3] riscv: Fixup PAGE_UP in asm/page.h Message-ID: References: <1621839068-31738-1-git-send-email-guoren@kernel.org> <1621839068-31738-2-git-send-email-guoren@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1621839068-31738-2-git-send-email-guoren@kernel.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 24, 2021 at 06:51:07AM +0000, guoren@kernel.org wrote: > From: Guo Ren > > Current PAGE_UP implementation is wrong. PAGE_UP(0) should be > 0x1000, but current implementation will give out 0. > > Although the current PAGE_UP isn't used, it will soon be used in > tlb_flush optimization. Nak. Please just remove the PAGE_UP/PAGE_DOWN macros just like they have been removed from other architectures long ago and use the generic DIV_ROUND_UP macro for your new code like everyone else.