From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 328C2C433FE for ; Sat, 15 Oct 2022 18:39:30 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5FC7D84DE8; Sat, 15 Oct 2022 20:39:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Dib5Paq1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C760084DFC; Sat, 15 Oct 2022 20:39:26 +0200 (CEST) Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) (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 592EF8456E for ; Sat, 15 Oct 2022 20:39:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-wm1-x333.google.com with SMTP id r3-20020a05600c35c300b003b4b5f6c6bdso6378932wmq.2 for ; Sat, 15 Oct 2022 11:39:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=vyCJ7Tfnl3xsg8aktbmqysH+9ky3tuPWRxCx69W6RRc=; b=Dib5Paq19VUXs/tzi2k28jre22I/S83/Nr1r+AF/sKRvgwl9NoWwfUyX4uYbLrsV4t uzl8BUV4vzoDzBYKiDvGTY8IZZDc92NK5rfugwnDi/H6xb+ouosa7aryK5T2cENv6LKO DiyUjYZeJvXH2OY4Te5Fuf09ueHaByS8RnNN8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vyCJ7Tfnl3xsg8aktbmqysH+9ky3tuPWRxCx69W6RRc=; b=GZfZ7WNqA1+4/QpS81Wtuzeih1xFxXJXB/umqNQ+/RGFqzJc2j8I53u4jQyW9twaFC PEatUSVzy4noPZu0g1gAGqQLApIzx3RsMFgDCtLUYGV3xOu9pIdJy88mfE7O2FLkX+Ih Y0oFK4k6UfFx4qL9xV8EOTqHacrvKLxROvIKJMC7/6tMJg559xbdaYKzlD8dMP8yFiZ/ FrZIQLgWHcr7onzY4bUKXW/niSbV+Tejrjc1qfxXYZaK6r2zTReFYF56oW+RS6N+HOiy 6bvrYWDn7xySZ91YVrLCCWdI9cNqwBWNhsHBtXh2OMJUYyCJr6hW9VGQNDEr03cqshzL qLHA== X-Gm-Message-State: ACrzQf1dP4CYgHDIJigiDNKIynPwnDk0eDfVCSuMLIPqiGX0uak81x2y Iz6aO/eoA6TI53GI6bOUJibewbkKj5ZUqsCqJXNeBw== X-Google-Smtp-Source: AMsMyM5wOwFHCrgOYPUbnIMKpeW7x9rDSla0QWM14RmB8EzeMnRoOFRmEfsB4nC3Jpera5fKZzsmIdP1w/b2pftnB8A= X-Received: by 2002:a05:600c:5254:b0:3b5:99c:9be1 with SMTP id fc20-20020a05600c525400b003b5099c9be1mr2481411wmb.172.1665859163727; Sat, 15 Oct 2022 11:39:23 -0700 (PDT) MIME-Version: 1.0 References: <20221014205234.19385-1-msuchanek@suse.de> <1774657c-51cb-fde7-7f65-a76b8cdcd5f9@gmx.de> In-Reply-To: <1774657c-51cb-fde7-7f65-a76b8cdcd5f9@gmx.de> From: Simon Glass Date: Sat, 15 Oct 2022 12:39:11 -0600 Message-ID: Subject: Re: [PATCH v2] tests: Build correct sandbox configuration on 32bit To: Heinrich Schuchardt Cc: u-boot@lists.denx.de, Michal Suchanek Content-Type: text/plain; charset="UTF-8" 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.6 at phobos.denx.de X-Virus-Status: Clean Hi Heinrich, On Sat, 15 Oct 2022 at 12:31, Heinrich Schuchardt wrote: > > On 10/15/22 19:53, Simon Glass wrote: > > Hi Michal, > > > > On Fri, 14 Oct 2022 at 14:53, Michal Suchanek wrote: > >> > >> Currently sandbox configuration defautls to 64bit and there is no > >> automation for building 32bit sandbox on 32bit hosts. > >> > >> Use _LP64 macro as heuristic for detecting 64bit targets. > >> > >> Signed-off-by: Michal Suchanek > >> --- > >> > >> Changes in v2: > >> simplify and move detection to kconfig > >> > >> --- > >> arch/sandbox/Kconfig | 18 +++--------------- > >> scripts/Kconfig.include | 4 ++++ > >> 2 files changed, 7 insertions(+), 15 deletions(-) > > > > Reviewed-by: Simon Glass > > > > My only question is whether we can allow building the 32-bit version > > on a 64-bit machine? That would need a separate option I think, to > > say: > > > > I don't want you to automatically determine HOST_32/64BIT. Instead, > > use 32 (or 64). > > > > This is along the lines of what Heinrich is saying, except that I > > strongly feel that we must do the right thing by default, as your > > patch does. > > The whole point of phys_addr_t and phys_size_t is that it can be 64bit > or 32bit on ilp32. > > With this patch we cannot build with CONFIG_PHYS_64BIT=y on ilp32 and > that is bad. > > 32 bit phys_addr_t on lp64 is irrelevant for actual hardware but this is > what we currently test with sandbox_defconfig on Gitlab CI. > > My patch is ending up in the same behavior as Michal's patch except that > it allows to have 64bit phys_addr_t on ilp32. It needs to automatically default to 32 or 64 bit depending on the host. If the user wants to fiddle with Kconfig to force it to the other one, that should be possible to. It looks like your patch requires manual configuration, but perhaps I just misunderstood it? [..] Regards, Simon