Skip to content

Commit 439913f

Browse files
Lin Minglenb
authored andcommitted
ACPI: replace acpi_integer by u64
acpi_integer is now obsolete and removed from the ACPICA code base, replaced by u64. Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
1 parent aea9c04 commit 439913f

19 files changed

Lines changed: 87 additions & 87 deletions

File tree

‎arch/ia64/hp/common/aml_nfw.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static void aml_nfw_execute(struct ia64_nfw_context *c)
7777
c->arg[4], c->arg[5], c->arg[6], c->arg[7]);
7878
}
7979

80-
static void aml_nfw_read_arg(u8 *offset, u32 bit_width, acpi_integer *value)
80+
static void aml_nfw_read_arg(u8 *offset, u32 bit_width, u64 *value)
8181
{
8282
switch (bit_width) {
8383
case 8:
@@ -95,7 +95,7 @@ static void aml_nfw_read_arg(u8 *offset, u32 bit_width, acpi_integer *value)
9595
}
9696
}
9797

98-
static void aml_nfw_write_arg(u8 *offset, u32 bit_width, acpi_integer *value)
98+
static void aml_nfw_write_arg(u8 *offset, u32 bit_width, u64 *value)
9999
{
100100
switch (bit_width) {
101101
case 8:
@@ -114,7 +114,7 @@ static void aml_nfw_write_arg(u8 *offset, u32 bit_width, acpi_integer *value)
114114
}
115115

116116
static acpi_status aml_nfw_handler(u32 function, acpi_physical_address address,
117-
u32 bit_width, acpi_integer *value, void *handler_context,
117+
u32 bit_width, u64 *value, void *handler_context,
118118
void *region_context)
119119
{
120120
struct ia64_nfw_context *context = handler_context;

‎arch/x86/kernel/cpu/cpufreq/powernow-k8.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ static int find_psb_table(struct powernow_k8_data *data)
806806
static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data,
807807
unsigned int index)
808808
{
809-
acpi_integer control;
809+
u64 control;
810810

811811
if (!data->acpi_data.state_count || (cpu_family == CPU_HW_PSTATE))
812812
return;
@@ -824,7 +824,7 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
824824
{
825825
struct cpufreq_frequency_table *powernow_table;
826826
int ret_val = -ENODEV;
827-
acpi_integer control, status;
827+
u64 control, status;
828828

829829
if (acpi_processor_register_performance(&data->acpi_data, data->cpu)) {
830830
dprintk("register performance failed: bad ACPI data\n");
@@ -948,7 +948,7 @@ static int fill_powernow_table_fidvid(struct powernow_k8_data *data,
948948
u32 fid;
949949
u32 vid;
950950
u32 freq, index;
951-
acpi_integer status, control;
951+
u64 status, control;
952952

953953
if (data->exttype) {
954954
status = data->acpi_data.states[i].status;

‎drivers/acpi/battery.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,8 @@ static int extract_package(struct acpi_battery *battery,
324324
strncpy(ptr, element->string.pointer, 32);
325325
else if (element->type == ACPI_TYPE_INTEGER) {
326326
strncpy(ptr, (u8 *)&element->integer.value,
327-
sizeof(acpi_integer));
328-
ptr[sizeof(acpi_integer)] = 0;
327+
sizeof(u64));
328+
ptr[sizeof(u64)] = 0;
329329
} else
330330
*ptr = 0; /* don't have value */
331331
} else {

‎drivers/acpi/ec.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ static u32 acpi_ec_gpe_handler(void *data)
589589

590590
static acpi_status
591591
acpi_ec_space_handler(u32 function, acpi_physical_address address,
592-
u32 bits, acpi_integer *value,
592+
u32 bits, u64 *value,
593593
void *handler_context, void *region_context)
594594
{
595595
struct acpi_ec *ec = handler_context;
@@ -620,7 +620,7 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
620620
++address;
621621
if (function == ACPI_READ) {
622622
result = acpi_ec_read(ec, address, &temp);
623-
(*value) |= ((acpi_integer)temp) << i;
623+
(*value) |= ((u64)temp) << i;
624624
} else {
625625
temp = 0xff & ((*value) >> i);
626626
result = acpi_ec_write(ec, address, temp);

‎drivers/acpi/glue.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static int acpi_find_bridge_device(struct device *dev, acpi_handle * handle)
8787
/* Get device's handler per its address under its parent */
8888
struct acpi_find_child {
8989
acpi_handle handle;
90-
acpi_integer address;
90+
u64 address;
9191
};
9292

9393
static acpi_status
@@ -106,7 +106,7 @@ do_acpi_find_child(acpi_handle handle, u32 lvl, void *context, void **rv)
106106
return AE_OK;
107107
}
108108

109-
acpi_handle acpi_get_child(acpi_handle parent, acpi_integer address)
109+
acpi_handle acpi_get_child(acpi_handle parent, u64 address)
110110
{
111111
struct acpi_find_child find = { NULL, address };
112112

‎drivers/acpi/osl.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ acpi_status acpi_os_remove_interrupt_handler(u32 irq, acpi_osd_handler handler)
436436
* Running in interpreter thread context, safe to sleep
437437
*/
438438

439-
void acpi_os_sleep(acpi_integer ms)
439+
void acpi_os_sleep(u64 ms)
440440
{
441441
schedule_timeout_interruptible(msecs_to_jiffies(ms));
442442
}
@@ -603,7 +603,7 @@ acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
603603

604604
acpi_status
605605
acpi_os_write_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
606-
acpi_integer value, u32 width)
606+
u64 value, u32 width)
607607
{
608608
int result, size;
609609

‎drivers/acpi/power_meter.c‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,17 @@ static const struct acpi_device_id power_meter_ids[] = {
7171
MODULE_DEVICE_TABLE(acpi, power_meter_ids);
7272

7373
struct acpi_power_meter_capabilities {
74-
acpi_integer flags;
75-
acpi_integer units;
76-
acpi_integer type;
77-
acpi_integer accuracy;
78-
acpi_integer sampling_time;
79-
acpi_integer min_avg_interval;
80-
acpi_integer max_avg_interval;
81-
acpi_integer hysteresis;
82-
acpi_integer configurable_cap;
83-
acpi_integer min_cap;
84-
acpi_integer max_cap;
74+
u64 flags;
75+
u64 units;
76+
u64 type;
77+
u64 accuracy;
78+
u64 sampling_time;
79+
u64 min_avg_interval;
80+
u64 max_avg_interval;
81+
u64 hysteresis;
82+
u64 configurable_cap;
83+
u64 min_cap;
84+
u64 max_cap;
8585
};
8686

8787
struct acpi_power_meter_resource {
@@ -93,9 +93,9 @@ struct acpi_power_meter_resource {
9393
acpi_string model_number;
9494
acpi_string serial_number;
9595
acpi_string oem_info;
96-
acpi_integer power;
97-
acpi_integer cap;
98-
acpi_integer avg_interval;
96+
u64 power;
97+
u64 cap;
98+
u64 avg_interval;
9999
int sensors_valid;
100100
unsigned long sensors_last_updated;
101101
struct sensor_device_attribute sensors[NUM_SENSORS];
@@ -402,7 +402,7 @@ static ssize_t show_val(struct device *dev,
402402
struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
403403
struct acpi_device *acpi_dev = to_acpi_device(dev);
404404
struct acpi_power_meter_resource *resource = acpi_dev->driver_data;
405-
acpi_integer val = 0;
405+
u64 val = 0;
406406

407407
switch (attr->index) {
408408
case 0:

‎drivers/acpi/processor_idle.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ static int acpi_processor_get_power_info_default(struct acpi_processor *pr)
352352
static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
353353
{
354354
acpi_status status = 0;
355-
acpi_integer count;
355+
u64 count;
356356
int current_count;
357357
int i;
358358
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };

‎drivers/acpi/processor_throttling.c‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ static int acpi_processor_get_throttling_fadt(struct acpi_processor *pr)
660660

661661
#ifdef CONFIG_X86
662662
static int acpi_throttling_rdmsr(struct acpi_processor *pr,
663-
acpi_integer * value)
663+
u64 *value)
664664
{
665665
struct cpuinfo_x86 *c;
666666
u64 msr_high, msr_low;
@@ -681,13 +681,13 @@ static int acpi_throttling_rdmsr(struct acpi_processor *pr,
681681
rdmsr_safe(MSR_IA32_THERM_CONTROL,
682682
(u32 *)&msr_low , (u32 *) &msr_high);
683683
msr = (msr_high << 32) | msr_low;
684-
*value = (acpi_integer) msr;
684+
*value = (u64) msr;
685685
ret = 0;
686686
}
687687
return ret;
688688
}
689689

690-
static int acpi_throttling_wrmsr(struct acpi_processor *pr, acpi_integer value)
690+
static int acpi_throttling_wrmsr(struct acpi_processor *pr, u64 value)
691691
{
692692
struct cpuinfo_x86 *c;
693693
unsigned int cpu;
@@ -711,14 +711,14 @@ static int acpi_throttling_wrmsr(struct acpi_processor *pr, acpi_integer value)
711711
}
712712
#else
713713
static int acpi_throttling_rdmsr(struct acpi_processor *pr,
714-
acpi_integer * value)
714+
u64 *value)
715715
{
716716
printk(KERN_ERR PREFIX
717717
"HARDWARE addr space,NOT supported yet\n");
718718
return -1;
719719
}
720720

721-
static int acpi_throttling_wrmsr(struct acpi_processor *pr, acpi_integer value)
721+
static int acpi_throttling_wrmsr(struct acpi_processor *pr, u64 value)
722722
{
723723
printk(KERN_ERR PREFIX
724724
"HARDWARE addr space,NOT supported yet\n");
@@ -727,7 +727,7 @@ static int acpi_throttling_wrmsr(struct acpi_processor *pr, acpi_integer value)
727727
#endif
728728

729729
static int acpi_read_throttling_status(struct acpi_processor *pr,
730-
acpi_integer *value)
730+
u64 *value)
731731
{
732732
u32 bit_width, bit_offset;
733733
u64 ptc_value;
@@ -746,7 +746,7 @@ static int acpi_read_throttling_status(struct acpi_processor *pr,
746746
address, (u32 *) &ptc_value,
747747
(u32) (bit_width + bit_offset));
748748
ptc_mask = (1 << bit_width) - 1;
749-
*value = (acpi_integer) ((ptc_value >> bit_offset) & ptc_mask);
749+
*value = (u64) ((ptc_value >> bit_offset) & ptc_mask);
750750
ret = 0;
751751
break;
752752
case ACPI_ADR_SPACE_FIXED_HARDWARE:
@@ -760,7 +760,7 @@ static int acpi_read_throttling_status(struct acpi_processor *pr,
760760
}
761761

762762
static int acpi_write_throttling_state(struct acpi_processor *pr,
763-
acpi_integer value)
763+
u64 value)
764764
{
765765
u32 bit_width, bit_offset;
766766
u64 ptc_value;
@@ -793,7 +793,7 @@ static int acpi_write_throttling_state(struct acpi_processor *pr,
793793
}
794794

795795
static int acpi_get_throttling_state(struct acpi_processor *pr,
796-
acpi_integer value)
796+
u64 value)
797797
{
798798
int i;
799799

@@ -808,7 +808,7 @@ static int acpi_get_throttling_state(struct acpi_processor *pr,
808808
}
809809

810810
static int acpi_get_throttling_value(struct acpi_processor *pr,
811-
int state, acpi_integer *value)
811+
int state, u64 *value)
812812
{
813813
int ret = -1;
814814

@@ -826,7 +826,7 @@ static int acpi_processor_get_throttling_ptc(struct acpi_processor *pr)
826826
{
827827
int state = 0;
828828
int ret;
829-
acpi_integer value;
829+
u64 value;
830830

831831
if (!pr)
832832
return -EINVAL;
@@ -993,7 +993,7 @@ static int acpi_processor_set_throttling_ptc(struct acpi_processor *pr,
993993
int state, bool force)
994994
{
995995
int ret;
996-
acpi_integer value;
996+
u64 value;
997997

998998
if (!pr)
999999
return -EINVAL;

‎drivers/acpi/utils.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,12 @@ acpi_extract_package(union acpi_object *package,
107107
case ACPI_TYPE_INTEGER:
108108
switch (format_string[i]) {
109109
case 'N':
110-
size_required += sizeof(acpi_integer);
111-
tail_offset += sizeof(acpi_integer);
110+
size_required += sizeof(u64);
111+
tail_offset += sizeof(u64);
112112
break;
113113
case 'S':
114114
size_required +=
115-
sizeof(char *) + sizeof(acpi_integer) +
115+
sizeof(char *) + sizeof(u64) +
116116
sizeof(char);
117117
tail_offset += sizeof(char *);
118118
break;
@@ -193,17 +193,17 @@ acpi_extract_package(union acpi_object *package,
193193
case ACPI_TYPE_INTEGER:
194194
switch (format_string[i]) {
195195
case 'N':
196-
*((acpi_integer *) head) =
196+
*((u64 *) head) =
197197
element->integer.value;
198-
head += sizeof(acpi_integer);
198+
head += sizeof(u64);
199199
break;
200200
case 'S':
201201
pointer = (u8 **) head;
202202
*pointer = tail;
203-
*((acpi_integer *) tail) =
203+
*((u64 *) tail) =
204204
element->integer.value;
205-
head += sizeof(acpi_integer *);
206-
tail += sizeof(acpi_integer);
205+
head += sizeof(u64 *);
206+
tail += sizeof(u64);
207207
/* NULL terminate string */
208208
*tail = (char)0;
209209
tail += sizeof(char);

0 commit comments

Comments
 (0)