Merge branch 'misc' into release
Conflicts: include/acpi/acpixf.h Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
commit
d0302bc62a
@ -139,6 +139,7 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
ht -- run only enough ACPI to enable Hyper Threading
|
||||
strict -- Be less tolerant of platforms that are not
|
||||
strictly ACPI specification compliant.
|
||||
rsdt -- prefer RSDT over (default) XSDT
|
||||
|
||||
See also Documentation/power/pm.txt, pci=noacpi
|
||||
|
||||
|
@ -65,6 +65,7 @@ EXPORT_SYMBOL(pm_idle);
|
||||
void (*pm_power_off) (void);
|
||||
EXPORT_SYMBOL(pm_power_off);
|
||||
|
||||
u32 acpi_rsdt_forced;
|
||||
unsigned int acpi_cpei_override;
|
||||
unsigned int acpi_cpei_phys_cpuid;
|
||||
|
||||
|
@ -47,7 +47,7 @@
|
||||
#endif
|
||||
|
||||
static int __initdata acpi_force = 0;
|
||||
|
||||
u32 acpi_rsdt_forced;
|
||||
#ifdef CONFIG_ACPI
|
||||
int acpi_disabled = 0;
|
||||
#else
|
||||
@ -1794,6 +1794,10 @@ static int __init parse_acpi(char *arg)
|
||||
disable_acpi();
|
||||
acpi_ht = 1;
|
||||
}
|
||||
/* acpi=rsdt use RSDT instead of XSDT */
|
||||
else if (strcmp(arg, "rsdt") == 0) {
|
||||
acpi_rsdt_forced = 1;
|
||||
}
|
||||
/* "acpi=noirq" disables ACPI interrupt routing */
|
||||
else if (strcmp(arg, "noirq") == 0) {
|
||||
acpi_noirq_set();
|
||||
|
@ -56,6 +56,7 @@ static struct cstate_entry *cpu_cstate_entry; /* per CPU ptr */
|
||||
static short mwait_supported[ACPI_PROCESSOR_MAX_POWER];
|
||||
|
||||
#define MWAIT_SUBSTATE_MASK (0xf)
|
||||
#define MWAIT_CSTATE_MASK (0xf)
|
||||
#define MWAIT_SUBSTATE_SIZE (4)
|
||||
|
||||
#define CPUID_MWAIT_LEAF (5)
|
||||
@ -98,7 +99,8 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu,
|
||||
cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &edx);
|
||||
|
||||
/* Check whether this particular cx_type (in CST) is supported or not */
|
||||
cstate_type = (cx->address >> MWAIT_SUBSTATE_SIZE) + 1;
|
||||
cstate_type = ((cx->address >> MWAIT_SUBSTATE_SIZE) &
|
||||
MWAIT_CSTATE_MASK) + 1;
|
||||
edx_part = edx >> (cstate_type * MWAIT_SUBSTATE_SIZE);
|
||||
num_cstate_subtype = edx_part & MWAIT_SUBSTATE_MASK;
|
||||
|
||||
|
@ -445,7 +445,8 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags)
|
||||
|
||||
/* Differentiate between RSDT and XSDT root tables */
|
||||
|
||||
if (rsdp->revision > 1 && rsdp->xsdt_physical_address) {
|
||||
if (rsdp->revision > 1 && rsdp->xsdt_physical_address
|
||||
&& !acpi_rsdt_forced) {
|
||||
/*
|
||||
* Root table is an XSDT (64-bit physical addresses). We must use the
|
||||
* XSDT if the revision is > 1 and the XSDT pointer is present, as per
|
||||
|
@ -796,10 +796,6 @@ static int irqrouter_resume(struct sys_device *dev)
|
||||
struct list_head *node = NULL;
|
||||
struct acpi_pci_link *link = NULL;
|
||||
|
||||
|
||||
/* Make sure SCI is enabled again (Apple firmware bug?) */
|
||||
acpi_set_register(ACPI_BITREG_SCI_ENABLE, 1);
|
||||
|
||||
list_for_each(node, &acpi_link.entries) {
|
||||
link = list_entry(node, struct acpi_pci_link, node);
|
||||
if (!link) {
|
||||
|
@ -482,6 +482,7 @@ acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level)
|
||||
int status = AE_OK;
|
||||
union acpi_object arg0 = { ACPI_TYPE_INTEGER };
|
||||
struct acpi_object_list args = { 1, &arg0 };
|
||||
int state;
|
||||
|
||||
|
||||
arg0.integer.value = level;
|
||||
@ -490,6 +491,10 @@ acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level)
|
||||
status = acpi_evaluate_object(device->dev->handle, "_BCM",
|
||||
&args, NULL);
|
||||
device->brightness->curr = level;
|
||||
for (state = 2; state < device->brightness->count; state++)
|
||||
if (level == device->brightness->levels[state])
|
||||
device->backlight->props.brightness = state - 2;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -15,12 +15,14 @@
|
||||
#include <linux/tick.h>
|
||||
|
||||
#define BREAK_FUZZ 4 /* 4 us */
|
||||
#define PRED_HISTORY_PCT 50
|
||||
|
||||
struct menu_device {
|
||||
int last_state_idx;
|
||||
|
||||
unsigned int expected_us;
|
||||
unsigned int predicted_us;
|
||||
unsigned int current_predicted_us;
|
||||
unsigned int last_measured_us;
|
||||
unsigned int elapsed_us;
|
||||
};
|
||||
@ -47,6 +49,12 @@ static int menu_select(struct cpuidle_device *dev)
|
||||
data->expected_us =
|
||||
(u32) ktime_to_ns(tick_nohz_get_sleep_length()) / 1000;
|
||||
|
||||
/* Recalculate predicted_us based on prediction_history_pct */
|
||||
data->predicted_us *= PRED_HISTORY_PCT;
|
||||
data->predicted_us += (100 - PRED_HISTORY_PCT) *
|
||||
data->current_predicted_us;
|
||||
data->predicted_us /= 100;
|
||||
|
||||
/* find the deepest idle state that satisfies our constraints */
|
||||
for (i = CPUIDLE_DRIVER_STATE_START + 1; i < dev->state_count; i++) {
|
||||
struct cpuidle_state *s = &dev->states[i];
|
||||
@ -97,7 +105,7 @@ static void menu_reflect(struct cpuidle_device *dev)
|
||||
measured_us = -1;
|
||||
|
||||
/* Predict time until next break event */
|
||||
data->predicted_us = max(measured_us, data->last_measured_us);
|
||||
data->current_predicted_us = max(measured_us, data->last_measured_us);
|
||||
|
||||
if (last_idle_us + BREAK_FUZZ <
|
||||
data->expected_us - target->exit_latency) {
|
||||
|
@ -70,6 +70,7 @@ extern u32 acpi_gbl_trace_flags;
|
||||
extern u32 acpi_current_gpe_count;
|
||||
extern struct acpi_table_fadt acpi_gbl_FADT;
|
||||
|
||||
extern u32 acpi_rsdt_forced;
|
||||
/*
|
||||
* Global interfaces
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user