Skip to content

Commit 793582f

Browse files
committed
Merge tag 'acpi-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/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 8086228 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 8086228 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 ...
2 parents 5e0ca0b + 4f81029 commit 793582f

221 files changed

Lines changed: 1014 additions & 439 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/ABI/stable/sysfs-acpi-pmprofile

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@ What: /sys/firmware/acpi/pm_profile
22
Date: 03-Nov-2011
33
KernelVersion: v3.2
44
Contact: linux-acpi@vger.kernel.org
5-
Description: The ACPI pm_profile sysfs interface exports the platform
6-
power management (and performance) requirement expectations
7-
as provided by BIOS. The integer value is directly passed as
8-
retrieved from the FADT ACPI table.
5+
Description: The ACPI pm_profile sysfs interface exposes the preferred
6+
power management (and performance) profile of the platform
7+
as provided in the ACPI FADT Preferred_PM_Profile field.
98

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

14-
Currently these values are defined by spec:
11+
Values: For the possible values refer to the Preferred_PM_Profile field
12+
definition in Table 5.9 "FADT Format", Section 5.2.9 "Fixed ACPI
13+
Description Table (FADT)" of the ACPI specification.
14+
15+
As of ACPI 6.5, the following values are defined:
1516

1617
== =================
1718
0 Unspecified
@@ -22,5 +23,6 @@ Values: For possible values see ACPI specification:
2223
5 SOHO Server
2324
6 Appliance PC
2425
7 Performance Server
25-
>7 Reserved
26+
8 Tablet
27+
>8 Reserved
2628
== =================

drivers/acpi/acpi_apd.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ static int fch_misc_setup(struct apd_private_data *pdata)
8383
if (!acpi_dev_get_property(adev, "clk-name", ACPI_TYPE_STRING, &obj)) {
8484
clk_data->name = devm_kzalloc(&adev->dev, obj->string.length,
8585
GFP_KERNEL);
86+
if (!clk_data->name)
87+
return -ENOMEM;
8688

8789
strcpy(clk_data->name, obj->string.pointer);
8890
} else {

drivers/acpi/acpi_lpss.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,12 @@ static const struct lpss_device_desc bsw_pwm_dev_desc = {
271271
.resume_from_noirq = true,
272272
};
273273

274+
static const struct lpss_device_desc bsw_pwm2_dev_desc = {
275+
.flags = LPSS_SAVE_CTX_ONCE | LPSS_NO_D3_DELAY,
276+
.prv_offset = 0x800,
277+
.resume_from_noirq = true,
278+
};
279+
274280
static const struct lpss_device_desc byt_uart_dev_desc = {
275281
.flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX,
276282
.clk_con_id = "baudclk",
@@ -368,6 +374,7 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = {
368374
/* Braswell LPSS devices */
369375
{ "80862286", LPSS_ADDR(lpss_dma_desc) },
370376
{ "80862288", LPSS_ADDR(bsw_pwm_dev_desc) },
377+
{ "80862289", LPSS_ADDR(bsw_pwm2_dev_desc) },
371378
{ "8086228A", LPSS_ADDR(bsw_uart_dev_desc) },
372379
{ "8086228E", LPSS_ADDR(bsw_spi_dev_desc) },
373380
{ "808622C0", LPSS_ADDR(lpss_dma_desc) },

drivers/acpi/acpi_processor.c

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/kernel.h>
1616
#include <linux/module.h>
1717
#include <linux/pci.h>
18+
#include <linux/platform_device.h>
1819

1920
#include <acpi/processor.h>
2021

@@ -148,6 +149,34 @@ static int acpi_processor_errata(void)
148149
return result;
149150
}
150151

152+
/* Create a platform device to represent a CPU frequency control mechanism. */
153+
static void cpufreq_add_device(const char *name)
154+
{
155+
struct platform_device *pdev;
156+
157+
pdev = platform_device_register_simple(name, PLATFORM_DEVID_NONE, NULL, 0);
158+
if (IS_ERR(pdev))
159+
pr_info("%s device creation failed: %ld\n", name, PTR_ERR(pdev));
160+
}
161+
162+
#ifdef CONFIG_X86
163+
/* Check presence of Processor Clocking Control by searching for \_SB.PCCH. */
164+
static void __init acpi_pcc_cpufreq_init(void)
165+
{
166+
acpi_status status;
167+
acpi_handle handle;
168+
169+
status = acpi_get_handle(NULL, "\\_SB", &handle);
170+
if (ACPI_FAILURE(status))
171+
return;
172+
173+
if (acpi_has_method(handle, "PCCH"))
174+
cpufreq_add_device("pcc-cpufreq");
175+
}
176+
#else
177+
static void __init acpi_pcc_cpufreq_init(void) {}
178+
#endif /* CONFIG_X86 */
179+
151180
/* Initialization */
152181
#ifdef CONFIG_ACPI_HOTPLUG_CPU
153182
int __weak acpi_map_cpu(acpi_handle handle,
@@ -280,14 +309,22 @@ static int acpi_processor_get_info(struct acpi_device *device)
280309
dev_dbg(&device->dev, "Failed to get CPU physical ID.\n");
281310

282311
pr->id = acpi_map_cpuid(pr->phys_id, pr->acpi_id);
283-
if (!cpu0_initialized && !acpi_has_cpu_in_madt()) {
312+
if (!cpu0_initialized) {
284313
cpu0_initialized = 1;
285314
/*
286315
* Handle UP system running SMP kernel, with no CPU
287316
* entry in MADT
288317
*/
289-
if (invalid_logical_cpuid(pr->id) && (num_online_cpus() == 1))
318+
if (!acpi_has_cpu_in_madt() && invalid_logical_cpuid(pr->id) &&
319+
(num_online_cpus() == 1))
290320
pr->id = 0;
321+
/*
322+
* Check availability of Processor Performance Control by
323+
* looking at the presence of the _PCT object under the first
324+
* processor definition.
325+
*/
326+
if (acpi_has_method(pr->handle, "_PCT"))
327+
cpufreq_add_device("acpi-cpufreq");
291328
}
292329

293330
/*
@@ -686,6 +723,7 @@ void __init acpi_processor_init(void)
686723
acpi_processor_check_duplicates();
687724
acpi_scan_add_handler_with_hotplug(&processor_handler, "processor");
688725
acpi_scan_add_handler(&processor_container_handler);
726+
acpi_pcc_cpufreq_init();
689727
}
690728

691729
#ifdef CONFIG_ACPI_PROCESSOR_CSTATE

drivers/acpi/acpi_video.c

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,6 @@ module_param(device_id_scheme, bool, 0444);
7070
static int only_lcd = -1;
7171
module_param(only_lcd, int, 0444);
7272

73-
static int register_backlight_delay;
74-
module_param(register_backlight_delay, int, 0444);
75-
MODULE_PARM_DESC(register_backlight_delay,
76-
"Delay in seconds before doing fallback (non GPU driver triggered) "
77-
"backlight registration, set to 0 to disable.");
78-
7973
static bool may_report_brightness_keys;
8074
static int register_count;
8175
static DEFINE_MUTEX(register_count_mutex);
@@ -84,9 +78,6 @@ static LIST_HEAD(video_bus_head);
8478
static int acpi_video_bus_add(struct acpi_device *device);
8579
static void acpi_video_bus_remove(struct acpi_device *device);
8680
static void acpi_video_bus_notify(struct acpi_device *device, u32 event);
87-
static void acpi_video_bus_register_backlight_work(struct work_struct *ignored);
88-
static DECLARE_DELAYED_WORK(video_bus_register_backlight_work,
89-
acpi_video_bus_register_backlight_work);
9081

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

2099-
static void acpi_video_bus_register_backlight_work(struct work_struct *ignored)
2100-
{
2101-
acpi_video_register_backlight();
2102-
}
2103-
21042090
static int __init is_i740(struct pci_dev *dev)
21052091
{
21062092
if (dev->device == 0x00D1)
@@ -2183,17 +2169,6 @@ static bool should_check_lcd_flag(void)
21832169
return false;
21842170
}
21852171

2186-
/*
2187-
* At least one graphics driver has reported that no LCD is connected
2188-
* via the native interface. cancel the registration for fallback acpi_video0.
2189-
* If another driver still deems this necessary, it can explicitly register it.
2190-
*/
2191-
void acpi_video_report_nolcd(void)
2192-
{
2193-
cancel_delayed_work(&video_bus_register_backlight_work);
2194-
}
2195-
EXPORT_SYMBOL(acpi_video_report_nolcd);
2196-
21972172
int acpi_video_register(void)
21982173
{
21992174
int ret = 0;
@@ -2222,18 +2197,6 @@ int acpi_video_register(void)
22222197
*/
22232198
register_count = 1;
22242199

2225-
/*
2226-
* acpi_video_bus_add() skips registering the userspace visible
2227-
* backlight_device. The intend is for this to be registered by the
2228-
* drm/kms driver calling acpi_video_register_backlight() *after* it is
2229-
* done setting up its own native backlight device. The delayed work
2230-
* ensures that acpi_video_register_backlight() always gets called
2231-
* eventually, in case there is no drm/kms driver or it is disabled.
2232-
*/
2233-
if (register_backlight_delay)
2234-
schedule_delayed_work(&video_bus_register_backlight_work,
2235-
register_backlight_delay * HZ);
2236-
22372200
leave:
22382201
mutex_unlock(&register_count_mutex);
22392202
return ret;
@@ -2244,7 +2207,6 @@ void acpi_video_unregister(void)
22442207
{
22452208
mutex_lock(&register_count_mutex);
22462209
if (register_count) {
2247-
cancel_delayed_work_sync(&video_bus_register_backlight_work);
22482210
acpi_bus_unregister_driver(&acpi_video_bus);
22492211
register_count = 0;
22502212
may_report_brightness_keys = false;

drivers/acpi/acpica/acapps.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Module Name: acapps - common include for ACPI applications/tools
55
*
6-
* Copyright (C) 2000 - 2022, Intel Corp.
6+
* Copyright (C) 2000 - 2023, Intel Corp.
77
*
88
*****************************************************************************/
99

drivers/acpi/acpica/accommon.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Name: accommon.h - Common include files for generation of ACPICA source
55
*
6-
* Copyright (C) 2000 - 2022, Intel Corp.
6+
* Copyright (C) 2000 - 2023, Intel Corp.
77
*
88
*****************************************************************************/
99

drivers/acpi/acpica/acconvert.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Module Name: acapps - common include for ACPI applications/tools
55
*
6-
* Copyright (C) 2000 - 2022, Intel Corp.
6+
* Copyright (C) 2000 - 2023, Intel Corp.
77
*
88
*****************************************************************************/
99

drivers/acpi/acpica/acdebug.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Name: acdebug.h - ACPI/AML debugger
55
*
6-
* Copyright (C) 2000 - 2022, Intel Corp.
6+
* Copyright (C) 2000 - 2023, Intel Corp.
77
*
88
*****************************************************************************/
99

drivers/acpi/acpica/acdispat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Name: acdispat.h - dispatcher (parser to interpreter interface)
55
*
6-
* Copyright (C) 2000 - 2022, Intel Corp.
6+
* Copyright (C) 2000 - 2023, Intel Corp.
77
*
88
*****************************************************************************/
99

0 commit comments

Comments
 (0)