Skip to content

Commit c767609

Browse files
committed
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
2 parents 21f2729 + 6eca954 commit c767609

File tree

8 files changed

+59
-21
lines changed

8 files changed

+59
-21
lines changed

arch/x86/kernel/acpi/boot.c

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -422,12 +422,14 @@ acpi_parse_int_src_ovr(struct acpi_subtable_header * header,
422422
return 0;
423423
}
424424

425-
if (intsrc->source_irq == 0 && intsrc->global_irq == 2) {
425+
if (intsrc->source_irq == 0) {
426426
if (acpi_skip_timer_override) {
427-
printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n");
427+
printk(PREFIX "BIOS IRQ0 override ignored.\n");
428428
return 0;
429429
}
430-
if (acpi_fix_pin2_polarity && (intsrc->inti_flags & ACPI_MADT_POLARITY_MASK)) {
430+
431+
if ((intsrc->global_irq == 2) && acpi_fix_pin2_polarity
432+
&& (intsrc->inti_flags & ACPI_MADT_POLARITY_MASK)) {
431433
intsrc->inti_flags &= ~ACPI_MADT_POLARITY_MASK;
432434
printk(PREFIX "BIOS IRQ0 pin2 override: forcing polarity to high active.\n");
433435
}
@@ -1334,17 +1336,12 @@ static int __init dmi_disable_acpi(const struct dmi_system_id *d)
13341336
}
13351337

13361338
/*
1337-
* Force ignoring BIOS IRQ0 pin2 override
1339+
* Force ignoring BIOS IRQ0 override
13381340
*/
13391341
static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d)
13401342
{
1341-
/*
1342-
* The ati_ixp4x0_rev() early PCI quirk should have set
1343-
* the acpi_skip_timer_override flag already:
1344-
*/
13451343
if (!acpi_skip_timer_override) {
1346-
WARN(1, KERN_ERR "ati_ixp4x0 quirk not complete.\n");
1347-
pr_notice("%s detected: Ignoring BIOS IRQ0 pin2 override\n",
1344+
pr_notice("%s detected: Ignoring BIOS IRQ0 override\n",
13481345
d->ident);
13491346
acpi_skip_timer_override = 1;
13501347
}
@@ -1438,7 +1435,7 @@ static struct dmi_system_id __initdata acpi_dmi_table_late[] = {
14381435
* is enabled. This input is incorrectly designated the
14391436
* ISA IRQ 0 via an interrupt source override even though
14401437
* it is wired to the output of the master 8259A and INTIN0
1441-
* is not connected at all. Force ignoring BIOS IRQ0 pin2
1438+
* is not connected at all. Force ignoring BIOS IRQ0
14421439
* override in that cases.
14431440
*/
14441441
{
@@ -1473,6 +1470,14 @@ static struct dmi_system_id __initdata acpi_dmi_table_late[] = {
14731470
DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq 6715b"),
14741471
},
14751472
},
1473+
{
1474+
.callback = dmi_ignore_irq0_timer_override,
1475+
.ident = "FUJITSU SIEMENS",
1476+
.matches = {
1477+
DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
1478+
DMI_MATCH(DMI_PRODUCT_NAME, "AMILO PRO V2030"),
1479+
},
1480+
},
14761481
{}
14771482
};
14781483

arch/x86/kernel/reboot.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
451451
DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 990"),
452452
},
453453
},
454+
{ /* Handle problems with rebooting on the Precision M6600. */
455+
.callback = set_pci_reboot,
456+
.ident = "Dell OptiPlex 990",
457+
.matches = {
458+
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
459+
DMI_MATCH(DMI_PRODUCT_NAME, "Precision M6600"),
460+
},
461+
},
454462
{ }
455463
};
456464

drivers/acpi/acpi_pad.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#define ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME "Processor Aggregator"
3737
#define ACPI_PROCESSOR_AGGREGATOR_NOTIFY 0x80
3838
static DEFINE_MUTEX(isolated_cpus_lock);
39+
static DEFINE_MUTEX(round_robin_lock);
3940

4041
static unsigned long power_saving_mwait_eax;
4142

@@ -107,7 +108,7 @@ static void round_robin_cpu(unsigned int tsk_index)
107108
if (!alloc_cpumask_var(&tmp, GFP_KERNEL))
108109
return;
109110

110-
mutex_lock(&isolated_cpus_lock);
111+
mutex_lock(&round_robin_lock);
111112
cpumask_clear(tmp);
112113
for_each_cpu(cpu, pad_busy_cpus)
113114
cpumask_or(tmp, tmp, topology_thread_cpumask(cpu));
@@ -116,7 +117,7 @@ static void round_robin_cpu(unsigned int tsk_index)
116117
if (cpumask_empty(tmp))
117118
cpumask_andnot(tmp, cpu_online_mask, pad_busy_cpus);
118119
if (cpumask_empty(tmp)) {
119-
mutex_unlock(&isolated_cpus_lock);
120+
mutex_unlock(&round_robin_lock);
120121
return;
121122
}
122123
for_each_cpu(cpu, tmp) {
@@ -131,7 +132,7 @@ static void round_robin_cpu(unsigned int tsk_index)
131132
tsk_in_cpu[tsk_index] = preferred_cpu;
132133
cpumask_set_cpu(preferred_cpu, pad_busy_cpus);
133134
cpu_weight[preferred_cpu]++;
134-
mutex_unlock(&isolated_cpus_lock);
135+
mutex_unlock(&round_robin_lock);
135136

136137
set_cpus_allowed_ptr(current, cpumask_of(preferred_cpu));
137138
}

drivers/acpi/apei/apei-base.c

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ static int pre_map_gar_callback(struct apei_exec_context *ctx,
243243
u8 ins = entry->instruction;
244244

245245
if (ctx->ins_table[ins].flags & APEI_EXEC_INS_ACCESS_REGISTER)
246-
return acpi_os_map_generic_address(&entry->register_region);
246+
return apei_map_generic_address(&entry->register_region);
247247

248248
return 0;
249249
}
@@ -276,7 +276,7 @@ static int post_unmap_gar_callback(struct apei_exec_context *ctx,
276276
u8 ins = entry->instruction;
277277

278278
if (ctx->ins_table[ins].flags & APEI_EXEC_INS_ACCESS_REGISTER)
279-
acpi_os_unmap_generic_address(&entry->register_region);
279+
apei_unmap_generic_address(&entry->register_region);
280280

281281
return 0;
282282
}
@@ -606,6 +606,19 @@ static int apei_check_gar(struct acpi_generic_address *reg, u64 *paddr,
606606
return 0;
607607
}
608608

609+
int apei_map_generic_address(struct acpi_generic_address *reg)
610+
{
611+
int rc;
612+
u32 access_bit_width;
613+
u64 address;
614+
615+
rc = apei_check_gar(reg, &address, &access_bit_width);
616+
if (rc)
617+
return rc;
618+
return acpi_os_map_generic_address(reg);
619+
}
620+
EXPORT_SYMBOL_GPL(apei_map_generic_address);
621+
609622
/* read GAR in interrupt (including NMI) or process context */
610623
int apei_read(u64 *val, struct acpi_generic_address *reg)
611624
{

drivers/acpi/apei/apei-internal.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
#define APEI_INTERNAL_H
88

99
#include <linux/cper.h>
10+
#include <linux/acpi.h>
11+
#include <linux/acpi_io.h>
1012

1113
struct apei_exec_context;
1214

@@ -68,6 +70,13 @@ static inline int apei_exec_run_optional(struct apei_exec_context *ctx, u8 actio
6870
/* IP has been set in instruction function */
6971
#define APEI_EXEC_SET_IP 1
7072

73+
int apei_map_generic_address(struct acpi_generic_address *reg);
74+
75+
static inline void apei_unmap_generic_address(struct acpi_generic_address *reg)
76+
{
77+
acpi_os_unmap_generic_address(reg);
78+
}
79+
7180
int apei_read(u64 *val, struct acpi_generic_address *reg);
7281
int apei_write(u64 val, struct acpi_generic_address *reg);
7382

drivers/acpi/apei/ghes.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ static struct ghes *ghes_new(struct acpi_hest_generic *generic)
301301
if (!ghes)
302302
return ERR_PTR(-ENOMEM);
303303
ghes->generic = generic;
304-
rc = acpi_os_map_generic_address(&generic->error_status_address);
304+
rc = apei_map_generic_address(&generic->error_status_address);
305305
if (rc)
306306
goto err_free;
307307
error_block_length = generic->error_block_length;
@@ -321,7 +321,7 @@ static struct ghes *ghes_new(struct acpi_hest_generic *generic)
321321
return ghes;
322322

323323
err_unmap:
324-
acpi_os_unmap_generic_address(&generic->error_status_address);
324+
apei_unmap_generic_address(&generic->error_status_address);
325325
err_free:
326326
kfree(ghes);
327327
return ERR_PTR(rc);
@@ -330,7 +330,7 @@ static struct ghes *ghes_new(struct acpi_hest_generic *generic)
330330
static void ghes_fini(struct ghes *ghes)
331331
{
332332
kfree(ghes->estatus);
333-
acpi_os_unmap_generic_address(&ghes->generic->error_status_address);
333+
apei_unmap_generic_address(&ghes->generic->error_status_address);
334334
}
335335

336336
enum {

drivers/acpi/sysfs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,15 +173,15 @@ static int param_set_trace_state(const char *val, struct kernel_param *kp)
173173
{
174174
int result = 0;
175175

176-
if (!strncmp(val, "enable", strlen("enable") - 1)) {
176+
if (!strncmp(val, "enable", strlen("enable"))) {
177177
result = acpi_debug_trace(trace_method_name, trace_debug_level,
178178
trace_debug_layer, 0);
179179
if (result)
180180
result = -EBUSY;
181181
goto exit;
182182
}
183183

184-
if (!strncmp(val, "disable", strlen("disable") - 1)) {
184+
if (!strncmp(val, "disable", strlen("disable"))) {
185185
int name = 0;
186186
result = acpi_debug_trace((char *)&name, trace_debug_level,
187187
trace_debug_layer, 0);

drivers/acpi/video.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,8 @@ acpi_video_bus_DOS(struct acpi_video_bus *video, int bios_flag, int lcd_flag)
558558
union acpi_object arg0 = { ACPI_TYPE_INTEGER };
559559
struct acpi_object_list args = { 1, &arg0 };
560560

561+
if (!video->cap._DOS)
562+
return 0;
561563

562564
if (bios_flag < 0 || bios_flag > 3 || lcd_flag < 0 || lcd_flag > 1)
563565
return -EINVAL;

0 commit comments

Comments
 (0)