Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1663146imm; Thu, 21 Jun 2018 00:07:24 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLeInlgiTFL07gd78umxz8qIgKD1PbaneL4GcbxUEXGlT7bc3h577jwh/MtTJoxdoYCBHxy X-Received: by 2002:a17:902:5a3:: with SMTP id f32-v6mr26897654plf.109.1529564843953; Thu, 21 Jun 2018 00:07:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529564843; cv=none; d=google.com; s=arc-20160816; b=EmXCLJTG5KCJvWlncEfaI8AQftjTjqlQx/idpHhqmb02zsnTGsE8sFLyzM7SyIcO+0 KYfIKdyAY5HQA6jCnrvlTHGWRmZzzToUmCHAeT4ynB9RBBtrLAPja57UPMEqSStkexYz tyoIXwbUTLz8hWBOAwZIavZxE+B+IQfHE3SyLrntRhukzrMUNpxPSk5B7a/TDmNphhj2 cV/1BdlSdbGYbBzcSHLJ1sklSLl4r4bNA8CusNAln0ZFpaMVaky+fEM50L3CaiiE5uBU a/8A04bhRp7wscUUAPYU4R7Ebky2bSkO+y+UhhtFOSdAW2k2WDj2uirx9MH9xVUAADQn A+ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature:arc-authentication-results; bh=+o0a8qJY2/Pt0SHKMnMfm3AlumEW1LhlaH66K/cCqk0=; b=qZWehb9GyydB1lYDg/T5nA/NzDMsim2TayHD+1avyjLC/Jo1Keq7piL+xlcWp7EfyC BMrRFrkr3OBP8HesIa9IoY42CkLpVHP/e5aj0KSq9YLOiZO2y+UTg6Na89+zzkSpbIh+ 8E8eFlqz4io/Q06hZJdEszpYdkY235BrF6x4tYYAR62yKDg1i7n2wXMwCaffKUgfBw+w ag1lquXWEpWN7qWyxywBjIuwR+K82EYn78OfK2lLA9RCs8wxixoSSuFuY2c8utmdj11Z E4BgcGrfXZUHK+N7O1lIoMqiqEyAulWZBG/FgZa0y7DXX1P3kVmTyHhbpkfuKSwKVLuE l0/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PPm1699j; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4-v6si3324036pgs.476.2018.06.21.00.07.08; Thu, 21 Jun 2018 00:07:23 -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=pass header.i=@gmail.com header.s=20161025 header.b=PPm1699j; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753948AbeFUHGZ (ORCPT + 99 others); Thu, 21 Jun 2018 03:06:25 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:36462 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751132AbeFUHGY (ORCPT ); Thu, 21 Jun 2018 03:06:24 -0400 Received: by mail-it0-f67.google.com with SMTP id j135-v6so3328471itj.1 for ; Thu, 21 Jun 2018 00:06:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=+o0a8qJY2/Pt0SHKMnMfm3AlumEW1LhlaH66K/cCqk0=; b=PPm1699jRAP8WyFEDs4GtDX3JqwX8Hy4Use+oVBr8ZrvvDkXwd8aCI/THl1+QKIkKh aAAdnm++BG37Kfa5C1plcagbImEAqvYwU+xnnsyvj0G1ZBT11zL9xYPji+oy31Orh0W2 RZLmhXNjVHj10O3p+JTghzKq1LRiD3jIinwNswrc/6rMaYxgw/52fb6rZDlvd6JW5Mc/ V4jyUmMS3ZSaOrBdvq5l2KtoWAMB+Vcb6C+7dJQ4h/kgG/gIGJTqkG5VOqrwlCiQrECK EkhhNQ9E2F3r5Zf+yoni7GAr7xLGz1gi1wcgDobpO3v04LpmJ2I1yemVXNYzgC0ysQjh OzNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=+o0a8qJY2/Pt0SHKMnMfm3AlumEW1LhlaH66K/cCqk0=; b=MIO8a+YbBH6dmBXcG28sC4P07XMVdmv3hbEbt9Nqa87s7q5hwH7kqFkt0H2l4WaFB2 wXShHfHpLROKwtQlzniUH5YaHReQmyj53doeORsiepr/Q1sc1YqeP+k2GxqsG2CQbnTV 8Vs1vxWIoQBpPc8KbmMTKAPAHnTr1KtX11+P4PeeqMcVz8TySh0O3D2ok0P41Ut32lwn mI7CE/YIb+WkQWAv79L464GQzuHrvqCjZXuc408sj00MQifgaRNfY0srbJaIqkOngpRY aQS96A8zvezrh0EHXI5w+ZjTAJY1gpoJIBy/QwlN4gwSZp0zdTwRteaPgl/Yr+1YaCnb 74aA== X-Gm-Message-State: APt69E3YzycLhhaJm57iadNJCiF3RKkg2BEPGpk+l72CHpEK1MoX2EJA rhPtxIyvftLEgZJaEQ+e/Mp7Y1dv/JX4EDCtRM0= X-Received: by 2002:a02:94e7:: with SMTP id x94-v6mr20211182jah.49.1529564783409; Thu, 21 Jun 2018 00:06:23 -0700 (PDT) MIME-Version: 1.0 References: <79dba59ab02752b260cb31f557a09df786fd80d7.1529506497.git.zong@andestech.com> <20180621064043.GC19319@infradead.org> In-Reply-To: <20180621064043.GC19319@infradead.org> From: Zong Li Date: Thu, 21 Jun 2018 15:06:12 +0800 Message-ID: Subject: Re: [PATCH 1/5] RISC-V: Add conditional macro for zone of DMA32 To: hch@infradead.org Cc: Zong Li , linux-riscv@lists.infradead.org, Palmer Dabbelt , Linux Kernel Mailing List , aou@eecs.berkeley.edu, greentime@adnestech.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christoph Hellwig =E6=96=BC 2018=E5=B9=B46=E6=9C=8821= =E6=97=A5 =E9=80=B1=E5=9B=9B =E4=B8=8B=E5=8D=882:40=E5=AF=AB=E9=81=93=EF=BC= =9A > > 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] =3D { 0, }; > > > > +#ifdef CONFIG_ZONE_DMA32 > > max_zone_pfns[ZONE_DMA32] =3D PFN_DOWN(min(4UL * SZ_1G, max_low_p= fn)); > > +#else > > max_zone_pfns[ZONE_NORMAL] =3D max_low_pfn; > > +#endif > > This breaks the 64-bit setup. The second line needs to be kept for > the CONFIG_ZONE_DMA32 case. Yes, it should be #ifdef CONFIG_ZONE_DMA32 max_zone_pfns[ZONE_DMA32] =3D PFN_DOWN(min(4UL * SZ_1G, max_low_pfn)); #endif max_zone_pfns[ZONE_NORMAL] =3D max_low_pfn; Thanks!