ACPI support fixes and cleanups for 7.2-rc1

- Unbreak ACPICA tools builds after switching over to using
    strscpy_pad() that is kernel-specific (Rafael Wysocki)
 
  - Fix module parameter file paths in comments in the ACPI code managing
    the general sysfs attributes (Zenghui Yu)
 
  - Update kerneldoc comments in the ACPI resource management code to
    follow the common style (Andy Shevchenko)
 
  - Fix inverted interface check in ipmi_bmc_gone() that may cause ACPI
    IPMI interfaces to be mishandled (Xu Rao)
 
  - Add __cpuidle annotation to idle state management functions related
    to ACPI _LPI to avoid trace-induced RCU warnings (Li RongQing)
 -----BEGIN PGP SIGNATURE-----
 
 iQFGBAABCAAwFiEEcM8Aw/RY0dgsiRUR7l+9nS/U47UFAmo+uaYSHHJqd0Byand5
 c29ja2kubmV0AAoJEO5fvZ0v1OO1ozUH/i79gN5EF4jbXdpyAsL8f+G3JhSs54gG
 VXpBUI4Wy56sLbWkJs1E9BzLpoUTPJb6PaYYNb+v2+MWnZSR/LzQTDprggeTLqm0
 JbRCxBGFoN8yeSoWinUvSPCs6uVjqOMVe9yRvDTVcq+V+kpeNzkZnhGcy/1XQov8
 5uur7kIggWqFo4ospTUi50caZDADOoZiZkZNNh/DRS1qmvE+XKN/8ZHSHkY5uZDa
 GjK15Bf9E/cS13T5UglSOO/Vz/a/ZeGMgjSfozBirOo5VPIaJPecYPrAG4mNsCxz
 0ZewK5zMaNrTf5owDAEVUml8D+/+F4Yp28q+vYQIdiuc+u3/FIr0a0w=
 =TKWf
 -----END PGP SIGNATURE-----

Merge tag 'acpi-7.2-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI support fixes and cleanups from Rafael Wysocki:
 "These fix assorted issues and do cleanups in the ACPI support code,
  which includes a fix for tools build breakage related to strncpy()
  removal:

   - Unbreak ACPICA tools builds after switching over to using
     strscpy_pad() that is kernel-specific (Rafael Wysocki)

   - Fix module parameter file paths in comments in the ACPI code
     managing the general sysfs attributes (Zenghui Yu)

   - Update kerneldoc comments in the ACPI resource management code to
     follow the common style (Andy Shevchenko)

   - Fix inverted interface check in ipmi_bmc_gone() that may cause ACPI
     IPMI interfaces to be mishandled (Xu Rao)

   - Add __cpuidle annotation to idle state management functions related
     to ACPI _LPI to avoid trace-induced RCU warnings (Li RongQing)"

* tag 'acpi-7.2-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: processor_idle: Mark LPI enter functions as __cpuidle
  ACPICA: Unbreak tools build after switching over to strscpy_pad()
  ACPI: IPMI: Fix inverted interface check in ipmi_bmc_gone()
  ACPI: resource: Amend kernel-doc style
  ACPI: sysfs: Fix path of module parameters in comments
This commit is contained in:
Linus Torvalds 2026-06-26 13:00:10 -07:00
commit 737b9ff0c8
6 changed files with 23 additions and 14 deletions

View File

