diff options
author | Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> | 2007-02-02 11:48:22 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-02-02 21:14:29 -0500 |
commit | 15a58ed12142939d51076380e6e58af477ad96ec (patch) | |
tree | 193dbd4637b3c1cd5d976215cece37a95041e499 /include | |
parent | 5f3b1a8b6737b09ce5df4ec9fad4ad271aecb5fb (diff) |
ACPICA: Remove duplicate table definitions (non-conflicting), cont
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-i386/mach-es7000/mach_mpparse.h | 17 | ||||
-rw-r--r-- | include/linux/acpi.h | 123 |
2 files changed, 15 insertions, 125 deletions
diff --git a/include/asm-i386/mach-es7000/mach_mpparse.h b/include/asm-i386/mach-es7000/mach_mpparse.h index 99f66be240be..24990e546da3 100644 --- a/include/asm-i386/mach-es7000/mach_mpparse.h +++ b/include/asm-i386/mach-es7000/mach_mpparse.h | |||
@@ -3,13 +3,13 @@ | |||
3 | 3 | ||
4 | #include <linux/acpi.h> | 4 | #include <linux/acpi.h> |
5 | 5 | ||
6 | static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name, | 6 | static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name, |
7 | struct mpc_config_translation *translation) | 7 | struct mpc_config_translation *translation) |
8 | { | 8 | { |
9 | Dprintk("Bus #%d is %s\n", m->mpc_busid, name); | 9 | Dprintk("Bus #%d is %s\n", m->mpc_busid, name); |
10 | } | 10 | } |
11 | 11 | ||
12 | static inline void mpc_oem_pci_bus(struct mpc_config_bus *m, | 12 | static inline void mpc_oem_pci_bus(struct mpc_config_bus *m, |
13 | struct mpc_config_translation *translation) | 13 | struct mpc_config_translation *translation) |
14 | { | 14 | { |
15 | } | 15 | } |
@@ -22,7 +22,7 @@ static inline int mps_oem_check(struct mp_config_table *mpc, char *oem, | |||
22 | char *productid) | 22 | char *productid) |
23 | { | 23 | { |
24 | if (mpc->mpc_oemptr) { | 24 | if (mpc->mpc_oemptr) { |
25 | struct mp_config_oemtable *oem_table = | 25 | struct mp_config_oemtable *oem_table = |
26 | (struct mp_config_oemtable *)mpc->mpc_oemptr; | 26 | (struct mp_config_oemtable *)mpc->mpc_oemptr; |
27 | if (!strncmp(oem, "UNISYS", 6)) | 27 | if (!strncmp(oem, "UNISYS", 6)) |
28 | return parse_unisys_oem((char *)oem_table); | 28 | return parse_unisys_oem((char *)oem_table); |
@@ -31,12 +31,13 @@ static inline int mps_oem_check(struct mp_config_table *mpc, char *oem, | |||
31 | } | 31 | } |
32 | 32 | ||
33 | #ifdef CONFIG_ACPI | 33 | #ifdef CONFIG_ACPI |
34 | |||
34 | static inline int es7000_check_dsdt(void) | 35 | static inline int es7000_check_dsdt(void) |
35 | { | 36 | { |
36 | struct acpi_table_header *header = NULL; | 37 | struct acpi_table_header header; |
37 | if(!acpi_get_table_header_early(ACPI_DSDT, &header)) | 38 | memcpy(&header, 0, sizeof(struct acpi_table_header)); |
38 | acpi_table_print(header, 0); | 39 | acpi_get_table_header(ACPI_SIG_DSDT, 0, &header); |
39 | if (!strncmp(header->oem_id, "UNISYS", 6)) | 40 | if (!strncmp(header.oem_id, "UNISYS", 6)) |
40 | return 1; | 41 | return 1; |
41 | return 0; | 42 | return 0; |
42 | } | 43 | } |
@@ -44,7 +45,7 @@ static inline int es7000_check_dsdt(void) | |||
44 | /* Hook from generic ACPI tables.c */ | 45 | /* Hook from generic ACPI tables.c */ |
45 | static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) | 46 | static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) |
46 | { | 47 | { |
47 | unsigned long oem_addr; | 48 | unsigned long oem_addr; |
48 | if (!find_unisys_acpi_oem_table(&oem_addr)) { | 49 | if (!find_unisys_acpi_oem_table(&oem_addr)) { |
49 | if (es7000_check_dsdt()) | 50 | if (es7000_check_dsdt()) |
50 | return parse_unisys_oem((char *)oem_addr); | 51 | return parse_unisys_oem((char *)oem_addr); |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index fac7a7b1f5f9..815f1fb4ce21 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -53,11 +53,6 @@ enum acpi_irq_model_id { | |||
53 | 53 | ||
54 | extern enum acpi_irq_model_id acpi_irq_model; | 54 | extern enum acpi_irq_model_id acpi_irq_model; |
55 | 55 | ||
56 | typedef struct { | ||
57 | u8 type; | ||
58 | u8 length; | ||
59 | } __attribute__ ((packed)) acpi_table_entry_header; | ||
60 | |||
61 | enum acpi_interrupt_id { | 56 | enum acpi_interrupt_id { |
62 | ACPI_INTERRUPT_PMI = 1, | 57 | ACPI_INTERRUPT_PMI = 1, |
63 | ACPI_INTERRUPT_INIT, | 58 | ACPI_INTERRUPT_INIT, |
@@ -67,74 +62,6 @@ enum acpi_interrupt_id { | |||
67 | 62 | ||
68 | #define ACPI_SPACE_MEM 0 | 63 | #define ACPI_SPACE_MEM 0 |
69 | 64 | ||
70 | struct acpi_gen_regaddr { | ||
71 | u8 space_id; | ||
72 | u8 bit_width; | ||
73 | u8 bit_offset; | ||
74 | u8 resv; | ||
75 | u32 addrl; | ||
76 | u32 addrh; | ||
77 | } __attribute__ ((packed)); | ||
78 | |||
79 | /* | ||
80 | * Simple Boot Flags | ||
81 | * http://www.microsoft.com/whdc/hwdev/resources/specs/simp_bios.mspx | ||
82 | */ | ||
83 | struct acpi_table_sbf | ||
84 | { | ||
85 | u8 sbf_signature[4]; | ||
86 | u32 sbf_len; | ||
87 | u8 sbf_revision; | ||
88 | u8 sbf_csum; | ||
89 | u8 sbf_oemid[6]; | ||
90 | u8 sbf_oemtable[8]; | ||
91 | u8 sbf_revdata[4]; | ||
92 | u8 sbf_creator[4]; | ||
93 | u8 sbf_crearev[4]; | ||
94 | u8 sbf_cmos; | ||
95 | u8 sbf_spare[3]; | ||
96 | } __attribute__ ((packed)); | ||
97 | |||
98 | /* | ||
99 | * System Resource Affinity Table (SRAT) | ||
100 | * http://www.microsoft.com/whdc/hwdev/platform/proc/SRAT.mspx | ||
101 | */ | ||
102 | |||
103 | enum acpi_srat_entry_id { | ||
104 | ACPI_SRAT_PROCESSOR_AFFINITY = 0, | ||
105 | ACPI_SRAT_MEMORY_AFFINITY, | ||
106 | ACPI_SRAT_ENTRY_COUNT | ||
107 | }; | ||
108 | |||
109 | struct acpi_table_processor_affinity { | ||
110 | acpi_table_entry_header header; | ||
111 | u8 proximity_domain; | ||
112 | u8 apic_id; | ||
113 | struct { | ||
114 | u32 enabled:1; | ||
115 | u32 reserved:31; | ||
116 | } flags; | ||
117 | u8 lsapic_eid; | ||
118 | u8 reserved[7]; | ||
119 | } __attribute__ ((packed)); | ||
120 | |||
121 | struct acpi_table_memory_affinity { | ||
122 | acpi_table_entry_header header; | ||
123 | u8 proximity_domain; | ||
124 | u8 reserved1[5]; | ||
125 | u32 base_addr_lo; | ||
126 | u32 base_addr_hi; | ||
127 | u32 length_lo; | ||
128 | u32 length_hi; | ||
129 | u32 memory_type; /* See acpi_address_range_id */ | ||
130 | struct { | ||
131 | u32 enabled:1; | ||
132 | u32 hot_pluggable:1; | ||
133 | u32 reserved:30; | ||
134 | } flags; | ||
135 | u64 reserved2; | ||
136 | } __attribute__ ((packed)); | ||
137 | |||
138 | enum acpi_address_range_id { | 65 | enum acpi_address_range_id { |
139 | ACPI_ADDRESS_RANGE_MEMORY = 1, | 66 | ACPI_ADDRESS_RANGE_MEMORY = 1, |
140 | ACPI_ADDRESS_RANGE_RESERVED = 2, | 67 | ACPI_ADDRESS_RANGE_RESERVED = 2, |
@@ -144,46 +71,9 @@ enum acpi_address_range_id { | |||
144 | }; | 71 | }; |
145 | 72 | ||
146 | 73 | ||
147 | /* PCI MMCONFIG */ | ||
148 | |||
149 | /* Defined in PCI Firmware Specification 3.0 */ | ||
150 | struct acpi_table_mcfg_config { | ||
151 | u32 base_address; | ||
152 | u32 base_reserved; | ||
153 | u16 pci_segment_group_number; | ||
154 | u8 start_bus_number; | ||
155 | u8 end_bus_number; | ||
156 | u8 reserved[4]; | ||
157 | } __attribute__ ((packed)); | ||
158 | |||
159 | /* Table Handlers */ | 74 | /* Table Handlers */ |
160 | 75 | ||
161 | enum acpi_table_id { | 76 | typedef int (*acpi_table_handler) (struct acpi_table_header *table); |
162 | ACPI_TABLE_UNKNOWN = 0, | ||
163 | ACPI_APIC, | ||
164 | ACPI_BOOT, | ||
165 | ACPI_DBGP, | ||
166 | ACPI_DSDT, | ||
167 | ACPI_ECDT, | ||
168 | ACPI_ETDT, | ||
169 | ACPI_FADT, | ||
170 | ACPI_FACS, | ||
171 | ACPI_OEMX, | ||
172 | ACPI_PSDT, | ||
173 | ACPI_SBST, | ||
174 | ACPI_SLIT, | ||
175 | ACPI_SPCR, | ||
176 | ACPI_SRAT, | ||
177 | ACPI_SSDT, | ||
178 | ACPI_SPMI, | ||
179 | ACPI_HPET, | ||
180 | ACPI_MCFG, | ||
181 | ACPI_TABLE_COUNT | ||
182 | }; | ||
183 | |||
184 | typedef int (*acpi_table_handler) (struct acpi_table_header *header); | ||
185 | |||
186 | extern acpi_table_handler acpi_table_ops[ACPI_TABLE_COUNT]; | ||
187 | 77 | ||
188 | typedef int (*acpi_madt_entry_handler) (struct acpi_subtable_header *header, const unsigned long end); | 78 | typedef int (*acpi_madt_entry_handler) (struct acpi_subtable_header *header, const unsigned long end); |
189 | 79 | ||
@@ -196,11 +86,10 @@ int acpi_numa_init (void); | |||
196 | int acpi_table_init (void); | 86 | int acpi_table_init (void); |
197 | int acpi_table_parse (char *id, acpi_table_handler handler); | 87 | int acpi_table_parse (char *id, acpi_table_handler handler); |
198 | int acpi_table_parse_madt (enum acpi_madt_type id, acpi_madt_entry_handler handler, unsigned int max_entries); | 88 | int acpi_table_parse_madt (enum acpi_madt_type id, acpi_madt_entry_handler handler, unsigned int max_entries); |
199 | int acpi_table_parse_srat (enum acpi_srat_entry_id id, acpi_madt_entry_handler handler, unsigned int max_entries); | 89 | int acpi_table_parse_srat (enum acpi_srat_type id, acpi_madt_entry_handler handler, unsigned int max_entries); |
200 | int acpi_parse_mcfg (struct acpi_table_header *header); | 90 | int acpi_parse_mcfg (struct acpi_table_header *header); |
201 | void acpi_table_print (struct acpi_table_header *header, unsigned long phys_addr); | ||
202 | void acpi_table_print_madt_entry (struct acpi_subtable_header *madt); | 91 | void acpi_table_print_madt_entry (struct acpi_subtable_header *madt); |
203 | void acpi_table_print_srat_entry (acpi_table_entry_header *srat); | 92 | void acpi_table_print_srat_entry (struct acpi_subtable_header *srat); |
204 | 93 | ||
205 | /* the following four functions are architecture-dependent */ | 94 | /* the following four functions are architecture-dependent */ |
206 | #ifdef CONFIG_HAVE_ARCH_PARSE_SRAT | 95 | #ifdef CONFIG_HAVE_ARCH_PARSE_SRAT |
@@ -211,8 +100,8 @@ void acpi_table_print_srat_entry (acpi_table_entry_header *srat); | |||
211 | #define acpi_numa_arch_fixup() do {} while (0) | 100 | #define acpi_numa_arch_fixup() do {} while (0) |
212 | #else | 101 | #else |
213 | void acpi_numa_slit_init (struct acpi_table_slit *slit); | 102 | void acpi_numa_slit_init (struct acpi_table_slit *slit); |
214 | void acpi_numa_processor_affinity_init (struct acpi_table_processor_affinity *pa); | 103 | void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa); |
215 | void acpi_numa_memory_affinity_init (struct acpi_table_memory_affinity *ma); | 104 | void acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma); |
216 | void acpi_numa_arch_fixup(void); | 105 | void acpi_numa_arch_fixup(void); |
217 | #endif | 106 | #endif |
218 | 107 | ||
@@ -227,7 +116,7 @@ int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); | |||
227 | 116 | ||
228 | extern int acpi_mp_config; | 117 | extern int acpi_mp_config; |
229 | 118 | ||
230 | extern struct acpi_table_mcfg_config *pci_mmcfg_config; | 119 | extern struct acpi_mcfg_allocation *pci_mmcfg_config; |
231 | extern int pci_mmcfg_config_num; | 120 | extern int pci_mmcfg_config_num; |
232 | 121 | ||
233 | extern int sbf_port; | 122 | extern int sbf_port; |