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 From patchwork Wed Nov 20 10:01:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Goodbody X-Patchwork-Id: 844523 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:8b:b0:382:43a8:7b94 with SMTP id m11csp1617964wrx; Wed, 20 Nov 2024 02:02:46 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU/VXdbHBLSvFUq8v2ya1bRZvmMrMqay9VMOb1mIGXQs77gXry6HwJoyyuVQhaSYU+9BJYyOg==@linaro.org X-Google-Smtp-Source: AGHT+IEt83sJd0AHQvtVSeiLRLFnbE587I7vYIJBcR131Bsd/l3li4O/5mtkT2iGhbdGGIYeYHF/ X-Received: by 2002:a17:907:5ce:b0:a9a:5b78:d7d8 with SMTP id a640c23a62f3a-aa4dd551680mr167919466b.17.1732096965943; Wed, 20 Nov 2024 02:02:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732096965; cv=none; d=google.com; s=arc-20240605; b=A3aHlrfLpA4v4n/96FdW33y8mHo3VfkGt9iQLs3OSxtpgACtZkJJMS8CsSG1ZlSN71 nxqcWJ4LWzHeHyoR3D+KWKu9C9s1IjQQbSpvKLnVAMJlrChCKRJD1rdpcGwks2Hq+6zq MMEl2xIR2xtaB2o3dWpAY7lkSRzE1dzspMjylgZMAuOTwiiAfe7mRI82/xnPsmLaN58W B1xlbvjfbHRndI+7NsXnn95XQdcC3YphHoTtBToYieSW+0bGHoQQkDF0tF6IDP2OeW7N MrY7YHfj61RAOBaJDhv2d1Fe3L4UmQ3BZOQhM2O0ybUB3P1ICvnioPm84VoAfT0pQ3JA imLw== 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=uol12ilzrp93zqLCzBA5S29w8Sc3Lnbq6z2HdvzTkj8=; fh=gGdCIiY3oAFCHNdzkXt+0pz/LHe6XqVdYUr36BD2sDo=; b=fI5s1F3cDPZdNqe7ltRRd5Gh/+1e6hnjetgw/+wpHKMu2IgKQG8XzpHI3O1Xdr91Qo Pvly54EeMTpnXVOQ6aYPxU0+72u2UnpITUel/d9qR85XRpNGS6JkXpH69jThIpPcLKRF ACZMWOmKfMubbuUMOn51x273KiPrbC8G348b1DQ4L8VFYiTWrzvZAWSWeuL+1HGkae/M KayAKrkr4nZ50ty6JHRkJWLT7y4OIkr3Usqyl0WLvYw+s/yx+aszjks7zEvY5E70zdsb 1ehfAAV/Q0dysHJWnmbyZdpqmBvMXnuP7ZuSka4ae3mSnn2zOpXzwHfscXP36KSmNbSX sU1g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iVZSAOTU; 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-aa20e104b4dsi834904966b.951.2024.11.20.02.02.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2024 02:02:45 -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=iVZSAOTU; 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 53FC989686; Wed, 20 Nov 2024 11:02: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="iVZSAOTU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 19E8989681; 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-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) (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 142F68964F for ; Wed, 20 Nov 2024 11:02: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=andrew.goodbody@linaro.org Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-431548bd1b4so36896385e9.3 for ; Wed, 20 Nov 2024 02:02:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732096953; x=1732701753; 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=uol12ilzrp93zqLCzBA5S29w8Sc3Lnbq6z2HdvzTkj8=; b=iVZSAOTUbViNwSl+AE7hw98ylEtyNouNJkTK/vyDaoq5gTneezKmUJTYUmDrcboOdH 1QeCdmo4xdKDUn/20phL6dqDBs9XfiY1Y7RX/tuD2Akcqhr8olkcFAs4ED1BuHpTtnjn Vn4R12+J6rZ7UDtwz4sjcqFgojV9E3m93VHVfw9x6zwuvggP8TDv2RGrPaEDg91vLwD8 yh9mU4CNSjo3cBbx4GcM5vJNEmbs3UMy56bqa4K7EaF3fixQ2UpHZEfZ8kXbXMOPwYv0 F3ogD0FS7FMzMUmAVBb4BbZCcTz0OwiQv8JRNsSDR9fovwgvrHO1THZA4mVbyrpghvRr A9tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732096953; x=1732701753; 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=uol12ilzrp93zqLCzBA5S29w8Sc3Lnbq6z2HdvzTkj8=; b=oVydGkxEQ3oR61EKlw/wD6sMvfyhYSaoMavxD/Tkb2UMpg/XxAByAOfxmfmY4Pxuv/ s887j0oPNo15LiLTdL+h5L8ghX+mVWuES2IFX7YETmVv7pKSzeRR2G4hMr4g8BMvn9kG oNh51EocO1DtqdytrfZisjoLJsOG4VJFjMENNF33eWZQ/ZB0PhoCJl/Rj/YO0pUCnFBM aF6IL3l72q0TOv9ah4DCuns8y7vA82L3gJFoE9r770hVj/Kj3fgL+42KzclcI0Ruix+v mWxAkk8H75Km6F2jtPkrqP+WchUgZTamIMxHuBhayWxhSZKWp9lv1c/NTlUlw45/yn05 LwMw== X-Gm-Message-State: AOJu0YzQXvc3xzodagsTRiT1eEUZlrRBwgE/NX7cNDBtH2394/0lQ8v1 sSsazXsZK2vhfL+0i+k03fCTbnceDbu09a2LiCmPZHVFqNrF7SFUoAmI7v4Qw8S5IKgBmeyhHfS CSFxk9w== X-Received: by 2002:a05:600c:3b9c:b0:431:5ba1:a513 with SMTP id 5b1f17b1804b1-433489b596cmr20373425e9.10.1732096953524; Wed, 20 Nov 2024 02:02:33 -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.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2024 02:02:33 -0800 (PST) From: Andrew Goodbody To: u-boot@lists.denx.de Cc: Andrew Goodbody , Dan Carpenter , Heinrich Schuchardt , Simon Glass , Tom Rini Subject: [PATCH v3 2/4] sandbox: select CONFIG_64BIT for sandbox Date: Wed, 20 Nov 2024 10:01:55 +0000 Message-Id: <20241120100157.485418-3-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 Select CONFIG_64BIT so that we pass the -m64 option (instead of -m32) to static analysis tools. Signed-off-by: Dan Carpenter Signed-off-by: Andrew Goodbody --- 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 Wed Nov 20 10:01:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Goodbody X-Patchwork-Id: 844524 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:8b:b0:382:43a8:7b94 with SMTP id m11csp1618019wrx; Wed, 20 Nov 2024 02:02:54 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUfK4PVoOwKQOAdPcI3ghraXI7PQ+i4vN0B/HhfL35BFeoUYr3IDe2g00aov2VzKaPsxnwwFg==@linaro.org X-Google-Smtp-Source: AGHT+IGf2VEQDhMY26Ntt+IkK1w88+81YMrgjLUveqdvJBuCeBK7ONpj2Fs70d4JZ6edevB+ypm5 X-Received: by 2002:a17:906:d54b:b0:a9f:168:efdf with SMTP id a640c23a62f3a-aa4dd52d544mr167450566b.6.1732096974704; Wed, 20 Nov 2024 02:02:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732096974; cv=none; d=google.com; s=arc-20240605; b=HvDDD5jx26zbNeOmRX+9R+2zKik/+eo+nI5Rbhiq9f86MVs9czcBouCIivei20bwFP sKs+hg0Rj8sY7emhSmDM8efraE+DjWcHO4+YZVdppYDLWEgWlexHUIcCj21MIbOMN1BP AwvxuT8tjVc9nTrt2MB94VrmHyKSKCs1Lw+ziNjERKnYGsL6wKTIrQWLJ2ibq+JmIG8X zMwdReHteg7+/a6j0yqBYkgmXLZczdRY89VXMF1Vly4tq2P1Hn/f4u/FMSV8LxdVW/Uy +Tjq34SlUTpOxeT6HlSoTUhSG0eNEWsHhvrIawyo8vp+flwQ2ESlDiRV/oM0WbxJXN6g ssSQ== 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=DcCy6LcEN9eqC9LR6FwyJJzbKMsED+IC+514Elp5/3k=; fh=kOj2Se4iDHGCQ5Ppr5uUAD9Y4nHui+IcR2z/eYVy5BU=; b=ZuppnqEFys5YIDOjp1RNq1hJp7yCho/u/edODL3UYltxaZmQoXy0Cq38Mf9olPYUnS PT9nSud4bwDAQruL/rEsJd1z9aT+hA9ZSV93m7FfO73UGcHjdmTtI8YP6Sov875oSdn2 1K9yVSaVJ61v/v+hiBdSGHUgVhQ9ACtgEEgaUaRKNoaL3ZobuTf4+vNop7h8zvkn1Z0e YQO+HGlOvgDr8GmER/krYp1gY3BkRS6zmir4kTW6TRq25x75uGZaVEjki8w833g3SKIX gOB2xf5YyZUuiXAxK4rUTy3lsQKeLeKLQwNMqQNb6BgqUfQ5B0USb6QrwmxgdYCpbJPs duMA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SUsEkArZ; 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-5cff454de37si820366a12.382.2024.11.20.02.02.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2024 02:02:54 -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=SUsEkArZ; 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 AE73689681; Wed, 20 Nov 2024 11:02:39 +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="SUsEkArZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7EDE089694; Wed, 20 Nov 2024 11:02:38 +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-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) (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 61DBA895D2 for ; 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=andrew.goodbody@linaro.org Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-431695fa98bso16164955e9.3 for ; Wed, 20 Nov 2024 02:02:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732096956; x=1732701756; 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=DcCy6LcEN9eqC9LR6FwyJJzbKMsED+IC+514Elp5/3k=; b=SUsEkArZfspwxt5IRtO7qwC79LM3MtUfaQ2KQpRMGFtnAI+iAcqZVnG5d+FjatScKh rGvIHdbsRL/fCFQ//I2LIElC3/9SzoI4ivjJ28tb6jsza4lZrLZu9cmAcIHqOz7ffWCp Ij+1K+Xf459CLB7D7xvPUsW+jFgCdHe54FWhbeNCvFFBWZlesGBo0fQ7040LEnQFVT78 U8EaLO/UucHShE9uboWBKr4ACwM11EQgXgMR5+nGpsX8oqs746KP4FtSrr3yo8bNX7zW yNcsX8939u3G/fNr9PFYQnVb0iK4oiVEyWupP5BTlQZVLQebU5FctayyYi9KZNVyY3PQ J9KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732096956; x=1732701756; 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=DcCy6LcEN9eqC9LR6FwyJJzbKMsED+IC+514Elp5/3k=; b=oS61rP+3IUjGUyefWdGChF1rJQIFb39GQoU9Kmp4hTgrSDr+Od/DpFvqpbPY2RiZVH 0AsnhFDthLenZcKT5fCQj4UIJ2WxgUyNsb3CW3BeTN4FMab1rCjXCvRV+ikptqb+9c0R gC4/v/sJIL2Fojc9t96j8uqk3gzN9pzFxxjWrj290MGhLAfsboEhXsTFdKAuVj7+bV0l Z68SpSPrCAmr+/7Pz6ow/qv6Ak1CHQ60DdiqM3sFQl2ULh1XqIm45ipwSTSerqUSXY+h I+lQVr47k8w1ouQ+7sNujJJCBYRNmXw+Zkuut9clWiv7xynC16pk1LUU+Zt+k7DuAQ2d zBQQ== X-Gm-Message-State: AOJu0Yyzy3Dhgnnmv490696OyfbrgehvQwdbq8JuwR8Se1gUm9YLS06Q jI878MadTnFWY1P09B8YnwWR0jgoHKBUawIqt05MMfYsmLpBdXAj6wKwG8loarhrYIJacW50YrC /Gk87fA== X-Received: by 2002:a05:600c:19ca:b0:432:d866:f45e with SMTP id 5b1f17b1804b1-4334f027ad7mr15971085e9.33.1732096955776; Wed, 20 Nov 2024 02:02:35 -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.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2024 02:02:35 -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 , LekKit <50500857+LekKit@users.noreply.github.com>, Leo , Marek Vasut , Mayuresh Chitale , Michal Simek , Oliver Gaskell , Patrick Rudolph , Paul Barker , Peter Robinson , Rayagonda Kokatanur , Raymond Mao , Rick Chen , Simon Glass , Sumit Garg , Tom Rini , Venkatesh Yadav Abbarapu Subject: [PATCH v3 3/4] x86: select CONFIG_64BIT for X86_64 Date: Wed, 20 Nov 2024 10:01:56 +0000 Message-Id: <20241120100157.485418-4-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 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 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 | 3 +++ arch/arm/Kconfig | 1 + arch/mips/Kconfig | 4 ++++ arch/riscv/Kconfig | 1 + arch/sandbox/Kconfig | 1 + arch/x86/Kconfig | 1 + common/bloblist.c | 3 ++- include/limits.h | 3 ++- 8 files changed, 15 insertions(+), 2 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 6258788f53..c726ac5fc7 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -38,6 +38,9 @@ config 32BIT config 64BIT bool +config SPL_64BIT + bool + config SYS_CACHELINE_SIZE int default 128 if SYS_CACHE_SHIFT_7 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..30fe1cb4b3 100644 --- a/common/bloblist.c +++ b/common/bloblist.c @@ -579,7 +579,8 @@ int bloblist_check_reg_conv(ulong rfdt, ulong rzero, ulong rsig) ulong version = BLOBLIST_REGCONV_VER; ulong sigval; - sigval = (IS_ENABLED(CONFIG_64BIT)) ? + sigval = ((IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_SPL_BUILD)) || + (IS_ENABLED(CONFIG_SPL_64BIT) && IS_ENABLED(CONFIG_SPL_BUILD))) ? ((BLOBLIST_MAGIC & ((1UL << BLOBLIST_REGCONV_SHIFT_64) - 1)) | ((version & BLOBLIST_REGCONV_MASK) << BLOBLIST_REGCONV_SHIFT_64)) : ((BLOBLIST_MAGIC & ((1UL << BLOBLIST_REGCONV_SHIFT_32) - 1)) | 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 Wed Nov 20 10:01:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Goodbody X-Patchwork-Id: 844525 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:8b:b0:382:43a8:7b94 with SMTP id m11csp1618088wrx; Wed, 20 Nov 2024 02:03:04 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVpCw4DW3dAxKojmH5vzhPDMHgRnbAn/SDQPCGFnmNzQnE9JaQ/jTT3qkDer6fe4Mq8d7ZoQg==@linaro.org X-Google-Smtp-Source: AGHT+IGzQm25gtbGVKFAPuq7kR5VztHZJyOheLMEL+rQFOJnHFQUoJgOq5CtS1kn6/Sboact8bQr X-Received: by 2002:a05:651c:210e:b0:2ff:55f0:ae52 with SMTP id 38308e7fff4ca-2ff8db15f24mr17292701fa.4.1732096984566; Wed, 20 Nov 2024 02:03:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732096984; cv=none; d=google.com; s=arc-20240605; b=VCeraafYgBXJodZbiImO1E1NSnMdqpUKTopnjWln+UbJhERhWY2jdW1pF3kqMANL2y S4KGs/AW7fXjIzCX9lziUpuCAYTik8IqsxVNLBX0H7D9oyT8VyHu8deNUYzIRoEwVOuM lKLKwTa/etjAPRqYOMI55s7Vs3iem/tJEnE71FUkP9myq7TEHwgg0Y+R54CC5YI1YOTg ZLufdkHzmzm8R/qDFfx+Wco6fBLn5DyoZ3PdhZuutAxmB++pbmpHiuYrz84Nj74ou1kg e+7BAtzqrBUciBug/tUPXNR/AUr/2fqsgi3277AdYLtUVVNigwpwnO1ZTQ9h7ltcHWkX n/5w== 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=cmAW8/LIad3dpkshTTwsYb3oxmsfByZwJqz4iRcC7XE=; fh=mvv6mVRmKOPcEmZLoMLLhpun845FJri2xT3sxnR+3xI=; b=cQWGFqMHnInfgyL2ETdq5OoUK/T9v2HldM/hAbnAWTZ19kOuePbPq0M61oRat7XlW6 ziMW4MzVL+0DHz3qgMx6eAgtb+U0rEZqCUvGY8zKqi+zhPJwhyN/oBOVFTUPEvWST31A 1fxjyrkU3m28Y6oPuPUPvSG1D6dIcRg6ZGoPp9tpLI24hvU0zPqNOL2xlAQKEGtjUrEt +Ys43EQt+sFpmzbh+Dj0YpiPLulVNlom050ZhWLlmKc9PXLB5DvzOX53d0LOjm8TItN1 WmBZ6krIIMC1z5hNw/cn7VbPJEV+gRWzcBzJ26Hr4Q8ZUjtNLfvcl/aOWueLW/zub/cH GfBQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tLqWhfuH; 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-aa20e0c36dasi782045866b.652.2024.11.20.02.03.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2024 02:03:04 -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=tLqWhfuH; 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 0D313896A8; Wed, 20 Nov 2024 11:02:41 +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="tLqWhfuH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8D5958969D; Wed, 20 Nov 2024 11:02:40 +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-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) (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 97BC2895D2 for ; Wed, 20 Nov 2024 11:02:38 +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-x32a.google.com with SMTP id 5b1f17b1804b1-4315eeb2601so56418515e9.2 for ; Wed, 20 Nov 2024 02:02:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732096958; x=1732701758; 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=cmAW8/LIad3dpkshTTwsYb3oxmsfByZwJqz4iRcC7XE=; b=tLqWhfuHmjQSnh/vMYkFQ/OVE6GvN1BI116wz+69S+YMp06fiy0usZQ0ZWSdLwITlW 0TY4TM47PWJKhYHXJQxOaabDk87cm3GVixAvOTNJ3cwQpdHHbhTRGm4ViiozvDu/nrBK h/8BJ44VbyJL98sNafot6CrOkn1yjAhOhHlw1KqzocxA2TeMXKSLe2UtW8ztrwsm03RZ 68b4Sf8LMZe+dcJwxWgGcsQ++sU38lSjUFh/iolIJc8JgWK/AH9MY9mqOka2WuEIZf3W /PO3MlOqD1q38+RZ/BK3LWsxOkk5hzaokbr/36GxShCjzIDyc9C4+B2bkhjbri9hCrCb XRQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732096958; x=1732701758; 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=cmAW8/LIad3dpkshTTwsYb3oxmsfByZwJqz4iRcC7XE=; b=cXtYjrnpyd1NlJ6SsRSUuJfm8oSZkmkWYAa1wlVhSMQUsiONT1TmLY8jmXb+cn7cfk XMdsv2ss0aC41t57jUn3x7gkJNEvHGNNpGgCL068PntEoyUjqRKFIrDYcwHEheS+EUph WBOSsfWqN8gtXCNF+hjwp+yd7oPfWxy0kB0FK09Y9J2z9ozq8HJS+tzx5el4idF2dpmw q5fmRKd+yRLiKmuyN9Nyn4+oUCv5O9O3FZshJOdYgm4DFsntCTQj3SGoUprw1Avd5ZLT r32wx3fAStG/YE+eT5gw7z7+iNusBo2Xud+NEg7/Ofg480iY4RPKvynZLeKVKjYj9f1A IwiQ== X-Gm-Message-State: AOJu0YzZSWyh/WlspLx2tO38zlEBiiMsT5g+XcadSoBbdgZX2LYt0c+l KL2Y1/0cJvHYetQIrcmyqjTlzoCr5cKSmaVfAHD37LG/X8sYeXZ4CJIwfH+EpTA/FdkW3Wle8lr cgXcO4A== X-Received: by 2002:a05:600c:3b9c:b0:431:24c3:dbaa with SMTP id 5b1f17b1804b1-43348981499mr23088005e9.2.1732096958082; Wed, 20 Nov 2024 02:02:38 -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.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2024 02:02:37 -0800 (PST) From: Andrew Goodbody To: u-boot@lists.denx.de Cc: Andrew Goodbody , Simon Glass , Tom Rini Subject: [PATCH v3 4/4] test: lib: Use CONFIG_64BIT to detect 64 bit compile Date: Wed, 20 Nov 2024 10:01:57 +0000 Message-Id: <20241120100157.485418-5-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 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. Signed-off-by: Andrew Goodbody Reviewed-by: Simon Glass --- 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 3cc9dfea6a..0505aed09d 100644 --- a/test/lib/str.c +++ b/test/lib/str.c @@ -206,13 +206,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; } @@ -226,13 +226,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; }