[PATCH v2] powerpc/cache: add cache flush operation for various e500

Scott Wood scottwood at freescale.com
Tue Jun 9 06:36:14 AEST 2015


On Mon, 2015-06-08 at 18:06 +0800, Yuantian.Tang at freescale.com wrote:
> +
> +_GLOBAL(flush_caches_e500v2)
> +     mflr r0
> +     bl      flush_dcache_L1
> +     mtlr r0
> +     blr
> +
> +_GLOBAL(flush_caches_e500mc)
> +_GLOBAL(flush_caches_e5500)
> +     mflr r0
> +     bl      flush_dcache_L1
> +     bl      flush_backside_L2_cache
> +     mtlr r0
> +     blr

s/flush_caches/cpu_down_flush/g


> +
> +/* L1 Data Cache of e6500 contains no modified data, no flush is 
> required */
> +_GLOBAL(flush_caches_e6500)
> +     blr
> diff --git a/arch/powerpc/kernel/cputable.c 
> b/arch/powerpc/kernel/cputable.c
> index 60262fd..ed388c7 100644
> --- a/arch/powerpc/kernel/cputable.c
> +++ b/arch/powerpc/kernel/cputable.c
> @@ -2021,6 +2021,7 @@ static struct cpu_spec __initdata cpu_specs[] =
> {
>               .cpu_setup              = __setup_cpu_e500v2,
>               .machine_check          = machine_check_e500,
>               .platform               = "ppc8548",
> +             .cpu_down_flush = flush_caches_e500v2,
>       },
>  #else
>       {       /* e500mc */
> @@ -2040,6 +2041,7 @@ static struct cpu_spec __initdata cpu_specs[] =
> {
>               .cpu_setup              = __setup_cpu_e500mc,
>               .machine_check          = machine_check_e500mc,
>               .platform               = "ppce500mc",
> +             .cpu_down_flush = flush_caches_e500mc,
>       },

Please keep whitespace consistent with the rest of the structure.

-Scott



More information about the Linuxppc-dev mailing list