Message ID | 20171115142048.9928-1-ard.biesheuvel@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | [edk2] ArmPlatformPkg: remove ArmGetCpuCountPerCluster () from ArmPlatformLib | expand |
On Wed, Nov 15, 2017 at 02:20:48PM +0000, Ard Biesheuvel wrote: > The only user of ArmPlatformLib's ArmGetCpuCountPerCluster () is itself > an ArmPlatformLib implementation, i.e., ArmVExpressLibRTSM. > > Given that we'd prefer to get rid of ArmPlatformLib entirely, let's > remove ArmGetCpuCountPerCluster () from the API as a first step. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> I'm thinking this is technically a bit iffy. But the less iffy way would be to add a local .h file to hold the prototype, which feels a bit crazy for a transitional thing. So: Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> > --- > > This is another prerequisite of the edk2-platforms series I am about to > post. After that, I will follow up with a couple of cleanup patches that > get rid of a lot of ArmPlatformPkg cruft. > > ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c | 13 +++++++++++++ > ArmPlatformPkg/Include/Library/ArmPlatformLib.h | 13 ------------- > 2 files changed, 13 insertions(+), 13 deletions(-) > > diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c > index d8d1c9ac26dd..11dd7ff1bfb0 100644 > --- a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c > +++ b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c > @@ -21,6 +21,19 @@ > > #include <ArmPlatform.h> > > +/** > + Return the core per cluster. The method may differ per core type > + > + This function might be called from assembler before any stack is set. > + > + @return Return the core count per cluster > + > +**/ > +UINTN > +ArmGetCpuCountPerCluster ( > + VOID > + ); > + > ARM_CORE_INFO mVersatileExpressMpCoreInfoTable[] = { > { > // Cluster 0, Core 0 > diff --git a/ArmPlatformPkg/Include/Library/ArmPlatformLib.h b/ArmPlatformPkg/Include/Library/ArmPlatformLib.h > index fe3bc4bb8e6c..77561a3d05b3 100644 > --- a/ArmPlatformPkg/Include/Library/ArmPlatformLib.h > +++ b/ArmPlatformPkg/Include/Library/ArmPlatformLib.h > @@ -41,19 +41,6 @@ typedef struct { > } ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR; > > /** > - Return the core per cluster. The method may differ per core type > - > - This function might be called from assembler before any stack is set. > - > - @return Return the core count per cluster > - > -**/ > -UINTN > -ArmGetCpuCountPerCluster ( > - VOID > - ); > - > -/** > Return the core position from the value of its MpId register > > This function returns the core position from the position 0 in the processor. > -- > 2.11.0 > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
On 24 November 2017 at 17:04, Leif Lindholm <leif.lindholm@linaro.org> wrote: > On Wed, Nov 15, 2017 at 02:20:48PM +0000, Ard Biesheuvel wrote: >> The only user of ArmPlatformLib's ArmGetCpuCountPerCluster () is itself >> an ArmPlatformLib implementation, i.e., ArmVExpressLibRTSM. >> >> Given that we'd prefer to get rid of ArmPlatformLib entirely, let's >> remove ArmGetCpuCountPerCluster () from the API as a first step. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> > > I'm thinking this is technically a bit iffy. But the less iffy way > would be to add a local .h file to hold the prototype, which feels a > bit crazy for a transitional thing. So: > Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> > Thanks Pushed as 4cebe0453fea40330afb6b8f2372287e723e6e3f _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c index d8d1c9ac26dd..11dd7ff1bfb0 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c +++ b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c @@ -21,6 +21,19 @@ #include <ArmPlatform.h> +/** + Return the core per cluster. The method may differ per core type + + This function might be called from assembler before any stack is set. + + @return Return the core count per cluster + +**/ +UINTN +ArmGetCpuCountPerCluster ( + VOID + ); + ARM_CORE_INFO mVersatileExpressMpCoreInfoTable[] = { { // Cluster 0, Core 0 diff --git a/ArmPlatformPkg/Include/Library/ArmPlatformLib.h b/ArmPlatformPkg/Include/Library/ArmPlatformLib.h index fe3bc4bb8e6c..77561a3d05b3 100644 --- a/ArmPlatformPkg/Include/Library/ArmPlatformLib.h +++ b/ArmPlatformPkg/Include/Library/ArmPlatformLib.h @@ -41,19 +41,6 @@ typedef struct { } ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR; /** - Return the core per cluster. The method may differ per core type - - This function might be called from assembler before any stack is set. - - @return Return the core count per cluster - -**/ -UINTN -ArmGetCpuCountPerCluster ( - VOID - ); - -/** Return the core position from the value of its MpId register This function returns the core position from the position 0 in the processor.
The only user of ArmPlatformLib's ArmGetCpuCountPerCluster () is itself an ArmPlatformLib implementation, i.e., ArmVExpressLibRTSM. Given that we'd prefer to get rid of ArmPlatformLib entirely, let's remove ArmGetCpuCountPerCluster () from the API as a first step. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- This is another prerequisite of the edk2-platforms series I am about to post. After that, I will follow up with a couple of cleanup patches that get rid of a lot of ArmPlatformPkg cruft. ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c | 13 +++++++++++++ ArmPlatformPkg/Include/Library/ArmPlatformLib.h | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel