]> xenbits.xensource.com Git - xen.git/commit
x86: deal with gcc12 release build issues
authorJan Beulich <jbeulich@suse.com>
Tue, 19 Jul 2022 06:37:29 +0000 (08:37 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 19 Jul 2022 06:37:29 +0000 (08:37 +0200)
commit9723507daf2120131410c91980d4e4d9b0d0aa90
tree59eac0eb24f3ee5f068cd16b36cc7ac9689f0f4e
parentfdbf8bdfebc2ed323c521848f642cc4f6b8cb662
x86: deal with gcc12 release build issues

While a number of issues we previously had with pre-release gcc12 were
fixed in the final release, we continue to have one issue (with multiple
instances) when doing release builds (i.e. at higher optimization
levels): The compiler takes issue with subtracting (always 1 in our
case) from artifical labels (expressed as array) marking the end of
certain regions. This isn't an unreasonable position to take. Simply
hide the "array-ness" by casting to an integer type. To keep things
looking consistently, apply the same cast also on the respective
expressions dealing with the starting addresses. (Note how
efi_arch_memory_setup()'s l2_table_offset() invocations avoid a similar
issue by already having the necessary casts.) In is_xen_fixed_mfn()
further switch from __pa() to virt_to_maddr() to better match the left
sides of the <= operators.

Reported-by: Charles Arnold <carnold@suse.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/efi/efi-boot.h
xen/arch/x86/include/asm/mm.h