lkml.org 
[lkml]   [2007]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] nommu: add ioremap_page_range().
    lib/ioremap.c is presently only built in if CONFIG_MMU is set. While
    this is reasonable, platforms that support both CONFIG_MMU=y or n
    need to be able to call in to this regardless.

    As none of the current nommu platforms do anything special with
    ioremap(), we assume that it's always successful.

    This fixes the SH-4 build with CONFIG_MMU=n.

    Signed-off-by: Paul Mundt <lethal@linux-sh.org>

    --

    include/linux/io.h | 8 ++++++++
    1 file changed, 8 insertions(+)

    diff --git a/include/linux/io.h b/include/linux/io.h
    index 09d3512..8423dd3 100644
    --- a/include/linux/io.h
    +++ b/include/linux/io.h
    @@ -27,8 +27,16 @@ struct device;
    void __iowrite32_copy(void __iomem *to, const void *from, size_t count);
    void __iowrite64_copy(void __iomem *to, const void *from, size_t count);

    +#ifdef CONFIG_MMU
    int ioremap_page_range(unsigned long addr, unsigned long end,
    unsigned long phys_addr, pgprot_t prot);
    +#else
    +static inline int ioremap_page_range(unsigned long addr, unsigned long end,
    + unsigned long phys_addr, pgprot_t prot)
    +{
    + return 0;
    +}
    +#endif

    /*
    * Managed iomap interface
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2007-05-14 10:21    [W:0.022 / U:244.688 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site