* [U-Boot] [PATCH] powerpc/mpc8xxx: Fix ddr build error
@ 2011-10-03 23:59 Becky Bruce
2011-10-04 1:40 ` Tabi Timur-B04825
2011-10-04 10:00 ` Marek Vasut
0 siblings, 2 replies; 5+ messages in thread
From: Becky Bruce @ 2011-10-03 23:59 UTC (permalink / raw)
To: u-boot
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(-)
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] powerpc/mpc8xxx: Fix ddr build error
2011-10-03 23:59 [U-Boot] [PATCH] powerpc/mpc8xxx: Fix ddr build error Becky Bruce
@ 2011-10-04 1:40 ` Tabi Timur-B04825
2011-10-04 15:53 ` Becky Bruce
2011-10-04 10:00 ` Marek Vasut
1 sibling, 1 reply; 5+ messages in thread
From: Tabi Timur-B04825 @ 2011-10-04 1:40 UTC (permalink / raw)
To: u-boot
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.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] powerpc/mpc8xxx: Fix ddr build error
2011-10-03 23:59 [U-Boot] [PATCH] powerpc/mpc8xxx: Fix ddr build error Becky Bruce
2011-10-04 1:40 ` Tabi Timur-B04825
@ 2011-10-04 10:00 ` Marek Vasut
2011-10-04 15:53 ` Becky Bruce
1 sibling, 1 reply; 5+ messages in thread
From: Marek Vasut @ 2011-10-04 10:00 UTC (permalink / raw)
To: u-boot
> 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
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] powerpc/mpc8xxx: Fix ddr build error
2011-10-04 1:40 ` Tabi Timur-B04825
@ 2011-10-04 15:53 ` Becky Bruce
0 siblings, 0 replies; 5+ messages in thread
From: Becky Bruce @ 2011-10-04 15:53 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] powerpc/mpc8xxx: Fix ddr build error
2011-10-04 10:00 ` Marek Vasut
@ 2011-10-04 15:53 ` Becky Bruce
0 siblings, 0 replies; 5+ messages in thread
From: Becky Bruce @ 2011-10-04 15:53 UTC (permalink / raw)
To: u-boot
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
>>
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-10-04 15:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-03 23:59 [U-Boot] [PATCH] powerpc/mpc8xxx: Fix ddr build error Becky Bruce
2011-10-04 1:40 ` Tabi Timur-B04825
2011-10-04 15:53 ` Becky Bruce
2011-10-04 10:00 ` Marek Vasut
2011-10-04 15:53 ` Becky Bruce
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.