x86: update populate_extra_pte() and add populate_extra_pmd()
Impact: minor change to populate_extra_pte() and addition of pmd flavor
Update populate_extra_pte() to return pointer to the pte_t for the
specified address and add populate_extra_pmd() which only populates
till the pmd and returns pointer to the pmd entry for the address.
For 64bit, pud/pmd/pte fill functions are separated out from
set_pte_vaddr[_pud]() and used for set_pte_vaddr[_pud]() and
populate_extra_{pte|pmd}().
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
@@ -41,6 +41,11 @@ unsigned long __per_cpu_offset[NR_CPUS] __read_mostly = {
|
||||
};
|
||||
EXPORT_SYMBOL(__per_cpu_offset);
|
||||
|
||||
static void __init pcpu4k_populate_pte(unsigned long addr)
|
||||
{
|
||||
populate_extra_pte(addr);
|
||||
}
|
||||
|
||||
static inline void setup_percpu_segment(int cpu)
|
||||
{
|
||||
#ifdef CONFIG_X86_32
|
||||
@@ -104,7 +109,7 @@ void __init setup_per_cpu_areas(void)
|
||||
}
|
||||
}
|
||||
|
||||
pcpu_unit_size = pcpu_setup_static(populate_extra_pte, pages, size);
|
||||
pcpu_unit_size = pcpu_setup_static(pcpu4k_populate_pte, pages, size);
|
||||
|
||||
free_bootmem(__pa(pages), pages_size);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user