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=-9.7 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,URIBL_BLOCKED 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 8A46AC43461 for ; Thu, 17 Sep 2020 00:59:28 +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 107C7206B2 for ; Thu, 17 Sep 2020 00:59:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hRBw8h3v" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 107C7206B2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=hisilicon.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:In-Reply-To:References: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:List-Owner; bh=NP4NVROz1Z8z7845WBsXBe+uN5VNn38KdwsQFT//vXM=; b=hRBw8h3vL4z/ECkARqsK5n8bt JVQ9tQu3vkpBV9P+wOsj5QEG/LTcSfGJT0vhNP2VSgybQRdNkTEhGb5ArJKxNHMcCc+JEYxply06+ 9VVtA/uIU24+Q8I49BTgtWQlFeNJSbl8z173lLMlsvoBUAaZGcMDM6y2ROThcs9JkR7xbonBBJBmn vDdDagGObd9F9U1APBzlnmlDE+Ay12nLaNjIp2ZosiI8fMkOiT5aEABkGQEEC+JVL+HsYDMyJiCh1 l1ohE0nwQFd8YPPiduJKofnFqbAYOCrpwg0yxHc64BXACF4LD1aYgihFfF8S5/pIlzlai5qc3S63m 2DkPO7gjw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIiFB-0006L3-G1; Thu, 17 Sep 2020 00:57:49 +0000 Received: from szxga01-in.huawei.com ([45.249.212.187] helo=huawei.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIiF8-0006Jj-Fo for linux-arm-kernel@lists.infradead.org; Thu, 17 Sep 2020 00:57:47 +0000 Received: from DGGEMM406-HUB.china.huawei.com (unknown [172.30.72.54]) by Forcepoint Email with ESMTP id 6916C1CDD498D51CBBDE; Thu, 17 Sep 2020 08:57:38 +0800 (CST) Received: from dggemi710-chm.china.huawei.com (10.3.20.109) by DGGEMM406-HUB.china.huawei.com (10.3.20.214) with Microsoft SMTP Server (TLS) id 14.3.487.0; Thu, 17 Sep 2020 08:57:38 +0800 Received: from dggemi761-chm.china.huawei.com (10.1.198.147) by dggemi710-chm.china.huawei.com (10.3.20.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1913.5; Thu, 17 Sep 2020 08:57:37 +0800 Received: from dggemi761-chm.china.huawei.com ([10.9.49.202]) by dggemi761-chm.china.huawei.com ([10.9.49.202]) with mapi id 15.01.1913.007; Thu, 17 Sep 2020 08:57:38 +0800 From: "Song Bao Hua (Barry Song)" To: Nick Desaulniers Subject: RE: arm64: mm: move dma_contiguous_reserve() to be after paging_init() Thread-Topic: arm64: mm: move dma_contiguous_reserve() to be after paging_init() Thread-Index: AQHWjIg9Vw4ucv/7MkmF/biUUWKaD6lsACBw Date: Thu, 17 Sep 2020 00:57:37 +0000 Message-ID: <304aab7bf8724232a430c29660007e9e@hisilicon.com> References: <20200916085933.25220-1-song.bao.hua@hisilicon.com> <20200917001934.2793370-1-ndesaulniers@google.com> In-Reply-To: <20200917001934.2793370-1-ndesaulniers@google.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.126.202.195] MIME-Version: 1.0 X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200916_205746_777603_E42A69A2 X-CRM114-Status: GOOD ( 16.13 ) 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: "sfr@canb.auug.org.au" , "clang-built-linux@googlegroups.com" , Linuxarm , "ardb@kernel.org" , "linux-mm@kvack.org" , "akpm@linux-foundation.org" , "will@kernel.org" , "guro@fb.com" , "linux-arm-kernel@lists.infradead.org" , "mike.kravetz@oracle.com" 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 > -----Original Message----- > From: ndesaulniers via sendgmr > [mailto:ndesaulniers@ndesaulniers1.mtv.corp.google.com] On Behalf Of Nick > Desaulniers > Sent: Thursday, September 17, 2020 12:20 PM > To: Song Bao Hua (Barry Song) > Cc: akpm@linux-foundation.org; guro@fb.com; > linux-arm-kernel@lists.infradead.org; linux-mm@kvack.org; Linuxarm > ; mike.kravetz@oracle.com; sfr@canb.auug.org.au; > will@kernel.org; ardb@kernel.org; clang-built-linux@googlegroups.com > Subject: Re: arm64: mm: move dma_contiguous_reserve() to be after > paging_init() > > It looks like that change referenced may also break arm32 boots with today's > next? > > The following allows me to boot, but I have no idea if it's incorrect or not. > This is probably incorrect on arm32 as dma_contiguous_early_fixup() is done after dma_contiguous_remap() in paging_init(). That means dma_contiguous_remap() gets an empty list. For arm64, there isn't early_fixup() and remap(). > diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c > index 45f9d5ec2360..7118b98c1f5f 100644 > --- a/arch/arm/mm/init.c > +++ b/arch/arm/mm/init.c > @@ -226,9 +226,6 @@ void __init arm_memblock_init(const struct > machine_desc *mdesc) > early_init_fdt_reserve_self(); > early_init_fdt_scan_reserved_mem(); > > - /* reserve memory for DMA contiguous allocations */ > - dma_contiguous_reserve(arm_dma_limit); > - > arm_memblock_steal_permitted = false; > memblock_dump_all(); > } > @@ -248,6 +245,9 @@ void __init bootmem_init(void) > */ > sparse_init(); > > + /* reserve memory for DMA contiguous allocations */ > + dma_contiguous_reserve(arm_dma_limit); > + > /* > * Now free the memory - free_area_init needs > * the sparse mem_map arrays initialized by sparse_init() Thanks Barry _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel