Skip to content

Commit bb69505

Browse files
committed
Merge tag 'acpi-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI updates from Rafael Wysocki: "These rework the handling of notifications in ACPI button drivers (to enable future simplifications and cleanups), clean up the ACPI thermal driver, update the ACPI backlight driver, add quirks working around AML bugs on some systems, fix some assorted issues and clean up code. Specifics: - Reduce ACPI device enumeration overhead related to devices with dependencies (Rafael Wysocki) - Fix the handling of Microsoft LPS0 _DSM for suspend-to-idle (Mario Limonciello) - Fix section mismatch warning in the ACPI suspend-to-idle code (Arnd Bergmann) - Drop several ACPI resource management quirks related to IRQ ovverides on AMD "Zen" systems (Mario Limonciello) - Modify the ACPI EC driver to make it only clear the EC GPE status when handling the GPE (Jeremy Compostella) - Add quirks to work around ACPI tables defects on Lenovo Yoga Book yb1-x90f/l and Nextbook Ares 8A (Hans de Goede) - Add ACPi backlight quirks for Dell Studio 1569, Lenovo ThinkPad X131e (3371 AMD version) and Apple iMac11,3 and stop trying to use vendor backlight control on relatively recent systems (Hans de Goede) - Add pwm_lookup_table entry for second PWM on CHT/BSW devices in the ACPI LPSS (Intel SoC) driver (Hans de Goede) - Add nfit_intel_shutdown_status() declaration to a local header to avoid a "missing prototypes" build warning (Arnd Bergmann) - Clean up the ACPI thermal driver and drop some dead or otherwise unneded code from it (Rafael Wysocki) - Rework the handling of notifications in the ACPI button drivers so as to allow the common notification handling code for devices to be simplified (Rafael Wysocki) - Make ghes_get_devices() return NULL to indicate that there are no GHES devices so as to allow vendor-specific EDAC drivers to probe then (Li Yang) - Mark bert_disable() as __initdata and drop an unused function from the APEI GHES code (Miaohe Lin) - Make the ACPI PAD (Processor Aggregator Device) driver realize that Zhaoxin CPUs support nonstop TSC (Tony W Wang-oc) - Drop the certainly unnecessary and likely incorrect inclusion of linux/arm-smccc.h from acpi_ffh.c (Sudeep Holla)" * tag 'acpi-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (30 commits) ACPI: video: Add backlight=native DMI quirk for Dell Studio 1569 ACPI: thermal: Drop struct acpi_thermal_flags ACPI: thermal: Drop struct acpi_thermal_state ACPI: bus: Simplify installation and removal of notify callback ACPI: tiny-power-button: Eliminate the driver notify callback ACPI: button: Use different notify handlers for lid and buttons ACPI: button: Eliminate the driver notify callback ACPI: thermal: Eliminate struct acpi_thermal_state_flags ACPI: thermal: Move acpi_thermal_driver definition ACPI: thermal: Move symbol definitions to one place ACPI: thermal: Drop redundant ACPI_TRIPS_REFRESH_DEVICES symbol ACPI: thermal: Use BIT() macro for defining flags APEI: GHES: correctly return NULL for ghes_get_devices() ACPI: FFH: Drop the inclusion of linux/arm-smccc.h ACPI: PAD: mark Zhaoxin CPUs NONSTOP TSC correctly ACPI: APEI: mark bert_disable as __initdata ACPI: EC: Clear GPE on interrupt handling only ACPI: video: Stop trying to use vendor backlight control on laptops from after ~2012 ACPI: x86: s2idle: Adjust Microsoft LPS0 _DSM handling sequence ACPI: resource: Remove "Zen" specific match and quirks ...
2 parents 2605e80 + 01fee47 commit bb69505

File tree

18 files changed

+459
-376
lines changed

18 files changed

+459
-376
lines changed

drivers/acpi/acpi_ffh.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
#include <linux/idr.h>
1010
#include <linux/io.h>
1111

12-
#include <linux/arm-smccc.h>
13-
1412
static struct acpi_ffh_info ffh_ctx;
1513

1614
int __weak acpi_ffh_address_space_arch_setup(void *handler_ctxt,

drivers/acpi/acpi_lpss.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,19 @@ static void byt_i2c_setup(struct lpss_private_data *pdata)
201201
writel(0, pdata->mmio_base + LPSS_I2C_ENABLE);
202202
}
203203

204-
/* BSW PWM used for backlight control by the i915 driver */
204+
/*
205+
* BSW PWM1 is used for backlight control by the i915 driver
206+
* BSW PWM2 is used for backlight control for fixed (etched into the glass)
207+
* touch controls on some models. These touch-controls have specialized
208+
* drivers which know they need the "pwm_soc_lpss_2" con-id.
209+
*/
205210
static struct pwm_lookup bsw_pwm_lookup[] = {
206211
PWM_LOOKUP_WITH_MODULE("80862288:00", 0, "0000:00:02.0",
207212
"pwm_soc_backlight", 0, PWM_POLARITY_NORMAL,
208213
"pwm-lpss-platform"),
214+
PWM_LOOKUP_WITH_MODULE("80862289:00", 0, NULL,
215+
"pwm_soc_lpss_2", 0, PWM_POLARITY_NORMAL,
216+
"pwm-lpss-platform"),
209217
};
210218

211219
static void bsw_pwm_setup(struct lpss_private_data *pdata)

drivers/acpi/acpi_pad.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ static void power_saving_mwait_init(void)
6666
case X86_VENDOR_AMD:
6767
case X86_VENDOR_INTEL:
6868
case X86_VENDOR_ZHAOXIN:
69+
case X86_VENDOR_CENTAUR:
6970
/*
7071
* AMD Fam10h TSC will tick in all
7172
* C/P/S0/S1 states when this bit is set.

drivers/acpi/apei/bert.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#define ACPI_BERT_PRINT_MAX_RECORDS 5
3535
#define ACPI_BERT_PRINT_MAX_LEN 1024
3636

37-
static int bert_disable;
37+
static int bert_disable __initdata;
3838

3939
/*
4040
* Print "all" the error records in the BERT table, but avoid huge spam to

drivers/acpi/apei/ghes.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ struct ghes_vendor_record_entry {
152152
};
153153

154154
static struct gen_pool *ghes_estatus_pool;
155-
static unsigned long ghes_estatus_pool_size_request;
156155

157156
static struct ghes_estatus_cache __rcu *ghes_estatus_caches[GHES_ESTATUS_CACHES_SIZE];
158157
static atomic_t ghes_estatus_cache_alloced;
@@ -191,7 +190,6 @@ int ghes_estatus_pool_init(unsigned int num_ghes)
191190
len = GHES_ESTATUS_CACHE_AVG_SIZE * GHES_ESTATUS_CACHE_ALLOCED_MAX;
192191
len += (num_ghes * GHES_ESOURCE_PREALLOC_MAX_SIZE);
193192

194-
ghes_estatus_pool_size_request = PAGE_ALIGN(len);
195193
addr = (unsigned long)vmalloc(PAGE_ALIGN(len));
196194
if (!addr)
197195
goto err_pool_alloc;
@@ -1544,6 +1542,8 @@ struct list_head *ghes_get_devices(void)
15441542

15451543
pr_warn_once("Force-loading ghes_edac on an unsupported platform. You're on your own!\n");
15461544
}
1545+
} else if (list_empty(&ghes_devs)) {
1546+
return NULL;
15471547
}
15481548

15491549
return &ghes_devs;

drivers/acpi/bus.c

Lines changed: 9 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -527,65 +527,30 @@ static void acpi_notify_device(acpi_handle handle, u32 event, void *data)
527527
acpi_drv->ops.notify(device, event);
528528
}
529529

530-
static void acpi_notify_device_fixed(void *data)
531-
{
532-
struct acpi_device *device = data;
533-
534-
/* Fixed hardware devices have no handles */
535-
acpi_notify_device(NULL, ACPI_FIXED_HARDWARE_EVENT, device);
536-
}
537-
538-
static u32 acpi_device_fixed_event(void *data)
539-
{
540-
acpi_os_execute(OSL_NOTIFY_HANDLER, acpi_notify_device_fixed, data);
541-
return ACPI_INTERRUPT_HANDLED;
542-
}
543-
544530
static int acpi_device_install_notify_handler(struct acpi_device *device,
545531
struct acpi_driver *acpi_drv)
546532
{
547-
acpi_status status;
548-
549-
if (device->device_type == ACPI_BUS_TYPE_POWER_BUTTON) {
550-
status =
551-
acpi_install_fixed_event_handler(ACPI_EVENT_POWER_BUTTON,
552-
acpi_device_fixed_event,
553-
device);
554-
} else if (device->device_type == ACPI_BUS_TYPE_SLEEP_BUTTON) {
555-
status =
556-
acpi_install_fixed_event_handler(ACPI_EVENT_SLEEP_BUTTON,
557-
acpi_device_fixed_event,
558-
device);
559-
} else {
560-
u32 type = acpi_drv->flags & ACPI_DRIVER_ALL_NOTIFY_EVENTS ?
533+
u32 type = acpi_drv->flags & ACPI_DRIVER_ALL_NOTIFY_EVENTS ?
561534
ACPI_ALL_NOTIFY : ACPI_DEVICE_NOTIFY;
535+
acpi_status status;
562536

563-
status = acpi_install_notify_handler(device->handle, type,
564-
acpi_notify_device,
565-
device);
566-
}
567-
537+
status = acpi_install_notify_handler(device->handle, type,
538+
acpi_notify_device, device);
568539
if (ACPI_FAILURE(status))
569540
return -EINVAL;
541+
570542
return 0;
571543
}
572544

573545
static void acpi_device_remove_notify_handler(struct acpi_device *device,
574546
struct acpi_driver *acpi_drv)
575547
{
576-
if (device->device_type == ACPI_BUS_TYPE_POWER_BUTTON) {
577-
acpi_remove_fixed_event_handler(ACPI_EVENT_POWER_BUTTON,
578-
acpi_device_fixed_event);
579-
} else if (device->device_type == ACPI_BUS_TYPE_SLEEP_BUTTON) {
580-
acpi_remove_fixed_event_handler(ACPI_EVENT_SLEEP_BUTTON,
581-
acpi_device_fixed_event);
582-
} else {
583-
u32 type = acpi_drv->flags & ACPI_DRIVER_ALL_NOTIFY_EVENTS ?
548+
u32 type = acpi_drv->flags & ACPI_DRIVER_ALL_NOTIFY_EVENTS ?
584549
ACPI_ALL_NOTIFY : ACPI_DEVICE_NOTIFY;
585550

586-
acpi_remove_notify_handler(device->handle, type,
587-
acpi_notify_device);
588-
}
551+
acpi_remove_notify_handler(device->handle, type,
552+
acpi_notify_device);
553+
589554
acpi_os_wait_events_complete();
590555
}
591556

0 commit comments

Comments
 (0)