Re: [PATCH] m68knommu: use "r", not "i" constraint in cacheflus asm's

Greg Ungerer <[email protected]>
Newsgroups gmane.linux.uclinux.devel
Message-ID <[email protected]>
Hi Philippe,

On 10/09/12 01:56, Philippe De Muyter wrote:
> 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 <[email protected]>

Thanks, looks good. Applied to for-next branch of m68knommu git tree.

Regards
Greg



> ---
>   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 7cafb53..d2b3935 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)
>   {
>   #ifdef CACHE_INVALIDATE
>   	__asm__ __volatile__ (
> -		"movel	%0, %%d0\n\t"
> -		"movec	%%d0, %%CACR\n\t"
> +		"movec	%0, %%CACR\n\t"
>   		"nop\n\t"
> -		: : "i" (CACHE_INVALIDATE) : "d0" );
> +		: : "r" (CACHE_INVALIDATE) );
>   #endif
>   }
>
> @@ -58,10 +57,9 @@ static inline void __flush_icache_all(void)
>   {
>   #ifdef CACHE_INVALIDATEI
>   	__asm__ __volatile__ (
> -		"movel	%0, %%d0\n\t"
> -		"movec	%%d0, %%CACR\n\t"
> +		"movec	%0, %%CACR\n\t"
>   		"nop\n\t"
> -		: : "i" (CACHE_INVALIDATEI) : "d0" );
> +		: : "r" (CACHE_INVALIDATEI) );
>   #endif
>   }
>
> @@ -72,19 +70,18 @@ static inline void __flush_dcache_all(void)
>   #endif
>   #ifdef CACHE_INVALIDATED
>   	__asm__ __volatile__ (
> -		"movel	%0, %%d0\n\t"
> -		"movec	%%d0, %%CACR\n\t"
> +		"movec	%0, %%CACR\n\t"
>   		"nop\n\t"
> -		: : "i" (CACHE_INVALIDATED) : "d0" );
> +		: : "r" (CACHE_INVALIDATED) );
>   #else
> -	/* Flush the wrtite buffer */
> +	/* Flush the write buffer */
>   	__asm__ __volatile__ ( "nop" );
>   #endif
>   }
>
>   /*
>    * Push cache entries at supplied address. We want to write back any dirty
> - * data and the invalidate the cache lines associated with this address.
> + * data and then invalidate the cache lines associated with this address.
>    */
>   static inline void cache_push(unsigned long paddr, int len)
>   {
>


-- 
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     [email protected]
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.