Skip to content

Commit bd012f3

Browse files
committed
Merge tag 'acpi-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI updates from Rafael Wysocki: "From the new features standpoint, the most significant change here is the addition of CSI-2 and MIPI DisCo for Imaging support to the ACPI device enumeration code that will allow MIPI cameras to be enumerated through the platform firmware on systems using ACPI. Also significant is the switch-over to threaded interrupt handlers for the ACPI SCI and the dedicated EC interrupt (on systems where the former is not used) which essentially allows all ACPI code to run with local interrupts enabled. That should improve responsiveness significantly on systems where multiple GPEs are enabled and the handling of one SCI involves many I/O address space accesses which previously had to be carried out in one go with disabled interrupts on the local CPU. Apart from the above, the ACPI thermal zone driver will use the Thermal fast Sampling Period (_TFP) object if available, which should allow temperature changes to be followed more accurately on some systems, the ACPI Notify () handlers can run on all CPUs (not just on CPU0), which should generally speed up the processing of events signaled through the ACPI SCI, and the ACPI power button driver will trigger wakeup key events via the input subsystem (on systems where it is a system wakeup device) In addition to that, there are the usual bunch of fixes and cleanups. Specifics: - Add CSI-2 and DisCo for Imaging support to the ACPI device enumeration code (Sakari Ailus, Rafael J. Wysocki) - Adjust the cpufreq thermal reduction algorithm in the ACPI processor driver for Tegra241 (Srikar Srimath Tirumala, Arnd Bergmann) - Make acpi_proc_quirk_mwait_check() x86-specific (Rafael J. Wysocki) - Switch over ACPI to using a threaded interrupt handler for the SCI (Rafael J. Wysocki) - Allow ACPI Notify () handlers to run on all CPUs and clean up the ACPI interface for deferred events processing (Rafael J. Wysocki) - Switch over the ACPI EC driver to using a threaded handler for the dedicated IRQ on systems without the EC GPE (Rafael J. Wysocki) - Adjust code using ACPICA spinlocks and the ACPI EC driver spinlock to keep local interrupts on (Rafael J. Wysocki) - Adjust the USB4 _OSC handshake to correctly handle cases in which certain types of OS control are denied by the platform (Mika Westerberg) - Correct and clean up the generic function for parsing ACPI data-only tables with array structure (Yuntao Wang) - Modify acpi_dev_uid_match() to support different types of its second argument and adjust its users accordingly (Raag Jadav) - Clean up code related to acpi_evaluate_reference() and ACPI device lists (Rafael J. Wysocki) - Use generic ACPI helpers for evaluating trip point temperature objects in the ACPI thermal zone driver (Rafael J. Wysockii, Arnd Bergmann) - Add Thermal fast Sampling Period (_TFP) support to the ACPI thermal zone driver (Jeff Brasen) - Modify the ACPI LPIT table handling code to avoid u32 multiplication overflows in state residency computations (Nikita Kiryushin) - Drop an unused helper function from the ACPI backlight (video) driver and add a clarifying comment to it (Hans de Goede) - Update the ACPI backlight driver to avoid using uninitialized memory in some cases (Nikita Kiryushin) - Add ACPI backlight quirk for the Colorful X15 AT 23 laptop (Yuluo Qiu) - Add support for vendor-defined error types to the ACPI APEI error injection code (Avadhut Naik) - Adjust APEI to properly set MF_ACTION_REQUIRED on synchronous memory failure events, so they are handled differently from the asynchronous ones (Shuai Xue) - Fix NULL pointer dereference check in the ACPI extlog driver (Prarit Bhargava) - Adjust the ACPI extlog driver to clear the Extended Error Log status when RAS_CEC handled the error (Tony Luck) - Add IRQ override quirks for some Infinity laptops and for TongFang GMxXGxx (David McFarland, Hans de Goede) - Clean up the ACPI NUMA code and fix it to ensure that fake_pxm is not the same as one of the real pxm values (Yuntao Wang) - Fix the fractional clock divider flags in the ACPI LPSS (Intel SoC) driver so as to prevent miscalculation of the values in the clock divider (Andy Shevchenko) - Adjust comments in the ACPI watchdog driver to prevent kernel-doc from complaining during documentation builds (Randy Dunlap) - Make the ACPI button driver send wakeup key events to user space in addition to power button events on systems that can be woken up by the power button (Ken Xue) - Adjust pnpacpi_parse_allocated_vendor() to use memcpy() on a full structure field (Dmitry Antipov)" * tag 'acpi-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (56 commits) ACPI: resource: Add Infinity laptops to irq1_edge_low_force_override ACPI: button: trigger wakeup key events ACPI: resource: Add another DMI match for the TongFang GMxXGxx ACPI: EC: Use a spin lock without disabing interrupts ACPI: EC: Use a threaded handler for dedicated IRQ ACPI: OSL: Use spin locks without disabling interrupts ACPI: APEI: set memory failure flags as MF_ACTION_REQUIRED on synchronous events ACPI: utils: Introduce helper for _DEP list lookup ACPI: utils: Fix white space in struct acpi_handle_list definition ACPI: utils: Refine acpi_handle_list_equal() slightly ACPI: utils: Return bool from acpi_evaluate_reference() ACPI: utils: Rearrange in acpi_evaluate_reference() ACPI: arm64: export acpi_arch_thermal_cpufreq_pctg() ACPI: extlog: Clear Extended Error Log status when RAS_CEC handled the error ACPI: LPSS: Fix the fractional clock divider flags ACPI: NUMA: Fix the logic of getting the fake_pxm value ACPI: NUMA: Optimize the check for the availability of node values ACPI: NUMA: Remove unnecessary check in acpi_parse_gi_affinity() ACPI: watchdog: fix kernel-doc warnings ACPI: extlog: fix NULL pointer dereference check ...
2 parents 35f11a3 + e462013 commit bd012f3

Some content is hidden

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

41 files changed

+1603
-554
lines changed

drivers/acpi/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ config ACPI_CCA_REQUIRED
6161
config ACPI_TABLE_LIB
6262
bool
6363

64+
config ACPI_THERMAL_LIB
65+
depends on THERMAL
66+
bool
67+
6468
config ACPI_DEBUGGER
6569
bool "AML debugger interface"
6670
select ACPI_DEBUG
@@ -327,6 +331,7 @@ config ACPI_THERMAL
327331
tristate "Thermal Zone"
328332
depends on ACPI_PROCESSOR
329333
select THERMAL
334+
select ACPI_THERMAL_LIB
330335
default y
331336
help
332337
This driver supports ACPI thermal zones. Most mobile and

drivers/acpi/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ acpi-$(CONFIG_ACPI_SLEEP) += proc.o
3737
# ACPI Bus and Device Drivers
3838
#
3939
acpi-y += bus.o glue.o
40-
acpi-y += scan.o
40+
acpi-y += scan.o mipi-disco-img.o
4141
acpi-y += resource.o
4242
acpi-y += acpi_processor.o
4343
acpi-y += processor_core.o
@@ -89,6 +89,7 @@ obj-$(CONFIG_ACPI_TAD) += acpi_tad.o
8989
obj-$(CONFIG_ACPI_PCI_SLOT) += pci_slot.o
9090
obj-$(CONFIG_ACPI_PROCESSOR) += processor.o
9191
obj-$(CONFIG_ACPI) += container.o
92+
obj-$(CONFIG_ACPI_THERMAL_LIB) += thermal_lib.o
9293
obj-$(CONFIG_ACPI_THERMAL) += thermal.o
9394
obj-$(CONFIG_ACPI_PLATFORM_PROFILE) += platform_profile.o
9495
obj-$(CONFIG_ACPI_NFIT) += nfit/

drivers/acpi/acpi_extlog.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,14 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
145145
static u32 err_seq;
146146

147147
estatus = extlog_elog_entry_check(cpu, bank);
148-
if (estatus == NULL || (mce->kflags & MCE_HANDLED_CEC))
148+
if (!estatus)
149149
return NOTIFY_DONE;
150150

151+
if (mce->kflags & MCE_HANDLED_CEC) {
152+
estatus->block_status = 0;
153+
return NOTIFY_DONE;
154+
}
155+
151156
memcpy(elog_buf, (void *)estatus, ELOG_ENTRY_LEN);
152157
/* clear record status to enable BIOS to update it again */
153158
estatus->block_status = 0;
@@ -303,9 +308,10 @@ static int __init extlog_init(void)
303308
static void __exit extlog_exit(void)
304309
{
305310
mce_unregister_decode_chain(&extlog_mce_dec);
306-
((struct extlog_l1_head *)extlog_l1_addr)->flags &= ~FLAG_OS_OPTIN;
307-
if (extlog_l1_addr)
311+
if (extlog_l1_addr) {
312+
((struct extlog_l1_head *)extlog_l1_addr)->flags &= ~FLAG_OS_OPTIN;
308313
acpi_os_unmap_iomem(extlog_l1_addr, l1_size);
314+
}
309315
if (elog_addr)
310316
acpi_os_unmap_iomem(elog_addr, elog_size);
311317
release_mem_region(elog_base, elog_size);

drivers/acpi/acpi_lpit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static void lpit_update_residency(struct lpit_residency_info *info,
105105
return;
106106

107107
info->frequency = lpit_native->counter_frequency ?
108-
lpit_native->counter_frequency : tsc_khz * 1000;
108+
lpit_native->counter_frequency : mul_u32_u32(tsc_khz, 1000U);
109109
if (!info->frequency)
110110
info->frequency = 1;
111111

drivers/acpi/acpi_lpss.c

Lines changed: 8 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,9 @@ static struct pwm_lookup byt_pwm_lookup[] = {
167167

168168
static void byt_pwm_setup(struct lpss_private_data *pdata)
169169
{
170-
u64 uid;
171-
172170
/* Only call pwm_add_table for the first PWM controller */
173-
if (acpi_dev_uid_to_integer(pdata->adev, &uid) || uid != 1)
174-
return;
175-
176-
pwm_add_table(byt_pwm_lookup, ARRAY_SIZE(byt_pwm_lookup));
171+
if (acpi_dev_uid_match(pdata->adev, 1))
172+
pwm_add_table(byt_pwm_lookup, ARRAY_SIZE(byt_pwm_lookup));
177173
}
178174

179175
#define LPSS_I2C_ENABLE 0x6c
@@ -218,13 +214,9 @@ static struct pwm_lookup bsw_pwm_lookup[] = {
218214

219215
static void bsw_pwm_setup(struct lpss_private_data *pdata)
220216
{
221-
u64 uid;
222-
223217
/* Only call pwm_add_table for the first PWM controller */
224-
if (acpi_dev_uid_to_integer(pdata->adev, &uid) || uid != 1)
225-
return;
226-
227-
pwm_add_table(bsw_pwm_lookup, ARRAY_SIZE(bsw_pwm_lookup));
218+
if (acpi_dev_uid_match(pdata->adev, 1))
219+
pwm_add_table(bsw_pwm_lookup, ARRAY_SIZE(bsw_pwm_lookup));
228220
}
229221

230222
static const struct property_entry lpt_spi_properties[] = {
@@ -461,8 +453,9 @@ static int register_device_clock(struct acpi_device *adev,
461453
if (!clk_name)
462454
return -ENOMEM;
463455
clk = clk_register_fractional_divider(NULL, clk_name, parent,
456+
0, prv_base, 1, 15, 16, 15,
464457
CLK_FRAC_DIVIDER_POWER_OF_TWO_PS,
465-
prv_base, 1, 15, 16, 15, 0, NULL);
458+
NULL);
466459
parent = clk_name;
467460

468461
clk_name = kasprintf(GFP_KERNEL, "%s-update", devname);
@@ -570,34 +563,6 @@ static struct device *acpi_lpss_find_device(const char *hid, const char *uid)
570563
return bus_find_device(&pci_bus_type, NULL, &data, match_hid_uid);
571564
}
572565

573-
static bool acpi_lpss_dep(struct acpi_device *adev, acpi_handle handle)
574-
{
575-
struct acpi_handle_list dep_devices;
576-
acpi_status status;
577-
bool ret = false;
578-
int i;
579-
580-
if (!acpi_has_method(adev->handle, "_DEP"))
581-
return false;
582-
583-
status = acpi_evaluate_reference(adev->handle, "_DEP", NULL,
584-
&dep_devices);
585-
if (ACPI_FAILURE(status)) {
586-
dev_dbg(&adev->dev, "Failed to evaluate _DEP.\n");
587-
return false;
588-
}
589-
590-
for (i = 0; i < dep_devices.count; i++) {
591-
if (dep_devices.handles[i] == handle) {
592-
ret = true;
593-
break;
594-
}
595-
}
596-
597-
acpi_handle_list_free(&dep_devices);
598-
return ret;
599-
}
600-
601566
static void acpi_lpss_link_consumer(struct device *dev1,
602567
const struct lpss_device_links *link)
603568
{
@@ -608,7 +573,7 @@ static void acpi_lpss_link_consumer(struct device *dev1,
608573
return;
609574

610575
if ((link->dep_missing_ids && dmi_check_system(link->dep_missing_ids))
611-
|| acpi_lpss_dep(ACPI_COMPANION(dev2), ACPI_HANDLE(dev1)))
576+
|| acpi_device_dep(ACPI_HANDLE(dev2), ACPI_HANDLE(dev1)))
612577
device_link_add(dev2, dev1, link->flags);
613578

614579
put_device(dev2);
@@ -624,7 +589,7 @@ static void acpi_lpss_link_supplier(struct device *dev1,
624589
return;
625590

626591
if ((link->dep_missing_ids && dmi_check_system(link->dep_missing_ids))
627-
|| acpi_lpss_dep(ACPI_COMPANION(dev1), ACPI_HANDLE(dev2)))
592+
|| acpi_device_dep(ACPI_HANDLE(dev1), ACPI_HANDLE(dev2)))
628593
device_link_add(dev1, dev2, link->flags);
629594

630595
put_device(dev2);

drivers/acpi/acpi_video.c

Lines changed: 16 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ MODULE_PARM_DESC(hw_changes_brightness,
6767
static bool device_id_scheme = false;
6868
module_param(device_id_scheme, bool, 0444);
6969

70-
static int only_lcd = -1;
70+
static int only_lcd;
7171
module_param(only_lcd, int, 0444);
7272

7373
static bool may_report_brightness_keys;
@@ -500,6 +500,15 @@ static const struct dmi_system_id video_dmi_table[] = {
500500
DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 3350"),
501501
},
502502
},
503+
{
504+
.callback = video_set_report_key_events,
505+
.driver_data = (void *)((uintptr_t)REPORT_BRIGHTNESS_KEY_EVENTS),
506+
.ident = "COLORFUL X15 AT 23",
507+
.matches = {
508+
DMI_MATCH(DMI_SYS_VENDOR, "COLORFUL"),
509+
DMI_MATCH(DMI_PRODUCT_NAME, "X15 AT 23"),
510+
},
511+
},
503512
/*
504513
* Some machines change the brightness themselves when a brightness
505514
* hotkey gets pressed, despite us telling them not to. In this case
@@ -1713,12 +1722,12 @@ static void acpi_video_dev_register_backlight(struct acpi_video_device *device)
17131722
return;
17141723
count++;
17151724

1716-
acpi_get_parent(device->dev->handle, &acpi_parent);
1717-
1718-
pdev = acpi_get_pci_dev(acpi_parent);
1719-
if (pdev) {
1720-
parent = &pdev->dev;
1721-
pci_dev_put(pdev);
1725+
if (ACPI_SUCCESS(acpi_get_parent(device->dev->handle, &acpi_parent))) {
1726+
pdev = acpi_get_pci_dev(acpi_parent);
1727+
if (pdev) {
1728+
parent = &pdev->dev;
1729+
pci_dev_put(pdev);
1730+
}
17221731
}
17231732

17241733
memset(&props, 0, sizeof(struct backlight_properties));
@@ -2137,57 +2146,6 @@ static int __init intel_opregion_present(void)
21372146
return opregion;
21382147
}
21392148

2140-
/* Check if the chassis-type indicates there is no builtin LCD panel */
2141-
static bool dmi_is_desktop(void)
2142-
{
2143-
const char *chassis_type;
2144-
unsigned long type;
2145-
2146-
chassis_type = dmi_get_system_info(DMI_CHASSIS_TYPE);
2147-
if (!chassis_type)
2148-
return false;
2149-
2150-
if (kstrtoul(chassis_type, 10, &type) != 0)
2151-
return false;
2152-
2153-
switch (type) {
2154-
case 0x03: /* Desktop */
2155-
case 0x04: /* Low Profile Desktop */
2156-
case 0x05: /* Pizza Box */
2157-
case 0x06: /* Mini Tower */
2158-
case 0x07: /* Tower */
2159-
case 0x10: /* Lunch Box */
2160-
case 0x11: /* Main Server Chassis */
2161-
return true;
2162-
}
2163-
2164-
return false;
2165-
}
2166-
2167-
/*
2168-
* We're seeing a lot of bogus backlight interfaces on newer machines
2169-
* without a LCD such as desktops, servers and HDMI sticks. Checking the
2170-
* lcd flag fixes this, enable this by default on any machines which are:
2171-
* 1. Win8 ready (where we also prefer the native backlight driver, so
2172-
* normally the acpi_video code should not register there anyways); *and*
2173-
* 2.1 Report a desktop/server DMI chassis-type, or
2174-
* 2.2 Are an ACPI-reduced-hardware platform (and thus won't use the EC for
2175-
backlight control)
2176-
*/
2177-
static bool should_check_lcd_flag(void)
2178-
{
2179-
if (!acpi_osi_is_win8())
2180-
return false;
2181-
2182-
if (dmi_is_desktop())
2183-
return true;
2184-
2185-
if (acpi_reduced_hardware())
2186-
return true;
2187-
2188-
return false;
2189-
}
2190-
21912149
int acpi_video_register(void)
21922150
{
21932151
int ret = 0;
@@ -2201,9 +2159,6 @@ int acpi_video_register(void)
22012159
goto leave;
22022160
}
22032161

2204-
if (only_lcd == -1)
2205-
only_lcd = should_check_lcd_flag();
2206-
22072162
dmi_check_system(video_dmi_table);
22082163

22092164
ret = acpi_bus_register_driver(&acpi_video_bus);

drivers/acpi/acpi_watchdog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ static const struct acpi_table_wdat *acpi_watchdog_get_wdat(void)
8181
return wdat;
8282
}
8383

84-
/**
84+
/*
8585
* Returns true if this system should prefer ACPI based watchdog instead of
8686
* the native one (which are typically the same hardware).
8787
*/

0 commit comments

Comments
 (0)