Re: [PATCH 11/27] asm-generic: add generic page.h

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

 



On Wed, Apr 29, 2009 at 16:55, Arnd Bergmann <arnd@xxxxxxxx> 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@xxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxx

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-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux