Skip to content

Commit 25d9576

Browse files
committed
Merge branches 'acpi-pci' and 'acpi-processor'
* acpi-pci: ACPI: PCI: Replace direct printk() invocations in pci_link.c ACPI: PCI: Drop ACPI_PCI_COMPONENT that is not used any more ACPI: PCI: Replace ACPI_DEBUG_PRINT() and ACPI_EXCEPTION() ACPI: PCI: IRQ: Consolidate printing diagnostic messages * acpi-processor: ACPI: processor: perflib: Eliminate redundant status check ACPI: processor: Get rid of ACPICA message printing ACPI: processor: idle: Drop extra prefix from pr_notice() ACPI: processor: Remove initialization of static variable
3 parents e1f9277 + de972fd + 1c29f6a commit 25d9576

12 files changed

Lines changed: 201 additions & 259 deletions

File tree

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
CONFIG_ACPI_DEBUG must be enabled to produce any ACPI
5151
debug output. Bits in debug_layer correspond to a
5252
_COMPONENT in an ACPI source file, e.g.,
53-
#define _COMPONENT ACPI_PCI_COMPONENT
53+
#define _COMPONENT ACPI_EVENTS
5454
Bits in debug_level correspond to a level in
5555
ACPI_DEBUG_PRINT statements, e.g.,
5656
ACPI_DEBUG_PRINT((ACPI_DB_INFO, ...
@@ -60,8 +60,6 @@
6060

6161
Enable processor driver info messages:
6262
acpi.debug_layer=0x20000000
63-
Enable PCI/PCI interrupt routing info messages:
64-
acpi.debug_layer=0x400000
6563
Enable AML "Debug" output, i.e., stores to the Debug
6664
object while interpreting AML:
6765
acpi.debug_layer=0xffffffff acpi.debug_level=0x2

Documentation/firmware-guide/acpi/debug.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,9 @@ shows the supported mask values, currently these::
5454
ACPI_TOOLS 0x00002000
5555
ACPI_SBS_COMPONENT 0x00100000
5656
ACPI_FAN_COMPONENT 0x00200000
57-
ACPI_PCI_COMPONENT 0x00400000
5857
ACPI_CONTAINER_COMPONENT 0x01000000
5958
ACPI_SYSTEM_COMPONENT 0x02000000
6059
ACPI_MEMORY_DEVICE_COMPONENT 0x08000000
61-
ACPI_PROCESSOR_COMPONENT 0x20000000
6260

6361
debug_level
6462
===========
@@ -127,10 +125,6 @@ AML) during boot::
127125

128126
acpi.debug_layer=0xffffffff acpi.debug_level=0x2
129127

130-
Enable PCI and PCI interrupt routing debug messages::
131-
132-
acpi.debug_layer=0x400000 acpi.debug_level=0x4
133-
134128
Enable all ACPI hardware-related messages::
135129

136130
acpi.debug_layer=0x2 acpi.debug_level=0xffffffff

drivers/acpi/acpi_processor.c

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@
2222

2323
#include "internal.h"
2424

25-
#define _COMPONENT ACPI_PROCESSOR_COMPONENT
26-
27-
ACPI_MODULE_NAME("processor");
28-
2925
DEFINE_PER_CPU(struct acpi_processor *, processors);
3026
EXPORT_PER_CPU_SYMBOL(processors);
3127

@@ -51,19 +47,19 @@ static int acpi_processor_errata_piix4(struct pci_dev *dev)
5147

5248
switch (dev->revision) {
5349
case 0:
54-
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found PIIX4 A-step\n"));
50+
dev_dbg(&dev->dev, "Found PIIX4 A-step\n");
5551
break;
5652
case 1:
57-
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found PIIX4 B-step\n"));
53+
dev_dbg(&dev->dev, "Found PIIX4 B-step\n");
5854
break;
5955
case 2:
60-
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found PIIX4E\n"));
56+
dev_dbg(&dev->dev, "Found PIIX4E\n");
6157
break;
6258
case 3:
63-
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found PIIX4M\n"));
59+
dev_dbg(&dev->dev, "Found PIIX4M\n");
6460
break;
6561
default:
66-
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found unknown PIIX4\n"));
62+
dev_dbg(&dev->dev, "Found unknown PIIX4\n");
6763
break;
6864
}
6965

@@ -129,11 +125,9 @@ static int acpi_processor_errata_piix4(struct pci_dev *dev)
129125
}
130126

131127
if (errata.piix4.bmisx)
132-
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
133-
"Bus master activity detection (BM-IDE) erratum enabled\n"));
128+
dev_dbg(&dev->dev, "Bus master activity detection (BM-IDE) erratum enabled\n");
134129
if (errata.piix4.fdma)
135-
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
136-
"Type-F DMA livelock erratum (C3 disabled)\n"));
130+
dev_dbg(&dev->dev, "Type-F DMA livelock erratum (C3 disabled)\n");
137131

138132
return 0;
139133
}
@@ -244,11 +238,9 @@ static int acpi_processor_get_info(struct acpi_device *device)
244238
*/
245239
if (acpi_gbl_FADT.pm2_control_block && acpi_gbl_FADT.pm2_control_length) {
246240
pr->flags.bm_control = 1;
247-
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
248-
"Bus mastering arbitration control present\n"));
241+
dev_dbg(&device->dev, "Bus mastering arbitration control present\n");
249242
} else
250-
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
251-
"No bus mastering arbitration control\n"));
243+
dev_dbg(&device->dev, "No bus mastering arbitration control\n");
252244

