linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: Dave Hansen <haveblue@us.ibm.com>
Cc: linux-mm@kvack.org
Subject: Re: [RFC][PATCH 1/7] generic PAGE_SIZE infrastructure (v2)
Date: Tue, 29 Aug 2006 11:46:18 +0900	[thread overview]
Message-ID: <20060829024618.GA8660@localhost.hsdv.com> (raw)
In-Reply-To: <20060828154417.D9D3FB1F@localhost.localdomain> <20060828154416.09E64946@localhost.localdomain> <20060828154414.38AEDAA2@localhost.localdomain> <20060828154413.E05721BD@localhost.localdomain>

On Mon, Aug 28, 2006 at 08:44:13AM -0700, Dave Hansen wrote:
> diff -puN include/asm-generic/page.h~generic-PAGE_SIZE-infrastructure include/asm-generic/page.h
> --- threadalloc/include/asm-generic/page.h~generic-PAGE_SIZE-infrastructure	2006-08-25 11:34:22.000000000 -0700
> +++ threadalloc-dave/include/asm-generic/page.h	2006-08-25 11:34:22.000000000 -0700
[snip]
> + */
> +#define PAGE_MASK      (~((1 << PAGE_SHIFT) - 1))
> +#endif /* CONFIG_ARCH_GENERIC_PAGE_SIZE */
>  
>  /* Pure 2^n version of get_order */
>  static __inline__ __attribute_const__ int get_order(unsigned long size)
> @@ -20,7 +48,6 @@ static __inline__ __attribute_const__ in
>  	return order;
>  }
>  
You've not handled the case for platforms that have their own
get_order().

On Mon, Aug 28, 2006 at 08:44:14AM -0700, Dave Hansen wrote:
> diff -puN include/asm-ia64/page.h~ia64 include/asm-ia64/page.h
> --- threadalloc/include/asm-ia64/page.h~ia64	2006-08-25 11:34:21.000000000 -0700
> +++ threadalloc-dave/include/asm-ia64/page.h	2006-08-25 11:34:23.000000000 -0700
> @@ -7,7 +7,7 @@
>   *	David Mosberger-Tang <davidm@hpl.hp.com>
>   */
>  
> -
> +#include <asm-generic/page.h>
>  #include <asm/intrinsics.h>
>  #include <asm/types.h>
>  
Which will break here..

On Mon, Aug 28, 2006 at 08:44:16AM -0700, Dave Hansen wrote:
> diff -puN include/asm-ppc/page.h~powerpc include/asm-ppc/page.h
> --- threadalloc/include/asm-ppc/page.h~powerpc	2006-08-25 11:34:21.000000000 -0700
> +++ threadalloc-dave/include/asm-ppc/page.h	2006-08-25 11:34:26.000000000 -0700
> @@ -2,16 +2,7 @@
>  #define _PPC_PAGE_H
>  
>  #include <asm/asm-compat.h>
> -
> -/* PAGE_SHIFT determines the page size */
> -#define PAGE_SHIFT	12
> -#define PAGE_SIZE	(ASM_CONST(1) << PAGE_SHIFT)
> -
> -/*
> - * Subtle: this is an int (not an unsigned long) and so it
> - * gets extended to 64 bits the way want (i.e. with 1s).  -- paulus
> - */
> -#define PAGE_MASK	(~((1 << PAGE_SHIFT) - 1))
> +#include <asm-generic/page.h>
>  
>  #ifdef __KERNEL__
>  
here..

On Mon, Aug 28, 2006 at 08:44:17AM -0700, Dave Hansen wrote:
> diff -puN include/asm-xtensa/page.h~arch-generic-PAGE_SIZE-give-every-arch-PAGE_SHIFT include/asm-xtensa/page.h
> --- threadalloc/include/asm-xtensa/page.h~arch-generic-PAGE_SIZE-give-every-arch-PAGE_SHIFT	2006-08-25 11:34:20.000000000 -0700
> +++ threadalloc-dave/include/asm-xtensa/page.h	2006-08-25 11:34:27.000000000 -0700
> @@ -14,16 +14,7 @@
>  #ifdef __KERNEL__
>  
>  #include <asm/processor.h>
> -
> -/*
> - * PAGE_SHIFT determines the page size
> - * PAGE_ALIGN(x) aligns the pointer to the (next) page boundary
> - */
> -
> -#define PAGE_SHIFT		XCHAL_MMU_MIN_PTE_PAGE_SIZE
> -#define PAGE_SIZE		(1 << PAGE_SHIFT)
> -#define PAGE_MASK		(~(PAGE_SIZE-1))
> -#define PAGE_ALIGN(addr)	(((addr)+PAGE_SIZE - 1) & PAGE_MASK)
> +#include <asm-generic/page.h>
>  
>  #define DCACHE_WAY_SIZE		(XCHAL_DCACHE_SIZE / XCHAL_DCACHE_WAYS)
>  #define PAGE_OFFSET		XCHAL_KSEG_CACHED_VADDR

and here.

You may wish to consider the HAVE_ARCH_GET_ORDER patch I sent to
linux-arch, it was intended to handle this.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2006-08-29  2:46 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-28 15:44 Dave Hansen
2006-08-28 15:44 ` [RFC][PATCH 2/7] ia64 generic PAGE_SIZE Dave Hansen
2006-08-28 17:04   ` Christoph Lameter
2006-08-28 17:22     ` Dave Hansen
2006-08-28 17:32       ` Christoph Lameter
2006-08-28 17:45         ` Dave Hansen
2006-08-29  2:46   ` Paul Mundt [this message]
2006-08-29  3:51     ` [RFC][PATCH 1/7] generic PAGE_SIZE infrastructure (v2) Randy.Dunlap
2006-08-29  3:55       ` Paul Mundt
2006-08-29  4:02         ` Randy.Dunlap
2006-08-29 15:29     ` Dave Hansen
2006-08-30  0:37       ` Randy.Dunlap
2006-08-28 15:44 ` [RFC][PATCH 3/7] sparc64 generic PAGE_SIZE Dave Hansen
2006-08-28 15:44 ` [RFC][PATCH 4/7] mips " Dave Hansen
2006-08-28 15:44 ` [RFC][PATCH 6/7] powerpc " Dave Hansen
2006-08-28 15:44 ` [RFC][PATCH 5/7] parisc " Dave Hansen
2006-08-28 15:44 ` [RFC][PATCH 7/7] convert the "easy" architectures to " Dave Hansen
2006-08-28 17:01 ` [RFC][PATCH 1/7] generic PAGE_SIZE infrastructure (v2) Christoph Lameter
2006-08-28 17:11   ` Dave Hansen
2006-08-28 23:32     ` Peter Chubb
2006-08-29 18:59       ` Dave Hansen
2006-08-28 20:53   ` Dave Hansen
2006-08-28 21:44     ` Christoph Lameter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060829024618.GA8660@localhost.hsdv.com \
    --to=lethal@linux-sh.org \
    --cc=haveblue@us.ibm.com \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox