mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
Merge branches 'apei', 'battery-mwh-fix', 'bugzilla-10807', 'bugzilla-14736', 'bugzilla-14679', 'bugzilla-16396', 'launchpad-613381' and 'misc' into release
This commit is contained in:
commit
fdb8c58a16
19 changed files with 112 additions and 57 deletions
|
@ -61,7 +61,7 @@ struct cstate_entry {
|
|||
unsigned int ecx;
|
||||
} states[ACPI_PROCESSOR_MAX_POWER];
|
||||
};
|
||||
static struct cstate_entry *cpu_cstate_entry; /* per CPU ptr */
|
||||
static struct cstate_entry __percpu *cpu_cstate_entry; /* per CPU ptr */
|
||||
|
||||
static short mwait_supported[ACPI_PROCESSOR_MAX_POWER];
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ config ACPI_EC_DEBUGFS
|
|||
|
||||
Be aware that using this interface can confuse your Embedded
|
||||
Controller in a way that a normal reboot is not enough. You then
|
||||
have to power of your system, and remove the laptop battery for
|
||||
have to power off your system, and remove the laptop battery for
|
||||
some seconds.
|
||||
An Embedded Controller typically is available on laptops and reads
|
||||
sensor values like battery state and temperature.
|
||||
|
|
|
@ -382,31 +382,32 @@ static void acpi_pad_remove_sysfs(struct acpi_device *device)
|
|||
device_remove_file(&device->dev, &dev_attr_rrtime);
|
||||
}
|
||||
|
||||
/* Query firmware how many CPUs should be idle */
|
||||
static int acpi_pad_pur(acpi_handle handle, int *num_cpus)
|
||||
/*
|
||||
* Query firmware how many CPUs should be idle
|
||||
* return -1 on failure
|
||||
*/
|
||||
static int acpi_pad_pur(acpi_handle handle)
|
||||
{
|
||||
struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
|
||||
union acpi_object *package;
|
||||
int rev, num, ret = -EINVAL;
|
||||
int num = -1;
|
||||
|
||||
if (ACPI_FAILURE(acpi_evaluate_object(handle, "_PUR", NULL, &buffer)))
|
||||
return -EINVAL;
|
||||
return num;
|
||||
|
||||
if (!buffer.length || !buffer.pointer)
|
||||
return -EINVAL;
|
||||
return num;
|
||||
|
||||
package = buffer.pointer;
|
||||
if (package->type != ACPI_TYPE_PACKAGE || package->package.count != 2)
|
||||
goto out;
|
||||
rev = package->package.elements[0].integer.value;
|
||||
num = package->package.elements[1].integer.value;
|
||||
if (rev != 1 || num < 0)
|
||||
goto out;
|
||||
*num_cpus = num;
|
||||
ret = 0;
|
||||
out:
|
||||
|
||||
if (package->type == ACPI_TYPE_PACKAGE &&
|
||||
package->package.count == 2 &&
|
||||
package->package.elements[0].integer.value == 1) /* rev 1 */
|
||||
|
||||
num = package->package.elements[1].integer.value;
|
||||
|
||||
kfree(buffer.pointer);
|
||||
return ret;
|
||||
return num;
|
||||
}
|
||||
|
||||
/* Notify firmware how many CPUs are idle */
|
||||
|
@ -433,7 +434,8 @@ static void acpi_pad_handle_notify(acpi_handle handle)
|
|||
uint32_t idle_cpus;
|
||||
|
||||
mutex_lock(&isolated_cpus_lock);
|
||||
if (acpi_pad_pur(handle, &num_cpus)) {
|
||||
num_cpus = acpi_pad_pur(handle);
|
||||
if (num_cpus < 0) {
|
||||
mutex_unlock(&isolated_cpus_lock);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -854,6 +854,7 @@ struct acpi_bit_register_info {
|
|||
ACPI_BITMASK_POWER_BUTTON_STATUS | \
|
||||
ACPI_BITMASK_SLEEP_BUTTON_STATUS | \
|
||||
ACPI_BITMASK_RT_CLOCK_STATUS | \
|
||||
ACPI_BITMASK_PCIEXP_WAKE_DISABLE | \
|
||||
ACPI_BITMASK_WAKE_STATUS)
|
||||
|
||||
#define ACPI_BITMASK_TIMER_ENABLE 0x0001
|
||||
|
|
|
@ -109,7 +109,7 @@ void acpi_ex_enter_interpreter(void)
|
|||
*
|
||||
* DESCRIPTION: Reacquire the interpreter execution region from within the
|
||||
* interpreter code. Failure to enter the interpreter region is a
|
||||
* fatal system error. Used in conjuction with
|
||||
* fatal system error. Used in conjunction with
|
||||
* relinquish_interpreter
|
||||
*
|
||||
******************************************************************************/
|
||||
|
|
|
@ -149,7 +149,7 @@ acpi_rs_move_data(void *destination, void *source, u16 item_count, u8 move_type)
|
|||
|
||||
/*
|
||||
* 16-, 32-, and 64-bit cases must use the move macros that perform
|
||||
* endian conversion and/or accomodate hardware that cannot perform
|
||||
* endian conversion and/or accommodate hardware that cannot perform
|
||||
* misaligned memory transfers
|
||||
*/
|
||||
case ACPI_RSC_MOVE16:
|
||||
|
|
|
@ -34,6 +34,6 @@ config ACPI_APEI_ERST_DEBUG
|
|||
depends on ACPI_APEI
|
||||
help
|
||||
ERST is a way provided by APEI to save and retrieve hardware
|
||||
error infomation to and from a persistent store. Enable this
|
||||
error information to and from a persistent store. Enable this
|
||||
if you want to debugging and testing the ERST kernel support
|
||||
and firmware implementation.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* APEI Error Record Serialization Table debug support
|
||||
*
|
||||
* ERST is a way provided by APEI to save and retrieve hardware error
|
||||
* infomation to and from a persistent store. This file provide the
|
||||
* information to and from a persistent store. This file provide the
|
||||
* debugging/testing support for ERST kernel support and firmware
|
||||
* implementation.
|
||||
*
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* APEI Error Record Serialization Table support
|
||||
*
|
||||
* ERST is a way provided by APEI to save and retrieve hardware error
|
||||
* infomation to and from a persistent store.
|
||||
* information to and from a persistent store.
|
||||
*
|
||||
* For more information about ERST, please refer to ACPI Specification
|
||||
* version 4.0, section 17.4.
|
||||
|
@ -266,13 +266,30 @@ static int erst_exec_move_data(struct apei_exec_context *ctx,
|
|||
{
|
||||
int rc;
|
||||
u64 offset;
|
||||
void *src, *dst;
|
||||
|
||||
/* ioremap does not work in interrupt context */
|
||||
if (in_interrupt()) {
|
||||
pr_warning(ERST_PFX
|
||||
"MOVE_DATA can not be used in interrupt context");
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
rc = __apei_exec_read_register(entry, &offset);
|
||||
if (rc)
|
||||
return rc;
|
||||
memmove((void *)ctx->dst_base + offset,
|
||||
(void *)ctx->src_base + offset,
|
||||
ctx->var2);
|
||||
|
||||
src = ioremap(ctx->src_base + offset, ctx->var2);
|
||||
if (!src)
|
||||
return -ENOMEM;
|
||||
dst = ioremap(ctx->dst_base + offset, ctx->var2);
|
||||
if (!dst)
|
||||
return -ENOMEM;
|
||||
|
||||
memmove(dst, src, ctx->var2);
|
||||
|
||||
iounmap(src);
|
||||
iounmap(dst);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -273,7 +273,6 @@ static enum power_supply_property energy_battery_props[] = {
|
|||
POWER_SUPPLY_PROP_CYCLE_COUNT,
|
||||
POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
|
||||
POWER_SUPPLY_PROP_VOLTAGE_NOW,
|
||||
POWER_SUPPLY_PROP_CURRENT_NOW,
|
||||
POWER_SUPPLY_PROP_POWER_NOW,
|
||||
POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN,
|
||||
POWER_SUPPLY_PROP_ENERGY_FULL,
|
||||
|
|
|
@ -183,6 +183,8 @@ static int __init dmi_disable_osi_vista(const struct dmi_system_id *d)
|
|||
{
|
||||
printk(KERN_NOTICE PREFIX "DMI detected: %s\n", d->ident);
|
||||
acpi_osi_setup("!Windows 2006");
|
||||
acpi_osi_setup("!Windows 2006 SP1");
|
||||
acpi_osi_setup("!Windows 2006 SP2");
|
||||
return 0;
|
||||
}
|
||||
static int __init dmi_disable_osi_win7(const struct dmi_system_id *d)
|
||||
|
@ -226,6 +228,14 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
|
|||
},
|
||||
},
|
||||
{
|
||||
.callback = dmi_disable_osi_vista,
|
||||
.ident = "Toshiba Satellite L355",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
|
||||
DMI_MATCH(DMI_PRODUCT_VERSION, "Satellite L355"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = dmi_disable_osi_win7,
|
||||
.ident = "ASUS K50IJ",
|
||||
.matches = {
|
||||
|
@ -233,6 +243,14 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
|
|||
DMI_MATCH(DMI_PRODUCT_NAME, "K50IJ"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = dmi_disable_osi_vista,
|
||||
.ident = "Toshiba P305D",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Satellite P305D"),
|
||||
},
|
||||
},
|
||||
|
||||
/*
|
||||
* BIOS invocation of _OSI(Linux) is almost always a BIOS bug.
|
||||
|
|
|
@ -55,7 +55,7 @@ EXPORT_SYMBOL(acpi_root_dir);
|
|||
static int set_power_nocheck(const struct dmi_system_id *id)
|
||||
{
|
||||
printk(KERN_NOTICE PREFIX "%s detected - "
|
||||
"disable power check in power transistion\n", id->ident);
|
||||
"disable power check in power transition\n", id->ident);
|
||||
acpi_power_nocheck = 1;
|
||||
return 0;
|
||||
}
|
||||
|
@ -80,23 +80,15 @@ static int set_copy_dsdt(const struct dmi_system_id *id)
|
|||
|
||||
static struct dmi_system_id dsdt_dmi_table[] __initdata = {
|
||||
/*
|
||||
* Insyde BIOS on some TOSHIBA machines corrupt the DSDT.
|
||||
* Invoke DSDT corruption work-around on all Toshiba Satellite.
|
||||
* https://bugzilla.kernel.org/show_bug.cgi?id=14679
|
||||
*/
|
||||
{
|
||||
.callback = set_copy_dsdt,
|
||||
.ident = "TOSHIBA Satellite A505",
|
||||
.ident = "TOSHIBA Satellite",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Satellite A505"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = set_copy_dsdt,
|
||||
.ident = "TOSHIBA Satellite L505D",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Satellite L505D"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Satellite"),
|
||||
},
|
||||
},
|
||||
{}
|
||||
|
@ -1027,7 +1019,7 @@ static int __init acpi_init(void)
|
|||
|
||||
/*
|
||||
* If the laptop falls into the DMI check table, the power state check
|
||||
* will be disabled in the course of device power transistion.
|
||||
* will be disabled in the course of device power transition.
|
||||
*/
|
||||
dmi_check_system(power_nocheck_dmi_table);
|
||||
|
||||
|
|
|
@ -369,7 +369,9 @@ static void __exit acpi_fan_exit(void)
|
|||
|
||||
acpi_bus_unregister_driver(&acpi_fan_driver);
|
||||
|
||||
#ifdef CONFIG_ACPI_PROCFS
|
||||
remove_proc_entry(ACPI_FAN_CLASS, acpi_root_dir);
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -28,12 +28,6 @@ static int set_no_mwait(const struct dmi_system_id *id)
|
|||
}
|
||||
|
||||
static struct dmi_system_id __cpuinitdata processor_idle_dmi_table[] = {
|
||||
{
|
||||
set_no_mwait, "IFL91 board", {
|
||||
DMI_MATCH(DMI_BIOS_VENDOR, "COMPAL"),
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ZEPTO"),
|
||||
DMI_MATCH(DMI_PRODUCT_VERSION, "3215W"),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "IFL91") }, NULL},
|
||||
{
|
||||
set_no_mwait, "Extensa 5220", {
|
||||
DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
|
||||
|
|
|
@ -447,8 +447,8 @@ int acpi_processor_notify_smm(struct module *calling_module)
|
|||
if (!try_module_get(calling_module))
|
||||
return -EINVAL;
|
||||
|
||||
/* is_done is set to negative if an error occured,
|
||||
* and to postitive if _no_ error occured, but SMM
|
||||
/* is_done is set to negative if an error occurred,
|
||||
* and to postitive if _no_ error occurred, but SMM
|
||||
* was already notified. This avoids double notification
|
||||
* which might lead to unexpected results...
|
||||
*/
|
||||
|
|
|
@ -363,6 +363,12 @@ static int __init init_old_suspend_ordering(const struct dmi_system_id *d)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __init init_nvs_nosave(const struct dmi_system_id *d)
|
||||
{
|
||||
acpi_nvs_nosave();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
|
||||
{
|
||||
.callback = init_old_suspend_ordering,
|
||||
|
@ -397,6 +403,22 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
|
|||
DMI_MATCH(DMI_BOARD_NAME, "CF51-2L"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = init_nvs_nosave,
|
||||
.ident = "Sony Vaio VGN-SR11M",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "VGN-SR11M"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = init_nvs_nosave,
|
||||
.ident = "Everex StepNote Series",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Everex Systems, Inc."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Everex StepNote Series"),
|
||||
},
|
||||
},
|
||||
{},
|
||||
};
|
||||
#endif /* CONFIG_SUSPEND */
|
||||
|
|
|
@ -100,7 +100,7 @@ static const struct acpi_dlevel acpi_debug_levels[] = {
|
|||
ACPI_DEBUG_INIT(ACPI_LV_EVENTS),
|
||||
};
|
||||
|
||||
static int param_get_debug_layer(char *buffer, struct kernel_param *kp)
|
||||
static int param_get_debug_layer(char *buffer, const struct kernel_param *kp)
|
||||
{
|
||||
int result = 0;
|
||||
int i;
|
||||
|
@ -128,7 +128,7 @@ static int param_get_debug_layer(char *buffer, struct kernel_param *kp)
|
|||
return result;
|
||||
}
|
||||
|
||||
static int param_get_debug_level(char *buffer, struct kernel_param *kp)
|
||||
static int param_get_debug_level(char *buffer, const struct kernel_param *kp)
|
||||
{
|
||||
int result = 0;
|
||||
int i;
|
||||
|
@ -149,10 +149,18 @@ static int param_get_debug_level(char *buffer, struct kernel_param *kp)
|
|||
return result;
|
||||
}
|
||||
|
||||
module_param_call(debug_layer, param_set_uint, param_get_debug_layer,
|
||||
&acpi_dbg_layer, 0644);
|
||||
module_param_call(debug_level, param_set_uint, param_get_debug_level,
|
||||
&acpi_dbg_level, 0644);
|
||||
static struct kernel_param_ops param_ops_debug_layer = {
|
||||
.set = param_set_uint,
|
||||
.get = param_get_debug_layer,
|
||||
};
|
||||
|
||||
static struct kernel_param_ops param_ops_debug_level = {
|
||||
.set = param_set_uint,
|
||||
.get = param_get_debug_level,
|
||||
};
|
||||
|
||||
module_param_cb(debug_layer, ¶m_ops_debug_layer, &acpi_dbg_layer, 0644);
|
||||
module_param_cb(debug_level, ¶m_ops_debug_level, &acpi_dbg_level, 0644);
|
||||
|
||||
static char trace_method_name[6];
|
||||
module_param_string(trace_method_name, trace_method_name, 6, 0644);
|
||||
|
|
|
@ -59,8 +59,8 @@ acpi_backlight_cap_match(acpi_handle handle, u32 level, void *context,
|
|||
"support\n"));
|
||||
*cap |= ACPI_VIDEO_BACKLIGHT;
|
||||
if (ACPI_FAILURE(acpi_get_handle(handle, "_BQC", &h_dummy)))
|
||||
printk(KERN_WARNING FW_BUG PREFIX "ACPI brightness "
|
||||
"control misses _BQC function\n");
|
||||
printk(KERN_WARNING FW_BUG PREFIX "No _BQC method, "
|
||||
"cannot determine initial brightness\n");
|
||||
/* We have backlight support, no need to scan further */
|
||||
return AE_CTRL_TERMINATE;
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
extern u8 acpi_gbl_permanent_mmap;
|
||||
|
||||
/*
|
||||
* Globals that are publically available, allowing for
|
||||
* Globals that are publicly available, allowing for
|
||||
* run time configuration
|
||||
*/
|
||||
extern u32 acpi_dbg_level;
|
||||
|
|
Loading…
Reference in a new issue