On 29.11.2023 16:24, Nicola Vetrini wrote:
> --- a/xen/arch/x86/desc.c
> +++ b/xen/arch/x86/desc.c
> @@ -91,7 +91,7 @@ seg_desc_t boot_compat_gdt[PAGE_SIZE / sizeof(seg_desc_t)] =
> * References boot_cpu_gdt_table for a short period, until the CPUs switch
> * onto their per-CPU GDTs.
> */
> -const struct desc_ptr boot_gdtr = {
> +const struct desc_ptr asmlinkage boot_gdtr = {
> .limit = LAST_RESERVED_GDT_BYTE,
> .base = (unsigned long)(boot_gdt - FIRST_RESERVED_GDT_ENTRY),
> };
I'm not convinced asmlinkage is okay to use on data. Recall that in principle
it may expand to an attribute specifying a non-default calling convention.
Such attributes cannot be assumed to continue to be possible to apply to
non-functions, even if such may happen to work with a particular compiler
version.
Jan