@@ -424,7 +424,7 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
424424 break ;
425425
426426 cond_resched ();
427- if (debug_pagealloc_enabled_or_kfence () &&
427+ if (debug_pagealloc_enabled () &&
428428 (paddr >> PAGE_SHIFT ) < linear_map_hash_count )
429429 linear_map_hash_slots [paddr >> PAGE_SHIFT ] = ret | 0x80 ;
430430 }
@@ -807,7 +807,7 @@ static void __init htab_init_page_sizes(void)
807807 bool aligned = true;
808808 init_hpte_page_sizes ();
809809
810- if (!debug_pagealloc_enabled_or_kfence ()) {
810+ if (!debug_pagealloc_enabled ()) {
811811 /*
812812 * Pick a size for the linear mapping. Currently, we only
813813 * support 16M, 1M and 4K which is the default
@@ -1127,7 +1127,7 @@ static void __init htab_initialize(void)
11271127
11281128 prot = pgprot_val (PAGE_KERNEL );
11291129
1130- if (debug_pagealloc_enabled_or_kfence ()) {
1130+ if (debug_pagealloc_enabled ()) {
11311131 linear_map_hash_count = memblock_end_of_DRAM () >> PAGE_SHIFT ;
11321132 linear_map_hash_slots = memblock_alloc_try_nid (
11331133 linear_map_hash_count , 1 , MEMBLOCK_LOW_LIMIT ,
@@ -2110,7 +2110,7 @@ void hpt_do_stress(unsigned long ea, unsigned long hpte_group)
21102110 }
21112111}
21122112
2113- #if defined( CONFIG_DEBUG_PAGEALLOC ) || defined( CONFIG_KFENCE )
2113+ #ifdef CONFIG_DEBUG_PAGEALLOC
21142114static DEFINE_RAW_SPINLOCK (linear_map_hash_lock );
21152115
21162116static void kernel_map_linear_page (unsigned long vaddr , unsigned long lmi )
@@ -2183,7 +2183,13 @@ void hash__kernel_map_pages(struct page *page, int numpages, int enable)
21832183 }
21842184 local_irq_restore (flags );
21852185}
2186- #endif /* CONFIG_DEBUG_PAGEALLOC || CONFIG_KFENCE */
2186+ #else /* CONFIG_DEBUG_PAGEALLOC */
2187+ void hash__kernel_map_pages (struct page * page , int numpages ,
2188+ int enable )
2189+ {
2190+
2191+ }
2192+ #endif /* CONFIG_DEBUG_PAGEALLOC */
21872193
21882194void hash__setup_initial_memory_limit (phys_addr_t first_memblock_base ,
21892195 phys_addr_t first_memblock_size )
0 commit comments