• Joonsoo Kim's avatar
    ARM: 7645/1: ioremap: introduce an infrastructure for static mapped area · ed8fd218
    Joonsoo Kim authored
    In current implementation, we used ARM-specific flag, that is,
    VM_ARM_STATIC_MAPPING, for distinguishing ARM specific static mapped area.
    The purpose of static mapped area is to re-use static mapped area when
    entire physical address range of the ioremap request can be covered
    by this area.
    
    This implementation causes needless overhead for some cases.
    For example, assume that there is only one static mapped area and
    vmlist has 300 areas. Every time we call ioremap, we check 300 areas for
    deciding whether it is matched or not. Moreover, even if there is
    no static mapped area and vmlist has 300 areas, every time we call
    ioremap, we check 300 areas in now.
    
    If we construct a extra list for static mapped area, we can eliminate
    above mentioned overhead.
    With a extra list, if there is one static mapped area,
    we just check only one area and proceed next operation quickly.
    
    In fact, it is not a critical problem, because ioremap is not frequently
    used. But reducing overhead is better idea.
    
    Another reason for doing this work is for removing architecture dependency
    on vmalloc layer. I think that vmlist and vmlist_lock is internal data
    structure for vmalloc layer. Some codes for debugging and stat inevitably
    use vmlist and vmlist_lock. But it is preferable that they are used
    as least as possible in outside of vmalloc.c
    
    Now, I introduce an ARM-specific infrastructure for static mapped area. In
    the following patch, we will use this and resolve above mentioned problem.
    Reviewed-by: default avatarNicolas Pitre <nico@linaro.org>
    Tested-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
    Signed-off-by: default avatarJoonsoo Kim <iamjoonsoo.kim@lge.com>
    Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    ed8fd218
mm.h 2.22 KB