aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@linux.intel.com>2008-10-10 02:22:59 -0400
committerLen Brown <len.brown@intel.com>2008-10-11 02:47:33 -0400
commit27663c5855b10af9ec67bc7dfba001426ba21222 (patch)
tree2b8c520bb57a792045d7d072398a4d840fada6c0 /drivers
parent3fa8749e584b55f1180411ab1b51117190bac1e5 (diff)
ACPI: Change acpi_evaluate_integer to support 64-bit on 32-bit kernels
As of version 2.0, ACPI can return 64-bit integers. The current acpi_evaluate_integer only supports 64-bit integers on 64-bit platforms. Change the argument to take a pointer to an acpi_integer so we support 64-bit integers on all platforms. lenb: replaced use of "acpi_integer" with "unsigned long long" lenb: fixed bug in acpi_thermal_trips_update() Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-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/bay.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/ata/libata-acpi.c2
-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
30 files changed, 120 insertions, 107 deletions
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
index 831883b7d6c9..5e57a80c6cf1 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 5f1127ad5a95..2b773160e9c2 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 d3d0886d637f..4434209e453e 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/bay.c b/drivers/acpi/bay.c
index 61b6c5beb2d3..23a51e4779f7 100644
--- a/drivers/acpi/bay.c
+++ b/drivers/acpi/bay.c
@@ -90,7 +90,7 @@ static int is_ejectable(acpi_handle handle)
90 */ 90 */
91static int bay_present(struct bay *bay) 91static int bay_present(struct bay *bay)
92{ 92{
93 unsigned long sta; 93 unsigned long long sta;
94 acpi_status status; 94 acpi_status status;
95 95
96 if (bay) { 96 if (bay) {
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index ccae305ee55d..0885fc796fa0 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -77,7 +77,7 @@ EXPORT_SYMBOL(acpi_bus_get_device);
77int acpi_bus_get_status(struct acpi_device *device) 77int acpi_bus_get_status(struct acpi_device *device)
78{ 78{
79 acpi_status status = AE_OK; 79 acpi_status status = AE_OK;
80 unsigned long sta = 0; 80 unsigned long long sta = 0;
81 81
82 82
83 if (!device) 83 if (!device)
@@ -155,7 +155,7 @@ int acpi_bus_get_power(acpi_handle handle, int *state)
155 int result = 0; 155 int result = 0;
156 acpi_status status = 0; 156 acpi_status status = 0;
157 struct acpi_device *device = NULL; 157 struct acpi_device *device = NULL;
158 unsigned long psc = 0; 158 unsigned long long psc = 0;
159 159
160 160
161 result = acpi_bus_get_device(handle, &device); 161 result = acpi_bus_get_device(handle, &device);
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 1dfec413588c..baeb661ca953 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 3c25ec7a1871..cfa5fd68168a 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 7d2edf143f16..94857112b64d 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -229,7 +229,7 @@ EXPORT_SYMBOL_GPL(is_dock_device);
229 */ 229 */
230static int dock_present(struct dock_station *ds) 230static int dock_present(struct dock_station *ds)
231{ 231{
232 unsigned long sta; 232 unsigned long long sta;
233 acpi_status status; 233 acpi_status status;
234 234
235 if (ds) { 235 if (ds) {
@@ -727,13 +727,13 @@ static DEVICE_ATTR(undock, S_IWUSR, NULL, write_undock);
727static ssize_t show_dock_uid(struct device *dev, 727static ssize_t show_dock_uid(struct device *dev,
728 struct device_attribute *attr, char *buf) 728 struct device_attribute *attr, char *buf)
729{ 729{
730 unsigned long lbuf; 730 unsigned long long lbuf;
731 acpi_status status = acpi_evaluate_integer(dock_station->handle, 731 acpi_status status = acpi_evaluate_integer(dock_station->handle,
732 "_UID", NULL, &lbuf); 732 "_UID", NULL, &lbuf);
733 if (ACPI_FAILURE(status)) 733 if (ACPI_FAILURE(status))
734 return 0; 734 return 0;
735 735
736 return snprintf(buf, PAGE_SIZE, "%lx\n", lbuf); 736 return snprintf(buf, PAGE_SIZE, "%llx\n", lbuf);
737} 737}
738static DEVICE_ATTR(uid, S_IRUGO, show_dock_uid, NULL); 738static DEVICE_ATTR(uid, S_IRUGO, show_dock_uid, NULL);
739 739
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 13593f9f2197..638a68679a42 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -718,6 +718,7 @@ static acpi_status
718ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval) 718ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
719{ 719{
720 acpi_status status; 720 acpi_status status;
721 unsigned long long tmp;
721 722
722 struct acpi_ec *ec = context; 723 struct acpi_ec *ec = context;
723 status = acpi_walk_resources(handle, METHOD_NAME__CRS, 724 status = acpi_walk_resources(handle, METHOD_NAME__CRS,
@@ -727,11 +728,13 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
727 728
728 /* Get GPE bit assignment (EC events). */ 729 /* Get GPE bit assignment (EC events). */
729 /* TODO: Add support for _GPE returning a package */ 730 /* TODO: Add support for _GPE returning a package */
730 status = acpi_evaluate_integer(handle, "_GPE", NULL, &ec->gpe); 731 status = acpi_evaluate_integer(handle, "_GPE", NULL, &tmp);
731 if (ACPI_FAILURE(status)) 732 if (ACPI_FAILURE(status))
732 return status; 733 return status;
734 ec->gpe = tmp;
733 /* Use the global lock for all EC transactions? */ 735 /* Use the global lock for all EC transactions? */
734 acpi_evaluate_integer(handle, "_GLK", NULL, &ec->global_lock); 736 acpi_evaluate_integer(handle, "_GLK", NULL, &tmp);
737 ec->global_lock = tmp;
735 ec->handle = handle; 738 ec->handle = handle;
736 return AE_CTRL_TERMINATE; 739 return AE_CTRL_TERMINATE;
737} 740}
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 235a1386888a..f58fcbbc810d 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 c3fed31166b5..18ff4e5c8d81 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 4ab21cb1c8c7..89e5d2a8c33a 100644
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -131,7 +131,7 @@ acpi_power_get_context(acpi_handle handle,
131static int acpi_power_get_state(struct acpi_power_resource *resource, int *state) 131static int acpi_power_get_state(struct acpi_power_resource *resource, int *state)
132{ 132{
133 acpi_status status = AE_OK; 133 acpi_status status = AE_OK;
134 unsigned long sta = 0; 134 unsigned long long sta = 0;
135 135
136 136
137 if (!resource || !state) 137 if (!resource || !state)
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index ee68ac54c0d4..8a2787141f80 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 80c251ec6d2a..f8129c7277f1 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -126,7 +126,7 @@ static struct notifier_block acpi_ppc_notifier_block = {
126static int acpi_processor_get_platform_limit(struct acpi_processor *pr) 126static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
127{ 127{
128 acpi_status status = 0; 128 acpi_status status = 0;
129 unsigned long ppc = 0; 129 unsigned long long ppc = 0;
130 130
131 131
132 if (!pr) 132 if (!pr)
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index a56fc6c4394b..3097b752003d 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 a4e3767b8c64..81d23d38ec91 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 d13194a031bf..b32ba565e69e 100644
--- a/drivers/acpi/sleep/main.c
+++ b/drivers/acpi/sleep/main.c
@@ -444,7 +444,7 @@ int acpi_pm_device_sleep_state(struct device *dev, int *d_min_p)
444 acpi_handle handle = DEVICE_ACPI_HANDLE(dev); 444 acpi_handle handle = DEVICE_ACPI_HANDLE(dev);
445 struct acpi_device *adev; 445 struct acpi_device *adev;
446 char acpi_method[] = "_SxD"; 446 char acpi_method[] = "_SxD";
447 unsigned long d_min, d_max; 447 unsigned long long d_min, d_max;
448 448
449 if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &adev))) { 449 if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &adev))) {
450 printk(KERN_DEBUG "ACPI handle has no context!\n"); 450 printk(KERN_DEBUG "ACPI handle has no context!\n");
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 912703691d36..47abb94bdfb9 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.
@@ -399,12 +400,13 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
399 /* Critical Sleep (optional) */ 400 /* Critical Sleep (optional) */
400 if (flag & ACPI_TRIPS_HOT) { 401 if (flag & ACPI_TRIPS_HOT) {
401 status = acpi_evaluate_integer(tz->device->handle, 402 status = acpi_evaluate_integer(tz->device->handle,
402 "_HOT", NULL, &tz->trips.hot.temperature); 403 "_HOT", NULL, &tmp);
403 if (ACPI_FAILURE(status)) { 404 if (ACPI_FAILURE(status)) {
404 tz->trips.hot.flags.valid = 0; 405 tz->trips.hot.flags.valid = 0;
405 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 406 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
406 "No hot threshold\n")); 407 "No hot threshold\n"));
407 } else { 408 } else {
409 tz->trips.hot.temperature = tmp;
408 tz->trips.hot.flags.valid = 1; 410 tz->trips.hot.flags.valid = 1;
409 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 411 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
410 "Found hot threshold [%lu]\n", 412 "Found hot threshold [%lu]\n",
@@ -418,33 +420,40 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
418 if (psv == -1) { 420 if (psv == -1) {
419 status = AE_SUPPORT; 421 status = AE_SUPPORT;
420 } else if (psv > 0) { 422 } else if (psv > 0) {
421 tz->trips.passive.temperature = CELSIUS_TO_KELVIN(psv); 423 tmp = CELSIUS_TO_KELVIN(psv);
422 status = AE_OK; 424 status = AE_OK;
423 } else { 425 } else {
424 status = acpi_evaluate_integer(tz->device->handle, 426 status = acpi_evaluate_integer(tz->device->handle,
425 "_PSV", NULL, &tz->trips.passive.temperature); 427 "_PSV", NULL, &tmp);
426 } 428 }
427 429
428 if (ACPI_FAILURE(status)) 430 if (ACPI_FAILURE(status))
429 tz->trips.passive.flags.valid = 0; 431 tz->trips.passive.flags.valid = 0;
430 else { 432 else {
433 tz->trips.passive.temperature = tmp;
431 tz->trips.passive.flags.valid = 1; 434 tz->trips.passive.flags.valid = 1;
432 if (flag == ACPI_TRIPS_INIT) { 435 if (flag == ACPI_TRIPS_INIT) {
433 status = acpi_evaluate_integer( 436 status = acpi_evaluate_integer(
434 tz->device->handle, "_TC1", 437 tz->device->handle, "_TC1",
435 NULL, &tz->trips.passive.tc1); 438 NULL, &tmp);
436 if (ACPI_FAILURE(status)) 439 if (ACPI_FAILURE(status))
437 tz->trips.passive.flags.valid = 0; 440 tz->trips.passive.flags.valid = 0;
441 else
442 tz->trips.passive.tc1 = tmp;
438 status = acpi_evaluate_integer( 443 status = acpi_evaluate_integer(
439 tz->device->handle, "_TC2", 444 tz->device->handle, "_TC2",
440 NULL, &tz->trips.passive.tc2); 445 NULL, &tmp);
441 if (ACPI_FAILURE(status)) 446 if (ACPI_FAILURE(status))
442 tz->trips.passive.flags.valid = 0; 447 tz->trips.passive.flags.valid = 0;
448 else
449 tz->trips.passive.tc2 = tmp;
443 status = acpi_evaluate_integer( 450 status = acpi_evaluate_integer(
444 tz->device->handle, "_TSP", 451 tz->device->handle, "_TSP",
445 NULL, &tz->trips.passive.tsp); 452 NULL, &tmp);
446 if (ACPI_FAILURE(status)) 453 if (ACPI_FAILURE(status))
447 tz->trips.passive.flags.valid = 0; 454 tz->trips.passive.flags.valid = 0;
455 else
456 tz->trips.passive.tsp = tmp;
448 } 457 }
449 } 458 }
450 } 459 }
@@ -479,7 +488,7 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
479 488
480 if (flag & ACPI_TRIPS_ACTIVE) { 489 if (flag & ACPI_TRIPS_ACTIVE) {
481 status = acpi_evaluate_integer(tz->device->handle, 490 status = acpi_evaluate_integer(tz->device->handle,
482 name, NULL, &tz->trips.active[i].temperature); 491 name, NULL, &tmp);
483 if (ACPI_FAILURE(status)) { 492 if (ACPI_FAILURE(status)) {
484 tz->trips.active[i].flags.valid = 0; 493 tz->trips.active[i].flags.valid = 0;
485 if (i == 0) 494 if (i == 0)
@@ -500,8 +509,10 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
500 tz->trips.active[i - 2].temperature : 509 tz->trips.active[i - 2].temperature :
501 CELSIUS_TO_KELVIN(act)); 510 CELSIUS_TO_KELVIN(act));
502 break; 511 break;
503 } else 512 } else {
513 tz->trips.active[i].temperature = tmp;
504 tz->trips.active[i].flags.valid = 1; 514 tz->trips.active[i].flags.valid = 1;
515 }
505 } 516 }
506 517
507 name[2] = 'L'; 518 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 e8a51a1700f7..79409c9d2ad6 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/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
index 9330b7922f62..ae451876b8ed 100644
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -180,7 +180,7 @@ static void ata_acpi_handle_hotplug(struct ata_port *ap, struct ata_device *dev,
180 int wait = 0; 180 int wait = 0;
181 unsigned long flags; 181 unsigned long flags;
182 acpi_handle handle, tmphandle; 182 acpi_handle handle, tmphandle;
183 unsigned long sta; 183 unsigned long long sta;
184 acpi_status status; 184 acpi_status status;
185 185
186 if (dev) { 186 if (dev) {
diff --git a/drivers/misc/asus-laptop.c b/drivers/misc/asus-laptop.c
index 7c6dfd03de9f..967ecec82577 100644
--- a/drivers/misc/asus-laptop.c
+++ b/drivers/misc/asus-laptop.c
@@ -280,7 +280,7 @@ static int write_acpi_int(acpi_handle handle, const char *method, int val,
280 280
281static int read_wireless_status(int mask) 281static int read_wireless_status(int mask)
282{ 282{
283 ulong status; 283 unsigned long long status;
284 acpi_status rv = AE_OK; 284 acpi_status rv = AE_OK;
285 285
286 if (!wireless_status_handle) 286 if (!wireless_status_handle)
@@ -297,7 +297,7 @@ static int read_wireless_status(int mask)
297 297
298static int read_gps_status(void) 298static int read_gps_status(void)
299{ 299{
300 ulong status; 300 unsigned long long status;
301 acpi_status rv = AE_OK; 301 acpi_status rv = AE_OK;
302 302
303 rv = acpi_evaluate_integer(gps_status_handle, NULL, NULL, &status); 303 rv = acpi_evaluate_integer(gps_status_handle, NULL, NULL, &status);
@@ -404,7 +404,7 @@ static void lcd_blank(int blank)
404 404
405static int read_brightness(struct backlight_device *bd) 405static int read_brightness(struct backlight_device *bd)
406{ 406{
407 ulong value; 407 unsigned long long value;
408 acpi_status rv = AE_OK; 408 acpi_status rv = AE_OK;
409 409
410 rv = acpi_evaluate_integer(brightness_get_handle, NULL, NULL, &value); 410 rv = acpi_evaluate_integer(brightness_get_handle, NULL, NULL, &value);
@@ -455,7 +455,7 @@ static ssize_t show_infos(struct device *dev,
455 struct device_attribute *attr, char *page) 455 struct device_attribute *attr, char *page)
456{ 456{
457 int len = 0; 457 int len = 0;
458 ulong temp; 458 unsigned long long temp;
459 char buf[16]; //enough for all info 459 char buf[16]; //enough for all info
460 acpi_status rv = AE_OK; 460 acpi_status rv = AE_OK;
461 461
@@ -603,7 +603,7 @@ static void set_display(int value)
603 603
604static int read_display(void) 604static int read_display(void)
605{ 605{
606 ulong value = 0; 606 unsigned long long value = 0;
607 acpi_status rv = AE_OK; 607 acpi_status rv = AE_OK;
608 608
609 /* In most of the case, we know how to set the display, but sometime 609 /* In most of the case, we know how to set the display, but sometime
@@ -849,7 +849,7 @@ static int asus_hotk_get_info(void)
849{ 849{
850 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 850 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
851 union acpi_object *model = NULL; 851 union acpi_object *model = NULL;
852 ulong bsts_result, hwrs_result; 852 unsigned long long bsts_result, hwrs_result;
853 char *string = NULL; 853 char *string = NULL;
854 acpi_status status; 854 acpi_status status;
855 855
diff --git a/drivers/misc/eeepc-laptop.c b/drivers/misc/eeepc-laptop.c
index 1ee8501e90f1..616bcbd8def6 100644
--- a/drivers/misc/eeepc-laptop.c
+++ b/drivers/misc/eeepc-laptop.c
@@ -204,7 +204,7 @@ static int write_acpi_int(acpi_handle handle, const char *method, int val,
204static int read_acpi_int(acpi_handle handle, const char *method, int *val) 204static int read_acpi_int(acpi_handle handle, const char *method, int *val)
205{ 205{
206 acpi_status status; 206 acpi_status status;
207 ulong result; 207 unsigned long long result;
208 208
209 status = acpi_evaluate_integer(handle, (char *)method, NULL, &result); 209 status = acpi_evaluate_integer(handle, (char *)method, NULL, &result);
210 if (ACPI_FAILURE(status)) { 210 if (ACPI_FAILURE(status)) {
diff --git a/drivers/misc/fujitsu-laptop.c b/drivers/misc/fujitsu-laptop.c
index 3e56203e4947..efd395a64720 100644
--- a/drivers/misc/fujitsu-laptop.c
+++ b/drivers/misc/fujitsu-laptop.c
@@ -224,7 +224,7 @@ static int set_lcd_level_alt(int level)
224 224
225static int get_lcd_level(void) 225static int get_lcd_level(void)
226{ 226{
227 unsigned long state = 0; 227 unsigned long long state = 0;
228 acpi_status status = AE_OK; 228 acpi_status status = AE_OK;
229 229
230 vdbg_printk(FUJLAPTOP_DBG_TRACE, "get lcd level via GBLL\n"); 230 vdbg_printk(FUJLAPTOP_DBG_TRACE, "get lcd level via GBLL\n");
@@ -246,7 +246,7 @@ static int get_lcd_level(void)
246 246
247static int get_max_brightness(void) 247static int get_max_brightness(void)
248{ 248{
249 unsigned long state = 0; 249 unsigned long long state = 0;
250 acpi_status status = AE_OK; 250 acpi_status status = AE_OK;
251 251
252 vdbg_printk(FUJLAPTOP_DBG_TRACE, "get max lcd level via RBLL\n"); 252 vdbg_printk(FUJLAPTOP_DBG_TRACE, "get max lcd level via RBLL\n");
@@ -263,7 +263,7 @@ static int get_max_brightness(void)
263 263
264static int get_lcd_level_alt(void) 264static int get_lcd_level_alt(void)
265{ 265{
266 unsigned long state = 0; 266 unsigned long long state = 0;
267 acpi_status status = AE_OK; 267 acpi_status status = AE_OK;
268 268
269 vdbg_printk(FUJLAPTOP_DBG_TRACE, "get lcd level via GBLS\n"); 269 vdbg_printk(FUJLAPTOP_DBG_TRACE, "get lcd level via GBLS\n");
@@ -384,7 +384,7 @@ static ssize_t store_lcd_level(struct device *dev,
384 384
385static int get_irb(void) 385static int get_irb(void)
386{ 386{
387 unsigned long state = 0; 387 unsigned long long state = 0;
388 acpi_status status = AE_OK; 388 acpi_status status = AE_OK;
389 389
390 vdbg_printk(FUJLAPTOP_DBG_TRACE, "Get irb\n"); 390 vdbg_printk(FUJLAPTOP_DBG_TRACE, "Get irb\n");
diff --git a/drivers/misc/intel_menlow.c b/drivers/misc/intel_menlow.c
index 80a136352408..bd372ea11b0a 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 a3e4705dd8f0..3baee56fa81a 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -180,7 +180,7 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv)
180 struct acpiphp_func *newfunc; 180 struct acpiphp_func *newfunc;
181 acpi_handle tmp; 181 acpi_handle tmp;
182 acpi_status status = AE_OK; 182 acpi_status status = AE_OK;
183 unsigned long adr, sun; 183 unsigned long long adr, sun;
184 int device, function, retval; 184 int device, function, retval;
185 185
186 status = acpi_evaluate_integer(handle, "_ADR", NULL, &adr); 186 status = acpi_evaluate_integer(handle, "_ADR", NULL, &adr);
@@ -528,7 +528,7 @@ find_p2p_bridge(acpi_handle handle, u32 lvl, void *context, void **rv)
528{ 528{
529 acpi_status status; 529 acpi_status status;
530 acpi_handle dummy_handle; 530 acpi_handle dummy_handle;
531 unsigned long tmp; 531 unsigned long long tmp;
532 int device, function; 532 int device, function;
533 struct pci_dev *dev; 533 struct pci_dev *dev;
534 struct pci_bus *pci_bus = context; 534 struct pci_bus *pci_bus = context;
@@ -573,7 +573,7 @@ find_p2p_bridge(acpi_handle handle, u32 lvl, void *context, void **rv)
573static int add_bridge(acpi_handle handle) 573static int add_bridge(acpi_handle handle)
574{ 574{
575 acpi_status status; 575 acpi_status status;
576 unsigned long tmp; 576 unsigned long long tmp;
577 int seg, bus; 577 int seg, bus;
578 acpi_handle dummy_handle; 578 acpi_handle dummy_handle;
579 struct pci_bus *pci_bus; 579 struct pci_bus *pci_bus;
@@ -767,7 +767,7 @@ static int get_gsi_base(acpi_handle handle, u32 *gsi_base)
767{ 767{
768 acpi_status status; 768 acpi_status status;
769 int result = -1; 769 int result = -1;
770 unsigned long gsb; 770 unsigned long long gsb;
771 struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; 771 struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
772 union acpi_object *obj; 772 union acpi_object *obj;
773 void *table; 773 void *table;
@@ -808,7 +808,7 @@ static acpi_status
808ioapic_add(acpi_handle handle, u32 lvl, void *context, void **rv) 808ioapic_add(acpi_handle handle, u32 lvl, void *context, void **rv)
809{ 809{
810 acpi_status status; 810 acpi_status status;
811 unsigned long sta; 811 unsigned long long sta;
812 acpi_handle tmp; 812 acpi_handle tmp;
813 struct pci_dev *pdev; 813 struct pci_dev *pdev;
814 u32 gsi_base; 814 u32 gsi_base;
@@ -872,7 +872,7 @@ static acpi_status
872ioapic_remove(acpi_handle handle, u32 lvl, void *context, void **rv) 872ioapic_remove(acpi_handle handle, u32 lvl, void *context, void **rv)
873{ 873{
874 acpi_status status; 874 acpi_status status;
875 unsigned long sta; 875 unsigned long long sta;
876 acpi_handle tmp; 876 acpi_handle tmp;
877 u32 gsi_base; 877 u32 gsi_base;
878 struct acpiphp_ioapic *pos, *n, *ioapic = NULL; 878 struct acpiphp_ioapic *pos, *n, *ioapic = NULL;
@@ -1264,7 +1264,7 @@ static int disable_device(struct acpiphp_slot *slot)
1264static unsigned int get_slot_status(struct acpiphp_slot *slot) 1264static unsigned int get_slot_status(struct acpiphp_slot *slot)
1265{ 1265{
1266 acpi_status status; 1266 acpi_status status;
1267 unsigned long sta = 0; 1267 unsigned long long sta = 0;
1268 u32 dvid; 1268 u32 dvid;
1269 struct list_head *l; 1269 struct list_head *l;
1270 struct acpiphp_func *func; 1270 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;