mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 05:11:48 +00:00
c5a1330573
The 32-bit ARM port doesn't have ACPI headers, and conditionally including them is going to look horrendous. In preparation for sharing the PSCI invocation code with 32-bit, move the acpi_psci_* function declarations and definitions such that the PSCI client code need not include ACPI headers. While it would seem like we could simply hide the ACPI includes in psci.h, the ACPI headers have hilarious circular dependencies which make this infeasible without reorganising most of ACPICA. So rather than doing that, move the acpi_psci_* prototypes into psci.h. The psci_acpi_init function is made dependent on CONFIG_ACPI (with a stub implementation in asm/psci.h) such that it need not be built for 32-bit ARM or kernels without ACPI support. The currently missing __init annotations are added to the prototypes in the header. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Hanjun Guo <hanjun.guo@linaro.org> Reviewed-by: Al Stone <al.stone@linaro.org> Reviewed-by: Ashwin Chaugule <ashwin.chaugule@linaro.org> Tested-by: Hanjun Guo <hanjun.guo@linaro.org> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Cc: Will Deacon <will.deacon@arm.com>
29 lines
836 B
C
29 lines
836 B
C
/*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* Copyright (C) 2013 ARM Limited
|
|
*/
|
|
|
|
#ifndef __ASM_PSCI_H
|
|
#define __ASM_PSCI_H
|
|
|
|
int __init psci_dt_init(void);
|
|
|
|
#ifdef CONFIG_ACPI
|
|
int __init psci_acpi_init(void);
|
|
bool __init acpi_psci_present(void);
|
|
bool __init acpi_psci_use_hvc(void);
|
|
#else
|
|
static inline int psci_acpi_init(void) { return 0; }
|
|
static inline bool acpi_psci_present(void) { return false; }
|
|
#endif
|
|
|
|
#endif /* __ASM_PSCI_H */
|