Received: by 10.213.65.68 with SMTP id h4csp1052646imn; Wed, 14 Mar 2018 08:13:10 -0700 (PDT) X-Google-Smtp-Source: AG47ELvnMpYczYJDunK1C8HMTvQUdfp3PxJVXZ/fVZZMeT5rA4WTdifuXQkvetRnSTfjKi7lK39O X-Received: by 10.98.202.23 with SMTP id n23mr4665439pfg.52.1521040389923; Wed, 14 Mar 2018 08:13:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521040389; cv=none; d=google.com; s=arc-20160816; b=wRRNr4Upavj0pR+fpfD23AUDJ3egoiWjfYyvJmVrPSilbjEtwO/xMxwo60Jq0T7/Of 1mBhqewt4t7JiaYs9D8oHvctkBOz41F5245jZTXLz+KNr/0DjRPCFkCGJJfcRy9DcEt9 F+r1mso1iog7tM1x5yQmWhqNZhIWOSDlXTabL+cAYp6BbZKNC5FNbNdVdvTHE6cB6TVC wHleDMGBMqY7URSrqT7rAsxcSOufLU0VStso95FdGEiMKlpG9v+EQsZr02NyEF5XT8Qi Cb/6G14hZT+eqAGXsX5DilPj+2P+TMjXQgYgY9JEZoxaF/NJ1R9/Gvr/o91yhTaweSDA bNUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:reply-to:dkim-signature :arc-authentication-results; bh=TL3Mh3o4oIFBEOEBUG48BY+XVhRsHVMGp6zxa1vPoN8=; b=hEPo6CPElHOp9KGiweDrXWqC0o493FZyDS3tGjXDP7pv8YG0IFE8m0RSE/mElAiUU0 TgLxPTbLVvVjkurknHA7S2H5WZAbeUaWf8dlCjY4BeHy/aNJrInVxhks1pu/sgcR8Cpt /nUw5K4DmenryRKnarDMTszOuVQvkuY/yOtCzJ20YmF9t/HLenFtvgaN+Ztp1hHIrkTr tzPWzWzCgAtvpl2+91KlbGm/x8/lIr8DMckZTiGMhLAa8DD8oglNeia+3sSteeA9aj5r 0NygF5M665LA3nCJsNDfdVuD7/nPcjjznWilbL6eheOOAFDQaAZDJm3cUBH1r4UfbrJ6 veyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@monstr-eu.20150623.gappssmtp.com header.s=20150623 header.b=zdJqvx9v; 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 m37-v6si2154644pla.346.2018.03.14.08.12.54; Wed, 14 Mar 2018 08:13:09 -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=pass header.i=@monstr-eu.20150623.gappssmtp.com header.s=20150623 header.b=zdJqvx9v; 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 S1752003AbeCNPKV (ORCPT + 99 others); Wed, 14 Mar 2018 11:10:21 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:34690 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751459AbeCNPKU (ORCPT ); Wed, 14 Mar 2018 11:10:20 -0400 Received: by mail-wr0-f196.google.com with SMTP id o8so5178014wra.1 for ; Wed, 14 Mar 2018 08:10:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=reply-to:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to; bh=TL3Mh3o4oIFBEOEBUG48BY+XVhRsHVMGp6zxa1vPoN8=; b=zdJqvx9vLvDPOUrseZRVohD89IedZ2WAoSyg6GXypFzTHNXk+EuocweIv3JzEpTPI3 ZpWP7u9EqYIPsqOcKMUSgb/BPFTFZMneabSHeU7rBrRhJ6/aDF04FtvEo101JUEjNwpT ScPHd5Ib50vvXgaW+fTRrUAiWVOaIx+3E3/ZSpK8Z+mMkvb9WIsVby3dEVCrBfu5k+FL xWVFS8SSqJCSlrgCngUFCm8JztJmWjiD6fh5h+12CPtB5XgJ8LZ/2zo8D17k0tnnVE5H TtOa0eW/T3ksIwgA/ZkhvlMfOcV7o4Lt9wPr/YsTZZEBQ6ZnvYOwJmAjyBomjLDq6wEo 6LXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:cc:references:from :message-id:date:user-agent:mime-version:in-reply-to; bh=TL3Mh3o4oIFBEOEBUG48BY+XVhRsHVMGp6zxa1vPoN8=; b=Kfg6WTL8tpJ5XPyOIKy7Zl+fMFgiL94EMZs84nqDeehxEvKZ8SCJZck9VpTsUC9hAU vBTek5+Pgtx9WwGET94CwOA8zNfHpR9DKm0kKCcSftfhNplkTkt+DgXu02fhMkDvKems /ytN4RK3zY72J2Wti7vjabXKaHxZys/06CmytP8/mj1TTbfjHiZw78zEYx93MN/dK+D9 Gce8MGcbrHmngalMrMtOb04nX49ci4YoFvYbtHEgonwOAVqtwgTCSLP89PClsZoTmNYa q5qwMhhYhuj0b/05deQ80SlBDQs1Ruj7kzjKXGD04GVYl8iY7XmpFAQcZ8yRWJ91rLlq 5LoQ== X-Gm-Message-State: AElRT7HgoaBFLCZ66j+dCH/O54XQXkPfdQmfkBDOInAhmgk2G2lxe60s wJv5IUlSSsQIZzCCUuZhTtYFJA== X-Received: by 10.223.133.140 with SMTP id 12mr4045824wrt.192.1521040219428; Wed, 14 Mar 2018 08:10:19 -0700 (PDT) Received: from [173.194.76.109] ([149.199.62.254]) by smtp.gmail.com with ESMTPSA id c5sm3502317wrb.47.2018.03.14.08.10.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Mar 2018 08:10:18 -0700 (PDT) Reply-To: monstr@monstr.eu Subject: Re: [PATCH 2/2] microblaze: switch to NO_BOOTMEM To: Michal Simek , linux-kernel@vger.kernel.org Cc: Rob Herring References: <77785f26fa882362b5e72e71845bb607f2cec757.1521039689.git.michal.simek@xilinx.com> From: Michal Simek Message-ID: <6fd76f9a-13b8-3047-57db-4b190bc3f1c1@monstr.eu> Date: Wed, 14 Mar 2018 16:10:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WRBL08s4kukBh7N954UWfWxURNDlN368V" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --WRBL08s4kukBh7N954UWfWxURNDlN368V Content-Type: multipart/mixed; boundary="FCdoMycMskRB83YdrSzdr0F3O6Ngu4Z84"; protected-headers="v1" From: Michal Simek Reply-To: monstr@monstr.eu To: Michal Simek , linux-kernel@vger.kernel.org Cc: Rob Herring Message-ID: <6fd76f9a-13b8-3047-57db-4b190bc3f1c1@monstr.eu> Subject: Re: [PATCH 2/2] microblaze: switch to NO_BOOTMEM References: <77785f26fa882362b5e72e71845bb607f2cec757.1521039689.git.michal.simek@xilinx.com> In-Reply-To: --FCdoMycMskRB83YdrSzdr0F3O6Ngu4Z84 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 14.3.2018 16:01, Michal Simek wrote: > From: Rob Herring >=20 > Microblaze doesn't set CONFIG_NO_BOOTMEM and so memblock_virt_alloc() > doesn't work for CONFIG_HAVE_MEMBLOCK && !CONFIG_NO_BOOTMEM. >=20 > Similar change was already done by others architectures > "ARM: mm: Remove bootmem code and switch to NO_BOOTMEM" > (sha1: 84f452b1e8fc73ac0e31254c66e3e2260ce5263d) > or > "openrisc: Consolidate setup to use memblock instead of bootmem" > (sha1: 266c7fad157265bb54d17db1c9545f2aaa488643) > or > "parisc: Drop bootmem and switch to memblock" > (sha1: 4fe9e1d957e45ad8eba9885ee860a0e93d13a7c7) > or > "powerpc: Remove bootmem allocator" > (sha1: 10239733ee8617bac3f1c1769af43a88ed979324) > or > "s390/mm: Convert bootmem to memblock" > (sha1: 50be634507284eea38df78154d22615d21200b42) > or > "sparc64: Convert over to NO_BOOTMEM." > (sha1: 625d693e9784f988371e69c2b41a2172c0be6c11) > or > "xtensa: drop sysmem and switch to memblock" > (sha1: 0e46c1115f5816949220d62dd3ff04aa68e7ac6b) >=20 > Issue was introduced by: > "of/fdt: use memblock_virt_alloc for early alloc" > (sha1: 0fa1c579349fdd90173381712ad78aa99c09d38b) >=20 > Signed-off-by: Rob Herring > Tested-by: Alvaro Gamez Machado > Tested-by: Michal Simek > Signed-off-by: Michal Simek > --- >=20 > arch/microblaze/Kconfig | 1 + > arch/microblaze/mm/init.c | 55 ++++++---------------------------------= -------- > 2 files changed, 7 insertions(+), 49 deletions(-) >=20 > diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig > index 4f798aa671dd..3817a3e2146c 100644 > --- a/arch/microblaze/Kconfig > +++ b/arch/microblaze/Kconfig > @@ -24,6 +24,7 @@ config MICROBLAZE > select HAVE_FTRACE_MCOUNT_RECORD > select HAVE_FUNCTION_GRAPH_TRACER > select HAVE_FUNCTION_TRACER > + select NO_BOOTMEM > select HAVE_MEMBLOCK > select HAVE_MEMBLOCK_NODE_MAP > select HAVE_OPROFILE > diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c > index 5bc9c7fbb541..6ab1ef2daf1d 100644 > --- a/arch/microblaze/mm/init.c > +++ b/arch/microblaze/mm/init.c > @@ -32,9 +32,6 @@ > #ifndef CONFIG_MMU > unsigned int __page_offset; > EXPORT_SYMBOL(__page_offset); > - > -#else > -static int init_bootmem_done; > #endif /* CONFIG_MMU */ > =20 > char *klimit =3D _end; > @@ -174,17 +171,6 @@ void __init setup_memory(void) > pr_info("%s: max_low_pfn: %#lx\n", __func__, max_low_pfn); > pr_info("%s: max_pfn: %#lx\n", __func__, max_pfn); > =20 > - /* > - * Find an area to use for the bootmem bitmap. > - * We look for the first area which is at least > - * 128kB in length (128kB is enough for a bitmap > - * for 4GB of memory, using 4kB pages), plus 1 page > - * (in case the address isn't page-aligned). > - */ > - map_size =3D init_bootmem_node(NODE_DATA(0), map_size variable should be also removed. Fixed in v2. Thanks, Michal --=20 Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Xilinx Microblaze Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP SoCs --FCdoMycMskRB83YdrSzdr0F3O6Ngu4Z84-- --WRBL08s4kukBh7N954UWfWxURNDlN368V Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iEYEARECAAYFAlqpO1UACgkQykllyylKDCG1mgCfZcUEcJaciXIwLgwlROEwFsdp eVwAn1xptOsI0rAZl7DASJvZYMYycSyP =C+/c -----END PGP SIGNATURE----- --WRBL08s4kukBh7N954UWfWxURNDlN368V--