diff options
author | Philippe De Muyter <phdm@macqel.be> | 2012-09-09 11:56:35 -0400 |
---|---|---|
committer | Greg Ungerer <gerg@uclinux.org> | 2012-09-27 09:28:40 -0400 |
commit | 300b9ff609ca027b9964a453a8156e6fe0077cde (patch) | |
tree | 09a8cf3808a95b9b84c8d661dc8d7be1ef9d77a7 /arch/m68k | |
parent | 0c0e6db8068393400f5c0ccbb0d22bf14b56a7ca (diff) |
m68knommu: use "r", not "i" constraint in cacheflush asm's
Let the compiler choose which register to use in the cache flushing
asm statements, instead of imposing %d0.
Additionally, fix two typo's.
Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/include/asm/cacheflush_no.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/arch/m68k/include/asm/cacheflush_no.h b/arch/m68k/include/asm/cacheflush_no.h index 7cafb537d03c..d2b3935ae147 100644 --- a/arch/m68k/include/asm/cacheflush_no.h +++ b/arch/m68k/include/asm/cacheflush_no.h | |||
@@ -34,10 +34,9 @@ static inline void __clear_cache_all(void) | |||
34 | { | 34 | { |
35 | #ifdef CACHE_INVALIDATE | 35 | #ifdef CACHE_INVALIDATE |
36 | __asm__ __volatile__ ( | 36 | __asm__ __volatile__ ( |
37 | "movel %0, %%d0\n\t" | 37 | "movec %0, %%CACR\n\t" |
38 | "movec %%d0, %%CACR\n\t" | ||
39 | "nop\n\t" | 38 | "nop\n\t" |
40 | : : "i" (CACHE_INVALIDATE) : "d0" ); | 39 | : : "r" (CACHE_INVALIDATE) ); |
41 | #endif | 40 | #endif |
42 | } | 41 | } |
43 | 42 | ||
@@ -58,10 +57,9 @@ static inline void __flush_icache_all(void) | |||
58 | { | 57 | { |
59 | #ifdef CACHE_INVALIDATEI | 58 | #ifdef CACHE_INVALIDATEI |
60 | __asm__ __volatile__ ( | 59 | __asm__ __volatile__ ( |
61 | "movel %0, %%d0\n\t" | 60 | "movec %0, %%CACR\n\t" |
62 | "movec %%d0, %%CACR\n\t" | ||
63 | "nop\n\t" | 61 | "nop\n\t" |
64 | : : "i" (CACHE_INVALIDATEI) : "d0" ); | 62 | : : "r" (CACHE_INVALIDATEI) ); |
65 | #endif | 63 | #endif |
66 | } | 64 | } |
67 | 65 | ||
@@ -72,19 +70,18 @@ static inline void __flush_dcache_all(void) | |||
72 | #endif | 70 | #endif |
73 | #ifdef CACHE_INVALIDATED | 71 | #ifdef CACHE_INVALIDATED |
74 | __asm__ __volatile__ ( | 72 | __asm__ __volatile__ ( |
75 | "movel %0, %%d0\n\t" | 73 | "movec %0, %%CACR\n\t" |
76 | "movec %%d0, %%CACR\n\t" | ||
77 | "nop\n\t" | 74 | "nop\n\t" |
78 | : : "i" (CACHE_INVALIDATED) : "d0" ); | 75 | : : "r" (CACHE_INVALIDATED) ); |
79 | #else | 76 | #else |
80 | /* Flush the wrtite buffer */ | 77 | /* Flush the write buffer */ |
81 | __asm__ __volatile__ ( "nop" ); | 78 | __asm__ __volatile__ ( "nop" ); |
82 | #endif | 79 | #endif |
83 | } | 80 | } |
84 | 81 | ||
85 | /* | 82 | /* |
86 | * Push cache entries at supplied address. We want to write back any dirty | 83 | * Push cache entries at supplied address. We want to write back any dirty |
87 | * data and the invalidate the cache lines associated with this address. | 84 | * data and then invalidate the cache lines associated with this address. |
88 | */ | 85 | */ |
89 | static inline void cache_push(unsigned long paddr, int len) | 86 | static inline void cache_push(unsigned long paddr, int len) |
90 | { | 87 | { |