mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 21:40:54 +07:00
22c8ca2ac2
32bit kmap mapping needs pages to be used for low to high. At this point those pages are still from pgt_buf_* from BRK, so it is ok now. But we want to move early_ioremap_page_table_range_init() out of init_memory_mapping() and only call it one time later, that will make page_table_range_init/page_table_kmap_check/alloc_low_page to use memblock to get page. memblock allocation for pages are from high to low. So will get panic from page_table_kmap_check() that has BUG_ON to do ordering checking. This patch add alloc_low_pages to make it possible to allocate serveral pages at first, and hand out pages one by one from low to high. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Link: http://lkml.kernel.org/r/1353123563-3103-28-git-send-email-yinghai@kernel.org Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
11 lines
205 B
C
11 lines
205 B
C
#ifndef __X86_MM_INTERNAL_H
|
|
#define __X86_MM_INTERNAL_H
|
|
|
|
void *alloc_low_pages(unsigned int num);
|
|
static inline void *alloc_low_page(void)
|
|
{
|
|
return alloc_low_pages(1);
|
|
}
|
|
|
|
#endif /* __X86_MM_INTERNAL_H */
|