On Sat, 23 Jul 2016 14:42:34 +0530
"Aneesh Kumar K.V" <[email protected]> wrote:

> In later patches, we will be switching cpu and mmu feature check to
> use static keys. This would require us to have a variant of feature
> check that can be used in early boot before jump label is initialized.
> This patch adds the same. We also add a variant for radix_enabled()
> check
> 
> We also update the return type to bool.
> 
> Signed-off-by: Aneesh Kumar K.V <[email protected]>
> ---
>  arch/powerpc/include/asm/book3s/64/mmu.h | 19 +++++++++++++++----
>  arch/powerpc/include/asm/cputable.h      | 15 ++++++++++-----
>  arch/powerpc/include/asm/mmu.h           | 13 +++++++++++--
>  arch/powerpc/xmon/ppc-dis.c              |  1 +
>  4 files changed, 37 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/book3s/64/mmu.h
> b/arch/powerpc/include/asm/book3s/64/mmu.h index
> 6d8306d9aa7a..1bb0e536c76b 100644 ---
> a/arch/powerpc/include/asm/book3s/64/mmu.h +++
> b/arch/powerpc/include/asm/book3s/64/mmu.h @@ -24,9 +24,20 @@ struct
> mmu_psize_def { extern struct mmu_psize_def
> mmu_psize_defs[MMU_PAGE_COUNT]; 
>  #ifdef CONFIG_PPC_RADIX_MMU
> -#define radix_enabled() mmu_has_feature(MMU_FTR_TYPE_RADIX)
> +static inline bool radix_enabled(void)
> +{
> +     return mmu_has_feature(MMU_FTR_TYPE_RADIX);
> +}
> +#define radix_enabled radix_enabled
> +
> +static inline bool __radix_enabled(void)
> +{
> +     return __mmu_has_feature(MMU_FTR_TYPE_RADIX);
> +}

I'm probably guilty of this too, but the prefix-more-underscores naming
convention for a "special" variant of a function sucks, especially for
names used beyond a single file.

Might _early or similar be an improvement?

Thanks,
Nick

_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to