253245
if (!strcmp(acpi_device_hid(device), ACPI_PROCESSOR_OBJECT_HID)) {
254246
/* Declared with "Processor" statement; match ProcessorID */
@@ -291,7 +283,7 @@ static int acpi_processor_get_info(struct acpi_device *device)
291283
pr->phys_id = acpi_get_phys_id(pr->handle, device_declaration,
292284
pr->acpi_id);
293285
if (invalid_phys_cpuid(pr->phys_id))
294-
acpi_handle_debug(pr->handle, "failed to get CPU physical ID.\n");
286+
dev_dbg(&device->dev, "Failed to get CPU physical ID.\n");
295287

296288
pr->id = acpi_map_cpuid(pr->phys_id, pr->acpi_id);
297289
if (!cpu0_initialized && !acpi_has_cpu_in_madt()) {
@@ -328,11 +320,10 @@ static int acpi_processor_get_info(struct acpi_device *device)
328320
* CPU+CPU ID.
329321
*/
330322
sprintf(acpi_device_bid(device), "CPU%X", pr->id);
331-
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Processor [%d:%d]\n", pr->id,
332-
pr->acpi_id));
323+
dev_dbg(&device->dev, "Processor [%d:%d]\n", pr->id, pr->acpi_id);
333324

334325
if (!object.processor.pblk_address)
335-
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No PBLK (NULL address)\n"));
326+
dev_dbg(&device->dev, "No PBLK (NULL address)\n");
336327
else if (object.processor.pblk_length != 6)
337328
dev_err(&device->dev, "Invalid PBLK length [%d]\n",
338329
object.processor.pblk_length);

drivers/acpi/pci_irq.c

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* Bjorn Helgaas <bjorn.helgaas@hp.com>
1010
*/
1111

12+
#define pr_fmt(fmt) "ACPI: PCI: " fmt
1213

1314
#include <linux/dmi.h>
1415
#include <linux/kernel.h>
@@ -22,11 +23,6 @@
2223
#include <linux/slab.h>
2324
#include <linux/interrupt.h>
2425

25-
#define PREFIX "ACPI: "
26-
27-
#define _COMPONENT ACPI_PCI_COMPONENT
28-
ACPI_MODULE_NAME("pci_irq");
29-
3026
struct acpi_prt_entry {
3127
struct acpi_pci_id id;
3228
u8 pin;
@@ -126,7 +122,7 @@ static void do_prt_fixups(struct acpi_prt_entry *entry,
126122
entry->pin == quirk->pin &&
127123
!strcmp(prt->source, quirk->source) &&
128124
strlen(prt->source) >= strlen(quirk->actual_source)) {
129-
printk(KERN_WARNING PREFIX "firmware reports "
125+
pr_warn("Firmware reports "
130126
"%04x:%02x:%02x PCI INT %c connected to %s; "
131127
"changing to %s\n",
132128
entry->id.segment, entry->id.bus,
@@ -191,12 +187,9 @@ static int acpi_pci_irq_check_entry(acpi_handle handle, struct pci_dev *dev,
191187
* the IRQ value, which is hardwired to specific interrupt inputs on
192188
* the interrupt controller.
193189
*/
194-
195-
ACPI_DEBUG_PRINT_RAW((ACPI_DB_INFO,
196-
" %04x:%02x:%02x[%c] -> %s[%d]\n",
197-
entry->id.segment, entry->id.bus,
198-
entry->id.device, pin_name(entry->pin),
199-
prt->source, entry->index));
190+
pr_debug("%04x:%02x:%02x[%c] -> %s[%d]\n",
191+
entry->id.segment, entry->id.bus, entry->id.device,
192+
pin_name(entry->pin), prt->source, entry->index);
200193

201194
*entry_ptr = entry;
202195

@@ -307,8 +300,7 @@ static struct acpi_prt_entry *acpi_pci_irq_lookup(struct pci_dev *dev, int pin)
307300
#ifdef CONFIG_X86_IO_APIC
308301
acpi_reroute_boot_interrupt(dev, entry);
309302
#endif /* CONFIG_X86_IO_APIC */
310-
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found %s[%c] _PRT entry\n",
311-
pci_name(dev), pin_name(pin)));
303+
dev_dbg(&dev->dev, "Found [%c] _PRT entry\n", pin_name(pin));
312304
return entry;
313305
}
314306

@@ -324,20 +316,16 @@ static struct acpi_prt_entry *acpi_pci_irq_lookup(struct pci_dev *dev, int pin)
324316
/* PC card has the same IRQ as its cardbridge */
325317
bridge_pin = bridge->pin;
326318
if (!bridge_pin) {
327-
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
328-
"No interrupt pin configured for device %s\n",
329-
pci_name(bridge)));
319+
dev_dbg(&bridge->dev, "No interrupt pin configured\n");
330320
return NULL;
331321
}
332322
pin = bridge_pin;
333323
}
334324

335325
ret = acpi_pci_irq_find_prt_entry(bridge, pin, &entry);
336326
if (!ret && entry) {
337-
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
338-
"Derived GSI for %s INT %c from %s\n",
339-
pci_name(dev), pin_name(orig_pin),
340-
pci_name(bridge)));
327+
dev_dbg(&dev->dev, "Derived GSI INT %c from %s\n",
328+
pin_name(orig_pin), pci_name(bridge));
341329
return entry;
342330
}
343331

@@ -413,9 +401,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
413401

414402
pin = dev->pin;
415403
if (!pin) {
416-
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
417-
"No interrupt pin configured for device %s\n",
418-
pci_name(dev)));
404+
dev_dbg(&dev->dev, "No interrupt pin configured\n");
419405
return 0;
420406
}
421407

0 commit comments

Comments
 (0)