Message ID | 20241108195820.789716-11-andrew.cooper3@citrix.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Untangle mach-generic/ | expand |
On 08.11.2024 20:58, Andrew Cooper wrote: > All useful content has been moved elsewhere. > > Clean up the dregs, and remove the entire mach-generic include path. What's "dregs" here? > --- a/xen/arch/x86/include/asm/mach-generic/mach_apic.h > +++ /dev/null > @@ -1,24 +0,0 @@ > -#ifndef __ASM_MACH_APIC_H > -#define __ASM_MACH_APIC_H > - > -#include <asm/apic.h> > -#include <asm/io_apic.h> > -#include <asm/genapic.h> > -#include <asm/smp.h> > - > -static inline void enable_apic_mode(void) > -{ > - /* Not needed for modern ES7000 which boot in Virtual Wire mode. */ > - /*es7000_sw_apic();*/ > -} > - > -#define apicid_to_node(apicid) ((int)apicid_to_node[(u32)apicid]) > - > -extern u32 bios_cpu_apicid[]; For these two, isn't there some Misra aspect? They're both unused, and Misra generally dislikes unused stuff. Whereas ... > -static inline int multi_timer_check(int apic, int irq) > -{ > - return 0; > -} ... this and the other inline function further up clearly have their sole users removed here, so are fine without any further text in the description. Preferably with the description amended / clarified: Reviewed-by: Jan Beulich <jbeulich@suse.com> Jan
On 11/11/2024 9:13 am, Jan Beulich wrote: > On 08.11.2024 20:58, Andrew Cooper wrote: >> All useful content has been moved elsewhere. >> >> Clean up the dregs, and remove the entire mach-generic include path. > What's "dregs" here? Oh. "The leftovers". Surprisingly (to me at least), it's not slang. It is most common used to refer to what remains in the cup when you've drunk a coffee/tea/etc. > >> --- a/xen/arch/x86/include/asm/mach-generic/mach_apic.h >> +++ /dev/null >> @@ -1,24 +0,0 @@ >> -#ifndef __ASM_MACH_APIC_H >> -#define __ASM_MACH_APIC_H >> - >> -#include <asm/apic.h> >> -#include <asm/io_apic.h> >> -#include <asm/genapic.h> >> -#include <asm/smp.h> >> - >> -static inline void enable_apic_mode(void) >> -{ >> - /* Not needed for modern ES7000 which boot in Virtual Wire mode. */ >> - /*es7000_sw_apic();*/ >> -} >> - >> -#define apicid_to_node(apicid) ((int)apicid_to_node[(u32)apicid]) >> - >> -extern u32 bios_cpu_apicid[]; > For these two, isn't there some Misra aspect? They're both unused, and Misra > generally dislikes unused stuff. Eclair won't complain about either, I don't think. The macro will just disappear after preprocessing, whereas we've explicitly deviated Rule 8.6 because of how we use dead-code-elimination to reduce ifdefary. > Whereas ... > >> -static inline int multi_timer_check(int apic, int irq) >> -{ >> - return 0; >> -} > ... this and the other inline function further up clearly have their sole > users removed here, so are fine without any further text in the description. > > Preferably with the description amended / clarified: > Reviewed-by: Jan Beulich <jbeulich@suse.com> Lemme have another go. ~Andrew
diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c index 9f3a374e9581..8f192f80b852 100644 --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c @@ -35,7 +35,8 @@ #include <asm/hardirq.h> #include <asm/apic.h> #include <asm/io_apic.h> -#include <mach_apic.h> +#include <asm/genapic.h> + #include <io_ports.h> #include <irq_vectors.h> #include <xen/kexec.h> @@ -230,7 +231,6 @@ void __init connect_bsp_APIC(void) } printk("Enabling APIC mode. Using %d I/O APICs\n", nr_ioapics); - enable_apic_mode(); } void disconnect_bsp_APIC(int virt_wire_setup) diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk index 1460ecf30b9a..8f8aeda679d8 100644 --- a/xen/arch/x86/arch.mk +++ b/xen/arch/x86/arch.mk @@ -3,7 +3,6 @@ export XEN_IMG_OFFSET := 0x200000 -CFLAGS += -I$(srctree)/arch/x86/include/asm/mach-generic CFLAGS += -I$(srctree)/arch/x86/include/asm/mach-default CFLAGS += -DXEN_IMG_OFFSET=$(XEN_IMG_OFFSET) diff --git a/xen/arch/x86/include/asm/mach-generic/mach_apic.h b/xen/arch/x86/include/asm/mach-generic/mach_apic.h deleted file mode 100644 index 3e17c271d9ac..000000000000 --- a/xen/arch/x86/include/asm/mach-generic/mach_apic.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __ASM_MACH_APIC_H -#define __ASM_MACH_APIC_H - -#include <asm/apic.h> -#include <asm/io_apic.h> -#include <asm/genapic.h> -#include <asm/smp.h> - -static inline void enable_apic_mode(void) -{ - /* Not needed for modern ES7000 which boot in Virtual Wire mode. */ - /*es7000_sw_apic();*/ -} - -#define apicid_to_node(apicid) ((int)apicid_to_node[(u32)apicid]) - -extern u32 bios_cpu_apicid[]; - -static inline int multi_timer_check(int apic, int irq) -{ - return 0; -} - -#endif /* __ASM_MACH_APIC_H */ diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index 2774cd45c091..13daebc10a97 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -31,13 +31,16 @@ #include <xen/softirq.h> #include <xen/xvmalloc.h> +#include <asm/apic.h> +#include <asm/genapic.h> #include <asm/hpet.h> +#include <asm/io_apic.h> #include <asm/mc146818rtc.h> #include <asm/smp.h> #include <asm/desc.h> #include <asm/msi.h> #include <asm/setup.h> -#include <mach_apic.h> + #include <io_ports.h> #include <irq_vectors.h> #include <public/physdev.h> @@ -1104,14 +1107,8 @@ static void __init setup_IO_APIC_irqs(void) } irq = pin_2_irq(idx, apic, pin); - /* - * skip adding the timer int on secondary nodes, which causes - * a small but painful rift in the time-space continuum - */ - if (multi_timer_check(apic, irq)) - continue; - else - add_pin_to_irq(irq, apic, pin); + + add_pin_to_irq(irq, apic, pin); if (!IO_APIC_IRQ(irq)) continue;
All useful content has been moved elsewhere. Clean up the dregs, and remove the entire mach-generic include path. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> --- CC: Jan Beulich <JBeulich@suse.com> CC: Roger Pau Monné <roger.pau@citrix.com> --- xen/arch/x86/apic.c | 4 ++-- xen/arch/x86/arch.mk | 1 - .../x86/include/asm/mach-generic/mach_apic.h | 24 ------------------- xen/arch/x86/io_apic.c | 15 +++++------- 4 files changed, 8 insertions(+), 36 deletions(-) delete mode 100644 xen/arch/x86/include/asm/mach-generic/mach_apic.h