[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] U-BOOT compile problem



Hi Michal,

Monstr@xxxxxxxxx wrote:

I look at your new function flush cache and you have problem in your code.
In lib_microblaze/cache.c - flush_cache function.
If you don't use caches, your code looks like this.

asm volatile ( :
 	                                : "r" (addr+i)
 	                                : "memory");
 	        return;

And gcc declares a fault.

Thanks for pointing this out. Does the attached patch work OK for you (apply at -p0 in u-boot/lib_microblaze)?

Regards,

John
Index: cache.c
===================================================================
--- cache.c	(revision 2718)
+++ cache.c	(working copy)
@@ -37,9 +37,13 @@
 		asm volatile (	
 #if CONFIG_XILINX_MICROBLAZE0_USE_ICACHE
 				"wic	%0, r0"
+#else
+				"nop"
 #endif
 #if CONFIG_XILINX_MICROBLAZE0_USE_DCACHE
 				"wdc	%0, r0"
+#else
+				"nop"
 #endif
 				:
 				: "r" (addr+i)