From: Oleksii Kurochko <oleksii.kurochko@gmail.com>
To: Jan Beulich <jbeulich@suse.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
xen-devel@lists.xenproject.org
Cc: "Stefano Stabellini" <sstabellini@kernel.org>,
"Julien Grall" <julien@xen.org>,
"Bertrand Marquis" <bertrand.marquis@arm.com>,
"Michal Orzel" <michal.orzel@amd.com>,
"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Shawn Anastasio" <sanastasio@raptorengineering.com>,
"Alistair Francis" <alistair.francis@wdc.com>,
"Bob Eshleman" <bobbyeshleman@gmail.com>,
"Connor Davis" <connojdavis@gmail.com>
Subject: Re: [PATCH v1] xen/config.h: Move BITS_PER_* definitions from asm/config.h to xen/config.h
Date: Thu, 27 Mar 2025 17:12:45 +0100 [thread overview]
Message-ID: <b9e191b5-9ed6-41bd-b8ec-9843df10d5d1@gmail.com> (raw)
In-Reply-To: <14d9be78-39c9-44b2-b6d8-6ff5fe1b8409@suse.com>
[-- Attachment #1: Type: text/plain, Size: 2321 bytes --]
On 3/27/25 2:16 PM, Jan Beulich wrote:
> On 27.03.2025 13:50, Oleksii Kurochko wrote:
>> On 3/27/25 1:44 AM, Andrew Cooper wrote:
>>> On 26/03/2025 5:47 pm, Oleksii Kurochko wrote:
>>>> diff --git a/xen/include/xen/config.h b/xen/include/xen/config.h
>>>> index d888b2314d..dbbf2fce62 100644
>>>> --- a/xen/include/xen/config.h
>>>> +++ b/xen/include/xen/config.h
>>>> @@ -98,4 +98,13 @@
>>>> #define ZERO_BLOCK_PTR ((void *)-1L)
>>>> #endif
>>>>
>>>> +#define BYTES_PER_LONG __SIZEOF_LONG__
>>>> +
>>>> +#define BITS_PER_BYTE __CHAR_BIT__
>>>> +#define BITS_PER_INT (__SIZEOF_INT__ << 3)
>>>> +#define BITS_PER_LONG (BYTES_PER_LONG << 3)
>>>> +#define BITS_PER_LLONG (__SIZEOF_LONG_LONG__ << 3)
>>>> +
>>>> +#define POINTER_ALIGN __SIZEOF_POINTER__
>>> See how much nicer this is. This patch possibly wants to wait until
>>> I've fixed the compiler checks to update to the new baseline, or we can
>>> just say that staging is staging and corner case error messages are fine.
>> Do you mean this patch:https://lore.kernel.org/xen-devel/20250320153241.43809-3-andrew.cooper3@citrix.com/?
>>
>> I haven't checked clang but if to look at gcc then these builtin macros was introduced in
>> 024a85aeb6a("c-cppbuiltin.c (builtin_define_type_sizeof): New function.") and it seems like even older then gcc5
>> contains this patch:
>> $ git tag --contains 024a85aeb6a912811d917f737eaad39140c2fb0c
>> ...
>> releases/gcc-4.3.0
>> ...
>>
>> Am I missing something?
> The check yet to be adjusted is looking for 4.1, so 4.3 would already be "too new".
I guess you mean this one check:
check-$(gcc) = $(call cc-ver-check,CC,0x040100,"Xen requires at least gcc-4.1")
Could I ask then why in the link above it is checked different version?
-#if !defined(__GNUC__) || (__GNUC__ < 4) -#error Sorry, your compiler
is too old/not recognized. -#elif CONFIG_CC_IS_GCC -# if
defined(CONFIG_ARM_32) && CONFIG_GCC_VERSION < 40900 -# error Sorry,
your version of GCC is too old - please use 4.9 or newer. -# elif
defined(CONFIG_ARM_64) && CONFIG_GCC_VERSION < 50100 -/* - *
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63293 - *
https://lore.kernel.org/r/20210107111841.GN1551@shell.armlinux.org.uk -
*/ -# error Sorry, your version of GCC is too old - please use 5.1 or
newer. -# endif ~ Oleksii
[-- Attachment #2: Type: text/html, Size: 3906 bytes --]
next prev parent reply other threads:[~2025-03-27 16:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-26 17:47 [PATCH v1] xen/config.h: Move BITS_PER_* definitions from asm/config.h to xen/config.h Oleksii Kurochko
2025-03-27 0:44 ` Andrew Cooper
2025-03-27 8:21 ` Jan Beulich
2025-03-27 12:53 ` Andrew Cooper
2025-03-27 13:36 ` Jan Beulich
2025-03-27 12:50 ` Oleksii Kurochko
2025-03-27 13:16 ` Jan Beulich
2025-03-27 16:12 ` Oleksii Kurochko [this message]
2025-03-27 16:14 ` Jan Beulich
2025-03-27 8:18 ` Jan Beulich
2025-03-27 12:51 ` Oleksii Kurochko
2025-03-27 13:37 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b9e191b5-9ed6-41bd-b8ec-9843df10d5d1@gmail.com \
--to=oleksii.kurochko@gmail.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=alistair.francis@wdc.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=bertrand.marquis@arm.com \
--cc=bobbyeshleman@gmail.com \
--cc=connojdavis@gmail.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=roger.pau@citrix.com \
--cc=sanastasio@raptorengineering.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.