lkml.org 
[lkml]   [2022]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2 03/11] mm: ioremap: allow ARCH to have its own ioremap definition
    Date
    Architectures like xtensa, arc, can be converted to GENERIC_IOREMAP,
    to take standard ioremap_prot() and ioremap_xxx() way. But they have
    ARCH specific handling for ioremap() method, than standard ioremap()
    method.

    In oder to convert them to take GENERIC_IOREMAP method, allow these
    architecutres to have their own ioremap definition.

    This is a preparation patch, no functionality change.

    Signed-off-by: Baoquan He <bhe@redhat.com>
    ---
    include/asm-generic/io.h | 3 +++
    1 file changed, 3 insertions(+)

    diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
    index fb9bda2be8ed..68a8117b30fa 100644
    --- a/include/asm-generic/io.h
    +++ b/include/asm-generic/io.h
    @@ -1078,11 +1078,14 @@ void __iomem *ioremap_prot(phys_addr_t phys_addr, size_t size,
    unsigned long prot);
    void iounmap(volatile void __iomem *addr);

    +#ifndef ioremap
    +#define ioremap ioremap
    static inline void __iomem *ioremap(phys_addr_t addr, size_t size)
    {
    /* _PAGE_IOREMAP needs to be supplied by the architecture */
    return ioremap_prot(addr, size, _PAGE_IOREMAP);
    }
    +#endif
    #endif /* !CONFIG_MMU || CONFIG_GENERIC_IOREMAP */

    #ifndef ioremap_wc
    --
    2.34.1
    \
     
     \ /
      Last update: 2022-08-20 02:34    [W:4.188 / U:0.148 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site