aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/ia64/sn/kernel/io_acpi_init.c8
-rw-r--r--drivers/acpi/ac.c2
-rw-r--r--drivers/acpi/acpi_memhotplug.c5
-rw-r--r--drivers/acpi/asus_acpi.c2
-rw-r--r--drivers/acpi/bus.c4
-rw-r--r--drivers/acpi/button.c4
-rw-r--r--drivers/acpi/container.c2
-rw-r--r--drivers/acpi/dock.c6
-rw-r--r--drivers/acpi/ec.c7
-rw-r--r--drivers/acpi/numa.c2
-rw-r--r--drivers/acpi/osl.c5
-rw-r--r--drivers/acpi/pci_root.c2
-rw-r--r--drivers/acpi/pci_slot.c10
-rw-r--r--drivers/acpi/power.c2
-rw-r--r--drivers/acpi/processor_core.c4
-rw-r--r--drivers/acpi/processor_perflib.c2
-rw-r--r--drivers/acpi/processor_throttling.c2
-rw-r--r--drivers/acpi/sbshc.c2
-rw-r--r--drivers/acpi/sleep/main.c2
-rw-r--r--drivers/acpi/thermal.c43
-rw-r--r--drivers/acpi/utils.c4
-rw-r--r--drivers/acpi/video.c42
-rw-r--r--drivers/misc/asus-laptop.c12
-rw-r--r--drivers/misc/eeepc-laptop.c2
-rw-r--r--drivers/misc/fujitsu-laptop.c8
-rw-r--r--drivers/misc/intel_menlow.c27
-rw-r--r--drivers/pci/hotplug/acpiphp_glue.c14
-rw-r--r--drivers/pci/hotplug/acpiphp_ibm.c2
-rw-r--r--drivers/pci/hotplug/sgi_hotplug.c4
-rw-r--r--include/acpi/acpi_bus.h2
30 files changed, 123 insertions, 110 deletions
diff --git a/arch/ia64/sn/kernel/io_acpi_init.c b/arch/ia64/sn/kernel/io_acpi_init.c
index 6568942a95f0..a15baacaba43 100644
--- a/arch/ia64/sn/kernel/io_acpi_init.c
+++ b/arch/ia64/sn/kernel/io_acpi_init.c
@@ -232,7 +232,7 @@ exit:
232static unsigned int 232static unsigned int
233get_host_devfn(acpi_handle device_handle, acpi_handle rootbus_handle) 233get_host_devfn(acpi_handle device_handle, acpi_handle rootbus_handle)
234{ 234{
235 unsigned long adr; 235 unsigned long long adr;
236 acpi_handle child; 236 acpi_handle child;
237 unsigned int devfn; 237 unsigned int devfn;
238 int function; 238 int function;
@@ -292,8 +292,8 @@ get_host_devfn(acpi_handle device_handle, acpi_handle rootbus_handle)
292static acpi_status 292static acpi_status
293find_matching_device(acpi_handle handle, u32 lvl, void *context, void **rv) 293find_matching_device(acpi_handle handle, u32 lvl, void *context, void **rv)
294{ 294{
295 unsigned long bbn = -1; 295 unsigned long long bbn = -1;
296 unsigned long adr; 296 unsigned long long adr;
297 acpi_handle parent = NULL; 297 acpi_handle parent = NULL;
298 acpi_status status; 298 acpi_status status;
299 unsigned int devfn; 299 unsigned int devfn;
@@ -348,7 +348,7 @@ sn_acpi_get_pcidev_info(struct pci_dev *dev, struct pcidev_info **pcidev_info,
348 unsigned int host_devfn; 348 unsigned int host_devfn;
349 struct sn_pcidev_match pcidev_match; 349 struct sn_pcidev_match pcidev_match;
350 acpi_handle rootbus_handle; 350 acpi_handle rootbus_handle;
351 unsigned long segment; 351 unsigned long long segment;
352 acpi_status status; 352 acpi_status status;
353 353
354 rootbus_handle = PCI_CONTROLLER(dev)->acpi_handle; 354 rootbus_handle = PCI_CONTROLLER(dev)->acpi_handle;
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
index 8b6a84a43b15..d72a1b6c8a94 100644
--- a/drivers/acpi/ac.c
+++ b/drivers/acpi/ac.c
@@ -85,7 +85,7 @@ struct acpi_ac {
85 struct power_supply charger; 85 struct power_supply charger;
86#endif 86#endif
87 struct acpi_device * device; 87 struct acpi_device * device;
88 unsigned long state; 88 unsigned long long state;
89}; 89};
90 90
91#define to_acpi_ac(x) container_of(x, struct acpi_ac, charger); 91#define to_acpi_ac(x) container_of(x, struct acpi_ac, charger);
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index 289d02260f16..71d21c51c45f 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -194,8 +194,7 @@ acpi_memory_get_device(acpi_handle handle,
194 194
195static int acpi_memory_check_device(struct acpi_memory_device *mem_device) 195static int acpi_memory_check_device(struct acpi_memory_device *mem_device)
196{ 196{
197 unsigned long current_status; 197 unsigned long long current_status;
198
199 198
200 /* Get device present/absent information from the _STA */ 199 /* Get device present/absent information from the _STA */
201 if (ACPI_FAILURE(acpi_evaluate_integer(mem_device->device->handle, "_STA", 200 if (ACPI_FAILURE(acpi_evaluate_integer(mem_device->device->handle, "_STA",
@@ -264,7 +263,7 @@ static int acpi_memory_powerdown_device(struct acpi_memory_device *mem_device)
264 acpi_status status; 263 acpi_status status;
265 struct acpi_object_list arg_list; 264 struct acpi_object_list arg_list;
266 union acpi_object arg; 265 union acpi_object arg;
267 unsigned long current_status; 266 unsigned long long current_status;
268 267
269 268
270 /* Issue the _EJ0 command */ 269 /* Issue the _EJ0 command */
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c
index 2377e8b917d7..1e74988c7b2d 100644
--- a/drivers/acpi/asus_acpi.c
+++ b/drivers/acpi/asus_acpi.c
@@ -753,7 +753,7 @@ static int get_lcd_state(void)
753 /* That's what the AML code does */ 753 /* That's what the AML code does */
754 lcd = out_obj.integer.value >> 8; 754 lcd = out_obj.integer.value >> 8;
755 } else if (hotk->model == F3Sa) { 755 } else if (hotk->model == F3Sa) {
756 unsigned long tmp; 756 unsigned long long tmp;
757 union acpi_object param; 757 union acpi_object param;
758 struct acpi_object_list input; 758 struct acpi_object_list input;
759 acpi_status status; 759 acpi_status status;
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index b11400e2f856..c797c6473f31 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -94,7 +94,7 @@ EXPORT_SYMBOL(acpi_bus_get_device);
94int acpi_bus_get_status(struct acpi_device *device) 94int acpi_bus_get_status(struct acpi_device *device)
95{ 95{
96 acpi_status status = AE_OK; 96 acpi_status status = AE_OK;
97 unsigned long sta = 0; 97 unsigned long long sta = 0;
98 98
99 99
100 if (!device) 100 if (!device)
@@ -172,7 +172,7 @@ int acpi_bus_get_power(acpi_handle handle, int *state)
172 int result = 0; 172 int result = 0;
173 acpi_status status = 0; 173 acpi_status status = 0;
174 struct acpi_device *device = NULL; 174 struct acpi_device *device = NULL;
175 unsigned long psc = 0; 175 unsigned long long psc = 0;
176 176
177 177
178 result = acpi_bus_get_device(handle, &device); 178 result = acpi_bus_get_device(handle, &device);
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index e22033ea2614..9d568d417eaa 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -145,7 +145,7 @@ static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
145{ 145{
146 struct acpi_button *button = seq->private; 146 struct acpi_button *button = seq->private;
147 acpi_status status; 147 acpi_status status;
148 unsigned long state; 148 unsigned long long state;
149 149
150 if (!button || !button->device) 150 if (!button || !button->device)
151 return 0; 151 return 0;
@@ -253,7 +253,7 @@ static int acpi_button_remove_fs(struct acpi_device *device)
253 -------------------------------------------------------------------------- */ 253 -------------------------------------------------------------------------- */
254static int acpi_lid_send_state(struct acpi_button *button) 254static int acpi_lid_send_state(struct acpi_button *button)
255{ 255{
256 unsigned long state; 256 unsigned long long state;
257 acpi_status status; 257 acpi_status status;
258 258
259 status = acpi_evaluate_integer(button->device->handle, "_LID", NULL, 259 status = acpi_evaluate_integer(button->device->handle, "_LID", NULL,
diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c
index 03ea8478e393..134818b265a9 100644
--- a/drivers/acpi/container.c
+++ b/drivers/acpi/container.c
@@ -76,7 +76,7 @@ static int is_device_present(acpi_handle handle)
76{ 76{
77 acpi_handle temp; 77 acpi_handle temp;
78 acpi_status status; 78 acpi_status status;
79 unsigned long sta; 79 unsigned long long sta;
80 80
81 81
82 status = acpi_get_handle(handle, "_STA", &temp); 82 status = acpi_get_handle(handle, "_STA", &temp);
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index 913bb1e89dd6..5b30b8d91d71 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -294,7 +294,7 @@ EXPORT_SYMBOL_GPL(is_dock_device);
294 */ 294 */
295static int dock_present(struct dock_station *ds) 295static int dock_present(struct dock_station *ds)
296{ 296{
297 unsigned long sta; 297 unsigned long long sta;
298 acpi_status status; 298 acpi_status status;
299 299
300 if (ds) { 300 if (ds) {
@@ -900,7 +900,7 @@ static DEVICE_ATTR(undock, S_IWUSR, NULL, write_undock);
900static ssize_t show_dock_uid(struct device *dev, 900static ssize_t show_dock_uid(struct device *dev,
901 struct device_attribute *attr, char *buf) 901 struct device_attribute *attr, char *buf)
902{ 902{
903 unsigned long lbuf; 903 unsigned long long lbuf;
904 struct dock_station *dock_station = *((struct dock_station **) 904 struct dock_station *dock_station = *((struct dock_station **)
905 dev->platform_data); 905 dev->platform_data);
906 acpi_status status = acpi_evaluate_integer(dock_station->handle, 906 acpi_status status = acpi_evaluate_integer(dock_station->handle,
@@ -908,7 +908,7 @@ static ssize_t show_dock_uid(struct device *dev,
908 if (ACPI_FAILURE(status)) 908 if (ACPI_FAILURE(status))
909 return 0; 909 return 0;
910 910
911 return snprintf(buf, PAGE_SIZE, "%lx\n", lbuf); 911 return snprintf(buf, PAGE_SIZE, "%llx\n", lbuf);
912} 912}
913static DEVICE_ATTR(uid, S_IRUGO, show_dock_uid, NULL); 913static DEVICE_ATTR(uid, S_IRUGO, show_dock_uid, NULL);
914 914
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 40fefba6264e..ef42316f89f5 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -736,6 +736,7 @@ static acpi_status
736ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval) 736ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
737{ 737{
738 acpi_status status; 738 acpi_status status;
739 unsigned long long tmp;
739 740
740 struct acpi_ec *ec = context; 741 struct acpi_ec *ec = context;
741 status = acpi_walk_resources(handle, METHOD_NAME__CRS, 742 status = acpi_walk_resources(handle, METHOD_NAME__CRS,
@@ -745,11 +746,13 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
745 746
746 /* Get GPE bit assignment (EC events). */ 747 /* Get GPE bit assignment (EC events). */
747 /* TODO: Add support for _GPE returning a package */ 748 /* TODO: Add support for _GPE returning a package */
748 status = acpi_evaluate_integer(handle, "_GPE", NULL, &ec->gpe); 749 status = acpi_evaluate_integer(handle, "_GPE", NULL, &tmp);
749 if (ACPI_FAILURE(status)) 750 if (ACPI_FAILURE(status))
750 return status; 751 return status;
752 ec->gpe = tmp;
751 /* Use the global lock for all EC transactions? */ 753 /* Use the global lock for all EC transactions? */
752 acpi_evaluate_integer(handle, "_GLK", NULL, &ec->global_lock); 754 acpi_evaluate_integer(handle, "_GLK", NULL, &tmp);
755 ec->global_lock = tmp;
753 ec->handle = handle; 756 ec->handle = handle;
754 return AE_CTRL_TERMINATE; 757 return AE_CTRL_TERMINATE;
755} 758}
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
index cb9864e39bae..25ceae9191ef 100644
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -258,7 +258,7 @@ int __init acpi_numa_init(void)
258 258
259int acpi_get_pxm(acpi_handle h) 259int acpi_get_pxm(acpi_handle h)
260{ 260{
261 unsigned long pxm; 261 unsigned long long pxm;
262 acpi_status status; 262 acpi_status status;
263 acpi_handle handle; 263 acpi_handle handle;
264 acpi_handle phandle = h; 264 acpi_handle phandle = h;
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 6234d3e7acd3..4be252145cb4 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -608,7 +608,7 @@ static void acpi_os_derive_pci_id_2(acpi_handle rhandle, /* upper bound */
608 acpi_handle handle; 608 acpi_handle handle;
609 struct acpi_pci_id *pci_id = *id; 609 struct acpi_pci_id *pci_id = *id;
610 acpi_status status; 610 acpi_status status;
611 unsigned long temp; 611 unsigned long long temp;
612 acpi_object_type type; 612 acpi_object_type type;
613 613
614 acpi_get_parent(chandle, &handle); 614 acpi_get_parent(chandle, &handle);
@@ -620,8 +620,7 @@ static void acpi_os_derive_pci_id_2(acpi_handle rhandle, /* upper bound */
620 if ((ACPI_FAILURE(status)) || (type != ACPI_TYPE_DEVICE)) 620 if ((ACPI_FAILURE(status)) || (type != ACPI_TYPE_DEVICE))
621 return; 621 return;
622 622
623 status = 623 status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL,
624 acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL,
625 &temp); 624 &temp);
626 if (ACPI_SUCCESS(status)) { 625 if (ACPI_SUCCESS(status)) {
627 u32 val; 626 u32 val;
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index add1a19bbbfe..1b8f67d21d53 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -190,7 +190,7 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
190 struct acpi_pci_root *root = NULL; 190 struct acpi_pci_root *root = NULL;
191 struct acpi_pci_root *tmp; 191 struct acpi_pci_root *tmp;
192 acpi_status status = AE_OK; 192 acpi_status status = AE_OK;
193 unsigned long value = 0; 193 unsigned long long value = 0;
194 acpi_handle handle = NULL; 194 acpi_handle handle = NULL;
195 struct acpi_device *child; 195 struct acpi_device *child;
196 196
diff --git a/drivers/acpi/pci_slot.c b/drivers/acpi/pci_slot.c
index d5b4ef898879..9bb84d4596be 100644
--- a/drivers/acpi/pci_slot.c
+++ b/drivers/acpi/pci_slot.c
@@ -76,10 +76,10 @@ static struct acpi_pci_driver acpi_pci_slot_driver = {
76}; 76};
77 77
78static int 78static int
79check_slot(acpi_handle handle, unsigned long *sun) 79check_slot(acpi_handle handle, unsigned long long *sun)
80{ 80{
81 int device = -1; 81 int device = -1;
82 unsigned long adr, sta; 82 unsigned long long adr, sta;
83 acpi_status status; 83 acpi_status status;
84 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 84 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
85 85
@@ -132,7 +132,7 @@ static acpi_status
132register_slot(acpi_handle handle, u32 lvl, void *context, void **rv) 132register_slot(acpi_handle handle, u32 lvl, void *context, void **rv)
133{ 133{
134 int device; 134 int device;
135 unsigned long sun; 135 unsigned long long sun;
136 char name[SLOT_NAME_SIZE]; 136 char name[SLOT_NAME_SIZE];
137 struct acpi_pci_slot *slot; 137 struct acpi_pci_slot *slot;
138 struct pci_slot *pci_slot; 138 struct pci_slot *pci_slot;
@@ -182,7 +182,7 @@ static acpi_status
182walk_p2p_bridge(acpi_handle handle, u32 lvl, void *context, void **rv) 182walk_p2p_bridge(acpi_handle handle, u32 lvl, void *context, void **rv)
183{ 183{
184 int device, function; 184 int device, function;
185 unsigned long adr; 185 unsigned long long adr;
186 acpi_status status; 186 acpi_status status;
187 acpi_handle dummy_handle; 187 acpi_handle dummy_handle;
188 acpi_walk_callback user_function; 188 acpi_walk_callback user_function;
@@ -239,7 +239,7 @@ static int
239walk_root_bridge(acpi_handle handle, acpi_walk_callback user_function) 239walk_root_bridge(acpi_handle handle, acpi_walk_callback user_function)
240{ 240{
241 int seg, bus; 241 int seg, bus;
242 unsigned long tmp; 242 unsigned long long tmp;
243 acpi_status status; 243 acpi_status status;
244 acpi_handle dummy_handle; 244 acpi_handle dummy_handle;
245 struct pci_bus *pci_bus; 245 struct pci_bus *pci_bus;
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
index e88edc008668..a1718e56103b 100644
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -139,7 +139,7 @@ acpi_power_get_context(acpi_handle handle,
139static int acpi_power_get_state(acpi_handle handle, int *state) 139static int acpi_power_get_state(acpi_handle handle, int *state)
140{ 140{
141 acpi_status status = AE_OK; 141 acpi_status status = AE_OK;
142 unsigned long sta = 0; 142 unsigned long long sta = 0;
143 143
144 144
145 if (!handle || !state) 145 if (!handle || !state)
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index 289461649196..24a362f8034c 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -563,7 +563,7 @@ static int acpi_processor_get_info(struct acpi_processor *pr, unsigned has_uid)
563 563
564 /* Check if it is a Device with HID and UID */ 564 /* Check if it is a Device with HID and UID */
565 if (has_uid) { 565 if (has_uid) {
566 unsigned long value; 566 unsigned long long value;
567 status = acpi_evaluate_integer(pr->handle, METHOD_NAME__UID, 567 status = acpi_evaluate_integer(pr->handle, METHOD_NAME__UID,
568 NULL, &value); 568 NULL, &value);
569 if (ACPI_FAILURE(status)) { 569 if (ACPI_FAILURE(status)) {
@@ -875,7 +875,7 @@ static int acpi_processor_remove(struct acpi_device *device, int type)
875static int is_processor_present(acpi_handle handle) 875static int is_processor_present(acpi_handle handle)
876{ 876{
877 acpi_status status; 877 acpi_status status;
878 unsigned long sta = 0; 878 unsigned long long sta = 0;
879 879
880 880
881 status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); 881 status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index b0614f379470..dc98f7a6f2c4 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -127,7 +127,7 @@ static struct notifier_block acpi_ppc_notifier_block = {
127static int acpi_processor_get_platform_limit(struct acpi_processor *pr) 127static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
128{ 128{
129 acpi_status status = 0; 129 acpi_status status = 0;
130 unsigned long ppc = 0; 130 unsigned long long ppc = 0;
131 131
132 132
133 if (!pr) 133 if (!pr)
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index e89a25824f2a..3da2df93d924 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -274,7 +274,7 @@ static int acpi_processor_throttling_notifier(unsigned long event, void *data)
274static int acpi_processor_get_platform_limit(struct acpi_processor *pr) 274static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
275{ 275{
276 acpi_status status = 0; 276 acpi_status status = 0;
277 unsigned long tpc = 0; 277 unsigned long long tpc = 0;
278 278
279 if (!pr) 279 if (!pr)
280 return -EINVAL; 280 return -EINVAL;
diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
index 001d9143a2cb..e53e590252c0 100644
--- a/drivers/acpi/sbshc.c
+++ b/drivers/acpi/sbshc.c
@@ -258,7 +258,7 @@ extern int acpi_ec_add_query_handler(struct acpi_ec *ec, u8 query_bit,
258static int acpi_smbus_hc_add(struct acpi_device *device) 258static int acpi_smbus_hc_add(struct acpi_device *device)
259{ 259{
260 int status; 260 int status;
261 unsigned long val; 261 unsigned long long val;
262 struct acpi_smb_hc *hc; 262 struct acpi_smb_hc *hc;
263 263
264 if (!device) 264 if (!device)
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c
index cc344d4252c9..76037883cd13 100644
--- a/drivers/acpi/sleep/main.c
+++ b/drivers/acpi/sleep/main.c
@@ -495,7 +495,7 @@ int acpi_pm_device_sleep_state(struct device *dev, int *d_min_p)
495 acpi_handle handle = DEVICE_ACPI_HANDLE(dev); 495 acpi_handle handle = DEVICE_ACPI_HANDLE(dev);
496 struct acpi_device *adev; 496 struct acpi_device *adev;
497 char acpi_method[] = "_SxD"; 497 char acpi_method[] = "_SxD";
498 unsigned long d_min, d_max; 498 unsigned long long d_min, d_max;
499 499
500 if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &adev))) { 500 if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &adev))) {
501 printk(KERN_DEBUG "ACPI handle has no context!\n"); 501 printk(KERN_DEBUG "ACPI handle has no context!\n");
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index f26c6463a09e..ad6cae938f0b 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -246,18 +246,18 @@ static const struct file_operations acpi_thermal_polling_fops = {
246static int acpi_thermal_get_temperature(struct acpi_thermal *tz) 246static int acpi_thermal_get_temperature(struct acpi_thermal *tz)
247{ 247{
248 acpi_status status = AE_OK; 248 acpi_status status = AE_OK;
249 249 unsigned long long tmp;
250 250
251 if (!tz) 251 if (!tz)
252 return -EINVAL; 252 return -EINVAL;
253 253
254 tz->last_temperature = tz->temperature; 254 tz->last_temperature = tz->temperature;
255 255
256 status = 256 status = acpi_evaluate_integer(tz->device->handle, "_TMP", NULL, &tmp);
257 acpi_evaluate_integer(tz->device->handle, "_TMP", NULL, &tz->temperature);
258 if (ACPI_FAILURE(status)) 257 if (ACPI_FAILURE(status))
259 return -ENODEV; 258 return -ENODEV;
260 259
260 tz->temperature = tmp;
261 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Temperature is %lu dK\n", 261 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Temperature is %lu dK\n",
262 tz->temperature)); 262 tz->temperature));
263 263
@@ -267,17 +267,16 @@ static int acpi_thermal_get_temperature(struct acpi_thermal *tz)
267static int acpi_thermal_get_polling_frequency(struct acpi_thermal *tz) 267static int acpi_thermal_get_polling_frequency(struct acpi_thermal *tz)
268{ 268{
269 acpi_status status = AE_OK; 269 acpi_status status = AE_OK;
270 270 unsigned long long tmp;
271 271
272 if (!tz) 272 if (!tz)
273 return -EINVAL; 273 return -EINVAL;
274 274
275 status = 275 status = acpi_evaluate_integer(tz->device->handle, "_TZP", NULL, &tmp);
276 acpi_evaluate_integer(tz->device->handle, "_TZP", NULL,
277 &tz->polling_frequency);
278 if (ACPI_FAILURE(status)) 276 if (ACPI_FAILURE(status))
279 return -ENODEV; 277 return -ENODEV;
280 278
279 tz->polling_frequency = tmp;
281 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Polling frequency is %lu dS\n", 280 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Polling frequency is %lu dS\n",
282 tz->polling_frequency)); 281 tz->polling_frequency));
283 282
@@ -356,6 +355,7 @@ do { \
356static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) 355static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
357{ 356{
358 acpi_status status = AE_OK; 357 acpi_status status = AE_OK;
358 unsigned long long tmp;
359 struct acpi_handle_list devices; 359 struct acpi_handle_list devices;
360 int valid = 0; 360 int valid = 0;
361 int i; 361 int i;
@@ -363,7 +363,8 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
363 /* Critical Shutdown (required) */ 363 /* Critical Shutdown (required) */
364 if (flag & ACPI_TRIPS_CRITICAL) { 364 if (flag & ACPI_TRIPS_CRITICAL) {
365 status = acpi_evaluate_integer(tz->device->handle, 365 status = acpi_evaluate_integer(tz->device->handle,
366 "_CRT", NULL, &tz->trips.critical.temperature); 366 "_CRT", NULL, &tmp);
367 tz->trips.critical.temperature = tmp;
367 /* 368 /*
368 * Treat freezing temperatures as invalid as well; some 369 * Treat freezing temperatures as invalid as well; some
369 * BIOSes return really low values and cause reboots at startup. 370 * BIOSes return really low values and cause reboots at startup.
@@ -401,12 +402,13 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
401 /* Critical Sleep (optional) */ 402 /* Critical Sleep (optional) */
402 if (flag & ACPI_TRIPS_HOT) { 403 if (flag & ACPI_TRIPS_HOT) {
403 status = acpi_evaluate_integer(tz->device->handle, 404 status = acpi_evaluate_integer(tz->device->handle,
404 "_HOT", NULL, &tz->trips.hot.temperature); 405 "_HOT", NULL, &tmp);
405 if (ACPI_FAILURE(status)) { 406 if (ACPI_FAILURE(status)) {
406 tz->trips.hot.flags.valid = 0; 407 tz->trips.hot.flags.valid = 0;
407 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 408 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
408 "No hot threshold\n")); 409 "No hot threshold\n"));
409 } else { 410 } else {
411 tz->trips.hot.temperature = tmp;
410 tz->trips.hot.flags.valid = 1; 412 tz->trips.hot.flags.valid = 1;
411 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 413 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
412 "Found hot threshold [%lu]\n", 414 "Found hot threshold [%lu]\n",
@@ -420,33 +422,40 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
420 if (psv == -1) { 422 if (psv == -1) {
421 status = AE_SUPPORT; 423 status = AE_SUPPORT;
422 } else if (psv > 0) { 424 } else if (psv > 0) {
423 tz->trips.passive.temperature = CELSIUS_TO_KELVIN(psv); 425 tmp = CELSIUS_TO_KELVIN(psv);
424 status = AE_OK; 426 status = AE_OK;
425 } else { 427 } else {
426 status = acpi_evaluate_integer(tz->device->handle, 428 status = acpi_evaluate_integer(tz->device->handle,
427 "_PSV", NULL, &tz->trips.passive.temperature); 429 "_PSV", NULL, &tmp);
428 } 430 }
429 431
430 if (ACPI_FAILURE(status)) 432 if (ACPI_FAILURE(status))
431 tz->trips.passive.flags.valid = 0; 433 tz->trips.passive.flags.valid = 0;
432 else { 434 else {
435 tz->trips.passive.temperature = tmp;
433 tz->trips.passive.flags.valid = 1; 436 tz->trips.passive.flags.valid = 1;
434 if (flag == ACPI_TRIPS_INIT) { 437 if (flag == ACPI_TRIPS_INIT) {
435 status = acpi_evaluate_integer( 438 status = acpi_evaluate_integer(
436 tz->device->handle, "_TC1", 439 tz->device->handle, "_TC1",
437 NULL, &tz->trips.passive.tc1); 440 NULL, &tmp);
438 if (ACPI_FAILURE(status)) 441 if (ACPI_FAILURE(status))
439 tz->trips.passive.flags.valid = 0; 442 tz->trips.passive.flags.valid = 0;
443 else
444 tz->trips.passive.tc1 = tmp;
440 status = acpi_evaluate_integer( 445 status = acpi_evaluate_integer(
441 tz->device->handle, "_TC2", 446 tz->device->handle, "_TC2",
442 NULL, &tz->trips.passive.tc2); 447 NULL, &tmp);
443 if (ACPI_FAILURE(status)) 448 if (ACPI_FAILURE(status))
444 tz->trips.passive.flags.valid = 0; 449 tz->trips.passive.flags.valid = 0;
450 else
451 tz->trips.passive.tc2 = tmp;
445 status = acpi_evaluate_integer( 452 status = acpi_evaluate_integer(
446 tz->device->handle, "_TSP", 453 tz->device->handle, "_TSP",
447 NULL, &tz->trips.passive.tsp); 454 NULL, &tmp);
448 if (ACPI_FAILURE(status)) 455 if (ACPI_FAILURE(status))
449 tz->trips.passive.flags.valid = 0; 456 tz->trips.passive.flags.valid = 0;
457 else
458 tz->trips.passive.tsp = tmp;
450 } 459 }
451 } 460 }
452 } 461 }
@@ -481,7 +490,7 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
481 490
482 if (flag & ACPI_TRIPS_ACTIVE) { 491 if (flag & ACPI_TRIPS_ACTIVE) {
483 status = acpi_evaluate_integer(tz->device->handle, 492 status = acpi_evaluate_integer(tz->device->handle,
484 name, NULL, &tz->trips.active[i].temperature); 493 name, NULL, &tmp);
485 if (ACPI_FAILURE(status)) { 494 if (ACPI_FAILURE(status)) {
486 tz->trips.active[i].flags.valid = 0; 495 tz->trips.active[i].flags.valid = 0;
487 if (i == 0) 496 if (i == 0)
@@ -502,8 +511,10 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
502 tz->trips.active[i - 2].temperature : 511 tz->trips.active[i - 2].temperature :
503 CELSIUS_TO_KELVIN(act)); 512 CELSIUS_TO_KELVIN(act));
504 break; 513 break;
505 } else 514 } else {
515 tz->trips.active[i].temperature = tmp;
506 tz->trips.active[i].flags.valid = 1; 516 tz->trips.active[i].flags.valid = 1;
517 }
507 } 518 }
508 519
509 name[2] = 'L'; 520 name[2] = 'L';
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index 100926143818..e827be36ee8d 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -256,7 +256,7 @@ EXPORT_SYMBOL(acpi_extract_package);
256acpi_status 256acpi_status
257acpi_evaluate_integer(acpi_handle handle, 257acpi_evaluate_integer(acpi_handle handle,
258 acpi_string pathname, 258 acpi_string pathname,
259 struct acpi_object_list *arguments, unsigned long *data) 259 struct acpi_object_list *arguments, unsigned long long *data)
260{ 260{
261 acpi_status status = AE_OK; 261 acpi_status status = AE_OK;
262 union acpi_object *element; 262 union acpi_object *element;
@@ -288,7 +288,7 @@ acpi_evaluate_integer(acpi_handle handle,
288 *data = element->integer.value; 288 *data = element->integer.value;
289 kfree(element); 289 kfree(element);
290 290
291 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Return value [%lu]\n", *data)); 291 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Return value [%llu]\n", *data));
292 292
293 return AE_OK; 293 return AE_OK;
294} 294}
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 59fd299bb3d7..a29b0ccac65a 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -291,20 +291,20 @@ static int acpi_video_device_lcd_set_level(struct acpi_video_device *device,
291 int level); 291 int level);
292static int acpi_video_device_lcd_get_level_current( 292static int acpi_video_device_lcd_get_level_current(
293 struct acpi_video_device *device, 293 struct acpi_video_device *device,
294 unsigned long *level); 294 unsigned long long *level);
295static int acpi_video_get_next_level(struct acpi_video_device *device, 295static int acpi_video_get_next_level(struct acpi_video_device *device,
296 u32 level_current, u32 event); 296 u32 level_current, u32 event);
297static void acpi_video_switch_brightness(struct acpi_video_device *device, 297static void acpi_video_switch_brightness(struct acpi_video_device *device,
298 int event); 298 int event);
299static int acpi_video_device_get_state(struct acpi_video_device *device, 299static int acpi_video_device_get_state(struct acpi_video_device *device,
300 unsigned long *state); 300 unsigned long long *state);
301static int acpi_video_output_get(struct output_device *od); 301static int acpi_video_output_get(struct output_device *od);
302static int acpi_video_device_set_state(struct acpi_video_device *device, int state); 302static int acpi_video_device_set_state(struct acpi_video_device *device, int state);
303 303
304/*backlight device sysfs support*/ 304/*backlight device sysfs support*/
305static int acpi_video_get_brightness(struct backlight_device *bd) 305static int acpi_video_get_brightness(struct backlight_device *bd)
306{ 306{
307 unsigned long cur_level; 307 unsigned long long cur_level;
308 int i; 308 int i;
309 struct acpi_video_device *vd = 309 struct acpi_video_device *vd =
310 (struct acpi_video_device *)bl_get_data(bd); 310 (struct acpi_video_device *)bl_get_data(bd);
@@ -336,7 +336,7 @@ static struct backlight_ops acpi_backlight_ops = {
336/*video output device sysfs support*/ 336/*video output device sysfs support*/
337static int acpi_video_output_get(struct output_device *od) 337static int acpi_video_output_get(struct output_device *od)
338{ 338{
339 unsigned long state; 339 unsigned long long state;
340 struct acpi_video_device *vd = 340 struct acpi_video_device *vd =
341 (struct acpi_video_device *)dev_get_drvdata(&od->dev); 341 (struct acpi_video_device *)dev_get_drvdata(&od->dev);
342 acpi_video_device_get_state(vd, &state); 342 acpi_video_device_get_state(vd, &state);
@@ -370,7 +370,7 @@ static int video_get_cur_state(struct thermal_cooling_device *cdev, char *buf)
370{ 370{
371 struct acpi_device *device = cdev->devdata; 371 struct acpi_device *device = cdev->devdata;
372 struct acpi_video_device *video = acpi_driver_data(device); 372 struct acpi_video_device *video = acpi_driver_data(device);
373 unsigned long level; 373 unsigned long long level;
374 int state; 374 int state;
375 375
376 acpi_video_device_lcd_get_level_current(video, &level); 376 acpi_video_device_lcd_get_level_current(video, &level);
@@ -410,7 +410,7 @@ static struct thermal_cooling_device_ops video_cooling_ops = {
410/* device */ 410/* device */
411 411
412static int 412static int
413acpi_video_device_query(struct acpi_video_device *device, unsigned long *state) 413acpi_video_device_query(struct acpi_video_device *device, unsigned long long *state)
414{ 414{
415 int status; 415 int status;
416 416
@@ -421,7 +421,7 @@ acpi_video_device_query(struct acpi_video_device *device, unsigned long *state)
421 421
422static int 422static int
423acpi_video_device_get_state(struct acpi_video_device *device, 423acpi_video_device_get_state(struct acpi_video_device *device,
424 unsigned long *state) 424 unsigned long long *state)
425{ 425{
426 int status; 426 int status;
427 427
@@ -436,7 +436,7 @@ acpi_video_device_set_state(struct acpi_video_device *device, int state)
436 int status; 436 int status;
437 union acpi_object arg0 = { ACPI_TYPE_INTEGER }; 437 union acpi_object arg0 = { ACPI_TYPE_INTEGER };
438 struct acpi_object_list args = { 1, &arg0 }; 438 struct acpi_object_list args = { 1, &arg0 };
439 unsigned long ret; 439 unsigned long long ret;
440 440
441 441
442 arg0.integer.value = state; 442 arg0.integer.value = state;
@@ -495,7 +495,7 @@ acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level)
495 495
496static int 496static int
497acpi_video_device_lcd_get_level_current(struct acpi_video_device *device, 497acpi_video_device_lcd_get_level_current(struct acpi_video_device *device,
498 unsigned long *level) 498 unsigned long long *level)
499{ 499{
500 if (device->cap._BQC) 500 if (device->cap._BQC)
501 return acpi_evaluate_integer(device->dev->handle, "_BQC", NULL, 501 return acpi_evaluate_integer(device->dev->handle, "_BQC", NULL,
@@ -549,7 +549,7 @@ static int
549acpi_video_bus_set_POST(struct acpi_video_bus *video, unsigned long option) 549acpi_video_bus_set_POST(struct acpi_video_bus *video, unsigned long option)
550{ 550{
551 int status; 551 int status;
552 unsigned long tmp; 552 unsigned long long tmp;
553 union acpi_object arg0 = { ACPI_TYPE_INTEGER }; 553 union acpi_object arg0 = { ACPI_TYPE_INTEGER };
554 struct acpi_object_list args = { 1, &arg0 }; 554 struct acpi_object_list args = { 1, &arg0 };
555 555
@@ -564,7 +564,7 @@ acpi_video_bus_set_POST(struct acpi_video_bus *video, unsigned long option)
564} 564}
565 565
566static int 566static int
567acpi_video_bus_get_POST(struct acpi_video_bus *video, unsigned long *id) 567acpi_video_bus_get_POST(struct acpi_video_bus *video, unsigned long long *id)
568{ 568{
569 int status; 569 int status;
570 570
@@ -575,7 +575,7 @@ acpi_video_bus_get_POST(struct acpi_video_bus *video, unsigned long *id)
575 575
576static int 576static int
577acpi_video_bus_POST_options(struct acpi_video_bus *video, 577acpi_video_bus_POST_options(struct acpi_video_bus *video,
578 unsigned long *options) 578 unsigned long long *options)
579{ 579{
580 int status; 580 int status;
581 581
@@ -918,7 +918,7 @@ static int acpi_video_device_state_seq_show(struct seq_file *seq, void *offset)
918{ 918{
919 int status; 919 int status;
920 struct acpi_video_device *dev = seq->private; 920 struct acpi_video_device *dev = seq->private;
921 unsigned long state; 921 unsigned long long state;
922 922
923 923
924 if (!dev) 924 if (!dev)
@@ -927,14 +927,14 @@ static int acpi_video_device_state_seq_show(struct seq_file *seq, void *offset)
927 status = acpi_video_device_get_state(dev, &state); 927 status = acpi_video_device_get_state(dev, &state);
928 seq_printf(seq, "state: "); 928 seq_printf(seq, "state: ");
929 if (ACPI_SUCCESS(status)) 929 if (ACPI_SUCCESS(status))
930 seq_printf(seq, "0x%02lx\n", state); 930 seq_printf(seq, "0x%02llx\n", state);
931 else 931 else
932 seq_printf(seq, "<not supported>\n"); 932 seq_printf(seq, "<not supported>\n");
933 933
934 status = acpi_video_device_query(dev, &state); 934 status = acpi_video_device_query(dev, &state);
935 seq_printf(seq, "query: "); 935 seq_printf(seq, "query: ");
936 if (ACPI_SUCCESS(status)) 936 if (ACPI_SUCCESS(status))
937 seq_printf(seq, "0x%02lx\n", state); 937 seq_printf(seq, "0x%02llx\n", state);
938 else 938 else
939 seq_printf(seq, "<not supported>\n"); 939 seq_printf(seq, "<not supported>\n");
940 940
@@ -1217,7 +1217,7 @@ static int acpi_video_bus_ROM_open_fs(struct inode *inode, struct file *file)
1217static int acpi_video_bus_POST_info_seq_show(struct seq_file *seq, void *offset) 1217static int acpi_video_bus_POST_info_seq_show(struct seq_file *seq, void *offset)
1218{ 1218{
1219 struct acpi_video_bus *video = seq->private; 1219 struct acpi_video_bus *video = seq->private;
1220 unsigned long options; 1220 unsigned long long options;
1221 int status; 1221 int status;
1222 1222
1223 1223
@@ -1232,7 +1232,7 @@ static int acpi_video_bus_POST_info_seq_show(struct seq_file *seq, void *offset)
1232 printk(KERN_WARNING PREFIX 1232 printk(KERN_WARNING PREFIX
1233 "This indicates a BIOS bug. Please contact the manufacturer.\n"); 1233 "This indicates a BIOS bug. Please contact the manufacturer.\n");
1234 } 1234 }
1235 printk("%lx\n", options); 1235 printk("%llx\n", options);
1236 seq_printf(seq, "can POST: <integrated video>"); 1236 seq_printf(seq, "can POST: <integrated video>");
1237 if (options & 2) 1237 if (options & 2)
1238 seq_printf(seq, " <PCI video>"); 1238 seq_printf(seq, " <PCI video>");
@@ -1256,7 +1256,7 @@ static int acpi_video_bus_POST_seq_show(struct seq_file *seq, void *offset)
1256{ 1256{
1257 struct acpi_video_bus *video = seq->private; 1257 struct acpi_video_bus *video = seq->private;
1258 int status; 1258 int status;
1259 unsigned long id; 1259 unsigned long long id;
1260 1260
1261 1261
1262 if (!video) 1262 if (!video)
@@ -1303,7 +1303,7 @@ acpi_video_bus_write_POST(struct file *file,
1303 struct seq_file *m = file->private_data; 1303 struct seq_file *m = file->private_data;
1304 struct acpi_video_bus *video = m->private; 1304 struct acpi_video_bus *video = m->private;
1305 char str[12] = { 0 }; 1305 char str[12] = { 0 };
1306 unsigned long opt, options; 1306 unsigned long long opt, options;
1307 1307
1308 1308
1309 if (!video || count + 1 > sizeof str) 1309 if (!video || count + 1 > sizeof str)
@@ -1473,7 +1473,7 @@ static int
1473acpi_video_bus_get_one_device(struct acpi_device *device, 1473acpi_video_bus_get_one_device(struct acpi_device *device,
1474 struct acpi_video_bus *video) 1474 struct acpi_video_bus *video)
1475{ 1475{
1476 unsigned long device_id; 1476 unsigned long long device_id;
1477 int status; 1477 int status;
1478 struct acpi_video_device *data; 1478 struct acpi_video_device *data;
1479 struct acpi_video_device_attrib* attribute; 1479 struct acpi_video_device_attrib* attribute;
@@ -1724,7 +1724,7 @@ acpi_video_get_next_level(struct acpi_video_device *device,
1724static void 1724static void
1725acpi_video_switch_brightness(struct acpi_video_device *device, int event) 1725acpi_video_switch_brightness(struct acpi_video_device *device, int event)
1726{ 1726{
1727 unsigned long level_current, level_next; 1727 unsigned long long level_current, level_next;
1728 if (!device->brightness) 1728 if (!device->brightness)
1729 return; 1729 return;
1730 acpi_video_device_lcd_get_level_current(device, &level_current); 1730 acpi_video_device_lcd_get_level_current(device, &level_current);
diff --git a/drivers/misc/asus-laptop.c b/drivers/misc/asus-laptop.c
index 57d81c713eab..a9d5228724a6 100644
--- a/drivers/misc/asus-laptop.c
+++ b/drivers/misc/asus-laptop.c
@@ -281,7 +281,7 @@ static int write_acpi_int(acpi_handle handle, const char *method, int val,
281 281
282static int read_wireless_status(int mask) 282static int read_wireless_status(int mask)
283{ 283{
284 ulong status; 284 unsigned long long status;
285 acpi_status rv = AE_OK; 285 acpi_status rv = AE_OK;
286 286
287 if (!wireless_status_handle) 287 if (!wireless_status_handle)
@@ -298,7 +298,7 @@ static int read_wireless_status(int mask)
298 298
299static int read_gps_status(void) 299static int read_gps_status(void)
300{ 300{
301 ulong status; 301 unsigned long long status;
302 acpi_status rv = AE_OK; 302 acpi_status rv = AE_OK;
303 303
304 rv = acpi_evaluate_integer(gps_status_handle, NULL, NULL, &status); 304 rv = acpi_evaluate_integer(gps_status_handle, NULL, NULL, &status);
@@ -405,7 +405,7 @@ static void lcd_blank(int blank)
405 405
406static int read_brightness(struct backlight_device *bd) 406static int read_brightness(struct backlight_device *bd)
407{ 407{
408 ulong value; 408 unsigned long long value;
409 acpi_status rv = AE_OK; 409 acpi_status rv = AE_OK;
410 410
411 rv = acpi_evaluate_integer(brightness_get_handle, NULL, NULL, &value); 411 rv = acpi_evaluate_integer(brightness_get_handle, NULL, NULL, &value);
@@ -456,7 +456,7 @@ static ssize_t show_infos(struct device *dev,
456 struct device_attribute *attr, char *page) 456 struct device_attribute *attr, char *page)
457{ 457{
458 int len = 0; 458 int len = 0;
459 ulong temp; 459 unsigned long long temp;
460 char buf[16]; //enough for all info 460 char buf[16]; //enough for all info
461 acpi_status rv = AE_OK; 461 acpi_status rv = AE_OK;
462 462
@@ -604,7 +604,7 @@ static void set_display(int value)
604 604
605static int read_display(void) 605static int read_display(void)
606{ 606{
607 ulong value = 0; 607 unsigned long long value = 0;
608 acpi_status rv = AE_OK; 608 acpi_status rv = AE_OK;
609 609
610 /* In most of the case, we know how to set the display, but sometime 610 /* In most of the case, we know how to set the display, but sometime
@@ -850,7 +850,7 @@ static int asus_hotk_get_info(void)
850{ 850{
851 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 851 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
852 union acpi_object *model = NULL; 852 union acpi_object *model = NULL;
853 ulong bsts_result, hwrs_result; 853 unsigned long long bsts_result, hwrs_result;
854 char *string = NULL; 854 char *string = NULL;
855 acpi_status status; 855 acpi_status status;
856 856
diff --git a/drivers/misc/eeepc-laptop.c b/drivers/misc/eeepc-laptop.c
index 7b39e0f0f1be..9ef98b2d5039 100644
--- a/drivers/misc/eeepc-laptop.c
+++ b/drivers/misc/eeepc-laptop.c
@@ -231,7 +231,7 @@ static int write_acpi_int(acpi_handle handle, const char *method, int val,
231static int read_acpi_int(acpi_handle handle, const char *method, int *val) 231static int read_acpi_int(acpi_handle handle, const char *method, int *val)
232{ 232{
233 acpi_status status; 233 acpi_status status;
234 ulong result; 234 unsigned long long result;
235 235
236 status = acpi_evaluate_integer(handle, (char *)method, NULL, &result); 236 status = acpi_evaluate_integer(handle, (char *)method, NULL, &result);
237 if (ACPI_FAILURE(status)) { 237 if (ACPI_FAILURE(status)) {
diff --git a/drivers/misc/fujitsu-laptop.c b/drivers/misc/fujitsu-laptop.c
index 8555a17f00ef..d2cf0bfe3163 100644
--- a/drivers/misc/fujitsu-laptop.c
+++ b/drivers/misc/fujitsu-laptop.c
@@ -226,7 +226,7 @@ static int set_lcd_level_alt(int level)
226 226
227static int get_lcd_level(void) 227static int get_lcd_level(void)
228{ 228{
229 unsigned long state = 0; 229 unsigned long long state = 0;
230 acpi_status status = AE_OK; 230 acpi_status status = AE_OK;
231 231
232 vdbg_printk(FUJLAPTOP_DBG_TRACE, "get lcd level via GBLL\n"); 232 vdbg_printk(FUJLAPTOP_DBG_TRACE, "get lcd level via GBLL\n");
@@ -248,7 +248,7 @@ static int get_lcd_level(void)
248 248
249static int get_max_brightness(void) 249static int get_max_brightness(void)
250{ 250{
251 unsigned long state = 0; 251 unsigned long long state = 0;
252 acpi_status status = AE_OK; 252 acpi_status status = AE_OK;
253 253
254 vdbg_printk(FUJLAPTOP_DBG_TRACE, "get max lcd level via RBLL\n"); 254 vdbg_printk(FUJLAPTOP_DBG_TRACE, "get max lcd level via RBLL\n");
@@ -265,7 +265,7 @@ static int get_max_brightness(void)
265 265
266static int get_lcd_level_alt(void) 266static int get_lcd_level_alt(void)
267{ 267{
268 unsigned long state = 0; 268 unsigned long long state = 0;
269 acpi_status status = AE_OK; 269 acpi_status status = AE_OK;
270 270
271 vdbg_printk(FUJLAPTOP_DBG_TRACE, "get lcd level via GBLS\n"); 271 vdbg_printk(FUJLAPTOP_DBG_TRACE, "get lcd level via GBLS\n");
@@ -386,7 +386,7 @@ static ssize_t store_lcd_level(struct device *dev,
386 386
387static int get_irb(void) 387static int get_irb(void)
388{ 388{
389 unsigned long state = 0; 389 unsigned long long state = 0;
390 acpi_status status = AE_OK; 390 acpi_status status = AE_OK;
391 391
392 vdbg_printk(FUJLAPTOP_DBG_TRACE, "Get irb\n"); 392 vdbg_printk(FUJLAPTOP_DBG_TRACE, "Get irb\n");
diff --git a/drivers/misc/intel_menlow.c b/drivers/misc/intel_menlow.c
index cd3ea7faa5b6..a78274385d54 100644
--- a/drivers/misc/intel_menlow.c
+++ b/drivers/misc/intel_menlow.c
@@ -57,7 +57,7 @@ static int memory_get_int_max_bandwidth(struct thermal_cooling_device *cdev,
57{ 57{
58 struct acpi_device *device = cdev->devdata; 58 struct acpi_device *device = cdev->devdata;
59 acpi_handle handle = device->handle; 59 acpi_handle handle = device->handle;
60 unsigned long value; 60 unsigned long long value;
61 struct acpi_object_list arg_list; 61 struct acpi_object_list arg_list;
62 union acpi_object arg; 62 union acpi_object arg;
63 acpi_status status = AE_OK; 63 acpi_status status = AE_OK;
@@ -90,7 +90,7 @@ static int memory_get_cur_bandwidth(struct thermal_cooling_device *cdev,
90{ 90{
91 struct acpi_device *device = cdev->devdata; 91 struct acpi_device *device = cdev->devdata;
92 acpi_handle handle = device->handle; 92 acpi_handle handle = device->handle;
93 unsigned long value; 93 unsigned long long value;
94 struct acpi_object_list arg_list; 94 struct acpi_object_list arg_list;
95 union acpi_object arg; 95 union acpi_object arg;
96 acpi_status status = AE_OK; 96 acpi_status status = AE_OK;
@@ -115,7 +115,7 @@ static int memory_set_cur_bandwidth(struct thermal_cooling_device *cdev,
115 struct acpi_object_list arg_list; 115 struct acpi_object_list arg_list;
116 union acpi_object arg; 116 union acpi_object arg;
117 acpi_status status; 117 acpi_status status;
118 int temp; 118 unsigned long long temp;
119 unsigned long max_state; 119 unsigned long max_state;
120 120
121 if (memory_get_int_max_bandwidth(cdev, &max_state)) 121 if (memory_get_int_max_bandwidth(cdev, &max_state))
@@ -131,7 +131,7 @@ static int memory_set_cur_bandwidth(struct thermal_cooling_device *cdev,
131 131
132 status = 132 status =
133 acpi_evaluate_integer(handle, MEMORY_SET_BANDWIDTH, &arg_list, 133 acpi_evaluate_integer(handle, MEMORY_SET_BANDWIDTH, &arg_list,
134 (unsigned long *)&temp); 134 &temp);
135 135
136 printk(KERN_INFO 136 printk(KERN_INFO
137 "Bandwidth value was %d: status is %d\n", state, status); 137 "Bandwidth value was %d: status is %d\n", state, status);
@@ -252,7 +252,8 @@ static DEFINE_MUTEX(intel_menlow_attr_lock);
252 * @auxtype : AUX0/AUX1 252 * @auxtype : AUX0/AUX1
253 * @buf: syfs buffer 253 * @buf: syfs buffer
254 */ 254 */
255static int sensor_get_auxtrip(acpi_handle handle, int index, int *value) 255static int sensor_get_auxtrip(acpi_handle handle, int index,
256 unsigned long long *value)
256{ 257{
257 acpi_status status; 258 acpi_status status;
258 259
@@ -260,7 +261,7 @@ static int sensor_get_auxtrip(acpi_handle handle, int index, int *value)
260 return -EINVAL; 261 return -EINVAL;
261 262
262 status = acpi_evaluate_integer(handle, index ? GET_AUX1 : GET_AUX0, 263 status = acpi_evaluate_integer(handle, index ? GET_AUX1 : GET_AUX0,
263 NULL, (unsigned long *)value); 264 NULL, value);
264 if (ACPI_FAILURE(status)) 265 if (ACPI_FAILURE(status))
265 return -EIO; 266 return -EIO;
266 267
@@ -282,13 +283,13 @@ static int sensor_set_auxtrip(acpi_handle handle, int index, int value)
282 struct acpi_object_list args = { 283 struct acpi_object_list args = {
283 1, &arg 284 1, &arg
284 }; 285 };
285 int temp; 286 unsigned long long temp;
286 287
287 if (index != 0 && index != 1) 288 if (index != 0 && index != 1)
288 return -EINVAL; 289 return -EINVAL;
289 290
290 status = acpi_evaluate_integer(handle, index ? GET_AUX0 : GET_AUX1, 291 status = acpi_evaluate_integer(handle, index ? GET_AUX0 : GET_AUX1,
291 NULL, (unsigned long *)&temp); 292 NULL, &temp);
292 if (ACPI_FAILURE(status)) 293 if (ACPI_FAILURE(status))
293 return -EIO; 294 return -EIO;
294 if ((index && value < temp) || (!index && value > temp)) 295 if ((index && value < temp) || (!index && value > temp))
@@ -296,7 +297,7 @@ static int sensor_set_auxtrip(acpi_handle handle, int index, int value)
296 297
297 arg.integer.value = value; 298 arg.integer.value = value;
298 status = acpi_evaluate_integer(handle, index ? SET_AUX1 : SET_AUX0, 299 status = acpi_evaluate_integer(handle, index ? SET_AUX1 : SET_AUX0,
299 &args, (unsigned long *)&temp); 300 &args, &temp);
300 if (ACPI_FAILURE(status)) 301 if (ACPI_FAILURE(status))
301 return -EIO; 302 return -EIO;
302 303
@@ -312,7 +313,7 @@ static ssize_t aux0_show(struct device *dev,
312 struct device_attribute *dev_attr, char *buf) 313 struct device_attribute *dev_attr, char *buf)
313{ 314{
314 struct intel_menlow_attribute *attr = to_intel_menlow_attr(dev_attr); 315 struct intel_menlow_attribute *attr = to_intel_menlow_attr(dev_attr);
315 int value; 316 unsigned long long value;
316 int result; 317 int result;
317 318
318 result = sensor_get_auxtrip(attr->handle, 0, &value); 319 result = sensor_get_auxtrip(attr->handle, 0, &value);
@@ -324,7 +325,7 @@ static ssize_t aux1_show(struct device *dev,
324 struct device_attribute *dev_attr, char *buf) 325 struct device_attribute *dev_attr, char *buf)
325{ 326{
326 struct intel_menlow_attribute *attr = to_intel_menlow_attr(dev_attr); 327 struct intel_menlow_attribute *attr = to_intel_menlow_attr(dev_attr);
327 int value; 328 unsigned long long value;
328 int result; 329 int result;
329 330
330 result = sensor_get_auxtrip(attr->handle, 1, &value); 331 result = sensor_get_auxtrip(attr->handle, 1, &value);
@@ -376,7 +377,7 @@ static ssize_t bios_enabled_show(struct device *dev,
376 struct device_attribute *attr, char *buf) 377 struct device_attribute *attr, char *buf)
377{ 378{
378 acpi_status status; 379 acpi_status status;
379 unsigned long bios_enabled; 380 unsigned long long bios_enabled;
380 381
381 status = acpi_evaluate_integer(NULL, BIOS_ENABLED, NULL, &bios_enabled); 382 status = acpi_evaluate_integer(NULL, BIOS_ENABLED, NULL, &bios_enabled);
382 if (ACPI_FAILURE(status)) 383 if (ACPI_FAILURE(status))
@@ -492,7 +493,7 @@ static int __init intel_menlow_module_init(void)
492{ 493{
493 int result = -ENODEV; 494 int result = -ENODEV;
494 acpi_status status; 495 acpi_status status;
495 unsigned long enable; 496 unsigned long long enable;
496 497
497 if (acpi_disabled) 498 if (acpi_disabled)
498 return result; 499 return result;
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index db54c5ef2aa5..955aae4071f7 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -182,7 +182,7 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv)
182 struct acpiphp_func *newfunc; 182 struct acpiphp_func *newfunc;
183 acpi_handle tmp; 183 acpi_handle tmp;
184 acpi_status status = AE_OK; 184 acpi_status status = AE_OK;
185 unsigned long adr, sun; 185 unsigned long long adr, sun;
186 int device, function, retval; 186 int device, function, retval;
187 187
188 status = acpi_evaluate_integer(handle, "_ADR", NULL, &adr); 188 status = acpi_evaluate_integer(handle, "_ADR", NULL, &adr);
@@ -530,7 +530,7 @@ find_p2p_bridge(acpi_handle handle, u32 lvl, void *context, void **rv)
530{ 530{
531 acpi_status status; 531 acpi_status status;
532 acpi_handle dummy_handle; 532 acpi_handle dummy_handle;
533 unsigned long tmp; 533 unsigned long long tmp;
534 int device, function; 534 int device, function;
535 struct pci_dev *dev; 535 struct pci_dev *dev;
536 struct pci_bus *pci_bus = context; 536 struct pci_bus *pci_bus = context;
@@ -575,7 +575,7 @@ find_p2p_bridge(acpi_handle handle, u32 lvl, void *context, void **rv)
575static int add_bridge(acpi_handle handle) 575static int add_bridge(acpi_handle handle)
576{ 576{
577 acpi_status status; 577 acpi_status status;
578 unsigned long tmp; 578 unsigned long long tmp;
579 int seg, bus; 579 int seg, bus;
580 acpi_handle dummy_handle; 580 acpi_handle dummy_handle;
581 struct pci_bus *pci_bus; 581 struct pci_bus *pci_bus;
@@ -769,7 +769,7 @@ static int get_gsi_base(acpi_handle handle, u32 *gsi_base)
769{ 769{
770 acpi_status status; 770 acpi_status status;
771 int result = -1; 771 int result = -1;
772 unsigned long gsb; 772 unsigned long long gsb;
773 struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; 773 struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
774 union acpi_object *obj; 774 union acpi_object *obj;
775 void *table; 775 void *table;
@@ -810,7 +810,7 @@ static acpi_status
810ioapic_add(acpi_handle handle, u32 lvl, void *context, void **rv) 810ioapic_add(acpi_handle handle, u32 lvl, void *context, void **rv)
811{ 811{
812 acpi_status status; 812 acpi_status status;
813 unsigned long sta; 813 unsigned long long sta;
814 acpi_handle tmp; 814 acpi_handle tmp;
815 struct pci_dev *pdev; 815 struct pci_dev *pdev;
816 u32 gsi_base; 816 u32 gsi_base;
@@ -874,7 +874,7 @@ static acpi_status
874ioapic_remove(acpi_handle handle, u32 lvl, void *context, void **rv) 874ioapic_remove(acpi_handle handle, u32 lvl, void *context, void **rv)
875{ 875{
876 acpi_status status; 876 acpi_status status;
877 unsigned long sta; 877 unsigned long long sta;
878 acpi_handle tmp; 878 acpi_handle tmp;
879 u32 gsi_base; 879 u32 gsi_base;
880 struct acpiphp_ioapic *pos, *n, *ioapic = NULL; 880 struct acpiphp_ioapic *pos, *n, *ioapic = NULL;
@@ -1266,7 +1266,7 @@ static int disable_device(struct acpiphp_slot *slot)
1266static unsigned int get_slot_status(struct acpiphp_slot *slot) 1266static unsigned int get_slot_status(struct acpiphp_slot *slot)
1267{ 1267{
1268 acpi_status status; 1268 acpi_status status;
1269 unsigned long sta = 0; 1269 unsigned long long sta = 0;
1270 u32 dvid; 1270 u32 dvid;
1271 struct list_head *l; 1271 struct list_head *l;
1272 struct acpiphp_func *func; 1272 struct acpiphp_func *func;
diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c
index 2b7c45e39370..b291ee68b4f1 100644
--- a/drivers/pci/hotplug/acpiphp_ibm.c
+++ b/drivers/pci/hotplug/acpiphp_ibm.c
@@ -183,7 +183,7 @@ static int ibm_set_attention_status(struct hotplug_slot *slot, u8 status)
183 union acpi_object args[2]; 183 union acpi_object args[2];
184 struct acpi_object_list params = { .pointer = args, .count = 2 }; 184 struct acpi_object_list params = { .pointer = args, .count = 2 };
185 acpi_status stat; 185 acpi_status stat;
186 unsigned long rc; 186 unsigned long long rc;
187 union apci_descriptor *ibm_slot; 187 union apci_descriptor *ibm_slot;
188 188
189 ibm_slot = ibm_slot_from_id(hpslot_to_sun(slot)); 189 ibm_slot = ibm_slot_from_id(hpslot_to_sun(slot));
diff --git a/drivers/pci/hotplug/sgi_hotplug.c b/drivers/pci/hotplug/sgi_hotplug.c
index 410fe0394a8e..59f42501acce 100644
--- a/drivers/pci/hotplug/sgi_hotplug.c
+++ b/drivers/pci/hotplug/sgi_hotplug.c
@@ -418,7 +418,7 @@ static int enable_slot(struct hotplug_slot *bss_hotplug_slot)
418 /* 418 /*
419 * Add the slot's devices to the ACPI infrastructure */ 419 * Add the slot's devices to the ACPI infrastructure */
420 if (SN_ACPI_BASE_SUPPORT() && ssdt) { 420 if (SN_ACPI_BASE_SUPPORT() && ssdt) {
421 unsigned long adr; 421 unsigned long long adr;
422 struct acpi_device *pdevice; 422 struct acpi_device *pdevice;
423 struct acpi_device *device; 423 struct acpi_device *device;
424 acpi_handle phandle; 424 acpi_handle phandle;
@@ -510,7 +510,7 @@ static int disable_slot(struct hotplug_slot *bss_hotplug_slot)
510 /* free the ACPI resources for the slot */ 510 /* free the ACPI resources for the slot */
511 if (SN_ACPI_BASE_SUPPORT() && 511 if (SN_ACPI_BASE_SUPPORT() &&
512 PCI_CONTROLLER(slot->pci_bus)->acpi_handle) { 512 PCI_CONTROLLER(slot->pci_bus)->acpi_handle) {
513 unsigned long adr; 513 unsigned long long adr;
514 struct acpi_device *device; 514 struct acpi_device *device;
515 acpi_handle phandle; 515 acpi_handle phandle;
516 acpi_handle chandle = NULL; 516 acpi_handle chandle = NULL;
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index c1b5556c985d..54a279e44c9a 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -46,7 +46,7 @@ acpi_extract_package(union acpi_object *package,
46acpi_status 46acpi_status
47acpi_evaluate_integer(acpi_handle handle, 47acpi_evaluate_integer(acpi_handle handle,
48 acpi_string pathname, 48 acpi_string pathname,
49 struct acpi_object_list *arguments, unsigned long *data); 49 struct acpi_object_list *arguments, unsigned long long *data);
50acpi_status 50acpi_status
51acpi_evaluate_reference(acpi_handle handle, 51acpi_evaluate_reference(acpi_handle handle,
52 acpi_string pathname, 52 acpi_string pathname,