diff options
author | Len Brown <len.brown@intel.com> | 2007-02-10 22:17:07 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-02-13 02:58:52 -0500 |
commit | 6eb87fed52b7f6ac200eaa649cc3221e239d0113 (patch) | |
tree | 65c278d0f969d8edb7c7292b35303eadbb7c82d2 /drivers/acpi | |
parent | 5a8765a84c31ea51baf1f6c78116cd877bd8cd64 (diff) |
ACPI: acpi_table_parse_madt_family() is not MADT specific
acpi_table_parse_madt_family() is also used to parse SRAT entries.
So re-name it to acpi_table_parse_entries(), and re-name the
madt-specific variables within it accordingly.
cosmetic only.
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/numa.c | 8 | ||||
-rw-r--r-- | drivers/acpi/tables.c | 24 |
2 files changed, 13 insertions, 19 deletions
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index 44e411e78ed4..8fcd6a15517f 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c | |||
@@ -45,12 +45,6 @@ int __cpuinitdata pxm_to_node_map[MAX_PXM_DOMAINS] | |||
45 | int __cpuinitdata node_to_pxm_map[MAX_NUMNODES] | 45 | int __cpuinitdata node_to_pxm_map[MAX_NUMNODES] |
46 | = { [0 ... MAX_NUMNODES - 1] = PXM_INVAL }; | 46 | = { [0 ... MAX_NUMNODES - 1] = PXM_INVAL }; |
47 | 47 | ||
48 | extern int __init acpi_table_parse_madt_family(char *id, | ||
49 | unsigned long madt_size, | ||
50 | int entry_id, | ||
51 | acpi_table_entry_handler handler, | ||
52 | unsigned int max_entries); | ||
53 | |||
54 | int __cpuinit pxm_to_node(int pxm) | 48 | int __cpuinit pxm_to_node(int pxm) |
55 | { | 49 | { |
56 | if (pxm < 0) | 50 | if (pxm < 0) |
@@ -210,7 +204,7 @@ int __init | |||
210 | acpi_table_parse_srat(enum acpi_srat_type id, | 204 | acpi_table_parse_srat(enum acpi_srat_type id, |
211 | acpi_table_entry_handler handler, unsigned int max_entries) | 205 | acpi_table_entry_handler handler, unsigned int max_entries) |
212 | { | 206 | { |
213 | return acpi_table_parse_madt_family(ACPI_SIG_SRAT, | 207 | return acpi_table_parse_entries(ACPI_SIG_SRAT, |
214 | sizeof(struct acpi_table_srat), id, | 208 | sizeof(struct acpi_table_srat), id, |
215 | handler, max_entries); | 209 | handler, max_entries); |
216 | } | 210 | } |
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index f211fa35374c..4ed640031e9a 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c | |||
@@ -170,40 +170,40 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header * header) | |||
170 | 170 | ||
171 | 171 | ||
172 | int __init | 172 | int __init |
173 | acpi_table_parse_madt_family(char *id, | 173 | acpi_table_parse_entries(char *id, |
174 | unsigned long madt_size, | 174 | unsigned long table_size, |
175 | int entry_id, | 175 | int entry_id, |
176 | acpi_table_entry_handler handler, | 176 | acpi_table_entry_handler handler, |
177 | unsigned int max_entries) | 177 | unsigned int max_entries) |
178 | { | 178 | { |
179 | struct acpi_table_header *madt = NULL; | 179 | struct acpi_table_header *table_header = NULL; |
180 | struct acpi_subtable_header *entry; | 180 | struct acpi_subtable_header *entry; |
181 | unsigned int count = 0; | 181 | unsigned int count = 0; |
182 | unsigned long madt_end; | 182 | unsigned long table_end; |
183 | 183 | ||
184 | if (!handler) | 184 | if (!handler) |
185 | return -EINVAL; | 185 | return -EINVAL; |
186 | 186 | ||
187 | /* Locate the MADT (if exists). There should only be one. */ | 187 | /* Locate the table (if exists). There should only be one. */ |
188 | acpi_get_table(id, 0, &madt); | 188 | acpi_get_table(id, 0, &table_header); |
189 | 189 | ||
190 | if (!madt) { | 190 | if (!table_header) { |
191 | printk(KERN_WARNING PREFIX "%4.4s not present\n", id); | 191 | printk(KERN_WARNING PREFIX "%4.4s not present\n", id); |
192 | return -ENODEV; | 192 | return -ENODEV; |
193 | } | 193 | } |
194 | 194 | ||
195 | madt_end = (unsigned long)madt + madt->length; | 195 | table_end = (unsigned long)table_header + table_header->length; |
196 | 196 | ||
197 | /* Parse all entries looking for a match. */ | 197 | /* Parse all entries looking for a match. */ |
198 | 198 | ||
199 | entry = (struct acpi_subtable_header *) | 199 | entry = (struct acpi_subtable_header *) |
200 | ((unsigned long)madt + madt_size); | 200 | ((unsigned long)table_header + table_size); |
201 | 201 | ||
202 | while (((unsigned long)entry) + sizeof(struct acpi_subtable_header) < | 202 | while (((unsigned long)entry) + sizeof(struct acpi_subtable_header) < |
203 | madt_end) { | 203 | table_end) { |
204 | if (entry->type == entry_id | 204 | if (entry->type == entry_id |
205 | && (!max_entries || count++ < max_entries)) | 205 | && (!max_entries || count++ < max_entries)) |
206 | if (handler(entry, madt_end)) | 206 | if (handler(entry, table_end)) |
207 | return -EINVAL; | 207 | return -EINVAL; |
208 | 208 | ||
209 | entry = (struct acpi_subtable_header *) | 209 | entry = (struct acpi_subtable_header *) |
@@ -221,7 +221,7 @@ int __init | |||
221 | acpi_table_parse_madt(enum acpi_madt_type id, | 221 | acpi_table_parse_madt(enum acpi_madt_type id, |
222 | acpi_table_entry_handler handler, unsigned int max_entries) | 222 | acpi_table_entry_handler handler, unsigned int max_entries) |
223 | { | 223 | { |
224 | return acpi_table_parse_madt_family(ACPI_SIG_MADT, | 224 | return acpi_table_parse_entries(ACPI_SIG_MADT, |
225 | sizeof(struct acpi_table_madt), id, | 225 | sizeof(struct acpi_table_madt), id, |
226 | handler, max_entries); | 226 | handler, max_entries); |
227 | } | 227 | } |