1 #ifndef _ASM_X86_GENAPIC_64_H
2 #define _ASM_X86_GENAPIC_64_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
19 int (*acpi_madt_oem_check
)(char *oem_id
, char *oem_table_id
);
20 u32 int_delivery_mode
;
22 int (*apic_id_registered
)(void);
23 const cpumask_t
*(*target_cpus
)(void);
24 void (*vector_allocation_domain
)(int cpu
, cpumask_t
*retmask
);
25 void (*init_apic_ldr
)(void);
27 void (*send_IPI_mask
)(const cpumask_t
*mask
, int vector
);
28 void (*send_IPI_mask_allbutself
)(const cpumask_t
*mask
, int vector
);
29 void (*send_IPI_allbutself
)(int vector
);
30 void (*send_IPI_all
)(int vector
);
31 void (*send_IPI_self
)(int vector
);
33 unsigned int (*cpu_mask_to_apicid
)(const cpumask_t
*cpumask
);
34 unsigned int (*cpu_mask_to_apicid_and
)(const struct cpumask
*cpumask
,
35 const struct cpumask
*andmask
);
36 unsigned int (*phys_pkg_id
)(int index_msb
);
37 unsigned int (*get_apic_id
)(unsigned long x
);
38 unsigned long (*set_apic_id
)(unsigned int id
);
39 unsigned long apic_id_mask
;
40 /* wakeup_secondary_cpu */
41 int (*wakeup_cpu
)(int apicid
, unsigned long start_eip
);
44 extern struct genapic
*genapic
;
46 extern struct genapic apic_flat
;
47 extern struct genapic apic_physflat
;
48 extern struct genapic apic_x2apic_cluster
;
49 extern struct genapic apic_x2apic_phys
;
50 extern int acpi_madt_oem_check(char *, char *);
52 extern void apic_send_IPI_self(int vector
);
53 enum uv_system_type
{UV_NONE
, UV_LEGACY_APIC
, UV_X2APIC
, UV_NON_UNIQUE_APIC
};
54 extern enum uv_system_type
get_uv_system_type(void);
55 extern int is_uv_system(void);
57 extern struct genapic apic_x2apic_uv_x
;
58 DECLARE_PER_CPU(int, x2apic_extra_bits
);
59 extern void uv_cpu_init(void);
60 extern void uv_system_init(void);
61 extern int uv_wakeup_secondary(int phys_apicid
, unsigned int start_rip
);
63 extern void setup_apic_routing(void);
65 #endif /* _ASM_X86_GENAPIC_64_H */