mirror of https://github.com/torvalds/linux.git
CONFIG_OF can be set by a randconfig or by a user -- without setting the
early flattree option (OF_EARLY_FLATTREE). This causes build errors.
However, if randconfig or a user sets USE_OF in the Xtensa config,
the right kconfig symbols are set to fix the build.
Fixes these build errors:
../arch/xtensa/kernel/setup.c:67:19: error: ‘__dtb_start’ undeclared here (not in a function); did you mean ‘dtb_start’?
67 | void *dtb_start = __dtb_start;
| ^~~~~~~~~~~
../arch/xtensa/kernel/setup.c: In function 'xtensa_dt_io_area':
../arch/xtensa/kernel/setup.c:201:14: error: implicit declaration of function 'of_flat_dt_is_compatible'; did you mean 'of_machine_is_compatible'? [-Werror=implicit-function-declaration]
201 | if (!of_flat_dt_is_compatible(node, "simple-bus"))
../arch/xtensa/kernel/setup.c:204:18: error: implicit declaration of function 'of_get_flat_dt_prop' [-Werror=implicit-function-declaration]
204 | ranges = of_get_flat_dt_prop(node, "ranges", &len);
../arch/xtensa/kernel/setup.c:204:16: error: assignment to 'const __be32 *' {aka 'const unsigned int *'} from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
204 | ranges = of_get_flat_dt_prop(node, "ranges", &len);
| ^
../arch/xtensa/kernel/setup.c: In function 'early_init_devtree':
../arch/xtensa/kernel/setup.c:228:9: error: implicit declaration of function 'early_init_dt_scan'; did you mean 'early_init_devtree'? [-Werror=implicit-function-declaration]
228 | early_init_dt_scan(params);
../arch/xtensa/kernel/setup.c:229:9: error: implicit declaration of function 'of_scan_flat_dt' [-Werror=implicit-function-declaration]
229 | of_scan_flat_dt(xtensa_dt_io_area, NULL);
xtensa-elf-ld: arch/xtensa/mm/mmu.o:(.text+0x0): undefined reference to `xtensa_kio_paddr'
Fixes:
|
||
|---|---|---|
| .. | ||
| Kbuild | ||
| asm-offsets.h | ||
| asm-uaccess.h | ||
| asmmacro.h | ||
| atomic.h | ||
| barrier.h | ||
| bitops.h | ||
| bootparam.h | ||
| bugs.h | ||
| cache.h | ||
| cacheasm.h | ||
| cacheflush.h | ||
| checksum.h | ||
| cmpxchg.h | ||
| coprocessor.h | ||
| core.h | ||
| current.h | ||
| delay.h | ||
| dma.h | ||
| elf.h | ||
| fixmap.h | ||
| flat.h | ||
| ftrace.h | ||
| futex.h | ||
| highmem.h | ||
| hw_breakpoint.h | ||
| initialize_mmu.h | ||
| io.h | ||
| irq.h | ||
| irqflags.h | ||
| jump_label.h | ||
| kasan.h | ||
| kmem_layout.h | ||
| linkage.h | ||
| mmu.h | ||
| mmu_context.h | ||
| mxregs.h | ||
| nommu_context.h | ||
| page.h | ||
| pci-bridge.h | ||
| pci.h | ||
| perf_event.h | ||
| pgalloc.h | ||
| pgtable.h | ||
| platform.h | ||
| processor.h | ||
| ptrace.h | ||
| regs.h | ||
| seccomp.h | ||
| serial.h | ||
| shmparam.h | ||
| signal.h | ||
| smp.h | ||
| spinlock.h | ||
| spinlock_types.h | ||
| stackprotector.h | ||
| stacktrace.h | ||
| string.h | ||
| switch_to.h | ||
| syscall.h | ||
| sysmem.h | ||
| thread_info.h | ||
| timex.h | ||
| tlb.h | ||
| tlbflush.h | ||
| traps.h | ||
| uaccess.h | ||
| ucontext.h | ||
| unistd.h | ||
| vectors.h | ||
| vermagic.h | ||
| vmalloc.h | ||