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=-5.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 84511C47080 for ; Tue, 1 Jun 2021 13:54:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 04768613B4 for ; Tue, 1 Jun 2021 13:54:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 04768613B4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4B18E6B006C; Tue, 1 Jun 2021 09:54:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4617C6B0070; Tue, 1 Jun 2021 09:54:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2DBBF6B0073; Tue, 1 Jun 2021 09:54:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0158.hostedemail.com [216.40.44.158]) by kanga.kvack.org (Postfix) with ESMTP id F15B06B006C for ; Tue, 1 Jun 2021 09:54:24 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 8EB21180AD817 for ; Tue, 1 Jun 2021 13:54:24 +0000 (UTC) X-FDA: 78205299648.28.597D287 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) by imf29.hostedemail.com (Postfix) with ESMTP id 7E332546 for ; Tue, 1 Jun 2021 13:54:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: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=7XhK7llXjchxp+a7TIgBxmkimmZHUZAa+hOWlZXnwvg=; b=KncBS8kthwg3/xy/MOY43kE0h GeNUvPLx3dDFs6+dHwh1EQOBgZeQ5IT1d6n3R/Tb9lm/DMGylf0lUWUfHQgt2DqU57BKJrjGLuvI7 /vG8ZR1O/gMBxZmdlgxD7Q/TaSqixgY9cAfRnSEnXeV0PUNFEG3eNEL+1XBwizX7EYHRMzqQ43K/N CZ1f/ezxnSUS0YZXKaQIkgAlYsa3pzKPIqcnNjV3ovUf2LlvfMC3e4VdVzEcyf/0G8HWTl+HqgSjn IlpWwBowpE8lGcsTYVuz8eRYavqP0MF5t6cOubxsRlbYL2kfbZW4Aswfj/WFcqA+RlCKRKpGB+Sza FTmWKOfNA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:44578) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lo4qW-0004A2-Hm; Tue, 01 Jun 2021 14:54:16 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1lo4qV-0000Al-MC; Tue, 01 Jun 2021 14:54:15 +0100 Date: Tue, 1 Jun 2021 14:54:15 +0100 From: "Russell King (Oracle)" To: Mike Rapoport Cc: linux-kernel@vger.kernel.org, Andrew Morton , Catalin Marinas , Christian Borntraeger , David Hildenbrand , Heiko Carstens , Mike Rapoport , Thomas Bogendoerfer , Vasily Gorbik , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-s390@vger.kernel.org Subject: Re: [RFC/RFT PATCH 2/5] memblock: introduce generic memblock_setup_resources() Message-ID: <20210601135415.GZ30436@shell.armlinux.org.uk> References: <20210531122959.23499-1-rppt@kernel.org> <20210531122959.23499-3-rppt@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210531122959.23499-3-rppt@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 7E332546 Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=armlinux.org.uk header.s=pandora-2019 header.b=KncBS8kt; dmarc=pass (policy=none) header.from=armlinux.org.uk; spf=none (imf29.hostedemail.com: domain of linux@armlinux.org.uk has no SPF policy when checking 78.32.30.218) smtp.mailfrom=linux@armlinux.org.uk X-Rspamd-Server: rspam03 X-Stat-Signature: 8i61o4w4s8p6pwit1k9tyr6i48cneg3d X-HE-Tag: 1622555648-430060 X-Bogosity: Ham, tests=bogofilter, spamicity=0.174574, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, May 31, 2021 at 03:29:56PM +0300, Mike Rapoport wrote: > + code_resource.start = __pa_symbol(_text); > + code_resource.end = __pa_symbol(_etext)-1; > + rodata_resource.start = __pa_symbol(__start_rodata); > + rodata_resource.end = __pa_symbol(__end_rodata)-1; > + data_resource.start = __pa_symbol(_sdata); > + data_resource.end = __pa_symbol(_edata)-1; > + bss_resource.start = __pa_symbol(__bss_start); > + bss_resource.end = __pa_symbol(__bss_stop)-1; This falls short on 32-bit ARM. The old code was: - kernel_code.start = virt_to_phys(_text); - kernel_code.end = virt_to_phys(__init_begin - 1); - kernel_data.start = virt_to_phys(_sdata); - kernel_data.end = virt_to_phys(_end - 1); If I look at one of my kernels: c0008000 T _text c0b5b000 R __end_rodata ... exception and unwind tables live here ... c0c00000 T __init_begin c0e00000 D _sdata c0e68870 D _edata c0e68870 B __bss_start c0e995d4 B __bss_stop c0e995d4 B _end So the original covers _text..__init_begin-1 which includes the exception and unwind tables. Your version above omits these, which leaves them exposed. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!