Skip to content

Commit

Permalink
Merge branches 'acpi-pci' and 'acpi-processor'
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
rafaeljw committed Apr 26, 2021
3 parents e1f9277 + de972fd + 1c29f6a commit 25d9576
Show file tree
Hide file tree
Showing 12 changed files with 201 additions and 259 deletions.
4 changes: 1 addition & 3 deletions Documentation/admin-guide/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
CONFIG_ACPI_DEBUG must be enabled to produce any ACPI
debug output. Bits in debug_layer correspond to a
_COMPONENT in an ACPI source file, e.g.,
#define _COMPONENT ACPI_PCI_COMPONENT
#define _COMPONENT ACPI_EVENTS
Bits in debug_level correspond to a level in
ACPI_DEBUG_PRINT statements, e.g.,
ACPI_DEBUG_PRINT((ACPI_DB_INFO, ...
Expand All @@ -60,8 +60,6 @@

Enable processor driver info messages:
acpi.debug_layer=0x20000000
Enable PCI/PCI interrupt routing info messages:
acpi.debug_layer=0x400000
Enable AML "Debug" output, i.e., stores to the Debug
object while interpreting AML:
acpi.debug_layer=0xffffffff acpi.debug_level=0x2
Expand Down
6 changes: 0 additions & 6 deletions Documentation/firmware-guide/acpi/debug.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,9 @@ shows the supported mask values, currently these::
ACPI_TOOLS 0x00002000
ACPI_SBS_COMPONENT 0x00100000
ACPI_FAN_COMPONENT 0x00200000
ACPI_PCI_COMPONENT 0x00400000
ACPI_CONTAINER_COMPONENT 0x01000000
ACPI_SYSTEM_COMPONENT 0x02000000
ACPI_MEMORY_DEVICE_COMPONENT 0x08000000
ACPI_PROCESSOR_COMPONENT 0x20000000

debug_level
===========
Expand Down Expand Up @@ -127,10 +125,6 @@ AML) during boot::

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

Enable PCI and PCI interrupt routing debug messages::

acpi.debug_layer=0x400000 acpi.debug_level=0x4

Enable all ACPI hardware-related messages::

acpi.debug_layer=0x2 acpi.debug_level=0xffffffff
Expand Down
33 changes: 12 additions & 21 deletions drivers/acpi/acpi_processor.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@

#include "internal.h"

#define _COMPONENT ACPI_PROCESSOR_COMPONENT

ACPI_MODULE_NAME("processor");

DEFINE_PER_CPU(struct acpi_processor *, processors);
EXPORT_PER_CPU_SYMBOL(processors);

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

switch (dev->revision) {
case 0:
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found PIIX4 A-step\n"));
dev_dbg(&dev->dev, "Found PIIX4 A-step\n");
break;
case 1:
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found PIIX4 B-step\n"));
dev_dbg(&dev->dev, "Found PIIX4 B-step\n");
break;
case 2:
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found PIIX4E\n"));
dev_dbg(&dev->dev, "Found PIIX4E\n");
break;
case 3:
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found PIIX4M\n"));
dev_dbg(&dev->dev, "Found PIIX4M\n");
break;
default:
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found unknown PIIX4\n"));
dev_dbg(&dev->dev, "Found unknown PIIX4\n");
break;
}

Expand Down Expand Up @@ -129,11 +125,9 @@ static int acpi_processor_errata_piix4(struct pci_dev *dev)
}

if (errata.piix4.bmisx)
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Bus master activity detection (BM-IDE) erratum enabled\n"));
dev_dbg(&dev->dev, "Bus master activity detection (BM-IDE) erratum enabled\n");
if (errata.piix4.fdma)
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Type-F DMA livelock erratum (C3 disabled)\n"));
dev_dbg(&dev->dev, "Type-F DMA livelock erratum (C3 disabled)\n");

return 0;
}
Expand Down Expand Up @@ -244,11 +238,9 @@ static int acpi_processor_get_info(struct acpi_device *device)
*/
if (acpi_gbl_FADT.pm2_control_block && acpi_gbl_FADT.pm2_control_length) {
pr->flags.bm_control = 1;
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Bus mastering arbitration control present\n"));
dev_dbg(&device->dev, "Bus mastering arbitration control present\n");
} else
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"No bus mastering arbitration control\n"));
dev_dbg(&device->dev, "No bus mastering arbitration control\n");

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

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

if (!object.processor.pblk_address)
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No PBLK (NULL address)\n"));
dev_dbg(&device->dev, "No PBLK (NULL address)\n");
else if (object.processor.pblk_length != 6)
dev_err(&device->dev, "Invalid PBLK length [%d]\n",
object.processor.pblk_length);
Expand Down
34 changes: 10 additions & 24 deletions drivers/acpi/pci_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* Bjorn Helgaas <[email protected]>
*/

#define pr_fmt(fmt) "ACPI: PCI: " fmt

#include <linux/dmi.h>
#include <linux/kernel.h>
Expand All @@ -22,11 +23,6 @@
#include <linux/slab.h>
#include <linux/interrupt.h>

#define PREFIX "ACPI: "

#define _COMPONENT ACPI_PCI_COMPONENT
ACPI_MODULE_NAME("pci_irq");

struct acpi_prt_entry {
struct acpi_pci_id id;
u8 pin;
Expand Down Expand Up @@ -126,7 +122,7 @@ static void do_prt_fixups(struct acpi_prt_entry *entry,
entry->pin == quirk->pin &&
!strcmp(prt->source, quirk->source) &&
strlen(prt->source) >= strlen(quirk->actual_source)) {
printk(KERN_WARNING PREFIX "firmware reports "
pr_warn("Firmware reports "
"%04x:%02x:%02x PCI INT %c connected to %s; "
"changing to %s\n",
entry->id.segment, entry->id.bus,
Expand Down Expand Up @@ -191,12 +187,9 @@ static int acpi_pci_irq_check_entry(acpi_handle handle, struct pci_dev *dev,
* the IRQ value, which is hardwired to specific interrupt inputs on
* the interrupt controller.
*/

ACPI_DEBUG_PRINT_RAW((ACPI_DB_INFO,
" %04x:%02x:%02x[%c] -> %s[%d]\n",
entry->id.segment, entry->id.bus,
entry->id.device, pin_name(entry->pin),
prt->source, entry->index));
pr_debug("%04x:%02x:%02x[%c] -> %s[%d]\n",
entry->id.segment, entry->id.bus, entry->id.device,
pin_name(entry->pin), prt->source, entry->index);

*entry_ptr = entry;

Expand Down Expand Up @@ -307,8 +300,7 @@ static struct acpi_prt_entry *acpi_pci_irq_lookup(struct pci_dev *dev, int pin)
#ifdef CONFIG_X86_IO_APIC
acpi_reroute_boot_interrupt(dev, entry);
#endif /* CONFIG_X86_IO_APIC */
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found %s[%c] _PRT entry\n",
pci_name(dev), pin_name(pin)));
dev_dbg(&dev->dev, "Found [%c] _PRT entry\n", pin_name(pin));
return entry;
}

Expand All @@ -324,20 +316,16 @@ static struct acpi_prt_entry *acpi_pci_irq_lookup(struct pci_dev *dev, int pin)
/* PC card has the same IRQ as its cardbridge */
bridge_pin = bridge->pin;
if (!bridge_pin) {
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"No interrupt pin configured for device %s\n",
pci_name(bridge)));
dev_dbg(&bridge->dev, "No interrupt pin configured\n");
return NULL;
}
pin = bridge_pin;
}

ret = acpi_pci_irq_find_prt_entry(bridge, pin, &entry);
if (!ret && entry) {
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Derived GSI for %s INT %c from %s\n",
pci_name(dev), pin_name(orig_pin),
pci_name(bridge)));
dev_dbg(&dev->dev, "Derived GSI INT %c from %s\n",
pin_name(orig_pin), pci_name(bridge));
return entry;
}

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

pin = dev->pin;
if (!pin) {
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"No interrupt pin configured for device %s\n",
pci_name(dev)));
dev_dbg(&dev->dev, "No interrupt pin configured\n");
return 0;
}

Expand Down
Loading

0 comments on commit 25d9576

Please sign in to comment.