summaryrefslogtreecommitdiff
path: root/include/linux/compiler_types.h
AgeCommit message (Collapse)Author
2020-07-01compilers: Introduce options for forcing inlining on SPL/TPLTom Rini
There are cases where when we allow the compiler to decide about making inline decisions rather than forcing them it can save us space. For now, we keep the default values for inlining that we have had historically. Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2020-07-01compiler_types.h: Re-introduce CONFIG_OPTIMIZE_INLINING for U-BootTom Rini
In the Linux kernel, support for forcing inline functions to be made inline, rather than allowing the compiler to make its own choice has been removed. With respect to performance, modern GCC (and Clang) do a good job at deciding when to, or not to, inline code and there are no run-time requirements in Linux anymore. There is one downside to this, which is final binary size. On average in U-Boot removing this support grows SPL by almost 1 kilobyte. But there are cases where it shrinks the binary by making better inline choices than we had forced. Start by re-introducing CONFIG_OPTIMIZE_INLINING as a global which essentially reverts 889b3c1245de ("compiler: remove CONFIG_OPTIMIZE_INLINING entirely") from Linux. Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2020-07-01compiler*.h: sync include/linux/compiler*.h with Linux 5.7-rc5Tom Rini
Copy these from Linux v5.7-rc5 tag. This brings in some handy new attributes and is otherwise important to keep in sync. We drop the reference to smp_read_barrier_depends() as it is not relevant on the architectures we support at this time, based on where it's implemented in Linux today. We drop the call to kasan_check_read() as that is not relevant to U-Boot as well. Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Tom Rini <trini@konsulko.com>