diff options
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 035a688e5472..d8b75d7d6a9e 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -424,6 +424,10 @@ static inline int pmd_devmap(pmd_t pmd) | |||
424 | { | 424 | { |
425 | return 0; | 425 | return 0; |
426 | } | 426 | } |
427 | static inline int pud_devmap(pud_t pud) | ||
428 | { | ||
429 | return 0; | ||
430 | } | ||
427 | #endif | 431 | #endif |
428 | 432 | ||
429 | /* | 433 | /* |
@@ -1199,6 +1203,10 @@ void unmap_vmas(struct mmu_gather *tlb, struct vm_area_struct *start_vma, | |||
1199 | 1203 | ||
1200 | /** | 1204 | /** |
1201 | * mm_walk - callbacks for walk_page_range | 1205 | * mm_walk - callbacks for walk_page_range |
1206 | * @pud_entry: if set, called for each non-empty PUD (2nd-level) entry | ||
1207 | * this handler should only handle pud_trans_huge() puds. | ||
1208 | * the pmd_entry or pte_entry callbacks will be used for | ||
1209 | * regular PUDs. | ||
1202 | * @pmd_entry: if set, called for each non-empty PMD (3rd-level) entry | 1210 | * @pmd_entry: if set, called for each non-empty PMD (3rd-level) entry |
1203 | * this handler is required to be able to handle | 1211 | * this handler is required to be able to handle |
1204 | * pmd_trans_huge() pmds. They may simply choose to | 1212 | * pmd_trans_huge() pmds. They may simply choose to |
@@ -1218,6 +1226,8 @@ void unmap_vmas(struct mmu_gather *tlb, struct vm_area_struct *start_vma, | |||
1218 | * (see the comment on walk_page_range() for more details) | 1226 | * (see the comment on walk_page_range() for more details) |
1219 | */ | 1227 | */ |
1220 | struct mm_walk { | 1228 | struct mm_walk { |
1229 | int (*pud_entry)(pud_t *pud, unsigned long addr, | ||
1230 | unsigned long next, struct mm_walk *walk); | ||
1221 | int (*pmd_entry)(pmd_t *pmd, unsigned long addr, | 1231 | int (*pmd_entry)(pmd_t *pmd, unsigned long addr, |
1222 | unsigned long next, struct mm_walk *walk); | 1232 | unsigned long next, struct mm_walk *walk); |
1223 | int (*pte_entry)(pte_t *pte, unsigned long addr, | 1233 | int (*pte_entry)(pte_t *pte, unsigned long addr, |
@@ -1801,8 +1811,26 @@ static inline spinlock_t *pmd_lock(struct mm_struct *mm, pmd_t *pmd) | |||
1801 | return ptl; | 1811 | return ptl; |
1802 | } | 1812 | } |
1803 | 1813 | ||
1804 | extern void __init pagecache_init(void); | 1814 | /* |
1815 | * No scalability reason to split PUD locks yet, but follow the same pattern | ||
1816 | * as the PMD locks to make it easier if we decide to. The VM should not be | ||
1817 | * considered ready to switch to split PUD locks yet; there may be places | ||
1818 | * which need to be converted from page_table_lock. | ||
1819 | */ | ||
1820 | static inline spinlock_t *pud_lockptr(struct mm_struct *mm, pud_t *pud) | ||
1821 | { | ||
1822 | return &mm->page_table_lock; | ||
1823 | } | ||
1824 | |||
1825 | static inline spinlock_t *pud_lock(struct mm_struct *mm, pud_t *pud) | ||
1826 | { | ||
1827 | spinlock_t *ptl = pud_lockptr(mm, pud); | ||
1828 | |||
1829 | spin_lock(ptl); | ||
1830 | return ptl; | ||
1831 | } | ||
1805 | 1832 | ||
1833 | extern void __init pagecache_init(void); | ||
1806 | extern void free_area_init(unsigned long * zones_size); | 1834 | extern void free_area_init(unsigned long * zones_size); |
1807 | extern void free_area_init_node(int nid, unsigned long * zones_size, | 1835 | extern void free_area_init_node(int nid, unsigned long * zones_size, |
1808 | unsigned long zone_start_pfn, unsigned long *zholes_size); | 1836 | unsigned long zone_start_pfn, unsigned long *zholes_size); |