Re: [U-Boot] [PATCH 3/3] MIPS: Abstract cache op loops with a macro

2016-05-30 Thread Marek Vasut
On 05/27/2016 04:48 PM, Paul Burton wrote: > On Fri, May 27, 2016 at 04:36:21PM +0200, Marek Vasut wrote: >>> The problem is that then both that function & its callers would need to >>> know about the types of cache ops, and there'd need to be some mapping >>> from flags to the actual cache op valu

Re: [U-Boot] [PATCH 3/3] MIPS: Abstract cache op loops with a macro

2016-05-27 Thread Paul Burton
On Fri, May 27, 2016 at 04:36:21PM +0200, Marek Vasut wrote: > > The problem is that then both that function & its callers would need to > > know about the types of cache ops, and there'd need to be some mapping > > from flags to the actual cache op values (of which there'll be a couple > > more on

Re: [U-Boot] [PATCH 3/3] MIPS: Abstract cache op loops with a macro

2016-05-27 Thread Marek Vasut
On 05/27/2016 12:30 PM, Paul Burton wrote: > On Thu, May 26, 2016 at 06:13:17PM +0200, Marek Vasut wrote: >> On 05/26/2016 05:58 PM, Paul Burton wrote: >>> The various cache maintenance routines perform a number of loops over >>> cache lines. Rather than duplicate the code for performing such loops

Re: [U-Boot] [PATCH 3/3] MIPS: Abstract cache op loops with a macro

2016-05-27 Thread Paul Burton
On Thu, May 26, 2016 at 06:13:17PM +0200, Marek Vasut wrote: > On 05/26/2016 05:58 PM, Paul Burton wrote: > > The various cache maintenance routines perform a number of loops over > > cache lines. Rather than duplicate the code for performing such loops, > > abstract it out into a new cache_loop ma

Re: [U-Boot] [PATCH 3/3] MIPS: Abstract cache op loops with a macro

2016-05-26 Thread Marek Vasut
On 05/26/2016 05:58 PM, Paul Burton wrote: > The various cache maintenance routines perform a number of loops over > cache lines. Rather than duplicate the code for performing such loops, > abstract it out into a new cache_loop macro which performs an arbitrary > number of cache ops on a range of a

[U-Boot] [PATCH 3/3] MIPS: Abstract cache op loops with a macro

2016-05-26 Thread Paul Burton
The various cache maintenance routines perform a number of loops over cache lines. Rather than duplicate the code for performing such loops, abstract it out into a new cache_loop macro which performs an arbitrary number of cache ops on a range of addresses. This reduces duplication in the existing