Re: patch to support topdown mmap allocation in MIPS

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

 



On Mon, May 16, 2011 at 06:27:17PM -0700, Kevin Cernekee wrote:

> >>  #define COLOUR_ALIGN(addr,pgoff)                              \
> >>        ((((addr) + shm_align_mask)&  ~shm_align_mask) +        \
> >>         (((pgoff)<<  PAGE_SHIFT)&  shm_align_mask))
> 
> I see COLOUR_ALIGN in arch/{arm,mips,sh,sparc} .  All sorts of
> embedded platforms have to worry about cache aliases nowadays.
> 
> Do you think this logic could be folded into the generic
> implementations in mm/mmap.c ?  Or is there something else inside our
> arch_get_unmapped_area* functions that's really, irreparably unique to
> MIPS?

There are always slightly odd architectures such as IA-64 where the page
size depends on the address or PARISC which in most of its cache handling
is about as straight forward as programming in Malbolge.

It should be easy enough to come up with a version however that fits most
architectures and everybody else can just override it just like the default
version of arch_get_unmapped_area.

  Ralf



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux