diff options
-rw-r--r-- | arch/s390/Kconfig | 4 | ||||
-rw-r--r-- | arch/s390/include/asm/pgalloc.h | 17 | ||||
-rw-r--r-- | arch/s390/mm/pgtable.c | 4 |
3 files changed, 20 insertions, 5 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 65a07750f4f9..86db5a8e6586 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -415,6 +415,10 @@ config ARCH_ENABLE_MEMORY_HOTPLUG | |||
415 | config ARCH_ENABLE_MEMORY_HOTREMOVE | 415 | config ARCH_ENABLE_MEMORY_HOTREMOVE |
416 | def_bool y | 416 | def_bool y |
417 | 417 | ||
418 | config ARCH_ENABLE_SPLIT_PMD_PTLOCK | ||
419 | def_bool y | ||
420 | depends on 64BIT | ||
421 | |||
418 | config FORCE_MAX_ZONEORDER | 422 | config FORCE_MAX_ZONEORDER |
419 | int | 423 | int |
420 | default "9" | 424 | default "9" |
diff --git a/arch/s390/include/asm/pgalloc.h b/arch/s390/include/asm/pgalloc.h index 14d43c77d6cf..884017cbfa9f 100644 --- a/arch/s390/include/asm/pgalloc.h +++ b/arch/s390/include/asm/pgalloc.h | |||
@@ -92,11 +92,22 @@ static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long address) | |||
92 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long vmaddr) | 92 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long vmaddr) |
93 | { | 93 | { |
94 | unsigned long *table = crst_table_alloc(mm); | 94 | unsigned long *table = crst_table_alloc(mm); |
95 | if (table) | 95 | |
96 | crst_table_init(table, _SEGMENT_ENTRY_EMPTY); | 96 | if (!table) |
97 | return NULL; | ||
98 | crst_table_init(table, _SEGMENT_ENTRY_EMPTY); | ||
99 | if (!pgtable_pmd_page_ctor(virt_to_page(table))) { | ||
100 | crst_table_free(mm, table); | ||
101 | return NULL; | ||
102 | } | ||
97 | return (pmd_t *) table; | 103 | return (pmd_t *) table; |
98 | } | 104 | } |
99 | #define pmd_free(mm, pmd) crst_table_free(mm, (unsigned long *) pmd) | 105 | |
106 | static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) | ||
107 | { | ||
108 | pgtable_pmd_page_dtor(virt_to_page(pmd)); | ||
109 | crst_table_free(mm, (unsigned long *) pmd); | ||
110 | } | ||
100 | 111 | ||
101 | static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pud_t *pud) | 112 | static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pud_t *pud) |
102 | { | 113 | { |
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index 9c26b7aa96d9..f8b58a7a3048 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c | |||
@@ -1397,7 +1397,7 @@ void pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp, | |||
1397 | { | 1397 | { |
1398 | struct list_head *lh = (struct list_head *) pgtable; | 1398 | struct list_head *lh = (struct list_head *) pgtable; |
1399 | 1399 | ||
1400 | assert_spin_locked(&mm->page_table_lock); | 1400 | assert_spin_locked(pmd_lockptr(mm, pmdp)); |
1401 | 1401 | ||
1402 | /* FIFO */ | 1402 | /* FIFO */ |
1403 | if (!pmd_huge_pte(mm, pmdp)) | 1403 | if (!pmd_huge_pte(mm, pmdp)) |
@@ -1413,7 +1413,7 @@ pgtable_t pgtable_trans_huge_withdraw(struct mm_struct *mm, pmd_t *pmdp) | |||
1413 | pgtable_t pgtable; | 1413 | pgtable_t pgtable; |
1414 | pte_t *ptep; | 1414 | pte_t *ptep; |
1415 | 1415 | ||
1416 | assert_spin_locked(&mm->page_table_lock); | 1416 | assert_spin_locked(pmd_lockptr(mm, pmdp)); |
1417 | 1417 | ||
1418 | /* FIFO */ | 1418 | /* FIFO */ |
1419 | pgtable = pmd_huge_pte(mm, pmdp); | 1419 | pgtable = pmd_huge_pte(mm, pmdp); |