ia64/xen-unstable

view xen/include/asm-x86/genapic.h @ 19848:5839491bbf20

[IA64] replace MAX_VCPUS with d->max_vcpus where necessary.

don't use MAX_VCPUS, and use vcpu::max_vcpus.
The changeset of 2f9e1348aa98 introduced max_vcpus to allow more vcpus
per guest. This patch is ia64 counter part.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Mon Jun 29 11:26:05 2009 +0900 (2009-06-29)
parents 822ea2bf0c54
children
line source
1 #ifndef _ASM_GENAPIC_H
2 #define _ASM_GENAPIC_H 1
4 /*
5 * Generic APIC driver interface.
6 *
7 * An straight forward mapping of the APIC related parts of the
8 * x86 subarchitecture interface to a dynamic object.
9 *
10 * This is used by the "generic" x86 subarchitecture.
11 *
12 * Copyright 2003 Andi Kleen, SuSE Labs.
13 */
15 struct mpc_config_translation;
16 struct mpc_config_bus;
17 struct mp_config_table;
18 struct mpc_config_processor;
20 struct genapic {
21 char *name;
22 int (*probe)(void);
24 /* When one of the next two hooks returns 1 the genapic
25 is switched to this. Essentially they are additional probe
26 functions. */
27 int (*mps_oem_check)(struct mp_config_table *mpc, char *oem,
28 char *productid);
29 int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id);
31 /* Interrupt delivery parameters ('physical' vs. 'logical flat'). */
32 int int_delivery_mode;
33 int int_dest_mode;
34 void (*init_apic_ldr)(void);
35 void (*clustered_apic_check)(void);
36 cpumask_t (*target_cpus)(void);
37 unsigned int (*cpu_mask_to_apicid)(cpumask_t cpumask);
38 void (*send_IPI_mask)(const cpumask_t *mask, int vector);
39 };
41 #define APICFUNC(x) .x = x
43 #define APIC_INIT(aname, aprobe) \
44 .name = aname, \
45 .probe = aprobe, \
46 APICFUNC(mps_oem_check), \
47 APICFUNC(acpi_madt_oem_check)
49 extern struct genapic *genapic;
51 void init_apic_ldr_flat(void);
52 void clustered_apic_check_flat(void);
53 cpumask_t target_cpus_flat(void);
54 unsigned int cpu_mask_to_apicid_flat(cpumask_t cpumask);
55 void send_IPI_mask_flat(const cpumask_t *mask, int vector);
56 #define GENAPIC_FLAT \
57 .int_delivery_mode = dest_LowestPrio, \
58 .int_dest_mode = 1 /* logical delivery */, \
59 .init_apic_ldr = init_apic_ldr_flat, \
60 .clustered_apic_check = clustered_apic_check_flat, \
61 .target_cpus = target_cpus_flat, \
62 .cpu_mask_to_apicid = cpu_mask_to_apicid_flat, \
63 .send_IPI_mask = send_IPI_mask_flat
65 void init_apic_ldr_x2apic(void);
66 void clustered_apic_check_x2apic(void);
67 cpumask_t target_cpus_x2apic(void);
68 unsigned int cpu_mask_to_apicid_x2apic(cpumask_t cpumask);
69 void send_IPI_mask_x2apic(const cpumask_t *mask, int vector);
70 #define GENAPIC_X2APIC \
71 .int_delivery_mode = dest_Fixed, \
72 .int_dest_mode = 0 /* physical delivery */, \
73 .init_apic_ldr = init_apic_ldr_x2apic, \
74 .clustered_apic_check = clustered_apic_check_x2apic, \
75 .target_cpus = target_cpus_x2apic, \
76 .cpu_mask_to_apicid = cpu_mask_to_apicid_x2apic, \
77 .send_IPI_mask = send_IPI_mask_x2apic
79 void init_apic_ldr_phys(void);
80 void clustered_apic_check_phys(void);
81 cpumask_t target_cpus_phys(void);
82 unsigned int cpu_mask_to_apicid_phys(cpumask_t cpumask);
83 void send_IPI_mask_phys(const cpumask_t *mask, int vector);
84 #define GENAPIC_PHYS \
85 .int_delivery_mode = dest_Fixed, \
86 .int_dest_mode = 0 /* physical delivery */, \
87 .init_apic_ldr = init_apic_ldr_phys, \
88 .clustered_apic_check = clustered_apic_check_phys, \
89 .target_cpus = target_cpus_phys, \
90 .cpu_mask_to_apicid = cpu_mask_to_apicid_phys, \
91 .send_IPI_mask = send_IPI_mask_phys
93 #endif