Applied, thanks!
Damien Zammit, le sam. 31 janv. 2026 23:08:45 +0000, a ecrit:
> CI exposed some compile failures with xen build.
> Fix provided allows compilation for any combination involving:
>
> --enable-ncpus=1 --enable-platform=xen
>
> SMP on xen is not yet implemented.
> ---
> i386/Makefrag.am | 6 ++----
> i386/i386/cpu_number.h | 4 +++-
> i386/i386/irq.h | 4 ++++
> i386/i386at/model_dep.c | 2 ++
> x86_64/Makefrag.am | 6 +++---
> 5 files changed, 14 insertions(+), 8 deletions(-)
>
> diff --git a/i386/Makefrag.am b/i386/Makefrag.am
> index e5e2cd80..85333d1e 100644
> --- a/i386/Makefrag.am
> +++ b/i386/Makefrag.am
> @@ -30,8 +30,6 @@ if HOST_ix86
> #
>
> libkernel_a_SOURCES += \
> - i386/i386at/acpi_parse_apic.h \
> - i386/i386at/acpi_parse_apic.c \
> i386/i386at/autoconf.c \
> i386/i386at/autoconf.h \
> i386/i386at/biosmem.c \
> @@ -53,6 +51,7 @@ libkernel_a_SOURCES += \
> i386/i386at/com.h \
> i386/i386at/comreg.h \
> i386/i386at/cram.h \
> + i386/i386/cpuboot.S \
> i386/i386at/disk.h \
> i386/i386at/i8250.h \
> i386/i386at/immc.c \
> @@ -99,8 +98,7 @@ libkernel_a_SOURCES += \
> i386/i386/locore.S \
> i386/i386/percpu.c \
> i386/i386/percpu.h \
> - i386/i386/spl.S \
> - i386/i386/cpuboot.S
> + i386/i386/spl.S
>
> if PLATFORM_at
> libkernel_a_SOURCES += \
> diff --git a/i386/i386/cpu_number.h b/i386/i386/cpu_number.h
> index 0f090d2e..4b4ac6c3 100644
> --- a/i386/i386/cpu_number.h
> +++ b/i386/i386/cpu_number.h
> @@ -110,13 +110,15 @@
>
> #ifndef __ASSEMBLER__
> #include <kern/cpu_number.h>
> -#include <i386/apic.h>
> #include <i386/percpu.h>
>
> +#ifdef APIC
> +#include <i386/apic.h>
> static inline int cpu_number_slow(void)
> {
> return cpu_id_lut[apic_get_current_cpu()];
> }
> +#endif
>
> static inline int cpu_number(void)
> {
> diff --git a/i386/i386/irq.h b/i386/i386/irq.h
> index 9c54e18c..a5b4b5bc 100644
> --- a/i386/i386/irq.h
> +++ b/i386/i386/irq.h
> @@ -15,6 +15,8 @@
> #ifndef _I386_IRQ_H
> #define _I386_IRQ_H
>
> +#ifndef MACH_XEN
> +
> #ifdef APIC
> # include <i386/apic.h>
> #else
> @@ -30,4 +32,6 @@ void __disable_irq (irq_t irq);
> extern struct irqdev irqtab;
> extern int pic_mode;
>
> +#endif /* MACH_XEN */
> +
> #endif
> diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c
> index 1c70acc2..eea98754 100644
> --- a/i386/i386at/model_dep.c
> +++ b/i386/i386at/model_dep.c
> @@ -217,6 +217,7 @@ void machine_init(void)
> pmap_unmap_page_zero();
> #endif
>
> +#ifndef MACH_XEN
> #if NCPUS > 1
> /*
> * Patch the realmode gdt with the correct offset and the first jmp to
> @@ -233,6 +234,7 @@ void machine_init(void)
> *(uint32_t *)phystokv(&apboot_jmp_offset) += apboot_addr;
> #endif
> #endif
> +#endif
>
> #ifdef APIC
> /*
> diff --git a/x86_64/Makefrag.am b/x86_64/Makefrag.am
> index 4cf1b1f2..36b5fa38 100644
> --- a/x86_64/Makefrag.am
> +++ b/x86_64/Makefrag.am
> @@ -28,8 +28,6 @@ if HOST_x86_64
> #
>
> libkernel_a_SOURCES += \
> - i386/i386at/acpi_parse_apic.h \
> - i386/i386at/acpi_parse_apic.c \
> i386/i386at/autoconf.c \
> i386/i386at/autoconf.h \
> i386/i386at/biosmem.c \
> @@ -44,11 +42,14 @@ libkernel_a_SOURCES += \
>
> if PLATFORM_at
> libkernel_a_SOURCES += \
> + i386/i386at/acpi_parse_apic.h \
> + i386/i386at/acpi_parse_apic.c \
> x86_64/boothdr.S \
> i386/i386at/com.c \
> i386/i386at/com.h \
> i386/i386at/comreg.h \
> i386/i386at/cram.h \
> + x86_64/cpuboot.S \
> i386/i386at/disk.h \
> i386/i386at/i8250.h \
> i386/i386at/immc.c \
> @@ -92,7 +93,6 @@ libkernel_a_SOURCES += \
> i386/i386/percpu.h \
> i386/i386/percpu.c \
> x86_64/cswitch.S \
> - x86_64/cpuboot.S \
> x86_64/debug_trace.S \
> x86_64/idt_inittab.S \
> x86_64/locore.S \
> --
> 2.51.0
>
>
>
--
Samuel
<g> r: et la marmotte, elle écrit un papier IPDPS