From patchwork Mon Dec 16 18:07:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Goodbody X-Patchwork-Id: 851236 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:2c4:b0:385:e875:8a9e with SMTP id o4csp3003253wry; Mon, 16 Dec 2024 10:08:07 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVlS9Jl0dr1HW6J1+m0oJROIQhULSwubw4VgyPxxQQ72bKY/ZQEI1k7aYYcr8uTO/ggIXRZ6w==@linaro.org X-Google-Smtp-Source: AGHT+IGjUeBZq7uobUing6hQVN2ju9zgacUCRBjWMlCcLZC3kQwUuRKexbypF0RPjWkRuhpOe2dK X-Received: by 2002:a17:906:1b12:b0:aab:934a:686e with SMTP id a640c23a62f3a-aab934a68b3mr976044066b.17.1734372487415; Mon, 16 Dec 2024 10:08:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734372487; cv=none; d=google.com; s=arc-20240605; b=gS7o/W09eHHsCZ3GA0h2+mtsXJpYhQr8yM+FdfLepOETsIVQ1+EBK08ago0SDqp4as NA1jYKTD5G4x21/Qos/Dh82RqUEKrhhYXyVnYM5WAuHnzyZ+bJLXw7nJDMJVVepL743z gTV4CWVlQFGlM6Ww6f0RNxaqaGVbVwZCAklvOjdL6eGfNbr+wlVeldRKBxMHYDzy3byR Be4FEZWgWA0NklsKLf3U3LRMPfse5NAg9GEBVJ/WPvRYTbXgRgGKT04jP1Ey+qISxRTf gBNg2AT+Dm2no0JXD7cr2fddpMtz6G6x3SDPOrlI9gh+e0gSxuZwURfhf4EgZ0KZYWZU w9uw== 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=/bIeqD+tgm9Gkr/VFzi9SNixE+TBzGIvSZpyuKOO9KU=; fh=mvv6mVRmKOPcEmZLoMLLhpun845FJri2xT3sxnR+3xI=; b=SPufvH1GzIYmdwwQG5YQDuAdeHvdezNWZQ74dhyVo7a7JVZ8gfVKpuz2oZAlupPFgd vOXEXl2KRIf9GkfW3ncIsT3rT+UtpEG8MTCgraWPFIvIu4t5/BVsZwr1gVKSz9OPUm7V LS1N832kTrCa4fD+VvMY9W13POdRCRgUVBM00ruOT0w7P0PuR1iLLsO0uNvHWa7wLgac Ty/TRU+WsQ0DwlT1guo3NfBXL+sb9zWHiZ8eLCq/LNTGFC0Y9Xp47hH1MJ/Co8ANE3dQ dTAuj4pEtRNIEY+p/PmuS/7LaXP6wdPLBr5KtAeaduozGxrnz4RPYfNPz/nrzCTWlheE i/ig==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ic5I7GcR; 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 a640c23a62f3a-aabbdb83cf6si177040766b.939.2024.12.16.10.08.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 10:08:07 -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=ic5I7GcR; 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 5949D80250; Mon, 16 Dec 2024 19:08:03 +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="ic5I7GcR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1ED86800D2; Mon, 16 Dec 2024 19:07:57 +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 1891F800D2 for ; Mon, 16 Dec 2024 19:07:55 +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-43618283dedso43405585e9.3 for ; Mon, 16 Dec 2024 10:07:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734372474; x=1734977274; 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=/bIeqD+tgm9Gkr/VFzi9SNixE+TBzGIvSZpyuKOO9KU=; b=ic5I7GcRV832TFwbBGSyPJBa7g6dE8lXIR8Df/aF5+GZ75jyiSTpxRN65a9c3Ikiwl F+H8KGB/qrnApy4JUMjg25ZIVcFCx7Gb5fwt/NUFfaXV7oxQIRy9K2fycd2417O/nzYs 03lFHeU2TjWebaNO9q3ReDFb4FjmLyAyPdeM/6TFO855TYpTy1ae+zHNZaUTWleHjE1E qbzlZDTpzFJLrMF2SYSxThnaH4x06FcWJwEbTvjSdzu1cgN+xY+LCdnQXdStDqXrn0j9 p+J/IQh1guFVXKVx1h+VBsseCpoYjmV6YQ8RrevbFImsgoTyOSEjKsNLmY4haKYS6HO8 ZDkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734372474; x=1734977274; 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=/bIeqD+tgm9Gkr/VFzi9SNixE+TBzGIvSZpyuKOO9KU=; b=dgfotstuz+S0PNSd8r9/8+MIM+S9FdJ7VRNZg6mUlkJiS48wd1j7MRJAZXDo0vdjHh FsSSkHgzXUtppSxq7ngPUmEdEDQ7bhmQqBpsHDLDYtqFYVY18cDqf5tH1UX4b5hoZAo2 umc8tlCLL8u751EHp6JKNu7sJ7tsFveAtOTOXDKx9Qn5rUAMbNizzLkUcwZ3dHQ+wQ+H NucRMDr/D9gvWJPe7LB4pvXT1k3X8zUhvZCwPZiecOXDqhjtKmuP+YCGsKE2YDct0gw9 itIfMomoaGwjLMVuxcVjDvfkRg+2ank/RgIL0+1a8j+RjDsYaUFBwLRJT8CAhWfvWSIb ZJTg== X-Gm-Message-State: AOJu0YxOnu6fxbiqdKhZd2iTxEbT+5iQWHfMajrTyXChkT9Cfxr6u/6W Dh00+KZYDV6fuK3SMTWRBAeKdyPiHJF21cPJwqpdMZoWfGEr86T9wXem2DyB4Ni5MZlIGVDqR2f ASgs= X-Gm-Gg: ASbGncvJrVU/e15UZQ2OMmoOaK8vKHiW8mKEBcGO8BKSBojNLNsG/UnKcdXob7nsbwl Af9Lclqtfc0n3Ma/xp1pmE2XhD+ijuSmbvl8Y/ahibODCgDB/wVQ+mng+Uf89ZTGI7NZVt+23hE Ttw8wBZ1mKGVdgIWKvkZUQKST012Og2m7BTMhdCFUYMAsbZfuGcxoRlaMKIagoqZZ7dKczJ83g8 mngtG8eL3kb0vgNUIqMSUuxg2EQ8chnm2tnSoum7DXkhz1JyHvbs2SYkB9+Qa2QwIyEQfypthPw X-Received: by 2002:a05:600c:cc9:b0:434:ffd7:6fd2 with SMTP id 5b1f17b1804b1-4362aa26cdbmr119223065e9.7.1734372474607; Mon, 16 Dec 2024 10:07:54 -0800 (PST) Received: from artemis2.broadband ([2a0a:ef40:ee3:c001:477a:6a2a:86f6:a454]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436360154absm91501605e9.2.2024.12.16.10.07.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 10:07:54 -0800 (PST) From: Andrew Goodbody To: u-boot@lists.denx.de Cc: Andrew Goodbody , Simon Glass , Tom Rini Subject: [PATCH v5 1/4] sandbox: Correct guard around readq/writeq Date: Mon, 16 Dec 2024 18:07:33 +0000 Message-Id: <20241216180736.1933807-2-andrew.goodbody@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241216180736.1933807-1-andrew.goodbody@linaro.org> References: <20241216180736.1933807-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. Reviewed-by: Simon Glass Signed-off-by: Andrew Goodbody --- (no changes since v3) 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 From patchwork Mon Dec 16 18:07:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Goodbody X-Patchwork-Id: 851237 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:2c4:b0:385:e875:8a9e with SMTP id o4csp3003352wry; Mon, 16 Dec 2024 10:08:15 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX4NwgpM0Nxy2F9uhoz4bVK0fNHxgRanCd++POZCtjKZjynt7fGpBseqYH+KrwjFXIWVhxivQ==@linaro.org X-Google-Smtp-Source: AGHT+IGWlQtsAn+KkPJTPywBc0dKUIUHVy7VA3TTLAyol2emBCgU61u+LTEnlLoA7ykDcjR3VvQU X-Received: by 2002:a17:906:4fcc:b0:aa6:5910:49af with SMTP id a640c23a62f3a-aab77909ed6mr1317006566b.24.1734372495585; Mon, 16 Dec 2024 10:08:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734372495; cv=none; d=google.com; s=arc-20240605; b=RC+F/hOscQuCKlC8quARAaQltTwWkki9dxvFA2j1z7pN9HL6HJbPwTdbuejjV78S1a TPUwkdC9uEZ+wrvbrY/cqJGNUyFEy34xTJPL9QTiiRT6LEUBGr971/JUvmz8wSsnBvqV 8XKyhW90t+6wnhOQr/fWuhJ1pvJoPG1bX+P6cBRffflKRNJLntYw/niMmdPpMX8DLC6V cuzc89VG/3Wdz1wDXVf5CPbNLOWrEmlDhHAXmbFtTLseNcyhV33zJjJe580iGXxsbt1S 7q8dvzxQ5zUlrmKmwIET2WFDi7+V6KLnl9PJ743cB7b2RjzP1NvBFnJuuWszZObEiT4s 0LVg== 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=BXTyJT8Kh3DOrL1JtSrCwhbCjoUD1hli7zLJmiKB3T4=; fh=FNYoiuziOx46S7+QErgFQKGDv5ULzg3FOEcqNPh90y8=; b=NAH/O8Xm7TyYoumQF6gVdLOmJaVbhKZ1cCFoCdmdpzLuO9ELP4CzWF+d6nEHyucM5d N3aLcbxq/yvCmY/iWysm6huNAVUSSaeC0XAeRQW+nOqMSx/an8rd16Tq6qLWiHP5UPr1 tlkW2aO6davyp83Pf0SBY+C9vPdPxJM36gakrJrmbqW/rHLz3mEuvvjdjKnHW7M45EhO yv8mQneJ93vqgJBM0CuP7eD6gBQeHYEO/j8TfmgZbeSeB4LMFOKawGGnOt9aN5G0h2Oo s/VLBdbC6dy8Ju5avZsEtllAY2nxKWM+dUnKnFL0ehIcJzmPp10QApherXW6uwD3qTHf VU+A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xw/TgstS"; 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-5d652f553d3si3685154a12.429.2024.12.16.10.08.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 10:08:15 -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="xw/TgstS"; 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 B6C4180283; Mon, 16 Dec 2024 19:08:03 +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="xw/TgstS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CB99680219; Mon, 16 Dec 2024 19:07:59 +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-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (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 CFC71800D2 for ; Mon, 16 Dec 2024 19:07:57 +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-x331.google.com with SMTP id 5b1f17b1804b1-4361dc6322fso29148765e9.3 for ; Mon, 16 Dec 2024 10:07:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734372477; x=1734977277; 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=BXTyJT8Kh3DOrL1JtSrCwhbCjoUD1hli7zLJmiKB3T4=; b=xw/TgstSA/1iHe7dZ3O2mv9z0pmUQwjswshY3qKQAtHIKkdtCbWRlBYHX/im1cV4zV +ZQEQfgiv/9gWfx+wfO/EeWes0i6rlllUCKAggi06ZopJVIVKKFZZAe3SjhtgUMCSUUu C/0Zz2hC04FqkcikOAm9d/mZMC2aIBtnj8fFbQ9mDnJ5rbpEaKxRYJMWdhpfNOod18sD EoBSaK0Lu2Ik53po1RiHb0DEMQtR17yV0GWDPyzPxE3hXXtMJ+n6iscTVRIk+6j1m7rV gLH/vj4zywC9pe/g2GRRgi6NtySWQf2yW7E/FJRyz22O8RIhdqnv/mAgXpGCHDWeJArA 88PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734372477; x=1734977277; 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=BXTyJT8Kh3DOrL1JtSrCwhbCjoUD1hli7zLJmiKB3T4=; b=T8SVHa9MwGRtTlsYk+L7+FnEtlfsLiy2zpqaImC6lvqwUfQpZPQ68crn1586NsBbM3 TUg1yAdLhII5cesy0AEMNSSOLuAk0cdK+w1bdd4eZ+BS8o/hfUqMhQfQuiqhWPQWuWw8 jtd+jms5jphO6Hi+0emTM+N1n6S18sXZCTlIWLWpJbOMhuZnpBYLOfBW5uUlQ40KfXnK Hl7gHqoOUr0WNnbuJ+i3saWNERGp7xpvw09m5LOwpLKTdBMCQW86pxwYrYO1DJigqKgA spXGD2RXS+JXelG7Ei2FZlSUxY9KB8OlTR5xshNj1YKcgn/B4PiV/oh9Or+s2ugQO/BC lsuw== X-Gm-Message-State: AOJu0YxH/Ny1Lvx/qFvCbP1bNdzK8waBoIxRZNQhPrCoy6W1TrD35LPu Z7ebGF1kVNa2kYSIeUE7dDGo4giEz/DsD6pZmpmZje+7HC0x+W6BsHT8HCa62LF0GjJucc+OODU yuEE= X-Gm-Gg: ASbGncsEW4vglsvB98Pcg2/ZdpNNPPcb40wIM/llW+T3xcbQNwnHAaGgBIGRkndZhP5 CSfdtDlfvgya09Vx8leXlQSH+ZafKayov0rmZjYVo1ITdTzivsL1S4QkOoJmbLLckSffStX0sXt e7vM9uNlKqSRWoCJUoCtTEtBjszwjI/2i/P7cL97pT0P3nLVPe9Yv0hyhfk+OE0anOKoOhbjiTX pfeui+o6Ay81XpaiKVdXUt/SL87K0dOwK/X10LHEHJzt/bVDI39D7lTsRNQ97p6CCk/pnfhaGSd X-Received: by 2002:a05:600c:510c:b0:436:1c04:aa8e with SMTP id 5b1f17b1804b1-4362aa3e398mr135996115e9.16.1734372477303; Mon, 16 Dec 2024 10:07:57 -0800 (PST) Received: from artemis2.broadband ([2a0a:ef40:ee3:c001:477a:6a2a:86f6:a454]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436360154absm91501605e9.2.2024.12.16.10.07.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 10:07:56 -0800 (PST) From: Andrew Goodbody To: u-boot@lists.denx.de Cc: Andrew Goodbody , Simon Glass , Dan Carpenter , Heinrich Schuchardt , Tom Rini Subject: [PATCH v5 2/4] sandbox: select CONFIG_64BIT for sandbox Date: Mon, 16 Dec 2024 18:07:34 +0000 Message-Id: <20241216180736.1933807-3-andrew.goodbody@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241216180736.1933807-1-andrew.goodbody@linaro.org> References: <20241216180736.1933807-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 Select CONFIG_64BIT so that we pass the -m64 option (instead of -m32) to static analysis tools. Reviewed-by: Simon Glass Signed-off-by: Dan Carpenter Signed-off-by: Andrew Goodbody --- (no changes since v3) Changes in v3: Updated commit title Changes in v2: Moved select of CONFIG_64BIT from SANDBOX64 to HOST_64BIT as suggested by reviewer. arch/sandbox/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/sandbox/Kconfig b/arch/sandbox/Kconfig index 1c8353d615..db29ca14bd 100644 --- a/arch/sandbox/Kconfig +++ b/arch/sandbox/Kconfig @@ -46,6 +46,7 @@ config HOST_32BIT config HOST_64BIT def_bool $(cc-define,_LP64) + select 64BIT config HOST_HAS_SDL def_bool $(success,sdl2-config --version) From patchwork Mon Dec 16 18:07:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Goodbody X-Patchwork-Id: 851238 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:2c4:b0:385:e875:8a9e with SMTP id o4csp3003413wry; Mon, 16 Dec 2024 10:08:23 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVqWxO2buUJ2/0rfQoFN+BPC4HODiGp1f342MAIVBN2cK2DfGz3wXYnzVC+5FHrpMM0yNMjCw==@linaro.org X-Google-Smtp-Source: AGHT+IHvFhV5ylfLfU7DaoBTr9/nClmUhu33SyPF4JjMsoqMotVvQRRorD24HacvFSpx1XBKJa0E X-Received: by 2002:a17:906:309b:b0:aa6:6a52:970 with SMTP id a640c23a62f3a-aab778c7adamr1320530266b.1.1734372503447; Mon, 16 Dec 2024 10:08:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734372503; cv=none; d=google.com; s=arc-20240605; b=YybbPptx29bINBI2ZJNKOGLnkHGqYOn0bBOfnWEzYMYbHjrE+czXo+krtssjYywcJH vIpigd2wLxDG4EcbO6IvDaI1TuP+P8jCKZUHwdZga8VcHWFEyvNYO967lEo1i01uHibP i08hBWakRH1mD0Ry7YhPafk8YT2Drzz+J1WoHJZ0rNy60vvrxfzE1hRZNuqMgQsL5YxO IfLQvB5Vy7wQpw4nANPlXKFIvM2mYg50E7BvXUuXaqaWIqB/qrOdVLQlu7TqAswNO/uq t0viu5qghi+teCxaM2Oc7fMSdI6eAtwkcg7IRW2jQ7vv2baggj6NKKSoNDAlqL0suhZO R7bA== 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=Vk4iBr15zLQgE+1FM98EfUozqGmLtNvi8mXrwnjrWx0=; fh=qh6LGfS55cRrJ3VVEQifYEA+iEVEDxknJhhtjL8/iO0=; b=BzUBqbAodTpt72uHDIy4RKOJEpMXyzDGgSI6DHotNyE+mpsMdHvHcyiPAFeFPuwkP1 JYDMfnUEqpazR6do++WLyfR3s1woSy/AVnrORRxPjdcTbkiA5uwek7R9/Uh1weYT94oG Mlz4fM8Rq0+oZ59+MFBEF5mR4oQFwImF3h4NOUZe+v0qGMyjZp0wyHJ7f+tg7tTU2NRf ooLWkeGDddb6mfMIaHKWC8GXO0P/XxeudCZck/KRsQuRWr8MW/9c5C4y5FPntq7CJx3W 2t2GNPXTz0pVHNarJ1f93nB5Dj+hIiskXVPqO+vzytf/85PMpMoprHod3LBrqBCyR16K BrCw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RGDaWTgC; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id a640c23a62f3a-aab962b40ddsi370075766b.273.2024.12.16.10.08.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 10:08:23 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RGDaWTgC; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 257A680288; Mon, 16 Dec 2024 19:08:04 +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="RGDaWTgC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6C9BD80243; Mon, 16 Dec 2024 19:08:02 +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-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (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 4A959800D2 for ; Mon, 16 Dec 2024 19:08:00 +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-x32d.google.com with SMTP id 5b1f17b1804b1-43634b570c1so19456695e9.0 for ; Mon, 16 Dec 2024 10:08:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734372480; x=1734977280; 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=Vk4iBr15zLQgE+1FM98EfUozqGmLtNvi8mXrwnjrWx0=; b=RGDaWTgC3vzFbzOFGBZvOFoLQo6MV8yo3NolW3cEABJS3rkJ7lxX51b9Bo8oTxOE3n b+hLIdH/A56ymhf1VjB6dXlH1Q2nC52V6agElfz+DfVVljQx1yBha73naVSVNrwn+S1g ifgkbZZd0lXYNxrsrVMlw1IjDE0Vx13rYe3PzkM89nj9iL/qgZBHsaTJzoSzdcVjWA0r +YQZA9gN/9Lq/QwmcRQKU73zDo3fCI/j8TPjCBqkiYwar5aFrHi/QltAbUGxuJnqvclH 5vemc0YQJlx5FG/sf5LTDry5YnrLMVLDxs+fNC4evDCKLnC0TruDtfPkYEv0nTk2FpJ7 KGnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734372480; x=1734977280; 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=Vk4iBr15zLQgE+1FM98EfUozqGmLtNvi8mXrwnjrWx0=; b=JYziFRvOWKssqJKkPCLZh/bq+1W2/H1BzD8AE+0zKePSECWi5fv0d+MwuPuqqDv7mc 74HqzP5W168fYmn+3a3nQ38BR3AP72IkM5J/+S8yisvh6W3C/06EOgQXItWkJm8XmSNo aFF69UVTSCpdocfwrrqXJ9EN5zJcgyUKFd3xbn/veGgs8Q4/gmiY/YJM/2qC6QPEjmfT f8ytjFJH/s7cUotfeeCfx4pFZ05kBftr2cE3g6pLcC6eOMPPyEkY6yJugsygEeUuYbjF eOgiFyWg7mup7D5szs/50FNKysZ9eQG+cQigOJ2jLlC+6OkF/TWNRSXkGbGrzbzHRFtR +3bA== X-Gm-Message-State: AOJu0YxsAULGJ0tpnlBKrdYRLcmNMozCT3Ha9QYoUx6go/4d9v4IeLTM QcZPIaM0hDENOQQ52YC89JUhQS2hq11bgKiTQ/I354gtqYSI5XpHAFv89m7p2nN6YvbfKtrYtlB EvI8= X-Gm-Gg: ASbGncvfZxHFIZfB4Cm4s2rtA3RTx8S1DV4iUSPHiU6esrRn3DItYv+WS+KEPIM0cWx LIRurVgk53R8vSQmCohPyYKH699qhDxV+KLqjY0DRTAP/+2Qm2bJxVTKBvsefQ86XTSZMd3fJPb JkcbdgZoo7tsCLYs1YuDRoW/1OXjiwH6O5Y1HffVPq8SlPoR/JLVT9Hd0JNh72ktnQzOizxx+nF 73mE9ygCwuVH0qK1xC4fmJcpLjNSXdoposI+922OF2LpJmKrDfiP+1u92k7StR2jkTdKtMghCMw X-Received: by 2002:a05:600c:4e4e:b0:435:192:63ca with SMTP id 5b1f17b1804b1-4362aaa4969mr124772685e9.21.1734372479667; Mon, 16 Dec 2024 10:07:59 -0800 (PST) Received: from artemis2.broadband ([2a0a:ef40:ee3:c001:477a:6a2a:86f6:a454]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436360154absm91501605e9.2.2024.12.16.10.07.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 10:07:59 -0800 (PST) From: Andrew Goodbody To: u-boot@lists.denx.de Cc: Andrew Goodbody , Dan Carpenter , Ben Dooks , Bin Meng , Caleb Connolly , Chia-Wei Wang , Daniel Schwierzeck , Heinrich Schuchardt , Ilias Apalodimas , Jiaxun Yang , Kongyang Liu , Leo , Marek Vasut , Michal Simek , Patrick Rudolph , Peter Robinson , Rayagonda Kokatanur , Raymond Mao , Rick Chen , Simon Glass , Sumit Garg , Tom Rini , Venkatesh Yadav Abbarapu Subject: [PATCH v5 3/4] x86: select CONFIG_64BIT for X86_64 Date: Mon, 16 Dec 2024 18:07:35 +0000 Message-Id: <20241216180736.1933807-4-andrew.goodbody@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241216180736.1933807-1-andrew.goodbody@linaro.org> References: <20241216180736.1933807-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 Select CONFIG_64BIT so that we pass the -m64 option (instead of -m32) to static analysis tools. Introduce CONFIG_SPL_64BIT and select it for architectures other than x86 with 64 bit builds. Do not select it for x86 builds as x86 uses a 32 bit SPL. Ensure that when limits are set they use CONFIG_64BIT for U-Boot proper and CONFIG_SPL_64BIT for SPL. This is to allow for the 32 bit SPL build used by x86. Signed-off-by: Dan Carpenter Signed-off-by: Andrew Goodbody --- Changes in v5: - The change to bloblist.c in the previous version was mistakenly simplified and no longer contained the needed fix which was to use a variable that could hold a 64bit value when compiled as 64bit. This version reinstates the full fix from V3 when it was a separate patch. Changes in v4: - Add help text to describe new symbol CONFIG_SPL_64BIT - Split statement in bloblist.c to make it more readable Changes in v3: Introduce CONFIG_SPL_64BIT to allow for x86 building a 32 bit SPL and a 64 bit U-Boot proper. Changes in v2: Corrected commit title to be x86 not sandbox arch/Kconfig | 8 ++++++++ arch/arm/Kconfig | 1 + arch/mips/Kconfig | 4 ++++ arch/riscv/Kconfig | 1 + arch/sandbox/Kconfig | 1 + arch/x86/Kconfig | 1 + common/bloblist.c | 13 ++++++++----- include/limits.h | 3 ++- 8 files changed, 26 insertions(+), 6 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 6258788f53..bb2e7bedd1 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -37,6 +37,14 @@ config 32BIT config 64BIT bool + help + Indicates that U-Boot proper will be built for a 64 bit + architecture. + +config SPL_64BIT + bool + help + Indicates that SPL will be built for a 64 bit architecture. config SYS_CACHELINE_SIZE int diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 7282c4123b..055762b0b9 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -7,6 +7,7 @@ config SYS_ARCH config ARM64 bool select 64BIT + select SPL_64BIT if SPL select PHYS_64BIT select SYS_CACHE_SHIFT_6 imply SPL_SEPARATE_BSS diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 38577af43d..7ea439e857 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -211,6 +211,7 @@ config CPU_MIPS64_R1 bool "MIPS64 Release 1" depends on SUPPORTS_CPU_MIPS64_R1 select 64BIT + select SPL_64BIT if SPL help Choose this option to build a kernel for release 1 through 5 of the MIPS64 architecture. @@ -219,6 +220,7 @@ config CPU_MIPS64_R2 bool "MIPS64 Release 2" depends on SUPPORTS_CPU_MIPS64_R2 select 64BIT + select SPL_64BIT if SPL help Choose this option to build a kernel for release 2 through 5 of the MIPS64 architecture. @@ -227,6 +229,7 @@ config CPU_MIPS64_R6 bool "MIPS64 Release 6" depends on SUPPORTS_CPU_MIPS64_R6 select 64BIT + select SPL_64BIT if SPL help Choose this option to build a kernel for release 6 or later of the MIPS64 architecture. @@ -235,6 +238,7 @@ config CPU_MIPS64_OCTEON bool "Marvell Octeon series of CPUs" depends on SUPPORTS_CPU_MIPS64_OCTEON select 64BIT + select SPL_64BIT if SPL help Choose this option for Marvell Octeon CPUs. These CPUs are between MIPS64 R5 and R6 with other extensions. diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 043d963f63..abb7a984c4 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -120,6 +120,7 @@ config ARCH_RV32I config ARCH_RV64I bool "RV64I" select 64BIT + select SPL_64BIT if SPL select PHYS_64BIT help Choose this option to target the RV64I base integer instruction set. diff --git a/arch/sandbox/Kconfig b/arch/sandbox/Kconfig index db29ca14bd..4c169034d9 100644 --- a/arch/sandbox/Kconfig +++ b/arch/sandbox/Kconfig @@ -47,6 +47,7 @@ config HOST_32BIT config HOST_64BIT def_bool $(cc-define,_LP64) select 64BIT + select SPL_64BIT if SPL config HOST_HAS_SDL def_bool $(success,sdl2-config --version) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 23a1e21b29..006a59d6fa 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -44,6 +44,7 @@ endchoice config X86_64 bool + select 64BIT config SPL_X86_64 bool diff --git a/common/bloblist.c b/common/bloblist.c index ec6ff7a5a9..110bb9dc44 100644 --- a/common/bloblist.c +++ b/common/bloblist.c @@ -576,14 +576,17 @@ int bloblist_maybe_init(void) int bloblist_check_reg_conv(ulong rfdt, ulong rzero, ulong rsig) { - ulong version = BLOBLIST_REGCONV_VER; + u64 version = BLOBLIST_REGCONV_VER; ulong sigval; - sigval = (IS_ENABLED(CONFIG_64BIT)) ? - ((BLOBLIST_MAGIC & ((1UL << BLOBLIST_REGCONV_SHIFT_64) - 1)) | - ((version & BLOBLIST_REGCONV_MASK) << BLOBLIST_REGCONV_SHIFT_64)) : - ((BLOBLIST_MAGIC & ((1UL << BLOBLIST_REGCONV_SHIFT_32) - 1)) | + if ((IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_SPL_BUILD)) || + (IS_ENABLED(CONFIG_SPL_64BIT) && IS_ENABLED(CONFIG_SPL_BUILD))) { + sigval = ((BLOBLIST_MAGIC & ((1ULL << BLOBLIST_REGCONV_SHIFT_64) - 1)) | + ((version & BLOBLIST_REGCONV_MASK) << BLOBLIST_REGCONV_SHIFT_64)); + } else { + sigval = ((BLOBLIST_MAGIC & ((1UL << BLOBLIST_REGCONV_SHIFT_32) - 1)) | ((version & BLOBLIST_REGCONV_MASK) << BLOBLIST_REGCONV_SHIFT_32)); + } if (rzero || rsig != sigval || rfdt != (ulong)bloblist_find(BLOBLISTT_CONTROL_FDT, 0)) { diff --git a/include/limits.h b/include/limits.h index 4700cc7a59..1d0bbf69be 100644 --- a/include/limits.h +++ b/include/limits.h @@ -9,7 +9,8 @@ #define UINT32_MAX 0xffffffffU #define UINT64_MAX 0xffffffffffffffffULL -#ifdef CONFIG_64BIT +#if (defined(CONFIG_64BIT) && !defined(CONFIG_SPL_BUILD)) || \ + (defined(CONFIG_SPL_64BIT) && defined(CONFIG_SPL_BUILD)) #define UINTPTR_MAX UINT64_MAX #else #define UINTPTR_MAX UINT32_MAX From patchwork Mon Dec 16 18:07:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Goodbody X-Patchwork-Id: 851239 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:2c4:b0:385:e875:8a9e with SMTP id o4csp3003463wry; Mon, 16 Dec 2024 10:08:31 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU/ltVlhmoBAvFZtdNVIm7wWp5m7S+yRxrL2625psET800VedPLnDSsvkE7m5WvQvFWmmsqhA==@linaro.org X-Google-Smtp-Source: AGHT+IFCH18RH9dxvCU+1BAwWr31Iq/KuEavLOgCoUmtQ4jQqmASjvlKDi/ZBNZY62s5DaG4+N1e X-Received: by 2002:a05:6402:2713:b0:5d3:d8e7:d6d2 with SMTP id 4fb4d7f45d1cf-5d7d556a03dmr258311a12.1.1734372511504; Mon, 16 Dec 2024 10:08:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734372511; cv=none; d=google.com; s=arc-20240605; b=DWYh+PbacyiBGqQEfeM/eXtpfjYPxEJvYLFPg8DpfznIps7n9hijEHf2bQZQUiopGZ O+Lv/zmp8Jn0X5CTX64FpTVHCdMK0CSCp6ZRnE5BP4+djqSkAQLqd8U5M0fJePi0z6/X FiKnvTH21d3tur0fTglVPB85HV4u9b2qUPI8MoczuqlbWT2L7jzOujOjrvP/fmtvm1wB flJqJe/gWonMvw2jgrerinDwK+f7UkeJjbXR1OatnaJzrDWM8JKdFnoQ8YI1Hc48h9qC sAYlVJM1RrMhBbP9+5BUuhxhPlXESylKED768SmB3I7ruOpUjnIsRUMlH+3agxarjykH RPPg== 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=hO6HN/1ZHKXZDlbmBO3+BH1EtfZLQTmPvADU2ZuQYXc=; fh=A2GsXalIWztJ5A0+VO1L81kAfCqqhJoj7Eogs4p63lk=; b=XFh2gDhsJWlCFtLtpyAPQtMVGqG9mgkC2M4Xv9hcAlNU8yb6Ea4ecPvxNcDL0LDIKp uxIOCzj+l2LpBim+7SA0DfTsCnAxL7cajr4q7a0BkHNe8Amr54JlDZAelsioeA2pHeBl zbD3Ro07N5wAy+Wnm4SBEX8CbHL+KSyrMj3jVlOrYrDsXpYmx4OsgtFEvYbc0EVP/Gt5 h5IB9DtF65cX4lukSaC6NzE55EFPlzw4/oSQ3ry0cCho7I++UPr97X/MYQkRN0o70Orm tC2pH8G2aMNf4ScjNoAzMpKy+CtsnJt7UY05mmpzsMVl554GuuU0PA7oegXyMcbGaBJr MIng==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NqfoO9OL; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5d652f81e37si3764078a12.509.2024.12.16.10.08.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 10:08:31 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NqfoO9OL; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 7E397801CE; Mon, 16 Dec 2024 19:08:06 +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="NqfoO9OL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 053B0800D2; Mon, 16 Dec 2024 19:08:05 +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-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (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 ECEA9801CE for ; Mon, 16 Dec 2024 19:08:02 +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-x331.google.com with SMTP id 5b1f17b1804b1-43635796b48so15513215e9.0 for ; Mon, 16 Dec 2024 10:08:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734372482; x=1734977282; 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=hO6HN/1ZHKXZDlbmBO3+BH1EtfZLQTmPvADU2ZuQYXc=; b=NqfoO9OLFFZhwD6qqbYCFLI2pmdldHZ7nARuELQXW5/FdXsKuf6dURj3o19+QHAYMl tjUMFuUzPgCYAyOXZn+r+2ev5W+E0Uq6iEJDfyYNCO9qJl4dFBnm5ZSxZNkUVYoi+Ufw OzWfWzYwjJDvIYOiaZeAT26efZ9boet99LJBAiOXrJ0FyL4tz23Y17E8z7csVKELviMS n4tBsD53p8kn2c4HFedyiB1qQJbkIW52zNt5KbCPDbc0/ggV/5jShtT87dqeEFoTDhQ4 xJ7nCc8CiQM/oCmVjrVrPIpDcREwSiJrXlpcf115WNkl/K1Df8JEa3qnDqNs0NiUy+q6 SWzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734372482; x=1734977282; 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=hO6HN/1ZHKXZDlbmBO3+BH1EtfZLQTmPvADU2ZuQYXc=; b=R2UkjcCgmZAn0rBvbWPzV4xb8OrDTb9GLFEf1DL8FW7KZt/GLxE+trEnDDmxHxXPa6 hGGvS4XNCg19JRbTDU0QMMTaTZclesyKnOgUpr+nwRLpLJSpl7py9uvcb9N6i7z9EQQ3 nqZSBP2vDkY+nGzE9p8qW2lLnBptgPrMnpvUxIGpjHpBIog47Ll/ii/cZqLb7Z0HivIa J5870pobXOUzbDYuuEw4rS0bjpgydm05HSAgKWpwUh/tpZMtoLBdkucKMi1QsX2yz2qj qKi/8dIOzqYrkRd1QM+Mz6nCKF3Ti5so5Bmqap3S24CQ3gKBEnNu2aH+UTfeoqdwfL6S 2Nlw== X-Gm-Message-State: AOJu0Yy0+OJZNQY5S3G++1eubmuoS+TknqhyIDLc+5NQnzM315XO1YYL jsrrpQd8XiPDR6HWXhuSAKJpD7kDLbp4+1dguV5k0yv23fGdQBWPKTnGoQBfOG6qIYADN+9Si+u iM2M= X-Gm-Gg: ASbGnctsRPoxcAKk2xlIXpzRLOX9yMGstQUpd9SPdZGnypoR1S7x9GdX2xEGe24yfSS yKglynmx700XcjozFneUDeh2xYOHNABh2MqWha0ZUsTxvrGke66E9O5ToECbec8q4ent2EEOr2K qs1BkECG+QWyt1dG8skSOIggJZGp1dIoFvDIFEW7ZScrsPJ1jjU8gowXdbQdDYh9h0ut0MmBJvx lM3y0+Ofm7rkflNzFNwthV7xs1HKLZM7GDKjlvpVEtsAr1ee9idQoFfP0FXuwO+fvD4/NrE7uSh X-Received: by 2002:a05:600c:510a:b0:434:92f8:54a8 with SMTP id 5b1f17b1804b1-436480633f7mr2961405e9.0.1734372482491; Mon, 16 Dec 2024 10:08:02 -0800 (PST) Received: from artemis2.broadband ([2a0a:ef40:ee3:c001:477a:6a2a:86f6:a454]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436360154absm91501605e9.2.2024.12.16.10.08.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 10:08:02 -0800 (PST) From: Andrew Goodbody To: u-boot@lists.denx.de Cc: Andrew Goodbody , Simon Glass , Heinrich Schuchardt , Tom Rini Subject: [PATCH v5 4/4] test: lib: Use CONFIG_64BIT to detect 64 bit compile Date: Mon, 16 Dec 2024 18:07:36 +0000 Message-Id: <20241216180736.1933807-5-andrew.goodbody@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241216180736.1933807-1-andrew.goodbody@linaro.org> References: <20241216180736.1933807-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 Should use CONFIG_64BIT to detect a 64 bit compile and not CONFIG_PHYS_64BIT. This allows more platforms to run the full test code. Reviewed-by: Simon Glass Signed-off-by: Andrew Goodbody --- (no changes since v3) Changes in v3: New patch added for this version. test/lib/str.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/lib/str.c b/test/lib/str.c index e62045318c..48351abc75 100644 --- a/test/lib/str.c +++ b/test/lib/str.c @@ -224,13 +224,13 @@ static int str_itoa(struct unit_test_state *uts) ut_asserteq_str("4294967295", simple_itoa(0xffffffff)); /* Use #ifdef here to avoid a compiler warning on 32-bit machines */ -#ifdef CONFIG_PHYS_64BIT +#ifdef CONFIG_64BIT if (sizeof(ulong) == 8) { ut_asserteq_str("9223372036854775807", simple_itoa((1UL << 63) - 1)); ut_asserteq_str("18446744073709551615", simple_itoa(-1)); } -#endif /* CONFIG_PHYS_64BIT */ +#endif /* CONFIG_64BIT */ return 0; } @@ -244,13 +244,13 @@ static int str_xtoa(struct unit_test_state *uts) ut_asserteq_str("ffffffff", simple_xtoa(0xffffffff)); /* Use #ifdef here to avoid a compiler warning on 32-bit machines */ -#ifdef CONFIG_PHYS_64BIT +#ifdef CONFIG_64BIT if (sizeof(ulong) == 8) { ut_asserteq_str("7fffffffffffffff", simple_xtoa((1UL << 63) - 1)); ut_asserteq_str("ffffffffffffffff", simple_xtoa(-1)); } -#endif /* CONFIG_PHYS_64BIT */ +#endif /* CONFIG_64BIT */ return 0; }