pci, x86, acpi: fix early_ioremap() leak
[safe/jmp/linux-2.6] / 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 struct cpumask *(*target_cpus)(void);
24         void (*vector_allocation_domain)(int cpu, struct cpumask *retmask);
25         void (*init_apic_ldr)(void);
26         /* ipi */
27         void (*send_IPI_mask)(const struct cpumask *mask, int vector);
28         void (*send_IPI_mask_allbutself)(const struct cpumask *mask,
29                                          int vector);
30         void (*send_IPI_allbutself)(int vector);
31         void (*send_IPI_all)(int vector);
32         void (*send_IPI_self)(int vector);
33         /* */
34         unsigned int (*cpu_mask_to_apicid)(const struct cpumask *cpumask);
35         unsigned int (*cpu_mask_to_apicid_and)(const struct cpumask *cpumask,
36                                                const struct cpumask *andmask);
37         unsigned int (*phys_pkg_id)(int index_msb);
38         unsigned int (*get_apic_id)(unsigned long x);
39         unsigned long (*set_apic_id)(unsigned int id);
40         unsigned long apic_id_mask;
41         /* wakeup_secondary_cpu */
42         int (*wakeup_cpu)(int apicid, unsigned long start_eip);
43 };
44
45 extern struct genapic *genapic;
46
47 extern struct genapic apic_flat;
48 extern struct genapic apic_physflat;
49 extern struct genapic apic_x2apic_cluster;
50 extern struct genapic apic_x2apic_phys;
51 extern int acpi_madt_oem_check(char *, char *);
52
53 extern void apic_send_IPI_self(int vector);
54 enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
55 extern enum uv_system_type get_uv_system_type(void);
56 extern int is_uv_system(void);
57
58 extern struct genapic apic_x2apic_uv_x;
59 DECLARE_PER_CPU(int, x2apic_extra_bits);
60 extern void uv_cpu_init(void);
61 extern void uv_system_init(void);
62 extern int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip);
63
64 extern void setup_apic_routing(void);
65
66 #endif /* _ASM_X86_GENAPIC_64_H */