diff options
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/Kconfig | 1 | ||||
-rw-r--r-- | arch/m68k/include/asm/mcf_pgalloc.h | 4 | ||||
-rw-r--r-- | arch/m68k/include/asm/motorola_pgalloc.h | 8 | ||||
-rw-r--r-- | arch/m68k/include/asm/sun3_pgalloc.h | 5 |
4 files changed, 15 insertions, 3 deletions
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index 311a300d48cc..75f25a8e3001 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config M68K | 1 | config M68K |
2 | bool | 2 | bool |
3 | default y | 3 | default y |
4 | select ARCH_MIGHT_HAVE_PC_PARPORT if ISA | ||
4 | select HAVE_IDE | 5 | select HAVE_IDE |
5 | select HAVE_AOUT if MMU | 6 | select HAVE_AOUT if MMU |
6 | select HAVE_DEBUG_BUGVERBOSE | 7 | select HAVE_DEBUG_BUGVERBOSE |
diff --git a/arch/m68k/include/asm/mcf_pgalloc.h b/arch/m68k/include/asm/mcf_pgalloc.h index 313f3dd23cdc..f9924fbcfe42 100644 --- a/arch/m68k/include/asm/mcf_pgalloc.h +++ b/arch/m68k/include/asm/mcf_pgalloc.h | |||
@@ -56,6 +56,10 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm, | |||
56 | 56 | ||
57 | if (!page) | 57 | if (!page) |
58 | return NULL; | 58 | return NULL; |
59 | if (!pgtable_page_ctor(page)) { | ||
60 | __free_page(page); | ||
61 | return NULL; | ||
62 | } | ||
59 | 63 | ||
60 | pte = kmap(page); | 64 | pte = kmap(page); |
61 | if (pte) { | 65 | if (pte) { |
diff --git a/arch/m68k/include/asm/motorola_pgalloc.h b/arch/m68k/include/asm/motorola_pgalloc.h index 2f02f264e694..24bcba496c75 100644 --- a/arch/m68k/include/asm/motorola_pgalloc.h +++ b/arch/m68k/include/asm/motorola_pgalloc.h | |||
@@ -29,18 +29,22 @@ static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) | |||
29 | 29 | ||
30 | static inline pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address) | 30 | static inline pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address) |
31 | { | 31 | { |
32 | struct page *page = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0); | 32 | struct page *page; |
33 | pte_t *pte; | 33 | pte_t *pte; |
34 | 34 | ||
35 | page = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0); | ||
35 | if(!page) | 36 | if(!page) |
36 | return NULL; | 37 | return NULL; |
38 | if (!pgtable_page_ctor(page)) { | ||
39 | __free_page(page); | ||
40 | return NULL; | ||
41 | } | ||
37 | 42 | ||
38 | pte = kmap(page); | 43 | pte = kmap(page); |
39 | __flush_page_to_ram(pte); | 44 | __flush_page_to_ram(pte); |
40 | flush_tlb_kernel_page(pte); | 45 | flush_tlb_kernel_page(pte); |
41 | nocache_page(pte); | 46 | nocache_page(pte); |
42 | kunmap(page); | 47 | kunmap(page); |
43 | pgtable_page_ctor(page); | ||
44 | return page; | 48 | return page; |
45 | } | 49 | } |
46 | 50 | ||
diff --git a/arch/m68k/include/asm/sun3_pgalloc.h b/arch/m68k/include/asm/sun3_pgalloc.h index 48d80d5a666f..f868506e3350 100644 --- a/arch/m68k/include/asm/sun3_pgalloc.h +++ b/arch/m68k/include/asm/sun3_pgalloc.h | |||
@@ -59,7 +59,10 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm, | |||
59 | return NULL; | 59 | return NULL; |
60 | 60 | ||
61 | clear_highpage(page); | 61 | clear_highpage(page); |
62 | pgtable_page_ctor(page); | 62 | if (!pgtable_page_ctor(page)) { |
63 | __free_page(page); | ||
64 | return NULL; | ||
65 | } | ||
63 | return page; | 66 | return page; |
64 | 67 | ||
65 | } | 68 | } |