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 9480CECAAA1 for ; Sun, 23 Oct 2022 07:50:13 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8B13984CDF; Sun, 23 Oct 2022 09:50:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=suse.de 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=suse.de header.i=@suse.de header.b="R/RyzVb3"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="XIcwVwwf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5D37B84EA9; Sun, 23 Oct 2022 09:50:08 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BA58084B0C for ; Sun, 23 Oct 2022 09:50:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=msuchanek@suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 7DE5D1F8C6; Sun, 23 Oct 2022 07:50:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1666511405; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=XHRRsowTgDKq6AcIz3AxlpuRh+0mnCrC6cwXb0pvEcc=; b=R/RyzVb3E6SISGuGx2ZHFM1qKRIq7w9bzZ8JJ2X4hrxj5letm1IbcSTm+yBmlNAwmNATK3 FCIBbkd0ib24QOjNcoE1wA/s1Bu35WJGwF8/A4LOyrmrbmqBfbSGfghZsX4VS7Nowl5Wo2 cGF3eUTr+p9DTQQ/LXiKIierovq6AxE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1666511405; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=XHRRsowTgDKq6AcIz3AxlpuRh+0mnCrC6cwXb0pvEcc=; b=XIcwVwwfGOPKcweCs5FQOVwrTFqzn+R2gm3HAqIf7pndoYFjT8y6JIwMEUUh1aVvAjEJcx SWlhaDZCGqNK4FBQ== Received: from kitsune.suse.cz (kitsune.suse.cz [10.100.12.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 627382C141; Sun, 23 Oct 2022 07:50:05 +0000 (UTC) Date: Sun, 23 Oct 2022 09:50:04 +0200 From: Michal =?iso-8859-1?Q?Such=E1nek?= To: Heinrich Schuchardt Cc: u-boot@lists.denx.de, Simon Glass Subject: Re: [PATCH] sandbox: Correctly define BITS_PER_LONG Message-ID: <20221023075004.GZ28810@kitsune.suse.cz> References: <20221022212201.24268-1-msuchanek@suse.de> <6F205FC0-7806-484A-AE74-DED469E504FB@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6F205FC0-7806-484A-AE74-DED469E504FB@gmx.de> User-Agent: Mutt/1.10.1 (2018-07-13) 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 On Sat, Oct 22, 2022 at 11:52:29PM +0200, Heinrich Schuchardt wrote: > > > Am 22. Oktober 2022 23:22:01 MESZ schrieb Michal Suchanek : > >SANDBOX_BITS_PER_LONG is the number of bits in long on the sandbox > >platform. > > Please, explain in the commit message what this patch is good for. For setting BITS_PER_LONG correctly. > Aren't further patches needed to make use of it? 'make ue of it' would likely by running 32bit sandbox with 64bit phys_addr_t, and that indeed won't be fixed by this patch alone. Nonetheless, since nobody noticed that this is broken so far I figured I will send the patch anyway. Thanks Michal > Best regards > > Heinrich > > > > >Signed-off-by: Michal Suchanek > >--- > > > > arch/sandbox/include/asm/types.h | 6 +----- > > 1 file changed, 1 insertion(+), 5 deletions(-) > > > >diff --git a/arch/sandbox/include/asm/types.h b/arch/sandbox/include/asm/types.h > >index c1a5d2af82..5f4b649ee3 100644 > >--- a/arch/sandbox/include/asm/types.h > >+++ b/arch/sandbox/include/asm/types.h > >@@ -18,11 +18,7 @@ typedef unsigned short umode_t; > > /* > > * Number of bits in a C 'long' on this architecture. > > */ > >-#ifdef CONFIG_PHYS_64BIT > >-#define BITS_PER_LONG 64 > >-#else /* CONFIG_PHYS_64BIT */ > >-#define BITS_PER_LONG 32 > >-#endif /* CONFIG_PHYS_64BIT */ > >+#define BITS_PER_LONG CONFIG_SANDBOX_BITS_PER_LONG > > > > #ifdef CONFIG_PHYS_64BIT > > typedef unsigned long long dma_addr_t;