mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-01 13:46:42 +07:00
e8db288e05
CPUs in cluster based systems, such as big.LITTLE, have special needs when entering the kernel due to a hotplug event, or when resuming from a deep sleep mode. This is vectorized so multiple CPUs can enter the kernel in parallel without serialization. The mcpm prefix stands for "multi cluster power management", however this is usable on single cluster systems as well. Only the basic structure is introduced here. This will be extended with later patches. In order not to complexify things more than they currently have to, the planned work to make runtime adjusted MPIDR based indexing and dynamic memory allocation for cluster states is postponed to a later cycle. The MAX_NR_CLUSTERS and MAX_CPUS_PER_CLUSTER static definitions should be sufficient for those systems expected to be available in the near future. Signed-off-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Reviewed-by: Will Deacon <will.deacon@arm.com>
43 lines
1.2 KiB
C
43 lines
1.2 KiB
C
/*
|
|
* arch/arm/include/asm/mcpm.h
|
|
*
|
|
* Created by: Nicolas Pitre, April 2012
|
|
* Copyright: (C) 2012-2013 Linaro Limited
|
|
*
|
|
* 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.
|
|
*/
|
|
|
|
#ifndef MCPM_H
|
|
#define MCPM_H
|
|
|
|
/*
|
|
* Maximum number of possible clusters / CPUs per cluster.
|
|
*
|
|
* This should be sufficient for quite a while, while keeping the
|
|
* (assembly) code simpler. When this starts to grow then we'll have
|
|
* to consider dynamic allocation.
|
|
*/
|
|
#define MAX_CPUS_PER_CLUSTER 4
|
|
#define MAX_NR_CLUSTERS 2
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
/*
|
|
* Platform specific code should use this symbol to set up secondary
|
|
* entry location for processors to use when released from reset.
|
|
*/
|
|
extern void mcpm_entry_point(void);
|
|
|
|
/*
|
|
* This is used to indicate where the given CPU from given cluster should
|
|
* branch once it is ready to re-enter the kernel using ptr, or NULL if it
|
|
* should be gated. A gated CPU is held in a WFE loop until its vector
|
|
* becomes non NULL.
|
|
*/
|
|
void mcpm_set_entry_vector(unsigned cpu, unsigned cluster, void *ptr);
|
|
|
|
#endif /* ! __ASSEMBLY__ */
|
|
#endif
|