Commit c7676092 authored by Linus Torvalds's avatar Linus Torvalds

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

Pull ACPI & Power Management patches from Len Brown.

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
  acpi_pad: fix power_saving thread deadlock
  ACPI video: Still use ACPI backlight control if _DOS doesn't exist
  ACPI, APEI, Avoid too much error reporting in runtime
  ACPI: Add a quirk for "AMILO PRO V2030" to ignore the timer overriding
  ACPI: Remove one board specific WARN when ignoring timer overriding
  ACPI: Make acpi_skip_timer_override cover all source_irq==0 cases
  ACPI, x86: fix Dell M6600 ACPI reboot regression via DMI
  ACPI sysfs.c strlen fix
parents 21f27291 6eca954e
...@@ -422,12 +422,14 @@ acpi_parse_int_src_ovr(struct acpi_subtable_header * header, ...@@ -422,12 +422,14 @@ acpi_parse_int_src_ovr(struct acpi_subtable_header * header,
return 0; return 0;
} }
if (intsrc->source_irq == 0 && intsrc->global_irq == 2) { if (intsrc->source_irq == 0) {
if (acpi_skip_timer_override) { if (acpi_skip_timer_override) {
printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n"); printk(PREFIX "BIOS IRQ0 override ignored.\n");
return 0; return 0;
} }
if (acpi_fix_pin2_polarity && (intsrc->inti_flags & ACPI_MADT_POLARITY_MASK)) {
if ((intsrc->global_irq == 2) && acpi_fix_pin2_polarity
&& (intsrc->inti_flags & ACPI_MADT_POLARITY_MASK)) {
intsrc->inti_flags &= ~ACPI_MADT_POLARITY_MASK; intsrc->inti_flags &= ~ACPI_MADT_POLARITY_MASK;
printk(PREFIX "BIOS IRQ0 pin2 override: forcing polarity to high active.\n"); printk(PREFIX "BIOS IRQ0 pin2 override: forcing polarity to high active.\n");
} }
...@@ -1334,17 +1336,12 @@ static int __init dmi_disable_acpi(const struct dmi_system_id *d) ...@@ -1334,17 +1336,12 @@ static int __init dmi_disable_acpi(const struct dmi_system_id *d)
} }
/* /*
* Force ignoring BIOS IRQ0 pin2 override * Force ignoring BIOS IRQ0 override
*/ */
static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d) static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d)
{ {
/*
* The ati_ixp4x0_rev() early PCI quirk should have set
* the acpi_skip_timer_override flag already:
*/
if (!acpi_skip_timer_override) { if (!acpi_skip_timer_override) {
WARN(1, KERN_ERR "ati_ixp4x0 quirk not complete.\n"); pr_notice("%s detected: Ignoring BIOS IRQ0 override\n",
pr_notice("%s detected: Ignoring BIOS IRQ0 pin2 override\n",
d->ident); d->ident);
acpi_skip_timer_override = 1; acpi_skip_timer_override = 1;
} }
...@@ -1438,7 +1435,7 @@ static struct dmi_system_id __initdata acpi_dmi_table_late[] = { ...@@ -1438,7 +1435,7 @@ static struct dmi_system_id __initdata acpi_dmi_table_late[] = {
* is enabled. This input is incorrectly designated the * is enabled. This input is incorrectly designated the
* ISA IRQ 0 via an interrupt source override even though * ISA IRQ 0 via an interrupt source override even though
* it is wired to the output of the master 8259A and INTIN0 * it is wired to the output of the master 8259A and INTIN0
* is not connected at all. Force ignoring BIOS IRQ0 pin2 * is not connected at all. Force ignoring BIOS IRQ0
* override in that cases. * override in that cases.
*/ */
{ {
...@@ -1473,6 +1470,14 @@ static struct dmi_system_id __initdata acpi_dmi_table_late[] = { ...@@ -1473,6 +1470,14 @@ static struct dmi_system_id __initdata acpi_dmi_table_late[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq 6715b"), DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq 6715b"),
}, },
}, },
{
.callback = dmi_ignore_irq0_timer_override,
.ident = "FUJITSU SIEMENS",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
DMI_MATCH(DMI_PRODUCT_NAME, "AMILO PRO V2030"),
},
},
{} {}
}; };
......
...@@ -451,6 +451,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { ...@@ -451,6 +451,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 990"), DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 990"),
}, },
}, },
{ /* Handle problems with rebooting on the Precision M6600. */
.callback = set_pci_reboot,
.ident = "Dell OptiPlex 990",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_MATCH(DMI_PRODUCT_NAME, "Precision M6600"),
},
},
{ } { }
}; };
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#define ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME "Processor Aggregator" #define ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME "Processor Aggregator"
#define ACPI_PROCESSOR_AGGREGATOR_NOTIFY 0x80 #define ACPI_PROCESSOR_AGGREGATOR_NOTIFY 0x80
static DEFINE_MUTEX(isolated_cpus_lock); static DEFINE_MUTEX(isolated_cpus_lock);
static DEFINE_MUTEX(round_robin_lock);
static unsigned long power_saving_mwait_eax; static unsigned long power_saving_mwait_eax;
...@@ -107,7 +108,7 @@ static void round_robin_cpu(unsigned int tsk_index) ...@@ -107,7 +108,7 @@ static void round_robin_cpu(unsigned int tsk_index)
if (!alloc_cpumask_var(&tmp, GFP_KERNEL)) if (!alloc_cpumask_var(&tmp, GFP_KERNEL))
return; return;
mutex_lock(&isolated_cpus_lock); mutex_lock(&round_robin_lock);
cpumask_clear(tmp); cpumask_clear(tmp);
for_each_cpu(cpu, pad_busy_cpus) for_each_cpu(cpu, pad_busy_cpus)
cpumask_or(tmp, tmp, topology_thread_cpumask(cpu)); cpumask_or(tmp, tmp, topology_thread_cpumask(cpu));
...@@ -116,7 +117,7 @@ static void round_robin_cpu(unsigned int tsk_index) ...@@ -116,7 +117,7 @@ static void round_robin_cpu(unsigned int tsk_index)
if (cpumask_empty(tmp)) if (cpumask_empty(tmp))
cpumask_andnot(tmp, cpu_online_mask, pad_busy_cpus); cpumask_andnot(tmp, cpu_online_mask, pad_busy_cpus);
if (cpumask_empty(tmp)) { if (cpumask_empty(tmp)) {
mutex_unlock(&isolated_cpus_lock); mutex_unlock(&round_robin_lock);
return; return;
} }
for_each_cpu(cpu, tmp) { for_each_cpu(cpu, tmp) {
...@@ -131,7 +132,7 @@ static void round_robin_cpu(unsigned int tsk_index) ...@@ -131,7 +132,7 @@ static void round_robin_cpu(unsigned int tsk_index)
tsk_in_cpu[tsk_index] = preferred_cpu; tsk_in_cpu[tsk_index] = preferred_cpu;
cpumask_set_cpu(preferred_cpu, pad_busy_cpus); cpumask_set_cpu(preferred_cpu, pad_busy_cpus);
cpu_weight[preferred_cpu]++; cpu_weight[preferred_cpu]++;
mutex_unlock(&isolated_cpus_lock); mutex_unlock(&round_robin_lock);
set_cpus_allowed_ptr(current, cpumask_of(preferred_cpu)); set_cpus_allowed_ptr(current, cpumask_of(preferred_cpu));
} }
......
...@@ -243,7 +243,7 @@ static int pre_map_gar_callback(struct apei_exec_context *ctx, ...@@ -243,7 +243,7 @@ static int pre_map_gar_callback(struct apei_exec_context *ctx,
u8 ins = entry->instruction; u8 ins = entry->instruction;
if (ctx->ins_table[ins].flags & APEI_EXEC_INS_ACCESS_REGISTER) if (ctx->ins_table[ins].flags & APEI_EXEC_INS_ACCESS_REGISTER)
return acpi_os_map_generic_address(&entry->register_region); return apei_map_generic_address(&entry->register_region);
return 0; return 0;
} }
...@@ -276,7 +276,7 @@ static int post_unmap_gar_callback(struct apei_exec_context *ctx, ...@@ -276,7 +276,7 @@ static int post_unmap_gar_callback(struct apei_exec_context *ctx,
u8 ins = entry->instruction; u8 ins = entry->instruction;
if (ctx->ins_table[ins].flags & APEI_EXEC_INS_ACCESS_REGISTER) if (ctx->ins_table[ins].flags & APEI_EXEC_INS_ACCESS_REGISTER)
acpi_os_unmap_generic_address(&entry->register_region); apei_unmap_generic_address(&entry->register_region);
return 0; return 0;
} }
...@@ -606,6 +606,19 @@ static int apei_check_gar(struct acpi_generic_address *reg, u64 *paddr, ...@@ -606,6 +606,19 @@ static int apei_check_gar(struct acpi_generic_address *reg, u64 *paddr,
return 0; return 0;
} }
int apei_map_generic_address(struct acpi_generic_address *reg)
{
int rc;
u32 access_bit_width;
u64 address;
rc = apei_check_gar(reg, &address, &access_bit_width);
if (rc)
return rc;
return acpi_os_map_generic_address(reg);
}
EXPORT_SYMBOL_GPL(apei_map_generic_address);
/* read GAR in interrupt (including NMI) or process context */ /* read GAR in interrupt (including NMI) or process context */
int apei_read(u64 *val, struct acpi_generic_address *reg) int apei_read(u64 *val, struct acpi_generic_address *reg)
{ {
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
#define APEI_INTERNAL_H #define APEI_INTERNAL_H
#include <linux/cper.h> #include <linux/cper.h>
#include <linux/acpi.h>
#include <linux/acpi_io.h>
struct apei_exec_context; struct apei_exec_context;
...@@ -68,6 +70,13 @@ static inline int apei_exec_run_optional(struct apei_exec_context *ctx, u8 actio ...@@ -68,6 +70,13 @@ static inline int apei_exec_run_optional(struct apei_exec_context *ctx, u8 actio
/* IP has been set in instruction function */ /* IP has been set in instruction function */
#define APEI_EXEC_SET_IP 1 #define APEI_EXEC_SET_IP 1
int apei_map_generic_address(struct acpi_generic_address *reg);
static inline void apei_unmap_generic_address(struct acpi_generic_address *reg)
{
acpi_os_unmap_generic_address(reg);
}
int apei_read(u64 *val, struct acpi_generic_address *reg); int apei_read(u64 *val, struct acpi_generic_address *reg);
int apei_write(u64 val, struct acpi_generic_address *reg); int apei_write(u64 val, struct acpi_generic_address *reg);
......
...@@ -301,7 +301,7 @@ static struct ghes *ghes_new(struct acpi_hest_generic *generic) ...@@ -301,7 +301,7 @@ static struct ghes *ghes_new(struct acpi_hest_generic *generic)
if (!ghes) if (!ghes)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
ghes->generic = generic; ghes->generic = generic;
rc = acpi_os_map_generic_address(&generic->error_status_address); rc = apei_map_generic_address(&generic->error_status_address);
if (rc) if (rc)
goto err_free; goto err_free;
error_block_length = generic->error_block_length; error_block_length = generic->error_block_length;
...@@ -321,7 +321,7 @@ static struct ghes *ghes_new(struct acpi_hest_generic *generic) ...@@ -321,7 +321,7 @@ static struct ghes *ghes_new(struct acpi_hest_generic *generic)
return ghes; return ghes;
err_unmap: err_unmap:
acpi_os_unmap_generic_address(&generic->error_status_address); apei_unmap_generic_address(&generic->error_status_address);
err_free: err_free:
kfree(ghes); kfree(ghes);
return ERR_PTR(rc); return ERR_PTR(rc);
...@@ -330,7 +330,7 @@ static struct ghes *ghes_new(struct acpi_hest_generic *generic) ...@@ -330,7 +330,7 @@ static struct ghes *ghes_new(struct acpi_hest_generic *generic)
static void ghes_fini(struct ghes *ghes) static void ghes_fini(struct ghes *ghes)
{ {
kfree(ghes->estatus); kfree(ghes->estatus);
acpi_os_unmap_generic_address(&ghes->generic->error_status_address); apei_unmap_generic_address(&ghes->generic->error_status_address);
} }
enum { enum {
......
...@@ -173,7 +173,7 @@ static int param_set_trace_state(const char *val, struct kernel_param *kp) ...@@ -173,7 +173,7 @@ static int param_set_trace_state(const char *val, struct kernel_param *kp)
{ {
int result = 0; int result = 0;
if (!strncmp(val, "enable", strlen("enable") - 1)) { if (!strncmp(val, "enable", strlen("enable"))) {
result = acpi_debug_trace(trace_method_name, trace_debug_level, result = acpi_debug_trace(trace_method_name, trace_debug_level,
trace_debug_layer, 0); trace_debug_layer, 0);
if (result) if (result)
...@@ -181,7 +181,7 @@ static int param_set_trace_state(const char *val, struct kernel_param *kp) ...@@ -181,7 +181,7 @@ static int param_set_trace_state(const char *val, struct kernel_param *kp)
goto exit; goto exit;
} }
if (!strncmp(val, "disable", strlen("disable") - 1)) { if (!strncmp(val, "disable", strlen("disable"))) {
int name = 0; int name = 0;
result = acpi_debug_trace((char *)&name, trace_debug_level, result = acpi_debug_trace((char *)&name, trace_debug_level,
trace_debug_layer, 0); trace_debug_layer, 0);
......
...@@ -558,6 +558,8 @@ acpi_video_bus_DOS(struct acpi_video_bus *video, int bios_flag, int lcd_flag) ...@@ -558,6 +558,8 @@ acpi_video_bus_DOS(struct acpi_video_bus *video, int bios_flag, int lcd_flag)
union acpi_object arg0 = { ACPI_TYPE_INTEGER }; union acpi_object arg0 = { ACPI_TYPE_INTEGER };
struct acpi_object_list args = { 1, &arg0 }; struct acpi_object_list args = { 1, &arg0 };
if (!video->cap._DOS)
return 0;
if (bios_flag < 0 || bios_flag > 3 || lcd_flag < 0 || lcd_flag > 1) if (bios_flag < 0 || bios_flag > 3 || lcd_flag < 0 || lcd_flag > 1)
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment