linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Josh Boyer <jwboyer@linux.vnet.ibm.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org, david@gibson.dropbear.id.au
Subject: Re: [PATCH] Consolidate mm_context_t definition in mmu.h
Date: Tue, 10 Jul 2007 11:47:22 -0500	[thread overview]
Message-ID: <1184086042.32199.11.camel@weaponx.rchland.ibm.com> (raw)
In-Reply-To: <200707101836.26413.arnd@arndb.de>

On Tue, 2007-07-10 at 18:36 +0200, Arnd Bergmann wrote:
> On Tuesday 10 July 2007, Josh Boyer wrote:
> > +#ifdef CONFIG_PPC64
> > +typedef unsigned long mm_context_id_t;
> > +
> > +typedef struct {
> > +       mm_context_id_t id;
> > +       u16 user_psize;         /* page size index */
> > +
> > +#ifdef CONFIG_PPC_MM_SLICES
> > +       u64 low_slices_psize;   /* SLB page size encodings */
> > +       u64 high_slices_psize;  /* 4 bits per slice for now */
> > +#else
> > +       u16 sllp;               /* SLB page size encoding */
> > +#endif
> > +       unsigned long vdso_base;
> > +} mm_context_t;
> > +
> > +#else /* !CONFIG_PPC64 */
> > +
> > +typedef struct {
> > +       unsigned long id;
> > +       unsigned long vdso_base;
> > +} mm_context_t;
> > +
> > +#endif /* CONFIG_PPC64 */
> 
> 
> It seems to me that you can easily consolidate this further, if you
> allow the mm_context_id_t on 32 bit, or remove it on 64 bit:

Hm... good point.  Though...

> 
> +typedef unsigned long mm_context_id_t;
> +
> +typedef struct {
> +       mm_context_id_t id;
> +       u16 user_psize;         /* page size index */
> +
> +#ifdef CONFIG_PPC64

This needs to be moved up to encompass the u16 user_psize member as
well, yes?

> +#ifdef CONFIG_PPC_MM_SLICES
> +       u64 low_slices_psize;   /* SLB page size encodings */
> +       u64 high_slices_psize;  /* 4 bits per slice for now */
> +#else
> +       u16 sllp;               /* SLB page size encoding */
> +#endif
> +#endif
> +       unsigned long vdso_base;
> +} mm_context_t;

josh

  reply	other threads:[~2007-07-10 16:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-10 15:01 [PATCH] Consolidate mm_context_t definition in mmu.h Josh Boyer
2007-07-10 16:36 ` Arnd Bergmann
2007-07-10 16:47   ` Josh Boyer [this message]
2007-07-10 16:55     ` Arnd Bergmann
2007-07-11 10:33 ` Christoph Hellwig
2007-07-11 12:35   ` Josh Boyer

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=1184086042.32199.11.camel@weaponx.rchland.ibm.com \
    --to=jwboyer@linux.vnet.ibm.com \
    --cc=arnd@arndb.de \
    --cc=david@gibson.dropbear.id.au \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).