public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] sh: fix build error in cache.h
@ 2011-10-31  1:44 Yoshihiro Shimoda
  2011-10-31  2:25 ` Mike Frysinger
  0 siblings, 1 reply; 3+ messages in thread
From: Yoshihiro Shimoda @ 2011-10-31  1:44 UTC (permalink / raw)
  To: u-boot

In the latest U-Boot, the include/common.h includes the asm/cache.h.
So, the dcache_invalid_range() in the arch/sh/include/asm/cache.h is
multiple defination.

sh4-linux-gnu-ld  -e 0x8FFC0000 --defsym reloc_dst=0x8FFC0000 -r -o libsh4.o  cpu.o interrupts.o watchdog.o cache.o start.o
interrupts.o: In function `dcache_wback_range':
/home/u-boot/u-boot-sh/include/asm/cache.h:14: multiple definition of `dcache_wback_range'
cpu.o:/home/shimoda/development/u-boot/u-boot-sh/include/asm/cache.h:14: first defined here
interrupts.o: In function `dcache_invalid_range':
/home/u-boot/u-boot-sh/include/asm/cache.h:25: multiple definition of `dcache_invalid_range'
cpu.o:/home/shimoda/development/u-boot/u-boot-sh/include/asm/cache.h:25: first defined here
...

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
 arch/sh/include/asm/cache.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/sh/include/asm/cache.h b/arch/sh/include/asm/cache.h
index 6ffab4d..978cd8c 100644
--- a/arch/sh/include/asm/cache.h
+++ b/arch/sh/include/asm/cache.h
@@ -10,7 +10,7 @@ int cache_control(unsigned int cmd);
 struct __large_struct { unsigned long buf[100]; };
 #define __m(x) (*(struct __large_struct *)(x))

-void dcache_wback_range(u32 start, u32 end)
+static inline void dcache_wback_range(u32 start, u32 end)
 {
 	u32 v;

@@ -21,7 +21,7 @@ void dcache_wback_range(u32 start, u32 end)
 	}
 }

-void dcache_invalid_range(u32 start, u32 end)
+static inline void dcache_invalid_range(u32 start, u32 end)
 {
 	u32 v;

-- 
1.7.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] sh: fix build error in cache.h
  2011-10-31  1:44 [U-Boot] [PATCH] sh: fix build error in cache.h Yoshihiro Shimoda
@ 2011-10-31  2:25 ` Mike Frysinger
  2011-10-31  2:35   ` Yoshihiro Shimoda
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2011-10-31  2:25 UTC (permalink / raw)
  To: u-boot

On Sunday 30 October 2011 21:44:13 Yoshihiro Shimoda wrote:
> In the latest U-Boot, the include/common.h includes the asm/cache.h.
> So, the dcache_invalid_range() in the arch/sh/include/asm/cache.h is
> multiple defination.

i posted a fix for this already:
	http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/114290

i don't think we want to go this route with inline markings since it bloats 
the code ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111030/7a3f90d2/attachment.pgp 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] sh: fix build error in cache.h
  2011-10-31  2:25 ` Mike Frysinger
@ 2011-10-31  2:35   ` Yoshihiro Shimoda
  0 siblings, 0 replies; 3+ messages in thread
From: Yoshihiro Shimoda @ 2011-10-31  2:35 UTC (permalink / raw)
  To: u-boot

2011/10/31 11:25, Mike Frysinger wrote:
> On Sunday 30 October 2011 21:44:13 Yoshihiro Shimoda wrote:
>> In the latest U-Boot, the include/common.h includes the asm/cache.h.
>> So, the dcache_invalid_range() in the arch/sh/include/asm/cache.h is
>> multiple defination.
> 
> i posted a fix for this already:
> 	http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/114290
> 
> i don't think we want to go this route with inline markings since it bloats 
> the code ...

Thank you for your point.
I should have looked at the mailing list more carefully before I submitted
my patch...

Thanks,
Yoshihiro Shimoda

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-31  2:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-31  1:44 [U-Boot] [PATCH] sh: fix build error in cache.h Yoshihiro Shimoda
2011-10-31  2:25 ` Mike Frysinger
2011-10-31  2:35   ` Yoshihiro Shimoda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox