From patchwork Wed Nov 20 10:01:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Goodbody X-Patchwork-Id: 844522 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:8b:b0:382:43a8:7b94 with SMTP id m11csp1617901wrx; Wed, 20 Nov 2024 02:02:37 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVPQ+mDr6Yivh7BEjIKROvRgTAbwJEcHssQU0DiCd95ZPCVbNKucHczQxxMgOvzbOlLnW6+nA==@linaro.org X-Google-Smtp-Source: AGHT+IF7E+8/axDOJth32nLPtU0gRMkacRZe9xTLlEEGNhjMxiyqRBtyMdXNpWd37cj4G5yrKnr/ X-Received: by 2002:a05:6402:430a:b0:5cf:ce86:60a8 with SMTP id 4fb4d7f45d1cf-5cff4ca6101mr1414454a12.23.1732096957546; Wed, 20 Nov 2024 02:02:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732096957; cv=none; d=google.com; s=arc-20240605; b=ETsW0U6fQy6VlhcwfTALG0Z+tHoZD+zo0D5hKhtYTGLnpqJwf+ywgaEMQFm21qz4oj oox1i9z/z+Yy+lFEDSzewAlC78msk4c0SunqYu/La1eOPPEjR9wTsg2Zv2D1aBgyZOEh ZLJUSzrrRGkK+ZJW/Q/C/2YdYpe/nTtIhXwm5zyaKhzDug2OtNYOTrBTd4RBDxOGQ79u kJvjWiZ2cwe2ZbVF1mGB/cZJYXWjFjatTBB7qhdgdtaPAwF0BB+jXIZ0Km6/rn56q8oc Vy+Sdi5WfHU1rajihwajkobywSHCIZmLEZqK5lGdi4p/hb5HHrJN+DBLC7L9BfDtutID 43Zg== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Kocb6slSXHHclKNWB/UXW6eV5o3UraK40/Ny6RKtJ0o=; fh=97SWcnrgb9q3MnUshds1en0xze6VdTFjtY6HdisWNsU=; b=GFIPL07SIr9yVzUMpbLfXd893Lf2fMeDH1iCqm76BdsyjnVdzxQLa4PRRSfxniZbuQ kEQOazMV/0N+WS6q7X/jUF0C0llzqDui2B+pfwn4kmIMkclkGpHLAxDIe3dtybA3Plys 6sHL/bxKGGswDkfEiOdKjtjqsVcxFKd/O5Ip7Sv2Ek/ghFzs7MB+eSpToLLNRcsVhEcB ZTec0Sx26+ygFOQTr6V+2saIu4l1jD6n1JzOC5deB8ev4JKn9V2PgfUUqbQOT+JdhpXa sRlTgxnW9OabXrKpcqO1TFh7FzXygVKETLGIUESZC45+FgyvBHlnKIStect/sUZgixVv ut7Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iy6k2tac; 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 4fb4d7f45d1cf-5cff453ad8bsi812417a12.224.2024.11.20.02.02.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2024 02:02:37 -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=iy6k2tac; 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 EC50C89673; Wed, 20 Nov 2024 11:02:36 +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="iy6k2tac"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0720F8966E; Wed, 20 Nov 2024 11:02: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-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) (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 560C98968C for ; Wed, 20 Nov 2024 11:02:32 +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=andrew.goodbody@linaro.org Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-431695fa98bso16164425e9.3 for ; Wed, 20 Nov 2024 02:02:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732096952; x=1732701752; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Kocb6slSXHHclKNWB/UXW6eV5o3UraK40/Ny6RKtJ0o=; b=iy6k2tacfzdyOysMHIKLf5DCyPd0bHDo+EbKkIGyDzlruEWSM+GMqiqVkQeKs/H4Pw x37R2rtrAr5TnnTFY3y15clmNKGq9hMtIxTIT3/BOGLLHFTdWb4G/rqZtPRgvaTZYWGy 9crkC7UbRrZPZFCqmeQY2UBK96ztBPCzm+jCGGWI83IdDzVOeeg7dsFNixckfVOzOMjN 6RY3J2vx7LEXN9CSsbdq03mfsZPZHt6PLVU5dfIfoPbs7ml8ezo9w89ulBBoKWnaNZws qnGmVidIIWV5do5ut507IO1bu+Zi+hIvUoThuQBBmDRU2Hv73SnWXM2X/GZyOb6wo9WN wBBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732096952; x=1732701752; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Kocb6slSXHHclKNWB/UXW6eV5o3UraK40/Ny6RKtJ0o=; b=PyERJE51Iyn5W1cLqnuAmHAt8VciJhZbx3ffKLQKBrSbffEiOQy3OoNeX9NropMj7f Q1NUjMrOiWIe1L30Lcwij+BZqvM4HPjMJX0NA1v0mzhwQxH5qTRiVeOUPiQT+7H6zOEJ yCB/Oft4vIHE+7HT1+iACvFddnAoUompPEUAXT0eNsrsDjoalmopKPqhK26H/NWRP8P8 ckLIQbqi16ce8B3IgWzsNraN4XstQndrDnEWpXBiBem5ogVE7TCVOK+/ODc5BvfJXeOF WD7X906xqFdanFBJPywVQQ3Uj+qPlTXPwSBRyKAn0irlqgqe00dn8Tnw/DGP16P8nbag /t/g== X-Gm-Message-State: AOJu0YzOgnQ+CnZI5S6TR7eLWw2BwBCqMz9CrkeUourhzNOuJJ08uBYH KWxpfNumn9WvccOP5ONgOZ8sB98kv5BuWarSqu/GqFCuOrDIDB2wChkck5eK4afEZnyFMe584dN 24+Xu7g== X-Received: by 2002:a05:600d:1b:b0:42f:7c9e:1f96 with SMTP id 5b1f17b1804b1-433a4caad70mr11606545e9.1.1732096951820; Wed, 20 Nov 2024 02:02:31 -0800 (PST) Received: from artemis2.broadband ([2a0a:ef40:edb:fc01:24e0:2f5f:4be2:4309]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-433b45fa706sm13572655e9.16.2024.11.20.02.02.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2024 02:02:31 -0800 (PST) From: Andrew Goodbody To: u-boot@lists.denx.de Cc: Andrew Goodbody , Igor Prusov , Simon Glass , Tom Rini Subject: [PATCH v3 1/4] sandbox: Correct guard around readq/writeq Date: Wed, 20 Nov 2024 10:01:54 +0000 Message-Id: <20241120100157.485418-2-andrew.goodbody@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241120100157.485418-1-andrew.goodbody@linaro.org> References: <20241120100157.485418-1-andrew.goodbody@linaro.org> 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 In include/linux/io.h the declarations of ioread64 and iowrite64 which make use of readq/writeq are guarded with CONFIG_64BIT so guard the sandbox declarations of readq and writeq also with CONFIG_64BIT. Signed-off-by: Andrew Goodbody Reviewed-by: Simon Glass --- Changes in v3: This is a new patch in the series at this point. arch/sandbox/include/asm/io.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h index 3d09170063..f656f361cd 100644 --- a/arch/sandbox/include/asm/io.h +++ b/arch/sandbox/include/asm/io.h @@ -39,13 +39,13 @@ void sandbox_write(void *addr, unsigned int val, enum sandboxio_size_t size); #define readb(addr) sandbox_read((const void *)addr, SB_SIZE_8) #define readw(addr) sandbox_read((const void *)addr, SB_SIZE_16) #define readl(addr) sandbox_read((const void *)addr, SB_SIZE_32) -#ifdef CONFIG_SANDBOX64 +#ifdef CONFIG_64BIT #define readq(addr) sandbox_read((const void *)addr, SB_SIZE_64) #endif #define writeb(v, addr) sandbox_write((void *)addr, v, SB_SIZE_8) #define writew(v, addr) sandbox_write((void *)addr, v, SB_SIZE_16) #define writel(v, addr) sandbox_write((void *)addr, v, SB_SIZE_32) -#ifdef CONFIG_SANDBOX64 +#ifdef CONFIG_64BIT #define writeq(v, addr) sandbox_write((void *)addr, v, SB_SIZE_64) #endif