1 #ifndef _ASM_X86_GENAPIC_H
2 #define _ASM_X86_GENAPIC_H
4 #include <linux/cpumask.h>
7 * Copyright 2004 James Cleverdon, IBM.
8 * Subject to the GNU Public License, v.2
10 * Generic APIC sub-arch data struct.
12 * Hacked for x86-64 by James Cleverdon from i386 architecture code by
13 * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and
21 int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id);
22 int (*apic_id_registered)(void);
24 u32 int_delivery_mode;
27 const struct cpumask *(*target_cpus)(void);
31 int apic_destination_logical;
32 unsigned long (*check_apicid_used)(physid_mask_t bitmap, int apicid);
33 unsigned long (*check_apicid_present)(int apicid);
38 void (*vector_allocation_domain)(int cpu, struct cpumask *retmask);
39 void (*init_apic_ldr)(void);
41 physid_mask_t (*ioapic_phys_id_map)(physid_mask_t map);
43 void (*setup_apic_routing)(void);
44 int (*multi_timer_check)(int apic, int irq);
45 int (*apicid_to_node)(int logical_apicid);
46 int (*cpu_to_logical_apicid)(int cpu);
47 int (*cpu_present_to_apicid)(int mps_cpu);
48 physid_mask_t (*apicid_to_cpu_present)(int phys_apicid);
49 void (*setup_portio_remap)(void);
50 int (*check_phys_apicid_present)(int boot_cpu_physical_apicid);
51 void (*enable_apic_mode)(void);
53 u32 (*phys_pkg_id)(u32 cpuid_apic, int index_msb);
55 unsigned int (*phys_pkg_id)(int index_msb);
59 * When one of the next two hooks returns 1 the genapic
60 * is switched to this. Essentially they are additional
63 int (*mps_oem_check)(struct mpc_table *mpc, char *oem,
66 unsigned int (*get_apic_id)(unsigned long x);
67 unsigned long (*set_apic_id)(unsigned int id);
68 unsigned long apic_id_mask;
70 unsigned int (*cpu_mask_to_apicid)(const struct cpumask *cpumask);
71 unsigned int (*cpu_mask_to_apicid_and)(const struct cpumask *cpumask,
72 const struct cpumask *andmask);
76 void (*send_IPI_mask)(const struct cpumask *mask, int vector);
77 void (*send_IPI_mask_allbutself)(const struct cpumask *mask,
79 void (*send_IPI_allbutself)(int vector);
80 void (*send_IPI_all)(int vector);
81 void (*send_IPI_self)(int vector);
83 /* wakeup_secondary_cpu */
84 int (*wakeup_cpu)(int apicid, unsigned long start_eip);
86 int trampoline_phys_low;
87 int trampoline_phys_high;
88 void (*wait_for_init_deassert)(atomic_t *deassert);
89 void (*smp_callin_clear_local_apic)(void);
90 void (*store_NMI_vector)(unsigned short *high, unsigned short *low);
91 void (*restore_NMI_vector)(unsigned short *high, unsigned short *low);
92 void (*inquire_remote_apic)(int apicid);
96 # include "genapic_32.h"
98 # include "genapic_64.h"
101 #endif /* _ASM_X86_GENAPIC_64_H */