linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: Paul Mundt <lethal@linux-sh.org>
Cc: linux-mm@kvack.org
Subject: Re: [RFC][PATCH 1/7] generic PAGE_SIZE infrastructure (v2)
Date: Tue, 29 Aug 2006 08:29:14 -0700	[thread overview]
Message-ID: <1156865354.5408.51.camel@localhost.localdomain> (raw)
In-Reply-To: <20060829024618.GA8660@localhost.hsdv.com>

On Tue, 2006-08-29 at 11:46 +0900, Paul Mundt wrote:
> 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()
...
> You may wish to consider the HAVE_ARCH_GET_ORDER patch I sent to
> linux-arch, it was intended to handle this.

Gah.  I managed to leave that one off of the end of my series.  However,
I don't think this is a case where HAVE_ARCH_GET_ORDER is too much of a
disease.

Linus requested these:

> >       /*
> >        * We have a very complex xyzzy, we don't even want to
> >        * inline it!
> >        */
> >       extern void xyxxy(...);
> >
> >       /* Tell the rest of the world that we do it! */
> >       #define xyzzy xyzzy

And I find them really hard to follow.  But, maybe those were just done
badly.  Here's the patch that I have for now.  I'll go back and try to
Linusify it. ;)

I think get_order() is going to have to move out of generic/page.h,
though.

-- Dave

diff -puN include/asm-generic/page.h~Re-_RFC_PATCH_unify_all_architecture_PAGE_SIZE_definitions include/asm-generic/page.h
--- threadalloc/include/asm-generic/page.h~Re-_RFC_PATCH_unify_all_architecture_PAGE_SIZE_definitions	2006-08-28 09:15:31.000000000 -0700
+++ threadalloc-dave/include/asm-generic/page.h	2006-08-28 09:15:35.000000000 -0700
@@ -33,6 +33,7 @@
 #define PAGE_MASK      (~((1 << PAGE_SHIFT) - 1))
 
 #ifndef __ASSEMBLY__
+#ifndef CONFIG_ARCH_HAVE_GET_ORDER
 /* Pure 2^n version of get_order */
 static __inline__ __attribute_const__ int get_order(unsigned long size)
 {
@@ -46,6 +47,7 @@ static __inline__ __attribute_const__ in
 	} while (size);
 	return order;
 }
+#endif /* CONFIG_ARCH_HAVE_GET_ORDER */
 #endif /* __ASSEMBLY__ */
 
 #endif	/* __KERNEL__ */
diff -puN mm/Kconfig~Re-_RFC_PATCH_unify_all_architecture_PAGE_SIZE_definitions mm/Kconfig
--- threadalloc/mm/Kconfig~Re-_RFC_PATCH_unify_all_architecture_PAGE_SIZE_definitions	2006-08-28 09:15:31.000000000 -0700
+++ threadalloc-dave/mm/Kconfig	2006-08-28 09:39:00.000000000 -0700
@@ -56,6 +56,10 @@ config PAGE_SHIFT
 	default "12" # arm(26) || h8300 || i386 || m68knommu || m32r || ppc(32)
 		     # s390 || sh/64 || um || v850 || xtensa || x86_64
 
+config ARCH_HAVE_GET_ORDER
+	def_bool y
+	depends on IA64 || PPC || XTENSA
+
 config SELECT_MEMORY_MODEL
 	def_bool y
 	depends on EXPERIMENTAL || ARCH_SELECT_MEMORY_MODEL
_


--
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 15:29 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 3/7] sparc64 generic PAGE_SIZE Dave Hansen
2006-08-28 15:44 ` [RFC][PATCH 2/7] ia64 " 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   ` [RFC][PATCH 1/7] generic PAGE_SIZE infrastructure (v2) Paul Mundt
2006-08-29  3:51     ` Randy.Dunlap
2006-08-29  3:55       ` Paul Mundt
2006-08-29  4:02         ` Randy.Dunlap
2006-08-29 15:29     ` Dave Hansen [this message]
2006-08-30  0:37       ` Randy.Dunlap
2006-08-28 15:44 ` [RFC][PATCH 4/7] mips generic PAGE_SIZE 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=1156865354.5408.51.camel@localhost.localdomain \
    --to=haveblue@us.ibm.com \
    --cc=lethal@linux-sh.org \
    --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