From: Andrew Morton <akpm@linux-foundation.org>
To: gerald.schaefer@de.ibm.com
Cc: haveblue@us.ibm.com, schwidefsky@de.ibm.com,
linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Subject: Re: [patch 09/10] Hugetlb common code update for System z.
Date: Wed, 12 Mar 2008 16:43:03 -0700 [thread overview]
Message-ID: <20080312164303.cac9cab5.akpm@linux-foundation.org> (raw)
In-Reply-To: <1205363937.5237.60.camel@localhost.localdomain>
On Thu, 13 Mar 2008 00:18:57 +0100
Gerald Schaefer <gerald.schaefer@de.ibm.com> wrote:
> On Wed, 2008-03-12 at 10:51 -0700, Dave Hansen wrote:
> > > +#ifndef ARCH_HAS_HUGE_PTE_TYPE
> > > +#define huge_pte_none(pte) pte_none(pte)
> > > +#define huge_pte_wrprotect(pte) pte_wrprotect(pte)
> > > +#define huge_ptep_set_wrprotect(mm, addr, ptep) \
> > > + ptep_set_wrprotect(mm, addr, ptep)
> > > +#define huge_ptep_set_access_flags(vma, addr, ptep, pte, dirty) \
> > > + ptep_set_access_flags(vma, addr, ptep, pte, dirty)
> > > +#define huge_ptep_get(ptep) (*ptep)
> > > +#endif
> > > +
> > > +#ifndef ARCH_HAS_PREPARE_HUGEPAGE
> >
> > Can you guys please do these defines in Kconfig instead of headers? I
> > find them much easier to track down when I have one place to look,
> > rather than a mess of 14 other #includes in a arch-specific header. :)
>
> There are already several ARCH_HAS_xxx defines which are being used in
> inlude/linux/hugetlb.h. All of them are defined in
> include/asm-<arch>/page.h for every architecture that needs them (with
> the exception of powerpc, where it is include/asm-powerpc/page_64.h).
Yes, but that's fugly and it would be better to put in place the
infrastructure for cleaning it up, rather than worsening it.
So...
Put this:
+#define huge_pte_none(pte) pte_none(pte)
+#define huge_pte_wrprotect(pte) pte_wrprotect(pte)
+#define huge_ptep_set_wrprotect(mm, addr, ptep) \
+ ptep_set_wrprotect(mm, addr, ptep)
+#define huge_ptep_set_access_flags(vma, addr, ptep, pte, dirty) \
+ ptep_set_access_flags(vma, addr, ptep, pte, dirty)
+#define huge_ptep_get(ptep) (*ptep)
into include/asm-generic/hugetlb.h
then for each architecture except s390 add an include/asm-foo/hugetlb.h
which does
#include <asm-generic/hugetlb.h>
then in include/linux/hugetlb.h add
#include <asm/hugetlb.h>
and then in include/asm-s390/hugetlb.h, add your s390-specific versions of
huge_pte_none() and friends.
later, someone can hopefully use this new infrastructure to rid us of
ARCH_HAS_HUGEPAGE_ONLY_RANGE, ARCH_HAS_HUGETLB_FREE_PGD_RANGE,
ARCH_HAS_PREPARE_HUGEPAGE_RANGE, ARCH_HAS_SETCLEAR_HUGE_PTE and
ARCH_HAS_HUGETLB_PREFAULT_HOOK.
next prev parent reply other threads:[~2008-03-12 23:43 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-12 17:31 [patch 00/10] System z10 patches Martin Schwidefsky
2008-03-12 17:31 ` [patch 01/10] Add new fields for System z10 to /proc/sysinfo Martin Schwidefsky
2008-03-12 17:57 ` Josef 'Jeff' Sipek
2008-03-13 10:02 ` Martin Schwidefsky
2008-03-12 17:31 ` [patch 02/10] Export stfle Martin Schwidefsky
2008-03-12 17:31 ` [patch 03/10] sched: add exported arch_reinit_sched_domains() to header file Martin Schwidefsky
2008-03-12 23:03 ` Andrew Morton
2008-03-12 23:03 ` Andrew Morton
2008-03-13 9:48 ` Martin Schwidefsky
2008-03-21 12:29 ` Ingo Molnar
2008-03-12 17:31 ` [patch 04/10] sched: Add arch_update_cpu_topology hook Martin Schwidefsky
2008-03-21 12:30 ` Ingo Molnar
2008-03-12 17:32 ` [patch 05/10] cpu topology: convert siblings_show macro to accept non-lvalues Martin Schwidefsky
2008-03-12 17:32 ` [patch 06/10] cpu topology support for s390 Martin Schwidefsky
2008-03-12 23:11 ` Andrew Morton
2008-03-12 23:11 ` Andrew Morton
2008-03-13 12:28 ` Martin Schwidefsky
2008-03-13 22:40 ` Heiko Carstens
2008-03-12 17:32 ` [patch 07/10] Vertical cpu management Martin Schwidefsky
2008-03-12 17:32 ` [patch 08/10] Add missing TLB flush to hugetlb_cow() Martin Schwidefsky
2008-03-12 17:32 ` [patch 09/10] Hugetlb common code update for System z Martin Schwidefsky
2008-03-12 17:51 ` Dave Hansen
2008-03-12 23:18 ` Gerald Schaefer
2008-03-12 23:43 ` Andrew Morton [this message]
2008-03-13 17:49 ` Gerald Schaefer
2008-03-28 14:05 ` Gerald Schaefer
2008-03-28 14:06 ` Ingo Molnar
2008-03-28 14:33 ` Gerald Schaefer
2008-03-28 15:53 ` Martin Schwidefsky
2008-03-28 16:03 ` Ingo Molnar
2008-03-12 17:32 ` [patch 10/10] System z large page support Martin Schwidefsky
2008-03-12 17:52 ` Dave Hansen
2008-03-12 22:14 ` Gerald Schaefer
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=20080312164303.cac9cab5.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=gerald.schaefer@de.ibm.com \
--cc=haveblue@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.