xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] compiler.h: define CONFIG_GCC_VERSION
@ 2021-06-18 16:42 Olaf Hering
  2021-06-18 16:46 ` Andrew Cooper
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Olaf Hering @ 2021-06-18 16:42 UTC (permalink / raw)
  To: xen-devel
  Cc: Olaf Hering, Andrew Cooper, George Dunlap, Ian Jackson,
	Jan Beulich, Julien Grall, Konrad Rzeszutek Wilk,
	Stefano Stabellini, Wei Liu

Fixes commit fa5afbbc20ef3577c5338f9d0b24dad45cef59cd,
due to lack of commit 534519f0514f52007d504e0f2eeb714de7b2468d.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 xen/include/xen/compiler.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h
index 85cbd1ab00..e2b7193042 100644
--- a/xen/include/xen/compiler.h
+++ b/xen/include/xen/compiler.h
@@ -99,6 +99,13 @@
     __asm__ ("" : "=r"(__ptr) : "0"(ptr));      \
     (typeof(ptr)) (__ptr + (off)); })
 
+#ifndef CONFIG_GCC_VERSION
+# ifdef __GNUC__
+#  define CONFIG_GCC_VERSION (__GNUC__ * 10000           \
+                              + __GNUC_MINOR__ * 100     \
+                              + __GNUC_PATCHLEVEL__)
+# endif
+#endif
 #if CONFIG_GCC_VERSION >= 110000 /* See gcc bug 100680. */
 # define gcc11_wrap(x) RELOC_HIDE(x, 0)
 #else


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] compiler.h: define CONFIG_GCC_VERSION
  2021-06-18 16:42 [PATCH v1] compiler.h: define CONFIG_GCC_VERSION Olaf Hering
@ 2021-06-18 16:46 ` Andrew Cooper
  2021-06-18 16:55   ` Olaf Hering
  2021-06-21  7:14 ` [PATCH for-4.13] " Jan Beulich
  2021-07-09  6:54 ` [PATCH v1] " Jan Beulich
  2 siblings, 1 reply; 6+ messages in thread
From: Andrew Cooper @ 2021-06-18 16:46 UTC (permalink / raw)
  To: Olaf Hering, xen-devel
  Cc: George Dunlap, Ian Jackson, Jan Beulich, Julien Grall,
	Konrad Rzeszutek Wilk, Stefano Stabellini, Wei Liu

On 18/06/2021 17:42, Olaf Hering wrote:
> Fixes commit fa5afbbc20ef3577c5338f9d0b24dad45cef59cd,
> due to lack of commit 534519f0514f52007d504e0f2eeb714de7b2468d.
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>

Presumably you're intending this for Xen 4.13 and older?

~Andrew


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] compiler.h: define CONFIG_GCC_VERSION
  2021-06-18 16:46 ` Andrew Cooper
@ 2021-06-18 16:55   ` Olaf Hering
  2021-06-21  7:07     ` Jan Beulich
  0 siblings, 1 reply; 6+ messages in thread
From: Olaf Hering @ 2021-06-18 16:55 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: xen-devel, George Dunlap, Ian Jackson, Jan Beulich, Julien Grall,
	Konrad Rzeszutek Wilk, Stefano Stabellini, Wei Liu

