setup.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Prototypes for functions that are shared between setup_(32|64|common).c
  4. *
  5. * Copyright 2016 Michael Ellerman, IBM Corporation.
  6. */
  7. #ifndef __ARCH_POWERPC_KERNEL_SETUP_H
  8. #define __ARCH_POWERPC_KERNEL_SETUP_H
  9. void initialize_cache_info(void);
  10. void irqstack_early_init(void);
  11. #ifdef CONFIG_PPC32
  12. void setup_power_save(void);
  13. #else
  14. static inline void setup_power_save(void) { };
  15. #endif
  16. #if defined(CONFIG_PPC64) && defined(CONFIG_SMP)
  17. void check_smt_enabled(void);
  18. #else
  19. static inline void check_smt_enabled(void) { };
  20. #endif
  21. #if defined(CONFIG_PPC_BOOK3E) && defined(CONFIG_SMP)
  22. void setup_tlb_core_data(void);
  23. #else
  24. static inline void setup_tlb_core_data(void) { };
  25. #endif
  26. #if defined(CONFIG_PPC_BOOK3E) || defined(CONFIG_BOOKE) || defined(CONFIG_40x)
  27. void exc_lvl_early_init(void);
  28. #else
  29. static inline void exc_lvl_early_init(void) { };
  30. #endif
  31. #if defined(CONFIG_PPC64) || defined(CONFIG_VMAP_STACK)
  32. void emergency_stack_init(void);
  33. #else
  34. static inline void emergency_stack_init(void) { };
  35. #endif
  36. #ifdef CONFIG_PPC64
  37. u64 ppc64_bolted_size(void);
  38. /* Default SPR values from firmware/kexec */
  39. extern unsigned long spr_default_dscr;
  40. #endif
  41. /*
  42. * Having this in kvm_ppc.h makes include dependencies too
  43. * tricky to solve for setup-common.c so have it here.
  44. */
  45. #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
  46. void kvm_cma_reserve(void);
  47. #else
  48. static inline void kvm_cma_reserve(void) { };
  49. #endif
  50. #ifdef CONFIG_TAU
  51. u32 cpu_temp(unsigned long cpu);
  52. u32 cpu_temp_both(unsigned long cpu);
  53. u32 tau_interrupts(unsigned long cpu);
  54. #endif /* CONFIG_TAU */
  55. #endif /* __ARCH_POWERPC_KERNEL_SETUP_H */