@ -490,7 +490,7 @@ static void ipmi_bmc_gone(int iface)
mutex_lock(&driver_data.ipmi_lock);
list_for_each_entry_safe(iter, temp,
&driver_data.ipmi_devices, head) {
if (iter->ipmi_ifnum != iface) {
if (iter->ipmi_ifnum == iface) {
ipmi_device = iter;
__ipmi_dev_kill(iter);
break;

View File

@ -168,7 +168,16 @@ void acpi_ut_safe_strncpy(char *dest, char *source, acpi_size dest_size)
{
/* Always terminate destination string */
#ifdef __KERNEL__
strscpy_pad(dest, source, dest_size);
#else
/*
* strscpy_pad() is not defined in ACPICA tools builds, so use strncpy()
* and directly NUL-terminate the destination string in that case.
*/
strncpy(dest, source, dest_size);
dest[dest_size - 1] = 0;
#endif
}
#endif

View File

@ -1143,7 +1143,7 @@ static int acpi_processor_get_lpi_info(struct acpi_processor *pr)
return 0;
}
int __weak acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi)
int __weak __cpuidle acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi)
{
return -ENODEV;
}
@ -1156,7 +1156,7 @@ int __weak acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi)
*
* Return: 0 for success or negative value for error
*/
static int acpi_idle_lpi_enter(struct cpuidle_device *dev,
static int __cpuidle acpi_idle_lpi_enter(struct cpuidle_device *dev,
struct cpuidle_driver *drv, int index)
{
struct acpi_processor *pr;

View File

@ -871,7 +871,7 @@ bool acpi_dev_resource_interrupt(struct acpi_resource *ares, int index,
EXPORT_SYMBOL_GPL(acpi_dev_resource_interrupt);
/**
* acpi_dev_free_resource_list - Free resource from %acpi_dev_get_resources().
* acpi_dev_free_resource_list - Free resource from acpi_dev_get_resources().
* @list: The head of the resource list to free.
*/
void acpi_dev_free_resource_list(struct list_head *list)
@ -991,7 +991,7 @@ static int __acpi_dev_get_resources(struct acpi_device *adev,
*
* The resultant struct resource objects are put on the list pointed to by
* @list, that must be empty initially, as members of struct resource_entry
* objects. Callers of this routine should use %acpi_dev_free_resource_list() to
* objects. Callers of this routine should use acpi_dev_free_resource_list() to
* free that list.
*
* The number of resources in the output list is returned on success, an error
@ -1032,7 +1032,7 @@ static int is_memory(struct acpi_resource *ares, void *not_used)
* The resultant struct resource objects are put on the list pointed to
* by @list, that must be empty initially, as members of struct
* resource_entry objects. Callers of this routine should use
* %acpi_dev_free_resource_list() to free that list.
* acpi_dev_free_resource_list() to free that list.
*
* The number of resources in the output list is returned on success,
* an error code reflecting the error condition is returned otherwise.

View File

@ -66,7 +66,7 @@ int acpi_processor_ffh_lpi_probe(unsigned int cpu)
return acpi_cpu_init_idle(cpu);
}
int acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi)
int __cpuidle acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi)
{
u32 state = lpi->address;

View File

@ -17,12 +17,12 @@
#ifdef CONFIG_ACPI_DEBUG
/*
* ACPI debug sysfs I/F, including:
* /sys/modules/acpi/parameters/debug_layer
* /sys/modules/acpi/parameters/debug_level
* /sys/modules/acpi/parameters/trace_method_name
* /sys/modules/acpi/parameters/trace_state
* /sys/modules/acpi/parameters/trace_debug_layer
* /sys/modules/acpi/parameters/trace_debug_level
* /sys/module/acpi/parameters/debug_layer
* /sys/module/acpi/parameters/debug_level
* /sys/module/acpi/parameters/trace_method_name
* /sys/module/acpi/parameters/trace_state
* /sys/module/acpi/parameters/trace_debug_layer
* /sys/module/acpi/parameters/trace_debug_level
*/
struct acpi_dlayer {
@ -269,7 +269,7 @@ module_param_call(trace_state, param_set_trace_state, param_get_trace_state,
#endif /* CONFIG_ACPI_DEBUG */
/* /sys/modules/acpi/parameters/aml_debug_output */
/* /sys/module/acpi/parameters/aml_debug_output */
module_param_named(aml_debug_output, acpi_gbl_enable_aml_debug_object,
byte, 0644);