* [U-Boot] [PATCH] m68k: fix broken buildman m68k
@ 2016-04-11 22:30 Angelo Dureghello
2016-04-11 22:52 ` Marek Vasut
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Angelo Dureghello @ 2016-04-11 22:30 UTC (permalink / raw)
To: u-boot
fix 19/48 broken board compilations, due to a now too smal 16-bit
relative jump
Signed-off-by: Angelo Dureghello <angelo@sysam.it>
---
arch/m68k/cpu/mcf523x/start.S | 8 ++++++--
arch/m68k/cpu/mcf52x2/start.S | 8 ++++++--
arch/m68k/cpu/mcf532x/start.S | 8 ++++++--
arch/m68k/cpu/mcf5445x/start.S | 8 ++++++--
4 files changed, 24 insertions(+), 8 deletions(-)
diff --git a/arch/m68k/cpu/mcf523x/start.S b/arch/m68k/cpu/mcf523x/start.S
index 8a23e72..1702f98 100644
--- a/arch/m68k/cpu/mcf523x/start.S
+++ b/arch/m68k/cpu/mcf523x/start.S
@@ -141,8 +141,12 @@ _start:
move.l #__got_start, %a5 /* put relocation table address to a5 */
- bsr cpu_init_f /* run low-level CPU init code (from flash) */
- bsr board_init_f /* run low-level board init code (from flash) */
+ /* run low-level CPU init code (from flash) */
+ move.l #cpu_init_f, %a1
+ jsr (%a1)
+ /* run low-level board init code (from flash) */
+ move.l #board_init_f, %a1
+ jsr (%a1)
/* board_init_f() does not return */
diff --git a/arch/m68k/cpu/mcf52x2/start.S b/arch/m68k/cpu/mcf52x2/start.S
index 8a59496..4af691f 100644
--- a/arch/m68k/cpu/mcf52x2/start.S
+++ b/arch/m68k/cpu/mcf52x2/start.S
@@ -198,8 +198,12 @@ _after_flashbar_copy:
move.l #__got_start, %a5 /* put relocation table address to a5 */
- bsr cpu_init_f /* run low-level CPU init code (from flash) */
- bsr board_init_f /* run low-level board init code (from flash) */
+ /* run low-level CPU init code (from flash) */
+ move.l #cpu_init_f, %a1
+ jsr (%a1)
+ /* run low-level board init code (from flash) */
+ move.l #board_init_f, %a1
+ jsr (%a1)
/* board_init_f() does not return */
diff --git a/arch/m68k/cpu/mcf532x/start.S b/arch/m68k/cpu/mcf532x/start.S
index 3b9ede0..131ad6e 100644
--- a/arch/m68k/cpu/mcf532x/start.S
+++ b/arch/m68k/cpu/mcf532x/start.S
@@ -155,8 +155,12 @@ _start:
move.l #__got_start, %a5 /* put relocation table address to a5 */
- bsr cpu_init_f /* run low-level CPU init code (from flash) */
- bsr board_init_f /* run low-level board init code (from flash) */
+ /* run low-level CPU init code (from flash) */
+ move.l #cpu_init_f, %a1
+ jsr (%a1)
+ /* run low-level board init code (from flash) */
+ move.l #board_init_f, %a1
+ jsr (%a1)
/* board_init_f() does not return */
diff --git a/arch/m68k/cpu/mcf5445x/start.S b/arch/m68k/cpu/mcf5445x/start.S
index ae261b1..f50f147 100644
--- a/arch/m68k/cpu/mcf5445x/start.S
+++ b/arch/m68k/cpu/mcf5445x/start.S
@@ -664,8 +664,12 @@ _start:
move.l #__got_start, %a5 /* put relocation table address to a5 */
- bsr cpu_init_f /* run low-level CPU init code (from flash) */
- bsr board_init_f /* run low-level board init code (from flash) */
+ /* run low-level CPU init code (from flash) */
+ move.l #cpu_init_f, %a1
+ jsr (%a1)
+ /* run low-level board init code (from flash) */
+ move.l #board_init_f, %a1
+ jsr (%a1)
/* board_init_f() does not return */
--
2.7.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] m68k: fix broken buildman m68k
2016-04-11 22:30 [U-Boot] [PATCH] m68k: fix broken buildman m68k Angelo Dureghello
@ 2016-04-11 22:52 ` Marek Vasut
2016-04-12 5:12 ` Angelo Dureghello
2016-04-12 21:41 ` Angelo Dureghello
2016-04-18 5:05 ` Heiko Schocher
2016-04-21 11:23 ` [U-Boot] " Tom Rini
2 siblings, 2 replies; 7+ messages in thread
From: Marek Vasut @ 2016-04-11 22:52 UTC (permalink / raw)
To: u-boot
On 04/12/2016 12:30 AM, Angelo Dureghello wrote:
> fix 19/48 broken board compilations, due to a now too smal 16-bit
> relative jump
Won't it make sense to tweak the linker script to put those functions
closer together instead ?
> Signed-off-by: Angelo Dureghello <angelo@sysam.it>
> ---
> arch/m68k/cpu/mcf523x/start.S | 8 ++++++--
> arch/m68k/cpu/mcf52x2/start.S | 8 ++++++--
> arch/m68k/cpu/mcf532x/start.S | 8 ++++++--
> arch/m68k/cpu/mcf5445x/start.S | 8 ++++++--
> 4 files changed, 24 insertions(+), 8 deletions(-)
>
> diff --git a/arch/m68k/cpu/mcf523x/start.S b/arch/m68k/cpu/mcf523x/start.S
> index 8a23e72..1702f98 100644
> --- a/arch/m68k/cpu/mcf523x/start.S
> +++ b/arch/m68k/cpu/mcf523x/start.S
> @@ -141,8 +141,12 @@ _start:
>
> move.l #__got_start, %a5 /* put relocation table address to a5 */
>
> - bsr cpu_init_f /* run low-level CPU init code (from flash) */
> - bsr board_init_f /* run low-level board init code (from flash) */
> + /* run low-level CPU init code (from flash) */
> + move.l #cpu_init_f, %a1
> + jsr (%a1)
> + /* run low-level board init code (from flash) */
> + move.l #board_init_f, %a1
> + jsr (%a1)
>
> /* board_init_f() does not return */
>
> diff --git a/arch/m68k/cpu/mcf52x2/start.S b/arch/m68k/cpu/mcf52x2/start.S
> index 8a59496..4af691f 100644
> --- a/arch/m68k/cpu/mcf52x2/start.S
> +++ b/arch/m68k/cpu/mcf52x2/start.S
> @@ -198,8 +198,12 @@ _after_flashbar_copy:
>
> move.l #__got_start, %a5 /* put relocation table address to a5 */
>
> - bsr cpu_init_f /* run low-level CPU init code (from flash) */
> - bsr board_init_f /* run low-level board init code (from flash) */
> + /* run low-level CPU init code (from flash) */
> + move.l #cpu_init_f, %a1
> + jsr (%a1)
> + /* run low-level board init code (from flash) */
> + move.l #board_init_f, %a1
> + jsr (%a1)
>
> /* board_init_f() does not return */
>
> diff --git a/arch/m68k/cpu/mcf532x/start.S b/arch/m68k/cpu/mcf532x/start.S
> index 3b9ede0..131ad6e 100644
> --- a/arch/m68k/cpu/mcf532x/start.S
> +++ b/arch/m68k/cpu/mcf532x/start.S
> @@ -155,8 +155,12 @@ _start:
>
> move.l #__got_start, %a5 /* put relocation table address to a5 */
>
> - bsr cpu_init_f /* run low-level CPU init code (from flash) */
> - bsr board_init_f /* run low-level board init code (from flash) */
> + /* run low-level CPU init code (from flash) */
> + move.l #cpu_init_f, %a1
> + jsr (%a1)
> + /* run low-level board init code (from flash) */
> + move.l #board_init_f, %a1
> + jsr (%a1)
>
> /* board_init_f() does not return */
>
> diff --git a/arch/m68k/cpu/mcf5445x/start.S b/arch/m68k/cpu/mcf5445x/start.S
> index ae261b1..f50f147 100644
> --- a/arch/m68k/cpu/mcf5445x/start.S
> +++ b/arch/m68k/cpu/mcf5445x/start.S
> @@ -664,8 +664,12 @@ _start:
>
> move.l #__got_start, %a5 /* put relocation table address to a5 */
>
> - bsr cpu_init_f /* run low-level CPU init code (from flash) */
> - bsr board_init_f /* run low-level board init code (from flash) */
> + /* run low-level CPU init code (from flash) */
> + move.l #cpu_init_f, %a1
> + jsr (%a1)
> + /* run low-level board init code (from flash) */
> + move.l #board_init_f, %a1
> + jsr (%a1)
>
> /* board_init_f() does not return */
>
>
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] m68k: fix broken buildman m68k
2016-04-11 22:52 ` Marek Vasut
@ 2016-04-12 5:12 ` Angelo Dureghello
2016-04-12 21:41 ` Angelo Dureghello
1 sibling, 0 replies; 7+ messages in thread
From: Angelo Dureghello @ 2016-04-12 5:12 UTC (permalink / raw)
To: u-boot
Hi,
On 12/04/2016 00:52, Marek Vasut wrote:
> On 04/12/2016 12:30 AM, Angelo Dureghello wrote:
>> fix 19/48 broken board compilations, due to a now too smal 16-bit
>> relative jump
>
> Won't it make sense to tweak the linker script to put those functions
> closer together instead ?
>
Sure, good idea. Will follow v.2.
Best regards
Angelo Dureghello
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] m68k: fix broken buildman m68k
2016-04-11 22:52 ` Marek Vasut
2016-04-12 5:12 ` Angelo Dureghello
@ 2016-04-12 21:41 ` Angelo Dureghello
2016-04-12 22:09 ` Marek Vasut
1 sibling, 1 reply; 7+ messages in thread
From: Angelo Dureghello @ 2016-04-12 21:41 UTC (permalink / raw)
To: u-boot
Hi,
On 12/04/2016 00:52, Marek Vasut wrote:
> On 04/12/2016 12:30 AM, Angelo Dureghello wrote:
>> fix 19/48 broken board compilations, due to a now too smal 16-bit
>> relative jump
>
> Won't it make sense to tweak the linker script to put those functions
> closer together instead ?
>
tried hardly with linker script, keeping the functions near,
but "relocation truncated to fit: R_68K_PC16 .." error moves to other
jumps now. The fix in this way seems a bit too complex so i suggest to
maintain the jumps as in the patch below.
Best regards,
Angelo Dureghello
>> Signed-off-by: Angelo Dureghello <angelo@sysam.it>
>> ---
>> arch/m68k/cpu/mcf523x/start.S | 8 ++++++--
>> arch/m68k/cpu/mcf52x2/start.S | 8 ++++++--
>> arch/m68k/cpu/mcf532x/start.S | 8 ++++++--
>> arch/m68k/cpu/mcf5445x/start.S | 8 ++++++--
>> 4 files changed, 24 insertions(+), 8 deletions(-)
>>
>> diff --git a/arch/m68k/cpu/mcf523x/start.S b/arch/m68k/cpu/mcf523x/start.S
>> index 8a23e72..1702f98 100644
>> --- a/arch/m68k/cpu/mcf523x/start.S
>> +++ b/arch/m68k/cpu/mcf523x/start.S
>> @@ -141,8 +141,12 @@ _start:
>>
>> move.l #__got_start, %a5 /* put relocation table address to a5 */
>>
>> - bsr cpu_init_f /* run low-level CPU init code (from flash) */
>> - bsr board_init_f /* run low-level board init code (from flash) */
>> + /* run low-level CPU init code (from flash) */
>> + move.l #cpu_init_f, %a1
>> + jsr (%a1)
>> + /* run low-level board init code (from flash) */
>> + move.l #board_init_f, %a1
>> + jsr (%a1)
>>
>> /* board_init_f() does not return */
>>
>> diff --git a/arch/m68k/cpu/mcf52x2/start.S b/arch/m68k/cpu/mcf52x2/start.S
>> index 8a59496..4af691f 100644
>> --- a/arch/m68k/cpu/mcf52x2/start.S
>> +++ b/arch/m68k/cpu/mcf52x2/start.S
>> @@ -198,8 +198,12 @@ _after_flashbar_copy:
>>
>> move.l #__got_start, %a5 /* put relocation table address to a5 */
>>
>> - bsr cpu_init_f /* run low-level CPU init code (from flash) */
>> - bsr board_init_f /* run low-level board init code (from flash) */
>> + /* run low-level CPU init code (from flash) */
>> + move.l #cpu_init_f, %a1
>> + jsr (%a1)
>> + /* run low-level board init code (from flash) */
>> + move.l #board_init_f, %a1
>> + jsr (%a1)
>>
>> /* board_init_f() does not return */
>>
>> diff --git a/arch/m68k/cpu/mcf532x/start.S b/arch/m68k/cpu/mcf532x/start.S
>> index 3b9ede0..131ad6e 100644
>> --- a/arch/m68k/cpu/mcf532x/start.S
>> +++ b/arch/m68k/cpu/mcf532x/start.S
>> @@ -155,8 +155,12 @@ _start:
>>
>> move.l #__got_start, %a5 /* put relocation table address to a5 */
>>
>> - bsr cpu_init_f /* run low-level CPU init code (from flash) */
>> - bsr board_init_f /* run low-level board init code (from flash) */
>> + /* run low-level CPU init code (from flash) */
>> + move.l #cpu_init_f, %a1
>> + jsr (%a1)
>> + /* run low-level board init code (from flash) */
>> + move.l #board_init_f, %a1
>> + jsr (%a1)
>>
>> /* board_init_f() does not return */
>>
>> diff --git a/arch/m68k/cpu/mcf5445x/start.S b/arch/m68k/cpu/mcf5445x/start.S
>> index ae261b1..f50f147 100644
>> --- a/arch/m68k/cpu/mcf5445x/start.S
>> +++ b/arch/m68k/cpu/mcf5445x/start.S
>> @@ -664,8 +664,12 @@ _start:
>>
>> move.l #__got_start, %a5 /* put relocation table address to a5 */
>>
>> - bsr cpu_init_f /* run low-level CPU init code (from flash) */
>> - bsr board_init_f /* run low-level board init code (from flash) */
>> + /* run low-level CPU init code (from flash) */
>> + move.l #cpu_init_f, %a1
>> + jsr (%a1)
>> + /* run low-level board init code (from flash) */
>> + move.l #board_init_f, %a1
>> + jsr (%a1)
>>
>> /* board_init_f() does not return */
>>
>>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] m68k: fix broken buildman m68k
2016-04-12 21:41 ` Angelo Dureghello
@ 2016-04-12 22:09 ` Marek Vasut
0 siblings, 0 replies; 7+ messages in thread
From: Marek Vasut @ 2016-04-12 22:09 UTC (permalink / raw)
To: u-boot
On 04/12/2016 11:41 PM, Angelo Dureghello wrote:
> Hi,
>
>
> On 12/04/2016 00:52, Marek Vasut wrote:
>> On 04/12/2016 12:30 AM, Angelo Dureghello wrote:
>>> fix 19/48 broken board compilations, due to a now too smal 16-bit
>>> relative jump
>>
>> Won't it make sense to tweak the linker script to put those functions
>> closer together instead ?
>>
>
> tried hardly with linker script
You hardly tried or did you try hard ? :b
, keeping the functions near,
> but "relocation truncated to fit: R_68K_PC16 .." error moves to other
> jumps now. The fix in this way seems a bit too complex so i suggest to
> maintain the jumps as in the patch below.
I agree and thanks for clarifying on IRC too.
Acked-by: Marek Vasut <marex@denx.de>
> Best regards,
> Angelo Dureghello
>
>>> Signed-off-by: Angelo Dureghello <angelo@sysam.it>
>>> ---
>>> arch/m68k/cpu/mcf523x/start.S | 8 ++++++--
>>> arch/m68k/cpu/mcf52x2/start.S | 8 ++++++--
>>> arch/m68k/cpu/mcf532x/start.S | 8 ++++++--
>>> arch/m68k/cpu/mcf5445x/start.S | 8 ++++++--
>>> 4 files changed, 24 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/arch/m68k/cpu/mcf523x/start.S
>>> b/arch/m68k/cpu/mcf523x/start.S
>>> index 8a23e72..1702f98 100644
>>> --- a/arch/m68k/cpu/mcf523x/start.S
>>> +++ b/arch/m68k/cpu/mcf523x/start.S
>>> @@ -141,8 +141,12 @@ _start:
>>>
>>> move.l #__got_start, %a5 /* put relocation table address to
>>> a5 */
>>>
>>> - bsr cpu_init_f /* run low-level CPU init code (from
>>> flash) */
>>> - bsr board_init_f /* run low-level board init code (from
>>> flash) */
>>> + /* run low-level CPU init code (from flash) */
>>> + move.l #cpu_init_f, %a1
>>> + jsr (%a1)
>>> + /* run low-level board init code (from flash) */
>>> + move.l #board_init_f, %a1
>>> + jsr (%a1)
>>>
>>> /* board_init_f() does not return */
>>>
>>> diff --git a/arch/m68k/cpu/mcf52x2/start.S
>>> b/arch/m68k/cpu/mcf52x2/start.S
>>> index 8a59496..4af691f 100644
>>> --- a/arch/m68k/cpu/mcf52x2/start.S
>>> +++ b/arch/m68k/cpu/mcf52x2/start.S
>>> @@ -198,8 +198,12 @@ _after_flashbar_copy:
>>>
>>> move.l #__got_start, %a5 /* put relocation table address
>>> to a5 */
>>>
>>> - bsr cpu_init_f /* run low-level CPU init code
>>> (from flash) */
>>> - bsr board_init_f /* run low-level board init code
>>> (from flash) */
>>> + /* run low-level CPU init code (from flash) */
>>> + move.l #cpu_init_f, %a1
>>> + jsr (%a1)
>>> + /* run low-level board init code (from flash) */
>>> + move.l #board_init_f, %a1
>>> + jsr (%a1)
>>>
>>> /* board_init_f() does not return */
>>>
>>> diff --git a/arch/m68k/cpu/mcf532x/start.S
>>> b/arch/m68k/cpu/mcf532x/start.S
>>> index 3b9ede0..131ad6e 100644
>>> --- a/arch/m68k/cpu/mcf532x/start.S
>>> +++ b/arch/m68k/cpu/mcf532x/start.S
>>> @@ -155,8 +155,12 @@ _start:
>>>
>>> move.l #__got_start, %a5 /* put relocation table address to
>>> a5 */
>>>
>>> - bsr cpu_init_f /* run low-level CPU init code (from
>>> flash) */
>>> - bsr board_init_f /* run low-level board init code (from
>>> flash) */
>>> + /* run low-level CPU init code (from flash) */
>>> + move.l #cpu_init_f, %a1
>>> + jsr (%a1)
>>> + /* run low-level board init code (from flash) */
>>> + move.l #board_init_f, %a1
>>> + jsr (%a1)
>>>
>>> /* board_init_f() does not return */
>>>
>>> diff --git a/arch/m68k/cpu/mcf5445x/start.S
>>> b/arch/m68k/cpu/mcf5445x/start.S
>>> index ae261b1..f50f147 100644
>>> --- a/arch/m68k/cpu/mcf5445x/start.S
>>> +++ b/arch/m68k/cpu/mcf5445x/start.S
>>> @@ -664,8 +664,12 @@ _start:
>>>
>>> move.l #__got_start, %a5 /* put relocation table address to
>>> a5 */
>>>
>>> - bsr cpu_init_f /* run low-level CPU init code (from
>>> flash) */
>>> - bsr board_init_f /* run low-level board init code (from
>>> flash) */
>>> + /* run low-level CPU init code (from flash) */
>>> + move.l #cpu_init_f, %a1
>>> + jsr (%a1)
>>> + /* run low-level board init code (from flash) */
>>> + move.l #board_init_f, %a1
>>> + jsr (%a1)
>>>
>>> /* board_init_f() does not return */
>>>
>>>
>>
>>
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] m68k: fix broken buildman m68k
2016-04-11 22:30 [U-Boot] [PATCH] m68k: fix broken buildman m68k Angelo Dureghello
2016-04-11 22:52 ` Marek Vasut
@ 2016-04-18 5:05 ` Heiko Schocher
2016-04-21 11:23 ` [U-Boot] " Tom Rini
2 siblings, 0 replies; 7+ messages in thread
From: Heiko Schocher @ 2016-04-18 5:05 UTC (permalink / raw)
To: u-boot
Hello Angelo,
Am 12.04.2016 um 00:30 schrieb Angelo Dureghello:
> fix 19/48 broken board compilations, due to a now too smal 16-bit
> relative jump
>
> Signed-off-by: Angelo Dureghello <angelo@sysam.it>
> ---
> arch/m68k/cpu/mcf523x/start.S | 8 ++++++--
> arch/m68k/cpu/mcf52x2/start.S | 8 ++++++--
> arch/m68k/cpu/mcf532x/start.S | 8 ++++++--
> arch/m68k/cpu/mcf5445x/start.S | 8 ++++++--
> 4 files changed, 24 insertions(+), 8 deletions(-)
Acked-by: Heiko Schocher <hs@denx.de>
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] m68k: fix broken buildman m68k
2016-04-11 22:30 [U-Boot] [PATCH] m68k: fix broken buildman m68k Angelo Dureghello
2016-04-11 22:52 ` Marek Vasut
2016-04-18 5:05 ` Heiko Schocher
@ 2016-04-21 11:23 ` Tom Rini
2 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2016-04-21 11:23 UTC (permalink / raw)
To: u-boot
On Tue, Apr 12, 2016 at 12:30:59AM +0200, angelo at sysam.it wrote:
> fix 19/48 broken board compilations, due to a now too smal 16-bit
> relative jump
>
> Signed-off-by: Angelo Dureghello <angelo@sysam.it>
> Acked-by: Marek Vasut <marex@denx.de>
> Acked-by: Heiko Schocher <hs@denx.de>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160421/e95c11f0/attachment.sig>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-04-21 11:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-11 22:30 [U-Boot] [PATCH] m68k: fix broken buildman m68k Angelo Dureghello
2016-04-11 22:52 ` Marek Vasut
2016-04-12 5:12 ` Angelo Dureghello
2016-04-12 21:41 ` Angelo Dureghello
2016-04-12 22:09 ` Marek Vasut
2016-04-18 5:05 ` Heiko Schocher
2016-04-21 11:23 ` [U-Boot] " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox