mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-21 19:58:34 -05:00
Merge branches 'acpi-osl', 'acpi-tables', 'acpi-property', 'acpi-prm' and 'acpi-apei'
Merge assorted changes in ACPI library code for 6.14: - Use usleep_range() instead of msleep() in acpi_os_sleep() to reduce excessive delays due to timer inaccuracy, mostly affecting system suspend and resume (Rafael Wysocki). - Use str_enabled_disabled() string helpers in the ACPI tables parsing code to make it easier to follow (Sunil V L). - Update device properties parsing on systems using ACPI so that data firmware nodes resulting from _DSD evaluation are treated as available in firmware nodes walks (Sakari Ailus). - Fix missing guid_t declaration in linux/prmt.h (Robert Richter). - Update the GHES handling code to follow the global panic= instead of overriding it by force-rebooting the system after a fatal hw error has been reported (Borislav Petkov). * acpi-osl: ACPI: OSL: Use usleep_range() in acpi_os_sleep() * acpi-tables: ACPI: tables: Use string choice helpers * acpi-property: ACPI: property: Consider data nodes as being available * acpi-prm: ACPI: PRM: Fix missing guid_t declaration in linux/prmt.h * acpi-apei: APEI: GHES: Have GHES honor the panic= setting
This commit is contained in:
@@ -173,8 +173,6 @@ static struct gen_pool *ghes_estatus_pool;
|
||||
static struct ghes_estatus_cache __rcu *ghes_estatus_caches[GHES_ESTATUS_CACHES_SIZE];
|
||||
static atomic_t ghes_estatus_cache_alloced;
|
||||
|
||||
static int ghes_panic_timeout __read_mostly = 30;
|
||||
|
||||
static void __iomem *ghes_map(u64 pfn, enum fixed_addresses fixmap_idx)
|
||||
{
|
||||
phys_addr_t paddr;
|
||||
@@ -983,14 +981,16 @@ static void __ghes_panic(struct ghes *ghes,
|
||||
struct acpi_hest_generic_status *estatus,
|
||||
u64 buf_paddr, enum fixed_addresses fixmap_idx)
|
||||
{
|
||||
const char *msg = GHES_PFX "Fatal hardware error";
|
||||
|
||||
__ghes_print_estatus(KERN_EMERG, ghes->generic, estatus);
|
||||
|
||||
ghes_clear_estatus(ghes, estatus, buf_paddr, fixmap_idx);
|
||||
|
||||
/* reboot to log the error! */
|
||||
if (!panic_timeout)
|
||||
panic_timeout = ghes_panic_timeout;
|
||||
panic("Fatal hardware error!");
|
||||
pr_emerg("%s but panic disabled\n", msg);
|
||||
|
||||
panic(msg);
|
||||
}
|
||||
|
||||
static int ghes_proc(struct ghes *ghes)
|
||||
|
||||
@@ -607,7 +607,27 @@ acpi_status acpi_os_remove_interrupt_handler(u32 gsi, acpi_osd_handler handler)
|
||||
|
||||
void acpi_os_sleep(u64 ms)
|
||||
{
|
||||
msleep(ms);
|
||||
u64 usec = ms * USEC_PER_MSEC, delta_us = 50;
|
||||
|
||||
/*
|
||||
* Use a hrtimer because the timer wheel timers are optimized for
|
||||
* cancelation before they expire and this timer is not going to be
|
||||
* canceled.
|
||||
*
|
||||
* Set the delta between the requested sleep time and the effective
|
||||
* deadline to at least 50 us in case there is an opportunity for timer
|
||||
* coalescing.
|
||||
*
|
||||
* Moreover, longer sleeps can be assumed to need somewhat less timer
|
||||
* precision, so sacrifice some of it for making the timer a more likely
|
||||
* candidate for coalescing by setting the delta to 1% of the sleep time
|
||||
* if it is above 5 ms (this value is chosen so that the delta is a
|
||||
* continuous function of the sleep time).
|
||||
*/
|
||||
if (ms > 5)
|
||||
delta_us = (USEC_PER_MSEC / 100) * ms;
|
||||
|
||||
usleep_range(usec, usec + delta_us);
|
||||
}
|
||||
|
||||
void acpi_os_stall(u32 us)
|
||||
|
||||
@@ -1492,7 +1492,7 @@ acpi_graph_get_remote_endpoint(const struct fwnode_handle *__fwnode)
|
||||
static bool acpi_fwnode_device_is_available(const struct fwnode_handle *fwnode)
|
||||
{
|
||||
if (!is_acpi_device_node(fwnode))
|
||||
return false;
|
||||
return true;
|
||||
|
||||
return acpi_device_is_present(to_acpi_device_node(fwnode));
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header)
|
||||
(struct acpi_madt_local_apic *)header;
|
||||
pr_debug("LAPIC (acpi_id[0x%02x] lapic_id[0x%02x] %s)\n",
|
||||
p->processor_id, p->id,
|
||||
(p->lapic_flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled");
|
||||
str_enabled_disabled(p->lapic_flags & ACPI_MADT_ENABLED));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -66,7 +66,7 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header)
|
||||
(struct acpi_madt_local_x2apic *)header;
|
||||
pr_debug("X2APIC (apic_id[0x%02x] uid[0x%02x] %s)\n",
|
||||
p->local_apic_id, p->uid,
|
||||
(p->lapic_flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled");
|
||||
str_enabled_disabled(p->lapic_flags & ACPI_MADT_ENABLED));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -160,7 +160,7 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header)
|
||||
(struct acpi_madt_local_sapic *)header;
|
||||
pr_debug("LSAPIC (acpi_id[0x%02x] lsapic_id[0x%02x] lsapic_eid[0x%02x] %s)\n",
|
||||
p->processor_id, p->id, p->eid,
|
||||
(p->lapic_flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled");
|
||||
str_enabled_disabled(p->lapic_flags & ACPI_MADT_ENABLED));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -183,7 +183,7 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header)
|
||||
pr_debug("GICC (acpi_id[0x%04x] address[%llx] MPIDR[0x%llx] %s)\n",
|
||||
p->uid, p->base_address,
|
||||
p->arm_mpidr,
|
||||
(p->flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled");
|
||||
str_enabled_disabled(p->flags & ACPI_MADT_ENABLED));
|
||||
|
||||
}
|
||||
break;
|
||||
@@ -218,7 +218,7 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header)
|
||||
|
||||
pr_debug("CORE PIC (processor_id[0x%02x] core_id[0x%02x] %s)\n",
|
||||
p->processor_id, p->core_id,
|
||||
(p->flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled");
|
||||
str_enabled_disabled(p->flags & ACPI_MADT_ENABLED));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -228,7 +228,7 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header)
|
||||
|
||||
pr_debug("RISC-V INTC (acpi_uid[0x%04x] hart_id[0x%llx] %s)\n",
|
||||
p->uid, p->hart_id,
|
||||
(p->flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled");
|
||||
str_enabled_disabled(p->flags & ACPI_MADT_ENABLED));
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <linux/uuid.h>
|
||||
|
||||
#ifdef CONFIG_ACPI_PRMT
|
||||
void init_prmt(void);
|
||||
int acpi_call_prm_handler(guid_t handler_guid, void *param_buffer);
|
||||
|
||||
Reference in New Issue
Block a user