diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mm.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 58202c26c559..fc4415256ec3 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1350,6 +1350,7 @@ static inline pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long a | |||
1350 | 1350 | ||
1351 | #if USE_SPLIT_PTE_PTLOCKS | 1351 | #if USE_SPLIT_PTE_PTLOCKS |
1352 | #if ALLOC_SPLIT_PTLOCKS | 1352 | #if ALLOC_SPLIT_PTLOCKS |
1353 | void __init ptlock_cache_init(void); | ||
1353 | extern bool ptlock_alloc(struct page *page); | 1354 | extern bool ptlock_alloc(struct page *page); |
1354 | extern void ptlock_free(struct page *page); | 1355 | extern void ptlock_free(struct page *page); |
1355 | 1356 | ||
@@ -1358,6 +1359,10 @@ static inline spinlock_t *ptlock_ptr(struct page *page) | |||
1358 | return page->ptl; | 1359 | return page->ptl; |
1359 | } | 1360 | } |
1360 | #else /* ALLOC_SPLIT_PTLOCKS */ | 1361 | #else /* ALLOC_SPLIT_PTLOCKS */ |
1362 | static inline void ptlock_cache_init(void) | ||
1363 | { | ||
1364 | } | ||
1365 | |||
1361 | static inline bool ptlock_alloc(struct page *page) | 1366 | static inline bool ptlock_alloc(struct page *page) |
1362 | { | 1367 | { |
1363 | return true; | 1368 | return true; |
@@ -1410,10 +1415,17 @@ static inline spinlock_t *pte_lockptr(struct mm_struct *mm, pmd_t *pmd) | |||
1410 | { | 1415 | { |
1411 | return &mm->page_table_lock; | 1416 | return &mm->page_table_lock; |
1412 | } | 1417 | } |
1418 | static inline void ptlock_cache_init(void) {} | ||
1413 | static inline bool ptlock_init(struct page *page) { return true; } | 1419 | static inline bool ptlock_init(struct page *page) { return true; } |
1414 | static inline void pte_lock_deinit(struct page *page) {} | 1420 | static inline void pte_lock_deinit(struct page *page) {} |
1415 | #endif /* USE_SPLIT_PTE_PTLOCKS */ | 1421 | #endif /* USE_SPLIT_PTE_PTLOCKS */ |
1416 | 1422 | ||
1423 | static inline void pgtable_init(void) | ||
1424 | { | ||
1425 | ptlock_cache_init(); | ||
1426 | pgtable_cache_init(); | ||
1427 | } | ||
1428 | |||
1417 | static inline bool pgtable_page_ctor(struct page *page) | 1429 | static inline bool pgtable_page_ctor(struct page *page) |
1418 | { | 1430 | { |
1419 | inc_zone_page_state(page, NR_PAGETABLE); | 1431 | inc_zone_page_state(page, NR_PAGETABLE); |