u-boot/arch
Eugeniy Paltsev 3cf239394a ARC: cache: explicitly initialize "*_exists" variables
dcache_exists, icache_exists, slc_exists and ioc_exists global
variables in "arch/arc/lib/cache.c" remain uninitialized if
SoC doesn't have corresponding HW.

This happens because we use the next constructions for their
definition and initialization:
-------------------------->>---------------------
int ioc_exists __section(".data");

if (/* condition */)
		ioc_exists = 1;
-------------------------->>---------------------

That's quite a non-trivial issue as one may think of it.
The point is we intentionally put those variables in ".data" section
so they might survive relocation (remember we initilaize them very early
before relocation and continue to use after reloaction). While being
non-initialized and not explicitly put in .data section they would end-up
in ".bss" section which by definition is filled with zeroes.
But since we place those variables in .data section we need to care
about their proper initialization ourselves.

Also while at it we change their type to "bool" as more appropriate.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2017-12-11 11:36:22 +03:00
..
arc ARC: cache: explicitly initialize "*_exists" variables 2017-12-11 11:36:22 +03:00
arm Merge git://git.denx.de/u-boot-fsl-qoriq 2017-12-07 17:56:51 -05:00
m68k m68k: Use asm-generic/io.h 2017-10-02 21:52:20 -04:00
microblaze microblaze: Use asm-generic/io.h 2017-10-02 21:52:21 -04:00
mips MIPS: Break out of cache loops for unimplemented caches 2017-11-28 21:59:30 +01:00
nds32 nds32: dts: Support ftsdc010 DM. 2017-11-30 10:04:21 +08:00
nios2 nios2: 10m50: Add CPU pre-relocation in device tree 2017-11-17 10:51:24 -05:00
powerpc powerpc: mpc85xx: Implement CPU erratum A-007907 for secondary cores 2017-10-23 14:02:48 -07:00
sandbox Revert "sandbox: remove os_putc() and os_puts()" 2017-12-07 15:17:00 -05:00
sh sh: Use asm-generic/io.h 2017-10-02 21:52:21 -04:00
x86 x86: lib: Implement standalone __udivdi3 etc instead of libgcc ones 2017-11-30 13:50:17 +08:00
xtensa xtensa: Use asm-generic/io.h 2017-10-02 21:52:22 -04:00
.gitignore
Kconfig usb: net: migrate USB Ethernet adapters to Kconfig 2017-09-08 10:23:00 -04:00