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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 21596C47258 for ; Tue, 23 Jan 2024 13:37:21 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.670475.1043268 (Exim 4.92) (envelope-from ) id 1rSGxh-0001oa-Jm; Tue, 23 Jan 2024 13:37:09 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 670475.1043268; Tue, 23 Jan 2024 13:37:09 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rSGxh-0001oT-H7; Tue, 23 Jan 2024 13:37:09 +0000 Received: by outflank-mailman (input) for mailman id 670475; Tue, 23 Jan 2024 13:37:07 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rSGxf-0001oN-UT for xen-devel@lists.xenproject.org; Tue, 23 Jan 2024 13:37:07 +0000 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [2a00:1450:4864:20::22a]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 7f7227f7-b9f4-11ee-9b0f-b553b5be7939; Tue, 23 Jan 2024 14:37:05 +0100 (CET) Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2cc9fa5e8e1so46454341fa.3 for ; Tue, 23 Jan 2024 05:37:05 -0800 (PST) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id d69-20020a6bcd48000000b007baf1948186sm7086283iog.42.2024.01.23.05.37.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Jan 2024 05:37:04 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 7f7227f7-b9f4-11ee-9b0f-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1706017025; x=1706621825; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=8lzjifM8tNePZ/JouruoJaj9hrHv1zlwJTdDd8CFT7M=; b=c3IT8JhjNNZEpKMYBZ/tnmcAgDdqXpnobkbw41QjbcJY2WRRAHgPi2tfFJrW0pIzYJ 23noYkRZMX5zVA194R8M1EtJOG1sX7drMe380NzQuOVuiz+FGFd4BY5JSi+xuShTtpTE Zr7vTuFSTFX9w8crmoVYeIk15AwJGcmUxlENkIW48jVEu0C7j+vLC9/PUxHqDb+UHPTS CsCrfcjUeWEptRrWgzgkBADeDzfeZF/xRsdTdoRFrofM9Z+cftMbwTu/bFNfbaQ5M4Z2 I9MyMNXXYojtcL3E7BU3qAJuBFlKGKVEQnzXlg+JhFN+8LqbuELJWoBLQcXlxe9NuD/Y OKDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706017025; x=1706621825; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8lzjifM8tNePZ/JouruoJaj9hrHv1zlwJTdDd8CFT7M=; b=QG5iskPdDefcj7XKrw2m9SPBW39+laEXTbJu0sXkGtscaiuLwpmB9lWx6F8/T/kGXv hxBlstvIezCA512O5fV9GI6kTKaPvsFvb0cZDA1+sWJo0ad+FFJwR8MzNQLh/CsIbxut /irkIfJR6oXEJGX7HUSqBT4M6EMP+FFYtbPSpYEYfi/WX8M6LelL0tyQrO2NsiT+iUG2 0CT6VhEPXnEdb8Coljb4jW8n6J7LREFu7Zqw/e7NBEjPZTZaPLwV5xqeLnLrXiFyebPe 0ldciYjJMND5mQp2zc+EkstXlwMJ7uM/rXBEexcQfBuvDhxNgXVJ1g0Rj8+/eLMri5tF uazA== X-Gm-Message-State: AOJu0YyBIk9TW7lQdPqRtfMcEwornEnT1XyufeAj74QKVO83OHeMn/Xs U6/Mmsh46IsNuxQ0vFO7c/ADRCRr0ZVqIoZqqP7kG9tB82lt4avZK21BcfLNcg== X-Google-Smtp-Source: AGHT+IGQkqRiR815pMi3jjQfDVXWbMS19XUac9C5oCUxd5c/UOro2ecpyZyTn3NsVKMk6e0j1fxtdg== X-Received: by 2002:a2e:bc85:0:b0:2cc:dc54:872b with SMTP id h5-20020a2ebc85000000b002ccdc54872bmr3178838ljf.67.1706017025244; Tue, 23 Jan 2024 05:37:05 -0800 (PST) Message-ID: <8e60f998-aeb4-4648-a3e9-d083bb8eefde@suse.com> Date: Tue, 23 Jan 2024 14:37:01 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 16/34] xen/lib: introduce generic find next bit operations Content-Language: en-US To: Oleksii Cc: Alistair Francis , Bob Eshleman , Connor Davis , Andrew Cooper , George Dunlap , Julien Grall , Stefano Stabellini , Wei Liu , xen-devel@lists.xenproject.org References: <81e5cac4-90f0-4fff-b891-53ca73c61832@suse.com> <05d685b0b7ccd329454a336b20351979bdf91ea4.camel@gmail.com> From: Jan Beulich Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4B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WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: <05d685b0b7ccd329454a336b20351979bdf91ea4.camel@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 23.01.2024 13:34, Oleksii wrote: > On Tue, 2024-01-23 at 12:14 +0100, Jan Beulich wrote: >> On 22.12.2023 16:13, Oleksii Kurochko wrote: >>> --- a/xen/common/Kconfig >>> +++ b/xen/common/Kconfig >>> @@ -47,6 +47,9 @@ config ARCH_MAP_DOMAIN_PAGE >>>  config GENERIC_BUG_FRAME >>>   bool >>>   >>> +config GENERIC_FIND_NEXT_BIT >>> + bool >> >> There's no need for this, as ... >> >>> --- a/xen/lib/Makefile >>> +++ b/xen/lib/Makefile >>> @@ -3,6 +3,7 @@ obj-$(CONFIG_X86) += x86/ >>>  lib-y += bsearch.o >>>  lib-y += ctors.o >>>  lib-y += ctype.o >>> +lib-$(CONFIG_GENERIC_FIND_NEXT_BIT) += find-next-bit.o >> >> ... you're moving this to lib/. Or have you encountered any issue >> with building this uniformly, and you forgot to mention this in >> the description? > I didn't check. My intention was to provide opportunity to check if an > architecture want to use generic version or not. Otherwise, I expected > that we will have multiple definiotion of the funcion. > > But considering that they are all defined under #ifdef...#endif we can > remove the declaration of the config GENERIC_FIND_NEXT_BIT. What #ifdef / #endif would matter here? Whats in lib/ is intended to be generic anyway. And what is in the resulting lib.a won't be used by an arch if it has an arch-specific implementation. Problems could arise if an arch had an inline function colliding with the out-of-line one. But that's about the old case where I could see a need to make the building of one of the objects conditional. And you'll note that withing this Makefile there are pretty few conditionals. >>> --- /dev/null >>> +++ b/xen/lib/find-next-bit.c >>>[...] >> >> I was going to ask that you convince git to actually present a proper >> diff, to make visible what changes. But other than the description >> says >> you don't really move the file, you copy it. Judging from further >> titles >> there's also nowhere you'd make Arm actually use this now generic >> code. > I wanted to do it separately, outside this patch series to simplify > review and not have Arm specific changes in RISC-V patch series. Then do it the other way around: Make a separate _prereq_ change truly moving the file. > Regarding a proper diff, you would like me to make git shows that it > was copy from Arm and it is not newly created file. Am I understand you > correctly? Not quite, I think. Git has move detection (and we've seen that in action in other patches of yours). So when truly moving a file, what (if anything) is changed is easily visible. Jan