From patchwork Mon Nov 25 11:55:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Goodbody X-Patchwork-Id: 845310 Delivered-To: patch@linaro.org Received: by 2002:a5d:688e:0:b0:382:43a8:7b94 with SMTP id h14csp1127899wru; Mon, 25 Nov 2024 03:56:42 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU4l2HOcOkN0lxSVvBbvFibeSQ9Dp39KRCg8eXhl+QZIZfVH9n9iVT4nmhthVVHq3w3/Hkzhg==@linaro.org X-Google-Smtp-Source: AGHT+IGu2igomB6FJ2I6XkzG7y//0V09T7YWw5mEu16hwt5cHT38JxdJVn/OyKDJnUtci1kTNHqE X-Received: by 2002:a17:906:4c2:b0:a9a:1f8:6c9b with SMTP id a640c23a62f3a-aa509b850f8mr722319466b.37.1732535802600; Mon, 25 Nov 2024 03:56:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732535802; cv=none; d=google.com; s=arc-20240605; b=FCXbxUdpaXLtcrjEAEQyL4k4sjSOAjGFQOL4kIjnceNHTIMuIt9VV9Lt8Gz0VvmQ3M VB89SsOdSbyw5P7GF1BYdyqcXWKP5FI1HERN9zCVVXJu6TZ5hZoeU22jACFZTPQTqvcn PzNniqzpE13l6EAlxOcsrcyKuFPa+C4cne++OfVNj5u9seKvs45u1JBvSkOYqJCu6hQq hTBjrSL5o3uG8eiDzRPZwl5lAewCxfepqkeNiseozovvjPSSwVJozC0D/j783luQiUx9 sD2LLMzg9wLqBNRGf0474npXcUjQotWtj7Jfc8uw7VxTHCpVgBJ0ICEb86mGYFIifjmv rDMA== 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=PtlPl/hUpfWI6lN2tBe0sq1xqopDneDFWZc4Ifh8iIk=; b=bwZt90io3tPY9YcJDTzJz9KAuBKm3MrImznbwVK6kTsxG2afekSZBeSEVDFTgHdotY 0sY+0qFRbgNwOqWWwMc8xtpp9q25DY0ET/9nn1h//VdjXBUEJlrfwimreUqN04tp3tAY oRMpJ3MHornvLG9+8P0LIaM03Z3f0Tng2D0s6yUckwCqwU+WeaPNy7lx83fQvZKT7XqQ nsVyKs4qZ8HPRCMtMdiJHHueEzcMLplr6P58+ke4jE3skGDUBVkvf5XDgd/oSzz/0iWv vsDkLsY8n9ndkx5UCu44Uz9y9b0eAqtLFOTEFolqQ+z4bYRZVILyX6+dYDly+7lVhQJ6 MJKQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="lqcKq/7r"; 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-aa51d79ec8bsi386828166b.148.2024.11.25.03.56.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 03:56:41 -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="lqcKq/7r"; 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 61AF389A3A; Mon, 25 Nov 2024 12:56: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="lqcKq/7r"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0D05789A3D; Mon, 25 Nov 2024 12:56: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-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 1632C89A31 for ; Mon, 25 Nov 2024 12:56: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-x334.google.com with SMTP id 5b1f17b1804b1-434a099ba95so5247405e9.0 for ; Mon, 25 Nov 2024 03:56:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732535797; x=1733140597; 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=lqcKq/7raHyfKNLdaAwlG9lbQlQ2EG9Us9ENiGF74PwuH0nvu82ACoG7VZfcFeLGAV 6km8sykQVfC75syH8pwNR44vU24Z0N9fPPyYEOE5QvBMKEW2h2fIFJhQIqpd3DTWckPR nBphkaIdc6PTWnXCQuVlnmfIrms9qTuko5H+PxjZr5UPbNGguabViN0WJBazBmZVFGz7 qhKP5PaWHqdFFrb68xnLn/ptVY0ZTPUcESgSkYx18+mIy9iHDpX55++w/0SSvNyU+reW 7bQCS1uSc7JLV5gyKGI29Wa6YiiyW3agWXKdunB9tebEjmTquCU0Xz4ghdoxxXoe0b3z Houg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732535797; x=1733140597; 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=kIVjgh+TwSLP+zXLrnOIEz+EuGk2i2RKRTOimVO3yOpIqAMQ5AlyBllCQ7IAhtk9Jj 3TAwhVeGI0Iq+aaA1USRMtyolOQOE1+z8tQfZGgvsax8wUnqX0tLNAlMTizDpNVFSduV 9etrKWa6RxDYsyKZzfHcWbU5rIeNjeM95BuqXocphOmUqxwmihTfGGLQz05DOb9GOcG8 cBy2zBFEKbCQTo6o7h1dxZeI8/mK0XjAd+9g1KYbCqd/ni3pjRcVlA0lpmI1o4ZqIpj7 YyFoI/qJfr1fWRPAt3/jB3y6LuJKD7/WDgHLDZrBX3P4ZPCF3PunMcEsc9UXOlc3EBHc E4TQ== X-Gm-Message-State: AOJu0YytKa2RZ7UNttAJHTLNPSPL70TmyZkDxrnolQoKRj3oo/i4aKCp 5zmwJHWp/c8OWvYMYZ+IAKVP3JShxW52uFH7W3m7VDrx/eW/CTCBXGpPohRAojkUH9gugA/zeDd ZhghpeA== X-Gm-Gg: ASbGncs5qzWIrOtVcP1bJseIt6Q78i17TjKPLlJ3yYEgAOicOWa8oSqqJ160fHnzfug PRaurwz4l5QwCKNCMwjAD/aJI8ZY9nzMzDmiq3GuJDGUUmQfGAs6PDFVpavUSn8id4NdRApdSgH xGHN2PhPM3sN8gCIoQzfR5unD2GxH1SOqR3+Q0qfXpf2IFNARl/QgEF3ROR/wtGqtjHvKeqynUk VAjT1HhtFm2ccTsH6O5dTJG4ss1pyzs2i2L2W5zRyb5dJTtVfFogKbOw+vMn2CTdzJNDQ== X-Received: by 2002:a05:6000:2807:b0:382:44e0:c5e7 with SMTP id ffacd0b85a97d-38260b6b464mr7079622f8f.26.1732535797424; Mon, 25 Nov 2024 03:56:37 -0800 (PST) Received: from artemis2.broadband ([2a0a:ef40:edb:fc01:7b40:ce24:60a6:e419]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fb271ffsm10139626f8f.53.2024.11.25.03.56.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 03:56:37 -0800 (PST) From: Andrew Goodbody To: u-boot@lists.denx.de Cc: Andrew Goodbody , Simon Glass , Igor Prusov , Tom Rini Subject: [PATCH v4 1/4] sandbox: Correct guard around readq/writeq Date: Mon, 25 Nov 2024 11:55:51 +0000 Message-Id: <20241125115554.1707080-2-andrew.goodbody@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125115554.1707080-1-andrew.goodbody@linaro.org> References: <20241125115554.1707080-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 Nov 25 11:55:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Goodbody X-Patchwork-Id: 845311 Delivered-To: patch@linaro.org Received: by 2002:a5d:688e:0:b0:382:43a8:7b94 with SMTP id h14csp1127937wru; Mon, 25 Nov 2024 03:56:50 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXYi04bEDVckCTNzKxQdwgw7dAxOBRDPzlcwuQUAJy6YmohIA/q1QgsIFpaNNYMHGpjmeXkTw==@linaro.org X-Google-Smtp-Source: AGHT+IEyL+hyKJ6A4LGBorz6TNdyJWT+eaB8l43Jtz/yOdxMpJxQUeCmickLAgXbO4tGINm826Ff X-Received: by 2002:a17:906:9c2:b0:aa5:1cdf:7c02 with SMTP id a640c23a62f3a-aa51cdf8321mr883132766b.3.1732535809895; Mon, 25 Nov 2024 03:56:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732535809; cv=none; d=google.com; s=arc-20240605; b=YdtHpIIjd8vbry/jfN+C5MnpsX3nGZ1lYZZdebvVOlgTUSPqI4aHIrSC/WCa3QYlWg Jdp9MEllyB/OpGtYEKhqwv2LBQJjWyRmerg1Px9VJS4gvf5f7+RYJzqDXHx2NZcpgARC qZx6ZzsShBzuFO07Y2rkSg7T79tbYTrnwXs0gTrOmffCCGYCH71hTlPO6VhcyscVEboo yqYM3AM1CfhjDCx6d2Jo8VMgBFUrYoMm5T+mhQPaqiiQMUFH47bNcvAnKjqpEBhjeVxH P0fvLXEX1jBxHOGy7i8HYyHrtqkrZEuc6j0GYTqAg07ooXBemMF/S8QpxQa/6nwlcS8H 0bmg== 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=IhTO/VY1wYc48kwVBTm9OsmBMyznhQOTSFPbuSfWmFs=; fh=gGdCIiY3oAFCHNdzkXt+0pz/LHe6XqVdYUr36BD2sDo=; b=Td72tW8ZHmf0mqZgRPLww1iG4PSp4Brw0b12jGoyJo2p5M2tU+I1B75EhbyjJtUgJg e0u8EhCFbTT+35i/DV6LUjyU4ozkLtjRUDADlaRhv1tpwQgJjTe6xrJHtZ47H55EKS0m /RAjelUrcM7XL0n4IxueBxZUiGaleQNHGl6u/wOlqcyKolUC81IWMj2c2DxPRaZaO7uY 5bBPVO/NEQV3xbucWpLicseg0kxewZ6iUkLSBkT9k8GLslL93Sp8qXrQsVV6hUz4YCnz U5vx9j19f0QExQvEvVBdK4K/5gO2UHZM/PV7OHY3Evl2s8EuoYDrcG3SKRmwZXc1y8mp riFA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PyBKWuLe; 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-aa54a38ba2asi163189266b.467.2024.11.25.03.56.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 03:56:49 -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=PyBKWuLe; 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 AAE1189A3D; Mon, 25 Nov 2024 12:56:47 +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="PyBKWuLe"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1569589A3D; Mon, 25 Nov 2024 12:56:46 +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-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) (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 1D55389A31 for ; Mon, 25 Nov 2024 12:56:44 +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-wr1-x431.google.com with SMTP id ffacd0b85a97d-3824a8a5c56so2901984f8f.3 for ; Mon, 25 Nov 2024 03:56:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732535803; x=1733140603; 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=IhTO/VY1wYc48kwVBTm9OsmBMyznhQOTSFPbuSfWmFs=; b=PyBKWuLeKlcaFQg4tLYOqhK2EJAwitsl5KCx14YRYIncMwO2c9+vrrcSsh34bzak2m Rw6Kib2GEfD9y1n1ka3IGzG7tGfDg/3RF1Wx8UBUhQHKFbxBzlJUqLz7+IGHnFtNGTMx InuAolfrHGMa15FsLdFOkQNJYOyB+asL5DesuVzG+t5S+fvk3rdUXqGb/9Dd5ZbckFYe jWrE+4r18ySIl72dZ+o/jy6lbpt0GvChBxFcvXVBjzfgKX+cGXXizUNm5VOURtyl0fFf BmyT/Jp/7XF8+AyTZN6FusNFoN7u16gkGacCnxNLRxXwr+J9XZtNfH/9HbJF5Z0nqpQK lkQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732535803; x=1733140603; 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=IhTO/VY1wYc48kwVBTm9OsmBMyznhQOTSFPbuSfWmFs=; b=OX1IatCx99Toi3dJ5PFTPGi5BkN006g4NJldd1pYrJ4Ua+n6Lw2/4aZMmVo+3/X4Df kW36kl7YK4A0haeimQ1XwEbAO9uHL9C0MWiZJiLKEJqHp7fPsoZpvsszoCTU50mQ5c/0 8GHXd6sHmJawU2WFxTeytiC21FqAtUW3xpe98UA1wX3RWvtsDUYhfQrhgnwt8nNrom0m vWVCKK699E7VxEcrubl8RoKEWEl6ViMZJjbPwHek5dn3BDxSTdVh5Q97t7azYLb1kWXf It/CPVg2Hh7M9XqM4KOWF89xcyLKNe7HTQfvmtxKll7jr10kWuO7k5gQrwVlNy29xdSl H/sw== X-Gm-Message-State: AOJu0Yysd1Npely2Pudg3DMD02T+7CUxJFA+KS0uFCCfYU/B1MbAOGf2 ZjpqooAJKFIbuuWETzEizC1PtPUUvSndZqFm+53F6GVMZ72915wAA6oc4e1enckqDeWoLbyzfNr JJ7IbRw== X-Gm-Gg: ASbGnct9qkFiHWM2J07/YI/cXp2ycCF5yj89+wwFmJzHO8ex1UmwDMU40tJKkLX0WZR U6SK8k0YEwXraizEKLqsNnCXkJ28zrXyWtz1Z3PpUym42BoJPH0ekjd/cNmyHCzmJdr4gNY79yp pq5x3U97FisENUi1xMEYCDH/rJvBES+6xBn8klSs4Cvapdmz/PJlwm0kbjJiY1OiPnBl1O68+JA MoRPsdlHmeHEC0lNXawB5L0yY1puM7guOe/OzfBotR12IEQbsuM/bqRp+9FN1g4g3tJuw== X-Received: by 2002:a05:6000:797:b0:382:5066:326f with SMTP id ffacd0b85a97d-38260b5b0bcmr9995841f8f.17.1732535803638; Mon, 25 Nov 2024 03:56:43 -0800 (PST) Received: from artemis2.broadband ([2a0a:ef40:edb:fc01:7b40:ce24:60a6:e419]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fb271ffsm10139626f8f.53.2024.11.25.03.56.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 03:56:43 -0800 (PST) From: Andrew Goodbody To: u-boot@lists.denx.de Cc: Andrew Goodbody , Dan Carpenter , Heinrich Schuchardt , Simon Glass , Tom Rini Subject: [PATCH v4 2/4] sandbox: select CONFIG_64BIT for sandbox Date: Mon, 25 Nov 2024 11:55:52 +0000 Message-Id: <20241125115554.1707080-3-andrew.goodbody@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125115554.1707080-1-andrew.goodbody@linaro.org> References: <20241125115554.1707080-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 Reviewed-by: Simon Glass --- (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 Nov 25 11:55:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Goodbody X-Patchwork-Id: 845312 Delivered-To: patch@linaro.org Received: by 2002:a5d:688e:0:b0:382:43a8:7b94 with SMTP id h14csp1128006wru; Mon, 25 Nov 2024 03:56:59 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVRHYxD++Ud0CVhFd3d/c70wAR38036Ab9Y3JiYEDVK9yBf69H1quiQf+fR8/sMB7q0CiPd8A==@linaro.org X-Google-Smtp-Source: AGHT+IEjd5vYCRLeQQgNaG+1MCZIHCFfXJWR1rQlNBiSIziXbq5FSbtQdBwId3s1aSw5ZsDJZRWV X-Received: by 2002:a05:6512:2c0b:b0:53d:e0ca:8540 with SMTP id 2adb3069b0e04-53de0ca876fmr2074257e87.30.1732535818945; Mon, 25 Nov 2024 03:56:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732535818; cv=none; d=google.com; s=arc-20240605; b=F7XEUtHygdsQpa1agqkpU5DG57nCh5VpuZu4qBAzD3d+TzZHnSikC1cvygdlnl18Xs 93WQTi091a0KZ2emwFfFmn90iZWRJNU0GxfmFGzK4C//dv9CAGjM5JAxboGaDVbvcW6B 8/oux19ythnMuUAb9gqjaNZTapkxTTm8GkByinud3zm+yOuqX0X6h0TBPqvNqCaEaor5 fipxBIGAAXwwTx4OkAfpbJYg3lzqDgxcHuv35T7gVwe/NNlwp6GHgn04IGkxGFNIigg9 rl4mIsblPWD7IoPePlOI47F+LuS2dFIuGGi+lWDgNuhG+23lrh2cgAAJ1dST4n5FZoE4 K1pQ== 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=0B+RzZsRYYetICtj6sHsgIWee00UZ8O4qiEExBDSjbs=; fh=XkoMVNsYuv+wyhBcbOsCVoM14BaHbmEWaNEFiEpxIJA=; b=IXOhTfN8poXAs8yeQ0VAYajUPlk8mBKtDDzI8w8RaqR+mTd/JhT0QobpeHBMlashuU kVMHixxlIp44MDzG9frzIouni9bGh+WQtEjkteEgrzLgZG8FObLcbiCF7USWuzvtwFWy 8vXotch7Q53fUvJDiGrjrWNG13jbVZ/b9fSBsQZsqNblGqeka/9ohdPgfIczOfyuYBcz 5NvflIzmfjZFk79E8UTpvrQCKHk2HpZl2u7e4DJJzX3OFDjRJnBP8+Y+2qqAolnBm8G6 1itz4Hsv6Nu3BNdzGOpmQGS2tgsIHZq21UFQpXv02HIMm4bb8K0SuXxCN4XL11Scw6sJ YC0w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d0lwLCRy; 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-5d0676dff2csi36760a12.23.2024.11.25.03.56.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 03:56:58 -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=d0lwLCRy; 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 0CFCE89A45; Mon, 25 Nov 2024 12:56: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=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="d0lwLCRy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 53AB689A31; Mon, 25 Nov 2024 12:56:54 +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-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) (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 4D06689A45 for ; Mon, 25 Nov 2024 12:56:50 +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-x32c.google.com with SMTP id 5b1f17b1804b1-434a1fe2b43so2400545e9.2 for ; Mon, 25 Nov 2024 03:56:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732535810; x=1733140610; 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=0B+RzZsRYYetICtj6sHsgIWee00UZ8O4qiEExBDSjbs=; b=d0lwLCRyoO7LIeG4UKBZCCHd/IpYZADoIGJDfdfyP1OOMzK4hm1pk2DSlbve088y+l dxoDFFUJgKv0Ed3NaAWYsSODyx+UzJsj5a6qVYP9Qoh4UznE+W8jRGVjJUEfYd4Zcl05 CWqLcMHAzmogCV4yicqFZlGzxdKhktc/3yKJduUzdTkgv2pGXf6fMmM9a3T96RfEZOnN rm/ER//EDONGA5rS66WfKQ+/YZefhBAeAKC6SU1IobILNztop4Z9+52xbTm4jCgY8+Vq YnyvSGet+VVHyQ+WvaBTAqTqSuUDt3xi48UnCixRdbKrKNg5xr3MnY2NIImmM4iGXnkS hREQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732535810; x=1733140610; 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=0B+RzZsRYYetICtj6sHsgIWee00UZ8O4qiEExBDSjbs=; b=jyf6NBvqFZB7xNUDCCX7BVTt2AMAWfBWSYkddptewtHUIfu2scIbkr+IzBgPzScTVz zy2zKXKfGCqmOS51/Hlp9Kqalz/sLQAGP9I49TX9y9pe2NJlxrrnMmNz8y07kj+Lh+mX MrKcTxdD2/ilIWMFiqkfG1V+t+WDYD750lZ1umIETdaCAmIyNtpjQzlNpsq0t9dKkDHK hdZVbX4MPKI8LWoxH+oJYDlsOPdhcmUMb8+94lItydQ4jbi/2xTIIDY2rEcNCh/2qvOr oYIOCLwHEkfz2yJ6gGRf1aDfyGImAw1vnWVMrqIau5nVQ+CRo9NWsX3EaEtesFQYUSki zRUw== X-Gm-Message-State: AOJu0Yy0hF/21vxhCBZhJDUKnoC+soITMY+ClpC5PrbD899URJaJPhvP Rnbqnc1pwbv3teoY+sDINA5QJ3gHiBraAPr9pfFnQdoHVj983MWm8BlkUcVKspbUz1Td1WOtStd M8dQsWQ== X-Gm-Gg: ASbGncsSTLegXISPLrU+SoWr0ZHYw/RzLXvXiZhptmDGNBjLQyEZpTxFuEtxu6wvAKm s3vfjamuZp3f2+zxxQUZUcbhL06QOC7Y+QQAj0QwR8KrxMEb161RWl5OJZdKmWc5/YrloStpYbg Xsa5KTe+w0VPzne9q3dIDNzT9O5Hu4MIuDg316ilUruzR8zOu4bseTLR9ObDlSRht2KVdivz7m4 lsl8zoOLD9eWsgfAe4jHzfxOHEEKP53jiNVBrb7sNHkmWteOEeyQqA1Tf6mFtzY5Ho8kw== X-Received: by 2002:a05:6000:1aca:b0:382:3210:4de0 with SMTP id ffacd0b85a97d-38260bcba20mr10423224f8f.44.1732535809760; Mon, 25 Nov 2024 03:56:49 -0800 (PST) Received: from artemis2.broadband ([2a0a:ef40:edb:fc01:7b40:ce24:60a6:e419]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fb271ffsm10139626f8f.53.2024.11.25.03.56.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 03:56:49 -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 , =?utf-8?b?Q3PDs2vDoXMgQmVuY2U=?= , Daniel Schwierzeck , Heinrich Schuchardt , Ilias Apalodimas , Jiaxun Yang , Kongyang Liu , Leo , Marek Vasut , Mayuresh Chitale , Michal Simek , Patrick Rudolph , Paul Barker , Peter Robinson , Rayagonda Kokatanur , Raymond Mao , Rick Chen , Simon Glass , Sumit Garg , Tom Rini Subject: [PATCH v4 3/4] x86: select CONFIG_64BIT for X86_64 Date: Mon, 25 Nov 2024 11:55:53 +0000 Message-Id: <20241125115554.1707080-4-andrew.goodbody@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125115554.1707080-1-andrew.goodbody@linaro.org> References: <20241125115554.1707080-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 Reviewed-by: Simon Glass --- Changes in v4: - Add help text to describe new symbol CONFIG_SPL_64BIT - Splite 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 | 11 +++++++---- include/limits.h | 3 ++- 8 files changed, 25 insertions(+), 5 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..30ca39a8e5 100644 --- a/common/bloblist.c +++ b/common/bloblist.c @@ -579,11 +579,14 @@ int bloblist_check_reg_conv(ulong rfdt, ulong rzero, ulong rsig) ulong 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 & ((1UL << 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 Nov 25 11:55: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: 845313 Delivered-To: patch@linaro.org Received: by 2002:a5d:688e:0:b0:382:43a8:7b94 with SMTP id h14csp1128058wru; Mon, 25 Nov 2024 03:57:07 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXoPlXfEz7Uoxe2rnwVnwSdc6iE3KllpebfpK0uhf4OYqJT8yLCNXz+bU4qQ6kjN/AkfP4jWw==@linaro.org X-Google-Smtp-Source: AGHT+IFMgpnDGlMVyh8pAzXbutfKukMjglSp0qHkGVD3t2LzFc2AsWg5/a4eKvW35Z1+RAJvndRN X-Received: by 2002:a17:906:1daa:b0:aa5:3853:5531 with SMTP id a640c23a62f3a-aa53853579amr621239366b.33.1732535827341; Mon, 25 Nov 2024 03:57:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732535827; cv=none; d=google.com; s=arc-20240605; b=KzjGOhF0ClD2QDFN0VQu2/KZqfT2mgCajQ3SZ5G1yni8ogQnsjyroIAd1qurek1wv8 3s+mHKV78/+E0Wyp1FWE4a27WMOQuXJmFQ4+pg02vjPhuwxXpPa3rvuBb2V0NyOfWhCb 17LsS3a5kbuIaNF4FGlZmrLLV9ElgOw2CLQSWf/HWhsENAEpL5IsJa9wLaFktXidcT6E ZqtGFb74+qQ4fqhJxeDHRvnRBpH+Vpc5PvRtwhYmntdeFZXdvpxbjyZk1hLE5soY30jL vs/CF9HXo0ChEf6Ax4UXhI/A+8P1iRklNOmlH1I2mEvnwpHTIofIGup9u4SVkK9eswS/ 6ACw== 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=YhsCQttYyLzTvkZ1UF3ymPRY6Vx3XmxvDnoPP8QEXU/zqgTAr+cmehJDJlTwGtxD/6 AAqIkmpW+/P/zzqKvqthQvbNwc/rgXI7WcjJ/zlTxpEu1H7JIKmixiWX0R3xcEaexw0n LKQ4zgtDs/zzKd6hHZInhC2vWkC/Rm+1XYqsSm7ZvevbQF+tdp3tYHlDVNkR05bIyYjv g5gYVjjnHDjgVbkRHtLGIS4coMXJa3dXo1JXGnnsBLBN8lbrl0/sdCLzt5GNZqeXIr4x qoIhmfs+z1ZFOid9mQihFCUCj1loEFzsp3M3i29mPbnxR5wseMC3bKBwVsaNazSMk5ce O27w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bLJn42l0; 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-aa5104bfc6csi461143066b.754.2024.11.25.03.57.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 03:57: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=bLJn42l0; 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 6D47489A3F; Mon, 25 Nov 2024 12:56:59 +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="bLJn42l0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D16AF89A3C; Mon, 25 Nov 2024 12:56: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-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 D0D7889987 for ; Mon, 25 Nov 2024 12:56: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-x32d.google.com with SMTP id 5b1f17b1804b1-432d866f70fso40332985e9.2 for ; Mon, 25 Nov 2024 03:56:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732535815; x=1733140615; 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=bLJn42l0cjofe/uiah8o3LqEETcW/r4WIAUC1/fHPOThPCAlJU0rHkCG9QcMk8JNhS PcfnRK9Y7UFza3bA6bOj3tId5WQwWLomW9qzYNe3WgxJsK0hUWj3prv+VkCUGIR2eBe7 8r3GRNaQuTjjvKb2Da+g1PFFGwC7ud3zDL/iNl4fgT9YtI6dfqRTDtc6JUThf02rzQzt qZiRQC3Z8Py9i7uufInKDNBdLcj1Srukisc0BIVGtAjhf9cBQeBAkcjYtfU5pu68H94l M3jocZ8un6uMmfqgM/pGKMQAfmV5h9aYH/hUzJuOuZZxevvp8xiB4sFFJy5zyhloVuC+ vpxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732535815; x=1733140615; 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=F+iDuV41c6aTkstnXk93gHHyt7K8SA92emQsNgrd2NTAxEIFCRH83lGaWlrXXWR/Kv j9EzzfVLYS+LdWhYuhXHUilgsoga/6tG2qU5Rgq/T3jUQiSr+WWxei+RzziXOOdkWT68 hwn9D7csl6slwWKozopA2CEfA5+U79Z+36pke3dOEgLpHJCt/e/WHLZQNJKW0dojftWR kyPtRAwFYq5ObwX9p5botspsm57zvXc6PXtbhPXTYPWADlt9tdpGvNTOOHtijrrD1FI4 zHpJxj9oj/qCnnMp0w8ePGbSC0GpGbzoOfwgDvxic6EKSSY/AnnQOoBEYuyDy64T+EYE lusw== X-Gm-Message-State: AOJu0Yyckle5D9ongY5RBK3gSQn2ekoXS3AWqBkodbPlJYAtI7rLSR4Z 0V5Ywh9smZ6pIL+lL91RGNA28Q5a4/uHMVy4t+H3zA0vpijpUQTwIYGhPC7+uxU+DUEek3yP/ai t9zHm7Q== X-Gm-Gg: ASbGncvlJCeejiCJO83YI6dgIeCk6KdSrHtMloEWIfamARFV5RIP5kFsITm2ohXbvh2 Cg0njdBsgl/lTiSlZ0wX9Px025C/xW1xRpYIbKoGKR1+hT0lbbjrYe4xXOk4TwWH2TFmt5JmRWF uTerPNoQCiHBdwGD1odf6dmY1/nLtPq3/SZwqWD0CUQpLQm+PgnJLHtryv7gSPrUevN0lOkeBbP BJH7aNs2WOISCwFkxhG+kWB+U05ZCDq98VHBNur2vcYgMCe2yVexksoG3q77NAPw9lz/A== X-Received: by 2002:a5d:5984:0:b0:37d:54de:1609 with SMTP id ffacd0b85a97d-38260b4574fmr10136601f8f.10.1732535815339; Mon, 25 Nov 2024 03:56:55 -0800 (PST) Received: from artemis2.broadband ([2a0a:ef40:edb:fc01:7b40:ce24:60a6:e419]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fb271ffsm10139626f8f.53.2024.11.25.03.56.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 03:56:54 -0800 (PST) From: Andrew Goodbody To: u-boot@lists.denx.de Cc: Andrew Goodbody , Simon Glass , Heinrich Schuchardt , Tom Rini Subject: [PATCH v4 4/4] test: lib: Use CONFIG_64BIT to detect 64 bit compile Date: Mon, 25 Nov 2024 11:55:54 +0000 Message-Id: <20241125115554.1707080-5-andrew.goodbody@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125115554.1707080-1-andrew.goodbody@linaro.org> References: <20241125115554.1707080-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; }