| .. | .. |
|---|
| 14 | 14 | * Routines used by ia64 machines with contiguous (or virtually contiguous) |
|---|
| 15 | 15 | * memory. |
|---|
| 16 | 16 | */ |
|---|
| 17 | | -#include <linux/bootmem.h> |
|---|
| 18 | 17 | #include <linux/efi.h> |
|---|
| 19 | 18 | #include <linux/memblock.h> |
|---|
| 20 | 19 | #include <linux/mm.h> |
|---|
| .. | .. |
|---|
| 22 | 21 | #include <linux/swap.h> |
|---|
| 23 | 22 | |
|---|
| 24 | 23 | #include <asm/meminit.h> |
|---|
| 25 | | -#include <asm/pgalloc.h> |
|---|
| 26 | | -#include <asm/pgtable.h> |
|---|
| 27 | 24 | #include <asm/sections.h> |
|---|
| 28 | 25 | #include <asm/mca.h> |
|---|
| 29 | 26 | |
|---|
| .. | .. |
|---|
| 82 | 79 | return __per_cpu_start + __per_cpu_offset[smp_processor_id()]; |
|---|
| 83 | 80 | } |
|---|
| 84 | 81 | |
|---|
| 85 | | -static inline void |
|---|
| 82 | +static inline __init void |
|---|
| 86 | 83 | alloc_per_cpu_data(void) |
|---|
| 87 | 84 | { |
|---|
| 88 | | - cpu_data = __alloc_bootmem(PERCPU_PAGE_SIZE * num_possible_cpus(), |
|---|
| 89 | | - PERCPU_PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); |
|---|
| 85 | + size_t size = PERCPU_PAGE_SIZE * num_possible_cpus(); |
|---|
| 86 | + |
|---|
| 87 | + cpu_data = memblock_alloc_from(size, PERCPU_PAGE_SIZE, |
|---|
| 88 | + __pa(MAX_DMA_ADDRESS)); |
|---|
| 89 | + if (!cpu_data) |
|---|
| 90 | + panic("%s: Failed to allocate %lu bytes align=%lx from=%lx\n", |
|---|
| 91 | + __func__, size, PERCPU_PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); |
|---|
| 90 | 92 | } |
|---|
| 91 | 93 | |
|---|
| 92 | 94 | /** |
|---|
| .. | .. |
|---|
| 104 | 106 | struct pcpu_group_info *gi; |
|---|
| 105 | 107 | unsigned int cpu; |
|---|
| 106 | 108 | ssize_t static_size, reserved_size, dyn_size; |
|---|
| 107 | | - int rc; |
|---|
| 108 | 109 | |
|---|
| 109 | 110 | ai = pcpu_alloc_alloc_info(1, num_possible_cpus()); |
|---|
| 110 | 111 | if (!ai) |
|---|
| .. | .. |
|---|
| 130 | 131 | ai->atom_size = PAGE_SIZE; |
|---|
| 131 | 132 | ai->alloc_size = PERCPU_PAGE_SIZE; |
|---|
| 132 | 133 | |
|---|
| 133 | | - rc = pcpu_setup_first_chunk(ai, __per_cpu_start + __per_cpu_offset[0]); |
|---|
| 134 | | - if (rc) |
|---|
| 135 | | - panic("failed to setup percpu area (err=%d)", rc); |
|---|
| 136 | | - |
|---|
| 134 | + pcpu_setup_first_chunk(ai, __per_cpu_start + __per_cpu_offset[0]); |
|---|
| 137 | 135 | pcpu_free_alloc_info(ai); |
|---|
| 138 | 136 | } |
|---|
| 139 | 137 | #else |
|---|
| .. | .. |
|---|
| 210 | 208 | printk("Virtual mem_map starts at 0x%p\n", mem_map); |
|---|
| 211 | 209 | } |
|---|
| 212 | 210 | #endif /* !CONFIG_VIRTUAL_MEM_MAP */ |
|---|
| 213 | | - free_area_init_nodes(max_zone_pfns); |
|---|
| 211 | + free_area_init(max_zone_pfns); |
|---|
| 214 | 212 | zero_page_memmap_ptr = virt_to_page(ia64_imva(empty_zero_page)); |
|---|
| 215 | 213 | } |
|---|