Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4126188yba; Tue, 23 Apr 2019 15:52:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqyIJyfhz9y/noDFZr+cChoTyD5ZZIQSnC5vYWcP/Dq1paRj9bA69GjZKqlOTdZPZ+QpGIid X-Received: by 2002:a63:2943:: with SMTP id p64mr24377414pgp.151.1556059953782; Tue, 23 Apr 2019 15:52:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556059953; cv=none; d=google.com; s=arc-20160816; b=xlXVO+JONa69VeqsfbkJV0eyt/gOrntS+ys4jIdcqQdNShDUNMW5JZDys2n3+unj3s hHXMzwc29DnCU0tiyycqUMcMqJShmeBZ6m7DHXluteZT8QP/Mny3Iv5MrHTSdRFWag/9 aQ19BuUiLlPbSnbN352tvzgoYYfuDLwab3xP6MTGe3asrO+uw4Vj7TBU5ldJpX0NC3u2 pXFsjos1AWGBH/Tw7c2gE7etUCPGonJG9h5j5s+Mc81iw50AuooyUoBSUTqh+dDc1Fs/ /yCFBYagRzOdH1WWy8dSz5bZSoGHfUTfOi4m9WiS56sOa+t1JhrWgSY0NjnXZeC4CrWp 938A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FrbxXCzbduE6bxqzUV5O8VcSJ/8bNCEge0K7+QXqWcw=; b=W7Od6gg4mbpVrZiZeQS6goF6CO+ItuNrTYtwudw+BU/iYLMoQqMzRCHpbtUJNNqiRZ BcP0RtvIdliyU9SzByjGkUaY6EGvQSpwxGoOEHMnNdTd13Uyg3WCaaTTywDKT7sYLj2u rbC+koIe09DQAlxOZP7svUYHQso72xddcEi5hvd+f6oL5PTOOUqlI7+acaX9/kUK7wnD /jvz5On0lo+rSUfZRixL6c1k80LQTa5+IRzAwFGsi8IbTJ2Q/QPvIOI7fj+gKgLr4YYw RJxN5hXHhF+9Oj4ojpnfFu/YBwi1xGL9ev+K0MQS4AaCveN4tbIFrllLtiqefE9W1wu+ Qj0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=C5Z0Eri1; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v22si17276444pfm.151.2019.04.23.15.52.19; Tue, 23 Apr 2019 15:52:33 -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=@gmail.com header.s=20161025 header.b=C5Z0Eri1; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728677AbfDWWtf (ORCPT + 99 others); Tue, 23 Apr 2019 18:49:35 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:36973 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728594AbfDWWtc (ORCPT ); Tue, 23 Apr 2019 18:49:32 -0400 Received: by mail-lf1-f68.google.com with SMTP id h126so2367687lfh.4; Tue, 23 Apr 2019 15:49:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FrbxXCzbduE6bxqzUV5O8VcSJ/8bNCEge0K7+QXqWcw=; b=C5Z0Eri1E/MgiwW5s2hJ0I1+mpTOAalvY1gdEQyVcQyh4k+SOdcbvwPxE/PwmN+QEI 6L5RaXXhRNFfMEXXelOg9V8ff+GNNUNB5C40hqDz4G3Q8Djt0uRDxI/WKSP1cFdit0PI fUlugbB+qa0GPzP4IFVCeqRQV/h8ikqJ8erozIB8Ox/8stkwW3YGwHHuv0vjfGFOurMw ryncVMimSMKti+L1l0/QyZufwrnCCDY+aMc3X0oGHwajcD6vwD/0GidUyJwf1A1OPpqs 6x84dc+Z39ecs9vxLaVKwJospMybQWYrIoUmyohkvCAo8y4mDNYX9qZiF4rKrdic6hUi hqyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FrbxXCzbduE6bxqzUV5O8VcSJ/8bNCEge0K7+QXqWcw=; b=Cy9wh4o1vzU1fQMt8WDaDiCwjt2zro2KDcorfi8q2hzGqwlVZzWN3i8cK3fKbFMNIE ELojqGAKAKk3/PdoPCS1KqfdUt04SXBT66mhIcTRSgHuayXUY1DD9VDTGgWk4KB7m9iG /J65sa/G3aNaPjnrjF/LcfqOYmevOXS6swYX8fNtafB1rCviNoT5pn4Iq282JDFzPTaA DHK9JagLrNi7cnLeM4kpN+/m6V/m9h58X+foaa7vRg1hHyfvqyJHk3AsG+oO64KgcgPu BvbosEAOyP1YvN0OHuEqm6IeXH4SGl86DYZqe0tqfx0a5IyI33XT5G74Cw44THBjtIgv YcYg== X-Gm-Message-State: APjAAAUmTvFxl6mLEBo1YGfoRhdnBtZu9IWb1mQYDxDl/60kwkGSPrbN U54HUEe9TPczdAaQVaVidCU= X-Received: by 2002:ac2:51a1:: with SMTP id f1mr7455057lfk.129.1556059770067; Tue, 23 Apr 2019 15:49:30 -0700 (PDT) Received: from localhost.localdomain ([5.164.240.123]) by smtp.gmail.com with ESMTPSA id w2sm4904722lfa.63.2019.04.23.15.49.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Apr 2019 15:49:29 -0700 (PDT) From: Serge Semin To: 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 Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Serge Semin Subject: [PATCH 05/12] mips: Discard post-CMA-init foreach loop Date: Wed, 24 Apr 2019 01:47:41 +0300 Message-Id: <20190423224748.3765-6-fancer.lancer@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190423224748.3765-1-fancer.lancer@gmail.com> References: <20190423224748.3765-1-fancer.lancer@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Really the loop is pointless, since it walks over memblock-reserved memory regions and mark them as reserved in memblock. Before bootmem was removed from the kernel, this loop had been used to map the memory reserved by CMA into the legacy bootmem allocator. But now the early memory allocator is memblock, which is used by CMA for reservation, so we don't need any mapping anymore. Reviewed-by: Matt Redfearn Signed-off-by: Serge Semin --- arch/mips/kernel/setup.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index f71a7d32a687..2ae6b02b948f 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -708,7 +708,6 @@ static void __init request_crashkernel(struct resource *res) */ static void __init arch_mem_init(char **cmdline_p) { - struct memblock_region *reg; extern void plat_mem_setup(void); /* @@ -814,10 +813,6 @@ static void __init arch_mem_init(char **cmdline_p) plat_swiotlb_setup(); dma_contiguous_reserve(PFN_PHYS(max_low_pfn)); - /* Tell bootmem about cma reserved memblock section */ - for_each_memblock(reserved, reg) - if (reg->size != 0) - memblock_reserve(reg->base, reg->size); reserve_bootmem_region(__pa_symbol(&__nosave_begin), __pa_symbol(&__nosave_end)); /* Reserve for hibernation */ -- 2.21.0