mm-percpu-add-generic-pcpu_populate_pte-function.patch removed from -mm tree
The patch titled
Subject: mm: percpu: add generic pcpu_populate_pte() function
has been removed from the -mm tree. Its filename was
mm-percpu-add-generic-pcpu_populate_pte-function.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Kefeng Wang <[email protected]>
Subject: mm: percpu: add generic pcpu_populate_pte() function
With NEED_PER_CPU_PAGE_FIRST_CHUNK enabled, we need a function to populate pte, this patch adds a generic pcpu populate pte function, pcpu_populate_pte(), which is marked __weak and used on most architectures, but it is overridden on x86, which has its own implementation.
---
arch/powerpc/kernel/setup_64.c | 47 ------------------- arch/sparc/kernel/smp_64.c | 56 ---------------------- arch/x86/kernel/setup_percpu.c | 5 -- drivers/base/arch_numa.c | 51 -------------------- include/linux/percpu.h | 5 -- mm/percpu.c | 76 ++++++++++++++++++++++++++++--- 6 files changed, 78 insertions(+), 162 deletions(-)
arch/powerpc/kernel/setup_64.c renamed from arch/powerpc/kernel/setup_64.c~mm-percpu-add-generic-pcpu_populate_pte-function +1 -46
@@ -787,51 +787,6 @@ static __init int pcpu_cpu_to_node(int cunsigned long __per_cpu_offset[NR_CPUS ]__read_mostly ;EXPORT_SYMBOL (__per_cpu_offset); -static void __init pcpu_populate_pte (unsigned long addr) -{ -pgd_t *pgd =pgd_offset_k (addr); -p4d_t *p4d; -pud_t *pud; -pmd_t *pmd; - - p4d =p4d_offset (pgd, addr); -if (p4d_none (*p4d)) { -pud_t *new; - - new =memblock_alloc (PUD_TABLE_SIZE ,PUD_TABLE_SIZE ); -if (!new) - goto err_alloc; -p4d_populate (&init_mm, p4d, new); - } - - pud =pud_offset (p4d, addr); -if (pud_none (*pud)) { -pmd_t *new; - - new =memblock_alloc (PMD_TABLE_SIZE ,PMD_TABLE_SIZE ); -if (!new) - goto err_alloc; -pud_populate (&init_mm, pud, new); - } - - pmd =pmd_offset (pud, addr); -if (!pmd_present (*pmd)) { -pte_t *new; - - new =memblock_alloc (PTE_TABLE_SIZE ,PTE_TABLE_SIZE ); -if (!new) - goto err_alloc; -pmd_populate_kernel (&init_mm, pmd, new); - } - -return ; - -err_alloc: -panic ("%s: Failed to allocate %lu bytes align=%lx from=%lx\n" , - __func__,PAGE_SIZE ,PAGE_SIZE ,PAGE_SIZE ); -} - -void __init setup_per_cpu_areas (void ) {const size_t dyn_size =PERCPU_MODULE_RESERVE +PERCPU_DYNAMIC_RESERVE ;
@@ -860,7 +815,7 @@ void __init setup_per_cpu_areas(void) }if (rc <0 ) - rc =pcpu_page_first_chunk (0 , pcpu_cpu_to_node, pcpu_populate_pte); + rc =pcpu_page_first_chunk (0 , pcpu_cpu_to_node);if (rc <0 )panic ("cannot initialize percpu area (err=%d)" , rc);
arch/sparc/kernel/smp_64.c renamed from arch/sparc/kernel/smp_64.c~mm-percpu-add-generic-pcpu_populate_pte-function +1 -55
68 lines not on this page · raw message
arch/x86/kernel/setup_percpu.c renamed from arch/x86/kernel/setup_percpu.c~mm-percpu-add-generic-pcpu_populate_pte-function +2 -3
@@ -101,7 +101,7 @@ static int __init pcpu_cpu_to_node(int creturn early_cpu_to_node (cpu); } -static void __init pcpup_populate_pte (unsigned long addr) +void __init pcpu_populate_pte (unsigned long addr) {populate_extra_pte (addr); }
@@ -163,8 +163,7 @@ void __init setup_per_cpu_areas(void) }if (rc <0 ) rc =pcpu_page_first_chunk (PERCPU_FIRST_CHUNK_RESERVE , - pcpu_cpu_to_node, - pcpup_populate_pte); + pcpu_cpu_to_node);if (rc <0 )panic ("cannot initialize percpu area (err=%d)" , rc);
drivers/base/arch_numa.c renamed from drivers/base/arch_numa.c~mm-percpu-add-generic-pcpu_populate_pte-function +1 -50
69 lines not on this page · raw message
include/linux/percpu.h renamed from include/linux/percpu.h~mm-percpu-add-generic-pcpu_populate_pte-function +2 -3
@@ -95,7 +95,6 @@ extern const char * const pcpu_fc_names[extern enum pcpu_fc pcpu_chosen_fc;typedef int (pcpu_fc_cpu_to_node_fn_t )(int cpu); -typedef void (*pcpu_fc_populate_pte_fn_t )(unsigned long addr);typedef int (pcpu_fc_cpu_distance_fn_t )(unsigned int from,unsigned int to); extern struct pcpu_alloc_info * __init pcpu_alloc_alloc_info(int nr_groups,
@@ -113,9 +112,9 @@ extern int __init pcpu_embed_first_chunk#endif #ifdef CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK +void __init pcpu_populate_pte (unsigned long addr);extern int __init pcpu_page_first_chunk (size_t reserved_size, -pcpu_fc_cpu_to_node_fn_t cpu_to_nd_fn, -pcpu_fc_populate_pte_fn_t populate_pte_fn); +pcpu_fc_cpu_to_node_fn_t cpu_to_nd_fn);#endif extern void __percpu *__alloc_reserved_percpu (size_t size,size_t align)__alloc_size(1) ;
mm/percpu.c renamed from mm/percpu.c~mm-percpu-add-generic-pcpu_populate_pte-function +71 -5
98 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are