1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_X86_MPSPEC_H
3 #define _ASM_X86_MPSPEC_H
5 #include <linux/types.h>
7 #include <asm/mpspec_def.h>
8 #include <asm/x86_init.h>
9 #include <asm/apicdef.h>
16 * Summit or generic (i.e. installer) kernels need lots of bus entries.
17 * Maximum 256 PCI busses, plus 1 ISA bus in each of 4 cabinets.
19 #ifdef CONFIG_BASE_SMALL
20 # define MAX_MP_BUSSES 32
22 # define MAX_MP_BUSSES 260
25 #define MAX_IRQ_SOURCES 256
27 #else /* CONFIG_X86_64: */
29 #define MAX_MP_BUSSES 256
30 /* Each PCI slot may be a combo card with its own bus. 4 IRQ pins per slot. */
31 #define MAX_IRQ_SOURCES (MAX_MP_BUSSES * 4)
33 #endif /* CONFIG_X86_64 */
36 extern int mp_bus_id_to_type[MAX_MP_BUSSES];
39 extern DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);
41 extern u32 boot_cpu_physical_apicid;
42 extern u8 boot_cpu_apic_version;
44 #ifdef CONFIG_X86_LOCAL_APIC
45 extern int smp_found_config;
47 # define smp_found_config 0
50 #ifdef CONFIG_X86_MPPARSE
51 extern void e820__memblock_alloc_reserved_mpc_new(void);
52 extern int enable_update_mptable;
53 extern void mpparse_find_mptable(void);
54 extern void mpparse_parse_early_smp_config(void);
55 extern void mpparse_parse_smp_config(void);
57 static inline void e820__memblock_alloc_reserved_mpc_new(void) { }
58 #define enable_update_mptable 0
59 #define mpparse_find_mptable x86_init_noop
60 #define mpparse_parse_early_smp_config x86_init_noop
61 #define mpparse_parse_smp_config x86_init_noop
64 extern DECLARE_BITMAP(phys_cpu_present_map, MAX_LOCAL_APIC);
66 static inline void reset_phys_cpu_present_map(u32 apicid)
68 bitmap_zero(phys_cpu_present_map, MAX_LOCAL_APIC);
69 set_bit(apicid, phys_cpu_present_map);
72 static inline void copy_phys_cpu_present_map(unsigned long *dst)
74 bitmap_copy(dst, phys_cpu_present_map, MAX_LOCAL_APIC);
77 #endif /* _ASM_X86_MPSPEC_H */