Skip to content

Commit

Permalink
Merge tag 'acpi-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/rafael/linux-pm

Pull ACPI updates from Rafael Wysocki:
 "These update the ACPICA code in the kernel to upstream revision
  20230331, fix the ACPI SBS driver and the evaluation of the _PDC
  method on Xen dom0 in the ACPI processor driver, update the ACPI
  driver for Intel SoCs and clean up code in multiple places.

  Specifics:

   - Update the ACPICA code in the kernel to upstream revision 20230331
     including the following changes:
       * Delete bogus node_array array of pointers from AEST table
         (Jessica Clarke)
       * Add support for trace buffer extension in GICC to the ACPI MADT
         parser (Xiongfeng Wang)
       * Add missing macro ACPI_FUNCTION_TRACE() for
         acpi_ns_repair_HID() (Xiongfeng Wang)
       * Add missing tables to astable (Pedro Falcato)
       * Add support for 64 bit loong_arch compilation to ACPICA (Huacai
         Chen)
       * Add support for ASPT table in disassembler to ACPICA (Jeremi
         Piotrowski)
       * Add support for Arm's MPAM ACPI table version 2 (Hesham
         Almatary)
       * Update all copyrights/signons in ACPICA to 2023 (Bob Moore)
       * Add support for ClockInput resource (v6.5) (Niyas Sait)
       * Add RISC-V INTC interrupt controller definition to the list of
         supported interrupt controllers for MADT (Sunil V L)
       * Add structure definitions for the RISC-V RHCT ACPI table (Sunil
         V L)
       * Address several cases in which the ACPICA code might lead to
         undefined behavior (Tamir Duberstein)
       * Make ACPICA code support flexible arrays properly (Kees Cook)
       * Check null return of ACPI_ALLOCATE_ZEROED in
         acpi_db_display_objects() (void0red)
       * Add os specific support for Zephyr RTOS to ACPICA (Najumon)
       * Update version to 20230331 (Bob Moore)

   - Fix evaluating the _PDC ACPI control method when running as Xen
     dom0 (Roger Pau Monne)

   - Use platform devices to load ACPI PPC and PCC drivers (Petr Pavlu)

   - Check for null return of devm_kzalloc() in fch_misc_setup() (Kang
     Chen)

   - Log a message if enable_irq_wake() fails for the ACPI SCI (Simon
     Gaiser)

   - Initialize the correct IOMMU fwspec while parsing ACPI VIOT
     (Jean-Philippe Brucker)

   - Amend indentation and prefix error messages with FW_BUG in the ACPI
     SPCR parsing code (Andy Shevchenko)

   - Enable ACPI sysfs support for CCEL records (Kuppuswamy
     Sathyanarayanan)

   - Make the APEI error injection code warn on invalid arguments when
     explicitly indicated by platform (Shuai Xue)

   - Add CXL error types to the error injection code in APEI (Tony Luck)

   - Refactor acpi_data_prop_read_single() (Andy Shevchenko)

   - Fix two issues in the ACPI SBS driver (Armin Wolf)

   - Replace ternary operator with min_t() in the generic ACPI thermal
     zone driver (Jiangshan Yi)

   - Ensure that ACPI notify handlers are not running after removal and
     clean up code in acpi_sb_notify() (Rafael Wysocki)

   - Remove register_backlight_delay module option and code and remove
     quirks for false-positive backlight control support advertised on
     desktop boards (Hans de Goede)

   - Replace irqdomain.h include with struct declarations in ACPI
     headers and update several pieces of code previously including of.h
     implicitly through those headers (Rob Herring)

   - Fix acpi_evaluate_dsm_typed() redefinition error (Kiran K)

   - Update the pm_profile sysfs attribute documentation (Rafael
     Wysocki)

   - Add 80862289 ACPI _HID for second PWM controller on Cherry Trail to
     the ACPI driver for Intel SoCs (Hans de Goede)"

