Patchwork powerpc: hash_page_sync should only be used on SMP & STD_MMU_32

login
register
mail settings
Submitter Kumar Gala
Date Nov. 19, 2008, 3:53 p.m.
Message ID <1227109984-22195-1-git-send-email-galak@kernel.crashing.org>
Download mbox | patch
Permalink /patch/9610/
State Accepted
Commit f4f3a1261ad70988ad45614ebc87e553143a332b
Delegated to: Paul Mackerras
Headers show

Comments

Kumar Gala - Nov. 19, 2008, 3:53 p.m.
Clean up the ifdefs so we only use hash_page_sync if we are
CONFIG_SMP && CONFIG_PPC_STD_MMU_32

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 arch/powerpc/mm/pgtable_32.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Benjamin Herrenschmidt - Nov. 20, 2008, 4:47 a.m.
On Wed, 2008-11-19 at 09:53 -0600, Kumar Gala wrote:
> Clean up the ifdefs so we only use hash_page_sync if we are
> CONFIG_SMP && CONFIG_PPC_STD_MMU_32
> 
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

> ---
>  arch/powerpc/mm/pgtable_32.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
> index c31d6d2..44fbc81 100644
> --- a/arch/powerpc/mm/pgtable_32.c
> +++ b/arch/powerpc/mm/pgtable_32.c
> @@ -48,7 +48,7 @@ EXPORT_SYMBOL(ioremap_bot);	/* aka VMALLOC_END */
>  
>  extern char etext[], _stext[];
>  
> -#ifdef CONFIG_SMP
> +#if defined(CONFIG_SMP) && defined(CONFIG_PPC_STD_MMU_32)
>  extern void hash_page_sync(void);
>  #endif
>  
> @@ -127,7 +127,7 @@ pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address)
>  
>  void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
>  {
> -#ifdef CONFIG_SMP
> +#if defined(CONFIG_SMP) && defined(CONFIG_PPC_STD_MMU_32)
>  	hash_page_sync();
>  #endif
>  	free_page((unsigned long)pte);
> @@ -135,7 +135,7 @@ void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
>  
>  void pte_free(struct mm_struct *mm, pgtable_t ptepage)
>  {
> -#ifdef CONFIG_SMP
> +#if defined(CONFIG_SMP) && defined(CONFIG_PPC_STD_MMU_32)
>  	hash_page_sync();
>  #endif
>  	pgtable_page_dtor(ptepage);

Patch

diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index c31d6d2..44fbc81 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -48,7 +48,7 @@  EXPORT_SYMBOL(ioremap_bot);	/* aka VMALLOC_END */
 
 extern char etext[], _stext[];
 
-#ifdef CONFIG_SMP
+#if defined(CONFIG_SMP) && defined(CONFIG_PPC_STD_MMU_32)
 extern void hash_page_sync(void);
 #endif
 
@@ -127,7 +127,7 @@  pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address)
 
 void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
 {
-#ifdef CONFIG_SMP
+#if defined(CONFIG_SMP) && defined(CONFIG_PPC_STD_MMU_32)
 	hash_page_sync();
 #endif
 	free_page((unsigned long)pte);
@@ -135,7 +135,7 @@  void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
 
 void pte_free(struct mm_struct *mm, pgtable_t ptepage)
 {
-#ifdef CONFIG_SMP
+#if defined(CONFIG_SMP) && defined(CONFIG_PPC_STD_MMU_32)
 	hash_page_sync();
 #endif
 	pgtable_page_dtor(ptepage);