From: Josh Boyer <jwboyer@linux.vnet.ibm.com>
To: paulus@samba.org
Cc: linuxppc-dev@ozlabs.org, david@gibson.dropbear.id.au
Subject: [PATCH] Consolidate mm_context_t definition in mmu.h
Date: Tue, 10 Jul 2007 10:01:49 -0500 [thread overview]
Message-ID: <1184079709.32199.6.camel@weaponx.rchland.ibm.com> (raw)
All of the platforms except PPC64 share a common mm_context_t definition.
Defining it in mmu.h avoids duplicating it in the platform specific mmu
header files.
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
---
include/asm-powerpc/mmu-44x.h | 5 -----
include/asm-powerpc/mmu-8xx.h | 4 ----
include/asm-powerpc/mmu-fsl-booke.h | 4 ----
include/asm-powerpc/mmu-hash32.h | 5 -----
include/asm-powerpc/mmu-hash64.h | 16 ----------------
include/asm-powerpc/mmu.h | 28 ++++++++++++++++++++++++++++
6 files changed, 28 insertions(+), 34 deletions(-)
--- linux-2.6.orig/include/asm-powerpc/mmu-44x.h
+++ linux-2.6/include/asm-powerpc/mmu-44x.h
@@ -55,11 +55,6 @@
typedef unsigned long long phys_addr_t;
-typedef struct {
- unsigned long id;
- unsigned long vdso_base;
-} mm_context_t;
-
#endif /* !__ASSEMBLY__ */
#ifndef CONFIG_PPC_EARLY_DEBUG_44x
--- linux-2.6.orig/include/asm-powerpc/mmu-8xx.h
+++ linux-2.6/include/asm-powerpc/mmu-8xx.h
@@ -138,10 +138,6 @@
#ifndef __ASSEMBLY__
typedef unsigned long phys_addr_t;
-typedef struct {
- unsigned long id;
- unsigned long vdso_base;
-} mm_context_t;
#endif /* !__ASSEMBLY__ */
#endif /* _ASM_POWERPC_MMU_8XX_H_ */
--- linux-2.6.orig/include/asm-powerpc/mmu-fsl-booke.h
+++ linux-2.6/include/asm-powerpc/mmu-fsl-booke.h
@@ -79,10 +79,6 @@ typedef unsigned long phys_addr_t;
typedef unsigned long long phys_addr_t;
#endif
-typedef struct {
- unsigned long id;
- unsigned long vdso_base;
-} mm_context_t;
#endif /* !__ASSEMBLY__ */
#endif /* _ASM_POWERPC_MMU_FSL_BOOKE_H_ */
--- linux-2.6.orig/include/asm-powerpc/mmu-hash32.h
+++ linux-2.6/include/asm-powerpc/mmu-hash32.h
@@ -79,11 +79,6 @@ struct hash_pte {
unsigned long pp:2; /* Page protection */
};
-typedef struct {
- unsigned long id;
- unsigned long vdso_base;
-} mm_context_t;
-
typedef unsigned long phys_addr_t;
#endif /* !__ASSEMBLY__ */
--- linux-2.6.orig/include/asm-powerpc/mmu-hash64.h
+++ linux-2.6/include/asm-powerpc/mmu-hash64.h
@@ -359,22 +359,6 @@ extern void stab_initialize(unsigned lon
#ifndef __ASSEMBLY__
-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;
-
-
static inline unsigned long vsid_scramble(unsigned long protovsid)
{
#if 0
--- linux-2.6.orig/include/asm-powerpc/mmu.h
+++ linux-2.6/include/asm-powerpc/mmu.h
@@ -19,5 +19,33 @@
# include <asm/mmu-8xx.h>
#endif
+#ifndef __ASSEMBLY__
+
+#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 */
+#endif /* !__ASSEMBLY__ */
+
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_MMU_H_ */
next reply other threads:[~2007-07-10 15:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-10 15:01 Josh Boyer [this message]
2007-07-10 16:36 ` [PATCH] Consolidate mm_context_t definition in mmu.h Arnd Bergmann
2007-07-10 16:47 ` Josh Boyer
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=1184079709.32199.6.camel@weaponx.rchland.ibm.com \
--to=jwboyer@linux.vnet.ibm.com \
--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).