Skip to content

Commit

Permalink
book3s64/hash: Refactor hash__kernel_map_pages() function
Browse files Browse the repository at this point in the history
This refactors hash__kernel_map_pages() function to call
hash_debug_pagealloc_map_pages(). This will come useful when we will add
kfence support.

No functionality changes in this patch.

Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://patch.msgid.link/0cb8ddcccdcf61ea06ab4d92aacd770c16cc0f2c.1729271995.git.ritesh.list@gmail.com
  • Loading branch information
Ritesh Harjani (IBM) authored and Michael Ellerman committed Oct 23, 2024
1 parent ff8631c commit 43919f4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion arch/powerpc/mm/book3s64/hash_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,8 @@ static inline void hash_debug_pagealloc_add_slot(phys_addr_t paddr, int slot)
linear_map_hash_slots[paddr >> PAGE_SHIFT] = slot | 0x80;
}

int hash__kernel_map_pages(struct page *page, int numpages, int enable)
static int hash_debug_pagealloc_map_pages(struct page *page, int numpages,
int enable)
{
unsigned long flags, vaddr, lmi;
int i;
Expand All @@ -368,6 +369,12 @@ int hash__kernel_map_pages(struct page *page, int numpages, int enable)
local_irq_restore(flags);
return 0;
}

int hash__kernel_map_pages(struct page *page, int numpages, int enable)
{
return hash_debug_pagealloc_map_pages(page, numpages, enable);
}

#else /* CONFIG_DEBUG_PAGEALLOC */
int hash__kernel_map_pages(struct page *page, int numpages,
int enable)
Expand Down

0 comments on commit 43919f4

Please sign in to comment.