Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'microblaze-4.16-rc6' of git://git.monstr.eu/linux-2.6-microblaze

Pull microblaze fixes from Michal Simek:

- Use NO_BOOTMEM to fix boot issue

- Fix opt lib endian dependencies

* tag 'microblaze-4.16-rc6' of git://git.monstr.eu/linux-2.6-microblaze:
microblaze: switch to NO_BOOTMEM
microblaze: remove unused alloc_maybe_bootmem
microblaze: Setup dependencies for ASM optimized lib functions

+8 -64
+1
arch/microblaze/Kconfig
··· 24 24 select HAVE_FTRACE_MCOUNT_RECORD 25 25 select HAVE_FUNCTION_GRAPH_TRACER 26 26 select HAVE_FUNCTION_TRACER 27 + select NO_BOOTMEM 27 28 select HAVE_MEMBLOCK 28 29 select HAVE_MEMBLOCK_NODE_MAP 29 30 select HAVE_OPROFILE
+1 -1
arch/microblaze/Kconfig.platform
··· 8 8 9 9 config OPT_LIB_FUNCTION 10 10 bool "Optimalized lib function" 11 - depends on CPU_LITTLE_ENDIAN 12 11 default y 13 12 help 14 13 Allows turn on optimalized library function (memcpy and memmove). ··· 20 21 config OPT_LIB_ASM 21 22 bool "Optimalized lib function ASM" 22 23 depends on OPT_LIB_FUNCTION && (XILINX_MICROBLAZE0_USE_BARREL = 1) 24 + depends on CPU_BIG_ENDIAN 23 25 default n 24 26 help 25 27 Allows turn on optimalized library function (memcpy and memmove).
-1
arch/microblaze/include/asm/setup.h
··· 44 44 void machine_halt(void); 45 45 void machine_power_off(void); 46 46 47 - extern void *alloc_maybe_bootmem(size_t size, gfp_t mask); 48 47 extern void *zalloc_maybe_bootmem(size_t size, gfp_t mask); 49 48 50 49 # endif /* __ASSEMBLY__ */
-4
arch/microblaze/lib/fastcopy.S
··· 29 29 * between mem locations with size of xfer spec'd in bytes 30 30 */ 31 31 32 - #ifdef __MICROBLAZEEL__ 33 - #error Microblaze LE not support ASM optimized lib func. Disable OPT_LIB_ASM. 34 - #endif 35 - 36 32 #include <linux/linkage.h> 37 33 .text 38 34 .globl memcpy
+6 -58
arch/microblaze/mm/init.c
··· 32 32 #ifndef CONFIG_MMU 33 33 unsigned int __page_offset; 34 34 EXPORT_SYMBOL(__page_offset); 35 - 36 - #else 37 - static int init_bootmem_done; 38 35 #endif /* CONFIG_MMU */ 39 36 40 37 char *klimit = _end; ··· 114 117 115 118 void __init setup_memory(void) 116 119 { 117 - unsigned long map_size; 118 120 struct memblock_region *reg; 119 121 120 122 #ifndef CONFIG_MMU ··· 170 174 pr_info("%s: max_low_pfn: %#lx\n", __func__, max_low_pfn); 171 175 pr_info("%s: max_pfn: %#lx\n", __func__, max_pfn); 172 176 173 - /* 174 - * Find an area to use for the bootmem bitmap. 175 - * We look for the first area which is at least 176 - * 128kB in length (128kB is enough for a bitmap 177 - * for 4GB of memory, using 4kB pages), plus 1 page 178 - * (in case the address isn't page-aligned). 179 - */ 180 - map_size = init_bootmem_node(NODE_DATA(0), 181 - PFN_UP(TOPHYS((u32)klimit)), min_low_pfn, max_low_pfn); 182 - memblock_reserve(PFN_UP(TOPHYS((u32)klimit)) << PAGE_SHIFT, map_size); 183 - 184 177 /* Add active regions with valid PFNs */ 185 178 for_each_memblock(memory, reg) { 186 179 unsigned long start_pfn, end_pfn; ··· 181 196 &memblock.memory, 0); 182 197 } 183 198 184 - /* free bootmem is whole main memory */ 185 - free_bootmem_with_active_regions(0, max_low_pfn); 186 - 187 - /* reserve allocate blocks */ 188 - for_each_memblock(reserved, reg) { 189 - unsigned long top = reg->base + reg->size - 1; 190 - 191 - pr_debug("reserved - 0x%08x-0x%08x, %lx, %lx\n", 192 - (u32) reg->base, (u32) reg->size, top, 193 - memory_start + lowmem_size - 1); 194 - 195 - if (top <= (memory_start + lowmem_size - 1)) { 196 - reserve_bootmem(reg->base, reg->size, BOOTMEM_DEFAULT); 197 - } else if (reg->base < (memory_start + lowmem_size - 1)) { 198 - unsigned long trunc_size = memory_start + lowmem_size - 199 - reg->base; 200 - reserve_bootmem(reg->base, trunc_size, BOOTMEM_DEFAULT); 201 - } 202 - } 203 - 204 199 /* XXX need to clip this if using highmem? */ 205 200 sparse_memory_present_with_active_regions(0); 206 201 207 - #ifdef CONFIG_MMU 208 - init_bootmem_done = 1; 209 - #endif 210 202 paging_init(); 211 203 } 212 204 ··· 360 398 /* This is only called until mem_init is done. */ 361 399 void __init *early_get_page(void) 362 400 { 363 - void *p; 364 - if (init_bootmem_done) { 365 - p = alloc_bootmem_pages(PAGE_SIZE); 366 - } else { 367 - /* 368 - * Mem start + kernel_tlb -> here is limit 369 - * because of mem mapping from head.S 370 - */ 371 - p = __va(memblock_alloc_base(PAGE_SIZE, PAGE_SIZE, 372 - memory_start + kernel_tlb)); 373 - } 374 - return p; 401 + /* 402 + * Mem start + kernel_tlb -> here is limit 403 + * because of mem mapping from head.S 404 + */ 405 + return __va(memblock_alloc_base(PAGE_SIZE, PAGE_SIZE, 406 + memory_start + kernel_tlb)); 375 407 } 376 408 377 409 #endif /* CONFIG_MMU */ 378 - 379 - void * __ref alloc_maybe_bootmem(size_t size, gfp_t mask) 380 - { 381 - if (mem_init_done) 382 - return kmalloc(size, mask); 383 - else 384 - return alloc_bootmem(size); 385 - } 386 410 387 411 void * __ref zalloc_maybe_bootmem(size_t size, gfp_t mask) 388 412 {