lkml.org 
[lkml]   [2009]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH 11/27] asm-generic: add generic page.h
    From
    On Wed, Apr 29, 2009 at 16:55, Arnd Bergmann <arnd@arndb.de> wrote:
    > Architectures that have no mmu should not have to
    > describe their page tables. This adds a new page.h
    > file based on the existing nommu architectures
    > that adds a lot of dummy definitions to let you
    > correctly compile a nommu kernel.
    >
    > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    > ---
    >  include/asm-generic/page.h |   99 ++++++++++++++++++++++++++++++++++++++++++++
    >  1 files changed, 99 insertions(+), 0 deletions(-)
    >  create mode 100644 include/asm-generic/page.h
    >
    > diff --git a/include/asm-generic/page.h b/include/asm-generic/page.h
    > new file mode 100644
    > index 0000000..75fec18
    > --- /dev/null
    > +++ b/include/asm-generic/page.h
    > @@ -0,0 +1,99 @@
    > +#ifndef __ASM_GENERIC_PAGE_H
    > +#define __ASM_GENERIC_PAGE_H
    > +/*
    > + * Generic page.h implementation, for NOMMU architectures.
    > + * This provides the dummy definitions for the memory management.
    > + */
    > +
    > +#ifdef CONFIG_MMU
    > +#error need to prove a real asm/page.h
    > +#endif
    > +
    > +
    > +/* PAGE_SHIFT determines the page size */
    > +
    > +#define PAGE_SHIFT     12
    > +#ifdef __ASSEMBLY__
    > +#define PAGE_SIZE      (1 << PAGE_SHIFT)
    > +#else
    > +#define PAGE_SIZE      (1UL << PAGE_SHIFT)
    > +#endif

    #include <linux/const.h> and use (_AC(1, UL) << PAGE_SHIFT)

    Gr{oetje,eeting}s,

    Geert

    --
    Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

    In personal conversations with technical people, I call myself a hacker. But
    when I'm talking to journalists I just say "programmer" or something like that.
    -- Linus Torvalds
    --
    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: 2009-05-04 09:15    [W:0.023 / U:0.564 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site