aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-27 17:07:42 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-28 17:20:03 -0500
commit6e7a59944a2971c4fb400bfbecb2f68570086b05 (patch)
treef83b33e948afbaad792a79386610d4481fc27bb5 /arch
parent74b6eb6b937df07d0757e8642b7538b07da4290f (diff)
x86, genapic: refactor genapic_64.h
Impact: pre unification cleanup Make genapic_64.h similar to genapic_32.h: reorder fields, unify types and bring in new entries. No existing functionality is affected. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/include/asm/genapic_64.h68
1 files changed, 59 insertions, 9 deletions
diff --git a/arch/x86/include/asm/genapic_64.h b/arch/x86/include/asm/genapic_64.h
index 7bb092c59055..0a5f7122d9fe 100644
--- a/arch/x86/include/asm/genapic_64.h
+++ b/arch/x86/include/asm/genapic_64.h
@@ -16,13 +16,62 @@
16 16
17struct genapic { 17struct genapic {
18 char *name; 18 char *name;
19
20 int (*probe)(void);
19 int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id); 21 int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id);
22 int (*apic_id_registered)(void);
23
20 u32 int_delivery_mode; 24 u32 int_delivery_mode;
21 u32 int_dest_mode; 25 u32 int_dest_mode;
22 int (*apic_id_registered)(void); 26
23 const struct cpumask *(*target_cpus)(void); 27 const struct cpumask *(*target_cpus)(void);
28
29 int ESR_DISABLE;
30
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);
34
35 int no_balance_irq;
36 int no_ioapic_check;
37
24 void (*vector_allocation_domain)(int cpu, struct cpumask *retmask); 38 void (*vector_allocation_domain)(int cpu, struct cpumask *retmask);
25 void (*init_apic_ldr)(void); 39 void (*init_apic_ldr)(void);
40
41 physid_mask_t (*ioapic_phys_id_map)(physid_mask_t map);
42
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);
52#ifdef CONFIG_X86_32
53 u32 (*phys_pkg_id)(u32 cpuid_apic, int index_msb);
54#else
55 unsigned int (*phys_pkg_id)(int index_msb);
56#endif
57
58 /*
59 * When one of the next two hooks returns 1 the genapic
60 * is switched to this. Essentially they are additional
61 * probe functions:
62 */
63 int (*mps_oem_check)(struct mpc_table *mpc, char *oem,
64 char *productid);
65
66 unsigned int (*get_apic_id)(unsigned long x);
67 unsigned long (*set_apic_id)(unsigned int id);
68 unsigned long apic_id_mask;
69
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);
73
74#ifdef CONFIG_SMP
26 /* ipi */ 75 /* ipi */
27 void (*send_IPI_mask)(const struct cpumask *mask, int vector); 76 void (*send_IPI_mask)(const struct cpumask *mask, int vector);
28 void (*send_IPI_mask_allbutself)(const struct cpumask *mask, 77 void (*send_IPI_mask_allbutself)(const struct cpumask *mask,
@@ -30,16 +79,17 @@ struct genapic {
30 void (*send_IPI_allbutself)(int vector); 79 void (*send_IPI_allbutself)(int vector);
31 void (*send_IPI_all)(int vector); 80 void (*send_IPI_all)(int vector);
32 void (*send_IPI_self)(int vector); 81 void (*send_IPI_self)(int vector);
33 /* */ 82#endif
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 */ 83 /* wakeup_secondary_cpu */
42 int (*wakeup_cpu)(int apicid, unsigned long start_eip); 84 int (*wakeup_cpu)(int apicid, unsigned long start_eip);
85
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);
43}; 93};
44 94
45extern struct genapic *genapic; 95extern struct genapic *genapic;