Skip to contentSkip to conversation

ppc: Include <asm/cache.h> in common.h

PATCH New Stefan Roese 3 participants 5 messages Oct 7, 2011 – Oct 9, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ppc: Include <asm/cache.h> in common.h

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)

Cc Anton Staaf <[email protected]>
Cc Wolfgang Denk <[email protected]>
---
 include/common.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
include/common.h +8 -0
index b55592d..f0ab346 100644
@@ -782,6 +782,14 @@ int cpu_release(int nr, int argc, char * const argv[]);
 
 #endif /* __ASSEMBLY__ */
 
+#ifdef CONFIG_PPC
+/*
+ * 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
Signature · 1 line
1.7.6.1
#1 lore raw

PATCH 1/2 ppc: Include <asm/cache.h> in common.h

Quoted 24 lines · Stefan Roese

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)

Cc Anton Staaf <[email protected]>
Cc Wolfgang Denk <[email protected]>

---
?include/common.h | ? ?8 ++++++++
?1 files changed, 8 insertions(+), 0 deletions(-)

include/common.h +0 -0
index b55592d..f0ab346 100644
@@ -782,6 +782,14 @@ int cpu_release(int nr, int argc, char * const argv[]);
 

?#endif /* __ASSEMBLY__ */

Quoted 1 line

+#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

Quoted 14 lines
include/common.h +7 -0
+/*
+ * 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

#2 lore raw

PATCH 1/2 ppc: Include <asm/cache.h> in common.h

Dear Anton Staaf,

Quoted 11 lines · In message <CAF6FioV3YFk02Sgp0AasYGQJSNKv=cB-sSzCQr8F3S2esyAyRw@mail.gmail.com>…
Quoted 8 lines

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 d=

efined, using __BIGGEST_ALIGNMENT__

Quoted 1 line

cache.c:33: error: '__BIGGEST_ALIGNMENT__' undeclared (first use in this =

function)

...

Quoted 5 lines

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.

Agreed. But please let's do this in a second step (feel free to submit a patch :-)

I suggest to just add this under #ifndef __ASSEMBLY__

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Never put off until tomorrow what you can put off indefinitely.
#4 lore raw

PATCH 1/2 ppc: Include <asm/cache.h> in common.h

In reply to Stefan Roese

Dear Stefan Roese,

Quoted 9 lines · In message <[email protected]> you 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)

Quoted 6 lines
Cc Anton Staaf <[email protected]>
Cc Wolfgang Denk <[email protected]>
---
 include/common.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"...one of the main causes of the fall of the Roman Empire was  that,
lacking  zero,  they had no way to indicate successful termination of
their C programs."                                     - Robert Firth
#3 lore raw

PATCH 1/2 ppc: Include <asm/cache.h> in common.h

In reply to Wolfgang Denk
Quoted 15 lines · Wolfgang Denk

Dear Anton Staaf,

Quoted 11 lines · In message <CAF6FioV3YFk02Sgp0AasYGQJSNKv=cB-sSzCQr8F3S2esyAyRw@mail.gmail.com>…
Quoted 8 lines

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 d=

efined, using __BIGGEST_ALIGNMENT__

Quoted 1 line

cache.c:33: error: '__BIGGEST_ALIGNMENT__' undeclared (first use in this =

function)

...

Quoted 8 lines
Quoted 5 lines

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.

Agreed. ?But please let's do this in a second step (feel free to submit a patch :-)

Will do. :)

Thanks,
Anton

Quoted 12 lines

I suggest to just add this under #ifndef __ASSEMBLY__

Best regards,

Wolfgang Denk

--
DENX Software Engineering GmbH, ? ? MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Never put off until tomorrow what you can put off indefinitely.