Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp220699yba; Tue, 23 Apr 2019 23:21:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxF4Z9j4TW7mU7+DguyUaJBvLETHHbrhdorID/i1PQh2jjyTP4NnvWSBDuF6nUSgrgz1G+G X-Received: by 2002:a62:e411:: with SMTP id r17mr31519273pfh.127.1556086892108; Tue, 23 Apr 2019 23:21:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556086892; cv=none; d=google.com; s=arc-20160816; b=l6zd4WJDQDFUMGzjaOnRr8N335IQXVYpS3UdN/Fq9v+sIdjvQLa3Q0QyTA1tEssCL3 gqJHCInLCzo0ajTdWLGWNEfA4DUq5uku/n5WWRzkz6XCNFVvKyjAlJTcgE4Vfy3qt8OG z87YakqW35WemqbglpIeZsj2t9uKrgGT7gDSzgjebM0r1VRJ70hLo1So5fZMwaVE3+66 LNGOz/aAKK28H92BOJLF9YpAD+R0v7C9WlYs0TV791JW8icFWvEVW9JYZCoU/OJGaJi7 WO+s7EuC918Auhms01j60acPACHiogtuZ4zbN2pMONJ2bbpknmXHlIO5jyhIwzA4wFB+ Ewnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=6hPveqgRVTbNWeEOtVMTmwg5++3tigNGkiLLY9fL52g=; b=QJP5TqkQBJyqF+OuVgsV8dqph0jAhyigHjLTwVQFZP+uzz9h09lGKCaMXM/WGfpQvZ fZABosCWoWtyeXTCBST86IBshnwLMmICxh5ptWJxJ2ZNb8nMdlDZR964/iQlg6XX/t/e 5O9Iisr9nQwwuGa1MjSr7wxGsE4eTmkVNLKP+Coi3gqvkyIVZ9pogi6ElwDRun664PFm EuMX2eKeMDY6iHnc7/jg/LEG8+OiNi3uH5SOim9a34k8eQNpOc7gC5Zzk8aCludrwWOJ jZz1eYJTqbKcF1qPxMCy6xRVRlJiLanatIKSNxbJ2ZKJqCmiBMWD6RRLO5EAExoogVIn 4h3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=CWkH1EDR; 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 t22si2203929pgk.365.2019.04.23.23.21.16; Tue, 23 Apr 2019 23:21:32 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=CWkH1EDR; 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 S1729333AbfDXGSP (ORCPT + 99 others); Wed, 24 Apr 2019 02:18:15 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:46534 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726002AbfDXGSO (ORCPT ); Wed, 24 Apr 2019 02:18:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=6hPveqgRVTbNWeEOtVMTmwg5++3tigNGkiLLY9fL52g=; b=CWkH1EDRvtDdo2ed0PfVENCek BEn/b6rLJbw2WIyJk0DA4ksnJSo8NplcFmGrVYljoEOGtv8CK+XBwBrbvX9VjFak4qJTeXa8KKZb9 09OK5DT1suigw6pnRmK3il8Haq1poVCNcmIyFqIo6OqS0SuGz7tseLtpt+TMjvTOsqmLOVSTs1zIi A6dyIWiPBQ1T75DWZbD/M3+uCmrJW4lntyFxbXeeA2NK2oNMKCnuh85bnFAaexPfyFY+2l3nW5l+/ bfhDgDaS/gZQwbnTs/VH1DpNeeUSuODLyIgVnORHfbereERf6Fmhfn6IhF95gH+nMLibzVqfNyVYf XyzA/T+fQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJBE6-0000rj-7l; Wed, 24 Apr 2019 06:17:50 +0000 Date: Tue, 23 Apr 2019 23:17:50 -0700 From: Christoph Hellwig To: Serge Semin Cc: Ralf Baechle , Paul Burton , James Hogan , Matt Redfearn , Mike Rapoport , Andrew Morton , Michal Hocko , Greg Kroah-Hartman , Thomas Bogendoerfer , Huacai Chen , Stefan Agner , Stephen Rothwell , Alexandre Belloni , Juergen Gross , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 12/12] mips: Enable OF_RESERVED_MEM config Message-ID: <20190424061750.GA30717@infradead.org> References: <20190423224748.3765-1-fancer.lancer@gmail.com> <20190423224748.3765-13-fancer.lancer@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190423224748.3765-13-fancer.lancer@gmail.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 24, 2019 at 01:47:48AM +0300, Serge Semin wrote: > Since memblock-patchset was introduced the reserved-memory nodes are > supported being declared in dt-files. So these nodes are actually parsed > during the arch setup procedure when the early_init_fdt_scan_reserved_mem() > method is called. But some of the features like private reserved memory > pools aren't available at the moment, since OF_RESERVED_MEM isn't enabled > for the MIPS platform. Lets fix it by enabling the config. > > But due to the arch-specific boot mem_map container utilization we need > to manually call the fdt_init_reserved_mem() method after all the available > and reserved memory has been moved to memblock. The function call performed > before bootmem_init() fails due to the lack of any memblock memory regions > to allocate from at that stage. Architectures should not select this symbol directly, it will be automatically enabled if either DMA_DECLARE_COHERENT or DMA_CMA are enabled, which are required for the actual underlying memory allocators.