[U-Boot] [PATCH 1/2] ppc: Include <asm/cache.h> in common.h

Anton Staaf robotboy at chromium.org
Fri Oct 7 19:43:38 CEST 2011


On Fri, Oct 7, 2011 at 4:05 AM, Stefan Roese <sr at denx.de> wrote:
> This is needed for the patch "cache: add default setting for
> CONFIG_SYS_CACHELINE_SIZE" from Anton Staaf. As cache.h defines
> CONFIG_SYS_CACHELINE_SIZE for PPC targets.
>
> This will remove the following warnings/errors:
>
> include/common.h:819:2: warning: #warning CONFIG_SYS_CACHELINE_SIZE not defined, using __BIGGEST_ALIGNMENT__
> cache.c:33: error: '__BIGGEST_ALIGNMENT__' undeclared (first use in this function)
>
> Signed-off-by: Stefan Roese <sr at denx.de>
> Cc: Anton Staaf <robotboy at chromium.org>
> Cc: Wolfgang Denk <wd at denx.de>
> ---
>  include/common.h |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/include/common.h b/include/common.h
> index b55592d..f0ab346 100644
> --- a/include/common.h
> +++ b/include/common.h
> @@ -782,6 +782,14 @@ int cpu_release(int nr, int argc, char * const argv[]);
>
>  #endif /* __ASSEMBLY__ */
>
> +#ifdef CONFIG_PPC

It would be great if this could be enabled for all configs, not just
PPC.  Would it make sense to remove this check and add #ifndef
__ASSEMBLY__ to the other cache.h files?  The list is not too long
(m68k, sparc, sh, nios2, and arm).  I'd be happy to look into that if
you'd rather get this in first.

Thanks,
    Anton

> +/*
> + * Has to be included outside of the #ifndef __ASSEMBLY__ section.
> + * Otherwise might lead to compilation errors in assembler files.
> + */
> +#include <asm/cache.h>
> +#endif
> +
>  /* Put only stuff here that the assembler can digest */
>
>  #ifdef CONFIG_POST
> --
> 1.7.6.1
>
>


More information about the U-Boot mailing list