Vegard Nossum | 77ef50a | 2008-06-18 17:08:48 +0200 | [diff] [blame] | 1 | #ifndef ASM_X86__GENAPIC_64_H |
| 2 | #define ASM_X86__GENAPIC_64_H |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | |
| 4 | /* |
| 5 | * Copyright 2004 James Cleverdon, IBM. |
| 6 | * Subject to the GNU Public License, v.2 |
| 7 | * |
| 8 | * Generic APIC sub-arch data struct. |
| 9 | * |
| 10 | * Hacked for x86-64 by James Cleverdon from i386 architecture code by |
| 11 | * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and |
| 12 | * James Cleverdon. |
| 13 | */ |
| 14 | |
| 15 | struct genapic { |
| 16 | char *name; |
Yinghai Lu | 1b9b89e | 2008-07-21 22:08:21 -0700 | [diff] [blame] | 17 | int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | u32 int_delivery_mode; |
| 19 | u32 int_dest_mode; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | int (*apic_id_registered)(void); |
| 21 | cpumask_t (*target_cpus)(void); |
Eric W. Biederman | c7111c13 | 2006-10-08 07:47:55 -0600 | [diff] [blame] | 22 | cpumask_t (*vector_allocation_domain)(int cpu); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | void (*init_apic_ldr)(void); |
| 24 | /* ipi */ |
| 25 | void (*send_IPI_mask)(cpumask_t mask, int vector); |
| 26 | void (*send_IPI_allbutself)(int vector); |
| 27 | void (*send_IPI_all)(int vector); |
Suresh Siddha | cff73a6 | 2008-07-10 11:16:53 -0700 | [diff] [blame] | 28 | void (*send_IPI_self)(int vector); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | /* */ |
| 30 | unsigned int (*cpu_mask_to_apicid)(cpumask_t cpumask); |
| 31 | unsigned int (*phys_pkg_id)(int index_msb); |
Yinghai Lu | f910a9d | 2008-07-12 01:01:20 -0700 | [diff] [blame] | 32 | unsigned int (*get_apic_id)(unsigned long x); |
| 33 | unsigned long (*set_apic_id)(unsigned int id); |
| 34 | unsigned long apic_id_mask; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | }; |
| 36 | |
Andrew Morton | 3dc68d9 | 2007-05-02 19:27:04 +0200 | [diff] [blame] | 37 | extern struct genapic *genapic; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 38 | |
Ingo Molnar | 07c7c47 | 2007-05-02 19:27:04 +0200 | [diff] [blame] | 39 | extern struct genapic apic_flat; |
| 40 | extern struct genapic apic_physflat; |
Suresh Siddha | 12a67cf | 2008-07-10 11:16:54 -0700 | [diff] [blame] | 41 | extern struct genapic apic_x2apic_cluster; |
Suresh Siddha | 2d9579a | 2008-07-10 11:16:59 -0700 | [diff] [blame] | 42 | extern struct genapic apic_x2apic_phys; |
Jack Steiner | ae26186 | 2008-03-28 14:12:06 -0500 | [diff] [blame] | 43 | extern int acpi_madt_oem_check(char *, char *); |
| 44 | |
Suresh Siddha | cff73a6 | 2008-07-10 11:16:53 -0700 | [diff] [blame] | 45 | extern void apic_send_IPI_self(int vector); |
Jack Steiner | ae26186 | 2008-03-28 14:12:06 -0500 | [diff] [blame] | 46 | enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC}; |
| 47 | extern enum uv_system_type get_uv_system_type(void); |
| 48 | extern int is_uv_system(void); |
Ingo Molnar | 07c7c47 | 2007-05-02 19:27:04 +0200 | [diff] [blame] | 49 | |
Jack Steiner | ac23d4e | 2008-03-28 14:12:16 -0500 | [diff] [blame] | 50 | extern struct genapic apic_x2apic_uv_x; |
| 51 | DECLARE_PER_CPU(int, x2apic_extra_bits); |
| 52 | extern void uv_cpu_init(void); |
Marcin Slusarz | c4bd1fd | 2008-08-21 20:49:05 +0200 | [diff] [blame] | 53 | extern void uv_system_init(void); |
Jack Steiner | ac23d4e | 2008-03-28 14:12:16 -0500 | [diff] [blame] | 54 | extern int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip); |
| 55 | |
Thomas Gleixner | 88a8335 | 2008-05-02 23:19:26 +0200 | [diff] [blame] | 56 | extern void setup_apic_routing(void); |
| 57 | |
Vegard Nossum | 77ef50a | 2008-06-18 17:08:48 +0200 | [diff] [blame] | 58 | #endif /* ASM_X86__GENAPIC_64_H */ |