forked from Minki/linux
8eb8ac89a3
The secondary threads should enter deep idle states so as to gain maximum powersavings when the entire core is offline. To do so the offline path must be made aware of the available deepest idle state. Hence probe the device tree for the possible idle states in powernv core code and expose the deepest idle state through flags. Since the device tree is probed by the cpuidle driver as well, move the parameters required to discover the idle states into an appropriate common place to both the driver and the powernv core code. Another point is that fastsleep idle state may require workarounds in the kernel to function properly. This workaround is introduced in the subsequent patches. However neither the cpuidle driver or the hotplug path need be bothered about this workaround. They will be taken care of by the core powernv code. Originally-by: Srivatsa S. Bhat <srivatsa@mit.edu> Signed-off-by: Preeti U. Murthy <preeti@linux.vnet.ibm.com> Signed-off-by: Shreyas B. Prabhu <shreyas@linux.vnet.ibm.com> Reviewed-by: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: linux-pm@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
39 lines
812 B
C
39 lines
812 B
C
#ifndef _POWERNV_H
|
|
#define _POWERNV_H
|
|
|
|
#ifdef CONFIG_SMP
|
|
extern void pnv_smp_init(void);
|
|
#else
|
|
static inline void pnv_smp_init(void) { }
|
|
#endif
|
|
|
|
struct pci_dev;
|
|
|
|
#ifdef CONFIG_PCI
|
|
extern void pnv_pci_init(void);
|
|
extern void pnv_pci_shutdown(void);
|
|
extern int pnv_pci_dma_set_mask(struct pci_dev *pdev, u64 dma_mask);
|
|
extern u64 pnv_pci_dma_get_required_mask(struct pci_dev *pdev);
|
|
#else
|
|
static inline void pnv_pci_init(void) { }
|
|
static inline void pnv_pci_shutdown(void) { }
|
|
|
|
static inline int pnv_pci_dma_set_mask(struct pci_dev *pdev, u64 dma_mask)
|
|
{
|
|
return -ENODEV;
|
|
}
|
|
|
|
static inline u64 pnv_pci_dma_get_required_mask(struct pci_dev *pdev)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif
|
|
|
|
extern u32 pnv_get_supported_cpuidle_states(void);
|
|
|
|
extern void pnv_lpc_init(void);
|
|
|
|
bool cpu_core_split_required(void);
|
|
|
|
#endif /* _POWERNV_H */
|