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=-13.8 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 EE4C8C433B4 for ; Mon, 10 May 2021 13:24:06 +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 4C9DB6128D for ; Mon, 10 May 2021 13:24:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C9DB6128D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Yc54eP5h3zU3zL6GKEiMSqaSqWLz+YitwsjHGysGbPM=; b=OsG3ktKQmIYeYVAkHQMbmnZlo d/J/PgTgKPOz5GW3954HlFXr45kEKu2xPlFn7W+ighyeo/4px5IF4mVtnmiMLZmtXWnz46gXPmgeS Es8eD1jNtICRPCWwz1Y4x4iyd3cvcrShMS5Lp5ERLBZR6wisLUK+1sbdR6M3Halsbheumhvg2XCRl u/RkkymzHcGZhPwbboLxgiJ11rfuyEWHewdU3LHjCsWIbDaHUHmOWDp9nFv1Sj2xXx2RpsL4b5hlk dgeo5S67ELYpcuoBiY/DC90tlFoh0oQroM/Z9Yvp15kJcH5FgPIDHbjH7KAn56GDXZU7xGAAgr/fz gJZ9H1noQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lg5rX-00ERM3-IK; Mon, 10 May 2021 13:22:19 +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 1lg5rH-00ERIj-Fh for linux-arm-kernel@desiato.infradead.org; Mon, 10 May 2021 13:22:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=Tl7s734YASKJ3u2oeYhTRanwUBfl3NVcj5cenpAt2BA=; b=jePmxG6dkyGO93pK0CClT4hv8d UjB295vXjY8aAPSE6DeeA9miSNKthyYqTW1QHz1ZE15iFFlDf7C1jFITnoY9wCFqj8EbKBZZLTWEJ wNwy0TT8dDUX+YD8VznGBhZzg0Nvxjv7MrlVmXwYYSIwDC9zrpUbASbsCKHw2moxzbaFq5g01nHLn +3O79UAx1d20TsCP9sN0fKARn7P6Pqwc0Ro4MP4qbsHRrC+3H1Tx76+Zq2S1LC/XZVQYYjBYcF6YL 4dch3EI8/bfZLDUNsMsLueoRda14ERMMf2DIduihaQ08CVkWWzi6UabKLgtFJPlNyWqd3zW3iBH77 7gR3y0kA==; Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg5rD-008kEL-Ro for linux-arm-kernel@lists.infradead.org; Mon, 10 May 2021 13:22:02 +0000 Received: by mail-pg1-x536.google.com with SMTP id m190so13327843pga.2 for ; Mon, 10 May 2021 06:21:59 -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=Tl7s734YASKJ3u2oeYhTRanwUBfl3NVcj5cenpAt2BA=; b=RDNUTjjWuPi6DrAVXk8S4EwXsMHELJPuIrLV/GV2tDwYTZFG3kponlg/mD8htKAyyF l7ey9CPgxtsQmt+SKIeXQqZf0RDK5L4bIpU2aTmB3pdJwQg10YYuzIWbMuTVz+t3I26m /bB9ZUiSM7i3rLGqwTeBrqbblqUAX6JuNb10VUTLGtGZo/h0w8WyNGFozhZcq1I9zP6k 1WxYPMP7mFlac3OmtpUnzJGjOVZEqugQeWazlVMnRMYTe7daWLp/P1BGkEGxNu9SxSys Y6kPDxBLRslvFbe7zk9KG7lS1VLuGswJnYcxz7uYKn1E7YGJ22wBJ5lF3bDzdNroD+wu Z3+A== 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=Tl7s734YASKJ3u2oeYhTRanwUBfl3NVcj5cenpAt2BA=; b=Z1eBgDmfEKDz27cI6J7PrtxvLN/i2ia/3p2Ltx0hh4OW48tGmbynyZfO5ePeauq9a3 WPwNsx+vOwoMYzX9KmCA5o48UUh1hNyKIhbj0m7K1OZK+blCFVdAwaNry1Xqa4Zg7YVd oZimX9LnIH2PvVhEqql6Zmh4bkNl9gFntAPh/bgfiyaIYpKaMAiijsBEbqS26DXKtn53 sfSGT9NkI/yeiLttSyFsEddARjdQ1uc0ZwTujtI+cxkyXFzI9+AcTTSn7hcc7eALvYQg b/7WSNqmr3OsfqkXBq2w9NLOokG+cAKDTVj1zLhgFrwImobyag1vYhcPbpnLWybNbNrI qIJA== X-Gm-Message-State: AOAM532QDImKe+3oBJR4/dZRXQRo6aFK51ZXQd5O29kVjy5zk0J+nvfi OuJn027A9j50I4KCN1UUVto= X-Google-Smtp-Source: ABdhPJwgpvW8eWnj+FLU83e1o6few5DdpVIj8azOzsaa1GO2bWm6iQV+eSPlzZo49yqqgnor60zVUg== X-Received: by 2002:a63:490:: with SMTP id 138mr24777071pge.99.1620652918900; Mon, 10 May 2021 06:21:58 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id n8sm11129351pgm.7.2021.05.10.06.21.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 May 2021 06:21:58 -0700 (PDT) From: Florian Fainelli To: stable@vger.kernel.org Cc: Ard Biesheuvel , "kernelci.org bot" , Linus Walleij , Russell King , Florian Fainelli , Jonathan Corbet , Russell King , Nicolas Pitre , Mike Rapoport , Andrew Morton , Nick Desaulniers , Joe Perches , Max Filippov , Tian Tao , 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 , Sasha Levin Subject: [PATCH stable 5.10 v2 4/4] ARM: 9027/1: head.S: explicitly map DT even if it lives in the first physical section Date: Mon, 10 May 2021 06:21:11 -0700 Message-Id: <20210510132111.1690943-5-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510132111.1690943-1-f.fainelli@gmail.com> References: <20210510132111.1690943-1-f.fainelli@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210510_062159_931861_1BD1A756 X-CRM114-Status: GOOD ( 19.69 ) 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 From: Ard Biesheuvel commit 10fce53c0ef8f6e79115c3d9e0d7ea1338c3fa37 upstream The early ATAGS/DT mapping code uses SECTION_SHIFT to mask low order bits of R2, and decides that no ATAGS/DTB were provided if the resulting value is 0x0. This means that on systems where DRAM starts at 0x0 (such as Raspberry Pi), no explicit mapping of the DT will be created if R2 points into the first 1 MB section of memory. This was not a problem before, because the decompressed kernel is loaded at the base of DRAM and mapped using sections as well, and so as long as the DT is referenced via a virtual address that uses the same translation (the linear map, in this case), things work fine. However, commit 7a1be318f579 ("9012/1: move device tree mapping out of linear region") changes this, and now the DT is referenced via a virtual address that is disjoint from the linear mapping of DRAM, and so we need the early code to create the DT mapping unconditionally. So let's create the early DT mapping for any value of R2 != 0x0. Reported-by: "kernelci.org bot" Reviewed-by: Linus Walleij Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King Signed-off-by: Florian Fainelli --- arch/arm/kernel/head.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 8cd968199e2c..4af5c7679624 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S @@ -274,10 +274,10 @@ __create_page_tables: * We map 2 sections in case the ATAGs/DTB crosses a section boundary. */ mov r0, r2, lsr #SECTION_SHIFT - movs r0, r0, lsl #SECTION_SHIFT + cmp r2, #0 ldrne r3, =FDT_FIXED_BASE >> (SECTION_SHIFT - PMD_ORDER) addne r3, r3, r4 - orrne r6, r7, r0 + orrne r6, r7, r0, lsl #SECTION_SHIFT strne r6, [r3], #1 << PMD_ORDER addne r6, r6, #1 << SECTION_SHIFT strne r6, [r3] -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel