Skip to content

Commit 4a22533

Browse files
committed
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: ACPI: sleep: init_set_sci_en_on_resume for Dell Studio 155x ACPI: fix acpi_hest_firmware_first_pci() caused oops sbshc: acpi_device_class "smbus_host_controller" too long power_meter: acpi_device_class "power_meter_resource" too long acpi_pad: "processor_aggregator" name too long PNP: don't check for conflicts with bridge windows ACPI: DMI init_set_sci_en_on_resume for multiple Lenovo ThinkPads PNPACPI: compute Address Space length rather than using _LEN ACPI: silence kmemcheck false positive
2 parents 417a9ef + 1468cf0 commit 4a22533

File tree

8 files changed

+160
-26
lines changed

8 files changed

+160
-26
lines changed

drivers/acpi/acpi_pad.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include <acpi/acpi_bus.h>
3232
#include <acpi/acpi_drivers.h>
3333

34-
#define ACPI_PROCESSOR_AGGREGATOR_CLASS "processor_aggregator"
34+
#define ACPI_PROCESSOR_AGGREGATOR_CLASS "acpi_pad"
3535
#define ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME "Processor Aggregator"
3636
#define ACPI_PROCESSOR_AGGREGATOR_NOTIFY 0x80
3737
static DEFINE_MUTEX(isolated_cpus_lock);

