diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/acpi_cmos_rtc.c | 2 | ||||
-rw-r--r-- | drivers/acpi/acpi_lpss.c | 11 | ||||
-rw-r--r-- | drivers/acpi/button.c | 4 | ||||
-rw-r--r-- | drivers/acpi/container.c | 2 | ||||
-rw-r--r-- | drivers/acpi/dock.c | 2 | ||||
-rw-r--r-- | drivers/acpi/osl.c | 2 | ||||
-rw-r--r-- | drivers/acpi/pci_irq.c | 36 | ||||
-rw-r--r-- | drivers/acpi/pci_link.c | 2 | ||||
-rw-r--r-- | drivers/acpi/pci_root.c | 2 | ||||
-rw-r--r-- | drivers/acpi/power.c | 2 | ||||
-rw-r--r-- | drivers/acpi/processor_core.c | 1 | ||||
-rw-r--r-- | drivers/acpi/processor_driver.c | 2 | ||||
-rw-r--r-- | drivers/acpi/sysfs.c | 2 | ||||
-rw-r--r-- | drivers/acpi/tables.c | 128 | ||||
-rw-r--r-- | drivers/acpi/thermal.c | 37 | ||||
-rw-r--r-- | drivers/acpi/video.c | 2 | ||||
-rw-r--r-- | drivers/acpi/video_detect.c | 2 |
17 files changed, 129 insertions, 110 deletions
diff --git a/drivers/acpi/acpi_cmos_rtc.c b/drivers/acpi/acpi_cmos_rtc.c index 84190ed89c04..961b45d18a5d 100644 --- a/drivers/acpi/acpi_cmos_rtc.c +++ b/drivers/acpi/acpi_cmos_rtc.c | |||
@@ -18,8 +18,6 @@ | |||
18 | 18 | ||
19 | #include "internal.h" | 19 | #include "internal.h" |
20 | 20 | ||
21 | #define PREFIX "ACPI: " | ||
22 | |||
23 | ACPI_MODULE_NAME("cmos rtc"); | 21 | ACPI_MODULE_NAME("cmos rtc"); |
24 | 22 | ||
25 | static const struct acpi_device_id acpi_cmos_rtc_ids[] = { | 23 | static const struct acpi_device_id acpi_cmos_rtc_ids[] = { |
diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index 6745fe137b9e..8c2bae980faf 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c | |||
@@ -102,6 +102,16 @@ static struct lpss_device_desc lpt_sdio_dev_desc = { | |||
102 | .ltr_required = true, | 102 | .ltr_required = true, |
103 | }; | 103 | }; |
104 | 104 | ||
105 | static struct lpss_shared_clock pwm_clock = { | ||
106 | .name = "pwm_clk", | ||
107 | .rate = 25000000, | ||
108 | }; | ||
109 | |||
110 | static struct lpss_device_desc byt_pwm_dev_desc = { | ||
111 | .clk_required = true, | ||
112 | .shared_clock = &pwm_clock, | ||
113 | }; | ||
114 | |||
105 | static struct lpss_shared_clock uart_clock = { | 115 | static struct lpss_shared_clock uart_clock = { |
106 | .name = "uart_clk", | 116 | .name = "uart_clk", |
107 | .rate = 44236800, | 117 | .rate = 44236800, |
@@ -157,6 +167,7 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = { | |||
157 | { "INT33C7", }, | 167 | { "INT33C7", }, |
158 | 168 | ||
159 | /* BayTrail LPSS devices */ | 169 | /* BayTrail LPSS devices */ |
170 | { "80860F09", (unsigned long)&byt_pwm_dev_desc }, | ||
160 | { "80860F0A", (unsigned long)&byt_uart_dev_desc }, | 171 | { "80860F0A", (unsigned long)&byt_uart_dev_desc }, |
161 | { "80860F0E", (unsigned long)&byt_spi_dev_desc }, | 172 | { "80860F0E", (unsigned long)&byt_spi_dev_desc }, |
162 | { "80860F14", (unsigned long)&byt_sdio_dev_desc }, | 173 | { "80860F14", (unsigned long)&byt_sdio_dev_desc }, |
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 714e957a871a..db35594d4df7 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c | |||
@@ -302,6 +302,10 @@ static void acpi_button_notify(struct acpi_device *device, u32 event) | |||
302 | input_sync(input); | 302 | input_sync(input); |
303 | 303 | ||
304 | pm_wakeup_event(&device->dev, 0); | 304 | pm_wakeup_event(&device->dev, 0); |
305 | acpi_bus_generate_netlink_event( | ||
306 | device->pnp.device_class, | ||
307 | dev_name(&device->dev), | ||
308 | event, ++button->pushed); | ||
305 | } | 309 | } |
306 | break; | 310 | break; |
307 | default: | 311 | default: |
diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c index a55cccbc7356..63119d09b354 100644 --- a/drivers/acpi/container.c +++ b/drivers/acpi/container.c | |||
@@ -31,8 +31,6 @@ | |||
31 | 31 | ||
32 | #include "internal.h" | 32 | #include "internal.h" |
33 | 33 | ||
34 | #define PREFIX "ACPI: " | ||
35 | |||
36 | #define _COMPONENT ACPI_CONTAINER_COMPONENT | 34 | #define _COMPONENT ACPI_CONTAINER_COMPONENT |
37 | ACPI_MODULE_NAME("container"); | 35 | ACPI_MODULE_NAME("container"); |
38 | 36 | ||
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index a7bd3002dbbc..f0fc6260266b 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c | |||
@@ -37,8 +37,6 @@ | |||
37 | 37 | ||
38 | #include "internal.h" | 38 | #include "internal.h" |
39 | 39 | ||
40 | #define PREFIX "ACPI: " | ||
41 | |||
42 | #define ACPI_DOCK_DRIVER_DESCRIPTION "ACPI Dock Station Driver" | 40 | #define ACPI_DOCK_DRIVER_DESCRIPTION "ACPI Dock Station Driver" |
43 | 41 | ||
44 | ACPI_MODULE_NAME("dock"); | 42 | ACPI_MODULE_NAME("dock"); |
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index afb4be566940..67cdaf583bdd 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -52,7 +52,7 @@ | |||
52 | 52 | ||
53 | #define _COMPONENT ACPI_OS_SERVICES | 53 | #define _COMPONENT ACPI_OS_SERVICES |
54 | ACPI_MODULE_NAME("osl"); | 54 | ACPI_MODULE_NAME("osl"); |
55 | #define PREFIX "ACPI: " | 55 | |
56 | struct acpi_os_dpc { | 56 | struct acpi_os_dpc { |
57 | acpi_osd_exec_callback function; | 57 | acpi_osd_exec_callback function; |
58 | void *context; | 58 | void *context; |
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index 361b40c10c3f..9c62340c2360 100644 --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c | |||
@@ -370,6 +370,30 @@ static struct acpi_prt_entry *acpi_pci_irq_lookup(struct pci_dev *dev, int pin) | |||
370 | return NULL; | 370 | return NULL; |
371 | } | 371 | } |
372 | 372 | ||
373 | #if IS_ENABLED(CONFIG_ISA) || IS_ENABLED(CONFIG_EISA) | ||
374 | static int acpi_isa_register_gsi(struct pci_dev *dev) | ||
375 | { | ||
376 | u32 dev_gsi; | ||
377 | |||
378 | /* Interrupt Line values above 0xF are forbidden */ | ||
379 | if (dev->irq > 0 && (dev->irq <= 0xF) && | ||
380 | (acpi_isa_irq_to_gsi(dev->irq, &dev_gsi) == 0)) { | ||
381 | dev_warn(&dev->dev, "PCI INT %c: no GSI - using ISA IRQ %d\n", | ||
382 | pin_name(dev->pin), dev->irq); | ||
383 | acpi_register_gsi(&dev->dev, dev_gsi, | ||
384 | ACPI_LEVEL_SENSITIVE, | ||
385 | ACPI_ACTIVE_LOW); | ||
386 | return 0; | ||
387 | } | ||
388 | return -EINVAL; | ||
389 | } | ||
390 | #else | ||
391 | static inline int acpi_isa_register_gsi(struct pci_dev *dev) | ||
392 | { | ||
393 | return -ENODEV; | ||
394 | } | ||
395 | #endif | ||
396 | |||
373 | int acpi_pci_irq_enable(struct pci_dev *dev) | 397 | int acpi_pci_irq_enable(struct pci_dev *dev) |
374 | { | 398 | { |
375 | struct acpi_prt_entry *entry; | 399 | struct acpi_prt_entry *entry; |
@@ -416,19 +440,9 @@ int acpi_pci_irq_enable(struct pci_dev *dev) | |||
416 | * driver reported one, then use it. Exit in any case. | 440 | * driver reported one, then use it. Exit in any case. |
417 | */ | 441 | */ |
418 | if (gsi < 0) { | 442 | if (gsi < 0) { |
419 | u32 dev_gsi; | 443 | if (acpi_isa_register_gsi(dev)) |
420 | /* Interrupt Line values above 0xF are forbidden */ | ||
421 | if (dev->irq > 0 && (dev->irq <= 0xF) && | ||
422 | (acpi_isa_irq_to_gsi(dev->irq, &dev_gsi) == 0)) { | ||
423 | dev_warn(&dev->dev, "PCI INT %c: no GSI - using ISA IRQ %d\n", | ||
424 | pin_name(pin), dev->irq); | ||
425 | acpi_register_gsi(&dev->dev, dev_gsi, | ||
426 | ACPI_LEVEL_SENSITIVE, | ||
427 | ACPI_ACTIVE_LOW); | ||
428 | } else { | ||
429 | dev_warn(&dev->dev, "PCI INT %c: no GSI\n", | 444 | dev_warn(&dev->dev, "PCI INT %c: no GSI\n", |
430 | pin_name(pin)); | 445 | pin_name(pin)); |
431 | } | ||
432 | 446 | ||
433 | kfree(entry); | 447 | kfree(entry); |
434 | return 0; | 448 | return 0; |
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c index 9418c7a1f786..cfd7581cc19f 100644 --- a/drivers/acpi/pci_link.c +++ b/drivers/acpi/pci_link.c | |||
@@ -43,8 +43,6 @@ | |||
43 | 43 | ||
44 | #include "internal.h" | 44 | #include "internal.h" |
45 | 45 | ||
46 | #define PREFIX "ACPI: " | ||
47 | |||
48 | #define _COMPONENT ACPI_PCI_COMPONENT | 46 | #define _COMPONENT ACPI_PCI_COMPONENT |
49 | ACPI_MODULE_NAME("pci_link"); | 47 | ACPI_MODULE_NAME("pci_link"); |
50 | #define ACPI_PCI_LINK_CLASS "pci_irq_routing" | 48 | #define ACPI_PCI_LINK_CLASS "pci_irq_routing" |
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index c288ff3c6998..d388f13d48b4 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c | |||
@@ -39,8 +39,6 @@ | |||
39 | 39 | ||
40 | #include "internal.h" | 40 | #include "internal.h" |
41 | 41 | ||
42 | #define PREFIX "ACPI: " | ||
43 | |||
44 | #define _COMPONENT ACPI_PCI_COMPONENT | 42 | #define _COMPONENT ACPI_PCI_COMPONENT |
45 | ACPI_MODULE_NAME("pci_root"); | 43 | ACPI_MODULE_NAME("pci_root"); |
46 | #define ACPI_PCI_ROOT_CLASS "pci_bridge" | 44 | #define ACPI_PCI_ROOT_CLASS "pci_bridge" |
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index ad7da686e6e6..e0bcfb642b52 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c | |||
@@ -46,8 +46,6 @@ | |||
46 | #include "sleep.h" | 46 | #include "sleep.h" |
47 | #include "internal.h" | 47 | #include "internal.h" |
48 | 48 | ||
49 | #define PREFIX "ACPI: " | ||
50 | |||
51 | #define _COMPONENT ACPI_POWER_COMPONENT | 49 | #define _COMPONENT ACPI_POWER_COMPONENT |
52 | ACPI_MODULE_NAME("power"); | 50 | ACPI_MODULE_NAME("power"); |
53 | #define ACPI_POWER_CLASS "power_resource" | 51 | #define ACPI_POWER_CLASS "power_resource" |
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index a4eea9a508d3..57e0769656c6 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -15,7 +15,6 @@ | |||
15 | 15 | ||
16 | #include "internal.h" | 16 | #include "internal.h" |
17 | 17 | ||
18 | #define PREFIX "ACPI: " | ||
19 | #define _COMPONENT ACPI_PROCESSOR_COMPONENT | 18 | #define _COMPONENT ACPI_PROCESSOR_COMPONENT |
20 | ACPI_MODULE_NAME("processor_core"); | 19 | ACPI_MODULE_NAME("processor_core"); |
21 | 20 | ||
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index c1c35623550f..7f70f3182d50 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c | |||
@@ -41,8 +41,6 @@ | |||
41 | 41 | ||
42 | #include "internal.h" | 42 | #include "internal.h" |
43 | 43 | ||
44 | #define PREFIX "ACPI: " | ||
45 | |||
46 | #define ACPI_PROCESSOR_NOTIFY_PERFORMANCE 0x80 | 44 | #define ACPI_PROCESSOR_NOTIFY_PERFORMANCE 0x80 |
47 | #define ACPI_PROCESSOR_NOTIFY_POWER 0x81 | 45 | #define ACPI_PROCESSOR_NOTIFY_POWER 0x81 |
48 | #define ACPI_PROCESSOR_NOTIFY_THROTTLING 0x82 | 46 | #define ACPI_PROCESSOR_NOTIFY_THROTTLING 0x82 |
diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c index 91a32cefb11f..38cb9782d4b8 100644 --- a/drivers/acpi/sysfs.c +++ b/drivers/acpi/sysfs.c | |||
@@ -12,8 +12,6 @@ | |||
12 | #define _COMPONENT ACPI_SYSTEM_COMPONENT | 12 | #define _COMPONENT ACPI_SYSTEM_COMPONENT |
13 | ACPI_MODULE_NAME("sysfs"); | 13 | ACPI_MODULE_NAME("sysfs"); |
14 | 14 | ||
15 | #define PREFIX "ACPI: " | ||
16 | |||
17 | #ifdef CONFIG_ACPI_DEBUG | 15 | #ifdef CONFIG_ACPI_DEBUG |
18 | /* | 16 | /* |
19 | * ACPI debug sysfs I/F, including: | 17 | * ACPI debug sysfs I/F, including: |
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index 5837f857ac2e..21782290df41 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c | |||
@@ -23,6 +23,8 @@ | |||
23 | * | 23 | * |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #define pr_fmt(fmt) "ACPI: " fmt | ||
27 | |||
26 | #include <linux/init.h> | 28 | #include <linux/init.h> |
27 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
28 | #include <linux/smp.h> | 30 | #include <linux/smp.h> |
@@ -33,8 +35,6 @@ | |||
33 | #include <linux/acpi.h> | 35 | #include <linux/acpi.h> |
34 | #include <linux/bootmem.h> | 36 | #include <linux/bootmem.h> |
35 | 37 | ||
36 | #define PREFIX "ACPI: " | ||
37 | |||
38 | #define ACPI_MAX_TABLES 128 | 38 | #define ACPI_MAX_TABLES 128 |
39 | 39 | ||
40 | static char *mps_inti_flags_polarity[] = { "dfl", "high", "res", "low" }; | 40 | static char *mps_inti_flags_polarity[] = { "dfl", "high", "res", "low" }; |
@@ -55,10 +55,9 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) | |||
55 | { | 55 | { |
56 | struct acpi_madt_local_apic *p = | 56 | struct acpi_madt_local_apic *p = |
57 | (struct acpi_madt_local_apic *)header; | 57 | (struct acpi_madt_local_apic *)header; |
58 | printk(KERN_INFO PREFIX | 58 | pr_info("LAPIC (acpi_id[0x%02x] lapic_id[0x%02x] %s)\n", |
59 | "LAPIC (acpi_id[0x%02x] lapic_id[0x%02x] %s)\n", | 59 | p->processor_id, p->id, |
60 | p->processor_id, p->id, | 60 | (p->lapic_flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled"); |
61 | (p->lapic_flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled"); | ||
62 | } | 61 | } |
63 | break; | 62 | break; |
64 | 63 | ||
@@ -66,11 +65,9 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) | |||
66 | { | 65 | { |
67 | struct acpi_madt_local_x2apic *p = | 66 | struct acpi_madt_local_x2apic *p = |
68 | (struct acpi_madt_local_x2apic *)header; | 67 | (struct acpi_madt_local_x2apic *)header; |
69 | printk(KERN_INFO PREFIX | 68 | pr_info("X2APIC (apic_id[0x%02x] uid[0x%02x] %s)\n", |
70 | "X2APIC (apic_id[0x%02x] uid[0x%02x] %s)\n", | 69 | p->local_apic_id, p->uid, |
71 | p->local_apic_id, p->uid, | 70 | (p->lapic_flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled"); |
72 | (p->lapic_flags & ACPI_MADT_ENABLED) ? | ||
73 | "enabled" : "disabled"); | ||
74 | } | 71 | } |
75 | break; | 72 | break; |
76 | 73 | ||
@@ -78,9 +75,8 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) | |||
78 | { | 75 | { |
79 | struct acpi_madt_io_apic *p = | 76 | struct acpi_madt_io_apic *p = |
80 | (struct acpi_madt_io_apic *)header; | 77 | (struct acpi_madt_io_apic *)header; |
81 | printk(KERN_INFO PREFIX | 78 | pr_info("IOAPIC (id[0x%02x] address[0x%08x] gsi_base[%d])\n", |
82 | "IOAPIC (id[0x%02x] address[0x%08x] gsi_base[%d])\n", | 79 | p->id, p->address, p->global_irq_base); |
83 | p->id, p->address, p->global_irq_base); | ||
84 | } | 80 | } |
85 | break; | 81 | break; |
86 | 82 | ||
@@ -88,18 +84,15 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) | |||
88 | { | 84 | { |
89 | struct acpi_madt_interrupt_override *p = | 85 | struct acpi_madt_interrupt_override *p = |
90 | (struct acpi_madt_interrupt_override *)header; | 86 | (struct acpi_madt_interrupt_override *)header; |
91 | printk(KERN_INFO PREFIX | 87 | pr_info("INT_SRC_OVR (bus %d bus_irq %d global_irq %d %s %s)\n", |
92 | "INT_SRC_OVR (bus %d bus_irq %d global_irq %d %s %s)\n", | 88 | p->bus, p->source_irq, p->global_irq, |
93 | p->bus, p->source_irq, p->global_irq, | 89 | mps_inti_flags_polarity[p->inti_flags & ACPI_MADT_POLARITY_MASK], |
94 | mps_inti_flags_polarity[p->inti_flags & ACPI_MADT_POLARITY_MASK], | 90 | mps_inti_flags_trigger[(p->inti_flags & ACPI_MADT_TRIGGER_MASK) >> 2]); |
95 | mps_inti_flags_trigger[(p->inti_flags & ACPI_MADT_TRIGGER_MASK) >> 2]); | ||
96 | if (p->inti_flags & | 91 | if (p->inti_flags & |
97 | ~(ACPI_MADT_POLARITY_MASK | ACPI_MADT_TRIGGER_MASK)) | 92 | ~(ACPI_MADT_POLARITY_MASK | ACPI_MADT_TRIGGER_MASK)) |
98 | printk(KERN_INFO PREFIX | 93 | pr_info("INT_SRC_OVR unexpected reserved flags: 0x%x\n", |
99 | "INT_SRC_OVR unexpected reserved flags: 0x%x\n", | 94 | p->inti_flags & |
100 | p->inti_flags & | ||
101 | ~(ACPI_MADT_POLARITY_MASK | ACPI_MADT_TRIGGER_MASK)); | 95 | ~(ACPI_MADT_POLARITY_MASK | ACPI_MADT_TRIGGER_MASK)); |
102 | |||
103 | } | 96 | } |
104 | break; | 97 | break; |
105 | 98 | ||
@@ -107,11 +100,10 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) | |||
107 | { | 100 | { |
108 | struct acpi_madt_nmi_source *p = | 101 | struct acpi_madt_nmi_source *p = |
109 | (struct acpi_madt_nmi_source *)header; | 102 | (struct acpi_madt_nmi_source *)header; |
110 | printk(KERN_INFO PREFIX | 103 | pr_info("NMI_SRC (%s %s global_irq %d)\n", |
111 | "NMI_SRC (%s %s global_irq %d)\n", | 104 | mps_inti_flags_polarity[p->inti_flags & ACPI_MADT_POLARITY_MASK], |
112 | mps_inti_flags_polarity[p->inti_flags & ACPI_MADT_POLARITY_MASK], | 105 | mps_inti_flags_trigger[(p->inti_flags & ACPI_MADT_TRIGGER_MASK) >> 2], |
113 | mps_inti_flags_trigger[(p->inti_flags & ACPI_MADT_TRIGGER_MASK) >> 2], | 106 | p->global_irq); |
114 | p->global_irq); | ||
115 | } | 107 | } |
116 | break; | 108 | break; |
117 | 109 | ||
@@ -119,12 +111,11 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) | |||
119 | { | 111 | { |
120 | struct acpi_madt_local_apic_nmi *p = | 112 | struct acpi_madt_local_apic_nmi *p = |
121 | (struct acpi_madt_local_apic_nmi *)header; | 113 | (struct acpi_madt_local_apic_nmi *)header; |
122 | printk(KERN_INFO PREFIX | 114 | pr_info("LAPIC_NMI (acpi_id[0x%02x] %s %s lint[0x%x])\n", |
123 | "LAPIC_NMI (acpi_id[0x%02x] %s %s lint[0x%x])\n", | 115 | p->processor_id, |
124 | p->processor_id, | 116 | mps_inti_flags_polarity[p->inti_flags & ACPI_MADT_POLARITY_MASK ], |
125 | mps_inti_flags_polarity[p->inti_flags & ACPI_MADT_POLARITY_MASK ], | 117 | mps_inti_flags_trigger[(p->inti_flags & ACPI_MADT_TRIGGER_MASK) >> 2], |
126 | mps_inti_flags_trigger[(p->inti_flags & ACPI_MADT_TRIGGER_MASK) >> 2], | 118 | p->lint); |
127 | p->lint); | ||
128 | } | 119 | } |
129 | break; | 120 | break; |
130 | 121 | ||
@@ -137,12 +128,11 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) | |||
137 | polarity = p->inti_flags & ACPI_MADT_POLARITY_MASK; | 128 | polarity = p->inti_flags & ACPI_MADT_POLARITY_MASK; |
138 | trigger = (p->inti_flags & ACPI_MADT_TRIGGER_MASK) >> 2; | 129 | trigger = (p->inti_flags & ACPI_MADT_TRIGGER_MASK) >> 2; |
139 | 130 | ||
140 | printk(KERN_INFO PREFIX | 131 | pr_info("X2APIC_NMI (uid[0x%02x] %s %s lint[0x%x])\n", |
141 | "X2APIC_NMI (uid[0x%02x] %s %s lint[0x%x])\n", | 132 | p->uid, |
142 | p->uid, | 133 | mps_inti_flags_polarity[polarity], |
143 | mps_inti_flags_polarity[polarity], | 134 | mps_inti_flags_trigger[trigger], |
144 | mps_inti_flags_trigger[trigger], | 135 | p->lint); |
145 | p->lint); | ||
146 | } | 136 | } |
147 | break; | 137 | break; |
148 | 138 | ||
@@ -150,9 +140,8 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) | |||
150 | { | 140 | { |
151 | struct acpi_madt_local_apic_override *p = | 141 | struct acpi_madt_local_apic_override *p = |
152 | (struct acpi_madt_local_apic_override *)header; | 142 | (struct acpi_madt_local_apic_override *)header; |
153 | printk(KERN_INFO PREFIX | 143 | pr_info("LAPIC_ADDR_OVR (address[%p])\n", |
154 | "LAPIC_ADDR_OVR (address[%p])\n", | 144 | (void *)(unsigned long)p->address); |
155 | (void *)(unsigned long)p->address); | ||
156 | } | 145 | } |
157 | break; | 146 | break; |
158 | 147 | ||
@@ -160,10 +149,9 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) | |||
160 | { | 149 | { |
161 | struct acpi_madt_io_sapic *p = | 150 | struct acpi_madt_io_sapic *p = |
162 | (struct acpi_madt_io_sapic *)header; | 151 | (struct acpi_madt_io_sapic *)header; |
163 | printk(KERN_INFO PREFIX | 152 | pr_info("IOSAPIC (id[0x%x] address[%p] gsi_base[%d])\n", |
164 | "IOSAPIC (id[0x%x] address[%p] gsi_base[%d])\n", | 153 | p->id, (void *)(unsigned long)p->address, |
165 | p->id, (void *)(unsigned long)p->address, | 154 | p->global_irq_base); |
166 | p->global_irq_base); | ||
167 | } | 155 | } |
168 | break; | 156 | break; |
169 | 157 | ||
@@ -171,10 +159,9 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) | |||
171 | { | 159 | { |
172 | struct acpi_madt_local_sapic *p = | 160 | struct acpi_madt_local_sapic *p = |
173 | (struct acpi_madt_local_sapic *)header; | 161 | (struct acpi_madt_local_sapic *)header; |
174 | printk(KERN_INFO PREFIX | 162 | pr_info("LSAPIC (acpi_id[0x%02x] lsapic_id[0x%02x] lsapic_eid[0x%02x] %s)\n", |
175 | "LSAPIC (acpi_id[0x%02x] lsapic_id[0x%02x] lsapic_eid[0x%02x] %s)\n", | 163 | p->processor_id, p->id, p->eid, |
176 | p->processor_id, p->id, p->eid, | 164 | (p->lapic_flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled"); |
177 | (p->lapic_flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled"); | ||
178 | } | 165 | } |
179 | break; | 166 | break; |
180 | 167 | ||
@@ -182,19 +169,17 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) | |||
182 | { | 169 | { |
183 | struct acpi_madt_interrupt_source *p = | 170 | struct acpi_madt_interrupt_source *p = |
184 | (struct acpi_madt_interrupt_source *)header; | 171 | (struct acpi_madt_interrupt_source *)header; |
185 | printk(KERN_INFO PREFIX | 172 | pr_info("PLAT_INT_SRC (%s %s type[0x%x] id[0x%04x] eid[0x%x] iosapic_vector[0x%x] global_irq[0x%x]\n", |
186 | "PLAT_INT_SRC (%s %s type[0x%x] id[0x%04x] eid[0x%x] iosapic_vector[0x%x] global_irq[0x%x]\n", | 173 | mps_inti_flags_polarity[p->inti_flags & ACPI_MADT_POLARITY_MASK], |
187 | mps_inti_flags_polarity[p->inti_flags & ACPI_MADT_POLARITY_MASK], | 174 | mps_inti_flags_trigger[(p->inti_flags & ACPI_MADT_TRIGGER_MASK) >> 2], |
188 | mps_inti_flags_trigger[(p->inti_flags & ACPI_MADT_TRIGGER_MASK) >> 2], | 175 | p->type, p->id, p->eid, p->io_sapic_vector, |
189 | p->type, p->id, p->eid, p->io_sapic_vector, | 176 | p->global_irq); |
190 | p->global_irq); | ||
191 | } | 177 | } |
192 | break; | 178 | break; |
193 | 179 | ||
194 | default: | 180 | default: |
195 | printk(KERN_WARNING PREFIX | 181 | pr_warn("Found unsupported MADT entry (type = 0x%x)\n", |
196 | "Found unsupported MADT entry (type = 0x%x)\n", | 182 | header->type); |
197 | header->type); | ||
198 | break; | 183 | break; |
199 | } | 184 | } |
200 | } | 185 | } |
@@ -225,7 +210,7 @@ acpi_table_parse_entries(char *id, | |||
225 | acpi_get_table_with_size(id, 0, &table_header, &tbl_size); | 210 | acpi_get_table_with_size(id, 0, &table_header, &tbl_size); |
226 | 211 | ||
227 | if (!table_header) { | 212 | if (!table_header) { |
228 | printk(KERN_WARNING PREFIX "%4.4s not present\n", id); | 213 | pr_warn("%4.4s not present\n", id); |
229 | return -ENODEV; | 214 | return -ENODEV; |
230 | } | 215 | } |
231 | 216 | ||
@@ -248,7 +233,7 @@ acpi_table_parse_entries(char *id, | |||
248 | * infinite loop. | 233 | * infinite loop. |
249 | */ | 234 | */ |
250 | if (entry->length == 0) { | 235 | if (entry->length == 0) { |
251 | pr_err(PREFIX "[%4.4s:0x%02x] Invalid zero length\n", id, entry_id); | 236 | pr_err("[%4.4s:0x%02x] Invalid zero length\n", id, entry_id); |
252 | goto err; | 237 | goto err; |
253 | } | 238 | } |
254 | 239 | ||
@@ -256,8 +241,8 @@ acpi_table_parse_entries(char *id, | |||
256 | ((unsigned long)entry + entry->length); | 241 | ((unsigned long)entry + entry->length); |
257 | } | 242 | } |
258 | if (max_entries && count > max_entries) { | 243 | if (max_entries && count > max_entries) { |
259 | printk(KERN_WARNING PREFIX "[%4.4s:0x%02x] ignored %i entries of " | 244 | pr_warn("[%4.4s:0x%02x] ignored %i entries of %i found\n", |
260 | "%i found\n", id, entry_id, count - max_entries, count); | 245 | id, entry_id, count - max_entries, count); |
261 | } | 246 | } |
262 | 247 | ||
263 | early_acpi_os_unmap_memory((char *)table_header, tbl_size); | 248 | early_acpi_os_unmap_memory((char *)table_header, tbl_size); |
@@ -322,13 +307,11 @@ static void __init check_multiple_madt(void) | |||
322 | 307 | ||
323 | acpi_get_table_with_size(ACPI_SIG_MADT, 2, &table, &tbl_size); | 308 | acpi_get_table_with_size(ACPI_SIG_MADT, 2, &table, &tbl_size); |
324 | if (table) { | 309 | if (table) { |
325 | printk(KERN_WARNING PREFIX | 310 | pr_warn("BIOS bug: multiple APIC/MADT found, using %d\n", |
326 | "BIOS bug: multiple APIC/MADT found," | 311 | acpi_apic_instance); |
327 | " using %d\n", acpi_apic_instance); | 312 | pr_warn("If \"acpi_apic_instance=%d\" works better, " |
328 | printk(KERN_WARNING PREFIX | 313 | "notify linux-acpi@vger.kernel.org\n", |
329 | "If \"acpi_apic_instance=%d\" works better, " | 314 | acpi_apic_instance ? 0 : 2); |
330 | "notify linux-acpi@vger.kernel.org\n", | ||
331 | acpi_apic_instance ? 0 : 2); | ||
332 | early_acpi_os_unmap_memory(table, tbl_size); | 315 | early_acpi_os_unmap_memory(table, tbl_size); |
333 | 316 | ||
334 | } else | 317 | } else |
@@ -365,8 +348,7 @@ static int __init acpi_parse_apic_instance(char *str) | |||
365 | 348 | ||
366 | acpi_apic_instance = simple_strtoul(str, NULL, 0); | 349 | acpi_apic_instance = simple_strtoul(str, NULL, 0); |
367 | 350 | ||
368 | printk(KERN_NOTICE PREFIX "Shall use APIC/MADT table %d\n", | 351 | pr_notice("Shall use APIC/MADT table %d\n", acpi_apic_instance); |
369 | acpi_apic_instance); | ||
370 | 352 | ||
371 | return 0; | 353 | return 0; |
372 | } | 354 | } |
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 08626c851be7..964068553334 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <linux/device.h> | 43 | #include <linux/device.h> |
44 | #include <linux/thermal.h> | 44 | #include <linux/thermal.h> |
45 | #include <linux/acpi.h> | 45 | #include <linux/acpi.h> |
46 | #include <linux/workqueue.h> | ||
46 | #include <asm/uaccess.h> | 47 | #include <asm/uaccess.h> |
47 | 48 | ||
48 | #define PREFIX "ACPI: " | 49 | #define PREFIX "ACPI: " |
@@ -90,6 +91,8 @@ static int psv; | |||
90 | module_param(psv, int, 0644); | 91 | module_param(psv, int, 0644); |
91 | MODULE_PARM_DESC(psv, "Disable or override all passive trip points."); | 92 | MODULE_PARM_DESC(psv, "Disable or override all passive trip points."); |
92 | 93 | ||
94 | static struct workqueue_struct *acpi_thermal_pm_queue; | ||
95 | |||
93 | static int acpi_thermal_add(struct acpi_device *device); | 96 | static int acpi_thermal_add(struct acpi_device *device); |
94 | static int acpi_thermal_remove(struct acpi_device *device); | 97 | static int acpi_thermal_remove(struct acpi_device *device); |
95 | static void acpi_thermal_notify(struct acpi_device *device, u32 event); | 98 | static void acpi_thermal_notify(struct acpi_device *device, u32 event); |
@@ -101,11 +104,13 @@ static const struct acpi_device_id thermal_device_ids[] = { | |||
101 | MODULE_DEVICE_TABLE(acpi, thermal_device_ids); | 104 | MODULE_DEVICE_TABLE(acpi, thermal_device_ids); |
102 | 105 | ||
103 | #ifdef CONFIG_PM_SLEEP | 106 | #ifdef CONFIG_PM_SLEEP |
107 | static int acpi_thermal_suspend(struct device *dev); | ||
104 | static int acpi_thermal_resume(struct device *dev); | 108 | static int acpi_thermal_resume(struct device *dev); |
105 | #else | 109 | #else |
110 | #define acpi_thermal_suspend NULL | ||
106 | #define acpi_thermal_resume NULL | 111 | #define acpi_thermal_resume NULL |
107 | #endif | 112 | #endif |
108 | static SIMPLE_DEV_PM_OPS(acpi_thermal_pm, NULL, acpi_thermal_resume); | 113 | static SIMPLE_DEV_PM_OPS(acpi_thermal_pm, acpi_thermal_suspend, acpi_thermal_resume); |
109 | 114 | ||
110 | static struct acpi_driver acpi_thermal_driver = { | 115 | static struct acpi_driver acpi_thermal_driver = { |
111 | .name = "thermal", | 116 | .name = "thermal", |
@@ -186,6 +191,7 @@ struct acpi_thermal { | |||
186 | struct thermal_zone_device *thermal_zone; | 191 | struct thermal_zone_device *thermal_zone; |
187 | int tz_enabled; | 192 | int tz_enabled; |
188 | int kelvin_offset; | 193 | int kelvin_offset; |
194 | struct work_struct thermal_check_work; | ||
189 | }; | 195 | }; |
190 | 196 | ||
191 | /* -------------------------------------------------------------------------- | 197 | /* -------------------------------------------------------------------------- |
@@ -1064,6 +1070,13 @@ static void acpi_thermal_guess_offset(struct acpi_thermal *tz) | |||
1064 | tz->kelvin_offset = 2732; | 1070 | tz->kelvin_offset = 2732; |
1065 | } | 1071 | } |
1066 | 1072 | ||
1073 | static void acpi_thermal_check_fn(struct work_struct *work) | ||
1074 | { | ||
1075 | struct acpi_thermal *tz = container_of(work, struct acpi_thermal, | ||
1076 | thermal_check_work); | ||
1077 | acpi_thermal_check(tz); | ||
1078 | } | ||
1079 | |||
1067 | static int acpi_thermal_add(struct acpi_device *device) | 1080 | static int acpi_thermal_add(struct acpi_device *device) |
1068 | { | 1081 | { |
1069 | int result = 0; | 1082 | int result = 0; |
@@ -1093,6 +1106,8 @@ static int acpi_thermal_add(struct acpi_device *device) | |||
1093 | if (result) | 1106 | if (result) |
1094 | goto free_memory; | 1107 | goto free_memory; |
1095 | 1108 | ||
1109 | INIT_WORK(&tz->thermal_check_work, acpi_thermal_check_fn); | ||
1110 | |||
1096 | pr_info(PREFIX "%s [%s] (%ld C)\n", acpi_device_name(device), | 1111 | pr_info(PREFIX "%s [%s] (%ld C)\n", acpi_device_name(device), |
1097 | acpi_device_bid(device), KELVIN_TO_CELSIUS(tz->temperature)); | 1112 | acpi_device_bid(device), KELVIN_TO_CELSIUS(tz->temperature)); |
1098 | goto end; | 1113 | goto end; |
@@ -1110,6 +1125,7 @@ static int acpi_thermal_remove(struct acpi_device *device) | |||
1110 | if (!device || !acpi_driver_data(device)) | 1125 | if (!device || !acpi_driver_data(device)) |
1111 | return -EINVAL; | 1126 | return -EINVAL; |
1112 | 1127 | ||
1128 | flush_workqueue(acpi_thermal_pm_queue); | ||
1113 | tz = acpi_driver_data(device); | 1129 | tz = acpi_driver_data(device); |
1114 | 1130 | ||
1115 | acpi_thermal_unregister_thermal_zone(tz); | 1131 | acpi_thermal_unregister_thermal_zone(tz); |
@@ -1118,6 +1134,13 @@ static int acpi_thermal_remove(struct acpi_device *device) | |||
1118 | } | 1134 | } |
1119 | 1135 | ||
1120 | #ifdef CONFIG_PM_SLEEP | 1136 | #ifdef CONFIG_PM_SLEEP |
1137 | static int acpi_thermal_suspend(struct device *dev) | ||
1138 | { | ||
1139 | /* Make sure the previously queued thermal check work has been done */ | ||
1140 | flush_workqueue(acpi_thermal_pm_queue); | ||
1141 | return 0; | ||
1142 | } | ||
1143 | |||
1121 | static int acpi_thermal_resume(struct device *dev) | 1144 | static int acpi_thermal_resume(struct device *dev) |
1122 | { | 1145 | { |
1123 | struct acpi_thermal *tz; | 1146 | struct acpi_thermal *tz; |
@@ -1148,7 +1171,7 @@ static int acpi_thermal_resume(struct device *dev) | |||
1148 | tz->state.active |= tz->trips.active[i].flags.enabled; | 1171 | tz->state.active |= tz->trips.active[i].flags.enabled; |
1149 | } | 1172 | } |
1150 | 1173 | ||
1151 | acpi_thermal_check(tz); | 1174 | queue_work(acpi_thermal_pm_queue, &tz->thermal_check_work); |
1152 | 1175 | ||
1153 | return AE_OK; | 1176 | return AE_OK; |
1154 | } | 1177 | } |
@@ -1240,16 +1263,22 @@ static int __init acpi_thermal_init(void) | |||
1240 | return -ENODEV; | 1263 | return -ENODEV; |
1241 | } | 1264 | } |
1242 | 1265 | ||
1266 | acpi_thermal_pm_queue = create_workqueue("acpi_thermal_pm"); | ||
1267 | if (!acpi_thermal_pm_queue) | ||
1268 | return -ENODEV; | ||
1269 | |||
1243 | result = acpi_bus_register_driver(&acpi_thermal_driver); | 1270 | result = acpi_bus_register_driver(&acpi_thermal_driver); |
1244 | if (result < 0) | 1271 | if (result < 0) { |
1272 | destroy_workqueue(acpi_thermal_pm_queue); | ||
1245 | return -ENODEV; | 1273 | return -ENODEV; |
1274 | } | ||
1246 | 1275 | ||
1247 | return 0; | 1276 | return 0; |
1248 | } | 1277 | } |
1249 | 1278 | ||
1250 | static void __exit acpi_thermal_exit(void) | 1279 | static void __exit acpi_thermal_exit(void) |
1251 | { | 1280 | { |
1252 | 1281 | destroy_workqueue(acpi_thermal_pm_queue); | |
1253 | acpi_bus_unregister_driver(&acpi_thermal_driver); | 1282 | acpi_bus_unregister_driver(&acpi_thermal_driver); |
1254 | 1283 | ||
1255 | return; | 1284 | return; |
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index b6ba88ed31ae..48c7e8af9c96 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -45,8 +45,6 @@ | |||
45 | 45 | ||
46 | #include "internal.h" | 46 | #include "internal.h" |
47 | 47 | ||
48 | #define PREFIX "ACPI: " | ||
49 | |||
50 | #define ACPI_VIDEO_BUS_NAME "Video Bus" | 48 | #define ACPI_VIDEO_BUS_NAME "Video Bus" |
51 | #define ACPI_VIDEO_DEVICE_NAME "Video Device" | 49 | #define ACPI_VIDEO_DEVICE_NAME "Video Device" |
52 | #define ACPI_VIDEO_NOTIFY_SWITCH 0x80 | 50 | #define ACPI_VIDEO_NOTIFY_SWITCH 0x80 |
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c index 19080c8e2f2a..33e3db548a29 100644 --- a/drivers/acpi/video_detect.c +++ b/drivers/acpi/video_detect.c | |||
@@ -40,8 +40,6 @@ | |||
40 | 40 | ||
41 | #include "internal.h" | 41 | #include "internal.h" |
42 | 42 | ||
43 | #define PREFIX "ACPI: " | ||
44 | |||
45 | ACPI_MODULE_NAME("video"); | 43 | ACPI_MODULE_NAME("video"); |
46 | #define _COMPONENT ACPI_VIDEO_COMPONENT | 44 | #define _COMPONENT ACPI_VIDEO_COMPONENT |
47 | 45 | ||