Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1641722imm; Wed, 20 Jun 2018 23:41:51 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIopK4mnjAwuFULWtPqaU/YjsUihTDtBZjgtPAuwWPN6V+CSV2YV9+hfcHcBiMWd3rv9GS5 X-Received: by 2002:a62:1855:: with SMTP id 82-v6mr26096512pfy.132.1529563311701; Wed, 20 Jun 2018 23:41:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529563311; cv=none; d=google.com; s=arc-20160816; b=io7gaTgb1osu+iN3P+jevI5YlHTd4qDWj9MQRrBF6kvMDG1ZYf26zHtEkM5qh6Y3f3 a8zhqxRo8pnIoypvHER20bCjmHwH4RHetr4jw63cDw/EF5efyujKyHhuHpHHkGGayKQs KaGZZgOtGQKaKObi0XDHBTtLPBtrzIjfH1DCT+RAInrkEcdq27ujCPc6HYxY/Nlf9MsT +9GOaWsQ7fyOdJeWroa9EtRhLpus/ef+TGUVzPCZ+9NfKAUmJchywVx8yf1XnRI5ZnIT 2H09PwSmwfiNPh5H6JlFdYcWmHJ8MccQjCjibqGJ2w6npj5m121udOvIn8br7kA87Lcn Bqsg== 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:arc-authentication-results; bh=jH6+vA9bQxL+rRo3P5SSNrSDZvaLe9vlDSAQ755Owy0=; b=qmH82GN/4WNdXaWeUsNFDlF34fpqAeqo2vPJlGFyHl6vVhpxToZwJbI54ufm3WP3/t uec6tu6q9rR3qubdSq9JeujWTUPiyB/7yffSpd7Ywdd2KIbHT4ro7HzKWIk+/TNyY7nP rZbxZlvk8/vlFt1xYhs231cxCIWHqyjfRDUsinU3za4Dpwg8YnXn6rznyyfQL1q6/hTr pU9Qfs79FjmhyDv3llZwL2QUrx6ee8Men6vTLcI034bXBH/aR5RGu1WRQfLe7Q2OXxCG pFXu/jWObNznWioX6t7O1L0Y2kklEsaHaz4SOaUhPYtGHn9vopHusBNKZpsVqTiCzvQY +A1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=kvsn7s4N; 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 q10-v6si3193467pgd.108.2018.06.20.23.41.36; Wed, 20 Jun 2018 23:41:51 -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=kvsn7s4N; 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 S1754308AbeFUGkq (ORCPT + 99 others); Thu, 21 Jun 2018 02:40:46 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:35446 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751057AbeFUGkp (ORCPT ); Thu, 21 Jun 2018 02:40:45 -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=jH6+vA9bQxL+rRo3P5SSNrSDZvaLe9vlDSAQ755Owy0=; b=kvsn7s4N3Y6jUSonsSz/5o8rk tiQPOvzdugerDbagxbZOWp7AcQa3z913CM5ZMxWVHQY6LxT0fSUYoHN39jNkgAi7LAUYc01QL/ls0 d6BjHiAcyy/OwZhKB8u2liW8IRKPieE3VDXsORoWWrJLdXt1oqrVB/kfApKTZ+joxi9f76J9CGcYr MmG7wyORd1OmZIhVjONEqVJQ07oCVFVlFoMS44FVSXr/l4nJMKE1b420x+OTgrrBSPxBgsTpZjEMo gAZ6OT+LYM1Bst716rb1aQFlIMuBNhzDRUiMtXW4lPqV8PItMLWcetn+T7h7ZafExAoqQRiTOCbUf APZAG/TTg==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fVtGt-0003uu-Ox; Thu, 21 Jun 2018 06:40:43 +0000 Date: Wed, 20 Jun 2018 23:40:43 -0700 From: Christoph Hellwig To: Zong Li Cc: palmer@sifive.com, aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, greentime@adnestech.com Subject: Re: [PATCH 1/5] RISC-V: Add conditional macro for zone of DMA32 Message-ID: <20180621064043.GC19319@infradead.org> References: <79dba59ab02752b260cb31f557a09df786fd80d7.1529506497.git.zong@andestech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <79dba59ab02752b260cb31f557a09df786fd80d7.1529506497.git.zong@andestech.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 Thu, Jun 21, 2018 at 09:41:41AM +0800, Zong Li wrote: > The DMA32 is for 64-bit usage. > > Signed-off-by: Zong Li > --- > arch/riscv/mm/init.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c > index c77df8142be2..91a5852e28fd 100644 > --- a/arch/riscv/mm/init.c > +++ b/arch/riscv/mm/init.c > @@ -28,8 +28,11 @@ static void __init zone_sizes_init(void) > { > unsigned long max_zone_pfns[MAX_NR_ZONES] = { 0, }; > > +#ifdef CONFIG_ZONE_DMA32 > max_zone_pfns[ZONE_DMA32] = PFN_DOWN(min(4UL * SZ_1G, max_low_pfn)); > +#else > max_zone_pfns[ZONE_NORMAL] = max_low_pfn; > +#endif This breaks the 64-bit setup. The second line needs to be kept for the CONFIG_ZONE_DMA32 case.