Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1441126imm; Wed, 20 Jun 2018 18:49:35 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLKMri/daA1YExP9qApv+6npQ01PWMOcS1jxeoktP+K+Q8a71ob+jbLSaYlbMOgNF+NzKSS X-Received: by 2002:a17:902:760d:: with SMTP id k13-v6mr25807577pll.56.1529545775762; Wed, 20 Jun 2018 18:49:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529545775; cv=none; d=google.com; s=arc-20160816; b=PU6Xj8N+le7ERf9CKNjjy/TX8sEDQQmSlxl+bM5hqA0DavY2SMtcXyRYIs3NFka9uz Z48isvpJK9OWKefNEF3QTJaykWuj9S5pK8yRQjooHg9iKuBZ/1vWF464TVC87c3TMNS1 GCZAxNIJ6YawFmbEYU39wEI/rRoTCC9NcfnlSHDMXhiOskb3tUmItzclpcyQ+6TmVnIN sSDSjvH797gTqk06knKRJwuNgg9oHnEitR7IPYH0Y81OaD7CDfI8x2J7rpiaxave5+9t MIDH+155qoJ/KeIaV5cSYA60dorqmvt3f0whGzboSzPdn2CTAANM8ojUIalmDfmwZtRQ AhbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=K0v74UxMsrkjJba0YlcB9nHHoo2fuuCwBPonLXULe7k=; b=NVMfCbNKNgADdvsVppjOlpWRskOkFMpkeG51Xl7NaI83bXWWcrg9zWgItz2XQ1TnpQ mco+fRRqVgxfCn3WwXKuBJAdUW4tusVqw5MLWi+Qc/BlrDYeBoYaT7Wrl40KdfI2f/QE mp67OPW4qVKsOwmcs5kdltKizZWu/WPDqa73hmAzuHLmxcO8xUXnTnYRXGe4VYvXTdYs not21bdtjQTXBaO9GstpxP96bh5wnLkk/qh57kuWOF+nKs8bn/qvPdh76uZETIddRSoC eT7+eCrX4V+OoWyiE1DfdNGITSWWXAzD6q+X3oObrH3FtLyLTuK7VP8TgLBfZpGBv725 SSNg== ARC-Authentication-Results: i=1; mx.google.com; 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 f186-v6si3439920pfg.194.2018.06.20.18.49.21; Wed, 20 Jun 2018 18:49:35 -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; 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 S1754480AbeFUBsJ (ORCPT + 99 others); Wed, 20 Jun 2018 21:48:09 -0400 Received: from exmail.andestech.com ([59.124.169.137]:22998 "EHLO ATCSQR.andestech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754443AbeFUBsH (ORCPT ); Wed, 20 Jun 2018 21:48:07 -0400 Received: from ATCSQR.andestech.com (localhost [127.0.0.2] (may be forged)) by ATCSQR.andestech.com with ESMTP id w5L1fuv4038389 for ; Thu, 21 Jun 2018 09:41:56 +0800 (GMT-8) (envelope-from zong@andestech.com) Received: from mail.andestech.com (atcpcs16.andestech.com [10.0.1.222]) by ATCSQR.andestech.com with ESMTP id w5L1ffX3038354; Thu, 21 Jun 2018 09:41:41 +0800 (GMT-8) (envelope-from zong@andestech.com) Received: from atcsqa06.andestech.com (10.0.1.85) by ATCPCS16.andestech.com (10.0.1.222) with Microsoft SMTP Server id 14.3.123.3; Thu, 21 Jun 2018 09:42:04 +0800 From: Zong Li To: , , , CC: Zong Li , Subject: [PATCH 1/5] RISC-V: Add conditional macro for zone of DMA32 Date: Thu, 21 Jun 2018 09:41:41 +0800 Message-ID: <79dba59ab02752b260cb31f557a09df786fd80d7.1529506497.git.zong@andestech.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.0.1.85] X-DNSRBL: X-MAIL: ATCSQR.andestech.com w5L1ffX3038354 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 free_area_init_nodes(max_zone_pfns); } -- 2.16.1