mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 10:11:38 -04:00
ACPI: Centralize acpi_get_cpu_uid() declaration in include/linux/acpi.h
Centralize acpi_get_cpu_uid() in include/linux/acpi.h (global scope) and remove arch-specific declarations from arm64/loongarch/riscv/x86 asm/acpi.h. This unifies the interface across architectures and simplifies maintenance by eliminating duplicate prototypes. Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com> Link: https://patch.msgid.link/20260401081640.26875-6-fengchengwen@huawei.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
committed by
Rafael J. Wysocki
parent
3cfe889f89
commit
f652d0a4e1
@@ -118,7 +118,6 @@ static inline u32 get_acpi_id_for_cpu(unsigned int cpu)
|
||||
{
|
||||
return acpi_cpu_get_madt_gicc(cpu)->uid;
|
||||
}
|
||||
int acpi_get_cpu_uid(unsigned int cpu, u32 *uid);
|
||||
int get_cpu_for_acpi_id(u32 uid);
|
||||
|
||||
static inline void arch_fix_phys_package_id(int num, u32 slot) { }
|
||||
|
||||
@@ -44,7 +44,6 @@ static inline u32 get_acpi_id_for_cpu(unsigned int cpu)
|
||||
{
|
||||
return acpi_core_pic[cpu_logical_map(cpu)].processor_id;
|
||||
}
|
||||
int acpi_get_cpu_uid(unsigned int cpu, u32 *uid);
|
||||
|
||||
#endif /* !CONFIG_ACPI */
|
||||
|
||||
|
||||
@@ -65,7 +65,6 @@ static inline u32 get_acpi_id_for_cpu(int cpu)
|
||||
{
|
||||
return acpi_cpu_get_madt_rintc(cpu)->uid;
|
||||
}
|
||||
int acpi_get_cpu_uid(unsigned int cpu, u32 *uid);
|
||||
|
||||
int acpi_get_riscv_isa(struct acpi_table_header *table,
|
||||
unsigned int cpu, const char **isa);
|
||||
|
||||
@@ -157,8 +157,6 @@ static inline bool acpi_has_cpu_in_madt(void)
|
||||
return !!acpi_lapic;
|
||||
}
|
||||
|
||||
int acpi_get_cpu_uid(unsigned int cpu, u32 *uid);
|
||||
|
||||
#define ACPI_HAVE_ARCH_SET_ROOT_POINTER
|
||||
static __always_inline void acpi_arch_set_root_pointer(u64 addr)
|
||||
{
|
||||
|
||||
@@ -324,6 +324,17 @@ int acpi_unmap_cpu(int cpu);
|
||||
|
||||
acpi_handle acpi_get_processor_handle(int cpu);
|
||||
|
||||
/**
|
||||
* acpi_get_cpu_uid() - Get ACPI Processor UID of from MADT table
|
||||
* @cpu: Logical CPU number (0-based)
|
||||
* @uid: Pointer to store ACPI Processor UID
|
||||
*
|
||||
* Return: 0 on success (ACPI Processor ID stored in *uid);
|
||||
* -EINVAL if CPU number is invalid or out of range;
|
||||
* -ENODEV if ACPI Processor UID for the CPU is not found.
|
||||
*/
|
||||
int acpi_get_cpu_uid(unsigned int cpu, u32 *uid);
|
||||
|
||||
#ifdef CONFIG_ACPI_HOTPLUG_IOAPIC
|
||||
int acpi_get_ioapic_id(acpi_handle handle, u32 gsi_base, u64 *phys_addr);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user