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:
ACPI: invoke DSDT corruption workaround on all Toshiba Satellite
ACPI, APEI, Fix ERST MOVE_DATA instruction implementation
ACPI: fan: Fix more unbalanced code block
ACPI: acpi_pad: simplify code to avoid false gcc build warning
ACPI, APEI, Fix error path for memory allocation
ACPI, APEI, HEST Fix the unsuitable usage of platform_data
ACPI, APEI, Fix acpi_pre_map() return value
ACPI, APEI, Fix APEI related table size checking
ACPI: Disable Windows Vista compatibility for Toshiba P305D
ACPI: Kconfig: fix typo.
ACPI: add missing __percpu markup in arch/x86/kernel/acpi/cstate.c
ACPI: Fix typos
ACPI video: fix a poor warning message
ACPI: fix build warnings resulting from merge window conflict
ACPI: EC: add Vista incompatibility DMI entry for Toshiba Satellite L355
ACPI: expand Vista blacklist to include SP1 and SP2
ACPI: delete ZEPTO idle=nomwait DMI quirk
ACPI: enable repeated PCIEXP wakeup by clearing PCIEXP_WAKE_STS on resume
PM / ACPI: Blacklist systems known to require acpi_sleep=nonvs
ACPI: Don't report current_now if battery reports in mWh

