From patchwork Wed Sep 29 18:16:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 12526441 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53795C433F5 for ; Wed, 29 Sep 2021 18:21:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 19C8F6124D for ; Wed, 29 Sep 2021 18:21:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 19C8F6124D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=0VOBY4DEW31ZgdIJWsf2Iu+n+O2Fid4gdNeHDNsfYgs=; b=oGHNmkcDVfqGXP S9Mw1AdwlZdbLNST414vjAf+KdBgsG7SRr1k72e1ItudNRc4AHMQoCpguNJJf2hzCuRR41OP1JK21 GmBr7ZCUlISXgpUQh8tUuyhLNeZ38QG40jCCbMx7u19MIdAzaVlVrqSUZBFJW+eOFthuCApD1cSD7 MP5one4KcSG+uezBk/N6a3Rj8NiqkuOW/KYkvA2dZFge3Qt+5fCc8NgVJfg94vgKaGZFP2OcUC+dC p69OTChv5YKvxi3b29CKl5lzDsLEHKgnNSqBx00XYX4REmUFxt3nnvEoRQ92XdcSH0T1+qs9v85oE Sb/d96O+IGNJt0HSh8pg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVeAg-00C37L-Dg; Wed, 29 Sep 2021 18:19:10 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVeAc-00C36H-O1 for linux-arm-kernel@lists.infradead.org; Wed, 29 Sep 2021 18:19:08 +0000 Received: by mail-wm1-x333.google.com with SMTP id i6-20020a1c3b06000000b0030d05169e9bso3878293wma.4 for ; Wed, 29 Sep 2021 11:19:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GFzH5hITTRN1V5OZpNAVPp73YgNW/RpLchp3GtiSXo4=; b=W1TUAZlaw/e8DQIF7edqAaicu+IQNIuf0gyontypngQe8+38JwnhEdZYOPXfDsr91B 9iEkIZ5zL59YTdyfuwChWIQItLAySgEpGmiIOiRzC2J5PYabyCCg8MvOAaTW90G+6bqm 5Ap5US6WbLQOjbM91roVUFwKzIKZsZI0a9YW5bVZhOHC4uZGCGwHXZL1i39v/s6ipJo4 lA2vCyYGrDlHZ8BkI3iceDFP+dAC+/CvCMf/AijKA2x62aEEpYCmPK8h5kkVa9PRvbCA WgvQX50RSYQ3Htzu1dI/YD4NgWAyKFw6y+qEEOC2sAVVleVEF7DOvFQOebY/65ve39Ye Jobw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GFzH5hITTRN1V5OZpNAVPp73YgNW/RpLchp3GtiSXo4=; b=iSAitLf2SIRNa16xETf1x2m8bsMVlY/pI5CKHcEk0mnq6gN7wb6ruoU8mldEcvU6AX G81gb5Spaq5l+P1g9DfQn3YhVXIvyBMXs3ny77dQYYJ7VQBiipn0z+FbFizxhMcfhQ11 /hocc7zRl1R87WcSXBHOp2x4OSO9dR2c9O6X6SfP0bgaY99+4hd5jkxVle5XMWtyhv9L hCpF5hJFmHsXvM6zT8pF3rUn3hH5Yl724yfuotHhzTyL1urHWNQbLN519qKIipFu+Dxi MQtbnzjqbrzq3+T0jKreCV1OwN6QOrsH4wtEOAz+/AtOOz2kGigIcalWiqTYuLzNo5m2 zmwQ== X-Gm-Message-State: AOAM530FgFT34vhUeY2rtBSUPJu2QSgJdaxDd24/PxBo4q7243QIXage ORC9iI4q0ujs74+3mhRNGyA= X-Google-Smtp-Source: ABdhPJxHrE5APi8qWcepSYnhoXLeO3mw2C4m/dEVIjbr6POCv1tQ7PKeXKeXepotIdvv9g5VrgX3RQ== X-Received: by 2002:a1c:94:: with SMTP id 142mr7940052wma.116.1632939542071; Wed, 29 Sep 2021 11:19:02 -0700 (PDT) Received: from localhost.localdomain ([2a01:cb1d:3d5:a100:264b:feff:fe03:2806]) by smtp.googlemail.com with ESMTPSA id d24sm534998wmb.35.2021.09.29.11.19.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Sep 2021 11:19:01 -0700 (PDT) From: Corentin Labbe To: linux@armlinux.org.uk, linus.walleij@linaro.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Corentin Labbe , =?utf-8?q?Krzysztof_Ha=C5=82asa?= Subject: [PATCH] ARM: handle CONFIG_CPU_ENDIAN_BE32 in arch/arm/kernel/head.S Date: Wed, 29 Sep 2021 20:16:45 +0200 Message-Id: <20210929181645.21855-1-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210929_111906_810660_F06FA801 X-CRM114-Status: GOOD ( 12.50 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org My intel-ixp42x-welltech-epbx100 no longer boot since 4.14. This is due to commit 463dbba4d189 ("ARM: 9104/2: Fix Keystone 2 kernel mapping regression") which forgot to handle CONFIG_CPU_ENDIAN_BE32 as possible BE config. Suggested-by: Krzysztof HaƂasa Fixes: 463dbba4d189 ("ARM: 9104/2: Fix Keystone 2 kernel mapping regression") Signed-off-by: Corentin Labbe Reviewed-by: Linus Walleij --- 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 29070eb8df7d..3fc7f9750ce4 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S @@ -253,7 +253,7 @@ __create_page_tables: add r0, r4, #KERNEL_OFFSET >> (SECTION_SHIFT - PMD_ORDER) ldr r6, =(_end - 1) adr_l r5, kernel_sec_start @ _pa(kernel_sec_start) -#ifdef CONFIG_CPU_ENDIAN_BE8 +#if defined CONFIG_CPU_ENDIAN_BE8 || defined CONFIG_CPU_ENDIAN_BE32 str r8, [r5, #4] @ Save physical start of kernel (BE) #else str r8, [r5] @ Save physical start of kernel (LE) @@ -266,7 +266,7 @@ __create_page_tables: bls 1b eor r3, r3, r7 @ Remove the MMU flags adr_l r5, kernel_sec_end @ _pa(kernel_sec_end) -#ifdef CONFIG_CPU_ENDIAN_BE8 +#if defined CONFIG_CPU_ENDIAN_BE8 || defined CONFIG_CPU_ENDIAN_BE32 str r3, [r5, #4] @ Save physical end of kernel (BE) #else str r3, [r5] @ Save physical end of kernel (LE)