aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorAlexey Starikovskiy <alexey.y.starikovskiy@intel.com>2007-02-02 11:48:19 -0500
committerLen Brown <len.brown@intel.com>2007-02-02 21:14:22 -0500
commitad71860a17ba33eb0e673e9e2cf5ba0d8e3e3fdd (patch)
tree9f60547a2e8782c04d7cd1c41bc874047008458c /drivers/acpi
parenta4bbb810dedaecf74d54b16b6dd3c33e95e1024c (diff)
ACPICA: minimal patch to integrate new tables into Linux
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/asus_acpi.c9
-rw-r--r--drivers/acpi/blacklist.c15
-rw-r--r--drivers/acpi/bus.c25
-rw-r--r--drivers/acpi/ec.c4
-rw-r--r--drivers/acpi/motherboard.c40
-rw-r--r--drivers/acpi/osl.c47
-rw-r--r--drivers/acpi/processor_core.c2
-rw-r--r--drivers/acpi/processor_idle.c29
-rw-r--r--drivers/acpi/processor_perflib.c27
-rw-r--r--drivers/acpi/scan.c4
-rw-r--r--drivers/acpi/sleep/proc.c36
-rw-r--r--drivers/acpi/system.c15
-rw-r--r--drivers/acpi/tables.c29
-rw-r--r--drivers/acpi/tables/Makefile3
-rw-r--r--drivers/acpi/tables/tbutils.c2
-rw-r--r--drivers/acpi/tables/tbxface.c8
16 files changed, 135 insertions, 160 deletions
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c
index 396140bbbe57..31ad70a6e22e 100644
--- a/drivers/acpi/asus_acpi.c
+++ b/drivers/acpi/asus_acpi.c
@@ -26,7 +26,7 @@
26 * Pontus Fuchs - Helper functions, cleanup 26 * Pontus Fuchs - Helper functions, cleanup
27 * Johann Wiesner - Small compile fixes 27 * Johann Wiesner - Small compile fixes
28 * John Belmonte - ACPI code for Toshiba laptop was a good starting point. 28 * John Belmonte - ACPI code for Toshiba laptop was a good starting point.
29 * Éric Burghard - LED display support for W1N 29 * �ic Burghard - LED display support for W1N
30 * 30 *
31 */ 31 */
32 32
@@ -1128,7 +1128,6 @@ static int asus_model_match(char *model)
1128static int asus_hotk_get_info(void) 1128static int asus_hotk_get_info(void)
1129{ 1129{
1130 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 1130 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
1131 struct acpi_buffer dsdt = { ACPI_ALLOCATE_BUFFER, NULL };
1132 union acpi_object *model = NULL; 1131 union acpi_object *model = NULL;
1133 int bsts_result; 1132 int bsts_result;
1134 char *string = NULL; 1133 char *string = NULL;
@@ -1142,11 +1141,9 @@ static int asus_hotk_get_info(void)
1142 * HID), this bit will be moved. A global variable asus_info contains 1141 * HID), this bit will be moved. A global variable asus_info contains
1143 * the DSDT header. 1142 * the DSDT header.
1144 */ 1143 */
1145 status = acpi_get_table(ACPI_TABLE_ID_DSDT, 1, &dsdt); 1144 status = acpi_get_table(ACPI_SIG_DSDT, 1, &asus_info);
1146 if (ACPI_FAILURE(status)) 1145 if (ACPI_FAILURE(status))
1147 printk(KERN_WARNING " Couldn't get the DSDT table header\n"); 1146 printk(KERN_WARNING " Couldn't get the DSDT table header\n");
1148 else
1149 asus_info = dsdt.pointer;
1150 1147
1151 /* We have to write 0 on init this far for all ASUS models */ 1148 /* We have to write 0 on init this far for all ASUS models */
1152 if (!write_acpi_int(hotk->handle, "INIT", 0, &buffer)) { 1149 if (!write_acpi_int(hotk->handle, "INIT", 0, &buffer)) {
@@ -1358,8 +1355,6 @@ static void __exit asus_acpi_exit(void)
1358 acpi_bus_unregister_driver(&asus_hotk_driver); 1355 acpi_bus_unregister_driver(&asus_hotk_driver);
1359 remove_proc_entry(PROC_ASUS, acpi_root_dir); 1356 remove_proc_entry(PROC_ASUS, acpi_root_dir);
1360 1357
1361 kfree(asus_info);
1362
1363 return; 1358 return;
1364} 1359}
1365 1360
diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
index f9c972b26f4f..bdc169bc054a 100644
--- a/drivers/acpi/blacklist.c
+++ b/drivers/acpi/blacklist.c
@@ -44,7 +44,7 @@ struct acpi_blacklist_item {
44 char oem_id[7]; 44 char oem_id[7];
45 char oem_table_id[9]; 45 char oem_table_id[9];
46 u32 oem_revision; 46 u32 oem_revision;
47 acpi_table_type table; 47 char *table;
48 enum acpi_blacklist_predicates oem_revision_predicate; 48 enum acpi_blacklist_predicates oem_revision_predicate;
49 char *reason; 49 char *reason;
50 u32 is_critical_error; 50 u32 is_critical_error;
@@ -56,18 +56,18 @@ struct acpi_blacklist_item {
56 */ 56 */
57static struct acpi_blacklist_item acpi_blacklist[] __initdata = { 57static struct acpi_blacklist_item acpi_blacklist[] __initdata = {
58 /* Compaq Presario 1700 */ 58 /* Compaq Presario 1700 */
59 {"PTLTD ", " DSDT ", 0x06040000, ACPI_DSDT, less_than_or_equal, 59 {"PTLTD ", " DSDT ", 0x06040000, ACPI_SIG_DSDT, less_than_or_equal,
60 "Multiple problems", 1}, 60 "Multiple problems", 1},
61 /* Sony FX120, FX140, FX150? */ 61 /* Sony FX120, FX140, FX150? */
62 {"SONY ", "U0 ", 0x20010313, ACPI_DSDT, less_than_or_equal, 62 {"SONY ", "U0 ", 0x20010313, ACPI_SIG_DSDT, less_than_or_equal,
63 "ACPI driver problem", 1}, 63 "ACPI driver problem", 1},
64 /* Compaq Presario 800, Insyde BIOS */ 64 /* Compaq Presario 800, Insyde BIOS */
65 {"INT440", "SYSFexxx", 0x00001001, ACPI_DSDT, less_than_or_equal, 65 {"INT440", "SYSFexxx", 0x00001001, ACPI_SIG_DSDT, less_than_or_equal,
66 "Does not use _REG to protect EC OpRegions", 1}, 66 "Does not use _REG to protect EC OpRegions", 1},
67 /* IBM 600E - _ADR should return 7, but it returns 1 */ 67 /* IBM 600E - _ADR should return 7, but it returns 1 */
68 {"IBM ", "TP600E ", 0x00000105, ACPI_DSDT, less_than_or_equal, 68 {"IBM ", "TP600E ", 0x00000105, ACPI_SIG_DSDT, less_than_or_equal,
69 "Incorrect _ADR", 1}, 69 "Incorrect _ADR", 1},
70 {"ASUS\0\0", "P2B-S ", 0, ACPI_DSDT, all_versions, 70 {"ASUS\0\0", "P2B-S ", 0, ACPI_SIG_DSDT, all_versions,
71 "Bogus PCI routing", 1}, 71 "Bogus PCI routing", 1},
72 72
73 {""} 73 {""}
@@ -106,8 +106,7 @@ int __init acpi_blacklisted(void)
106 struct acpi_table_header *table_header; 106 struct acpi_table_header *table_header;
107 107
108 while (acpi_blacklist[i].oem_id[0] != '\0') { 108 while (acpi_blacklist[i].oem_id[0] != '\0') {
109 if (acpi_get_table_header_early 109 if (acpi_get_table_header(acpi_blacklist[i].table, 0, &table_header)) {
110 (acpi_blacklist[i].table, &table_header)) {
111 i++; 110 i++;
112 continue; 111 continue;
113 } 112 }
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 766332e45592..cb807c43e59b 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -44,9 +44,6 @@ ACPI_MODULE_NAME("acpi_bus")
44extern void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger); 44extern void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger);
45#endif 45#endif
46 46
47struct fadt_descriptor acpi_fadt;
48EXPORT_SYMBOL(acpi_fadt);
49
50struct acpi_device *acpi_root; 47struct acpi_device *acpi_root;
51struct proc_dir_entry *acpi_root_dir; 48struct proc_dir_entry *acpi_root_dir;
52EXPORT_SYMBOL(acpi_root_dir); 49EXPORT_SYMBOL(acpi_root_dir);
@@ -582,11 +579,12 @@ static int __init acpi_bus_init_irq(void)
582 return 0; 579 return 0;
583} 580}
584 581
582acpi_native_uint acpi_gbl_permanent_mmap;
583
584
585void __init acpi_early_init(void) 585void __init acpi_early_init(void)
586{ 586{
587 acpi_status status = AE_OK; 587 acpi_status status = AE_OK;
588 struct acpi_buffer buffer = { sizeof(acpi_fadt), &acpi_fadt };
589
590 588
591 if (acpi_disabled) 589 if (acpi_disabled)
592 return; 590 return;
@@ -597,6 +595,15 @@ void __init acpi_early_init(void)
597 if (!acpi_strict) 595 if (!acpi_strict)
598 acpi_gbl_enable_interpreter_slack = TRUE; 596 acpi_gbl_enable_interpreter_slack = TRUE;
599 597
598 acpi_gbl_permanent_mmap = 1;
599
600 status = acpi_reallocate_root_table();
601 if (ACPI_FAILURE(status)) {
602 printk(KERN_ERR PREFIX
603 "Unable to reallocate ACPI tables\n");
604 goto error0;
605 }
606
600 status = acpi_initialize_subsystem(); 607 status = acpi_initialize_subsystem();
601 if (ACPI_FAILURE(status)) { 608 if (ACPI_FAILURE(status)) {
602 printk(KERN_ERR PREFIX 609 printk(KERN_ERR PREFIX
@@ -611,14 +618,6 @@ void __init acpi_early_init(void)
611 goto error0; 618 goto error0;
612 } 619 }
613 620
614 /*
615 * Get a separate copy of the FADT for use by other drivers.
616 */
617 status = acpi_get_table(ACPI_TABLE_ID_FADT, 1, &buffer);
618 if (ACPI_FAILURE(status)) {
619 printk(KERN_ERR PREFIX "Unable to get the FADT\n");
620 goto error0;
621 }
622#ifdef CONFIG_X86 621#ifdef CONFIG_X86
623 if (!acpi_ioapic) { 622 if (!acpi_ioapic) {
624 extern acpi_interrupt_flags acpi_sci_flags; 623 extern acpi_interrupt_flags acpi_sci_flags;
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index cbdf031f3c09..7a1f2baff646 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -872,9 +872,7 @@ static int __init acpi_ec_get_real_ecdt(void)
872 acpi_status status; 872 acpi_status status;
873 struct acpi_table_ecdt *ecdt_ptr; 873 struct acpi_table_ecdt *ecdt_ptr;
874 874
875 status = acpi_get_firmware_table("ECDT", 1, ACPI_LOGICAL_ADDRESSING, 875 status = acpi_get_table("ECDT", 1, (struct acpi_table_header **)&ecdt_ptr);
876 (struct acpi_table_header **)
877 &ecdt_ptr);
878 if (ACPI_FAILURE(status)) 876 if (ACPI_FAILURE(status))
879 return -ENODEV; 877 return -ENODEV;
880 878
diff --git a/drivers/acpi/motherboard.c b/drivers/acpi/motherboard.c
index 2e17ec75af03..b61107b05262 100644
--- a/drivers/acpi/motherboard.c
+++ b/drivers/acpi/motherboard.c
@@ -134,41 +134,41 @@ static void __init acpi_request_region (struct acpi_generic_address *addr,
134 if (!addr->address || !length) 134 if (!addr->address || !length)
135 return; 135 return;
136 136
137 if (addr->address_space_id == ACPI_ADR_SPACE_SYSTEM_IO) 137 if (addr->space_id == ACPI_ADR_SPACE_SYSTEM_IO)
138 request_region(addr->address, length, desc); 138 request_region(addr->address, length, desc);
139 else if (addr->address_space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) 139 else if (addr->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY)
140 request_mem_region(addr->address, length, desc); 140 request_mem_region(addr->address, length, desc);
141} 141}
142 142
143static void __init acpi_reserve_resources(void) 143static void __init acpi_reserve_resources(void)
144{ 144{
145 acpi_request_region(&acpi_gbl_FADT->xpm1a_evt_blk, 145 acpi_request_region(&acpi_gbl_FADT.xpm1a_event_block,
146 acpi_gbl_FADT->pm1_evt_len, "ACPI PM1a_EVT_BLK"); 146 acpi_gbl_FADT.pm1_event_length, "ACPI PM1a_EVT_BLK");
147 147
148 acpi_request_region(&acpi_gbl_FADT->xpm1b_evt_blk, 148 acpi_request_region(&acpi_gbl_FADT.xpm1b_event_block,
149 acpi_gbl_FADT->pm1_evt_len, "ACPI PM1b_EVT_BLK"); 149 acpi_gbl_FADT.pm1_event_length, "ACPI PM1b_EVT_BLK");
150 150
151 acpi_request_region(&acpi_gbl_FADT->xpm1a_cnt_blk, 151 acpi_request_region(&acpi_gbl_FADT.xpm1a_control_block,
152 acpi_gbl_FADT->pm1_cnt_len, "ACPI PM1a_CNT_BLK"); 152 acpi_gbl_FADT.pm1_control_length, "ACPI PM1a_CNT_BLK");
153 153
154 acpi_request_region(&acpi_gbl_FADT->xpm1b_cnt_blk, 154 acpi_request_region(&acpi_gbl_FADT.xpm1b_control_block,
155 acpi_gbl_FADT->pm1_cnt_len, "ACPI PM1b_CNT_BLK"); 155 acpi_gbl_FADT.pm1_control_length, "ACPI PM1b_CNT_BLK");
156 156
157 if (acpi_gbl_FADT->pm_tm_len == 4) 157 if (acpi_gbl_FADT.pm_timer_length == 4)
158 acpi_request_region(&acpi_gbl_FADT->xpm_tmr_blk, 4, "ACPI PM_TMR"); 158 acpi_request_region(&acpi_gbl_FADT.xpm_timer_block, 4, "ACPI PM_TMR");
159 159
160 acpi_request_region(&acpi_gbl_FADT->xpm2_cnt_blk, 160 acpi_request_region(&acpi_gbl_FADT.xpm2_control_block,
161 acpi_gbl_FADT->pm2_cnt_len, "ACPI PM2_CNT_BLK"); 161 acpi_gbl_FADT.pm2_control_length, "ACPI PM2_CNT_BLK");
162 162
163 /* Length of GPE blocks must be a non-negative multiple of 2 */ 163 /* Length of GPE blocks must be a non-negative multiple of 2 */
164 164
165 if (!(acpi_gbl_FADT->gpe0_blk_len & 0x1)) 165 if (!(acpi_gbl_FADT.gpe0_block_length & 0x1))
166 acpi_request_region(&acpi_gbl_FADT->xgpe0_blk, 166 acpi_request_region(&acpi_gbl_FADT.xgpe0_block,
167 acpi_gbl_FADT->gpe0_blk_len, "ACPI GPE0_BLK"); 167 acpi_gbl_FADT.gpe0_block_length, "ACPI GPE0_BLK");
168 168
169 if (!(acpi_gbl_FADT->gpe1_blk_len & 0x1)) 169 if (!(acpi_gbl_FADT.gpe1_block_length & 0x1))
170 acpi_request_region(&acpi_gbl_FADT->xgpe1_blk, 170 acpi_request_region(&acpi_gbl_FADT.xgpe1_block,
171 acpi_gbl_FADT->gpe1_blk_len, "ACPI GPE1_BLK"); 171 acpi_gbl_FADT.gpe1_block_length, "ACPI GPE1_BLK");
172} 172}
173 173
174static int __init acpi_motherboard_init(void) 174static int __init acpi_motherboard_init(void)
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 57ae1e5cde0a..c1c2100fe133 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -36,6 +36,7 @@
36#include <linux/delay.h> 36#include <linux/delay.h>
37#include <linux/workqueue.h> 37#include <linux/workqueue.h>
38#include <linux/nmi.h> 38#include <linux/nmi.h>
39#include <linux/acpi.h>
39#include <acpi/acpi.h> 40#include <acpi/acpi.h>
40#include <asm/io.h> 41#include <asm/io.h>
41#include <acpi/acpi_bus.h> 42#include <acpi/acpi_bus.h>
@@ -136,53 +137,43 @@ void acpi_os_vprintf(const char *fmt, va_list args)
136#endif 137#endif
137} 138}
138 139
139acpi_status acpi_os_get_root_pointer(u32 flags, struct acpi_pointer *addr) 140acpi_physical_address __init acpi_os_get_root_pointer(void)
140{ 141{
141 if (efi_enabled) { 142 if (efi_enabled) {
142 addr->pointer_type = ACPI_PHYSICAL_POINTER;
143 if (efi.acpi20 != EFI_INVALID_TABLE_ADDR) 143 if (efi.acpi20 != EFI_INVALID_TABLE_ADDR)
144 addr->pointer.physical = efi.acpi20; 144 return efi.acpi20;
145 else if (efi.acpi != EFI_INVALID_TABLE_ADDR) 145 else if (efi.acpi != EFI_INVALID_TABLE_ADDR)
146 addr->pointer.physical = efi.acpi; 146 return efi.acpi;
147 else { 147 else {
148 printk(KERN_ERR PREFIX 148 printk(KERN_ERR PREFIX
149 "System description tables not found\n"); 149 "System description tables not found\n");
150 return AE_NOT_FOUND; 150 return 0;
151 } 151 }
152 } else { 152 } else
153 if (ACPI_FAILURE(acpi_find_root_pointer(flags, addr))) { 153 return acpi_find_rsdp();
154 printk(KERN_ERR PREFIX
155 "System description tables not found\n");
156 return AE_NOT_FOUND;
157 }
158 }
159
160 return AE_OK;
161} 154}
162 155
163acpi_status 156void __iomem *acpi_os_map_memory(acpi_physical_address phys, acpi_size size)
164acpi_os_map_memory(acpi_physical_address phys, acpi_size size,
165 void __iomem ** virt)
166{ 157{
167 if (phys > ULONG_MAX) { 158 if (phys > ULONG_MAX) {
168 printk(KERN_ERR PREFIX "Cannot map memory that high\n"); 159 printk(KERN_ERR PREFIX "Cannot map memory that high\n");
169 return AE_BAD_PARAMETER; 160 return 0;
170 } 161 }
171 /* 162 if (acpi_gbl_permanent_mmap)
172 * ioremap checks to ensure this is in reserved space 163 /*
173 */ 164 * ioremap checks to ensure this is in reserved space
174 *virt = ioremap((unsigned long)phys, size); 165 */
175 166 return ioremap((unsigned long)phys, size);
176 if (!*virt) 167 else
177 return AE_NO_MEMORY; 168 return __acpi_map_table((unsigned long)phys, size);
178
179 return AE_OK;
180} 169}
181EXPORT_SYMBOL_GPL(acpi_os_map_memory); 170EXPORT_SYMBOL_GPL(acpi_os_map_memory);
182 171
183void acpi_os_unmap_memory(void __iomem * virt, acpi_size size) 172void acpi_os_unmap_memory(void __iomem * virt, acpi_size size)
184{ 173{
185 iounmap(virt); 174 if (acpi_gbl_permanent_mmap) {
175 iounmap(virt);
176 }
186} 177}
187EXPORT_SYMBOL_GPL(acpi_os_unmap_memory); 178EXPORT_SYMBOL_GPL(acpi_os_unmap_memory);
188 179
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index 5f9496d59ed6..4d552f7caa91 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -431,7 +431,7 @@ static int acpi_processor_get_info(struct acpi_processor *pr)
431 * Check to see if we have bus mastering arbitration control. This 431 * Check to see if we have bus mastering arbitration control. This
432 * is required for proper C3 usage (to maintain cache coherency). 432 * is required for proper C3 usage (to maintain cache coherency).
433 */ 433 */
434 if (acpi_fadt.V1_pm2_cnt_blk && acpi_fadt.pm2_cnt_len) { 434 if (acpi_fadt.pm2_control_block && acpi_fadt.pm2_control_length) {
435 pr->flags.bm_control = 1; 435 pr->flags.bm_control = 1;
436 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 436 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
437 "Bus mastering arbitration control present\n")); 437 "Bus mastering arbitration control present\n"));
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 3f30af21574e..9fa3d3965bb3 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -160,7 +160,7 @@ static inline u32 ticks_elapsed(u32 t1, u32 t2)
160{ 160{
161 if (t2 >= t1) 161 if (t2 >= t1)
162 return (t2 - t1); 162 return (t2 - t1);
163 else if (!acpi_fadt.tmr_val_ext) 163 else if (!(acpi_fadt.flags & ACPI_FADT_32BIT_TIMER))
164 return (((0x00FFFFFF - t1) + t2) & 0x00FFFFFF); 164 return (((0x00FFFFFF - t1) + t2) & 0x00FFFFFF);
165 else 165 else
166 return ((0xFFFFFFFF - t1) + t2); 166 return ((0xFFFFFFFF - t1) + t2);
@@ -236,7 +236,7 @@ static void acpi_cstate_enter(struct acpi_processor_cx *cstate)
236 /* Dummy wait op - must do something useless after P_LVL2 read 236 /* Dummy wait op - must do something useless after P_LVL2 read
237 because chipsets cannot guarantee that STPCLK# signal 237 because chipsets cannot guarantee that STPCLK# signal
238 gets asserted in time to freeze execution properly. */ 238 gets asserted in time to freeze execution properly. */
239 unused = inl(acpi_fadt.xpm_tmr_blk.address); 239 unused = inl(acpi_fadt.xpm_timer_block.address);
240 } 240 }
241} 241}
242 242
@@ -338,7 +338,7 @@ static void acpi_processor_idle(void)
338 * detection phase, to work cleanly with logical CPU hotplug. 338 * detection phase, to work cleanly with logical CPU hotplug.
339 */ 339 */
340 if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) && 340 if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) &&
341 !pr->flags.has_cst && !acpi_fadt.plvl2_up) 341 !pr->flags.has_cst && !(acpi_fadt.flags & ACPI_FADT_C2_MP_SUPPORTED))
342 cx = &pr->power.states[ACPI_STATE_C1]; 342 cx = &pr->power.states[ACPI_STATE_C1];
343#endif 343#endif
344 344
@@ -384,11 +384,11 @@ static void acpi_processor_idle(void)
384 384
385 case ACPI_STATE_C2: 385 case ACPI_STATE_C2:
386 /* Get start time (ticks) */ 386 /* Get start time (ticks) */
387 t1 = inl(acpi_fadt.xpm_tmr_blk.address); 387 t1 = inl(acpi_fadt.xpm_timer_block.address);
388 /* Invoke C2 */ 388 /* Invoke C2 */
389 acpi_cstate_enter(cx); 389 acpi_cstate_enter(cx);
390 /* Get end time (ticks) */ 390 /* Get end time (ticks) */
391 t2 = inl(acpi_fadt.xpm_tmr_blk.address); 391 t2 = inl(acpi_fadt.xpm_timer_block.address);
392 392
393#ifdef CONFIG_GENERIC_TIME 393#ifdef CONFIG_GENERIC_TIME
394 /* TSC halts in C2, so notify users */ 394 /* TSC halts in C2, so notify users */
@@ -420,11 +420,11 @@ static void acpi_processor_idle(void)
420 } 420 }
421 421
422 /* Get start time (ticks) */ 422 /* Get start time (ticks) */
423 t1 = inl(acpi_fadt.xpm_tmr_blk.address); 423 t1 = inl(acpi_fadt.xpm_timer_block.address);
424 /* Invoke C3 */ 424 /* Invoke C3 */
425 acpi_cstate_enter(cx); 425 acpi_cstate_enter(cx);
426 /* Get end time (ticks) */ 426 /* Get end time (ticks) */
427 t2 = inl(acpi_fadt.xpm_tmr_blk.address); 427 t2 = inl(acpi_fadt.xpm_timer_block.address);
428 if (pr->flags.bm_check) { 428 if (pr->flags.bm_check) {
429 /* Enable bus master arbitration */ 429 /* Enable bus master arbitration */
430 atomic_dec(&c3_cpu_count); 430 atomic_dec(&c3_cpu_count);
@@ -457,7 +457,7 @@ static void acpi_processor_idle(void)
457#ifdef CONFIG_HOTPLUG_CPU 457#ifdef CONFIG_HOTPLUG_CPU
458 /* Don't do promotion/demotion */ 458 /* Don't do promotion/demotion */
459 if ((cx->type == ACPI_STATE_C1) && (num_online_cpus() > 1) && 459 if ((cx->type == ACPI_STATE_C1) && (num_online_cpus() > 1) &&
460 !pr->flags.has_cst && !acpi_fadt.plvl2_up) { 460 !pr->flags.has_cst && !(acpi_fadt.flags & ACPI_FADT_C2_MP_SUPPORTED)) {
461 next_state = cx; 461 next_state = cx;
462 goto end; 462 goto end;
463 } 463 }
@@ -627,7 +627,8 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
627 * Check for P_LVL2_UP flag before entering C2 and above on 627 * Check for P_LVL2_UP flag before entering C2 and above on
628 * an SMP system. 628 * an SMP system.
629 */ 629 */
630 if ((num_online_cpus() > 1) && !acpi_fadt.plvl2_up) 630 if ((num_online_cpus() > 1) &&
631 !(acpi_fadt.flags & ACPI_FADT_C2_MP_SUPPORTED))
631 return -ENODEV; 632 return -ENODEV;
632#endif 633#endif
633 634
@@ -636,8 +637,8 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
636 pr->power.states[ACPI_STATE_C3].address = pr->pblk + 5; 637 pr->power.states[ACPI_STATE_C3].address = pr->pblk + 5;
637 638
638 /* determine latencies from FADT */ 639 /* determine latencies from FADT */
639 pr->power.states[ACPI_STATE_C2].latency = acpi_fadt.plvl2_lat; 640 pr->power.states[ACPI_STATE_C2].latency = acpi_fadt.C2latency;
640 pr->power.states[ACPI_STATE_C3].latency = acpi_fadt.plvl3_lat; 641 pr->power.states[ACPI_STATE_C3].latency = acpi_fadt.C3latency;
641 642
642 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 643 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
643 "lvl2[0x%08x] lvl3[0x%08x]\n", 644 "lvl2[0x%08x] lvl3[0x%08x]\n",
@@ -883,7 +884,7 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr,
883 * WBINVD should be set in fadt, for C3 state to be 884 * WBINVD should be set in fadt, for C3 state to be
884 * supported on when bm_check is not required. 885 * supported on when bm_check is not required.
885 */ 886 */
886 if (acpi_fadt.wb_invd != 1) { 887 if (!(acpi_fadt.flags & ACPI_FADT_WBINVD)) {
887 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 888 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
888 "Cache invalidation should work properly" 889 "Cache invalidation should work properly"
889 " for C3 to be enabled on SMP systems\n")); 890 " for C3 to be enabled on SMP systems\n"));
@@ -1164,9 +1165,9 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr,
1164 if (!pr) 1165 if (!pr)
1165 return -EINVAL; 1166 return -EINVAL;
1166 1167
1167 if (acpi_fadt.cst_cnt && !nocst) { 1168 if (acpi_fadt.cst_control && !nocst) {
1168 status = 1169 status =
1169 acpi_os_write_port(acpi_fadt.smi_cmd, acpi_fadt.cst_cnt, 8); 1170 acpi_os_write_port(acpi_fadt.smi_command, acpi_fadt.cst_control, 8);
1170 if (ACPI_FAILURE(status)) { 1171 if (ACPI_FAILURE(status)) {
1171 ACPI_EXCEPTION((AE_INFO, status, 1172 ACPI_EXCEPTION((AE_INFO, status,
1172 "Notifying BIOS of _CST ability failed")); 1173 "Notifying BIOS of _CST ability failed"));
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index cbb6f0814ce2..aabb98832ba6 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -352,31 +352,24 @@ int acpi_processor_notify_smm(struct module *calling_module)
352 352
353 is_done = -EIO; 353 is_done = -EIO;
354 354
355 /* Can't write pstate_cnt to smi_cmd if either value is zero */ 355 /* Can't write pstate_control to smi_command if either value is zero */
356 if ((!acpi_fadt.smi_cmd) || (!acpi_fadt.pstate_cnt)) { 356 if ((!acpi_fadt.smi_command) || (!acpi_fadt.pstate_control)) {
357 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No SMI port or pstate_cnt\n")); 357 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No SMI port or pstate_control\n"));
358 module_put(calling_module); 358 module_put(calling_module);
359 return 0; 359 return 0;
360 } 360 }
361 361
362 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 362 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
363 "Writing pstate_cnt [0x%x] to smi_cmd [0x%x]\n", 363 "Writing pstate_control [0x%x] to smi_command [0x%x]\n",
364 acpi_fadt.pstate_cnt, acpi_fadt.smi_cmd)); 364 acpi_fadt.pstate_control, acpi_fadt.smi_command));
365 365
366 /* FADT v1 doesn't support pstate_cnt, many BIOS vendors use 366 status = acpi_os_write_port(acpi_fadt.smi_command,
367 * it anyway, so we need to support it... */ 367 (u32) acpi_fadt.pstate_control, 8);
368 if (acpi_fadt_is_v1) {
369 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
370 "Using v1.0 FADT reserved value for pstate_cnt\n"));
371 }
372
373 status = acpi_os_write_port(acpi_fadt.smi_cmd,
374 (u32) acpi_fadt.pstate_cnt, 8);
375 if (ACPI_FAILURE(status)) { 368 if (ACPI_FAILURE(status)) {
376 ACPI_EXCEPTION((AE_INFO, status, 369 ACPI_EXCEPTION((AE_INFO, status,
377 "Failed to write pstate_cnt [0x%x] to " 370 "Failed to write pstate_control [0x%x] to "
378 "smi_cmd [0x%x]", acpi_fadt.pstate_cnt, 371 "smi_command [0x%x]", acpi_fadt.pstate_control,
379 acpi_fadt.smi_cmd)); 372 acpi_fadt.smi_command));
380 module_put(calling_module); 373 module_put(calling_module);
381 return status; 374 return status;
382 } 375 }
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 283d87522c5d..b1692b18c9d7 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1333,7 +1333,7 @@ static int acpi_bus_scan_fixed(struct acpi_device *root)
1333 /* 1333 /*
1334 * Enumerate all fixed-feature devices. 1334 * Enumerate all fixed-feature devices.
1335 */ 1335 */
1336 if (acpi_fadt.pwr_button == 0) { 1336 if ((acpi_fadt.flags & ACPI_FADT_POWER_BUTTON) == 0) {
1337 result = acpi_add_single_object(&device, acpi_root, 1337 result = acpi_add_single_object(&device, acpi_root,
1338 NULL, 1338 NULL,
1339 ACPI_BUS_TYPE_POWER_BUTTON); 1339 ACPI_BUS_TYPE_POWER_BUTTON);
@@ -1341,7 +1341,7 @@ static int acpi_bus_scan_fixed(struct acpi_device *root)
1341 result = acpi_start_single_object(device); 1341 result = acpi_start_single_object(device);
1342 } 1342 }
1343 1343
1344 if (acpi_fadt.sleep_button == 0) { 1344 if ((acpi_fadt.flags & ACPI_FADT_SLEEP_BUTTON) == 0) {
1345 result = acpi_add_single_object(&device, acpi_root, 1345 result = acpi_add_single_object(&device, acpi_root,
1346 NULL, 1346 NULL,
1347 ACPI_BUS_TYPE_SLEEP_BUTTON); 1347 ACPI_BUS_TYPE_SLEEP_BUTTON);
diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c
index 34962578039d..ccc11b33d89c 100644
--- a/drivers/acpi/sleep/proc.c
+++ b/drivers/acpi/sleep/proc.c
@@ -73,7 +73,7 @@ acpi_system_write_sleep(struct file *file,
73static int acpi_system_alarm_seq_show(struct seq_file *seq, void *offset) 73static int acpi_system_alarm_seq_show(struct seq_file *seq, void *offset)
74{ 74{
75 u32 sec, min, hr; 75 u32 sec, min, hr;
76 u32 day, mo, yr; 76 u32 day, mo, yr, cent = 0;
77 unsigned char rtc_control = 0; 77 unsigned char rtc_control = 0;
78 unsigned long flags; 78 unsigned long flags;
79 79
@@ -87,20 +87,19 @@ static int acpi_system_alarm_seq_show(struct seq_file *seq, void *offset)
87 rtc_control = CMOS_READ(RTC_CONTROL); 87 rtc_control = CMOS_READ(RTC_CONTROL);
88 88
89 /* If we ever get an FACP with proper values... */ 89 /* If we ever get an FACP with proper values... */
90 if (acpi_gbl_FADT->day_alrm) 90 if (acpi_gbl_FADT.day_alarm)
91 /* ACPI spec: only low 6 its should be cared */ 91 /* ACPI spec: only low 6 its should be cared */
92 day = CMOS_READ(acpi_gbl_FADT->day_alrm) & 0x3F; 92 day = CMOS_READ(acpi_gbl_FADT.day_alarm) & 0x3F;
93 else 93 else
94 day = CMOS_READ(RTC_DAY_OF_MONTH); 94 day = CMOS_READ(RTC_DAY_OF_MONTH);
95 if (acpi_gbl_FADT->mon_alrm) 95 if (acpi_gbl_FADT.month_alarm)
96 mo = CMOS_READ(acpi_gbl_FADT->mon_alrm); 96 mo = CMOS_READ(acpi_gbl_FADT.month_alarm);
97 else 97 else
98 mo = CMOS_READ(RTC_MONTH); 98 mo = CMOS_READ(RTC_MONTH);
99 if (acpi_gbl_FADT->century) 99 if (acpi_gbl_FADT.century)
100 yr = CMOS_READ(acpi_gbl_FADT->century) * 100 + 100 cent = CMOS_READ(acpi_gbl_FADT.century);
101 CMOS_READ(RTC_YEAR); 101
102 else 102 yr = CMOS_READ(RTC_YEAR);
103 yr = CMOS_READ(RTC_YEAR);
104 103
105 spin_unlock_irqrestore(&rtc_lock, flags); 104 spin_unlock_irqrestore(&rtc_lock, flags);
106 105
@@ -111,10 +110,11 @@ static int acpi_system_alarm_seq_show(struct seq_file *seq, void *offset)
111 BCD_TO_BIN(day); 110 BCD_TO_BIN(day);
112 BCD_TO_BIN(mo); 111 BCD_TO_BIN(mo);
113 BCD_TO_BIN(yr); 112 BCD_TO_BIN(yr);
113 BCD_TO_BIN(cent);
114 } 114 }
115 115
116 /* we're trusting the FADT (see above) */ 116 /* we're trusting the FADT (see above) */
117 if (!acpi_gbl_FADT->century) 117 if (!acpi_gbl_FADT.century)
118 /* If we're not trusting the FADT, we should at least make it 118 /* If we're not trusting the FADT, we should at least make it
119 * right for _this_ century... ehm, what is _this_ century? 119 * right for _this_ century... ehm, what is _this_ century?
120 * 120 *
@@ -134,6 +134,8 @@ static int acpi_system_alarm_seq_show(struct seq_file *seq, void *offset)
134 * 134 *
135 */ 135 */
136 yr += 2000; 136 yr += 2000;
137 else
138 yr += cent * 100;
137 139
138 seq_printf(seq, "%4.4u-", yr); 140 seq_printf(seq, "%4.4u-", yr);
139 (mo > 12) ? seq_puts(seq, "**-") : seq_printf(seq, "%2.2u-", mo); 141 (mo > 12) ? seq_puts(seq, "**-") : seq_printf(seq, "%2.2u-", mo);
@@ -317,12 +319,12 @@ acpi_system_write_alarm(struct file *file,
317 * offsets into the CMOS RAM here -- which for some reason are pointing 319 * offsets into the CMOS RAM here -- which for some reason are pointing
318 * to the RTC area of memory. 320 * to the RTC area of memory.
319 */ 321 */
320 if (acpi_gbl_FADT->day_alrm) 322 if (acpi_gbl_FADT.day_alarm)
321 CMOS_WRITE(day, acpi_gbl_FADT->day_alrm); 323 CMOS_WRITE(day, acpi_gbl_FADT.day_alarm);
322 if (acpi_gbl_FADT->mon_alrm) 324 if (acpi_gbl_FADT.month_alarm)
323 CMOS_WRITE(mo, acpi_gbl_FADT->mon_alrm); 325 CMOS_WRITE(mo, acpi_gbl_FADT.month_alarm);
324 if (acpi_gbl_FADT->century) 326 if (acpi_gbl_FADT.century)
325 CMOS_WRITE(yr / 100, acpi_gbl_FADT->century); 327 CMOS_WRITE(yr / 100, acpi_gbl_FADT.century);
326 /* enable the rtc alarm interrupt */ 328 /* enable the rtc alarm interrupt */
327 rtc_control |= RTC_AIE; 329 rtc_control |= RTC_AIE;
328 CMOS_WRITE(rtc_control, RTC_CONTROL); 330 CMOS_WRITE(rtc_control, RTC_CONTROL);
diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c
index d86dcb3c2366..2d425d845821 100644
--- a/drivers/acpi/system.c
+++ b/drivers/acpi/system.c
@@ -39,7 +39,6 @@ ACPI_MODULE_NAME("acpi_system")
39#define ACPI_SYSTEM_FILE_EVENT "event" 39#define ACPI_SYSTEM_FILE_EVENT "event"
40#define ACPI_SYSTEM_FILE_DSDT "dsdt" 40#define ACPI_SYSTEM_FILE_DSDT "dsdt"
41#define ACPI_SYSTEM_FILE_FADT "fadt" 41#define ACPI_SYSTEM_FILE_FADT "fadt"
42extern struct fadt_descriptor acpi_fadt;
43 42
44/* -------------------------------------------------------------------------- 43/* --------------------------------------------------------------------------
45 FS Interface (/proc) 44 FS Interface (/proc)
@@ -76,17 +75,16 @@ acpi_system_read_dsdt(struct file *file,
76 char __user * buffer, size_t count, loff_t * ppos) 75 char __user * buffer, size_t count, loff_t * ppos)
77{ 76{
78 acpi_status status = AE_OK; 77 acpi_status status = AE_OK;
79 struct acpi_buffer dsdt = { ACPI_ALLOCATE_BUFFER, NULL }; 78 struct acpi_table_header *dsdt = NULL;
80 ssize_t res; 79 ssize_t res;
81 80
82 81
83 status = acpi_get_table(ACPI_TABLE_ID_DSDT, 1, &dsdt); 82 status = acpi_get_table(ACPI_SIG_DSDT, 1, &dsdt);
84 if (ACPI_FAILURE(status)) 83 if (ACPI_FAILURE(status))
85 return -ENODEV; 84 return -ENODEV;
86 85
87 res = simple_read_from_buffer(buffer, count, ppos, 86 res = simple_read_from_buffer(buffer, count, ppos,
88 dsdt.pointer, dsdt.length); 87 dsdt, dsdt->length);
89 kfree(dsdt.pointer);
90 88
91 return res; 89 return res;
92} 90}
@@ -103,17 +101,16 @@ acpi_system_read_fadt(struct file *file,
103 char __user * buffer, size_t count, loff_t * ppos) 101 char __user * buffer, size_t count, loff_t * ppos)
104{ 102{
105 acpi_status status = AE_OK; 103 acpi_status status = AE_OK;
106 struct acpi_buffer fadt = { ACPI_ALLOCATE_BUFFER, NULL }; 104 struct acpi_table_header *fadt = NULL;
107 ssize_t res; 105 ssize_t res;
108 106
109 107
110 status = acpi_get_table(ACPI_TABLE_ID_FADT, 1, &fadt); 108 status = acpi_get_table(ACPI_SIG_FADT, 1, &fadt);
111 if (ACPI_FAILURE(status)) 109 if (ACPI_FAILURE(status))
112 return -ENODEV; 110 return -ENODEV;
113 111
114 res = simple_read_from_buffer(buffer, count, ppos, 112 res = simple_read_from_buffer(buffer, count, ppos,
115 fadt.pointer, fadt.length); 113 fadt, fadt->length);
116 kfree(fadt.pointer);
117 114
118 return res; 115 return res;
119} 116}
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index ffa30c9fccbf..5bb143151169 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -74,6 +74,7 @@ static unsigned long sdt_pa; /* Physical Address */
74static unsigned long sdt_count; /* Table count */ 74static unsigned long sdt_count; /* Table count */
75 75
76static struct acpi_table_sdt sdt_entry[ACPI_MAX_TABLES] __initdata; 76static struct acpi_table_sdt sdt_entry[ACPI_MAX_TABLES] __initdata;
77static struct acpi_table_desc initial_tables[ACPI_MAX_TABLES] __initdata;
77 78
78void acpi_table_print(struct acpi_table_header *header, unsigned long phys_addr) 79void acpi_table_print(struct acpi_table_header *header, unsigned long phys_addr)
79{ 80{
@@ -284,12 +285,12 @@ acpi_get_table_header_early(enum acpi_table_id id,
284 struct fadt_descriptor *fadt = 285 struct fadt_descriptor *fadt =
285 (struct fadt_descriptor *)*header; 286 (struct fadt_descriptor *)*header;
286 287
287 if (fadt->revision == 3 && fadt->Xdsdt) { 288 if (fadt->header.revision == 3 && fadt->Xdsdt) {
288 *header = (void *)__acpi_map_table(fadt->Xdsdt, 289 *header = (void *)__acpi_map_table(fadt->Xdsdt,
289 sizeof(struct 290 sizeof(struct
290 acpi_table_header)); 291 acpi_table_header));
291 } else if (fadt->V1_dsdt) { 292 } else if (fadt->dsdt) {
292 *header = (void *)__acpi_map_table(fadt->V1_dsdt, 293 *header = (void *)__acpi_map_table(fadt->dsdt,
293 sizeof(struct 294 sizeof(struct
294 acpi_table_header)); 295 acpi_table_header));
295 } else 296 } else
@@ -410,12 +411,11 @@ static int __init acpi_table_get_sdt(struct acpi_table_rsdp *rsdp)
410 411
411 /* First check XSDT (but only on ACPI 2.0-compatible systems) */ 412 /* First check XSDT (but only on ACPI 2.0-compatible systems) */
412 413
413 if ((rsdp->revision >= 2) && 414 if ((rsdp->revision >= 2) && rsdp->xsdt_physical_address) {
414 (((struct acpi20_table_rsdp *)rsdp)->xsdt_address)) {
415 415
416 struct acpi_table_xsdt *mapped_xsdt = NULL; 416 struct acpi_table_xsdt *mapped_xsdt = NULL;
417 417
418 sdt_pa = ((struct acpi20_table_rsdp *)rsdp)->xsdt_address; 418 sdt_pa = rsdp->xsdt_physical_address;
419 419
420 /* map in just the header */ 420 /* map in just the header */
421 header = (struct acpi_table_header *) 421 header = (struct acpi_table_header *)
@@ -457,16 +457,16 @@ static int __init acpi_table_get_sdt(struct acpi_table_rsdp *rsdp)
457 } 457 }
458 458
459 for (i = 0; i < sdt_count; i++) 459 for (i = 0; i < sdt_count; i++)
460 sdt_entry[i].pa = (unsigned long)mapped_xsdt->entry[i]; 460 sdt_entry[i].pa = (unsigned long)mapped_xsdt->table_offset_entry[i];
461 } 461 }
462 462
463 /* Then check RSDT */ 463 /* Then check RSDT */
464 464
465 else if (rsdp->rsdt_address) { 465 else if (rsdp->rsdt_physical_address) {
466 466
467 struct acpi_table_rsdt *mapped_rsdt = NULL; 467 struct acpi_table_rsdt *mapped_rsdt = NULL;
468 468
469 sdt_pa = rsdp->rsdt_address; 469 sdt_pa = rsdp->rsdt_physical_address;
470 470
471 /* map in just the header */ 471 /* map in just the header */
472 header = (struct acpi_table_header *) 472 header = (struct acpi_table_header *)
@@ -507,7 +507,7 @@ static int __init acpi_table_get_sdt(struct acpi_table_rsdp *rsdp)
507 } 507 }
508 508
509 for (i = 0; i < sdt_count; i++) 509 for (i = 0; i < sdt_count; i++)
510 sdt_entry[i].pa = (unsigned long)mapped_rsdt->entry[i]; 510 sdt_entry[i].pa = (unsigned long)mapped_rsdt->table_offset_entry[i];
511 } 511 }
512 512
513 else { 513 else {
@@ -599,13 +599,10 @@ int __init acpi_table_init(void)
599 599
600 if (rsdp->revision < 2) 600 if (rsdp->revision < 2)
601 result = 601 result =
602 acpi_table_compute_checksum(rsdp, 602 acpi_table_compute_checksum(rsdp, ACPI_RSDP_REV0_SIZE);
603 sizeof(struct acpi_table_rsdp));
604 else 603 else
605 result = 604 result =
606 acpi_table_compute_checksum(rsdp, 605 acpi_table_compute_checksum(rsdp, rsdp->length);
607 ((struct acpi20_table_rsdp *)
608 rsdp)->length);
609 606
610 if (result) { 607 if (result) {
611 printk(KERN_WARNING " >>> ERROR: Invalid checksum\n"); 608 printk(KERN_WARNING " >>> ERROR: Invalid checksum\n");
@@ -617,5 +614,7 @@ int __init acpi_table_init(void)
617 if (acpi_table_get_sdt(rsdp)) 614 if (acpi_table_get_sdt(rsdp))
618 return -ENODEV; 615 return -ENODEV;
619 616
617 acpi_initialize_tables(initial_tables, ACPI_MAX_TABLES, 0);
618
620 return 0; 619 return 0;
621} 620}
diff --git a/drivers/acpi/tables/Makefile b/drivers/acpi/tables/Makefile
index aa4c69594d97..f08f1f310274 100644
--- a/drivers/acpi/tables/Makefile
+++ b/drivers/acpi/tables/Makefile
@@ -2,7 +2,6 @@
2# Makefile for all Linux ACPI interpreter subdirectories 2# Makefile for all Linux ACPI interpreter subdirectories
3# 3#
4 4
5obj-y := tbconvrt.o tbget.o tbrsdt.o tbxface.o \ 5obj-y := tbxface.o tbinstal.o tbutils.o tbfind.o
6 tbgetall.o tbinstal.o tbutils.o tbxfroot.o
7 6
8EXTRA_CFLAGS += $(ACPI_CFLAGS) 7EXTRA_CFLAGS += $(ACPI_CFLAGS)
diff --git a/drivers/acpi/tables/tbutils.c b/drivers/acpi/tables/tbutils.c
index 8e44f83a64e2..6d13737f3f89 100644
--- a/drivers/acpi/tables/tbutils.c
+++ b/drivers/acpi/tables/tbutils.c
@@ -545,7 +545,7 @@ acpi_tb_get_root_table_entry(u8 * table_entry,
545 * 545 *
546 ******************************************************************************/ 546 ******************************************************************************/
547 547
548acpi_status 548acpi_status __init
549acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags) 549acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags)
550{ 550{
551 struct acpi_table_rsdp *rsdp; 551 struct acpi_table_rsdp *rsdp;
diff --git a/drivers/acpi/tables/tbxface.c b/drivers/acpi/tables/tbxface.c
index 13e8d6626dd4..94544a60640d 100644
--- a/drivers/acpi/tables/tbxface.c
+++ b/drivers/acpi/tables/tbxface.c
@@ -78,7 +78,7 @@ static acpi_status acpi_tb_load_namespace(void);
78 * 78 *
79 ******************************************************************************/ 79 ******************************************************************************/
80 80
81acpi_status 81acpi_status __init
82acpi_initialize_tables(struct acpi_table_desc *initial_table_array, 82acpi_initialize_tables(struct acpi_table_desc *initial_table_array,
83 u32 initial_table_count, u8 allow_resize) 83 u32 initial_table_count, u8 allow_resize)
84{ 84{
@@ -132,8 +132,6 @@ acpi_initialize_tables(struct acpi_table_desc *initial_table_array,
132 return_ACPI_STATUS(status); 132 return_ACPI_STATUS(status);
133} 133}
134 134
135ACPI_EXPORT_SYMBOL(acpi_initialize_tables)
136
137/******************************************************************************* 135/*******************************************************************************
138 * 136 *
139 * FUNCTION: acpi_reallocate_root_table 137 * FUNCTION: acpi_reallocate_root_table
@@ -365,6 +363,10 @@ acpi_get_table(char *signature,
365 *out_table = acpi_gbl_root_table_list.tables[i].pointer; 363 *out_table = acpi_gbl_root_table_list.tables[i].pointer;
366 } 364 }
367 365
366 if (!acpi_gbl_permanent_mmap) {
367 acpi_gbl_root_table_list.tables[i].pointer = 0;
368 }
369
368 return (status); 370 return (status);
369 } 371 }
370 372