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.7 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, UNWANTED_LANGUAGE_BODY,URIBL_BLOCKED,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 9EA0DC4338F for ; Tue, 24 Aug 2021 13:52:33 +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 697A2610CD for ; Tue, 24 Aug 2021 13:52:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 697A2610CD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id: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=bEw1x8Zn+IOEO9+0HZAT8KvoqByGDbI9YJCsPbHVQns=; b=bgZjd99jqsRb6W sRES1RQmWlYmcu2QaZWWUHY+6cLnK9VLORuqa1lW8Irl8Sltv2Poo//JscOGKwzq+GomgPGiGPqdQ U1C0T1WIvWmQO9vGIspgsWLJz2G729KqtRF049Z96FfdDUmtukNb2l5Hxi4+PlLbgpISDzZdNqCS5 mdTqqvtCdWRXegVJSDOXRa6vLPlIcAlLhNDQrc4w571b+kvD83H/+dd+o/dQH4TpU3XrFACv51y4W h3ozkAZs/XXXcOpVvqwM6ad3XaexmlW1YqWSXDOkp5rt7Cjl3a5AgIXlPSo9jEbT4k7uyLxK2vgZd Y59GQaS/V7MXyQ1fjBiw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mIWos-003IzZ-QI; Tue, 24 Aug 2021 13:50:26 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mIWnu-003Ig2-GA for linux-arm-kernel@lists.infradead.org; Tue, 24 Aug 2021 13:49:28 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 15FEC13A1; Tue, 24 Aug 2021 06:49:25 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 4B75C3F766; Tue, 24 Aug 2021 06:49:24 -0700 (PDT) From: Mark Rutland To: linux-arm-kernel@lists.infradead.org Cc: alexandru.elisei@arm.com, andre.przywara@arm.com, mark.rutland@arm.com, maz@kernel.org Subject: [boot-wrapper PATCH 4/5] Rename kernel *_RESET values to *_KERNEL Date: Tue, 24 Aug 2021 14:48:59 +0100 Message-Id: <20210824134900.34849-5-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20210824134900.34849-1-mark.rutland@arm.com> References: <20210824134900.34849-1-mark.rutland@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210824_064926_647939_35ACAA21 X-CRM114-Status: GOOD ( 11.31 ) 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: , MIME-Version: 1.0 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 Our *_RESET constants are used to initalize state for the kernel rather than the bootwrapper itself, so for clarity we should use a *_KERNEL suffix rather than a _RESET suffix. Signed-off-by: Mark Rutland --- arch/aarch32/boot.S | 4 ++-- arch/aarch32/include/asm/cpu.h | 4 ++-- arch/aarch64/boot.S | 4 ++-- arch/aarch64/include/asm/cpu.h | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/aarch32/boot.S b/arch/aarch32/boot.S index e397cb0..08bf932 100644 --- a/arch/aarch32/boot.S +++ b/arch/aarch32/boot.S @@ -76,10 +76,10 @@ ASM_FUNC(jump_kernel) push {r0 - r3} mov r5, sp - ldr r0, =HSCTLR_RESET + ldr r0, =HSCTLR_KERNEL mcr p15, 4, r0, c1, c0, 0 @ HSCTLR - ldr r0, =SCTLR_RESET + ldr r0, =SCTLR_KERNEL mcr p15, 0, r0, c1, c0, 0 @ SCTLR /* Reset our stack pointer */ diff --git a/arch/aarch32/include/asm/cpu.h b/arch/aarch32/include/asm/cpu.h index a7993f0..105cae5 100644 --- a/arch/aarch32/include/asm/cpu.h +++ b/arch/aarch32/include/asm/cpu.h @@ -13,8 +13,8 @@ #define MPIDR_INVALID (-1) /* Only RES1 bits and CP15 barriers for the kernel */ -#define HSCTLR_RESET (3 << 28 | 3 << 22 | 1 << 18 | 1 << 16 | 1 << 11 | 3 << 4) -#define SCTLR_RESET (3 << 22 | 1 << 11 | 1 << 5 | 3 << 4) +#define HSCTLR_KERNEL (3 << 28 | 3 << 22 | 1 << 18 | 1 << 16 | 1 << 11 | 3 << 4) +#define SCTLR_KERNEL (3 << 22 | 1 << 11 | 1 << 5 | 3 << 4) #define PSR_SVC 0x13 #define PSR_HYP 0x1a diff --git a/arch/aarch64/boot.S b/arch/aarch64/boot.S index d8d7ccd..587a25f 100644 --- a/arch/aarch64/boot.S +++ b/arch/aarch64/boot.S @@ -140,10 +140,10 @@ ASM_FUNC(jump_kernel) mov x22, x3 mov x23, x4 - ldr x0, =SCTLR_EL1_RESET + ldr x0, =SCTLR_EL1_KERNEL msr sctlr_el1, x0 - ldr x0, =SCTLR_EL2_RESET + ldr x0, =SCTLR_EL2_KERNEL msr sctlr_el2, x0 cpuid x0, x1 diff --git a/arch/aarch64/include/asm/cpu.h b/arch/aarch64/include/asm/cpu.h index 1cddbb8..63eb1c3 100644 --- a/arch/aarch64/include/asm/cpu.h +++ b/arch/aarch64/include/asm/cpu.h @@ -17,7 +17,7 @@ * RES1 bits, little-endian, caches and MMU off, no alignment checking, * no WXN. */ -#define SCTLR_EL2_RESET (3 << 28 | 3 << 22 | 1 << 18 | 1 << 16 | 1 << 11 | 3 << 4) +#define SCTLR_EL2_KERNEL (3 << 28 | 3 << 22 | 1 << 18 | 1 << 16 | 1 << 11 | 3 << 4) #define SPSR_A (1 << 8) /* System Error masked */ #define SPSR_D (1 << 9) /* Debug masked */ @@ -37,10 +37,10 @@ #ifdef KERNEL_32 /* 32-bit kernel decompressor uses CP15 barriers */ -#define SCTLR_EL1_RESET (SCTLR_EL1_RES1 | SCTLR_EL1_CP15BEN) +#define SCTLR_EL1_KERNEL (SCTLR_EL1_RES1 | SCTLR_EL1_CP15BEN) #define SPSR_KERNEL (SPSR_A | SPSR_I | SPSR_F | SPSR_HYP) #else -#define SCTLR_EL1_RESET SCTLR_EL1_RES1 +#define SCTLR_EL1_KERNEL SCTLR_EL1_RES1 #define SPSR_KERNEL (SPSR_A | SPSR_D | SPSR_I | SPSR_F | SPSR_EL2H) #endif -- 2.11.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel