lkml.org 
[lkml]   [2018]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] of/fdt: Fix #ifdef dependency of early flattree declarations
Hi Geert,

I love your patch! Yet something to improve:

[auto build test ERROR on robh/for-next]
[also build test ERROR on v4.15-rc6 next-20180103]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Geert-Uytterhoeven/of-fdt-Fix-ifdef-dependency-of-early-flattree-declarations/20180104-062259
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: cris-etrax-100lx_v2_defconfig (attached as .config)
compiler: cris-linux-gcc (GCC) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=cris

All errors (new ones prefixed by >>):

arch/cris/kernel/setup.c: In function 'setup_arch':
>> arch/cris/kernel/setup.c:151:2: error: implicit declaration of function 'unflatten_and_copy_device_tree' [-Werror=implicit-function-declaration]
unflatten_and_copy_device_tree();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

vim +/unflatten_and_copy_device_tree +151 arch/cris/kernel/setup.c

a9f75ac5 Rabin Vincent 2015-02-08 73
^1da177e Linus Torvalds 2005-04-16 74 /* register an initial console printing routine for printk's */
^1da177e Linus Torvalds 2005-04-16 75
^1da177e Linus Torvalds 2005-04-16 76 init_etrax_debug();
^1da177e Linus Torvalds 2005-04-16 77
^1da177e Linus Torvalds 2005-04-16 78 /* we should really poll for DRAM size! */
^1da177e Linus Torvalds 2005-04-16 79
^1da177e Linus Torvalds 2005-04-16 80 high_memory = &dram_end;
^1da177e Linus Torvalds 2005-04-16 81
^1da177e Linus Torvalds 2005-04-16 82 if(romfs_in_flash || !romfs_length) {
^1da177e Linus Torvalds 2005-04-16 83 /* if we have the romfs in flash, or if there is no rom filesystem,
^1da177e Linus Torvalds 2005-04-16 84 * our free area starts directly after the BSS
^1da177e Linus Torvalds 2005-04-16 85 */
^1da177e Linus Torvalds 2005-04-16 86 memory_start = (unsigned long) &_end;
^1da177e Linus Torvalds 2005-04-16 87 } else {
^1da177e Linus Torvalds 2005-04-16 88 /* otherwise the free area starts after the ROM filesystem */
^1da177e Linus Torvalds 2005-04-16 89 printk("ROM fs in RAM, size %lu bytes\n", romfs_length);
^1da177e Linus Torvalds 2005-04-16 90 memory_start = romfs_start + romfs_length;
^1da177e Linus Torvalds 2005-04-16 91 }
^1da177e Linus Torvalds 2005-04-16 92
^1da177e Linus Torvalds 2005-04-16 93 /* process 1's initial memory region is the kernel code/data */
^1da177e Linus Torvalds 2005-04-16 94
^1da177e Linus Torvalds 2005-04-16 95 init_mm.start_code = (unsigned long) &text_start;
^1da177e Linus Torvalds 2005-04-16 96 init_mm.end_code = (unsigned long) &_etext;
^1da177e Linus Torvalds 2005-04-16 97 init_mm.end_data = (unsigned long) &_edata;
^1da177e Linus Torvalds 2005-04-16 98 init_mm.brk = (unsigned long) &_end;
^1da177e Linus Torvalds 2005-04-16 99
^1da177e Linus Torvalds 2005-04-16 100 /* min_low_pfn points to the start of DRAM, start_pfn points
^1da177e Linus Torvalds 2005-04-16 101 * to the first DRAM pages after the kernel, and max_low_pfn
^1da177e Linus Torvalds 2005-04-16 102 * to the end of DRAM.
^1da177e Linus Torvalds 2005-04-16 103 */
^1da177e Linus Torvalds 2005-04-16 104
^1da177e Linus Torvalds 2005-04-16 105 /*
^1da177e Linus Torvalds 2005-04-16 106 * partially used pages are not usable - thus
^1da177e Linus Torvalds 2005-04-16 107 * we are rounding upwards:
^1da177e Linus Torvalds 2005-04-16 108 */
^1da177e Linus Torvalds 2005-04-16 109
^1da177e Linus Torvalds 2005-04-16 110 start_pfn = PFN_UP(memory_start); /* usually c0000000 + kernel + romfs */
^1da177e Linus Torvalds 2005-04-16 111 max_pfn = PFN_DOWN((unsigned long)high_memory); /* usually c0000000 + dram size */
^1da177e Linus Torvalds 2005-04-16 112
^1da177e Linus Torvalds 2005-04-16 113 /*
^1da177e Linus Torvalds 2005-04-16 114 * Initialize the boot-time allocator (start, end)
^1da177e Linus Torvalds 2005-04-16 115 *
^1da177e Linus Torvalds 2005-04-16 116 * We give it access to all our DRAM, but we could as well just have
^1da177e Linus Torvalds 2005-04-16 117 * given it a small slice. No point in doing that though, unless we
^1da177e Linus Torvalds 2005-04-16 118 * have non-contiguous memory and want the boot-stuff to be in, say,
^1da177e Linus Torvalds 2005-04-16 119 * the smallest area.
^1da177e Linus Torvalds 2005-04-16 120 *
^1da177e Linus Torvalds 2005-04-16 121 * It will put a bitmap of the allocated pages in the beginning
^1da177e Linus Torvalds 2005-04-16 122 * of the range we give it, but it won't mark the bitmaps pages
^1da177e Linus Torvalds 2005-04-16 123 * as reserved. We have to do that ourselves below.
^1da177e Linus Torvalds 2005-04-16 124 *
^1da177e Linus Torvalds 2005-04-16 125 * We need to use init_bootmem_node instead of init_bootmem
^1da177e Linus Torvalds 2005-04-16 126 * because our map starts at a quite high address (min_low_pfn).
^1da177e Linus Torvalds 2005-04-16 127 */
^1da177e Linus Torvalds 2005-04-16 128
^1da177e Linus Torvalds 2005-04-16 129 max_low_pfn = max_pfn;
^1da177e Linus Torvalds 2005-04-16 130 min_low_pfn = PAGE_OFFSET >> PAGE_SHIFT;
^1da177e Linus Torvalds 2005-04-16 131
^1da177e Linus Torvalds 2005-04-16 132 bootmap_size = init_bootmem_node(NODE_DATA(0), start_pfn,
^1da177e Linus Torvalds 2005-04-16 133 min_low_pfn,
^1da177e Linus Torvalds 2005-04-16 134 max_low_pfn);
^1da177e Linus Torvalds 2005-04-16 135
^1da177e Linus Torvalds 2005-04-16 136 /* And free all memory not belonging to the kernel (addr, size) */
^1da177e Linus Torvalds 2005-04-16 137
^1da177e Linus Torvalds 2005-04-16 138 free_bootmem(PFN_PHYS(start_pfn), PFN_PHYS(max_pfn - start_pfn));
^1da177e Linus Torvalds 2005-04-16 139
^1da177e Linus Torvalds 2005-04-16 140 /*
^1da177e Linus Torvalds 2005-04-16 141 * Reserve the bootmem bitmap itself as well. We do this in two
^1da177e Linus Torvalds 2005-04-16 142 * steps (first step was init_bootmem()) because this catches
^1da177e Linus Torvalds 2005-04-16 143 * the (very unlikely) case of us accidentally initializing the
^1da177e Linus Torvalds 2005-04-16 144 * bootmem allocator with an invalid RAM area.
^1da177e Linus Torvalds 2005-04-16 145 *
^1da177e Linus Torvalds 2005-04-16 146 * Arguments are start, size
^1da177e Linus Torvalds 2005-04-16 147 */
^1da177e Linus Torvalds 2005-04-16 148
72a7fe39 Bernhard Walle 2008-02-07 149 reserve_bootmem(PFN_PHYS(start_pfn), bootmap_size, BOOTMEM_DEFAULT);
^1da177e Linus Torvalds 2005-04-16 150
a9f75ac5 Rabin Vincent 2015-02-08 @151 unflatten_and_copy_device_tree();
a9f75ac5 Rabin Vincent 2015-02-08 152
^1da177e Linus Torvalds 2005-04-16 153 /* paging_init() sets up the MMU and marks all pages as reserved */
^1da177e Linus Torvalds 2005-04-16 154
^1da177e Linus Torvalds 2005-04-16 155 paging_init();
^1da177e Linus Torvalds 2005-04-16 156
7cf32cad Mikael Starvik 2005-07-27 157 *cmdline_p = cris_command_line;
^1da177e Linus Torvalds 2005-04-16 158

:::::: The code at line 151 was first introduced by commit
:::::: a9f75ac5a24cb94c2373daa3d73f90d22cf5d94b CRISv32: add device tree support

:::::: TO: Rabin Vincent <rabin@rab.in>
:::::: CC: Jesper Nilsson <jespern@axis.com>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2018-01-04 02:15    [W:0.048 / U:1.364 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site