1*e8db288eSNicolas Pitre /* 2*e8db288eSNicolas Pitre * arch/arm/include/asm/mcpm.h 3*e8db288eSNicolas Pitre * 4*e8db288eSNicolas Pitre * Created by: Nicolas Pitre, April 2012 5*e8db288eSNicolas Pitre * Copyright: (C) 2012-2013 Linaro Limited 6*e8db288eSNicolas Pitre * 7*e8db288eSNicolas Pitre * This program is free software; you can redistribute it and/or modify 8*e8db288eSNicolas Pitre * it under the terms of the GNU General Public License version 2 as 9*e8db288eSNicolas Pitre * published by the Free Software Foundation. 10*e8db288eSNicolas Pitre */ 11*e8db288eSNicolas Pitre 12*e8db288eSNicolas Pitre #ifndef MCPM_H 13*e8db288eSNicolas Pitre #define MCPM_H 14*e8db288eSNicolas Pitre 15*e8db288eSNicolas Pitre /* 16*e8db288eSNicolas Pitre * Maximum number of possible clusters / CPUs per cluster. 17*e8db288eSNicolas Pitre * 18*e8db288eSNicolas Pitre * This should be sufficient for quite a while, while keeping the 19*e8db288eSNicolas Pitre * (assembly) code simpler. When this starts to grow then we'll have 20*e8db288eSNicolas Pitre * to consider dynamic allocation. 21*e8db288eSNicolas Pitre */ 22*e8db288eSNicolas Pitre #define MAX_CPUS_PER_CLUSTER 4 23*e8db288eSNicolas Pitre #define MAX_NR_CLUSTERS 2 24*e8db288eSNicolas Pitre 25*e8db288eSNicolas Pitre #ifndef __ASSEMBLY__ 26*e8db288eSNicolas Pitre 27*e8db288eSNicolas Pitre /* 28*e8db288eSNicolas Pitre * Platform specific code should use this symbol to set up secondary 29*e8db288eSNicolas Pitre * entry location for processors to use when released from reset. 30*e8db288eSNicolas Pitre */ 31*e8db288eSNicolas Pitre extern void mcpm_entry_point(void); 32*e8db288eSNicolas Pitre 33*e8db288eSNicolas Pitre /* 34*e8db288eSNicolas Pitre * This is used to indicate where the given CPU from given cluster should 35*e8db288eSNicolas Pitre * branch once it is ready to re-enter the kernel using ptr, or NULL if it 36*e8db288eSNicolas Pitre * should be gated. A gated CPU is held in a WFE loop until its vector 37*e8db288eSNicolas Pitre * becomes non NULL. 38*e8db288eSNicolas Pitre */ 39*e8db288eSNicolas Pitre void mcpm_set_entry_vector(unsigned cpu, unsigned cluster, void *ptr); 40*e8db288eSNicolas Pitre 41*e8db288eSNicolas Pitre #endif /* ! __ASSEMBLY__ */ 42*e8db288eSNicolas Pitre #endif 43