Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Lin Ming and committed by
Len Brown
439913ff aea9c04b

+87 -87
+3 -3
arch/ia64/hp/common/aml_nfw.c
··· 77 77 c->arg[4], c->arg[5], c->arg[6], c->arg[7]); 78 78 } 79 79 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) 81 81 { 82 82 switch (bit_width) { 83 83 case 8: ··· 95 95 } 96 96 } 97 97 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) 99 99 { 100 100 switch (bit_width) { 101 101 case 8: ··· 114 114 } 115 115 116 116 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, 118 118 void *region_context) 119 119 { 120 120 struct ia64_nfw_context *context = handler_context;
+3 -3
arch/x86/kernel/cpu/cpufreq/powernow-k8.c
··· 806 806 static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, 807 807 unsigned int index) 808 808 { 809 - acpi_integer control; 809 + u64 control; 810 810 811 811 if (!data->acpi_data.state_count || (cpu_family == CPU_HW_PSTATE)) 812 812 return; ··· 824 824 { 825 825 struct cpufreq_frequency_table *powernow_table; 826 826 int ret_val = -ENODEV; 827 - acpi_integer control, status; 827 + u64 control, status; 828 828 829 829 if (acpi_processor_register_performance(&data->acpi_data, data->cpu)) { 830 830 dprintk("register performance failed: bad ACPI data\n"); ··· 948 948 u32 fid; 949 949 u32 vid; 950 950 u32 freq, index; 951 - acpi_integer status, control; 951 + u64 status, control; 952 952 953 953 if (data->exttype) { 954 954 status = data->acpi_data.states[i].status;
+2 -2
drivers/acpi/battery.c
··· 324 324 strncpy(ptr, element->string.pointer, 32); 325 325 else if (element->type == ACPI_TYPE_INTEGER) { 326 326 strncpy(ptr, (u8 *)&element->integer.value, 327 - sizeof(acpi_integer)); 328 - ptr[sizeof(acpi_integer)] = 0; 327 + sizeof(u64)); 328 + ptr[sizeof(u64)] = 0; 329 329 } else 330 330 *ptr = 0; /* don't have value */ 331 331 } else {
+2 -2
drivers/acpi/ec.c
··· 589 589 590 590 static acpi_status 591 591 acpi_ec_space_handler(u32 function, acpi_physical_address address, 592 - u32 bits, acpi_integer *value, 592 + u32 bits, u64 *value, 593 593 void *handler_context, void *region_context) 594 594 { 595 595 struct acpi_ec *ec = handler_context; ··· 620 620 ++address; 621 621 if (function == ACPI_READ) { 622 622 result = acpi_ec_read(ec, address, &temp); 623 - (*value) |= ((acpi_integer)temp) << i; 623 + (*value) |= ((u64)temp) << i; 624 624 } else { 625 625 temp = 0xff & ((*value) >> i); 626 626 result = acpi_ec_write(ec, address, temp);
+2 -2
drivers/acpi/glue.c
··· 87 87 /* Get device's handler per its address under its parent */ 88 88 struct acpi_find_child { 89 89 acpi_handle handle; 90 - acpi_integer address; 90 + u64 address; 91 91 }; 92 92 93 93 static acpi_status ··· 106 106 return AE_OK; 107 107 } 108 108 109 - acpi_handle acpi_get_child(acpi_handle parent, acpi_integer address) 109 + acpi_handle acpi_get_child(acpi_handle parent, u64 address) 110 110 { 111 111 struct acpi_find_child find = { NULL, address }; 112 112
+2 -2
drivers/acpi/osl.c
··· 436 436 * Running in interpreter thread context, safe to sleep 437 437 */ 438 438 439 - void acpi_os_sleep(acpi_integer ms) 439 + void acpi_os_sleep(u64 ms) 440 440 { 441 441 schedule_timeout_interruptible(msecs_to_jiffies(ms)); 442 442 } ··· 603 603 604 604 acpi_status 605 605 acpi_os_write_pci_configuration(struct acpi_pci_id * pci_id, u32 reg, 606 - acpi_integer value, u32 width) 606 + u64 value, u32 width) 607 607 { 608 608 int result, size; 609 609
+15 -15
drivers/acpi/power_meter.c
··· 71 71 MODULE_DEVICE_TABLE(acpi, power_meter_ids); 72 72 73 73 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; 85 85 }; 86 86 87 87 struct acpi_power_meter_resource { ··· 93 93 acpi_string model_number; 94 94 acpi_string serial_number; 95 95 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; 99 99 int sensors_valid; 100 100 unsigned long sensors_last_updated; 101 101 struct sensor_device_attribute sensors[NUM_SENSORS]; ··· 402 402 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); 403 403 struct acpi_device *acpi_dev = to_acpi_device(dev); 404 404 struct acpi_power_meter_resource *resource = acpi_dev->driver_data; 405 - acpi_integer val = 0; 405 + u64 val = 0; 406 406 407 407 switch (attr->index) { 408 408 case 0:
+1 -1
drivers/acpi/processor_idle.c
··· 352 352 static int acpi_processor_get_power_info_cst(struct acpi_processor *pr) 353 353 { 354 354 acpi_status status = 0; 355 - acpi_integer count; 355 + u64 count; 356 356 int current_count; 357 357 int i; 358 358 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
+12 -12
drivers/acpi/processor_throttling.c
··· 660 660 661 661 #ifdef CONFIG_X86 662 662 static int acpi_throttling_rdmsr(struct acpi_processor *pr, 663 - acpi_integer * value) 663 + u64 *value) 664 664 { 665 665 struct cpuinfo_x86 *c; 666 666 u64 msr_high, msr_low; ··· 681 681 rdmsr_safe(MSR_IA32_THERM_CONTROL, 682 682 (u32 *)&msr_low , (u32 *) &msr_high); 683 683 msr = (msr_high << 32) | msr_low; 684 - *value = (acpi_integer) msr; 684 + *value = (u64) msr; 685 685 ret = 0; 686 686 } 687 687 return ret; 688 688 } 689 689 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) 691 691 { 692 692 struct cpuinfo_x86 *c; 693 693 unsigned int cpu; ··· 711 711 } 712 712 #else 713 713 static int acpi_throttling_rdmsr(struct acpi_processor *pr, 714 - acpi_integer * value) 714 + u64 *value) 715 715 { 716 716 printk(KERN_ERR PREFIX 717 717 "HARDWARE addr space,NOT supported yet\n"); 718 718 return -1; 719 719 } 720 720 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) 722 722 { 723 723 printk(KERN_ERR PREFIX 724 724 "HARDWARE addr space,NOT supported yet\n"); ··· 727 727 #endif 728 728 729 729 static int acpi_read_throttling_status(struct acpi_processor *pr, 730 - acpi_integer *value) 730 + u64 *value) 731 731 { 732 732 u32 bit_width, bit_offset; 733 733 u64 ptc_value; ··· 746 746 address, (u32 *) &ptc_value, 747 747 (u32) (bit_width + bit_offset)); 748 748 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); 750 750 ret = 0; 751 751 break; 752 752 case ACPI_ADR_SPACE_FIXED_HARDWARE: ··· 760 760 } 761 761 762 762 static int acpi_write_throttling_state(struct acpi_processor *pr, 763 - acpi_integer value) 763 + u64 value) 764 764 { 765 765 u32 bit_width, bit_offset; 766 766 u64 ptc_value; ··· 793 793 } 794 794 795 795 static int acpi_get_throttling_state(struct acpi_processor *pr, 796 - acpi_integer value) 796 + u64 value) 797 797 { 798 798 int i; 799 799 ··· 808 808 } 809 809 810 810 static int acpi_get_throttling_value(struct acpi_processor *pr, 811 - int state, acpi_integer *value) 811 + int state, u64 *value) 812 812 { 813 813 int ret = -1; 814 814 ··· 826 826 { 827 827 int state = 0; 828 828 int ret; 829 - acpi_integer value; 829 + u64 value; 830 830 831 831 if (!pr) 832 832 return -EINVAL; ··· 993 993 int state, bool force) 994 994 { 995 995 int ret; 996 - acpi_integer value; 996 + u64 value; 997 997 998 998 if (!pr) 999 999 return -EINVAL;
+8 -8
drivers/acpi/utils.c
··· 107 107 case ACPI_TYPE_INTEGER: 108 108 switch (format_string[i]) { 109 109 case 'N': 110 - size_required += sizeof(acpi_integer); 111 - tail_offset += sizeof(acpi_integer); 110 + size_required += sizeof(u64); 111 + tail_offset += sizeof(u64); 112 112 break; 113 113 case 'S': 114 114 size_required += 115 - sizeof(char *) + sizeof(acpi_integer) + 115 + sizeof(char *) + sizeof(u64) + 116 116 sizeof(char); 117 117 tail_offset += sizeof(char *); 118 118 break; ··· 193 193 case ACPI_TYPE_INTEGER: 194 194 switch (format_string[i]) { 195 195 case 'N': 196 - *((acpi_integer *) head) = 196 + *((u64 *) head) = 197 197 element->integer.value; 198 - head += sizeof(acpi_integer); 198 + head += sizeof(u64); 199 199 break; 200 200 case 'S': 201 201 pointer = (u8 **) head; 202 202 *pointer = tail; 203 - *((acpi_integer *) tail) = 203 + *((u64 *) tail) = 204 204 element->integer.value; 205 - head += sizeof(acpi_integer *); 206 - tail += sizeof(acpi_integer); 205 + head += sizeof(u64 *); 206 + tail += sizeof(u64); 207 207 /* NULL terminate string */ 208 208 *tail = (char)0; 209 209 tail += sizeof(char);
+1 -1
drivers/acpi/video.c
··· 759 759 static int 760 760 acpi_video_bus_DOS(struct acpi_video_bus *video, int bios_flag, int lcd_flag) 761 761 { 762 - acpi_integer status = 0; 762 + u64 status = 0; 763 763 union acpi_object arg0 = { ACPI_TYPE_INTEGER }; 764 764 struct acpi_object_list args = { 1, &arg0 }; 765 765
+2 -2
drivers/ata/libata-acpi.c
··· 64 64 WARN_ON(!(ap->flags & ATA_FLAG_ACPI_SATA)); 65 65 66 66 if (!sata_pmp_attached(ap)) { 67 - acpi_integer adr = SATA_ADR(ap->port_no, NO_PORT_MULT); 67 + u64 adr = SATA_ADR(ap->port_no, NO_PORT_MULT); 68 68 69 69 ap->link.device->acpi_handle = 70 70 acpi_get_child(ap->host->acpi_handle, adr); ··· 74 74 ap->link.device->acpi_handle = NULL; 75 75 76 76 ata_for_each_link(link, ap, EDGE) { 77 - acpi_integer adr = SATA_ADR(ap->port_no, link->pmp); 77 + u64 adr = SATA_ADR(ap->port_no, link->pmp); 78 78 79 79 link->device->acpi_handle = 80 80 acpi_get_child(ap->host->acpi_handle, adr);
+4 -4
drivers/ide/ide-acpi.c
··· 108 108 * Returns 0 on success, <0 on error. 109 109 */ 110 110 static int ide_get_dev_handle(struct device *dev, acpi_handle *handle, 111 - acpi_integer *pcidevfn) 111 + u64 *pcidevfn) 112 112 { 113 113 struct pci_dev *pdev = to_pci_dev(dev); 114 114 unsigned int bus, devnum, func; 115 - acpi_integer addr; 115 + u64 addr; 116 116 acpi_handle dev_handle; 117 117 acpi_status status; 118 118 struct acpi_device_info *dinfo = NULL; ··· 122 122 devnum = PCI_SLOT(pdev->devfn); 123 123 func = PCI_FUNC(pdev->devfn); 124 124 /* ACPI _ADR encoding for PCI bus: */ 125 - addr = (acpi_integer)(devnum << 16 | func); 125 + addr = (u64)(devnum << 16 | func); 126 126 127 127 DEBPRINT("ENTER: pci %02x:%02x.%01x\n", bus, devnum, func); 128 128 ··· 169 169 { 170 170 struct device *dev = hwif->gendev.parent; 171 171 acpi_handle uninitialized_var(dev_handle); 172 - acpi_integer pcidevfn; 172 + u64 pcidevfn; 173 173 acpi_handle chan_handle; 174 174 int err; 175 175
+1 -1
drivers/input/misc/atlas_btns.c
··· 47 47 48 48 static acpi_status acpi_atlas_button_handler(u32 function, 49 49 acpi_physical_address address, 50 - u32 bit_width, acpi_integer *value, 50 + u32 bit_width, u64 *value, 51 51 void *handler_context, void *region_context) 52 52 { 53 53 acpi_status status;
+1 -1
drivers/pci/pci-acpi.c
··· 143 143 static int acpi_pci_find_device(struct device *dev, acpi_handle *handle) 144 144 { 145 145 struct pci_dev * pci_dev; 146 - acpi_integer addr; 146 + u64 addr; 147 147 148 148 pci_dev = to_pci_dev(dev); 149 149 /* Please ref to ACPI spec for the syntax of _ADR */
+2 -2
drivers/platform/x86/toshiba_bluetooth.c
··· 57 57 static int toshiba_bluetooth_enable(acpi_handle handle) 58 58 { 59 59 acpi_status res1, res2; 60 - acpi_integer result; 60 + u64 result; 61 61 62 62 /* 63 63 * Query ACPI to verify RFKill switch is set to 'on'. ··· 95 95 static int toshiba_bt_rfkill_add(struct acpi_device *device) 96 96 { 97 97 acpi_status status; 98 - acpi_integer bt_present; 98 + u64 bt_present; 99 99 int result = -ENODEV; 100 100 101 101 /*
+2 -2
drivers/platform/x86/wmi.c
··· 796 796 */ 797 797 static acpi_status 798 798 acpi_wmi_ec_space_handler(u32 function, acpi_physical_address address, 799 - u32 bits, acpi_integer * value, 799 + u32 bits, u64 *value, 800 800 void *handler_context, void *region_context) 801 801 { 802 802 int result = 0, i = 0; ··· 813 813 814 814 if (function == ACPI_READ) { 815 815 result = ec_read(address, &temp); 816 - (*value) |= ((acpi_integer)temp) << i; 816 + (*value) |= ((u64)temp) << i; 817 817 } else { 818 818 temp = 0xff & ((*value) >> i); 819 819 result = ec_write(address, temp);
+3 -3
include/acpi/acpi_bus.h
··· 250 250 251 251 struct acpi_device_wakeup { 252 252 acpi_handle gpe_device; 253 - acpi_integer gpe_number; 254 - acpi_integer sleep_state; 253 + u64 gpe_number; 254 + u64 sleep_state; 255 255 struct acpi_handle_list resources; 256 256 struct acpi_device_wakeup_state state; 257 257 struct acpi_device_wakeup_flags flags; ··· 380 380 }; 381 381 382 382 /* helper */ 383 - acpi_handle acpi_get_child(acpi_handle, acpi_integer); 383 + acpi_handle acpi_get_child(acpi_handle, u64); 384 384 int acpi_is_root_bridge(acpi_handle); 385 385 acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int); 386 386 struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle);
+21 -21
include/acpi/processor.h
··· 92 92 /* Performance Management */ 93 93 94 94 struct acpi_psd_package { 95 - acpi_integer num_entries; 96 - acpi_integer revision; 97 - acpi_integer domain; 98 - acpi_integer coord_type; 99 - acpi_integer num_processors; 95 + u64 num_entries; 96 + u64 revision; 97 + u64 domain; 98 + u64 coord_type; 99 + u64 num_processors; 100 100 } __attribute__ ((packed)); 101 101 102 102 struct acpi_pct_register { ··· 110 110 } __attribute__ ((packed)); 111 111 112 112 struct acpi_processor_px { 113 - acpi_integer core_frequency; /* megahertz */ 114 - acpi_integer power; /* milliWatts */ 115 - acpi_integer transition_latency; /* microseconds */ 116 - acpi_integer bus_master_latency; /* microseconds */ 117 - acpi_integer control; /* control value */ 118 - acpi_integer status; /* success indicator */ 113 + u64 core_frequency; /* megahertz */ 114 + u64 power; /* milliWatts */ 115 + u64 transition_latency; /* microseconds */ 116 + u64 bus_master_latency; /* microseconds */ 117 + u64 control; /* control value */ 118 + u64 status; /* success indicator */ 119 119 }; 120 120 121 121 struct acpi_processor_performance { ··· 133 133 /* Throttling Control */ 134 134 135 135 struct acpi_tsd_package { 136 - acpi_integer num_entries; 137 - acpi_integer revision; 138 - acpi_integer domain; 139 - acpi_integer coord_type; 140 - acpi_integer num_processors; 136 + u64 num_entries; 137 + u64 revision; 138 + u64 domain; 139 + u64 coord_type; 140 + u64 num_processors; 141 141 } __attribute__ ((packed)); 142 142 143 143 struct acpi_ptc_register { ··· 151 151 } __attribute__ ((packed)); 152 152 153 153 struct acpi_processor_tx_tss { 154 - acpi_integer freqpercentage; /* */ 155 - acpi_integer power; /* milliWatts */ 156 - acpi_integer transition_latency; /* microseconds */ 157 - acpi_integer control; /* control value */ 158 - acpi_integer status; /* success indicator */ 154 + u64 freqpercentage; /* */ 155 + u64 power; /* milliWatts */ 156 + u64 transition_latency; /* microseconds */ 157 + u64 control; /* control value */ 158 + u64 status; /* success indicator */ 159 159 }; 160 160 struct acpi_processor_tx { 161 161 u16 power;