Loading arch/alpha/mm/init.c +13 −7 Original line number Original line Diff line number Diff line Loading @@ -189,9 +189,21 @@ callback_init(void * kernel_end) if (alpha_using_srm) { if (alpha_using_srm) { static struct vm_struct console_remap_vm; static struct vm_struct console_remap_vm; unsigned long vaddr = VMALLOC_START; unsigned long nr_pages = 0; unsigned long vaddr; unsigned long i, j; unsigned long i, j; /* calculate needed size */ for (i = 0; i < crb->map_entries; ++i) nr_pages += crb->map[i].count; /* register the vm area */ console_remap_vm.flags = VM_ALLOC; console_remap_vm.size = nr_pages << PAGE_SHIFT; vm_area_register_early(&console_remap_vm, PAGE_SIZE); vaddr = (unsigned long)consle_remap_vm.addr; /* Set up the third level PTEs and update the virtual /* Set up the third level PTEs and update the virtual addresses of the CRB entries. */ addresses of the CRB entries. */ for (i = 0; i < crb->map_entries; ++i) { for (i = 0; i < crb->map_entries; ++i) { Loading @@ -213,12 +225,6 @@ callback_init(void * kernel_end) vaddr += PAGE_SIZE; vaddr += PAGE_SIZE; } } } } /* Let vmalloc know that we've allocated some space. */ console_remap_vm.flags = VM_ALLOC; console_remap_vm.addr = (void *) VMALLOC_START; console_remap_vm.size = vaddr - VMALLOC_START; vmlist = &console_remap_vm; } } callback_init_done = 1; callback_init_done = 1; Loading arch/avr32/Kconfig +1 −1 Original line number Original line Diff line number Diff line Loading @@ -181,7 +181,7 @@ source "kernel/Kconfig.preempt" config QUICKLIST config QUICKLIST def_bool y def_bool y config HAVE_ARCH_BOOTMEM_NODE config HAVE_ARCH_BOOTMEM def_bool n def_bool n config ARCH_HAVE_MEMORY_PRESENT config ARCH_HAVE_MEMORY_PRESENT Loading arch/x86/Kconfig +4 −1 Original line number Original line Diff line number Diff line Loading @@ -135,6 +135,9 @@ config ARCH_HAS_CACHE_LINE_SIZE config HAVE_SETUP_PER_CPU_AREA config HAVE_SETUP_PER_CPU_AREA def_bool y def_bool y config HAVE_DYNAMIC_PER_CPU_AREA def_bool y config HAVE_CPUMASK_OF_CPU_MAP config HAVE_CPUMASK_OF_CPU_MAP def_bool X86_64_SMP def_bool X86_64_SMP Loading Loading @@ -1122,7 +1125,7 @@ config NODES_SHIFT Specify the maximum number of NUMA Nodes available on the target Specify the maximum number of NUMA Nodes available on the target system. Increases memory reserved to accomodate various tables. system. Increases memory reserved to accomodate various tables. config HAVE_ARCH_BOOTMEM_NODE config HAVE_ARCH_BOOTMEM def_bool y def_bool y depends on X86_32 && NUMA depends on X86_32 && NUMA Loading arch/x86/include/asm/mmzone_32.h +5 −38 Original line number Original line Diff line number Diff line Loading @@ -91,45 +91,12 @@ static inline int pfn_valid(int pfn) #endif /* CONFIG_DISCONTIGMEM */ #endif /* CONFIG_DISCONTIGMEM */ #ifdef CONFIG_NEED_MULTIPLE_NODES #ifdef CONFIG_NEED_MULTIPLE_NODES /* always use node 0 for bootmem on this numa platform */ /* #define alloc_bootmem_core(__bdata, size, align, goal, limit) \ * Following are macros that are specific to this numa platform. */ #define reserve_bootmem(addr, size, flags) \ reserve_bootmem_node(NODE_DATA(0), (addr), (size), (flags)) #define alloc_bootmem(x) \ __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) #define alloc_bootmem_nopanic(x) \ __alloc_bootmem_node_nopanic(NODE_DATA(0), (x), SMP_CACHE_BYTES, \ __pa(MAX_DMA_ADDRESS)) #define alloc_bootmem_low(x) \ __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, 0) #define alloc_bootmem_pages(x) \ __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) #define alloc_bootmem_pages_nopanic(x) \ __alloc_bootmem_node_nopanic(NODE_DATA(0), (x), PAGE_SIZE, \ __pa(MAX_DMA_ADDRESS)) #define alloc_bootmem_low_pages(x) \ __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, 0) #define alloc_bootmem_node(pgdat, x) \ ({ \ struct pglist_data __maybe_unused \ *__alloc_bootmem_node__pgdat = (pgdat); \ __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, \ __pa(MAX_DMA_ADDRESS)); \ }) #define alloc_bootmem_pages_node(pgdat, x) \ ({ \ struct pglist_data __maybe_unused \ *__alloc_bootmem_node__pgdat = (pgdat); \ __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, \ __pa(MAX_DMA_ADDRESS)); \ }) #define alloc_bootmem_low_pages_node(pgdat, x) \ ({ \ ({ \ struct pglist_data __maybe_unused \ bootmem_data_t __maybe_unused * __abm_bdata_dummy = (__bdata); \ *__alloc_bootmem_node__pgdat = (pgdat); \ __alloc_bootmem_core(NODE_DATA(0)->bdata, \ __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, 0); \ (size), (align), (goal), (limit)); \ }) }) #endif /* CONFIG_NEED_MULTIPLE_NODES */ #endif /* CONFIG_NEED_MULTIPLE_NODES */ Loading arch/x86/include/asm/percpu.h +8 −0 Original line number Original line Diff line number Diff line Loading @@ -43,6 +43,14 @@ #else /* ...!ASSEMBLY */ #else /* ...!ASSEMBLY */ #include <linux/stringify.h> #include <linux/stringify.h> #include <asm/sections.h> #define __addr_to_pcpu_ptr(addr) \ (void *)((unsigned long)(addr) - (unsigned long)pcpu_base_addr \ + (unsigned long)__per_cpu_start) #define __pcpu_ptr_to_addr(ptr) \ (void *)((unsigned long)(ptr) + (unsigned long)pcpu_base_addr \ - (unsigned long)__per_cpu_start) #ifdef CONFIG_SMP #ifdef CONFIG_SMP #define __percpu_arg(x) "%%"__stringify(__percpu_seg)":%P" #x #define __percpu_arg(x) "%%"__stringify(__percpu_seg)":%P" #x Loading Loading
arch/alpha/mm/init.c +13 −7 Original line number Original line Diff line number Diff line Loading @@ -189,9 +189,21 @@ callback_init(void * kernel_end) if (alpha_using_srm) { if (alpha_using_srm) { static struct vm_struct console_remap_vm; static struct vm_struct console_remap_vm; unsigned long vaddr = VMALLOC_START; unsigned long nr_pages = 0; unsigned long vaddr; unsigned long i, j; unsigned long i, j; /* calculate needed size */ for (i = 0; i < crb->map_entries; ++i) nr_pages += crb->map[i].count; /* register the vm area */ console_remap_vm.flags = VM_ALLOC; console_remap_vm.size = nr_pages << PAGE_SHIFT; vm_area_register_early(&console_remap_vm, PAGE_SIZE); vaddr = (unsigned long)consle_remap_vm.addr; /* Set up the third level PTEs and update the virtual /* Set up the third level PTEs and update the virtual addresses of the CRB entries. */ addresses of the CRB entries. */ for (i = 0; i < crb->map_entries; ++i) { for (i = 0; i < crb->map_entries; ++i) { Loading @@ -213,12 +225,6 @@ callback_init(void * kernel_end) vaddr += PAGE_SIZE; vaddr += PAGE_SIZE; } } } } /* Let vmalloc know that we've allocated some space. */ console_remap_vm.flags = VM_ALLOC; console_remap_vm.addr = (void *) VMALLOC_START; console_remap_vm.size = vaddr - VMALLOC_START; vmlist = &console_remap_vm; } } callback_init_done = 1; callback_init_done = 1; Loading
arch/avr32/Kconfig +1 −1 Original line number Original line Diff line number Diff line Loading @@ -181,7 +181,7 @@ source "kernel/Kconfig.preempt" config QUICKLIST config QUICKLIST def_bool y def_bool y config HAVE_ARCH_BOOTMEM_NODE config HAVE_ARCH_BOOTMEM def_bool n def_bool n config ARCH_HAVE_MEMORY_PRESENT config ARCH_HAVE_MEMORY_PRESENT Loading
arch/x86/Kconfig +4 −1 Original line number Original line Diff line number Diff line Loading @@ -135,6 +135,9 @@ config ARCH_HAS_CACHE_LINE_SIZE config HAVE_SETUP_PER_CPU_AREA config HAVE_SETUP_PER_CPU_AREA def_bool y def_bool y config HAVE_DYNAMIC_PER_CPU_AREA def_bool y config HAVE_CPUMASK_OF_CPU_MAP config HAVE_CPUMASK_OF_CPU_MAP def_bool X86_64_SMP def_bool X86_64_SMP Loading Loading @@ -1122,7 +1125,7 @@ config NODES_SHIFT Specify the maximum number of NUMA Nodes available on the target Specify the maximum number of NUMA Nodes available on the target system. Increases memory reserved to accomodate various tables. system. Increases memory reserved to accomodate various tables. config HAVE_ARCH_BOOTMEM_NODE config HAVE_ARCH_BOOTMEM def_bool y def_bool y depends on X86_32 && NUMA depends on X86_32 && NUMA Loading
arch/x86/include/asm/mmzone_32.h +5 −38 Original line number Original line Diff line number Diff line Loading @@ -91,45 +91,12 @@ static inline int pfn_valid(int pfn) #endif /* CONFIG_DISCONTIGMEM */ #endif /* CONFIG_DISCONTIGMEM */ #ifdef CONFIG_NEED_MULTIPLE_NODES #ifdef CONFIG_NEED_MULTIPLE_NODES /* always use node 0 for bootmem on this numa platform */ /* #define alloc_bootmem_core(__bdata, size, align, goal, limit) \ * Following are macros that are specific to this numa platform. */ #define reserve_bootmem(addr, size, flags) \ reserve_bootmem_node(NODE_DATA(0), (addr), (size), (flags)) #define alloc_bootmem(x) \ __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) #define alloc_bootmem_nopanic(x) \ __alloc_bootmem_node_nopanic(NODE_DATA(0), (x), SMP_CACHE_BYTES, \ __pa(MAX_DMA_ADDRESS)) #define alloc_bootmem_low(x) \ __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, 0) #define alloc_bootmem_pages(x) \ __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) #define alloc_bootmem_pages_nopanic(x) \ __alloc_bootmem_node_nopanic(NODE_DATA(0), (x), PAGE_SIZE, \ __pa(MAX_DMA_ADDRESS)) #define alloc_bootmem_low_pages(x) \ __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, 0) #define alloc_bootmem_node(pgdat, x) \ ({ \ struct pglist_data __maybe_unused \ *__alloc_bootmem_node__pgdat = (pgdat); \ __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, \ __pa(MAX_DMA_ADDRESS)); \ }) #define alloc_bootmem_pages_node(pgdat, x) \ ({ \ struct pglist_data __maybe_unused \ *__alloc_bootmem_node__pgdat = (pgdat); \ __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, \ __pa(MAX_DMA_ADDRESS)); \ }) #define alloc_bootmem_low_pages_node(pgdat, x) \ ({ \ ({ \ struct pglist_data __maybe_unused \ bootmem_data_t __maybe_unused * __abm_bdata_dummy = (__bdata); \ *__alloc_bootmem_node__pgdat = (pgdat); \ __alloc_bootmem_core(NODE_DATA(0)->bdata, \ __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, 0); \ (size), (align), (goal), (limit)); \ }) }) #endif /* CONFIG_NEED_MULTIPLE_NODES */ #endif /* CONFIG_NEED_MULTIPLE_NODES */ Loading
arch/x86/include/asm/percpu.h +8 −0 Original line number Original line Diff line number Diff line Loading @@ -43,6 +43,14 @@ #else /* ...!ASSEMBLY */ #else /* ...!ASSEMBLY */ #include <linux/stringify.h> #include <linux/stringify.h> #include <asm/sections.h> #define __addr_to_pcpu_ptr(addr) \ (void *)((unsigned long)(addr) - (unsigned long)pcpu_base_addr \ + (unsigned long)__per_cpu_start) #define __pcpu_ptr_to_addr(ptr) \ (void *)((unsigned long)(ptr) + (unsigned long)pcpu_base_addr \ - (unsigned long)__per_cpu_start) #ifdef CONFIG_SMP #ifdef CONFIG_SMP #define __percpu_arg(x) "%%"__stringify(__percpu_seg)":%P" #x #define __percpu_arg(x) "%%"__stringify(__percpu_seg)":%P" #x Loading