setup.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Prototypes for functions that are shared between setup_(32|64|common).c
  3. *
  4. * Copyright 2016 Michael Ellerman, IBM Corporation.
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License
  8. * as published by the Free Software Foundation; either version
  9. * 2 of the License, or (at your option) any later version.
  10. */
  11. #ifndef __ARCH_POWERPC_KERNEL_SETUP_H
  12. #define __ARCH_POWERPC_KERNEL_SETUP_H
  13. void initialize_cache_info(void);
  14. void irqstack_early_init(void);
  15. #ifdef CONFIG_PPC32
  16. void setup_power_save(void);
  17. #else
  18. static inline void setup_power_save(void) { };
  19. #endif
  20. #if defined(CONFIG_PPC64) && defined(CONFIG_SMP)
  21. void check_smt_enabled(void);
  22. #else
  23. static inline void check_smt_enabled(void) { };
  24. #endif
  25. #if defined(CONFIG_PPC_BOOK3E) && defined(CONFIG_SMP)
  26. void setup_tlb_core_data(void);
  27. #else
  28. static inline void setup_tlb_core_data(void) { };
  29. #endif
  30. #if defined(CONFIG_PPC_BOOK3E) || defined(CONFIG_BOOKE) || defined(CONFIG_40x)
  31. void exc_lvl_early_init(void);
  32. #else
  33. static inline void exc_lvl_early_init(void) { };
  34. #endif
  35. #ifdef CONFIG_PPC64
  36. void emergency_stack_init(void);
  37. #else
  38. static inline void emergency_stack_init(void) { };
  39. #endif
  40. /*
  41. * Having this in kvm_ppc.h makes include dependencies too
  42. * tricky to solve for setup-common.c so have it here.
  43. */
  44. #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
  45. void kvm_cma_reserve(void);
  46. #else
  47. static inline void kvm_cma_reserve(void) { };
  48. #endif
  49. #endif /* __ARCH_POWERPC_KERNEL_SETUP_H */