Skip to content

Commit

Permalink
Merge branch 'misc' into release
Browse files Browse the repository at this point in the history
Conflicts:
	include/acpi/acpixf.h

Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Len Brown committed Jan 9, 2009
2 parents 106ad8d + 237889b commit d0302bc
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 8 deletions.
1 change: 1 addition & 0 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions arch/ia64/kernel/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 5 additions & 1 deletion arch/x86/kernel/acpi/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#endif

static int __initdata acpi_force = 0;

u32 acpi_rsdt_forced;
#ifdef CONFIG_ACPI
int acpi_disabled = 0;
#else
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 3 additions & 1 deletion arch/x86/kernel/acpi/cstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;

Expand Down
3 changes: 2 additions & 1 deletion drivers/acpi/acpica/tbutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions drivers/acpi/pci_link.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 5 additions & 0 deletions drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down
10 changes: 9 additions & 1 deletion drivers/cpuidle/governors/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand All @@ -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];
Expand Down Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions include/acpi/acpixf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit d0302bc

Please sign in to comment.