Message ID | 1317686348215-git-send-email-beckyb@kernel.crashing.org |
---|---|
State | Superseded |
Headers | show |
On Mon, Oct 3, 2011 at 6:59 PM, Becky Bruce <beckyb@kernel.crashing.org> wrote: > -#ifdef DEBUG > const char *step_string_tbl[] = { > "STEP_GET_SPD", > "STEP_COMPUTE_DIMM_PARMS", > @@ -153,7 +152,6 @@ const char * step_to_string(unsigned int step) { > > return step_string_tbl[s]; > } > -#endif How big is this array? It looks like it's going to add a bunch of data to the u-boot image that will typically never be used, since DEBUG is usually not defined. There should be an easy way to keep this array defined only when DEBUG is defined. > -- > 1.5.6.5 Your version of git is outdated, BTW.
> Commit ID 60ce53cf9f40 > > "GCC4.6: Convert various empty macros to inline functions" > > changed the "debug" macro to an inline function. This causes > the mpc8xxx ddr code to stop building because there is a debug() > statement that references symbols that only exist when DEBUG is > defined. This patch makes those symbols unconditional. > > Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org> NAK. This approach increases code size. The patch you mentioned is going to be reverted until fixed. Better fix is welcome though! Cheers > --- > arch/powerpc/cpu/mpc8xxx/ddr/main.c | 2 -- > 1 files changed, 0 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/main.c > b/arch/powerpc/cpu/mpc8xxx/ddr/main.c index 249fd7d..eb70535 100644 > --- a/arch/powerpc/cpu/mpc8xxx/ddr/main.c > +++ b/arch/powerpc/cpu/mpc8xxx/ddr/main.c > @@ -132,7 +132,6 @@ void fsl_ddr_get_spd(generic_spd_eeprom_t > *ctrl_dimms_spd, * | interleaving > */ > > -#ifdef DEBUG > const char *step_string_tbl[] = { > "STEP_GET_SPD", > "STEP_COMPUTE_DIMM_PARMS", > @@ -153,7 +152,6 @@ const char * step_to_string(unsigned int step) { > > return step_string_tbl[s]; > } > -#endif > > int step_assign_addresses(fsl_ddr_info_t *pinfo, > unsigned int dbw_cap_adj[], > -- > 1.5.6.5 > >
On Oct 3, 2011, at 8:40 PM, Tabi Timur-B04825 wrote: > On Mon, Oct 3, 2011 at 6:59 PM, Becky Bruce <beckyb@kernel.crashing.org> wrote: > >> -#ifdef DEBUG >> const char *step_string_tbl[] = { >> "STEP_GET_SPD", >> "STEP_COMPUTE_DIMM_PARMS", >> @@ -153,7 +152,6 @@ const char * step_to_string(unsigned int step) { >> >> return step_string_tbl[s]; >> } >> -#endif > > How big is this array? It looks like it's going to add a bunch of > data to the u-boot image that will typically never be used, since > DEBUG is usually not defined. > > There should be an easy way to keep this array defined only when DEBUG > is defined. It's got like 7 or 8 members so it's not that big and the code that gets enabled is < 5 lines. I thought about just yanking out the debug() that uses this stuff but assumed somebody actually needed it. Feel free to publish a different patch if you want a different fix. -B
On Oct 4, 2011, at 5:00 AM, Marek Vasut wrote: >> Commit ID 60ce53cf9f40 >> >> "GCC4.6: Convert various empty macros to inline functions" >> >> changed the "debug" macro to an inline function. This causes >> the mpc8xxx ddr code to stop building because there is a debug() >> statement that references symbols that only exist when DEBUG is >> defined. This patch makes those symbols unconditional. >> >> Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org> > > NAK. This approach increases code size. The patch you mentioned is going to be reverted until fixed. > > Better fix is welcome though! Like I said to Timur, I just need stuff to build, and this increases code size only a tiny bit..... I'd prefer the revert, though. -B > > Cheers > >> --- >> arch/powerpc/cpu/mpc8xxx/ddr/main.c | 2 -- >> 1 files changed, 0 insertions(+), 2 deletions(-) >> >> diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/main.c >> b/arch/powerpc/cpu/mpc8xxx/ddr/main.c index 249fd7d..eb70535 100644 >> --- a/arch/powerpc/cpu/mpc8xxx/ddr/main.c >> +++ b/arch/powerpc/cpu/mpc8xxx/ddr/main.c >> @@ -132,7 +132,6 @@ void fsl_ddr_get_spd(generic_spd_eeprom_t >> *ctrl_dimms_spd, * | interleaving >> */ >> >> -#ifdef DEBUG >> const char *step_string_tbl[] = { >> "STEP_GET_SPD", >> "STEP_COMPUTE_DIMM_PARMS", >> @@ -153,7 +152,6 @@ const char * step_to_string(unsigned int step) { >> >> return step_string_tbl[s]; >> } >> -#endif >> >> int step_assign_addresses(fsl_ddr_info_t *pinfo, >> unsigned int dbw_cap_adj[], >> -- >> 1.5.6.5 >> >>
diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/main.c b/arch/powerpc/cpu/mpc8xxx/ddr/main.c index 249fd7d..eb70535 100644 --- a/arch/powerpc/cpu/mpc8xxx/ddr/main.c +++ b/arch/powerpc/cpu/mpc8xxx/ddr/main.c @@ -132,7 +132,6 @@ void fsl_ddr_get_spd(generic_spd_eeprom_t *ctrl_dimms_spd, * | interleaving */ -#ifdef DEBUG const char *step_string_tbl[] = { "STEP_GET_SPD", "STEP_COMPUTE_DIMM_PARMS", @@ -153,7 +152,6 @@ const char * step_to_string(unsigned int step) { return step_string_tbl[s]; } -#endif int step_assign_addresses(fsl_ddr_info_t *pinfo, unsigned int dbw_cap_adj[],
Commit ID 60ce53cf9f40 "GCC4.6: Convert various empty macros to inline functions" changed the "debug" macro to an inline function. This causes the mpc8xxx ddr code to stop building because there is a debug() statement that references symbols that only exist when DEBUG is defined. This patch makes those symbols unconditional. Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org> --- arch/powerpc/cpu/mpc8xxx/ddr/main.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)