Skip to contentSkip to conversation

m68k: fix compilation

PATCH Applied Alexey Dobriyan 2 participants 2 messages Jul 9, 2009 – Aug 21, 2009 m68k architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 m68k: fix compilation

* pgprot_noncached() should be defined _before_ including asm-generic/pgtable.h
* kunmap() wants struct page *, not pte

---

 arch/m68k/include/asm/motorola_pgalloc.h |    2 +-
 arch/m68k/include/asm/pgtable_mm.h       |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

commit 85dc40e8bc39f106fdf926739acfd23c2a574d9a

Author: Alexey <[email protected]>
Date:   Thu Jul 9 07:41:54 2009 +0400

m68k fix

arch/m68k/include/asm/motorola_pgalloc.h +1 -1
@@ -41,7 +41,7 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addres
 		flush_tlb_kernel_page(pte);
 		nocache_page(pte);
 	}
-	kunmap(pte);
+	kunmap(page);
 	pgtable_page_ctor(page);
 	return page;
 }
arch/m68k/include/asm/pgtable_mm.h +1 -2
@@ -135,8 +135,6 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,
 #endif
 
 #ifndef __ASSEMBLY__
-#include <asm-generic/pgtable.h>
-
 /*
  * Macro to mark a page protection value as "uncacheable".
  */
@@ -154,6 +152,7 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,
 	    ? (__pgprot((pgprot_val(prot) & _CACHEMASK040) | _PAGE_NOCACHE_S))	\
 	    : (prot)))
 
+#include <asm-generic/pgtable.h>
 #endif /* !__ASSEMBLY__ */
 
 /*
maintainer Applied
#1 lore raw
Quoted 1 line · Alexey Dobriyan

* pgprot_noncached() should be defined _before_ including asm-generic/pgtable.h

Thanks, applied!

Quoted 1 line

* kunmap() wants struct page *, not pte

For this part, I took the solution from Andrew Morton.

Quoted 36 lines

---

 arch/m68k/include/asm/motorola_pgalloc.h |    2 +- arch/m68k/include/asm/pgtable_mm.h       |    3 +--

 2 files changed, 2 insertions(+), 3 deletions(-)

commit 85dc40e8bc39f106fdf926739acfd23c2a574d9a
Author: Alexey <[email protected]>
Date:   Thu Jul 9 07:41:54 2009 +0400

   m68k fix

arch/m68k/include/asm/motorola_pgalloc.h +1 -1
@@ -41,7 +41,7 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addres
                flush_tlb_kernel_page(pte);
                nocache_page(pte);
        }
-       kunmap(pte);
+       kunmap(page);
        pgtable_page_ctor(page);
        return page;
  }
arch/m68k/include/asm/pgtable_mm.h +0 -2
@@ -135,8 +135,6 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,
  #endif
 
  #ifndef __ASSEMBLY__
-#include <asm-generic/pgtable.h>
-
  /*
  * Macro to mark a page protection value as "uncacheable".
  */

arch/m68k/include/asm/pgtable_mm.h static inline void update_mmu_cache(struct vm_area_struct *vma, · line 158

Quoted 7 lines
arch/m68k/include/asm/pgtable_mm.h +1 -0
@@ -154,6 +152,7 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,
            ? (__pgprot((pgprot_val(prot) & _CACHEMASK040) | _PAGE_NOCACHE_S))  \
            : (prot)))
 
+#include <asm-generic/pgtable.h>
  #endif /* !__ASSEMBLY__ */
 
  /*

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html