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

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (28 commits)
ACPI: thermal: add DMI hooks to handle AOpen's broken Award BIOS
ACPI: thermal: create "thermal.act=" to disable or override active trip point
ACPI: thermal: create "thermal.nocrt" to disable critical actions
ACPI: thermal: create "thermal.psv=" to override passive trip points
ACPI: thermal: expose "thermal.tzp=" to set global polling frequency
ACPI: thermal: create "thermal.off=1" to disable ACPI thermal support
ACPI: thinkpad-acpi: fix sysfs paths in documentation
ACPI: static
ACPI EC: remove potential deadlock from EC
ACPI: dock: Send key=value pair instead of plain value
ACPI: bay: send envp with uevent - fix
acpi-cpufreq: Fix some x86/x86-64 acpi-cpufreq driver issues
ACPI: fix "Time Problems with 2.6.23-rc1-gf695baf2"
ACPI: thinkpad-acpi: change thinkpad-acpi input default and kconfig help
ACPI: EC: fix run-together printk lines
ACPI: sbs: remove dead code
ACPI: EC: acpi_ec_remove(): fix use-after-free
ACPI: EC: Switch from boot_ec as soon as we find its desc in DSDT.
ACPI: EC: fix build warning
ACPI: EC: If ECDT is not found, look up EC in DSDT.
...

