acpi.h (0ea5c948cb64bab5bc7a5516774eb8536f05aa0d) acpi.h (8d34b6f17b9ac93faa2791eb037dcb08bdf755de)
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * Copyright (C) 2013-2014, Linaro Ltd.
4 * Author: Al Stone <al.stone@linaro.org>
5 * Author: Graeme Gregory <graeme.gregory@linaro.org>
6 * Author: Hanjun Guo <hanjun.guo@linaro.org>
7 */
8

--- 105 unchanged lines hidden (view full) ---

114}
115
116struct acpi_madt_generic_interrupt *acpi_cpu_get_madt_gicc(int cpu);
117static inline u32 get_acpi_id_for_cpu(unsigned int cpu)
118{
119 return acpi_cpu_get_madt_gicc(cpu)->uid;
120}
121
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * Copyright (C) 2013-2014, Linaro Ltd.
4 * Author: Al Stone <al.stone@linaro.org>
5 * Author: Graeme Gregory <graeme.gregory@linaro.org>
6 * Author: Hanjun Guo <hanjun.guo@linaro.org>
7 */
8

--- 105 unchanged lines hidden (view full) ---

114}
115
116struct acpi_madt_generic_interrupt *acpi_cpu_get_madt_gicc(int cpu);
117static inline u32 get_acpi_id_for_cpu(unsigned int cpu)
118{
119 return acpi_cpu_get_madt_gicc(cpu)->uid;
120}
121
122static inline int get_cpu_for_acpi_id(u32 uid)
123{
124 int cpu;
125
126 for (cpu = 0; cpu < nr_cpu_ids; cpu++)
127 if (uid == get_acpi_id_for_cpu(cpu))
128 return cpu;
129
130 return -EINVAL;
131}
132
122static inline void arch_fix_phys_package_id(int num, u32 slot) { }
123void __init acpi_init_cpus(void);
124int apei_claim_sea(struct pt_regs *regs);
125#else
126static inline void acpi_init_cpus(void) { }
127static inline int apei_claim_sea(struct pt_regs *regs) { return -ENOENT; }
128#endif /* CONFIG_ACPI */
129

--- 50 unchanged lines hidden ---
133static inline void arch_fix_phys_package_id(int num, u32 slot) { }
134void __init acpi_init_cpus(void);
135int apei_claim_sea(struct pt_regs *regs);
136#else
137static inline void acpi_init_cpus(void) { }
138static inline int apei_claim_sea(struct pt_regs *regs) { return -ENOENT; }
139#endif /* CONFIG_ACPI */
140

--- 50 unchanged lines hidden ---