lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 4 May 2009 09:11:33 +0200
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	linux-arch@...r.kernel.org, Michal Simek <monstr@...str.eu>,
	Remis Lima Baima <remis.developer@...glemail.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 11/27] asm-generic: add generic page.h

On Wed, Apr 29, 2009 at 16:55, Arnd Bergmann <arnd@...db.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@...db.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@...ux-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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