[-- Attachment #1: Type: text/plain, Size: 448 bytes --]

Am Fri, 18 Jun 2021 17:46:47 +0100
schrieb Andrew Cooper <andrew.cooper3@citrix.com>:

> On 18/06/2021 17:42, Olaf Hering wrote:
> > Fixes commit fa5afbbc20ef3577c5338f9d0b24dad45cef59cd,
> > due to lack of commit 534519f0514f52007d504e0f2eeb714de7b2468d.

> Presumably you're intending this for Xen 4.13 and older?

722f59d38c710a940ab05e542a83020eb5546dea without the required changes exists only in staging-4.13 at this point.

Olaf

[-- Attachment #2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] compiler.h: define CONFIG_GCC_VERSION
  2021-06-18 16:55   ` Olaf Hering
@ 2021-06-21  7:07     ` Jan Beulich
  0 siblings, 0 replies; 6+ messages in thread
From: Jan Beulich @ 2021-06-21  7:07 UTC (permalink / raw)
  To: Olaf Hering
  Cc: xen-devel, George Dunlap, Ian Jackson, Julien Grall,
	Konrad Rzeszutek Wilk, Stefano Stabellini, Wei Liu,
	Andrew Cooper

On 18.06.2021 18:55, Olaf Hering wrote:
> Am Fri, 18 Jun 2021 17:46:47 +0100
> schrieb Andrew Cooper <andrew.cooper3@citrix.com>:
> 
>> On 18/06/2021 17:42, Olaf Hering wrote:
>>> Fixes commit fa5afbbc20ef3577c5338f9d0b24dad45cef59cd,
>>> due to lack of commit 534519f0514f52007d504e0f2eeb714de7b2468d.
> 
>> Presumably you're intending this for Xen 4.13 and older?
> 
> 722f59d38c710a940ab05e542a83020eb5546dea without the required changes exists only in staging-4.13 at this point.

But please could you help readers by making this obvious without
needing to check what branch(es) said commit is part of, e.g. by
tagging the subject with [PATCH for-4.13] or some such?

Jan



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH for-4.13] compiler.h: define CONFIG_GCC_VERSION
  2021-06-18 16:42 [PATCH v1] compiler.h: define CONFIG_GCC_VERSION Olaf Hering
  2021-06-18 16:46 ` Andrew Cooper
@ 2021-06-21  7:14 ` Jan Beulich
  2021-07-09  6:54 ` [PATCH v1] " Jan Beulich
  2 siblings, 0 replies; 6+ messages in thread
From: Jan Beulich @ 2021-06-21  7:14 UTC (permalink / raw)
  To: Olaf Hering
  Cc: Andrew Cooper, George Dunlap, Ian Jackson, Julien Grall,
	Konrad Rzeszutek Wilk, Stefano Stabellini, Wei Liu, xen-devel

On 18.06.2021 18:42, Olaf Hering wrote:
> Fixes commit fa5afbbc20ef3577c5338f9d0b24dad45cef59cd,
> due to lack of commit 534519f0514f52007d504e0f2eeb714de7b2468d.
> 
> Signed-off-by: Olaf Hering <olaf@aepfle.de>

Reviewed-by: Jan Beulich <jbeulich@suse.com>
albeit ...

> --- a/xen/include/xen/compiler.h
> +++ b/xen/include/xen/compiler.h
> @@ -99,6 +99,13 @@
>      __asm__ ("" : "=r"(__ptr) : "0"(ptr));      \
>      (typeof(ptr)) (__ptr + (off)); })
>  
> +#ifndef CONFIG_GCC_VERSION
> +# ifdef __GNUC__
> +#  define CONFIG_GCC_VERSION (__GNUC__ * 10000           \
> +                              + __GNUC_MINOR__ * 100     \
> +                              + __GNUC_PATCHLEVEL__)
> +# endif
> +#endif

... I question the need for the surrounding #ifdef, and I may also move
this higher up in the file while committing.

Jan



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] compiler.h: define CONFIG_GCC_VERSION
  2021-06-18 16:42 [PATCH v1] compiler.h: define CONFIG_GCC_VERSION Olaf Hering
  2021-06-18 16:46 ` Andrew Cooper
  2021-06-21  7:14 ` [PATCH for-4.13] " Jan Beulich
@ 2021-07-09  6:54 ` Jan Beulich
  2 siblings, 0 replies; 6+ messages in thread
From: Jan Beulich @ 2021-07-09  6:54 UTC (permalink / raw)
  To: Olaf Hering
  Cc: Andrew Cooper, George Dunlap, Ian Jackson, Julien Grall,
	Konrad Rzeszutek Wilk, Stefano Stabellini, Wei Liu, xen-devel

On 18.06.2021 18:42, Olaf Hering wrote:
> --- a/xen/include/xen/compiler.h
> +++ b/xen/include/xen/compiler.h
> @@ -99,6 +99,13 @@
>      __asm__ ("" : "=r"(__ptr) : "0"(ptr));      \
>      (typeof(ptr)) (__ptr + (off)); })
>  
> +#ifndef CONFIG_GCC_VERSION
> +# ifdef __GNUC__
> +#  define CONFIG_GCC_VERSION (__GNUC__ * 10000           \
> +                              + __GNUC_MINOR__ * 100     \
> +                              + __GNUC_PATCHLEVEL__)
> +# endif
> +#endif
>  #if CONFIG_GCC_VERSION >= 110000 /* See gcc bug 100680. */
>  # define gcc11_wrap(x) RELOC_HIDE(x, 0)
>  #else

Having thought about it, this feels like the wrong solution to
me: I'd rather not see us introduce further CONFIG_* which don't
really come from Kconfig. The more when we have an even simpler
alternative:

there's no CONFIG_GCC_VERSION

This was introduced in 4.14 only.

Reported-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/include/xen/compiler.h
+++ b/xen/include/xen/compiler.h
@@ -99,7 +99,7 @@
     __asm__ ("" : "=r"(__ptr) : "0"(ptr));      \
     (typeof(ptr)) (__ptr + (off)); })
 
-#if CONFIG_GCC_VERSION >= 110000 /* See gcc bug 100680. */
+#if __GNUC__ >= 11 /* See gcc bug 100680. */
 # define gcc11_wrap(x) RELOC_HIDE(x, 0)
 #else
 # define gcc11_wrap(x) (x)

I'll also adjust the original backport itself before putting it
on the 4.12 branch (where I think we want both this and the other
gcc 11 fixes).

Jan



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-07-09  6:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18 16:42 [PATCH v1] compiler.h: define CONFIG_GCC_VERSION Olaf Hering
2021-06-18 16:46 ` Andrew Cooper
2021-06-18 16:55   ` Olaf Hering
2021-06-21  7:07     ` Jan Beulich
2021-06-21  7:14 ` [PATCH for-4.13] " Jan Beulich
2021-07-09  6:54 ` [PATCH v1] " Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).