+310 -168
+22
Documentation/kernel-parameters.txt
··· 163 163 acpi_irq_isa= [HW,ACPI] If irq_balance, mark listed IRQs used by ISA 164 164 Format: <irq>,<irq>... 165 165 166 + acpi_no_auto_ssdt [HW,ACPI] Disable automatic loading of SSDT 167 + 166 168 acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS 167 169 Format: To spoof as Windows 98: ="Microsoft Windows" 168 170 ··· 1821 1819 1822 1820 thash_entries= [KNL,NET] 1823 1821 Set number of hash buckets for TCP connection 1822 + 1823 + thermal.act= [HW,ACPI] 1824 + -1: disable all active trip points in all thermal zones 1825 + <degrees C>: override all lowest active trip points 1826 + 1827 + thermal.nocrt= [HW,ACPI] 1828 + Set to disable actions on ACPI thermal zone 1829 + critical and hot trip points. 1830 + 1831 + thermal.off= [HW,ACPI] 1832 + 1: disable ACPI thermal control 1833 + 1834 + thermal.psv= [HW,ACPI] 1835 + -1: disable all passive trip points 1836 + <degrees C>: override all passive trip points to this value 1837 + 1838 + thermal.tzp= [HW,ACPI] 1839 + Specify global default ACPI thermal zone polling rate 1840 + <deci-seconds>: poll all this frequency 1841 + 0: no polling (default) 1824 1842 1825 1843 time Show timing data prefixed to each printk message line 1826 1844 [deprecated, see 'printk.time']
+2 -2
Documentation/thinkpad-acpi.txt
··· 105 105 as a driver attribute (see below). 106 106 107 107 Sysfs driver attributes are on the driver's sysfs attribute space, 108 - for 2.6.20 this is /sys/bus/platform/drivers/thinkpad-acpi/. 108 + for 2.6.20 this is /sys/bus/platform/drivers/thinkpad_acpi/. 109 109 110 110 Sysfs device attributes are on the driver's sysfs attribute space, 111 - for 2.6.20 this is /sys/devices/platform/thinkpad-acpi/. 111 + for 2.6.20 this is /sys/devices/platform/thinkpad_acpi/. 112 112 113 113 Driver version 114 114 --------------
+15 -26
arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
··· 68 68 }; 69 69 70 70 static struct acpi_cpufreq_data *drv_data[NR_CPUS]; 71 - static struct acpi_processor_performance *acpi_perf_data[NR_CPUS]; 71 + /* acpi_perf_data is a pointer to percpu data. */ 72 + static struct acpi_processor_performance *acpi_perf_data; 72 73 73 74 static struct cpufreq_driver acpi_cpufreq_driver; 74 75 ··· 509 508 * do _PDC and _PSD and find out the processor dependency for the 510 509 * actual init that will happen later... 511 510 */ 512 - static int acpi_cpufreq_early_init(void) 511 + static int __init acpi_cpufreq_early_init(void) 513 512 { 514 - struct acpi_processor_performance *data; 515 - unsigned int i, j; 516 - 517 513 dprintk("acpi_cpufreq_early_init\n"); 518 514 519 - for_each_possible_cpu(i) { 520 - data = kzalloc(sizeof(struct acpi_processor_performance), 521 - GFP_KERNEL); 522 - if (!data) { 523 - for_each_possible_cpu(j) { 524 - kfree(acpi_perf_data[j]); 525 - acpi_perf_data[j] = NULL; 526 - } 527 - return -ENOMEM; 528 - } 529 - acpi_perf_data[i] = data; 515 + acpi_perf_data = alloc_percpu(struct acpi_processor_performance); 516 + if (!acpi_perf_data) { 517 + dprintk("Memory allocation error for acpi_perf_data.\n"); 518 + return -ENOMEM; 530 519 } 531 520 532 521 /* Do initialization in ACPI core */ ··· 565 574 566 575 dprintk("acpi_cpufreq_cpu_init\n"); 567 576 568 - if (!acpi_perf_data[cpu]) 569 - return -ENODEV; 570 - 571 577 data = kzalloc(sizeof(struct acpi_cpufreq_data), GFP_KERNEL); 572 578 if (!data) 573 579 return -ENOMEM; 574 580 575 - data->acpi_data = acpi_perf_data[cpu]; 581 + data->acpi_data = percpu_ptr(acpi_perf_data, cpu); 576 582 drv_data[cpu] = data; 577 583 578 584 if (cpu_has(c, X86_FEATURE_CONSTANT_TSC)) ··· 766 778 767 779 static int __init acpi_cpufreq_init(void) 768 780 { 781 + int ret; 782 + 769 783 dprintk("acpi_cpufreq_init\n"); 770 784 771 - acpi_cpufreq_early_init(); 785 + ret = acpi_cpufreq_early_init(); 786 + if (ret) 787 + return ret; 772 788 773 789 return cpufreq_register_driver(&acpi_cpufreq_driver); 774 790 } 775 791 776 792 static void __exit acpi_cpufreq_exit(void) 777 793 { 778 - unsigned int i; 779 794 dprintk("acpi_cpufreq_exit\n"); 780 795 781 796 cpufreq_unregister_driver(&acpi_cpufreq_driver); 782 797 783 - for_each_possible_cpu(i) { 784 - kfree(acpi_perf_data[i]); 785 - acpi_perf_data[i] = NULL; 786 - } 798 + free_percpu(acpi_perf_data); 799 + 787 800 return; 788 801 } 789 802
+1
drivers/acpi/asus_acpi.c
··· 1192 1192 break; 1193 1193 default: 1194 1194 kfree(model); 1195 + model = NULL; 1195 1196 break; 1196 1197 } 1197 1198 }
+17 -30
drivers/acpi/battery.c
··· 113 113 acpi_string oem_info; 114 114 }; 115 115 116 - enum acpi_battery_files{ 116 + enum acpi_battery_files { 117 117 ACPI_BATTERY_INFO = 0, 118 118 ACPI_BATTERY_STATE, 119 119 ACPI_BATTERY_ALARM, ··· 129 129 }; 130 130 131 131 struct acpi_battery { 132 - struct mutex mutex; 133 132 struct acpi_device *device; 134 133 struct acpi_battery_flags flags; 135 134 struct acpi_buffer bif_data; 136 135 struct acpi_buffer bst_data; 136 + struct mutex lock; 137 137 unsigned long alarm; 138 138 unsigned long update_time[ACPI_BATTERY_NUMFILES]; 139 + 139 140 }; 140 141 141 142 inline int acpi_battery_present(struct acpi_battery *battery) ··· 236 235 return 0; 237 236 238 237 /* Evaluate _BIF */ 239 - 240 - status = 241 - acpi_evaluate_object(acpi_battery_handle(battery), "_BIF", NULL, 242 - &buffer); 238 + mutex_lock(&battery->lock); 239 + status = acpi_evaluate_object(acpi_battery_handle(battery), "_BIF", 240 + NULL, &buffer); 241 + mutex_unlock(&battery->lock); 243 242 if (ACPI_FAILURE(status)) { 244 243 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BIF")); 245 244 return -ENODEV; ··· 286 285 return 0; 287 286 288 287 /* Evaluate _BST */ 289 - 290 - status = 291 - acpi_evaluate_object(acpi_battery_handle(battery), "_BST", NULL, 292 - &buffer); 288 + mutex_lock(&battery->lock); 289 + status = acpi_evaluate_object(acpi_battery_handle(battery), "_BST", 290 + NULL, &buffer); 291 + mutex_unlock(&battery->lock); 293 292 if (ACPI_FAILURE(status)) { 294 293 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BST")); 295 294 return -ENODEV; ··· 337 336 338 337 arg0.integer.value = alarm; 339 338 340 - status = 341 - acpi_evaluate_object(acpi_battery_handle(battery), "_BTP", 339 + mutex_lock(&battery->lock); 340 + status = acpi_evaluate_object(acpi_battery_handle(battery), "_BTP", 342 341 &arg_list, NULL); 342 + mutex_unlock(&battery->lock); 343 343 if (ACPI_FAILURE(status)) 344 344 return -ENODEV; 345 345 ··· 660 658 if (!battery || (count > sizeof(alarm_string) - 1)) 661 659 return -EINVAL; 662 660 663 - mutex_lock(&battery->mutex); 664 - 665 661 result = acpi_battery_update(battery, 1, &update_result); 666 662 if (result) { 667 663 result = -ENODEV; ··· 688 688 acpi_battery_check_result(battery, result); 689 689 690 690 if (!result) 691 - result = count; 692 - 693 - mutex_unlock(&battery->mutex); 691 + return count; 694 692 695 693 return result; 696 694 } ··· 712 714 int update_result = ACPI_BATTERY_NONE_UPDATE; 713 715 int update = 0; 714 716 715 - mutex_lock(&battery->mutex); 716 - 717 717 update = (get_seconds() - battery->update_time[fid] >= update_time); 718 718 update = (update | battery->flags.update[fid]); 719 719 ··· 729 733 result = acpi_read_funcs[fid].print(seq, result); 730 734 acpi_battery_check_result(battery, result); 731 735 battery->flags.update[fid] = result; 732 - mutex_unlock(&battery->mutex); 733 736 return result; 734 737 } 735 738 ··· 892 897 if (!battery) 893 898 return -ENOMEM; 894 899 895 - mutex_init(&battery->mutex); 896 - 897 - mutex_lock(&battery->mutex); 898 - 900 + mutex_init(&battery->lock); 899 901 battery->device = device; 900 902 strcpy(acpi_device_name(device), ACPI_BATTERY_DEVICE_NAME); 901 903 strcpy(acpi_device_class(device), ACPI_BATTERY_CLASS); ··· 928 936 kfree(battery); 929 937 } 930 938 931 - mutex_unlock(&battery->mutex); 932 939 933 940 return result; 934 941 } ··· 942 951 943 952 battery = acpi_driver_data(device); 944 953 945 - mutex_lock(&battery->mutex); 946 - 947 954 status = acpi_remove_notify_handler(device->handle, 948 955 ACPI_ALL_NOTIFY, 949 956 acpi_battery_notify); ··· 952 963 953 964 kfree(battery->bst_data.pointer); 954 965 955 - mutex_unlock(&battery->mutex); 956 - 957 - mutex_destroy(&battery->mutex); 966 + mutex_destroy(&battery->lock); 958 967 959 968 kfree(battery); 960 969
+1 -1
drivers/acpi/bay.c
··· 337 337 char *envp[] = { event_string, NULL }; 338 338 339 339 bay_dprintk(handle, "Bay event"); 340 - sprintf(event_string, "BAY_EVENT=%d\n", event); 340 + sprintf(event_string, "BAY_EVENT=%d", event); 341 341 kobject_uevent_env(&dev->kobj, KOBJ_CHANGE, envp); 342 342 } 343 343
+3 -3
drivers/acpi/dock.c
··· 336 336 static void dock_event(struct dock_station *ds, u32 event, int num) 337 337 { 338 338 struct device *dev = &dock_device->dev; 339 - char event_string[7]; 339 + char event_string[13]; 340 340 char *envp[] = { event_string, NULL }; 341 341 342 342 if (num == UNDOCK_EVENT) 343 - sprintf(event_string, "UNDOCK"); 343 + sprintf(event_string, "EVENT=undock"); 344 344 else 345 - sprintf(event_string, "DOCK"); 345 + sprintf(event_string, "EVENT=dock"); 346 346 347 347 /* 348 348 * Indicate that the status of the dock station has
+45 -68
drivers/acpi/ec.c
··· 471 471 } 472 472 } 473 473 mutex_unlock(&ec->lock); 474 - printk(KERN_ERR PREFIX "Handler for query 0x%x is not found!\n", value); 475 474 } 476 475 477 476 static u32 acpi_ec_gpe_handler(void *data) ··· 652 653 } 653 654 654 655 static acpi_status 655 - acpi_ec_register_query_methods(acpi_handle handle, u32 level, 656 - void *context, void **return_value) 656 + ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval) 657 657 { 658 - struct acpi_namespace_node *node = handle; 659 - struct acpi_ec *ec = context; 660 - int value = 0; 661 - if (sscanf(node->name.ascii, "_Q%x", &value) == 1) { 662 - acpi_ec_add_query_handler(ec, value, handle, NULL, NULL); 663 - } 664 - return AE_OK; 665 - } 658 + acpi_status status; 666 659 667 - static int ec_parse_device(struct acpi_ec *ec, acpi_handle handle) 668 - { 669 - if (ACPI_FAILURE(acpi_walk_resources(handle, METHOD_NAME__CRS, 670 - ec_parse_io_ports, ec))) 671 - return -EINVAL; 660 + struct acpi_ec *ec = context; 661 + status = acpi_walk_resources(handle, METHOD_NAME__CRS, 662 + ec_parse_io_ports, ec); 663 + if (ACPI_FAILURE(status)) 664 + return status; 672 665 673 666 /* Get GPE bit assignment (EC events). */ 674 667 /* TODO: Add support for _GPE returning a package */ 675 - if (ACPI_FAILURE(acpi_evaluate_integer(handle, "_GPE", NULL, &ec->gpe))) 676 - return -EINVAL; 668 + status = acpi_evaluate_integer(handle, "_GPE", NULL, &ec->gpe); 669 + if (ACPI_FAILURE(status)) 670 + return status; 677 671 678 672 /* Use the global lock for all EC transactions? */ 679 673 acpi_evaluate_integer(handle, "_GLK", NULL, &ec->global_lock); 680 674 681 - /* Find and register all query methods */ 682 - acpi_walk_namespace(ACPI_TYPE_METHOD, handle, 1, 683 - acpi_ec_register_query_methods, ec, NULL); 684 - 685 675 ec->handle = handle; 686 676 687 - printk(KERN_INFO PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx", 677 + printk(KERN_INFO PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n", 688 678 ec->gpe, ec->command_addr, ec->data_addr); 689 679 690 - return 0; 680 + return AE_CTRL_TERMINATE; 681 + } 682 + 683 + static void ec_remove_handlers(struct acpi_ec *ec) 684 + { 685 + acpi_remove_address_space_handler(ec->handle, 686 + ACPI_ADR_SPACE_EC, 687 + &acpi_ec_space_handler); 688 + acpi_remove_gpe_handler(NULL, ec->gpe, &acpi_ec_gpe_handler); 691 689 } 692 690 693 691 static int acpi_ec_add(struct acpi_device *device) ··· 701 705 if (!ec) 702 706 return -ENOMEM; 703 707 704 - if (ec_parse_device(ec, device->handle)) { 708 + if (ec_parse_device(device->handle, 0, ec, NULL) != 709 + AE_CTRL_TERMINATE) { 705 710 kfree(ec); 706 711 return -EINVAL; 707 712 } ··· 710 713 /* Check if we found the boot EC */ 711 714 if (boot_ec) { 712 715 if (boot_ec->gpe == ec->gpe) { 713 - /* We might have incorrect info for GL at boot time */ 714 - mutex_lock(&boot_ec->lock); 715 - boot_ec->global_lock = ec->global_lock; 716 - /* Copy handlers from new ec into boot ec */ 717 - list_splice(&ec->list, &boot_ec->list); 718 - mutex_unlock(&boot_ec->lock); 719 - kfree(ec); 720 - ec = boot_ec; 716 + ec_remove_handlers(boot_ec); 717 + mutex_destroy(&boot_ec->lock); 718 + kfree(boot_ec); 719 + first_ec = boot_ec = NULL; 721 720 } 722 - } else 721 + } 722 + if (!first_ec) 723 723 first_ec = ec; 724 724 ec->handle = device->handle; 725 725 acpi_driver_data(device) = ec; ··· 728 734 static int acpi_ec_remove(struct acpi_device *device, int type) 729 735 { 730 736 struct acpi_ec *ec; 731 - struct acpi_ec_query_handler *handler; 737 + struct acpi_ec_query_handler *handler, *tmp; 732 738 733 739 if (!device) 734 740 return -EINVAL; 735 741 736 742 ec = acpi_driver_data(device); 737 743 mutex_lock(&ec->lock); 738 - list_for_each_entry(handler, &ec->list, node) { 744 + list_for_each_entry_safe(handler, tmp, &ec->list, node) { 739 745 list_del(&handler->node); 740 746 kfree(handler); 741 747 } ··· 745 751 if (ec == first_ec) 746 752 first_ec = NULL; 747 753 748 - /* Don't touch boot EC */ 749 - if (boot_ec != ec) 750 - kfree(ec); 751 754 return 0; 752 755 } 753 756 ··· 808 817 if (!ec) 809 818 return -EINVAL; 810 819 811 - /* Boot EC is already working */ 812 - if (ec != boot_ec) 813 - ret = ec_install_handlers(ec); 820 + ret = ec_install_handlers(ec); 814 821 815 822 /* EC is fully operational, allow queries */ 816 823 atomic_set(&ec->query_pending, 0); ··· 818 829 819 830 static int acpi_ec_stop(struct acpi_device *device, int type) 820 831 { 821 - acpi_status status; 822 832 struct acpi_ec *ec; 823 833 824 834 if (!device) ··· 826 838 ec = acpi_driver_data(device); 827 839 if (!ec) 828 840 return -EINVAL; 829 - 830 - /* Don't touch boot EC */ 831 - if (ec == boot_ec) 832 - return 0; 833 - 834 - status = acpi_remove_address_space_handler(ec->handle, 835 - ACPI_ADR_SPACE_EC, 836 - &acpi_ec_space_handler); 837 - if (ACPI_FAILURE(status)) 838 - return -ENODEV; 839 - 840 - status = acpi_remove_gpe_handler(NULL, ec->gpe, &acpi_ec_gpe_handler); 841 - if (ACPI_FAILURE(status)) 842 - return -ENODEV; 843 - 841 + ec_remove_handlers(ec); 844 842 return 0; 845 843 } 846 844 ··· 842 868 /* 843 869 * Generate a boot ec context 844 870 */ 845 - 846 871 status = acpi_get_table(ACPI_SIG_ECDT, 1, 847 872 (struct acpi_table_header **)&ecdt_ptr); 848 - if (ACPI_FAILURE(status)) 849 - goto error; 850 - 851 - printk(KERN_INFO PREFIX "EC description table is found, configuring boot EC\n"); 852 - 853 - boot_ec->command_addr = ecdt_ptr->control.address; 854 - boot_ec->data_addr = ecdt_ptr->data.address; 855 - boot_ec->gpe = ecdt_ptr->gpe; 856 - boot_ec->handle = ACPI_ROOT_OBJECT; 873 + if (ACPI_SUCCESS(status)) { 874 + printk(KERN_INFO PREFIX "EC description table is found, configuring boot EC\n\n"); 875 + boot_ec->command_addr = ecdt_ptr->control.address; 876 + boot_ec->data_addr = ecdt_ptr->data.address; 877 + boot_ec->gpe = ecdt_ptr->gpe; 878 + boot_ec->handle = ACPI_ROOT_OBJECT; 879 + } else { 880 + printk(KERN_DEBUG PREFIX "Look up EC in DSDT\n"); 881 + status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device, 882 + boot_ec, NULL); 883 + if (ACPI_FAILURE(status)) 884 + goto error; 885 + } 857 886 858 887 ret = ec_install_handlers(boot_ec); 859 888 if (!ret) {
+1 -1
drivers/acpi/event.c
··· 108 108 }; 109 109 110 110 #ifdef CONFIG_NET 111 - unsigned int acpi_event_seqnum; 111 + static unsigned int acpi_event_seqnum; 112 112 struct acpi_genl_event { 113 113 acpi_device_class device_class; 114 114 char bus_id[15];
+10 -4
drivers/acpi/processor_idle.c
··· 969 969 } 970 970 971 971 if (pr->flags.bm_check) { 972 - /* bus mastering control is necessary */ 973 972 if (!pr->flags.bm_control) { 974 - /* In this case we enter C3 without bus mastering */ 975 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 976 - "C3 support without bus mastering control\n")); 973 + if (pr->flags.has_cst != 1) { 974 + /* bus mastering control is necessary */ 975 + ACPI_DEBUG_PRINT((ACPI_DB_INFO, 976 + "C3 support requires BM control\n")); 977 + return; 978 + } else { 979 + /* Here we enter C3 without bus mastering */ 980 + ACPI_DEBUG_PRINT((ACPI_DB_INFO, 981 + "C3 support without BM control\n")); 982 + } 977 983 } 978 984 } else { 979 985 /*
+3 -3
drivers/acpi/processor_perflib.c
··· 539 539 } 540 540 541 541 int acpi_processor_preregister_performance( 542 - struct acpi_processor_performance **performance) 542 + struct acpi_processor_performance *performance) 543 543 { 544 544 int count, count_target; 545 545 int retval = 0; ··· 567 567 continue; 568 568 } 569 569 570 - if (!performance || !performance[i]) { 570 + if (!performance || !percpu_ptr(performance, i)) { 571 571 retval = -EINVAL; 572 572 continue; 573 573 } 574 574 575 - pr->performance = performance[i]; 575 + pr->performance = percpu_ptr(performance, i); 576 576 cpu_set(i, pr->performance->shared_cpu_map); 577 577 if (acpi_processor_get_psd(pr)) { 578 578 retval = -EINVAL;
+1 -5
drivers/acpi/sbs.c
··· 1415 1415 char dir_name[32]; 1416 1416 int do_battery_init = 0, do_ac_init = 0; 1417 1417 int old_remaining_capacity = 0; 1418 - int update_ac = 1, update_battery = 1; 1418 + int update_battery = 1; 1419 1419 int up_tm = update_time; 1420 1420 1421 1421 if (sbs_zombie(sbs)) { ··· 1434 1434 } 1435 1435 1436 1436 sbs->run_cnt++; 1437 - 1438 - if (!update_ac && !update_battery) { 1439 - goto end; 1440 - } 1441 1437 1442 1438 old_ac_present = sbs->ac.ac_present; 1443 1439
+23
drivers/acpi/tables/tbxface.c
··· 52 52 /* Local prototypes */ 53 53 static acpi_status acpi_tb_load_namespace(void); 54 54 55 + static int no_auto_ssdt; 56 + 55 57 /******************************************************************************* 56 58 * 57 59 * FUNCTION: acpi_allocate_root_table ··· 538 536 539 537 ACPI_INFO((AE_INFO, "Table DSDT replaced by host OS")); 540 538 acpi_tb_print_table_header(0, table); 539 + 540 + if (no_auto_ssdt == 0) { 541 + printk(KERN_WARNING "ACPI: DSDT override uses original SSDTs unless \"acpi_no_auto_ssdt\""); 542 + } 541 543 } 542 544 543 545 status = ··· 580 574 || 581 575 ACPI_FAILURE(acpi_tb_verify_table 582 576 (&acpi_gbl_root_table_list.tables[i]))) { 577 + continue; 578 + } 579 + 580 + if (no_auto_ssdt) { 581 + printk(KERN_WARNING "ACPI: SSDT ignored due to \"acpi_no_auto_ssdt\"\n"); 583 582 continue; 584 583 } 585 584 ··· 633 622 } 634 623 635 624 ACPI_EXPORT_SYMBOL(acpi_load_tables) 625 + 626 + 627 + static int __init acpi_no_auto_ssdt_setup(char *s) { 628 + 629 + printk(KERN_NOTICE "ACPI: SSDT auto-load disabled\n"); 630 + 631 + no_auto_ssdt = 1; 632 + 633 + return 1; 634 + } 635 + 636 + __setup("acpi_no_auto_ssdt", acpi_no_auto_ssdt_setup);
+129 -14
drivers/acpi/thermal.c
··· 33 33 34 34 #include <linux/kernel.h> 35 35 #include <linux/module.h> 36 + #include <linux/dmi.h> 36 37 #include <linux/init.h> 37 38 #include <linux/types.h> 38 39 #include <linux/proc_fs.h> ··· 75 74 MODULE_DESCRIPTION("ACPI Thermal Zone Driver"); 76 75 MODULE_LICENSE("GPL"); 77 76 77 + static int act; 78 + module_param(act, int, 0644); 79 + MODULE_PARM_DESC(act, "Disable or override all lowest active trip points.\n"); 80 + 78 81 static int tzp; 79 - module_param(tzp, int, 0); 82 + module_param(tzp, int, 0444); 80 83 MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds.\n"); 84 + 85 + static int nocrt; 86 + module_param(nocrt, int, 0); 87 + MODULE_PARM_DESC(nocrt, "Set to disable action on ACPI thermal zone critical and hot trips.\n"); 88 + 89 + static int off; 90 + module_param(off, int, 0); 91 + MODULE_PARM_DESC(off, "Set to disable ACPI thermal support.\n"); 92 + 93 + static int psv; 94 + module_param(psv, int, 0644); 95 + MODULE_PARM_DESC(psv, "Disable or override all passive trip points.\n"); 81 96 82 97 static int acpi_thermal_add(struct acpi_device *device); 83 98 static int acpi_thermal_remove(struct acpi_device *device, int type); ··· 356 339 357 340 /* Passive: Processors (optional) */ 358 341 359 - status = 360 - acpi_evaluate_integer(tz->device->handle, "_PSV", NULL, 361 - &tz->trips.passive.temperature); 342 + if (psv == -1) { 343 + status = AE_SUPPORT; 344 + } else if (psv > 0) { 345 + tz->trips.passive.temperature = CELSIUS_TO_KELVIN(psv); 346 + status = AE_OK; 347 + } else { 348 + status = acpi_evaluate_integer(tz->device->handle, 349 + "_PSV", NULL, &tz->trips.passive.temperature); 350 + } 351 + 362 352 if (ACPI_FAILURE(status)) { 363 353 tz->trips.passive.flags.valid = 0; 364 354 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No passive threshold\n")); ··· 410 386 411 387 char name[5] = { '_', 'A', 'C', ('0' + i), '\0' }; 412 388 413 - status = 414 - acpi_evaluate_integer(tz->device->handle, name, NULL, 415 - &tz->trips.active[i].temperature); 416 - if (ACPI_FAILURE(status)) 389 + if (act == -1) 390 + break; /* disable all active trip points */ 391 + 392 + status = acpi_evaluate_integer(tz->device->handle, 393 + name, NULL, &tz->trips.active[i].temperature); 394 + 395 + if (ACPI_FAILURE(status)) { 396 + if (i == 0) /* no active trip points */ 397 + break; 398 + if (act <= 0) /* no override requested */ 399 + break; 400 + if (i == 1) { /* 1 trip point */ 401 + tz->trips.active[0].temperature = 402 + CELSIUS_TO_KELVIN(act); 403 + } else { /* multiple trips */ 404 + /* 405 + * Don't allow override higher than 406 + * the next higher trip point 407 + */ 408 + tz->trips.active[i - 1].temperature = 409 + (tz->trips.active[i - 2].temperature < 410 + CELSIUS_TO_KELVIN(act) ? 411 + tz->trips.active[i - 2].temperature : 412 + CELSIUS_TO_KELVIN(act)); 413 + } 417 414 break; 415 + } 418 416 419 417 name[2] = 'L'; 420 418 status = ··· 473 427 474 428 static int acpi_thermal_critical(struct acpi_thermal *tz) 475 429 { 476 - if (!tz || !tz->trips.critical.flags.valid) 430 + if (!tz || !tz->trips.critical.flags.valid || nocrt) 477 431 return -EINVAL; 478 432 479 433 if (tz->temperature >= tz->trips.critical.temperature) { ··· 495 449 496 450 static int acpi_thermal_hot(struct acpi_thermal *tz) 497 451 { 498 - if (!tz || !tz->trips.hot.flags.valid) 452 + if (!tz || !tz->trips.hot.flags.valid || nocrt) 499 453 return -EINVAL; 500 454 501 455 if (tz->temperature >= tz->trips.hot.temperature) { ··· 870 824 goto end; 871 825 872 826 if (tz->trips.critical.flags.valid) 873 - seq_printf(seq, "critical (S5): %ld C\n", 874 - KELVIN_TO_CELSIUS(tz->trips.critical.temperature)); 827 + seq_printf(seq, "critical (S5): %ld C%s", 828 + KELVIN_TO_CELSIUS(tz->trips.critical.temperature), 829 + nocrt ? " <disabled>\n" : "\n"); 875 830 876 831 if (tz->trips.hot.flags.valid) 877 - seq_printf(seq, "hot (S4): %ld C\n", 878 - KELVIN_TO_CELSIUS(tz->trips.hot.temperature)); 832 + seq_printf(seq, "hot (S4): %ld C%s", 833 + KELVIN_TO_CELSIUS(tz->trips.hot.temperature), 834 + nocrt ? " <disabled>\n" : "\n"); 879 835 880 836 if (tz->trips.passive.flags.valid) { 881 837 seq_printf(seq, ··· 1329 1281 return AE_OK; 1330 1282 } 1331 1283 1284 + #ifdef CONFIG_DMI 1285 + static int thermal_act(struct dmi_system_id *d) { 1286 + 1287 + if (act == 0) { 1288 + printk(KERN_NOTICE "ACPI: %s detected: " 1289 + "disabling all active thermal trip points\n", d->ident); 1290 + act = -1; 1291 + } 1292 + return 0; 1293 + } 1294 + static int thermal_tzp(struct dmi_system_id *d) { 1295 + 1296 + if (tzp == 0) { 1297 + printk(KERN_NOTICE "ACPI: %s detected: " 1298 + "enabling thermal zone polling\n", d->ident); 1299 + tzp = 300; /* 300 dS = 30 Seconds */ 1300 + } 1301 + return 0; 1302 + } 1303 + static int thermal_psv(struct dmi_system_id *d) { 1304 + 1305 + if (psv == 0) { 1306 + printk(KERN_NOTICE "ACPI: %s detected: " 1307 + "disabling all passive thermal trip points\n", d->ident); 1308 + psv = -1; 1309 + } 1310 + return 0; 1311 + } 1312 + 1313 + static struct dmi_system_id thermal_dmi_table[] __initdata = { 1314 + /* 1315 + * Award BIOS on this AOpen makes thermal control almost worthless. 1316 + * http://bugzilla.kernel.org/show_bug.cgi?id=8842 1317 + */ 1318 + { 1319 + .callback = thermal_act, 1320 + .ident = "AOpen i915GMm-HFS", 1321 + .matches = { 1322 + DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"), 1323 + DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"), 1324 + }, 1325 + }, 1326 + { 1327 + .callback = thermal_psv, 1328 + .ident = "AOpen i915GMm-HFS", 1329 + .matches = { 1330 + DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"), 1331 + DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"), 1332 + }, 1333 + }, 1334 + { 1335 + .callback = thermal_tzp, 1336 + .ident = "AOpen i915GMm-HFS", 1337 + .matches = { 1338 + DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"), 1339 + DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"), 1340 + }, 1341 + }, 1342 + {} 1343 + }; 1344 + #endif /* CONFIG_DMI */ 1345 + 1332 1346 static int __init acpi_thermal_init(void) 1333 1347 { 1334 1348 int result = 0; 1335 1349 1350 + dmi_check_system(thermal_dmi_table); 1336 1351 1352 + if (off) { 1353 + printk(KERN_NOTICE "ACPI: thermal control disabled\n"); 1354 + return -ENODEV; 1355 + } 1337 1356 acpi_thermal_dir = proc_mkdir(ACPI_THERMAL_CLASS, acpi_root_dir); 1338 1357 if (!acpi_thermal_dir) 1339 1358 return -ENODEV;
+6 -1
drivers/char/sonypi.c
··· 1147 1147 return 0; 1148 1148 } 1149 1149 1150 + const static struct acpi_device_id sonypi_device_ids[] = { 1151 + {"SNY6001", 0}, 1152 + {"", 0}, 1153 + }; 1154 + 1150 1155 static struct acpi_driver sonypi_acpi_driver = { 1151 1156 .name = "sonypi", 1152 1157 .class = "hkey", 1153 - .ids = "SNY6001", 1158 + .ids = sonypi_device_ids, 1154 1159 .ops = { 1155 1160 .add = sonypi_acpi_add, 1156 1161 .remove = sonypi_acpi_remove,
+14 -6
drivers/misc/Kconfig
··· 200 200 config THINKPAD_ACPI_INPUT_ENABLED 201 201 bool "Enable input layer support by default" 202 202 depends on THINKPAD_ACPI 203 - default y 203 + default n 204 204 ---help--- 205 - Enables hot key handling over the input layer by default. If unset, 206 - the driver does not enable any hot key handling by default, and also 207 - starts up with a mostly empty keymap. 205 + This option enables thinkpad-acpi hot key handling over the input 206 + layer at driver load time. When it is unset, the driver does not 207 + enable hot key handling by default, and also starts up with a mostly 208 + empty keymap. 208 209 209 - If you are not sure, say Y here. Say N to retain the deprecated 210 - behavior of ibm-acpi, and thinkpad-acpi for kernels up to 2.6.21. 210 + This option should be enabled if you have a new enough HAL or other 211 + userspace support that properly handles the thinkpad-acpi event 212 + device. It auto-tunes the hot key support to those reported by the 213 + firmware and enables it automatically. 214 + 215 + If unsure, say N here to retain the old behaviour of ibm-acpi, and 216 + thinkpad-acpi up to kernel 2.6.21: userspace will have to enable and 217 + set up the thinkpad-acpi hot key handling using the sysfs interace 218 + after loading the driver. 211 219 212 220 213 221 endif # MISC_DEVICES
+6 -1
drivers/misc/sony-laptop.c
··· 845 845 }; 846 846 847 847 /* SNC-only model map */ 848 - struct dmi_system_id sony_nc_ids[] = { 848 + static struct dmi_system_id sony_nc_ids[] = { 849 849 { 850 850 .ident = "Sony Vaio FE Series", 851 851 .callback = sony_nc_C_enable, ··· 941 941 break; 942 942 } 943 943 } 944 + 945 + /* set the last requested brightness level */ 946 + if (sony_backlight_device && 947 + !sony_backlight_update_status(sony_backlight_device)) 948 + printk(KERN_WARNING DRV_PFX "unable to restore brightness level"); 944 949 945 950 /* re-initialize models with specific requirements */ 946 951 dmi_check_system(sony_nc_ids);
+8 -2
drivers/misc/thinkpad_acpi.c
··· 4668 4668 thinkpad_acpi_module_exit(); 4669 4669 return ret; 4670 4670 } 4671 + tp_features.platform_drv_registered = 1; 4672 + 4671 4673 ret = tpacpi_create_driver_attributes(&tpacpi_pdriver.driver); 4672 4674 if (ret) { 4673 4675 printk(IBM_ERR "unable to create sysfs driver attributes\n"); 4674 4676 thinkpad_acpi_module_exit(); 4675 4677 return ret; 4676 4678 } 4679 + tp_features.platform_drv_attrs_registered = 1; 4677 4680 4678 4681 4679 4682 /* Device initialization */ ··· 4759 4756 if (tpacpi_pdev) 4760 4757 platform_device_unregister(tpacpi_pdev); 4761 4758 4762 - tpacpi_remove_driver_attributes(&tpacpi_pdriver.driver); 4763 - platform_driver_unregister(&tpacpi_pdriver); 4759 + if (tp_features.platform_drv_attrs_registered) 4760 + tpacpi_remove_driver_attributes(&tpacpi_pdriver.driver); 4761 + 4762 + if (tp_features.platform_drv_registered) 4763 + platform_driver_unregister(&tpacpi_pdriver); 4764 4764 4765 4765 if (proc_dir) 4766 4766 remove_proc_entry(IBM_PROC_DIR, acpi_root_dir);
+2
drivers/misc/thinkpad_acpi.h
··· 246 246 u16 wan:1; 247 247 u16 fan_ctrl_status_undef:1; 248 248 u16 input_device_registered:1; 249 + u16 platform_drv_registered:1; 250 + u16 platform_drv_attrs_registered:1; 249 251 } tp_features; 250 252 251 253 struct thinkpad_id_data {
+1 -1
include/acpi/processor.h
··· 232 232 233 233 extern int acpi_processor_preregister_performance(struct 234 234 acpi_processor_performance 235 - **performance); 235 + *performance); 236 236 237 237 extern int acpi_processor_register_performance(struct acpi_processor_performance 238 238 *performance, unsigned int cpu);