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=-14.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 E4F4CC433B4 for ; Mon, 17 May 2021 11:40:48 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 61E9161073 for ; Mon, 17 May 2021 11:40:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 61E9161073 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:In-Reply-To:Date:From:Cc:To: Subject:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References:List-Owner; bh=4cthMXuh7PxRKhKYHwZ4ud664h1Eog3K6iBdSbGAorY=; b=B2r6lCYgkiSjFDCM17sw/jul6 v4H2Y+/htHTSMdKDkC/agdg41Q8sQ5FergSgcY1iwumy3+e57BP+hsWW9wD0WL+qQCTsu72TMfMH1 PnyqVNB/JNEKVqf330WYBlztRV7GaDr91kl3gI2o8fIvrOR8dZBOORTsfaRjA+cWH6XG639KpajIg 1S/Sw6Nq6zTvN7NMMuakUGyaTgkcRN1jucdIIXCvtuA9UdopCUMzNM1I0BqGxddR42/3O1DKWE9f6 PXNsg1bSkIUIsNR9Z5gEYz/zUuuz2xFuvlJxnV+RJTEd+FGKt3YAyUWoVNZB7UbIiVDUqDgBFtZh3 XuV9Hikcw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1libaG-00ElGy-6e; Mon, 17 May 2021 11:38:52 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1libZL-00El4t-1e for linux-arm-kernel@desiato.infradead.org; Mon, 17 May 2021 11:37:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:From:Cc:To:Subject: Sender:Reply-To:Content-ID:Content-Description:References; bh=G9hVsbTZVpRd2Vjiy66ZFWUM/PVZYdOGROMRoi+BgHc=; b=gTN80KGXu6U4DcmCn+8L1sqEW1 eJmcgICKueCMCXeIGpi05av/4g6ACI3dJwF21HyLnH4otZI4Qj1BJ4F3RpnD+kKQhZ3L8T4e+AkVP g2VotUjjH2YoGvVvTrsve/XXqnZ9Fk4VbwcHIja7x1dcOFmowu6PyAeRuKptHQwqnS7vKhMF7cQLz U8lZ0m3yZJOCGsCAJf7y8dSis9ECeS9J9NjNk7pNLmsYFlGmV/IboMDKPQTsBi+QEfVrzCeul0+vo UsAkugNlwJqln++NIJ1wiUAV01CNHKPNwTvJZV3Gg5ZLrhRLZmxOd11xDVdNxWfhuR0pAWyrXSqbQ jvsH4vHA==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1libZH-00Diwo-1k for linux-arm-kernel@lists.infradead.org; Mon, 17 May 2021 11:37:53 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 449A461166; Mon, 17 May 2021 11:37:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621251470; bh=hOpwRHExaZNKIh2JD7vitFt8Pvr0ewxNXUuSTUgDR5Y=; h=Subject:To:Cc:From:Date:In-Reply-To:From; b=tq9j9nSPrsxmoGFhSL/mncUkZRBJIsZn08Ys4uj9sEuGJnA6nGDRwfHuqdrPDRfbn npUvcLlLkBqFc2sKMUcCR8pewAvSl/LxS+d6Kxzk4BEJsfAuTSbdEej64rN0lU52Vd LRwy1KId6Oc/EfQcrT25RdbpT4I7b3vTOOXQaL/U= Subject: Patch "ARM: 9020/1: mm: use correct section size macro to describe the FDT virtual address" has been added to the 5.4-stable tree To: ardb@kernel.org, corbet@lwn.net, f.fainelli@gmail.com, gregkh@linuxfoundation.org, joel@jms.id.au, linus.walleij@linaro.org, linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk, m.szyprowski@samsung.com, nico@fluxnic.net, rmk+kernel@armlinux.org.uk, sashal@kernel.org Cc: From: Date: Mon, 17 May 2021 13:37:38 +0200 In-Reply-To: <20210510133321.1790243-4-f.fainelli@gmail.com> Message-ID: <1621251458193158@kroah.com> MIME-Version: 1.0 X-stable: commit X-Patchwork-Hint: ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210517_043751_166371_B9D4FBF9 X-CRM114-Status: GOOD ( 18.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is a note to let you know that I've just added the patch titled ARM: 9020/1: mm: use correct section size macro to describe the FDT virtual address to the 5.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: arm-9020-1-mm-use-correct-section-size-macro-to-describe-the-fdt-virtual-address.patch and it can be found in the queue-5.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >From foo@baz Mon May 17 01:36:09 PM CEST 2021 From: Florian Fainelli Date: Mon, 10 May 2021 06:33:20 -0700 Subject: ARM: 9020/1: mm: use correct section size macro to describe the FDT virtual address To: stable@vger.kernel.org Cc: Ard Biesheuvel , Joel Stanley , Marek Szyprowski , Russell King , Florian Fainelli , Jonathan Corbet , Russell King , Linus Walleij , Nicolas Pitre , Sasha Levin , linux-doc@vger.kernel.org (open list:DOCUMENTATION), linux-kernel@vger.kernel.org (open list), linux-arm-kernel@lists.infradead.org (moderated list:ARM PORT), Greg Kroah-Hartman Message-ID: <20210510133321.1790243-4-f.fainelli@gmail.com> From: Ard Biesheuvel commit fc2933c133744305236793025b00c2f7d258b687 upstream Commit 149a3ffe62b9dbc3 ("9012/1: move device tree mapping out of linear region") created a permanent, read-only section mapping of the device tree blob provided by the firmware, and added a set of macros to get the base and size of the virtually mapped FDT based on the physical address. However, while the mapping code uses the SECTION_SIZE macro correctly, the macros use PMD_SIZE instead, which means something entirely different on ARM when using short descriptors, and is therefore not the right quantity to use here. So replace PMD_SIZE with SECTION_SIZE. While at it, change the names of the macro and its parameter to clarify that it returns the virtual address of the start of the FDT, based on the physical address in memory. Tested-by: Joel Stanley Tested-by: Marek Szyprowski Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King Signed-off-by: Florian Fainelli Signed-off-by: Greg Kroah-Hartman --- arch/arm/include/asm/memory.h | 6 +++--- arch/arm/kernel/setup.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h @@ -68,8 +68,8 @@ #define XIP_VIRT_ADDR(physaddr) (MODULES_VADDR + ((physaddr) & 0x000fffff)) #define FDT_FIXED_BASE UL(0xff800000) -#define FDT_FIXED_SIZE (2 * PMD_SIZE) -#define FDT_VIRT_ADDR(physaddr) ((void *)(FDT_FIXED_BASE | (physaddr) % PMD_SIZE)) +#define FDT_FIXED_SIZE (2 * SECTION_SIZE) +#define FDT_VIRT_BASE(physbase) ((void *)(FDT_FIXED_BASE | (physbase) % SECTION_SIZE)) #if !defined(CONFIG_SMP) && !defined(CONFIG_ARM_LPAE) /* @@ -111,7 +111,7 @@ extern unsigned long vectors_base; #define MODULES_VADDR PAGE_OFFSET #define XIP_VIRT_ADDR(physaddr) (physaddr) -#define FDT_VIRT_ADDR(physaddr) ((void *)(physaddr)) +#define FDT_VIRT_BASE(physbase) ((void *)(physbase)) #endif /* !CONFIG_MMU */ --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -1080,7 +1080,7 @@ void __init setup_arch(char **cmdline_p) void *atags_vaddr = NULL; if (__atags_pointer) - atags_vaddr = FDT_VIRT_ADDR(__atags_pointer); + atags_vaddr = FDT_VIRT_BASE(__atags_pointer); setup_processor(); if (atags_vaddr) { Patches currently in stable-queue which might be from f.fainelli@gmail.com are queue-5.4/arm-9020-1-mm-use-correct-section-size-macro-to-describe-the-fdt-virtual-address.patch queue-5.4/arm-9011-1-centralize-phys-to-virt-conversion-of-dt-atags-address.patch queue-5.4/arm-9027-1-head.s-explicitly-map-dt-even-if-it-lives-in-the-first-physical-section.patch queue-5.4/arm-9012-1-move-device-tree-mapping-out-of-linear-region.patch _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel