From patchwork Tue Apr 23 22:47:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 10913791 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 860F114DB for ; Tue, 23 Apr 2019 22:49:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 776AB2887A for ; Tue, 23 Apr 2019 22:49:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6BB3A28924; Tue, 23 Apr 2019 22:49:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1356628913 for ; Tue, 23 Apr 2019 22:49:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727467AbfDWWt0 (ORCPT ); Tue, 23 Apr 2019 18:49:26 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:46644 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726075AbfDWWt0 (ORCPT ); Tue, 23 Apr 2019 18:49:26 -0400 Received: by mail-lj1-f195.google.com with SMTP id h21so14970055ljk.13; Tue, 23 Apr 2019 15:49:24 -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=7741/2a1/SrR4PpN1R0HoKZL/IBWcdVAEL0l49IfvUY=; b=fpbLIdu5Sft9yYIVNXT84yBNZa2bkD54EFhIaCN07y+9Jytm6XEDD+ehA3w3R6JDhf Um8W7TcrFRFtFPuplbtNRQIZv8KofmqqF1D7HDltZW6dBLIAsECFGawUxGtS06N6fWEH U9Fijh1cbNs+31hS5do4yZ4RnPyecdTOeKqLWoPuv9PCKNyLPpONK93lN4X7RYyEvOQR QNqSmjqOkR6Yv3AicISGmIfk4WJfbRiAPt7dO8loLgtT0ZGCi7X09vuYrtbuw1yYSqvB QMOj1H4KyR1Klj5k/ZhaOMETYMHk4YxaduJHZsRnNTzvtPcCFxKuFll6DYWOnlYUGQrO zaOw== 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=7741/2a1/SrR4PpN1R0HoKZL/IBWcdVAEL0l49IfvUY=; b=kNYd1wRlChtpSbbcqPYjMY0qnZ5+Bg1rTSUNPNWgddtEQ7jIPBfe/RTgVClPJIUo5X fs9rnXy+XCFXQcCp62kYXxv059UPTk/qjvpFTMv6t7edjSLcoJUUtmV3wL1Ujhozx11P l5+KZYZ1r9TBShUJEIb8r8jvTYWyNFzo2NIiOOa7TvzYoEix7owNSKziCUofHlAyrr5F gstv/PB/wslk0NQRGIzl/9Nyu9Dtowaoj206p3H6GskTc+N91QU3K2sOWGtYM0icKbOJ sNVT55fuq1iPn+q3exDSH63fPjEZ57Lv5+xU2w16OfNNhey11E1GOMDdaip7t8yK6/Tf 73aA== X-Gm-Message-State: APjAAAWHYijZ9LloYTgl8+nK+lRU9bLSNhDmjHQ7Eyz9k4fd9O7Rwc0D Uu/k2R3yOsP2zL1ib4bIIj0= X-Google-Smtp-Source: APXvYqwBZMORXOuppvcbzkF7hkDJD97M3ZKhmzvmLYFzhOqz1gVXQzJN1+V97c8olF86LQ//E41xvw== X-Received: by 2002:a2e:9b13:: with SMTP id u19mr15286090lji.134.1556059764254; Tue, 23 Apr 2019 15:49:24 -0700 (PDT) Received: from localhost.localdomain ([5.164.240.123]) by smtp.gmail.com with ESMTPSA id w2sm4904722lfa.63.2019.04.23.15.49.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Apr 2019 15:49:23 -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 01/12] mips: Make sure kernel .bss exists in boot mem pool Date: Wed, 24 Apr 2019 01:47:37 +0300 Message-Id: <20190423224748.3765-2-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 Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Current MIPS platform code makes sure the kernel text, data and init sections are added to the boot memory map pool right after the arch-specific memory setup method has been executed. But for some reason the MIPS platform code skipped the kernel .bss section, which definitely should be in the boot mem pool as well in any case. Lets fix this just be adding the space between __bss_start and __bss_stop. Reviewed-by: Matt Redfearn Signed-off-by: Serge Semin --- arch/mips/kernel/setup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 8d1dc6c71173..0ee033c44116 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -809,6 +809,9 @@ static void __init arch_mem_init(char **cmdline_p) arch_mem_addpart(PFN_UP(__pa_symbol(&__init_begin)) << PAGE_SHIFT, PFN_DOWN(__pa_symbol(&__init_end)) << PAGE_SHIFT, BOOT_MEM_INIT_RAM); + arch_mem_addpart(PFN_DOWN(__pa_symbol(&__bss_start)) << PAGE_SHIFT, + PFN_UP(__pa_symbol(&__bss_stop)) << PAGE_SHIFT, + BOOT_MEM_RAM); pr_info("Determined physical RAM map:\n"); print_memory_map();