[U-Boot] a couple questions about global_data

first, in include/asm-generic/global_data_flags.h:
* transitional header until we merge global_data.h
what exactly is "transitional" about that header file, what sort of merging is going to be done with respect to global_data.h?
and in the top-level README file:
"OTE: DECLARE_GLOBAL_DATA_PTR must be used with file-global scope, or current versions of GCC may "optimize" the code too much."
but in arch/arm/include/asm/arch-at91/clk.h, you have a number of static inlines of the form:
static inline unsigned long get_main_clk_rate(void) { DECLARE_GLOBAL_DATA_PTR; return gd->main_clk_rate_hz; }
and based on how gcc optimizes, i'm not convinced that that macro invocation is going to be in file-global scope, or am i just forgetting my C scoping rules?
rday
participants (1)
-
Robert P. J. Day