[PATCH 3/5] powerpc: booke: Remove code duplication in lowmem mapping

Kumar Gala galak at kernel.crashing.org
Wed Jan 14 02:43:01 EST 2009


On Dec 8, 2008, at 9:34 PM, Trent Piepho wrote:

> The code to map lowmem uses three CAM aka TLB[1] entries to cover  
> it.  The
> size of each is stored in three globals named __cam0, __cam1, and  
> __cam2.
> All the code that uses them is duplicated three times for each of  
> the three
> variables.
>
> We have these things called arrays and loops....
>
> Once converted to use an array, it will be easier to make the number  
> of
> CAMs configurable.
>
> Signed-off-by: Trent Piepho <tpiepho at freescale.com>
> ---
> arch/powerpc/mm/fsl_booke_mmu.c |   79 ++++++++++++++ 
> +-----------------------
> 1 files changed, 31 insertions(+), 48 deletions(-)

applied.  Still not happy about the buf[] for output, but its minor.

- k



More information about the Linuxppc-dev mailing list