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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 36B7AC4BA3B for ; Thu, 27 Feb 2020 09:56:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B6BB9222C2 for ; Thu, 27 Feb 2020 09:56:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B6BB9222C2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 15A2D6B0003; Thu, 27 Feb 2020 04:56:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0E6866B0005; Thu, 27 Feb 2020 04:56:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F137C6B0006; Thu, 27 Feb 2020 04:56:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0122.hostedemail.com [216.40.44.122]) by kanga.kvack.org (Postfix) with ESMTP id D6E166B0003 for ; Thu, 27 Feb 2020 04:56:15 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 7DABC1AEED for ; Thu, 27 Feb 2020 09:56:15 +0000 (UTC) X-FDA: 76535451510.19.grip62_369a105086601 X-HE-Tag: grip62_369a105086601 X-Filterd-Recvd-Size: 3093 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Thu, 27 Feb 2020 09:56:15 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id C91FCAE46; Thu, 27 Feb 2020 09:56:13 +0000 (UTC) Subject: Re: cma can't activate area on arm64 To: Jonathan Richardson , linux-mm@kvack.org, akpm@linux-foundation.org, "linux-arm-kernel@lists.infradead.org" , Nicolas Saenz Julienne References: From: Vlastimil Babka Message-ID: <8f82edf2-7313-eb4c-f68e-ff18f7a5e919@suse.cz> Date: Thu, 27 Feb 2020 10:56:12 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 2/22/20 12:42 AM, Jonathan Richardson wrote: > Hi, > As of the 5.5 kernel I see boot errors in cma. It reserves 1G and then can't > activate an area. I added some prints. It's trying to activate the DMA > zone. This causes a driver to fail allocating a dma pool later on. The > coherent pool is the default 256MB. If I reduce cma from 1G to 512M > then it only tries activates DMA32 zone. I assume there was not enough cma > memory for DMA zone? Are there any configuration changes required due > to the DMA_ZONE and DMA_ZONE32 changes? I've attached my boot log. I think this question is better for the ARM guys. CC'd > [ 0.000000] cma: Reserved 1024 MiB at 0x00000000a0000000 > ... > [ 0.390448] Activating cma name: reserved, zone name: DMA > [ 0.396564] pfn = 0xa0000 > [ 0.399522] cma->count = 262144 > [ 0.406244] pfn failed on = c0000 > [ 0.410002] cma: CMA area reserved could not be activated > > static int __init cma_activate_area(struct cma *cma) > { > ... > printk("Activating cma name: %s, zone name: %s\n", cma->name, zone->name); > printk("pfn = 0x%lx\n", pfn); > printk("cma->count = %lu\n", cma->count); > > do { > unsigned j; > > base_pfn = pfn; > for (j = pageblock_nr_pages; j; --j, pfn++) { > WARN_ON_ONCE(!pfn_valid(pfn)); > /* > * alloc_contig_range requires the pfn range > * specified to be in the same zone. Make this > * simple by forcing the entire CMA resv range > * to be in the same zone. > */ > if (page_zone(pfn_to_page(pfn)) != zone) { > printk("pfn failed on = 0x%lx\n", pfn); > goto not_in_zone; > } > } > init_cma_reserved_pageblock(pfn_to_page(base_pfn)); > } while (--i); > > Thanks. >