From patchwork Thu Nov 7 02:58:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 841386 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp859923wru; Wed, 6 Nov 2024 18:58:39 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVro181qfJ4VVxIkbEYLks/VSBxXJwOsfs6wQkM97lojPP+mhrRbPYYDe28NTjoTQ7Npk9SfQ==@linaro.org X-Google-Smtp-Source: AGHT+IG6i4oOeQQXFzlLIxovzAdxe/r0Mp1Q9wrRh9ge8KXQIV/rd2/yy47VOcMREdepvtqwEEVv X-Received: by 2002:a05:600c:3054:b0:431:44fe:fd9f with SMTP id 5b1f17b1804b1-4328327ec3cmr165349885e9.23.1730948319046; Wed, 06 Nov 2024 18:58:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1730948319; cv=none; d=google.com; s=arc-20240605; b=goc9hsGF5F//TA3xWFtNtQ49M7jP7ZxEOwoy7/9Gxtp3dB6GtqEo29kngT0Dv46IqI WSliiBsy86TMkZ+nJNfxCOUKZlRiORxgbwdrR7WWJ8eszrHtS1dimMw3z9vyjuqpbuJH wt/EPlMuxSCM842ZKZIY+iBC3vGPecAii6Jf64ZLv7hKeCX5CpdQq1TUfn8iNnBFzEUM r8luynmtSOv1vVuR/9HPBNveOdU5D9ZZ5nd2EQ3IDbGkVmqPJ/xr9xw7wf6M1mtqKK/1 FgJE1V8gD4kI7VzufQ2RqFeyqemB2BiGcDViEKy27uECa4uoLvq8m01/BaadD1FgIDJ0 KSZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=TNE21ZH5+wzDSDaWBE/g3mpXJTJhpQotd7ensLGy83M=; fh=/+H77JcHNvnX+Q0p6vbw9iZRocQKAeP3hketlvrQae4=; b=NVTc8XlCFzgyEBA746qH0H3IbsYVRdIp/ZoI81FGhFQop4Em3ezyQGzRqekk7yySQm og66pu0ToVk6x66l0PSW9kjjzyCJjo/1aZKGdJZ1rbylw5c783CmQ5+6sE0P09GYom3o CCHWdTm0UGa6IH8BhHIsyWoMdHDEiF3tNnXlu1JJmv5yRzUEIGTIOHnjRvSQBuQOgEmr HN3PapKbQIzlZXYyTNKcORq0a2BO2MOcdf9y1N7VcjXzhj8VXX4pinoO6NiTOVpORIaE 0F5JRITc4H9AApLy/W3EgS3z4Rypjn9Br6Xr1exVhdUfL5zYVq0iVClQ5dSN4eVYIytD 1LNA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kJiK5BpU; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id 5b1f17b1804b1-432b061181dsi3368855e9.98.2024.11.06.18.58.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2024 18:58:39 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kJiK5BpU; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B7C8788CD9; Thu, 7 Nov 2024 03:58:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="kJiK5BpU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CA707891D7; Thu, 7 Nov 2024 03:58:36 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 389DC88A9D for ; Thu, 7 Nov 2024 03:58:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=semen.protsenko@linaro.org Received: by mail-oi1-x22e.google.com with SMTP id 5614622812f47-3e5f86e59f1so332200b6e.1 for ; Wed, 06 Nov 2024 18:58:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730948313; x=1731553113; darn=lists.denx.de; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=TNE21ZH5+wzDSDaWBE/g3mpXJTJhpQotd7ensLGy83M=; b=kJiK5BpUd1VZsyKpAm2brhpok9W0U9j+Ns/7C6awumzq8Q8S2pOvoYefTzMCkmcbc9 DfVnTf523WEDoSpSFu9mM+I8kt3W62Z8JU6NIYbwFAaBj5SMynKF3TyvzjZDA/I8fanI geuhzYYWdioSiwY42LR93kBn2toWfp5+D2Km+9NgHt3aYijYLXOkYmX+BZtrN5gic4SH AQAO478SicJXsV/0xWqFswQ5pVshjvg5R3XkGIuQ0RnOD7BWR1aFrVcWs7x0UfIXGqdu WD+gKQ9A34XLKZ+w5So36pnt6hYJDCE/30/qpA1MTnxfuPWOTSQIcCKRE0gbg+TKdV80 aPlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730948313; x=1731553113; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TNE21ZH5+wzDSDaWBE/g3mpXJTJhpQotd7ensLGy83M=; b=RNYRKn8i1HxG0WjSBNmxTJzSXBQ7Z/DsaGLXxlZP0vs4ExF/f2THZce86c6v9c3UC7 aJnQo50oGWEqv437Rr43lZHpQ7cNpsQtvVlJhWu5OmQyrjVK83gRjZDBB6tju3tJ9eqh DmlvylDLKkPr7iWmCatH7ga8s9grqf27KViUWwRc5D9PNSjIEN3fcZXdkqBSVKAmGJP8 S94ZAPtFIvJM6hakiOHb3k4Ln08q/mOGqL5lvqU43/l8t7veo+i+hkc1xMY07oGNWb0h fWmfqCRPBHPrKHkfIvwUKEQ4tVkqXDVdHqVd2mVjrvEgP8h0+Ej+OBrex9b3ppSMuw2Z QATw== X-Forwarded-Encrypted: i=1; AJvYcCUhDsxtoq2BaO1mHlyef5kjBf51q1TTXJySdgblXbiQg61P/G2YOjFDkrGhjrOGEpvcy5HaEmI=@lists.denx.de X-Gm-Message-State: AOJu0YxQil8eotS8IhzBPSCbkTValHHrM4IWazfTkKRxQF9kxnZ1IBqu 3RKLOWqa2XlgvfWcNXOJvOk3oHwByP31cxYfo1c2N59QMuM7OFIFtubW+3ra32E= X-Received: by 2002:a05:6808:1922:b0:3e3:c411:adf0 with SMTP id 5614622812f47-3e78d35aaaemr443899b6e.21.1730948312845; Wed, 06 Nov 2024 18:58:32 -0800 (PST) Received: from localhost ([136.62.192.75]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3e78cc80866sm94907b6e.16.2024.11.06.18.58.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2024 18:58:32 -0800 (PST) From: Sam Protsenko To: Tom Rini , Ilias Apalodimas , Heinrich Schuchardt Cc: David Feng , u-boot@lists.denx.de Subject: [PATCH v2 1/2] armv8: Fix get_sctlr() return type Date: Wed, 6 Nov 2024 20:58:30 -0600 Message-Id: <20241107025831.5459-1-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean SCTLR_EL2 is a 64-bit register [1]. Return its value as long (64 bit) instead of int (32 bit) in get_sctlr() to make sure it's not trimmed. [1] https://developer.arm.com/documentation/ddi0595/2021-06/AArch64-Registers/SCTLR-EL2--System-Control-Register--EL2-?lang=en Fixes: 0ae7653128c8 ("arm64: core support") Suggested-by: Heinrich Schuchardt Signed-off-by: Sam Protsenko Reviewed-by: Ilias Apalodimas --- Changes in v2: - None (this patch was introduced in v2) arch/arm/cpu/armv8/cache_v8.c | 2 +- arch/arm/include/asm/system.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c index e6be6359c5d9..5d6953ffedd1 100644 --- a/arch/arm/cpu/armv8/cache_v8.c +++ b/arch/arm/cpu/armv8/cache_v8.c @@ -825,7 +825,7 @@ void dcache_enable(void) void dcache_disable(void) { - uint32_t sctlr; + unsigned long sctlr; sctlr = get_sctlr(); diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 52f6c9b934d7..dbf9ab43e280 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h @@ -171,7 +171,7 @@ static inline unsigned int current_el(void) return 3 & (el >> 2); } -static inline unsigned int get_sctlr(void) +static inline unsigned long get_sctlr(void) { unsigned int el; unsigned long val;