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:28 -0500 |
commit | ceb6c46839021d5c7c338d48deac616944660124 (patch) | |
tree | 191485a16c3a19bccde887f1c8938a7a26020401 /arch/i386/kernel/acpi/boot.c | |
parent | a7a22fa9c368ba22f13b87585052b8cdbbc18f7a (diff) |
ACPICA: Remove duplicate table manager
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'arch/i386/kernel/acpi/boot.c')
-rw-r--r-- | arch/i386/kernel/acpi/boot.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index 9adabc4dba70..543eac5da176 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c | |||
@@ -169,16 +169,16 @@ char *__acpi_map_table(unsigned long phys, unsigned long size) | |||
169 | struct acpi_table_mcfg_config *pci_mmcfg_config; | 169 | struct acpi_table_mcfg_config *pci_mmcfg_config; |
170 | int pci_mmcfg_config_num; | 170 | int pci_mmcfg_config_num; |
171 | 171 | ||
172 | int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size) | 172 | int __init acpi_parse_mcfg(struct acpi_table_header *header) |
173 | { | 173 | { |
174 | struct acpi_table_mcfg *mcfg; | 174 | struct acpi_table_mcfg *mcfg; |
175 | unsigned long i; | 175 | unsigned long i; |
176 | int config_size; | 176 | int config_size; |
177 | 177 | ||
178 | if (!phys_addr || !size) | 178 | if (!header) |
179 | return -EINVAL; | 179 | return -EINVAL; |
180 | 180 | ||
181 | mcfg = (struct acpi_table_mcfg *)__acpi_map_table(phys_addr, size); | 181 | mcfg = (struct acpi_table_mcfg *)header; |
182 | if (!mcfg) { | 182 | if (!mcfg) { |
183 | printk(KERN_WARNING PREFIX "Unable to map MCFG\n"); | 183 | printk(KERN_WARNING PREFIX "Unable to map MCFG\n"); |
184 | return -ENODEV; | 184 | return -ENODEV; |
@@ -186,7 +186,7 @@ int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size) | |||
186 | 186 | ||
187 | /* how many config structures do we have */ | 187 | /* how many config structures do we have */ |
188 | pci_mmcfg_config_num = 0; | 188 | pci_mmcfg_config_num = 0; |
189 | i = size - sizeof(struct acpi_table_mcfg); | 189 | i = header->length - sizeof(struct acpi_table_mcfg); |
190 | while (i >= sizeof(struct acpi_table_mcfg_config)) { | 190 | while (i >= sizeof(struct acpi_table_mcfg_config)) { |
191 | ++pci_mmcfg_config_num; | 191 | ++pci_mmcfg_config_num; |
192 | i -= sizeof(struct acpi_table_mcfg_config); | 192 | i -= sizeof(struct acpi_table_mcfg_config); |
@@ -220,14 +220,14 @@ int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size) | |||
220 | #endif /* CONFIG_PCI_MMCONFIG */ | 220 | #endif /* CONFIG_PCI_MMCONFIG */ |
221 | 221 | ||
222 | #ifdef CONFIG_X86_LOCAL_APIC | 222 | #ifdef CONFIG_X86_LOCAL_APIC |
223 | static int __init acpi_parse_madt(unsigned long phys_addr, unsigned long size) | 223 | static int __init acpi_parse_madt(struct acpi_table_header *header) |
224 | { | 224 | { |
225 | struct acpi_table_madt *madt = NULL; | 225 | struct acpi_table_madt *madt = NULL; |
226 | 226 | ||
227 | if (!phys_addr || !size || !cpu_has_apic) | 227 | if (!header|| !cpu_has_apic) |
228 | return -EINVAL; | 228 | return -EINVAL; |
229 | 229 | ||
230 | madt = (struct acpi_table_madt *)__acpi_map_table(phys_addr, size); | 230 | madt = (struct acpi_table_madt *)header; |
231 | if (!madt) { | 231 | if (!madt) { |
232 | printk(KERN_WARNING PREFIX "Unable to map MADT\n"); | 232 | printk(KERN_WARNING PREFIX "Unable to map MADT\n"); |
233 | return -ENODEV; | 233 | return -ENODEV; |
@@ -619,14 +619,14 @@ acpi_scan_rsdp(unsigned long start, unsigned long length) | |||
619 | return 0; | 619 | return 0; |
620 | } | 620 | } |
621 | 621 | ||
622 | static int __init acpi_parse_sbf(unsigned long phys_addr, unsigned long size) | 622 | static int __init acpi_parse_sbf(struct acpi_table_header *header) |
623 | { | 623 | { |
624 | struct acpi_table_sbf *sb; | 624 | struct acpi_table_sbf *sb; |
625 | 625 | ||
626 | if (!phys_addr || !size) | 626 | if (!header) |
627 | return -EINVAL; | 627 | return -EINVAL; |
628 | 628 | ||
629 | sb = (struct acpi_table_sbf *)__acpi_map_table(phys_addr, size); | 629 | sb = (struct acpi_table_sbf *)header; |
630 | if (!sb) { | 630 | if (!sb) { |
631 | printk(KERN_WARNING PREFIX "Unable to map SBF\n"); | 631 | printk(KERN_WARNING PREFIX "Unable to map SBF\n"); |
632 | return -ENODEV; | 632 | return -ENODEV; |
@@ -639,16 +639,16 @@ static int __init acpi_parse_sbf(unsigned long phys_addr, unsigned long size) | |||
639 | 639 | ||
640 | #ifdef CONFIG_HPET_TIMER | 640 | #ifdef CONFIG_HPET_TIMER |
641 | 641 | ||
642 | static int __init acpi_parse_hpet(unsigned long phys, unsigned long size) | 642 | static int __init acpi_parse_hpet(struct acpi_table_header *header) |
643 | { | 643 | { |
644 | struct acpi_table_hpet *hpet_tbl; | 644 | struct acpi_table_hpet *hpet_tbl; |
645 | struct resource *hpet_res; | 645 | struct resource *hpet_res; |
646 | resource_size_t res_start; | 646 | resource_size_t res_start; |
647 | 647 | ||
648 | if (!phys || !size) | 648 | if (!header) |
649 | return -EINVAL; | 649 | return -EINVAL; |
650 | 650 | ||
651 | hpet_tbl = (struct acpi_table_hpet *)__acpi_map_table(phys, size); | 651 | hpet_tbl = (struct acpi_table_hpet *)header; |
652 | if (!hpet_tbl) { | 652 | if (!hpet_tbl) { |
653 | printk(KERN_WARNING PREFIX "Unable to map HPET\n"); | 653 | printk(KERN_WARNING PREFIX "Unable to map HPET\n"); |
654 | return -ENODEV; | 654 | return -ENODEV; |
@@ -707,11 +707,11 @@ static int __init acpi_parse_hpet(unsigned long phys, unsigned long size) | |||
707 | extern u32 pmtmr_ioport; | 707 | extern u32 pmtmr_ioport; |
708 | #endif | 708 | #endif |
709 | 709 | ||
710 | static int __init acpi_parse_fadt(unsigned long phys, unsigned long size) | 710 | static int __init acpi_parse_fadt(struct acpi_table_header *header) |
711 | { | 711 | { |
712 | struct fadt_descriptor *fadt = NULL; | 712 | struct fadt_descriptor *fadt = NULL; |
713 | 713 | ||
714 | fadt = (struct fadt_descriptor *)__acpi_map_table(phys, size); | 714 | fadt = (struct fadt_descriptor *)header; |
715 | if (!fadt) { | 715 | if (!fadt) { |
716 | printk(KERN_WARNING PREFIX "Unable to map FADT\n"); | 716 | printk(KERN_WARNING PREFIX "Unable to map FADT\n"); |
717 | return 0; | 717 | return 0; |
@@ -901,7 +901,7 @@ static void __init acpi_process_madt(void) | |||
901 | #ifdef CONFIG_X86_LOCAL_APIC | 901 | #ifdef CONFIG_X86_LOCAL_APIC |
902 | int count, error; | 902 | int count, error; |
903 | 903 | ||
904 | count = acpi_table_parse(ACPI_APIC, acpi_parse_madt); | 904 | count = acpi_table_parse("APIC", acpi_parse_madt); |
905 | if (count >= 1) { | 905 | if (count >= 1) { |
906 | 906 | ||
907 | /* | 907 | /* |
@@ -1197,7 +1197,7 @@ int __init acpi_boot_table_init(void) | |||
1197 | return error; | 1197 | return error; |
1198 | } | 1198 | } |
1199 | 1199 | ||
1200 | acpi_table_parse(ACPI_BOOT, acpi_parse_sbf); | 1200 | acpi_table_parse("BOOT", acpi_parse_sbf); |
1201 | 1201 | ||
1202 | /* | 1202 | /* |
1203 | * blacklist may disable ACPI entirely | 1203 | * blacklist may disable ACPI entirely |
@@ -1225,19 +1225,19 @@ int __init acpi_boot_init(void) | |||
1225 | if (acpi_disabled && !acpi_ht) | 1225 | if (acpi_disabled && !acpi_ht) |
1226 | return 1; | 1226 | return 1; |
1227 | 1227 | ||
1228 | acpi_table_parse(ACPI_BOOT, acpi_parse_sbf); | 1228 | acpi_table_parse("BOOT", acpi_parse_sbf); |
1229 | 1229 | ||
1230 | /* | 1230 | /* |
1231 | * set sci_int and PM timer address | 1231 | * set sci_int and PM timer address |
1232 | */ | 1232 | */ |
1233 | acpi_table_parse(ACPI_FADT, acpi_parse_fadt); | 1233 | acpi_table_parse(ACPI_SIG_FADT, acpi_parse_fadt); |
1234 | 1234 | ||
1235 | /* | 1235 | /* |
1236 | * Process the Multiple APIC Description Table (MADT), if present | 1236 | * Process the Multiple APIC Description Table (MADT), if present |
1237 | */ | 1237 | */ |
1238 | acpi_process_madt(); | 1238 | acpi_process_madt(); |
1239 | 1239 | ||
1240 | acpi_table_parse(ACPI_HPET, acpi_parse_hpet); | 1240 | acpi_table_parse("HPET", acpi_parse_hpet); |
1241 | 1241 | ||
1242 | return 0; | 1242 | return 0; |
1243 | } | 1243 | } |