Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp301288imm; Fri, 21 Sep 2018 00:01:28 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbq3MrSweEe8APOONbTOq+L67mgPZhvu+MbZjJlylAJBSSwp3x5hku2J4vR9cX4gl+KRApD X-Received: by 2002:a17:902:aa49:: with SMTP id c9-v6mr42117899plr.195.1537513288272; Fri, 21 Sep 2018 00:01:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537513288; cv=none; d=google.com; s=arc-20160816; b=Em08X26DCxq/A4ESCjqNwKncLx6IdkvgEKeh/CxlJ8NBCOsAPJ8qJBvkb7pETH/TAz yD+QnEklovPcaNDo9Og0WQWmoHtnYYlaauTjf7l2j+0rCTZ6pYmudVxojMHH0NcKhood /W/M0O/md0Lm67F+LPBZicROcz44YjiXJLgfmQaJ2FP9Xc5Kd8lc/SGP8JxnFItEgxmV jGiCqsETFrOS2wqq/4ZTF6sFz/tL3D8lSMVRljomdPyWlZVz/p3fdTogCLwWmSQbAUqC u//vfffM5qf2TuzIsGhcLgI3Sh33mgLgFzyxbkwwDnraS/+0DHKNF00aMhYGiR+l5yax bbmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=SgClKKoWTdXoO2FwFm/OdPM91viQY43FkatOYhXrcS4=; b=gSFjd8vdHuLmUjdK+TrmFlin3Wx6gea62zojok8e/m2HurKLstgo2jZz1jOodmQN5R gqiC96AYxYLix0nU0B5c5EyEM3/RRpwyrjLOZLhTyopJ7j4X8fgOrH5rp5V/2sbP8A/+ WkhIoYJePLaSOZZUZFOXG+QRWvZD+l1fJs6qyHrzQxNA8Lj3qy3OGy4WtjNe7Tko4sjm rY5M19q3tI/w3rQjsjvsoeLAMaQfr1NPfic/7S8SKDca2oglDnTgRIBCQ0WdFIx37CUh gmqdm2kAeQFqE/+Z7ZGdz8fUTF3QmK1V6pZfsRHf2tWO8gGbCSTeMTU9IsvsfpuEnnPy NtlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=J9OmCqRd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d11-v6si28487537pln.471.2018.09.21.00.01.11; Fri, 21 Sep 2018 00:01:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=J9OmCqRd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389256AbeIUMsb (ORCPT + 99 others); Fri, 21 Sep 2018 08:48:31 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:37444 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388909AbeIUMsb (ORCPT ); Fri, 21 Sep 2018 08:48:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=SgClKKoWTdXoO2FwFm/OdPM91viQY43FkatOYhXrcS4=; b=J9OmCqRdBTM95oq5ed2hfkY6e X1C0FeHjTEu8iANcexIBvIcKkjeVrcJ9wxUhyxRJqfEUeQJ8ZucqWgfKN7zouy8wIQJ7N91HeJweh MNeY1qXxh177/uCm2pRZnMq9jOFJEUBim93wrqyXag/3/+gZpuCM50JOFJfh0rWJKM9bwWpnesE0a 3PYIaLnumM+EiMK+jPicv3bz3Q+HkKVUvA7hZSAd8uKgBZvVzeuvdw1riAXly/FuMiVMEqfZ2sI2y r+WtOfWB2+iIrO9uyex/pTjv/o1lYb43LDCeMKU/Vt97kJGGCH3tQfz7X3cLEi7IDf2kl+T8KY2ON AMlaShzsA==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1g3FQy-0005J3-2K; Fri, 21 Sep 2018 07:01:00 +0000 Date: Fri, 21 Sep 2018 00:00:59 -0700 From: Christoph Hellwig To: Zong Li Cc: palmer@sifive.com, aou@eecs.berkeley.edu, vincentc@andestech.com, zong@andestech.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/5] RISC-V: Avoid corrupting the upper 32-bit of phys_addr_t in ioremap Message-ID: <20180921070059.GD8401@infradead.org> References: <9fc325660fb1e0ef9133705f7c05784dcc12c0c2.1537260207.git.zongbox@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9fc325660fb1e0ef9133705f7c05784dcc12c0c2.1537260207.git.zongbox@gmail.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 18, 2018 at 05:19:17PM +0800, Zong Li wrote: > From: Vincent Chen > > For 32bit, the upper 32-bit of phys_addr_t will be flushed to zero > after AND with PAGE_MASK because the data type of PAGE_MASK is > unsigned long. To fix this problem, the page alignment is done by > subtracting the page offset instead of AND with PAGE_MASK. > > Signed-off-by: Vincent Chen Looks fine, Reviewed-by: Christoph Hellwig