drivers/acpi/bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ int acpi_bus_generate_proc_event4(const char *device_class, const char *bus_id,
527527
if (!event_is_open)
528528
return 0;
529529

530-
event = kmalloc(sizeof(struct acpi_bus_event), GFP_ATOMIC);
530+
event = kzalloc(sizeof(struct acpi_bus_event), GFP_ATOMIC);
531531
if (!event)
532532
return -ENOMEM;
533533

drivers/acpi/hest.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ int acpi_hest_firmware_first_pci(struct pci_dev *pci)
123123
{
124124
acpi_status status = AE_NOT_FOUND;
125125
struct acpi_table_header *hest = NULL;
126+
127+
if (acpi_disabled)
128+
return 0;
129+
126130
status = acpi_get_table(ACPI_SIG_HEST, 1, &hest);
127131

128132
if (ACPI_SUCCESS(status)) {

drivers/acpi/power_meter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#define ACPI_POWER_METER_NAME "power_meter"
3636
ACPI_MODULE_NAME(ACPI_POWER_METER_NAME);
3737
#define ACPI_POWER_METER_DEVICE_NAME "Power Meter"
38-
#define ACPI_POWER_METER_CLASS "power_meter_resource"
38+
#define ACPI_POWER_METER_CLASS "pwr_meter_resource"
3939

4040
#define NUM_SENSORS 17
4141

drivers/acpi/sbshc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
#define PREFIX "ACPI: "
2020

21-
#define ACPI_SMB_HC_CLASS "smbus_host_controller"
21+
#define ACPI_SMB_HC_CLASS "smbus_host_ctl"
2222
#define ACPI_SMB_HC_DEVICE_NAME "ACPI SMBus HC"
2323

2424
struct acpi_smb_hc {

drivers/acpi/sleep.c

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,126 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
450450
},
451451
},
452452
{
453+
.callback = init_set_sci_en_on_resume,
454+
.ident = "Lenovo ThinkPad T410",
455+
.matches = {
456+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
457+
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T410"),
458+
},
459+
},
460+
{
461+
.callback = init_set_sci_en_on_resume,
462+
.ident = "Lenovo ThinkPad T510",
463+
.matches = {
464+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
465+
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T510"),
466+
},
467+
},
468+
{
469+
.callback = init_set_sci_en_on_resume,
470+
.ident = "Lenovo ThinkPad W510",
471+
.matches = {
472+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
473+
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad W510"),
474+
},
475+
},
476+
{
477+
.callback = init_set_sci_en_on_resume,
478+
.ident = "Lenovo ThinkPad X201",
479+
.matches = {
480+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
481+
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201"),
482+
},
483+
},
484+
{
485+
.callback = init_set_sci_en_on_resume,
486+
.ident = "Lenovo ThinkPad X201",
487+
.matches = {
488+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
489+
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201s"),
490+
},
491+
},
492+
{
493+
.callback = init_set_sci_en_on_resume,
494+
.ident = "Lenovo ThinkPad T410",
495+
.matches = {
496+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
497+
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T410"),
498+
},
499+
},
500+
{
501+
.callback = init_set_sci_en_on_resume,
502+
.ident = "Lenovo ThinkPad T510",
503+
.matches = {
504+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
505+
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T510"),
506+
},
507+
},
508+
{
509+
.callback = init_set_sci_en_on_resume,
510+
.ident = "Lenovo ThinkPad W510",
511+
.matches = {
512+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
513+
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad W510"),
514+
},
515+
},
516+
{
517+
.callback = init_set_sci_en_on_resume,
518+
.ident = "Lenovo ThinkPad X201",
519+
.matches = {
520+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
521+
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201"),
522+
},
523+
},
524+
{
525+
.callback = init_set_sci_en_on_resume,
526+
.ident = "Lenovo ThinkPad X201",
527+
.matches = {
528+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
529+
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201s"),
530+
},
531+
},
532+
{
533+
.callback = init_set_sci_en_on_resume,
534+
.ident = "Lenovo ThinkPad T410",
535+
.matches = {
536+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
537+
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T410"),
538+
},
539+
},
540+
{
541+
.callback = init_set_sci_en_on_resume,
542+
.ident = "Lenovo ThinkPad T510",
543+
.matches = {
544+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
545+
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T510"),
546+
},
547+
},
548+
{
549+
.callback = init_set_sci_en_on_resume,
550+
.ident = "Lenovo ThinkPad W510",
551+
.matches = {
552+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
553+
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad W510"),
554+
},
555+
},
556+
{
557+
.callback = init_set_sci_en_on_resume,
558+
.ident = "Lenovo ThinkPad X201",
559+
.matches = {
560+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
561+
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201"),
562+
},
563+
},
564+
{
565+
.callback = init_set_sci_en_on_resume,
566+
.ident = "Lenovo ThinkPad X201",
567+
.matches = {
568+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
569+
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201s"),
570+
},
571+
},
572+
{
453573
.callback = init_old_suspend_ordering,
454574
.ident = "Panasonic CF51-2L",
455575
.matches = {
@@ -458,6 +578,30 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
458578
DMI_MATCH(DMI_BOARD_NAME, "CF51-2L"),
459579
},
460580
},
581+
{
582+
.callback = init_set_sci_en_on_resume,
583+
.ident = "Dell Studio 1558",
584+
.matches = {
585+
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
586+
DMI_MATCH(DMI_PRODUCT_NAME, "Studio 1558"),
587+
},
588+
},
589+
{
590+
.callback = init_set_sci_en_on_resume,
591+
.ident = "Dell Studio 1557",
592+
.matches = {
593+
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
594+
DMI_MATCH(DMI_PRODUCT_NAME, "Studio 1557"),
595+
},
596+
},
597+
{
598+
.callback = init_set_sci_en_on_resume,
599+
.ident = "Dell Studio 1555",
600+
.matches = {
601+
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
602+
DMI_MATCH(DMI_PRODUCT_NAME, "Studio 1555"),
603+
},
604+
},
461605
{},
462606
};
463607
#endif /* CONFIG_SUSPEND */

drivers/pnp/pnpacpi/rsparser.c

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -274,26 +274,6 @@ static void pnpacpi_parse_allocated_busresource(struct pnp_dev *dev,
274274
pnp_add_bus_resource(dev, start, end);
275275
}
276276

277-
static u64 addr_space_length(struct pnp_dev *dev, u64 min, u64 max, u64 len)
278-
{
279-
u64 max_len;
280-
281-
max_len = max - min + 1;
282-
if (len <= max_len)
283-
return len;
284-
285-
/*
286-
* Per 6.4.3.5, _LEN cannot exceed _MAX - _MIN + 1, but some BIOSes
287-
* don't do this correctly, e.g.,
288-
* https://bugzilla.kernel.org/show_bug.cgi?id=15480
289-
*/
290-
dev_info(&dev->dev,
291-
"resource length %#llx doesn't fit in %#llx-%#llx, trimming\n",
292-
(unsigned long long) len, (unsigned long long) min,
293-
(unsigned long long) max);
294-
return max_len;
295-
}
296-
297277
static void pnpacpi_parse_allocated_address_space(struct pnp_dev *dev,
298278
struct acpi_resource *res)
299279
{
@@ -309,7 +289,8 @@ static void pnpacpi_parse_allocated_address_space(struct pnp_dev *dev,
309289
return;
310290
}
311291

312-
len = addr_space_length(dev, p->minimum, p->maximum, p->address_length);
292+
/* Windows apparently computes length rather than using _LEN */
293+
len = p->maximum - p->minimum + 1;
313294
window = (p->producer_consumer == ACPI_PRODUCER) ? 1 : 0;
314295

315296
if (p->resource_type == ACPI_MEMORY_RANGE)
@@ -330,7 +311,8 @@ static void pnpacpi_parse_allocated_ext_address_space(struct pnp_dev *dev,
330311
int window;
331312
u64 len;
332313

333-
len = addr_space_length(dev, p->minimum, p->maximum, p->address_length);
314+
/* Windows apparently computes length rather than using _LEN */
315+
len = p->maximum - p->minimum + 1;
334316
window = (p->producer_consumer == ACPI_PRODUCER) ? 1 : 0;
335317

336318
if (p->resource_type == ACPI_MEMORY_RANGE)

drivers/pnp/resource.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ int pnp_check_port(struct pnp_dev *dev, struct resource *res)
211211
if (tres->flags & IORESOURCE_IO) {
212212
if (cannot_compare(tres->flags))
213213
continue;
214+
if (tres->flags & IORESOURCE_WINDOW)
215+
continue;
214216
tport = &tres->start;
215217
tend = &tres->end;
216218
if (ranged_conflict(port, end, tport, tend))
@@ -271,6 +273,8 @@ int pnp_check_mem(struct pnp_dev *dev, struct resource *res)
271273
if (tres->flags & IORESOURCE_MEM) {
272274
if (cannot_compare(tres->flags))
273275
continue;
276+
if (tres->flags & IORESOURCE_WINDOW)
277+
continue;
274278
taddr = &tres->start;
275279
tend = &tres->end;
276280
if (ranged_conflict(addr, end, taddr, tend))

0 commit comments

Comments
 (0)