* [PATCH] MIPS: use anonymous labels in ENTRY_FUNCTION_END and STOP_WITH_DEBUG_EVENT macros
@ 2019-06-04 10:55 Peter Mamonov
2019-06-04 12:44 ` Oleksij Rempel
2019-06-07 6:29 ` Sascha Hauer
0 siblings, 2 replies; 8+ messages in thread
From: Peter Mamonov @ 2019-06-04 10:55 UTC (permalink / raw)
To: o.rempel; +Cc: barebox, Peter Mamonov
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.
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
---
arch/mips/include/asm/asm.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/mips/include/asm/asm.h b/arch/mips/include/asm/asm.h
index 019be4843b..be3a1bcdbc 100644
--- a/arch/mips/include/asm/asm.h
+++ b/arch/mips/include/asm/asm.h
@@ -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 \
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] MIPS: use anonymous labels in ENTRY_FUNCTION_END and STOP_WITH_DEBUG_EVENT macros
2019-06-04 10:55 [PATCH] MIPS: use anonymous labels in ENTRY_FUNCTION_END and STOP_WITH_DEBUG_EVENT macros Peter Mamonov
@ 2019-06-04 12:44 ` Oleksij Rempel
2019-06-04 16:43 ` Peter Mamonov
2019-06-07 6:29 ` Sascha Hauer
1 sibling, 1 reply; 8+ messages in thread
From: Oleksij Rempel @ 2019-06-04 12:44 UTC (permalink / raw)
To: Peter Mamonov; +Cc: barebox
On Tue, Jun 04, 2019 at 01:55:52PM +0300, Peter Mamonov wrote:
> 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.
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
@Peter, Do you use STOP_WITH_DEBUG_EVENT for something?
> Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
> ---
> arch/mips/include/asm/asm.h | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/mips/include/asm/asm.h b/arch/mips/include/asm/asm.h
> index 019be4843b..be3a1bcdbc 100644
> --- a/arch/mips/include/asm/asm.h
> +++ b/arch/mips/include/asm/asm.h
> @@ -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 \
> --
> 2.20.1
>
>
--
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] MIPS: use anonymous labels in ENTRY_FUNCTION_END and STOP_WITH_DEBUG_EVENT macros
2019-06-04 12:44 ` Oleksij Rempel
@ 2019-06-04 16:43 ` Peter Mamonov
2019-06-05 5:17 ` Oleksij Rempel
0 siblings, 1 reply; 8+ messages in thread
From: Peter Mamonov @ 2019-06-04 16:43 UTC (permalink / raw)
To: Oleksij Rempel; +Cc: barebox
Hi, Oleksij,
On Tue, Jun 04, 2019 at 02:44:57PM +0200, Oleksij Rempel wrote:
> On Tue, Jun 04, 2019 at 01:55:52PM +0300, Peter Mamonov wrote:
> > 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.
>
> Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
>
> @Peter, Do you use STOP_WITH_DEBUG_EVENT for 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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] MIPS: use anonymous labels in ENTRY_FUNCTION_END and STOP_WITH_DEBUG_EVENT macros
2019-06-04 16:43 ` Peter Mamonov
@ 2019-06-05 5:17 ` Oleksij Rempel
2019-06-05 18:38 ` Peter Mamonov
0 siblings, 1 reply; 8+ messages in thread
From: Oleksij Rempel @ 2019-06-05 5:17 UTC (permalink / raw)
To: Peter Mamonov; +Cc: barebox
On Tue, Jun 04, 2019 at 07:43:12PM +0300, Peter Mamonov wrote:
> Hi, Oleksij,
>
> On Tue, Jun 04, 2019 at 02:44:57PM +0200, Oleksij Rempel wrote:
> > On Tue, Jun 04, 2019 at 01:55:52PM +0300, Peter Mamonov wrote:
> > > 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.
> >
> > Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
> >
> > @Peter, Do you use STOP_WITH_DEBUG_EVENT for something?
>
> Actually no. I hit this problem when tried to use ENTRY_FUNCTION_END twice to
> choose relevant DTB depending on some conditions.
was you able to implement it?
--
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] MIPS: use anonymous labels in ENTRY_FUNCTION_END and STOP_WITH_DEBUG_EVENT macros
2019-06-05 5:17 ` Oleksij Rempel
@ 2019-06-05 18:38 ` Peter Mamonov
2019-06-06 4:29 ` Oleksij Rempel
0 siblings, 1 reply; 8+ messages in thread
From: Peter Mamonov @ 2019-06-05 18:38 UTC (permalink / raw)
To: Oleksij Rempel; +Cc: barebox
On Wed, Jun 05, 2019 at 07:17:03AM +0200, Oleksij Rempel wrote:
> On Tue, Jun 04, 2019 at 07:43:12PM +0300, Peter Mamonov wrote:
> > Hi, Oleksij,
> >
> > On Tue, Jun 04, 2019 at 02:44:57PM +0200, Oleksij Rempel wrote:
> > > On Tue, Jun 04, 2019 at 01:55:52PM +0300, Peter Mamonov wrote:
> > > > 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.
> > >
> > > Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
> > >
> > > @Peter, Do you use STOP_WITH_DEBUG_EVENT for something?
> >
> > Actually no. I hit this problem when tried to use ENTRY_FUNCTION_END twice 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
>
> --
> 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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] MIPS: use anonymous labels in ENTRY_FUNCTION_END and STOP_WITH_DEBUG_EVENT macros
2019-06-05 18:38 ` Peter Mamonov
@ 2019-06-06 4:29 ` Oleksij Rempel
2019-06-06 19:22 ` Peter Mamonov
0 siblings, 1 reply; 8+ messages in thread
From: Oleksij Rempel @ 2019-06-06 4:29 UTC (permalink / raw)
To: Peter Mamonov; +Cc: barebox
On Wed, Jun 05, 2019 at 09:38:17PM +0300, Peter Mamonov wrote:
> On Wed, Jun 05, 2019 at 07:17:03AM +0200, Oleksij Rempel wrote:
> > On Tue, Jun 04, 2019 at 07:43:12PM +0300, Peter Mamonov wrote:
> > > Hi, Oleksij,
> > >
> > > On Tue, Jun 04, 2019 at 02:44:57PM +0200, Oleksij Rempel wrote:
> > > > On Tue, Jun 04, 2019 at 01:55:52PM +0300, Peter Mamonov wrote:
> > > > > 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.
> > > >
> > > > Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
> > > >
> > > > @Peter, Do you use STOP_WITH_DEBUG_EVENT for something?
> > >
> > > Actually no. I hit this problem when tried to use ENTRY_FUNCTION_END twice 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)
nice!
Do you use latest barebox with dynamic relocation support?
--
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] MIPS: use anonymous labels in ENTRY_FUNCTION_END and STOP_WITH_DEBUG_EVENT macros
2019-06-06 4:29 ` Oleksij Rempel
@ 2019-06-06 19:22 ` Peter Mamonov
0 siblings, 0 replies; 8+ messages in thread
From: Peter Mamonov @ 2019-06-06 19:22 UTC (permalink / raw)
To: Oleksij Rempel; +Cc: barebox
On Thu, Jun 06, 2019 at 06:29:10AM +0200, Oleksij Rempel wrote:
> On Wed, Jun 05, 2019 at 09:38:17PM +0300, Peter Mamonov wrote:
> > On Wed, Jun 05, 2019 at 07:17:03AM +0200, Oleksij Rempel wrote:
> > > On Tue, Jun 04, 2019 at 07:43:12PM +0300, Peter Mamonov wrote:
> > > > Hi, Oleksij,
> > > >
> > > > On Tue, Jun 04, 2019 at 02:44:57PM +0200, Oleksij Rempel wrote:
> > > > > On Tue, Jun 04, 2019 at 01:55:52PM +0300, Peter Mamonov wrote:
> > > > > > 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.
> > > > >
> > > > > Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
> > > > >
> > > > > @Peter, Do you use STOP_WITH_DEBUG_EVENT for something?
> > > >
> > > > Actually no. I hit this problem when tried to use ENTRY_FUNCTION_END twice 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)
>
> nice!
>
> Do you use latest barebox with dynamic relocation support?
Not yet, I'm more than 200 commits behing `next`.
Peter
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] MIPS: use anonymous labels in ENTRY_FUNCTION_END and STOP_WITH_DEBUG_EVENT macros
2019-06-04 10:55 [PATCH] MIPS: use anonymous labels in ENTRY_FUNCTION_END and STOP_WITH_DEBUG_EVENT macros Peter Mamonov
2019-06-04 12:44 ` Oleksij Rempel
@ 2019-06-07 6:29 ` Sascha Hauer
1 sibling, 0 replies; 8+ messages in thread
From: Sascha Hauer @ 2019-06-07 6:29 UTC (permalink / raw)
To: Peter Mamonov; +Cc: o.rempel, barebox
On Tue, Jun 04, 2019 at 01:55:52PM +0300, Peter Mamonov wrote:
> 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.
>
> Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
> ---
> arch/mips/include/asm/asm.h | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
Applied, thanks
Sascha
>
> diff --git a/arch/mips/include/asm/asm.h b/arch/mips/include/asm/asm.h
> index 019be4843b..be3a1bcdbc 100644
> --- a/arch/mips/include/asm/asm.h
> +++ b/arch/mips/include/asm/asm.h
> @@ -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 \
> --
> 2.20.1
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-06-07 6:29 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-04 10:55 [PATCH] MIPS: use anonymous labels in ENTRY_FUNCTION_END and STOP_WITH_DEBUG_EVENT macros Peter Mamonov
2019-06-04 12:44 ` Oleksij Rempel
2019-06-04 16:43 ` Peter Mamonov
2019-06-05 5:17 ` Oleksij Rempel
2019-06-05 18:38 ` Peter Mamonov
2019-06-06 4:29 ` Oleksij Rempel
2019-06-06 19:22 ` Peter Mamonov
2019-06-07 6:29 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox