MIPS: use anonymous labels in ENTRY_FUNCTION_END and STOP_WITH_DEBUG_EVENT macros
PATCH 1/1 MIPS: use anonymous labels in ENTRY_FUNCTION_END and STOP_WITH_DEBUG_EVENT macros
Use of global labels of the same name inside ENTRY_FUNCTION_END and STOP_WITH_DEBUG_EVENT prevents simultaneous use of both macros. It also prevents multiple use of one of them.
--- arch/mips/include/asm/asm.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/mips/include/asm/asm.h +4 -4
@@ -100,8 +100,8 @@ EXPORT(symbol)nop ; \ \/* No return */ \ -__error: \ -b __error; \ +1: \ + b 1b; \ nop;/*
@@ -114,8 +114,8 @@ __error: \/* trigger a soft breakpoint for OpenOCD */ \SDBBP ; \/* position independent variant of dead loop */ \ - __error: \ -b __error; \ +1: \ + b 1b; \ nop; \/* Call some code from .text section. \ * It is needed to keep same linker script for \
Signature · 7 lines
2.20.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 3 lines · Peter Mamonov
Use of global labels of the same name inside
ENTRY_FUNCTION_ENDandSTOP_WITH_DEBUG_EVENTprevents simultaneous use of both macros. It also prevents multiple use of one of them.
@Peter, Do you use STOP_WITH_DEBUG_EVENT for something?
Quoted 35 lines
Signed-off-by Peter Mamonov <[email protected]>--- arch/mips/include/asm/asm.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)arch/mips/include/asm/asm.h +4
-4@@ -100,8 +100,8 @@ EXPORT(symbol)nop ; \ \/* No return */ \ -__error: \ -b __error; \ +1: \ + b 1b; \ nop;/* @@ -114,8 +114,8 @@ __error: \/* trigger a soft breakpoint for OpenOCD */ \SDBBP ; \/* position independent variant of dead loop */ \ - __error: \ -b __error; \ +1: \ + b 1b; \ nop; \/* Call some code from .text section. \ * It is needed to keep same linker script for \ Signature · 1 line
2.20.1
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Hi, Oleksij,
Quoted 8 lines · Oleksij Rempel
Quoted 3 lines · Peter Mamonov
Use of global labels of the same name inside
ENTRY_FUNCTION_ENDandSTOP_WITH_DEBUG_EVENTprevents simultaneous use of both macros. It also prevents multiple use of one of them.Reviewed-by Oleksij Rempel <[email protected]>@Peter, Do you use
STOP_WITH_DEBUG_EVENTfor something?
Actually no. I hit this problem when tried to use ENTRY_FUNCTION_END twice to choose relevant DTB depending on some conditions.
Regards,
Peter
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Quoted 8 lines · Peter Mamonov
Hi, Oleksij,
Quoted 5 lines · Oleksij Rempel
Quoted 3 lines · Peter Mamonov
Use of global labels of the same name inside
ENTRY_FUNCTION_ENDandSTOP_WITH_DEBUG_EVENTprevents simultaneous use of both macros. It also prevents multiple use of one of them.
Quoted 6 lines
Quoted 3 lines
Reviewed-by Oleksij Rempel <[email protected]>@Peter, Do you use
STOP_WITH_DEBUG_EVENTfor something?Actually no. I hit this problem when tried to use
ENTRY_FUNCTION_ENDtwice to choose relevant DTB depending on some conditions.
was you able to implement it?
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 9 lines · Oleksij Rempel
Quoted 8 lines · Peter Mamonov
Hi, Oleksij,
Quoted 5 lines · Oleksij Rempel
Quoted 3 lines · Peter Mamonov
Use of global labels of the same name inside
ENTRY_FUNCTION_ENDandSTOP_WITH_DEBUG_EVENTprevents simultaneous use of both macros. It also prevents multiple use of one of them.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Reviewed-by Oleksij Rempel <[email protected]>@Peter, Do you use
STOP_WITH_DEBUG_EVENTfor something?Actually no. I hit this problem when tried to use
ENTRY_FUNCTION_ENDtwice to choose relevant DTB depending on some conditions.was you able to implement it?
Yes, something like this:
<test a condition, put result into t0>
beq t0, zero, use_other_dtb
nop
ENTRY_FUNCTION_END(BOARD_PBL_START, some_dtb)
use_other_dtb:
ENTRY_FUNCTION_END(BOARD_PBL_START, other_dtb)
Regards,
Peter
Quoted 6 lines
Signature · 5 lines
-- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Quoted 23 lines · Peter Mamonov
Quoted 9 lines · Oleksij Rempel
Quoted 8 lines · Peter Mamonov
Hi, Oleksij,
Quoted 5 lines · Oleksij Rempel
Quoted 3 lines · Peter Mamonov
Use of global labels of the same name inside
ENTRY_FUNCTION_ENDandSTOP_WITH_DEBUG_EVENTprevents simultaneous use of both macros. It also prevents multiple use of one of them.Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Reviewed-by Oleksij Rempel <[email protected]>@Peter, Do you use
STOP_WITH_DEBUG_EVENTfor something?Actually no. I hit this problem when tried to use
ENTRY_FUNCTION_ENDtwice to choose relevant DTB depending on some conditions.was you able to implement it?
Yes, something like this:
<test a condition, put result into t0>
Quoted 7 lines
beq t0, zero,
use_other_dtb
nop
ENTRY_FUNCTION_END(BOARD_PBL_START, some_dtb)
use_other_dtb:
ENTRY_FUNCTION_END(BOARD_PBL_START, other_dtb)
nice!
Do you use latest barebox with dynamic relocation support?
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 27 lines · Oleksij Rempel
Quoted 26 lines · Peter Mamonov
Quoted 9 lines · Oleksij Rempel
Quoted 8 lines · Peter Mamonov
Hi, Oleksij,
Quoted 5 lines · Oleksij Rempel
Quoted 3 lines · Peter Mamonov
Use of global labels of the same name inside
ENTRY_FUNCTION_ENDandSTOP_WITH_DEBUG_EVENTprevents simultaneous use of both macros. It also prevents multiple use of one of them.Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Reviewed-by Oleksij Rempel <[email protected]>@Peter, Do you use
STOP_WITH_DEBUG_EVENTfor something?Actually no. I hit this problem when tried to use
ENTRY_FUNCTION_ENDtwice to choose relevant DTB depending on some conditions.was you able to implement it?
Yes, something like this:
<test a condition, put result into t0>
beq t0, zero,
use_other_dtb
nop
Quoted 8 lines
Quoted 4 lines
ENTRY_FUNCTION_END(BOARD_PBL_START, some_dtb)
use_other_dtb:
ENTRY_FUNCTION_END(BOARD_PBL_START, other_dtb)nice!
Do you use latest barebox with dynamic relocation support?
Not yet, I'm more than 200 commits behing next.
Peter
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedQuoted 8 lines · Peter Mamonov
Use of global labels of the same name inside
ENTRY_FUNCTION_ENDandSTOP_WITH_DEBUG_EVENTprevents simultaneous use of both macros. It also prevents multiple use of one of them.Signed-off-by Peter Mamonov <[email protected]>--- arch/mips/include/asm/asm.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Applied, thanks
Sascha
Quoted 36 lines
arch/mips/include/asm/asm.h +4
-4@@ -100,8 +100,8 @@ EXPORT(symbol)nop ; \ \/* No return */ \ -__error: \ -b __error; \ +1: \ + b 1b; \ nop;/* @@ -114,8 +114,8 @@ __error: \/* trigger a soft breakpoint for OpenOCD */ \SDBBP ; \/* position independent variant of dead loop */ \ - __error: \ -b __error; \ +1: \ + b 1b; \ nop; \/* Call some code from .text section. \ * It is needed to keep same linker script for \ Signature · 7 lines
2.20.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox