Merge branches 'acpi-pci' and 'acpi-processor'
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 26 Apr 2021 15:03:05 +0000 (17:03 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 26 Apr 2021 15:03:05 +0000 (17:03 +0200)
* 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

1  2  3 
Documentation/firmware-guide/acpi/debug.rst
drivers/acpi/processor_idle.c
drivers/acpi/sysfs.c
include/acpi/acpi_drivers.h

@@@@ -54,11 -54,10 -54,10 +54,9 @@@@ shows the supported mask values, curren
       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
   ===========
@@@@ -127,10 -126,6 -126,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
    */
   #ifdef CONFIG_X86
   #include <asm/apic.h>
 + #include <asm/cpu.h>
   #endif
   
-- #define _COMPONENT              ACPI_PROCESSOR_COMPONENT
-- ACPI_MODULE_NAME("processor_idle");
-- 
   #define ACPI_IDLE_STATE_START        (IS_ENABLED(CONFIG_ARCH_HAS_CPU_RELAX) ? 1 : 0)
   
   static unsigned int max_cstate __read_mostly = ACPI_PROCESSOR_MAX_POWER;
@@@@ -240,8 -239,8 -237,8 +237,8 @@@@ static int acpi_processor_get_power_inf
         * 100 microseconds.
         */
        if (acpi_gbl_FADT.c2_latency > ACPI_PROCESSOR_MAX_C2_LATENCY) {
--              ACPI_DEBUG_PRINT((ACPI_DB_INFO,
--                      "C2 latency too large [%d]\n", acpi_gbl_FADT.c2_latency));
++              acpi_handle_debug(pr->handle, "C2 latency too large [%d]\n",
++                                acpi_gbl_FADT.c2_latency);
                /* invalidate C2 */
                pr->power.states[ACPI_STATE_C2].address = 0;
        }
         * 1000 microseconds.
         */
        if (acpi_gbl_FADT.c3_latency > ACPI_PROCESSOR_MAX_C3_LATENCY) {
--              ACPI_DEBUG_PRINT((ACPI_DB_INFO,
--                      "C3 latency too large [%d]\n", acpi_gbl_FADT.c3_latency));
++              acpi_handle_debug(pr->handle, "C3 latency too large [%d]\n",
++                                acpi_gbl_FADT.c3_latency);
                /* invalidate C3 */
                pr->power.states[ACPI_STATE_C3].address = 0;
        }
   
--      ACPI_DEBUG_PRINT((ACPI_DB_INFO,
--                        "lvl2[0x%08x] lvl3[0x%08x]\n",
++      acpi_handle_debug(pr->handle, "lvl2[0x%08x] lvl3[0x%08x]\n",
                          pr->power.states[ACPI_STATE_C2].address,
--                        pr->power.states[ACPI_STATE_C3].address));
++                        pr->power.states[ACPI_STATE_C3].address);
   
        snprintf(pr->power.states[ACPI_STATE_C2].desc,
                         ACPI_CX_DESC_LEN, "ACPI P_LVL2 IOPORT 0x%x",
@@@@ -325,8 -324,8 -321,8 +321,8 @@@@ static void acpi_processor_power_verify
         * devices thus we take the conservative approach.
         */
        else if (errata.piix4.fdma) {
--              ACPI_DEBUG_PRINT((ACPI_DB_INFO,
--                                "C3 not supported on PIIX4 with Type-F DMA\n"));
++              acpi_handle_debug(pr->handle,
++                                "C3 not supported on PIIX4 with Type-F DMA\n");
                return;
        }
   
                if (!pr->flags.bm_control) {
                        if (pr->flags.has_cst != 1) {
                                /* bus mastering control is necessary */
--                              ACPI_DEBUG_PRINT((ACPI_DB_INFO,
--                                      "C3 support requires BM control\n"));
++                              acpi_handle_debug(pr->handle,
++                                                "C3 support requires BM control\n");
                                return;
                        } else {
                                /* Here we enter C3 without bus mastering */
--                              ACPI_DEBUG_PRINT((ACPI_DB_INFO,
--                                      "C3 support without BM control\n"));
++                              acpi_handle_debug(pr->handle,
++                                                "C3 support without BM control\n");
                        }
                }
        } else {
                 * supported on when bm_check is not required.
                 */
                if (!(acpi_gbl_FADT.flags & ACPI_FADT_WBINVD)) {
--                      ACPI_DEBUG_PRINT((ACPI_DB_INFO,
++                      acpi_handle_debug(pr->handle,
                                          "Cache invalidation should work properly"
--                                        " for C3 to be enabled on SMP systems\n"));
++                                        " for C3 to be enabled on SMP systems\n");
                        return;
                }
        }
@@@@ -542,10 -541,6 -538,12 +538,10 @@@@ static int acpi_idle_play_dead(struct c
                        wait_for_freeze();
                } else
                        return -ENODEV;
  -             /* If NMI wants to wake up CPU0, start CPU0. */
  -             if (wakeup_cpu0())
  -                     start_cpu0();
 + 
 + #if defined(CONFIG_X86) && defined(CONFIG_HOTPLUG_CPU)
 ++             cond_wakeup_cpu0();
 + #endif
        }
   
        /* Never reached */
@@@@ -789,8 -784,8 -787,8 +785,8 @@@@ static inline void acpi_processor_cstat
        dmi_check_system(processor_power_dmi_table);
        max_cstate = acpi_processor_cstate_check(max_cstate);
        if (max_cstate < ACPI_C_STATES_MAX)
--              pr_notice("ACPI: processor limited to max C-state %d\n",
--                        max_cstate);
++              pr_notice("processor limited to max C-state %d\n", max_cstate);
++ 
        first_run++;
   
        if (nocst)
@@@@ -848,7 -843,7 -846,7 +844,7 @@@@ static int acpi_processor_evaluate_lpi(
   
        status = acpi_evaluate_object(handle, "_LPI", NULL, &buffer);
        if (ACPI_FAILURE(status)) {
--              ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No _LPI, giving up\n"));
++              acpi_handle_debug(handle, "No _LPI, giving up\n");
                return -ENODEV;
        }
   
diff --combined drivers/acpi/sysfs.c
@@@@ -54,11 -54,10 -54,10 +54,9 @@@@ static const struct acpi_dlayer acpi_de
   
        ACPI_DEBUG_INIT(ACPI_SBS_COMPONENT),
        ACPI_DEBUG_INIT(ACPI_FAN_COMPONENT),
- -     ACPI_DEBUG_INIT(ACPI_PCI_COMPONENT),
        ACPI_DEBUG_INIT(ACPI_CONTAINER_COMPONENT),
        ACPI_DEBUG_INIT(ACPI_SYSTEM_COMPONENT),
        ACPI_DEBUG_INIT(ACPI_MEMORY_DEVICE_COMPONENT),
--      ACPI_DEBUG_INIT(ACPI_PROCESSOR_COMPONENT),
   };
   
   static const struct acpi_dlevel acpi_debug_levels[] = {
    */
   #define ACPI_SBS_COMPONENT           0x00100000
   #define ACPI_FAN_COMPONENT           0x00200000
- -#define ACPI_PCI_COMPONENT           0x00400000
   #define ACPI_CONTAINER_COMPONENT     0x01000000
   #define ACPI_SYSTEM_COMPONENT                0x02000000
   #define ACPI_MEMORY_DEVICE_COMPONENT 0x08000000
-- #define ACPI_PROCESSOR_COMPONENT     0x20000000
   
   /*
    * _HID definitions