+153 -76
+1 -1
arch/x86/kernel/acpi/cstate.c
··· 61 61 unsigned int ecx; 62 62 } states[ACPI_PROCESSOR_MAX_POWER]; 63 63 }; 64 - static struct cstate_entry *cpu_cstate_entry; /* per CPU ptr */ 64 + static struct cstate_entry __percpu *cpu_cstate_entry; /* per CPU ptr */ 65 65 66 66 static short mwait_supported[ACPI_PROCESSOR_MAX_POWER]; 67 67
+1 -1
drivers/acpi/Kconfig
··· 105 105 106 106 Be aware that using this interface can confuse your Embedded 107 107 Controller in a way that a normal reboot is not enough. You then 108 - have to power of your system, and remove the laptop battery for 108 + have to power off your system, and remove the laptop battery for 109 109 some seconds. 110 110 An Embedded Controller typically is available on laptops and reads 111 111 sensor values like battery state and temperature.
+18 -16
drivers/acpi/acpi_pad.c
··· 382 382 device_remove_file(&device->dev, &dev_attr_rrtime); 383 383 } 384 384 385 - /* Query firmware how many CPUs should be idle */ 386 - static int acpi_pad_pur(acpi_handle handle, int *num_cpus) 385 + /* 386 + * Query firmware how many CPUs should be idle 387 + * return -1 on failure 388 + */ 389 + static int acpi_pad_pur(acpi_handle handle) 387 390 { 388 391 struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; 389 392 union acpi_object *package; 390 - int rev, num, ret = -EINVAL; 393 + int num = -1; 391 394 392 395 if (ACPI_FAILURE(acpi_evaluate_object(handle, "_PUR", NULL, &buffer))) 393 - return -EINVAL; 396 + return num; 394 397 395 398 if (!buffer.length || !buffer.pointer) 396 - return -EINVAL; 399 + return num; 397 400 398 401 package = buffer.pointer; 399 - if (package->type != ACPI_TYPE_PACKAGE || package->package.count != 2) 400 - goto out; 401 - rev = package->package.elements[0].integer.value; 402 - num = package->package.elements[1].integer.value; 403 - if (rev != 1 || num < 0) 404 - goto out; 405 - *num_cpus = num; 406 - ret = 0; 407 - out: 402 + 403 + if (package->type == ACPI_TYPE_PACKAGE && 404 + package->package.count == 2 && 405 + package->package.elements[0].integer.value == 1) /* rev 1 */ 406 + 407 + num = package->package.elements[1].integer.value; 408 + 408 409 kfree(buffer.pointer); 409 - return ret; 410 + return num; 410 411 } 411 412 412 413 /* Notify firmware how many CPUs are idle */ ··· 434 433 uint32_t idle_cpus; 435 434 436 435 mutex_lock(&isolated_cpus_lock); 437 - if (acpi_pad_pur(handle, &num_cpus)) { 436 + num_cpus = acpi_pad_pur(handle); 437 + if (num_cpus < 0) { 438 438 mutex_unlock(&isolated_cpus_lock); 439 439 return; 440 440 }
+1
drivers/acpi/acpica/aclocal.h
··· 854 854 ACPI_BITMASK_POWER_BUTTON_STATUS | \ 855 855 ACPI_BITMASK_SLEEP_BUTTON_STATUS | \ 856 856 ACPI_BITMASK_RT_CLOCK_STATUS | \ 857 + ACPI_BITMASK_PCIEXP_WAKE_DISABLE | \ 857 858 ACPI_BITMASK_WAKE_STATUS) 858 859 859 860 #define ACPI_BITMASK_TIMER_ENABLE 0x0001
+1 -1
drivers/acpi/acpica/exutils.c
··· 109 109 * 110 110 * DESCRIPTION: Reacquire the interpreter execution region from within the 111 111 * interpreter code. Failure to enter the interpreter region is a 112 - * fatal system error. Used in conjuction with 112 + * fatal system error. Used in conjunction with 113 113 * relinquish_interpreter 114 114 * 115 115 ******************************************************************************/
+1 -1
drivers/acpi/acpica/rsutils.c
··· 149 149 150 150 /* 151 151 * 16-, 32-, and 64-bit cases must use the move macros that perform 152 - * endian conversion and/or accomodate hardware that cannot perform 152 + * endian conversion and/or accommodate hardware that cannot perform 153 153 * misaligned memory transfers 154 154 */ 155 155 case ACPI_RSC_MOVE16:
+1 -1
drivers/acpi/apei/Kconfig
··· 34 34 depends on ACPI_APEI 35 35 help 36 36 ERST is a way provided by APEI to save and retrieve hardware 37 - error infomation to and from a persistent store. Enable this 37 + error information to and from a persistent store. Enable this 38 38 if you want to debugging and testing the ERST kernel support 39 39 and firmware implementation.
+16 -5
drivers/acpi/apei/apei-base.c
··· 445 445 int apei_resources_request(struct apei_resources *resources, 446 446 const char *desc) 447 447 { 448 - struct apei_res *res, *res_bak; 448 + struct apei_res *res, *res_bak = NULL; 449 449 struct resource *r; 450 + int rc; 450 451 451 - apei_resources_sub(resources, &apei_resources_all); 452 + rc = apei_resources_sub(resources, &apei_resources_all); 453 + if (rc) 454 + return rc; 452 455 456 + rc = -EINVAL; 453 457 list_for_each_entry(res, &resources->iomem, list) { 454 458 r = request_mem_region(res->start, res->end - res->start, 455 459 desc); ··· 479 475 } 480 476 } 481 477 482 - apei_resources_merge(&apei_resources_all, resources); 478 + rc = apei_resources_merge(&apei_resources_all, resources); 479 + if (rc) { 480 + pr_err(APEI_PFX "Fail to merge resources!\n"); 481 + goto err_unmap_ioport; 482 + } 483 483 484 484 return 0; 485 485 err_unmap_ioport: ··· 499 491 break; 500 492 release_mem_region(res->start, res->end - res->start); 501 493 } 502 - return -EINVAL; 494 + return rc; 503 495 } 504 496 EXPORT_SYMBOL_GPL(apei_resources_request); 505 497 506 498 void apei_resources_release(struct apei_resources *resources) 507 499 { 500 + int rc; 508 501 struct apei_res *res; 509 502 510 503 list_for_each_entry(res, &resources->iomem, list) ··· 513 504 list_for_each_entry(res, &resources->ioport, list) 514 505 release_region(res->start, res->end - res->start); 515 506 516 - apei_resources_sub(&apei_resources_all, resources); 507 + rc = apei_resources_sub(&apei_resources_all, resources); 508 + if (rc) 509 + pr_err(APEI_PFX "Fail to sub resources!\n"); 517 510 } 518 511 EXPORT_SYMBOL_GPL(apei_resources_release); 519 512
+3 -1
drivers/acpi/apei/einj.c
··· 426 426 427 427 static int einj_check_table(struct acpi_table_einj *einj_tab) 428 428 { 429 - if (einj_tab->header_length != sizeof(struct acpi_table_einj)) 429 + if ((einj_tab->header_length != 430 + (sizeof(struct acpi_table_einj) - sizeof(einj_tab->header))) 431 + && (einj_tab->header_length != sizeof(struct acpi_table_einj))) 430 432 return -EINVAL; 431 433 if (einj_tab->header.length < sizeof(struct acpi_table_einj)) 432 434 return -EINVAL;
+11 -7
drivers/acpi/apei/erst-dbg.c
··· 2 2 * APEI Error Record Serialization Table debug support 3 3 * 4 4 * ERST is a way provided by APEI to save and retrieve hardware error 5 - * infomation to and from a persistent store. This file provide the 5 + * information to and from a persistent store. This file provide the 6 6 * debugging/testing support for ERST kernel support and firmware 7 7 * implementation. 8 8 * ··· 111 111 goto out; 112 112 } 113 113 if (len > erst_dbg_buf_len) { 114 - kfree(erst_dbg_buf); 114 + void *p; 115 115 rc = -ENOMEM; 116 - erst_dbg_buf = kmalloc(len, GFP_KERNEL); 117 - if (!erst_dbg_buf) 116 + p = kmalloc(len, GFP_KERNEL); 117 + if (!p) 118 118 goto out; 119 + kfree(erst_dbg_buf); 120 + erst_dbg_buf = p; 119 121 erst_dbg_buf_len = len; 120 122 goto retry; 121 123 } ··· 152 150 if (mutex_lock_interruptible(&erst_dbg_mutex)) 153 151 return -EINTR; 154 152 if (usize > erst_dbg_buf_len) { 155 - kfree(erst_dbg_buf); 153 + void *p; 156 154 rc = -ENOMEM; 157 - erst_dbg_buf = kmalloc(usize, GFP_KERNEL); 158 - if (!erst_dbg_buf) 155 + p = kmalloc(usize, GFP_KERNEL); 156 + if (!p) 159 157 goto out; 158 + kfree(erst_dbg_buf); 159 + erst_dbg_buf = p; 160 160 erst_dbg_buf_len = usize; 161 161 } 162 162 rc = copy_from_user(erst_dbg_buf, ubuf, usize);
+24 -5
drivers/acpi/apei/erst.c
··· 2 2 * APEI Error Record Serialization Table support 3 3 * 4 4 * ERST is a way provided by APEI to save and retrieve hardware error 5 - * infomation to and from a persistent store. 5 + * information to and from a persistent store. 6 6 * 7 7 * For more information about ERST, please refer to ACPI Specification 8 8 * version 4.0, section 17.4. ··· 266 266 { 267 267 int rc; 268 268 u64 offset; 269 + void *src, *dst; 270 + 271 + /* ioremap does not work in interrupt context */ 272 + if (in_interrupt()) { 273 + pr_warning(ERST_PFX 274 + "MOVE_DATA can not be used in interrupt context"); 275 + return -EBUSY; 276 + } 269 277 270 278 rc = __apei_exec_read_register(entry, &offset); 271 279 if (rc) 272 280 return rc; 273 - memmove((void *)ctx->dst_base + offset, 274 - (void *)ctx->src_base + offset, 275 - ctx->var2); 281 + 282 + src = ioremap(ctx->src_base + offset, ctx->var2); 283 + if (!src) 284 + return -ENOMEM; 285 + dst = ioremap(ctx->dst_base + offset, ctx->var2); 286 + if (!dst) 287 + return -ENOMEM; 288 + 289 + memmove(dst, src, ctx->var2); 290 + 291 + iounmap(src); 292 + iounmap(dst); 276 293 277 294 return 0; 278 295 } ··· 767 750 768 751 static int erst_check_table(struct acpi_table_erst *erst_tab) 769 752 { 770 - if (erst_tab->header_length != sizeof(struct acpi_table_erst)) 753 + if ((erst_tab->header_length != 754 + (sizeof(struct acpi_table_erst) - sizeof(erst_tab->header))) 755 + && (erst_tab->header_length != sizeof(struct acpi_table_einj))) 771 756 return -EINVAL; 772 757 if (erst_tab->header.length < sizeof(struct acpi_table_erst)) 773 758 return -EINVAL;
+1 -1
drivers/acpi/apei/ghes.c
··· 302 302 struct ghes *ghes = NULL; 303 303 int rc = -EINVAL; 304 304 305 - generic = ghes_dev->dev.platform_data; 305 + generic = *(struct acpi_hest_generic **)ghes_dev->dev.platform_data; 306 306 if (!generic->enabled) 307 307 return -ENODEV; 308 308
+7 -4
drivers/acpi/apei/hest.c
··· 137 137 138 138 static int hest_parse_ghes(struct acpi_hest_header *hest_hdr, void *data) 139 139 { 140 - struct acpi_hest_generic *generic; 141 140 struct platform_device *ghes_dev; 142 141 struct ghes_arr *ghes_arr = data; 143 142 int rc; 144 143 145 144 if (hest_hdr->type != ACPI_HEST_TYPE_GENERIC_ERROR) 146 145 return 0; 147 - generic = (struct acpi_hest_generic *)hest_hdr; 148 - if (!generic->enabled) 146 + 147 + if (!((struct acpi_hest_generic *)hest_hdr)->enabled) 149 148 return 0; 150 149 ghes_dev = platform_device_alloc("GHES", hest_hdr->source_id); 151 150 if (!ghes_dev) 152 151 return -ENOMEM; 153 - ghes_dev->dev.platform_data = generic; 152 + 153 + rc = platform_device_add_data(ghes_dev, &hest_hdr, sizeof(void *)); 154 + if (rc) 155 + goto err; 156 + 154 157 rc = platform_device_add(ghes_dev); 155 158 if (rc) 156 159 goto err;
+1 -1
drivers/acpi/atomicio.c
··· 142 142 list_add_tail_rcu(&map->list, &acpi_iomaps); 143 143 spin_unlock_irqrestore(&acpi_iomaps_lock, flags); 144 144 145 - return vaddr + (paddr - pg_off); 145 + return map->vaddr + (paddr - map->paddr); 146 146 err_unmap: 147 147 iounmap(vaddr); 148 148 return NULL;
-1
drivers/acpi/battery.c
··· 273 273 POWER_SUPPLY_PROP_CYCLE_COUNT, 274 274 POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN, 275 275 POWER_SUPPLY_PROP_VOLTAGE_NOW, 276 - POWER_SUPPLY_PROP_CURRENT_NOW, 277 276 POWER_SUPPLY_PROP_POWER_NOW, 278 277 POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN, 279 278 POWER_SUPPLY_PROP_ENERGY_FULL,
+18
drivers/acpi/blacklist.c
··· 183 183 { 184 184 printk(KERN_NOTICE PREFIX "DMI detected: %s\n", d->ident); 185 185 acpi_osi_setup("!Windows 2006"); 186 + acpi_osi_setup("!Windows 2006 SP1"); 187 + acpi_osi_setup("!Windows 2006 SP2"); 186 188 return 0; 187 189 } 188 190 static int __init dmi_disable_osi_win7(const struct dmi_system_id *d) ··· 228 226 }, 229 227 }, 230 228 { 229 + .callback = dmi_disable_osi_vista, 230 + .ident = "Toshiba Satellite L355", 231 + .matches = { 232 + DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), 233 + DMI_MATCH(DMI_PRODUCT_VERSION, "Satellite L355"), 234 + }, 235 + }, 236 + { 231 237 .callback = dmi_disable_osi_win7, 232 238 .ident = "ASUS K50IJ", 233 239 .matches = { 234 240 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."), 235 241 DMI_MATCH(DMI_PRODUCT_NAME, "K50IJ"), 242 + }, 243 + }, 244 + { 245 + .callback = dmi_disable_osi_vista, 246 + .ident = "Toshiba P305D", 247 + .matches = { 248 + DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), 249 + DMI_MATCH(DMI_PRODUCT_NAME, "Satellite P305D"), 236 250 }, 237 251 }, 238 252
+5 -13
drivers/acpi/bus.c
··· 55 55 static int set_power_nocheck(const struct dmi_system_id *id) 56 56 { 57 57 printk(KERN_NOTICE PREFIX "%s detected - " 58 - "disable power check in power transistion\n", id->ident); 58 + "disable power check in power transition\n", id->ident); 59 59 acpi_power_nocheck = 1; 60 60 return 0; 61 61 } ··· 80 80 81 81 static struct dmi_system_id dsdt_dmi_table[] __initdata = { 82 82 /* 83 - * Insyde BIOS on some TOSHIBA machines corrupt the DSDT. 83 + * Invoke DSDT corruption work-around on all Toshiba Satellite. 84 84 * https://bugzilla.kernel.org/show_bug.cgi?id=14679 85 85 */ 86 86 { 87 87 .callback = set_copy_dsdt, 88 - .ident = "TOSHIBA Satellite A505", 88 + .ident = "TOSHIBA Satellite", 89 89 .matches = { 90 90 DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), 91 - DMI_MATCH(DMI_PRODUCT_NAME, "Satellite A505"), 92 - }, 93 - }, 94 - { 95 - .callback = set_copy_dsdt, 96 - .ident = "TOSHIBA Satellite L505D", 97 - .matches = { 98 - DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), 99 - DMI_MATCH(DMI_PRODUCT_NAME, "Satellite L505D"), 91 + DMI_MATCH(DMI_PRODUCT_NAME, "Satellite"), 100 92 }, 101 93 }, 102 94 {} ··· 1019 1027 1020 1028 /* 1021 1029 * If the laptop falls into the DMI check table, the power state check 1022 - * will be disabled in the course of device power transistion. 1030 + * will be disabled in the course of device power transition. 1023 1031 */ 1024 1032 dmi_check_system(power_nocheck_dmi_table); 1025 1033
+2
drivers/acpi/fan.c
··· 369 369 370 370 acpi_bus_unregister_driver(&acpi_fan_driver); 371 371 372 + #ifdef CONFIG_ACPI_PROCFS 372 373 remove_proc_entry(ACPI_FAN_CLASS, acpi_root_dir); 374 + #endif 373 375 374 376 return; 375 377 }
-6
drivers/acpi/processor_core.c
··· 29 29 30 30 static struct dmi_system_id __cpuinitdata processor_idle_dmi_table[] = { 31 31 { 32 - set_no_mwait, "IFL91 board", { 33 - DMI_MATCH(DMI_BIOS_VENDOR, "COMPAL"), 34 - DMI_MATCH(DMI_SYS_VENDOR, "ZEPTO"), 35 - DMI_MATCH(DMI_PRODUCT_VERSION, "3215W"), 36 - DMI_MATCH(DMI_BOARD_NAME, "IFL91") }, NULL}, 37 - { 38 32 set_no_mwait, "Extensa 5220", { 39 33 DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), 40 34 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+2 -2
drivers/acpi/processor_perflib.c
··· 447 447 if (!try_module_get(calling_module)) 448 448 return -EINVAL; 449 449 450 - /* is_done is set to negative if an error occured, 451 - * and to postitive if _no_ error occured, but SMM 450 + /* is_done is set to negative if an error occurred, 451 + * and to postitive if _no_ error occurred, but SMM 452 452 * was already notified. This avoids double notification 453 453 * which might lead to unexpected results... 454 454 */
+22
drivers/acpi/sleep.c
··· 363 363 return 0; 364 364 } 365 365 366 + static int __init init_nvs_nosave(const struct dmi_system_id *d) 367 + { 368 + acpi_nvs_nosave(); 369 + return 0; 370 + } 371 + 366 372 static struct dmi_system_id __initdata acpisleep_dmi_table[] = { 367 373 { 368 374 .callback = init_old_suspend_ordering, ··· 401 395 DMI_MATCH(DMI_BOARD_VENDOR, 402 396 "Matsushita Electric Industrial Co.,Ltd."), 403 397 DMI_MATCH(DMI_BOARD_NAME, "CF51-2L"), 398 + }, 399 + }, 400 + { 401 + .callback = init_nvs_nosave, 402 + .ident = "Sony Vaio VGN-SR11M", 403 + .matches = { 404 + DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), 405 + DMI_MATCH(DMI_PRODUCT_NAME, "VGN-SR11M"), 406 + }, 407 + }, 408 + { 409 + .callback = init_nvs_nosave, 410 + .ident = "Everex StepNote Series", 411 + .matches = { 412 + DMI_MATCH(DMI_SYS_VENDOR, "Everex Systems, Inc."), 413 + DMI_MATCH(DMI_PRODUCT_NAME, "Everex StepNote Series"), 404 414 }, 405 415 }, 406 416 {},
+14 -6
drivers/acpi/sysfs.c
··· 100 100 ACPI_DEBUG_INIT(ACPI_LV_EVENTS), 101 101 }; 102 102 103 - static int param_get_debug_layer(char *buffer, struct kernel_param *kp) 103 + static int param_get_debug_layer(char *buffer, const struct kernel_param *kp) 104 104 { 105 105 int result = 0; 106 106 int i; ··· 128 128 return result; 129 129 } 130 130 131 - static int param_get_debug_level(char *buffer, struct kernel_param *kp) 131 + static int param_get_debug_level(char *buffer, const struct kernel_param *kp) 132 132 { 133 133 int result = 0; 134 134 int i; ··· 149 149 return result; 150 150 } 151 151 152 - module_param_call(debug_layer, param_set_uint, param_get_debug_layer, 153 - &acpi_dbg_layer, 0644); 154 - module_param_call(debug_level, param_set_uint, param_get_debug_level, 155 - &acpi_dbg_level, 0644); 152 + static struct kernel_param_ops param_ops_debug_layer = { 153 + .set = param_set_uint, 154 + .get = param_get_debug_layer, 155 + }; 156 + 157 + static struct kernel_param_ops param_ops_debug_level = { 158 + .set = param_set_uint, 159 + .get = param_get_debug_level, 160 + }; 161 + 162 + module_param_cb(debug_layer, &param_ops_debug_layer, &acpi_dbg_layer, 0644); 163 + module_param_cb(debug_level, &param_ops_debug_level, &acpi_dbg_level, 0644); 156 164 157 165 static char trace_method_name[6]; 158 166 module_param_string(trace_method_name, trace_method_name, 6, 0644);
+2 -2
drivers/acpi/video_detect.c
··· 59 59 "support\n")); 60 60 *cap |= ACPI_VIDEO_BACKLIGHT; 61 61 if (ACPI_FAILURE(acpi_get_handle(handle, "_BQC", &h_dummy))) 62 - printk(KERN_WARNING FW_BUG PREFIX "ACPI brightness " 63 - "control misses _BQC function\n"); 62 + printk(KERN_WARNING FW_BUG PREFIX "No _BQC method, " 63 + "cannot determine initial brightness\n"); 64 64 /* We have backlight support, no need to scan further */ 65 65 return AE_CTRL_TERMINATE; 66 66 }
+1 -1
include/acpi/acpixf.h
··· 55 55 extern u8 acpi_gbl_permanent_mmap; 56 56 57 57 /* 58 - * Globals that are publically available, allowing for 58 + * Globals that are publicly available, allowing for 59 59 * run time configuration 60 60 */ 61 61 extern u32 acpi_dbg_level;