* tag 'acpi-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (64 commits)
  ACPI: LPSS: Add 80862289 ACPI _HID for second PWM controller on Cherry Trail
  ACPI: bus: Ensure that notify handlers are not running after removal
  ACPI: bus: Add missing braces to acpi_sb_notify()
  ACPI: video: Remove desktops without backlight DMI quirks
  ACPI: video: Remove register_backlight_delay module option and code
  ACPI: Replace irqdomain.h include with struct declarations
  fpga: lattice-sysconfig-spi: Add explicit include for of.h
  tpm: atmel: Add explicit include for of.h
  virtio-mmio: Add explicit include for of.h
  pata: ixp4xx: Add explicit include for of.h
  ata: pata_macio: Add explicit include of irqdomain.h
  serial: 8250_tegra: Add explicit include for of.h
  net: rfkill-gpio: Add explicit include for of.h
  staging: iio: resolver: ad2s1210: Add explicit include for of.h
  iio: adc: ad7292: Add explicit include for of.h
  ACPICA: Update version to 20230331
  ACPICA: add os specific support for Zephyr RTOS
  ACPICA: ACPICA: check null return of ACPI_ALLOCATE_ZEROED in acpi_db_display_objects
  ACPICA: acpi_resource_irq: Replace 1-element arrays with flexible array
  ACPICA: acpi_madt_oem_data: Fix flexible array member definition
  ...
  • Loading branch information
Linus Torvalds committed Apr 26, 2023
2 parents 5e0ca0b + 4f81029 commit 793582f
Show file tree
Hide file tree
Showing 221 changed files with 1,014 additions and 439 deletions.
20 changes: 11 additions & 9 deletions Documentation/ABI/stable/sysfs-acpi-pmprofile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ What: /sys/firmware/acpi/pm_profile
Date: 03-Nov-2011
KernelVersion: v3.2
Contact: linux-acpi@vger.kernel.org
Description: The ACPI pm_profile sysfs interface exports the platform
power management (and performance) requirement expectations
as provided by BIOS. The integer value is directly passed as
retrieved from the FADT ACPI table.
Description: The ACPI pm_profile sysfs interface exposes the preferred
power management (and performance) profile of the platform
as provided in the ACPI FADT Preferred_PM_Profile field.

Values: For possible values see ACPI specification:
5.2.9 Fixed ACPI Description Table (FADT)
Field: Preferred_PM_Profile
The integer value is directly passed as retrieved from the FADT.

Currently these values are defined by spec:
Values: For the possible values refer to the Preferred_PM_Profile field
definition in Table 5.9 "FADT Format", Section 5.2.9 "Fixed ACPI
Description Table (FADT)" of the ACPI specification.

As of ACPI 6.5, the following values are defined:

== =================
0 Unspecified
Expand All @@ -22,5 +23,6 @@ Values: For possible values see ACPI specification:
5 SOHO Server
6 Appliance PC
7 Performance Server
>7 Reserved
8 Tablet
>8 Reserved
== =================
2 changes: 2 additions & 0 deletions drivers/acpi/acpi_apd.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ static int fch_misc_setup(struct apd_private_data *pdata)
if (!acpi_dev_get_property(adev, "clk-name", ACPI_TYPE_STRING, &obj)) {
clk_data->name = devm_kzalloc(&adev->dev, obj->string.length,
GFP_KERNEL);
if (!clk_data->name)
return -ENOMEM;

strcpy(clk_data->name, obj->string.pointer);
} else {
Expand Down
7 changes: 7 additions & 0 deletions drivers/acpi/acpi_lpss.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,12 @@ static const struct lpss_device_desc bsw_pwm_dev_desc = {
.resume_from_noirq = true,
};

static const struct lpss_device_desc bsw_pwm2_dev_desc = {
.flags = LPSS_SAVE_CTX_ONCE | LPSS_NO_D3_DELAY,
.prv_offset = 0x800,
.resume_from_noirq = true,
};

static const struct lpss_device_desc byt_uart_dev_desc = {
.flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX,
.clk_con_id = "baudclk",
Expand Down Expand Up @@ -368,6 +374,7 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = {
/* Braswell LPSS devices */
{ "80862286", LPSS_ADDR(lpss_dma_desc) },
{ "80862288", LPSS_ADDR(bsw_pwm_dev_desc) },
{ "80862289", LPSS_ADDR(bsw_pwm2_dev_desc) },
{ "8086228A", LPSS_ADDR(bsw_uart_dev_desc) },
{ "8086228E", LPSS_ADDR(bsw_spi_dev_desc) },
{ "808622C0", LPSS_ADDR(lpss_dma_desc) },
Expand Down
42 changes: 40 additions & 2 deletions drivers/acpi/acpi_processor.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/platform_device.h>

#include <acpi/processor.h>

Expand Down Expand Up @@ -148,6 +149,34 @@ static int acpi_processor_errata(void)
return result;
}

/* Create a platform device to represent a CPU frequency control mechanism. */
static void cpufreq_add_device(const char *name)
{
struct platform_device *pdev;

pdev = platform_device_register_simple(name, PLATFORM_DEVID_NONE, NULL, 0);
if (IS_ERR(pdev))
pr_info("%s device creation failed: %ld\n", name, PTR_ERR(pdev));
}

#ifdef CONFIG_X86
/* Check presence of Processor Clocking Control by searching for \_SB.PCCH. */
static void __init acpi_pcc_cpufreq_init(void)
{
acpi_status status;
acpi_handle handle;

status = acpi_get_handle(NULL, "\\_SB", &handle);
if (ACPI_FAILURE(status))
return;

if (acpi_has_method(handle, "PCCH"))
cpufreq_add_device("pcc-cpufreq");
}
#else
static void __init acpi_pcc_cpufreq_init(void) {}
#endif /* CONFIG_X86 */

/* Initialization */
#ifdef CONFIG_ACPI_HOTPLUG_CPU
int __weak acpi_map_cpu(acpi_handle handle,
Expand Down Expand Up @@ -280,14 +309,22 @@ static int acpi_processor_get_info(struct acpi_device *device)
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()) {
if (!cpu0_initialized) {
cpu0_initialized = 1;
/*
* Handle UP system running SMP kernel, with no CPU
* entry in MADT
*/
if (invalid_logical_cpuid(pr->id) && (num_online_cpus() == 1))
if (!acpi_has_cpu_in_madt() && invalid_logical_cpuid(pr->id) &&
(num_online_cpus() == 1))
pr->id = 0;
/*
* Check availability of Processor Performance Control by
* looking at the presence of the _PCT object under the first
* processor definition.
*/
if (acpi_has_method(pr->handle, "_PCT"))
cpufreq_add_device("acpi-cpufreq");
}

/*
Expand Down Expand Up @@ -686,6 +723,7 @@ void __init acpi_processor_init(void)
acpi_processor_check_duplicates();
acpi_scan_add_handler_with_hotplug(&processor_handler, "processor");
acpi_scan_add_handler(&processor_container_handler);
acpi_pcc_cpufreq_init();
}

#ifdef CONFIG_ACPI_PROCESSOR_CSTATE
Expand Down
38 changes: 0 additions & 38 deletions drivers/acpi/acpi_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@ module_param(device_id_scheme, bool, 0444);
static int only_lcd = -1;
module_param(only_lcd, int, 0444);

static int register_backlight_delay;
module_param(register_backlight_delay, int, 0444);
MODULE_PARM_DESC(register_backlight_delay,
"Delay in seconds before doing fallback (non GPU driver triggered) "
"backlight registration, set to 0 to disable.");

static bool may_report_brightness_keys;
static int register_count;
static DEFINE_MUTEX(register_count_mutex);
Expand All @@ -84,9 +78,6 @@ static LIST_HEAD(video_bus_head);
static int acpi_video_bus_add(struct acpi_device *device);
static void acpi_video_bus_remove(struct acpi_device *device);
static void acpi_video_bus_notify(struct acpi_device *device, u32 event);
static void acpi_video_bus_register_backlight_work(struct work_struct *ignored);
static DECLARE_DELAYED_WORK(video_bus_register_backlight_work,
acpi_video_bus_register_backlight_work);

/*
* Indices in the _BCL method response: the first two items are special,
Expand Down Expand Up @@ -2096,11 +2087,6 @@ static void acpi_video_bus_remove(struct acpi_device *device)
kfree(video);
}

static void acpi_video_bus_register_backlight_work(struct work_struct *ignored)
{
acpi_video_register_backlight();
}

static int __init is_i740(struct pci_dev *dev)
{
if (dev->device == 0x00D1)
Expand Down Expand Up @@ -2183,17 +2169,6 @@ static bool should_check_lcd_flag(void)
return false;
}

/*
* At least one graphics driver has reported that no LCD is connected
* via the native interface. cancel the registration for fallback acpi_video0.
* If another driver still deems this necessary, it can explicitly register it.
*/
void acpi_video_report_nolcd(void)
{
cancel_delayed_work(&video_bus_register_backlight_work);
}
EXPORT_SYMBOL(acpi_video_report_nolcd);

int acpi_video_register(void)
{
int ret = 0;
Expand Down Expand Up @@ -2222,18 +2197,6 @@ int acpi_video_register(void)
*/
register_count = 1;

/*
* acpi_video_bus_add() skips registering the userspace visible
* backlight_device. The intend is for this to be registered by the
* drm/kms driver calling acpi_video_register_backlight() *after* it is
* done setting up its own native backlight device. The delayed work
* ensures that acpi_video_register_backlight() always gets called
* eventually, in case there is no drm/kms driver or it is disabled.
*/
if (register_backlight_delay)
schedule_delayed_work(&video_bus_register_backlight_work,
register_backlight_delay * HZ);

leave:
mutex_unlock(&register_count_mutex);
return ret;
Expand All @@ -2244,7 +2207,6 @@ void acpi_video_unregister(void)
{
mutex_lock(&register_count_mutex);
if (register_count) {
cancel_delayed_work_sync(&video_bus_register_backlight_work);
acpi_bus_unregister_driver(&acpi_video_bus);
register_count = 0;
may_report_brightness_keys = false;
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acapps.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Module Name: acapps - common include for ACPI applications/tools
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/accommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: accommon.h - Common include files for generation of ACPICA source
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acconvert.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Module Name: acapps - common include for ACPI applications/tools
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acdebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: acdebug.h - ACPI/AML debugger
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acdispat.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: acdispat.h - dispatcher (parser to interpreter interface)
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acevents.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: acevents.h - Event subcomponent prototypes and defines
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: acglobal.h - Declarations for global variables
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/achware.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: achware.h -- hardware specific interfaces
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acinterp.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: acinterp.h - Interpreter subcomponent prototypes and defines
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
5 changes: 3 additions & 2 deletions drivers/acpi/acpica/aclocal.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: aclocal.h - Internal data types used across the ACPI subsystem
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down Expand Up @@ -1122,7 +1122,8 @@ struct acpi_port_info {
#define ACPI_RESOURCE_NAME_PIN_GROUP 0x90
#define ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION 0x91
#define ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG 0x92
#define ACPI_RESOURCE_NAME_LARGE_MAX 0x92
#define ACPI_RESOURCE_NAME_CLOCK_INPUT 0x93
#define ACPI_RESOURCE_NAME_LARGE_MAX 0x94

/*****************************************************************************
*
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acmacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: acmacros.h - C macros for the entire subsystem.
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acnamesp.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: acnamesp.h - Namespace subcomponent prototypes and defines
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: acobject.h - Definition of union acpi_operand_object (Internal object only)
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acopcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: acopcode.h - AML opcode information for the AML parser and interpreter
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Module Name: acparser.h - AML Parser subcomponent prototypes and defines
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acpredef.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: acpredef - Information table for ACPI predefined methods and objects
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down
4 changes: 3 additions & 1 deletion drivers/acpi/acpica/acresrc.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Name: acresrc.h - Resource Manager function prototypes
*
* Copyright (C) 2000 - 2022, Intel Corp.
* Copyright (C) 2000 - 2023, Intel Corp.
*
*****************************************************************************/

Expand Down Expand Up @@ -306,6 +306,7 @@ extern struct acpi_rsconvert_info acpi_rs_convert_pin_config[];
extern struct acpi_rsconvert_info acpi_rs_convert_pin_group[];
extern struct acpi_rsconvert_info acpi_rs_convert_pin_group_function[];
extern struct acpi_rsconvert_info acpi_rs_convert_pin_group_config[];
extern struct acpi_rsconvert_info acpi_rs_convert_clock_input[];

/* These resources require separate get/set tables */

Expand Down Expand Up @@ -361,6 +362,7 @@ extern struct acpi_rsdump_info acpi_rs_dump_pin_config[];
extern struct acpi_rsdump_info acpi_rs_dump_pin_group[];
extern struct acpi_rsdump_info acpi_rs_dump_pin_group_function[];
extern struct acpi_rsdump_info acpi_rs_dump_pin_group_config[];
extern struct acpi_rsdump_info acpi_rs_dump_clock_input[];
#endif

#endif /* __ACRESRC_H__ */
Loading

0 comments on commit 793582f

Please sign in to comment.