File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ static inline void arch_clear_hugepage_flags(struct page *page)
11
11
}
12
12
#define arch_clear_hugepage_flags arch_clear_hugepage_flags
13
13
14
+ bool arch_hugetlb_migration_supported (struct hstate * h );
15
+ #define arch_hugetlb_migration_supported arch_hugetlb_migration_supported
16
+
14
17
#ifdef CONFIG_RISCV_ISA_SVNAPOT
15
18
#define __HAVE_ARCH_HUGE_PTE_CLEAR
16
19
void huge_pte_clear (struct mm_struct * mm , unsigned long addr ,
Original file line number Diff line number Diff line change @@ -364,7 +364,7 @@ void huge_pte_clear(struct mm_struct *mm,
364
364
pte_clear (mm , addr , ptep );
365
365
}
366
366
367
- static __init bool is_napot_size (unsigned long size )
367
+ static bool is_napot_size (unsigned long size )
368
368
{
369
369
unsigned long order ;
370
370
@@ -392,7 +392,7 @@ arch_initcall(napot_hugetlbpages_init);
392
392
393
393
#else
394
394
395
- static __init bool is_napot_size (unsigned long size )
395
+ static bool is_napot_size (unsigned long size )
396
396
{
397
397
return false;
398
398
}
@@ -409,7 +409,7 @@ int pmd_huge(pmd_t pmd)
409
409
return pmd_leaf (pmd );
410
410
}
411
411
412
- bool __init arch_hugetlb_valid_size (unsigned long size )
412
+ static bool __hugetlb_valid_size (unsigned long size )
413
413
{
414
414
if (size == HPAGE_SIZE )
415
415
return true;
@@ -421,6 +421,16 @@ bool __init arch_hugetlb_valid_size(unsigned long size)
421
421
return false;
422
422
}
423
423
424
+ bool __init arch_hugetlb_valid_size (unsigned long size )
425
+ {
426
+ return __hugetlb_valid_size (size );
427
+ }
428
+
429
+ bool arch_hugetlb_migration_supported (struct hstate * h )
430
+ {
431
+ return __hugetlb_valid_size (huge_page_size (h ));
432
+ }
433
+
424
434
#ifdef CONFIG_CONTIG_ALLOC
425
435
static __init int gigantic_pages_init (void )
426
436
{
You can’t perform that action at this time.
0 commit comments