]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - arch/x86/include/asm/genapic_64.h
x86: Add cpu_mask_to_apicid_and
[linux-2.6-omap-h63xx.git] / arch / x86 / include / asm / genapic_64.h
1 #ifndef _ASM_X86_GENAPIC_64_H
2 #define _ASM_X86_GENAPIC_64_H
3
4 #include <linux/cpumask.h>
5
6 /*
7  * Copyright 2004 James Cleverdon, IBM.
8  * Subject to the GNU Public License, v.2
9  *
10  * Generic APIC sub-arch data struct.
11  *
12  * Hacked for x86-64 by James Cleverdon from i386 architecture code by
13  * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and
14  * James Cleverdon.
15  */
16
17 struct genapic {
18         char *name;
19         int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id);
20         u32 int_delivery_mode;
21         u32 int_dest_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);
26         /* ipi */
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);
32         /* */
33         unsigned int (*cpu_mask_to_apicid)(const cpumask_t *cpumask);
34         unsigned int (*cpu_mask_to_apicid_and)(const cpumask_t *cpumask,
35                                                const cpumask_t *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);
42 };
43
44 extern struct genapic *genapic;
45
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 *);
51
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);
56
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);
62
63 extern void setup_apic_routing(void);
64
65 #endif /* _ASM_X86_GENAPIC_64_H */