blob: 07801ea635f688dd78badd35e36055bb6b832081 [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 ****************************************************************************
11 ****************************************************************************/
12#ifndef _ASM_GENAPIC_H
13#define _ASM_GENAPIC_H 1
Ben Cheng4b29af02012-03-07 16:14:53 -080014
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080015#include <asm/mpspec.h>
Ben Cheng4b29af02012-03-07 16:14:53 -080016
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080017struct mpc_config_translation;
18struct mpc_config_bus;
19struct mp_config_table;
20struct mpc_config_processor;
Ben Cheng4b29af02012-03-07 16:14:53 -080021
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080022struct genapic {
23 char *name;
24 int (*probe)(void);
Ben Cheng4b29af02012-03-07 16:14:53 -080025
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080026 int (*apic_id_registered)(void);
27 cpumask_t (*target_cpus)(void);
28 int int_delivery_mode;
29 int int_dest_mode;
30 int ESR_DISABLE;
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 int no_balance_irq;
35 int no_ioapic_check;
36 void (*init_apic_ldr)(void);
37 physid_mask_t (*ioapic_phys_id_map)(physid_mask_t map);
Ben Cheng4b29af02012-03-07 16:14:53 -080038
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080039 void (*setup_apic_routing)(void);
40 int (*multi_timer_check)(int apic, int irq);
41 int (*apicid_to_node)(int logical_apicid);
42 int (*cpu_to_logical_apicid)(int cpu);
43 int (*cpu_present_to_apicid)(int mps_cpu);
44 physid_mask_t (*apicid_to_cpu_present)(int phys_apicid);
45 int (*mpc_apic_id)(struct mpc_config_processor *m,
46 struct mpc_config_translation *t);
47 void (*setup_portio_remap)(void);
48 int (*check_phys_apicid_present)(int boot_cpu_physical_apicid);
49 void (*enable_apic_mode)(void);
50 u32 (*phys_pkg_id)(u32 cpuid_apic, int index_msb);
Ben Cheng4b29af02012-03-07 16:14:53 -080051
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080052 void (*mpc_oem_bus_info)(struct mpc_config_bus *, char *,
53 struct mpc_config_translation *);
54 void (*mpc_oem_pci_bus)(struct mpc_config_bus *,
55 struct mpc_config_translation *);
Ben Cheng4b29af02012-03-07 16:14:53 -080056
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080057 int (*mps_oem_check)(struct mp_config_table *mpc, char *oem,
58 char *productid);
59 int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id);
Ben Cheng4b29af02012-03-07 16:14:53 -080060
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080061 unsigned (*get_apic_id)(unsigned long x);
62 unsigned long apic_id_mask;
63 unsigned int (*cpu_mask_to_apicid)(cpumask_t cpumask);
Ben Cheng4b29af02012-03-07 16:14:53 -080064
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080065};
Ben Cheng4b29af02012-03-07 16:14:53 -080066
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080067#define APICFUNC(x) .x = x,
Ben Cheng4b29af02012-03-07 16:14:53 -080068
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080069#define IPIFUNC(x)
Ben Cheng4b29af02012-03-07 16:14:53 -080070
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080071#define APIC_INIT(aname, aprobe) { .name = aname, .probe = aprobe, .int_delivery_mode = INT_DELIVERY_MODE, .int_dest_mode = INT_DEST_MODE, .no_balance_irq = NO_BALANCE_IRQ, .ESR_DISABLE = esr_disable, .apic_destination_logical = APIC_DEST_LOGICAL, APICFUNC(apic_id_registered) APICFUNC(target_cpus) APICFUNC(check_apicid_used) APICFUNC(check_apicid_present) APICFUNC(init_apic_ldr) APICFUNC(ioapic_phys_id_map) APICFUNC(setup_apic_routing) APICFUNC(multi_timer_check) APICFUNC(apicid_to_node) APICFUNC(cpu_to_logical_apicid) APICFUNC(cpu_present_to_apicid) APICFUNC(apicid_to_cpu_present) APICFUNC(mpc_apic_id) APICFUNC(setup_portio_remap) APICFUNC(check_phys_apicid_present) APICFUNC(mpc_oem_bus_info) APICFUNC(mpc_oem_pci_bus) APICFUNC(mps_oem_check) APICFUNC(get_apic_id) .apic_id_mask = APIC_ID_MASK, APICFUNC(cpu_mask_to_apicid) APICFUNC(acpi_madt_oem_check) IPIFUNC(send_IPI_mask) IPIFUNC(send_IPI_allbutself) IPIFUNC(send_IPI_all) APICFUNC(enable_apic_mode) APICFUNC(phys_pkg_id) }
Ben Cheng4b29af02012-03-07 16:14:53 -080072
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080073#endif