diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-27 17:07:42 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-28 17:20:04 -0500 |
commit | 943d0f74d47724d0e33083674c16a834f080af2c (patch) | |
tree | c26365ef847a618624bb06284535210eaf74879a | |
parent | 6e7a59944a2971c4fb400bfbecb2f68570086b05 (diff) |
x86, genapic: refactor genapic_32.h
Impact: pre unification cleanup
Make genapic_32.h similar to genapic_64.h: reorder fields, unify types
and bring in new entries.
No existing functionality is affected.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/include/asm/genapic_32.h | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/arch/x86/include/asm/genapic_32.h b/arch/x86/include/asm/genapic_32.h index 4334502d3664..5808b7daf0a3 100644 --- a/arch/x86/include/asm/genapic_32.h +++ b/arch/x86/include/asm/genapic_32.h | |||
@@ -21,19 +21,28 @@ struct mpc_cpu; | |||
21 | 21 | ||
22 | struct genapic { | 22 | struct genapic { |
23 | char *name; | 23 | char *name; |
24 | int (*probe)(void); | ||
25 | 24 | ||
25 | int (*probe)(void); | ||
26 | int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id); | ||
26 | int (*apic_id_registered)(void); | 27 | int (*apic_id_registered)(void); |
28 | |||
29 | u32 int_delivery_mode; | ||
30 | u32 int_dest_mode; | ||
31 | |||
27 | const struct cpumask *(*target_cpus)(void); | 32 | const struct cpumask *(*target_cpus)(void); |
28 | int int_delivery_mode; | 33 | |
29 | int int_dest_mode; | ||
30 | int ESR_DISABLE; | 34 | int ESR_DISABLE; |
35 | |||
31 | int apic_destination_logical; | 36 | int apic_destination_logical; |
32 | unsigned long (*check_apicid_used)(physid_mask_t bitmap, int apicid); | 37 | unsigned long (*check_apicid_used)(physid_mask_t bitmap, int apicid); |
33 | unsigned long (*check_apicid_present)(int apicid); | 38 | unsigned long (*check_apicid_present)(int apicid); |
39 | |||
34 | int no_balance_irq; | 40 | int no_balance_irq; |
35 | int no_ioapic_check; | 41 | int no_ioapic_check; |
42 | |||
43 | void (*vector_allocation_domain)(int cpu, struct cpumask *retmask); | ||
36 | void (*init_apic_ldr)(void); | 44 | void (*init_apic_ldr)(void); |
45 | |||
37 | physid_mask_t (*ioapic_phys_id_map)(physid_mask_t map); | 46 | physid_mask_t (*ioapic_phys_id_map)(physid_mask_t map); |
38 | 47 | ||
39 | void (*setup_apic_routing)(void); | 48 | void (*setup_apic_routing)(void); |
@@ -45,22 +54,27 @@ struct genapic { | |||
45 | void (*setup_portio_remap)(void); | 54 | void (*setup_portio_remap)(void); |
46 | int (*check_phys_apicid_present)(int boot_cpu_physical_apicid); | 55 | int (*check_phys_apicid_present)(int boot_cpu_physical_apicid); |
47 | void (*enable_apic_mode)(void); | 56 | void (*enable_apic_mode)(void); |
57 | #ifdef CONFIG_X86_32 | ||
48 | u32 (*phys_pkg_id)(u32 cpuid_apic, int index_msb); | 58 | u32 (*phys_pkg_id)(u32 cpuid_apic, int index_msb); |
59 | #else | ||
60 | unsigned int (*phys_pkg_id)(int index_msb); | ||
61 | #endif | ||
49 | 62 | ||
50 | /* mpparse */ | 63 | /* |
51 | /* When one of the next two hooks returns 1 the genapic | 64 | * When one of the next two hooks returns 1 the genapic |
52 | is switched to this. Essentially they are additional probe | 65 | * is switched to this. Essentially they are additional |
53 | functions. */ | 66 | * probe functions: |
67 | */ | ||
54 | int (*mps_oem_check)(struct mpc_table *mpc, char *oem, | 68 | int (*mps_oem_check)(struct mpc_table *mpc, char *oem, |
55 | char *productid); | 69 | char *productid); |
56 | int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id); | ||
57 | 70 | ||
58 | unsigned (*get_apic_id)(unsigned long x); | 71 | unsigned int (*get_apic_id)(unsigned long x); |
72 | unsigned long (*set_apic_id)(unsigned int id); | ||
59 | unsigned long apic_id_mask; | 73 | unsigned long apic_id_mask; |
74 | |||
60 | unsigned int (*cpu_mask_to_apicid)(const struct cpumask *cpumask); | 75 | unsigned int (*cpu_mask_to_apicid)(const struct cpumask *cpumask); |
61 | unsigned int (*cpu_mask_to_apicid_and)(const struct cpumask *cpumask, | 76 | unsigned int (*cpu_mask_to_apicid_and)(const struct cpumask *cpumask, |
62 | const struct cpumask *andmask); | 77 | const struct cpumask *andmask); |
63 | void (*vector_allocation_domain)(int cpu, struct cpumask *retmask); | ||
64 | 78 | ||
65 | #ifdef CONFIG_SMP | 79 | #ifdef CONFIG_SMP |
66 | /* ipi */ | 80 | /* ipi */ |
@@ -69,8 +83,11 @@ struct genapic { | |||
69 | int vector); | 83 | int vector); |
70 | void (*send_IPI_allbutself)(int vector); | 84 | void (*send_IPI_allbutself)(int vector); |
71 | void (*send_IPI_all)(int vector); | 85 | void (*send_IPI_all)(int vector); |
86 | void (*send_IPI_self)(int vector); | ||
72 | #endif | 87 | #endif |
88 | /* wakeup_secondary_cpu */ | ||
73 | int (*wakeup_cpu)(int apicid, unsigned long start_eip); | 89 | int (*wakeup_cpu)(int apicid, unsigned long start_eip); |
90 | |||
74 | int trampoline_phys_low; | 91 | int trampoline_phys_low; |
75 | int trampoline_phys_high; | 92 | int trampoline_phys_high; |
76 | void (*wait_for_init_deassert)(atomic_t *deassert); | 93 | void (*wait_for_init_deassert)(atomic_t *deassert); |