From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4470C433DB for ; Wed, 30 Dec 2020 10:18:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 754FC2247F for ; Wed, 30 Dec 2020 10:18:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726547AbgL3KR5 (ORCPT ); Wed, 30 Dec 2020 05:17:57 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:9660 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726203AbgL3KRz (ORCPT ); Wed, 30 Dec 2020 05:17:55 -0500 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4D5Ryb5Mp3z15YX4; Wed, 30 Dec 2020 18:16:23 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.498.0; Wed, 30 Dec 2020 18:17:03 +0800 From: Chen Zhou To: , CC: , , , , , , , , Subject: [PATCH v2 0/3] arm64: mm: reserve CMA and crashkernel in ZONE_DMA if enabled Date: Wed, 30 Dec 2020 18:23:19 +0800 Message-ID: <20201230102322.176313-1-chenzhou10@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, CMA and crashkernel are reserved in ZONE_DMA32, which is OK for majority of devices. But the ones that need them in ZONE_DMA need to configure it explicitly. Since patchset "arm64: Default to 32-bit wide ZONE_DMA", ZONE_DMA's size is fine-tuned. So we could directly reserve CMA and crashkernel in ZONE_DMA if CONFIG_ZONE_DMA is enabled, otherwise, reserving in ZONE_DMA32. Patch 1 updates the comments about the ZONE_DMA. Patch 2 move dma_contiguous_reserve() to bootmem_init() Patch 3 reserve CMA and crashkernel in ZONE_DMA if enabled Changes since v1: - Add Reviewed-by for patch 1 from Nicolas. - Suggested by Nicolas, also reserve CMA in ZONE_DMA if enabled. Chen Zhou (3): arm64: mm: update the comments about ZONE_DMA arm64: mm: move dma_contiguous_reserve() to bootmem_init() arm64: mm: reserve CMA and crashkernel in ZONE_DMA if enabled arch/arm64/mm/init.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) -- 2.20.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 943CAC433DB for ; Wed, 30 Dec 2020 10:18:56 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 49CEE221FA for ; Wed, 30 Dec 2020 10:18:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 49CEE221FA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=HbltBRI4crNssQY/eGOddJ3BvyfvP8+TLKxcSqu4Zjo=; b=c/CrhFR+eKi5TcfPIZXrSTjf/i engns4SA3Lj546yvi91J//DQ9NLX4f7LywSIswv0yJqnvIHQg92AELOBvXsUivdUZP/zRbHnqR2I0 oJiuGfZBkYUA7flxe50QvTBZueEj7DeOg72JmNQe5segfQrZQyB4RefJE0oU1zM8gdcfgL/FALAB3 O+pQyxiXMgx1KSPyp1UcS3r5lxQM5yUIohOaBtwqVG7KJjJRqYwYf8mVxddQ9/6YCNZb/j3ftnU0d YgZWQ8G5Bg5dX+fMoPODpfjEjFKgQK6hq6o3sEnabXlc7pGL6OA0pHQ/o14QcEZ4oEreZCqGe+iWk pKm8D8vA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kuYXp-0006Gw-OJ; Wed, 30 Dec 2020 10:17:29 +0000 Received: from szxga04-in.huawei.com ([45.249.212.190]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kuYXl-0006Ey-1Z for linux-arm-kernel@lists.infradead.org; Wed, 30 Dec 2020 10:17:26 +0000 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4D5Ryb5Mp3z15YX4; Wed, 30 Dec 2020 18:16:23 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.498.0; Wed, 30 Dec 2020 18:17:03 +0800 From: Chen Zhou To: , Subject: [PATCH v2 0/3] arm64: mm: reserve CMA and crashkernel in ZONE_DMA if enabled Date: Wed, 30 Dec 2020 18:23:19 +0800 Message-ID: <20201230102322.176313-1-chenzhou10@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201230_051725_363475_50009F5D X-CRM114-Status: UNSURE ( 7.95 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: chenzhou10@huawei.com, linux-kernel@vger.kernel.org, nsaenzjulienne@suse.de, rppt@kernel.org, huawei.libin@huawei.com, guohanjun@huawei.com, akpm@linux-foundation.org, ardb@kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Currently, CMA and crashkernel are reserved in ZONE_DMA32, which is OK for majority of devices. But the ones that need them in ZONE_DMA need to configure it explicitly. Since patchset "arm64: Default to 32-bit wide ZONE_DMA", ZONE_DMA's size is fine-tuned. So we could directly reserve CMA and crashkernel in ZONE_DMA if CONFIG_ZONE_DMA is enabled, otherwise, reserving in ZONE_DMA32. Patch 1 updates the comments about the ZONE_DMA. Patch 2 move dma_contiguous_reserve() to bootmem_init() Patch 3 reserve CMA and crashkernel in ZONE_DMA if enabled Changes since v1: - Add Reviewed-by for patch 1 from Nicolas. - Suggested by Nicolas, also reserve CMA in ZONE_DMA if enabled. Chen Zhou (3): arm64: mm: update the comments about ZONE_DMA arm64: mm: move dma_contiguous_reserve() to bootmem_init() arm64: mm: reserve CMA and crashkernel in ZONE_DMA if enabled arch/arm64/mm/init.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel