mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 10:01:39 -05:00
Merge tag 'acpi-6.15-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull more ACPI updates from Rafael Wysocki:
"These are fixes and cleanups on top of the previous ACPI material for
6.15-rc1 merged recently:
- Extend the Lenovo Yoga Tab 3 ACPI quirk to skip GPIO event-handlers
along with ACPI AC and battery which makes it work with Linux when
started in the Windows mode (Hans de Goede)
- Prevent the ACPI processor idle driver from being used on systems
without _CST and with invalid C2/C3 in FADT in order to restore its
previous (and expected) behavior that has been altered
inadvertently by a recent code change (Giovanni Gherdovich)
- Skip ACPI IRQ override on ASUS Vivobook 14 X1404VAP to make the
internal keyboard work on it (Paul Menzel)
- Make the ACPI backlight driver handle fetching EDID passed as
ACPI_TYPE_PACKAGE which is not specification-compliant, but has
been encountered in the field (Gergo Koteles)
- Simplify the aggregation of choices in the ACPI platform-profile
driver which has been unlocked by recent modifications of that
driver (Kurt Borja)
- Use str_enabled_disabled() instead of hardcoded strings in the ACPI
code related to NUMA (Thorsten Blum)
- Add Intel OC Watchdog device IDs to non-PNP device list to prevent
PNP from claiming the devices that carry these IDs in which case
non-PNP drivers cannot bind to them (Diogo Ivo)"
* tag 'acpi-6.15-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ACPI: video: Handle fetching EDID as ACPI_TYPE_PACKAGE
ACPI: processor: idle: Return an error if both P_LVL{2,3} idle states are invalid
ACPI: platform_profile: Optimize _aggregate_choices()
ACPI: x86: Extend Lenovo Yoga Tab 3 quirk with skip GPIO event-handlers
ACPI: resource: Skip IRQ override on ASUS Vivobook 14 X1404VAP
ACPI: PNP: Add Intel OC Watchdog IDs to non-PNP device list
ACPI: NUMA: Use str_enabled_disabled() helper function
This commit is contained in:
@@ -353,8 +353,10 @@ static bool acpi_pnp_match(const char *idstr, const struct acpi_device_id **matc
|
||||
* device represented by it.
|
||||
*/
|
||||
static const struct acpi_device_id acpi_nonpnp_device_ids[] = {
|
||||
{"INT3F0D"},
|
||||
{"INTC1080"},
|
||||
{"INTC1081"},
|
||||
{"INTC1099"},
|
||||
{""},
|
||||
};
|
||||
|
||||
|
||||
@@ -649,6 +649,13 @@ acpi_video_device_EDID(struct acpi_video_device *device, void **edid, int length
|
||||
|
||||
obj = buffer.pointer;
|
||||
|
||||
/*
|
||||
* Some buggy implementations incorrectly return the EDID buffer in an ACPI package.
|
||||
* In this case, extract the buffer from the package.
|
||||
*/
|
||||
if (obj && obj->type == ACPI_TYPE_PACKAGE && obj->package.count == 1)
|
||||
obj = &obj->package.elements[0];
|
||||
|
||||
if (obj && obj->type == ACPI_TYPE_BUFFER) {
|
||||
*edid = kmemdup(obj->buffer.pointer, obj->buffer.length, GFP_KERNEL);
|
||||
ret = *edid ? obj->buffer.length : -ENOMEM;
|
||||
@@ -658,7 +665,7 @@ acpi_video_device_EDID(struct acpi_video_device *device, void **edid, int length
|
||||
ret = -EFAULT;
|
||||
}
|
||||
|
||||
kfree(obj);
|
||||
kfree(buffer.pointer);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <linux/nodemask.h>
|
||||
#include <linux/topology.h>
|
||||
#include <linux/numa_memblks.h>
|
||||
#include <linux/string_choices.h>
|
||||
|
||||
static nodemask_t nodes_found_map = NODE_MASK_NONE;
|
||||
|
||||
@@ -188,8 +189,7 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header)
|
||||
pr_debug("SRAT Processor (id[0x%02x] eid[0x%02x]) in proximity domain %d %s\n",
|
||||
p->apic_id, p->local_sapic_eid,
|
||||
p->proximity_domain_lo,
|
||||
(p->flags & ACPI_SRAT_CPU_ENABLED) ?
|
||||
"enabled" : "disabled");
|
||||
str_enabled_disabled(p->flags & ACPI_SRAT_CPU_ENABLED));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -201,8 +201,7 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header)
|
||||
(unsigned long long)p->base_address,
|
||||
(unsigned long long)p->length,
|
||||
p->proximity_domain,
|
||||
(p->flags & ACPI_SRAT_MEM_ENABLED) ?
|
||||
"enabled" : "disabled",
|
||||
str_enabled_disabled(p->flags & ACPI_SRAT_MEM_ENABLED),
|
||||
(p->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) ?
|
||||
" hot-pluggable" : "",
|
||||
(p->flags & ACPI_SRAT_MEM_NON_VOLATILE) ?
|
||||
@@ -217,8 +216,7 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header)
|
||||
pr_debug("SRAT Processor (x2apicid[0x%08x]) in proximity domain %d %s\n",
|
||||
p->apic_id,
|
||||
p->proximity_domain,
|
||||
(p->flags & ACPI_SRAT_CPU_ENABLED) ?
|
||||
"enabled" : "disabled");
|
||||
str_enabled_disabled(p->flags & ACPI_SRAT_CPU_ENABLED));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -229,8 +227,7 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header)
|
||||
pr_debug("SRAT Processor (acpi id[0x%04x]) in proximity domain %d %s\n",
|
||||
p->acpi_processor_uid,
|
||||
p->proximity_domain,
|
||||
(p->flags & ACPI_SRAT_GICC_ENABLED) ?
|
||||
"enabled" : "disabled");
|
||||
str_enabled_disabled(p->flags & ACPI_SRAT_GICC_ENABLED));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -248,8 +245,7 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header)
|
||||
*(u16 *)(&p->device_handle[0]),
|
||||
*(u16 *)(&p->device_handle[2]),
|
||||
p->proximity_domain,
|
||||
(p->flags & ACPI_SRAT_GENERIC_AFFINITY_ENABLED) ?
|
||||
"enabled" : "disabled");
|
||||
str_enabled_disabled(p->flags & ACPI_SRAT_GENERIC_AFFINITY_ENABLED));
|
||||
} else {
|
||||
/*
|
||||
* In this case we can rely on the device having a
|
||||
@@ -259,8 +255,7 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header)
|
||||
(char *)(&p->device_handle[0]),
|
||||
(char *)(&p->device_handle[8]),
|
||||
p->proximity_domain,
|
||||
(p->flags & ACPI_SRAT_GENERIC_AFFINITY_ENABLED) ?
|
||||
"enabled" : "disabled");
|
||||
str_enabled_disabled(p->flags & ACPI_SRAT_GENERIC_AFFINITY_ENABLED));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -272,8 +267,7 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header)
|
||||
pr_debug("SRAT Processor (acpi id[0x%04x]) in proximity domain %d %s\n",
|
||||
p->acpi_processor_uid,
|
||||
p->proximity_domain,
|
||||
(p->flags & ACPI_SRAT_RINTC_ENABLED) ?
|
||||
"enabled" : "disabled");
|
||||
str_enabled_disabled(p->flags & ACPI_SRAT_RINTC_ENABLED));
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -245,7 +245,8 @@ static const struct class platform_profile_class = {
|
||||
/**
|
||||
* _aggregate_choices - Aggregate the available profile choices
|
||||
* @dev: The device
|
||||
* @arg: struct aggregate_choices_data
|
||||
* @arg: struct aggregate_choices_data, with it's aggregate member bitmap
|
||||
* initially filled with ones
|
||||
*
|
||||
* Return: 0 on success, -errno on failure
|
||||
*/
|
||||
@@ -256,12 +257,10 @@ static int _aggregate_choices(struct device *dev, void *arg)
|
||||
struct platform_profile_handler *handler;
|
||||
|
||||
lockdep_assert_held(&profile_lock);
|
||||
|
||||
handler = to_pprof_handler(dev);
|
||||
bitmap_or(tmp, handler->choices, handler->hidden_choices, PLATFORM_PROFILE_LAST);
|
||||
if (test_bit(PLATFORM_PROFILE_LAST, data->aggregate))
|
||||
bitmap_copy(data->aggregate, tmp, PLATFORM_PROFILE_LAST);
|
||||
else
|
||||
bitmap_and(data->aggregate, tmp, data->aggregate, PLATFORM_PROFILE_LAST);
|
||||
bitmap_and(data->aggregate, tmp, data->aggregate, PLATFORM_PROFILE_LAST);
|
||||
data->count++;
|
||||
|
||||
return 0;
|
||||
@@ -305,7 +304,6 @@ static ssize_t platform_profile_choices_show(struct kobject *kobj,
|
||||
};
|
||||
int err;
|
||||
|
||||
set_bit(PLATFORM_PROFILE_LAST, data.aggregate);
|
||||
scoped_cond_guard(mutex_intr, return -ERESTARTSYS, &profile_lock) {
|
||||
err = class_for_each_device(&platform_profile_class, NULL,
|
||||
&data, _aggregate_choices);
|
||||
@@ -422,7 +420,7 @@ static ssize_t platform_profile_store(struct kobject *kobj,
|
||||
i = sysfs_match_string(profile_names, buf);
|
||||
if (i < 0 || i == PLATFORM_PROFILE_CUSTOM)
|
||||
return -EINVAL;
|
||||
set_bit(PLATFORM_PROFILE_LAST, data.aggregate);
|
||||
|
||||
scoped_cond_guard(mutex_intr, return -ERESTARTSYS, &profile_lock) {
|
||||
ret = class_for_each_device(&platform_profile_class, NULL,
|
||||
&data, _aggregate_choices);
|
||||
@@ -502,7 +500,6 @@ int platform_profile_cycle(void)
|
||||
enum platform_profile_option profile = PLATFORM_PROFILE_LAST;
|
||||
int err;
|
||||
|
||||
set_bit(PLATFORM_PROFILE_LAST, data.aggregate);
|
||||
scoped_cond_guard(mutex_intr, return -ERESTARTSYS, &profile_lock) {
|
||||
err = class_for_each_device(&platform_profile_class, NULL,
|
||||
&profile, _aggregate_profiles);
|
||||
|
||||
@@ -268,6 +268,10 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
|
||||
ACPI_CX_DESC_LEN, "ACPI P_LVL3 IOPORT 0x%x",
|
||||
pr->power.states[ACPI_STATE_C3].address);
|
||||
|
||||
if (!pr->power.states[ACPI_STATE_C2].address &&
|
||||
!pr->power.states[ACPI_STATE_C3].address)
|
||||
return -ENODEV;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -440,6 +440,13 @@ static const struct dmi_system_id irq1_level_low_skip_override[] = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "S5602ZA"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Asus Vivobook X1404VAP */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "X1404VAP"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Asus Vivobook X1504VAP */
|
||||
.matches = {
|
||||
|
||||
@@ -374,7 +374,8 @@ static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_VERSION, "Blade3-10A-001"),
|
||||
},
|
||||
.driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
|
||||
ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY),
|
||||
ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY |
|
||||
ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS),
|
||||
},
|
||||
{
|
||||
/* Medion Lifetab S10346 */
|
||||
|
||||
Reference in New Issue
Block a user