mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/8] <asm/setjmp.h>: Don't use __noreturn without header
@ 2021-03-17 10:46 Ahmad Fatoum
  2021-03-17 10:46 ` [PATCH 1/8] fixup! ARM: asm: setjmp: implement coroutine dependency initjmp() Ahmad Fatoum
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Ahmad Fatoum @ 2021-03-17 10:46 UTC (permalink / raw)
  To: barebox; +Cc: rcz, Ahmad Fatoum

__noreturn is defined in <linux/compiler.h>, which isn't included in
every <asm/setjmp>, so arm32 that uses setjmp outside of bthreads fails
to build. In order to keep changes to a minimum, just replace
__noreturn with __attribute__((noreturn))

Tested on:
arm32, aarch64, mipsel, mips, riscv32, riscv64

Ahmad Fatoum (8):
  fixup! ARM: asm: setjmp: implement coroutine dependency initjmp()
  fixup! kvx: Implement setjmp/longjmp/initjmp
  fixup! mips: Implement setjmp/longjmp/initjmp for 32BIT
  fixup! openrisc: Implement setjmp/longjmp/initjmp
  fixup! powerpc: Implement initjmp/setjmp/longjmp
  fixup! riscv: Implement setjmp/longjmp/initjmp for RV32I
  fixup! sandbox: asm: implement setjmp/longjmp/initjmp
  fixup! x86: implement setjmp/longjmp/initjmp

 arch/arm/include/asm/setjmp.h      | 2 +-
 arch/kvx/include/asm/setjmp.h      | 2 +-
 arch/mips/include/asm/setjmp.h     | 2 +-
 arch/openrisc/include/asm/setjmp.h | 2 +-
 arch/powerpc/include/asm/setjmp.h  | 2 +-
 arch/riscv/include/asm/setjmp.h    | 2 +-
 arch/sandbox/include/asm/setjmp.h  | 2 +-
 arch/x86/include/asm/setjmp.h      | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

-- 
2.30.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/8] fixup! ARM: asm: setjmp: implement coroutine dependency initjmp()
  2021-03-17 10:46 [PATCH 0/8] <asm/setjmp.h>: Don't use __noreturn without header Ahmad Fatoum
@ 2021-03-17 10:46 ` Ahmad Fatoum
  2021-03-17 10:46 ` [PATCH 2/8] fixup! kvx: Implement setjmp/longjmp/initjmp Ahmad Fatoum
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Ahmad Fatoum @ 2021-03-17 10:46 UTC (permalink / raw)
  To: barebox; +Cc: rcz, Ahmad Fatoum

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
 arch/arm/include/asm/setjmp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/include/asm/setjmp.h b/arch/arm/include/asm/setjmp.h
index 4877e4312411..0cee5bfdda60 100644
--- a/arch/arm/include/asm/setjmp.h
+++ b/arch/arm/include/asm/setjmp.h
@@ -26,6 +26,6 @@ typedef struct jmp_buf_data jmp_buf[1];
 int setjmp(jmp_buf jmp) __attribute__((returns_twice));
 void longjmp(jmp_buf jmp, int ret) __attribute__((noreturn));
 
-int initjmp(jmp_buf jmp, void __noreturn (*func)(void), void *stack_top);
+int initjmp(jmp_buf jmp, void __attribute__((noreturn)) (*func)(void), void *stack_top);
 
 #endif /* _SETJMP_H_ */
-- 
2.30.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 2/8] fixup! kvx: Implement setjmp/longjmp/initjmp
  2021-03-17 10:46 [PATCH 0/8] <asm/setjmp.h>: Don't use __noreturn without header Ahmad Fatoum
  2021-03-17 10:46 ` [PATCH 1/8] fixup! ARM: asm: setjmp: implement coroutine dependency initjmp() Ahmad Fatoum
@ 2021-03-17 10:46 ` Ahmad Fatoum
  2021-03-17 10:46 ` [PATCH 3/8] fixup! mips: Implement setjmp/longjmp/initjmp for 32BIT Ahmad Fatoum
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Ahmad Fatoum @ 2021-03-17 10:46 UTC (permalink / raw)
  To: barebox; +Cc: rcz, Ahmad Fatoum

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
 arch/kvx/include/asm/setjmp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/kvx/include/asm/setjmp.h b/arch/kvx/include/asm/setjmp.h
index 3cfc698d9006..3c23576e6e82 100644
--- a/arch/kvx/include/asm/setjmp.h
+++ b/arch/kvx/include/asm/setjmp.h
@@ -8,7 +8,7 @@
 
 typedef u64 jmp_buf[22];
 
-int initjmp(jmp_buf jmp, void __noreturn (*func)(void), void *stack_top);
+int initjmp(jmp_buf jmp, void __attribute__((noreturn)) (*func)(void), void *stack_top);
 int setjmp(jmp_buf jmp) __attribute__((returns_twice));
 void longjmp(jmp_buf jmp, int ret) __attribute__((noreturn));
 
-- 
2.30.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 3/8] fixup! mips: Implement setjmp/longjmp/initjmp for 32BIT
  2021-03-17 10:46 [PATCH 0/8] <asm/setjmp.h>: Don't use __noreturn without header Ahmad Fatoum
  2021-03-17 10:46 ` [PATCH 1/8] fixup! ARM: asm: setjmp: implement coroutine dependency initjmp() Ahmad Fatoum
  2021-03-17 10:46 ` [PATCH 2/8] fixup! kvx: Implement setjmp/longjmp/initjmp Ahmad Fatoum
@ 2021-03-17 10:46 ` Ahmad Fatoum
  2021-03-17 10:46 ` [PATCH 4/8] fixup! openrisc: Implement setjmp/longjmp/initjmp Ahmad Fatoum
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Ahmad Fatoum @ 2021-03-17 10:46 UTC (permalink / raw)
  To: barebox; +Cc: rcz, Ahmad Fatoum

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
 arch/mips/include/asm/setjmp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/include/asm/setjmp.h b/arch/mips/include/asm/setjmp.h
index 5a9af7773a5f..81f4d4c15f6d 100644
--- a/arch/mips/include/asm/setjmp.h
+++ b/arch/mips/include/asm/setjmp.h
@@ -27,6 +27,6 @@ typedef struct __jmp_buf_internal_tag {
 
 int setjmp(jmp_buf jmp) __attribute__((returns_twice));
 void longjmp(jmp_buf jmp, int ret) __attribute__((noreturn));
-int initjmp(jmp_buf jmp, void __noreturn (*func)(void), void *stack_top);
+int initjmp(jmp_buf jmp, void __attribute__((noreturn)) (*func)(void), void *stack_top);
 
 #endif /* _MIPS_BITS_SETJMP_H */
-- 
2.30.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 4/8] fixup! openrisc: Implement setjmp/longjmp/initjmp
  2021-03-17 10:46 [PATCH 0/8] <asm/setjmp.h>: Don't use __noreturn without header Ahmad Fatoum
                   ` (2 preceding siblings ...)
  2021-03-17 10:46 ` [PATCH 3/8] fixup! mips: Implement setjmp/longjmp/initjmp for 32BIT Ahmad Fatoum
@ 2021-03-17 10:46 ` Ahmad Fatoum
  2021-03-17 10:46 ` [PATCH 5/8] fixup! powerpc: Implement initjmp/setjmp/longjmp Ahmad Fatoum
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Ahmad Fatoum @ 2021-03-17 10:46 UTC (permalink / raw)
  To: barebox; +Cc: rcz, Ahmad Fatoum

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
 arch/openrisc/include/asm/setjmp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/openrisc/include/asm/setjmp.h b/arch/openrisc/include/asm/setjmp.h
index 40f55b7eb594..ee73306d189d 100644
--- a/arch/openrisc/include/asm/setjmp.h
+++ b/arch/openrisc/include/asm/setjmp.h
@@ -12,6 +12,6 @@ typedef long int jmp_buf[13];
 
 int setjmp(jmp_buf jmp) __attribute__((returns_twice));
 void longjmp(jmp_buf jmp, int ret) __attribute__((noreturn));
-int initjmp(jmp_buf jmp, void __noreturn (*func)(void), void *stack_top);
+int initjmp(jmp_buf jmp, void __attribute__((noreturn)) (*func)(void), void *stack_top);
 
 #endif /* _OR1K_BITS_SETJMP_H */
-- 
2.30.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 5/8] fixup! powerpc: Implement initjmp/setjmp/longjmp
  2021-03-17 10:46 [PATCH 0/8] <asm/setjmp.h>: Don't use __noreturn without header Ahmad Fatoum
                   ` (3 preceding siblings ...)
  2021-03-17 10:46 ` [PATCH 4/8] fixup! openrisc: Implement setjmp/longjmp/initjmp Ahmad Fatoum
@ 2021-03-17 10:46 ` Ahmad Fatoum
  2021-03-17 10:46 ` [PATCH 6/8] fixup! riscv: Implement setjmp/longjmp/initjmp for RV32I Ahmad Fatoum
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Ahmad Fatoum @ 2021-03-17 10:46 UTC (permalink / raw)
  To: barebox; +Cc: rcz, Ahmad Fatoum

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
 arch/powerpc/include/asm/setjmp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/include/asm/setjmp.h b/arch/powerpc/include/asm/setjmp.h
index c558415c99d9..91bfcdb7f442 100644
--- a/arch/powerpc/include/asm/setjmp.h
+++ b/arch/powerpc/include/asm/setjmp.h
@@ -16,6 +16,6 @@ typedef struct __jmp_buf_internal_tag {
 int setjmp(jmp_buf jmp) __attribute__((returns_twice));
 void longjmp(jmp_buf jmp, int ret) __attribute__((noreturn));
 
-int initjmp(jmp_buf jmp, void __noreturn (*func)(void), void *stack_top);
+int initjmp(jmp_buf jmp, void __attribute__((noreturn)) (*func)(void), void *stack_top);
 
 #endif /* _SETJMP_H_ */
-- 
2.30.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 6/8] fixup! riscv: Implement setjmp/longjmp/initjmp for RV32I
  2021-03-17 10:46 [PATCH 0/8] <asm/setjmp.h>: Don't use __noreturn without header Ahmad Fatoum
                   ` (4 preceding siblings ...)
  2021-03-17 10:46 ` [PATCH 5/8] fixup! powerpc: Implement initjmp/setjmp/longjmp Ahmad Fatoum
@ 2021-03-17 10:46 ` Ahmad Fatoum
  2021-03-17 10:46 ` [PATCH 7/8] fixup! sandbox: asm: implement setjmp/longjmp/initjmp Ahmad Fatoum
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Ahmad Fatoum @ 2021-03-17 10:46 UTC (permalink / raw)
  To: barebox; +Cc: rcz, Ahmad Fatoum

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
 arch/riscv/include/asm/setjmp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/include/asm/setjmp.h b/arch/riscv/include/asm/setjmp.h
index 7516f6825841..468fc4b10aaf 100644
--- a/arch/riscv/include/asm/setjmp.h
+++ b/arch/riscv/include/asm/setjmp.h
@@ -22,6 +22,6 @@ typedef struct __jmp_buf_internal_tag
 int setjmp(jmp_buf jmp) __attribute__((returns_twice));
 void longjmp(jmp_buf jmp, int ret) __attribute__((noreturn));
 
-int initjmp(jmp_buf jmp, void __noreturn (*func)(void), void *stack_top);
+int initjmp(jmp_buf jmp, void __attribute__((noreturn)) (*func)(void), void *stack_top);
 
 #endif /* _SETJMP_H_ */
-- 
2.30.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 7/8] fixup! sandbox: asm: implement setjmp/longjmp/initjmp
  2021-03-17 10:46 [PATCH 0/8] <asm/setjmp.h>: Don't use __noreturn without header Ahmad Fatoum
                   ` (5 preceding siblings ...)
  2021-03-17 10:46 ` [PATCH 6/8] fixup! riscv: Implement setjmp/longjmp/initjmp for RV32I Ahmad Fatoum
@ 2021-03-17 10:46 ` Ahmad Fatoum
  2021-03-17 10:46 ` [PATCH 8/8] fixup! x86: " Ahmad Fatoum
  2021-03-17 10:56 ` [PATCH 0/8] <asm/setjmp.h>: Don't use __noreturn without header Sascha Hauer
  8 siblings, 0 replies; 10+ messages in thread
From: Ahmad Fatoum @ 2021-03-17 10:46 UTC (permalink / raw)
  To: barebox; +Cc: rcz, Ahmad Fatoum

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
 arch/sandbox/include/asm/setjmp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sandbox/include/asm/setjmp.h b/arch/sandbox/include/asm/setjmp.h
index f085a9079dd7..a300758c3d6c 100644
--- a/arch/sandbox/include/asm/setjmp.h
+++ b/arch/sandbox/include/asm/setjmp.h
@@ -12,6 +12,6 @@ typedef struct jmp_buf_data jmp_buf[1];
 int setjmp(jmp_buf jmp) __attribute__((returns_twice));
 void longjmp(jmp_buf jmp, int ret) __attribute__((noreturn));
 
-int initjmp(jmp_buf jmp, void __noreturn (*func)(void), void *stack_top);
+int initjmp(jmp_buf jmp, void __attribute__((noreturn)) (*func)(void), void *stack_top);
 
 #endif
-- 
2.30.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 8/8] fixup! x86: implement setjmp/longjmp/initjmp
  2021-03-17 10:46 [PATCH 0/8] <asm/setjmp.h>: Don't use __noreturn without header Ahmad Fatoum
                   ` (6 preceding siblings ...)
  2021-03-17 10:46 ` [PATCH 7/8] fixup! sandbox: asm: implement setjmp/longjmp/initjmp Ahmad Fatoum
@ 2021-03-17 10:46 ` Ahmad Fatoum
  2021-03-17 10:56 ` [PATCH 0/8] <asm/setjmp.h>: Don't use __noreturn without header Sascha Hauer
  8 siblings, 0 replies; 10+ messages in thread
From: Ahmad Fatoum @ 2021-03-17 10:46 UTC (permalink / raw)
  To: barebox; +Cc: rcz, Ahmad Fatoum

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
 arch/x86/include/asm/setjmp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/setjmp.h b/arch/x86/include/asm/setjmp.h
index 88c198cfaeb9..5af5e624895c 100644
--- a/arch/x86/include/asm/setjmp.h
+++ b/arch/x86/include/asm/setjmp.h
@@ -39,6 +39,6 @@ typedef struct jmp_buf_data jmp_buf[1];
 int setjmp(jmp_buf jmp) __attribute__((returns_twice)) __sjlj_attr;
 void longjmp(jmp_buf jmp, int ret) __attribute__((noreturn)) __sjlj_attr;
 
-int initjmp(jmp_buf jmp, void __noreturn (*func)(void), void *stack_top) __sjlj_attr;
+int initjmp(jmp_buf jmp, void __attribute__((noreturn)) (*func)(void), void *stack_top) __sjlj_attr;
 
 #endif
-- 
2.30.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/8] <asm/setjmp.h>: Don't use __noreturn without header
  2021-03-17 10:46 [PATCH 0/8] <asm/setjmp.h>: Don't use __noreturn without header Ahmad Fatoum
                   ` (7 preceding siblings ...)
  2021-03-17 10:46 ` [PATCH 8/8] fixup! x86: " Ahmad Fatoum
@ 2021-03-17 10:56 ` Sascha Hauer
  8 siblings, 0 replies; 10+ messages in thread
From: Sascha Hauer @ 2021-03-17 10:56 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox, rcz

On Wed, Mar 17, 2021 at 11:46:35AM +0100, Ahmad Fatoum wrote:
> __noreturn is defined in <linux/compiler.h>, which isn't included in
> every <asm/setjmp>, so arm32 that uses setjmp outside of bthreads fails
> to build. In order to keep changes to a minimum, just replace
> __noreturn with __attribute__((noreturn))
> 
> Tested on:
> arm32, aarch64, mipsel, mips, riscv32, riscv64
> 
> Ahmad Fatoum (8):
>   fixup! ARM: asm: setjmp: implement coroutine dependency initjmp()
>   fixup! kvx: Implement setjmp/longjmp/initjmp
>   fixup! mips: Implement setjmp/longjmp/initjmp for 32BIT
>   fixup! openrisc: Implement setjmp/longjmp/initjmp
>   fixup! powerpc: Implement initjmp/setjmp/longjmp
>   fixup! riscv: Implement setjmp/longjmp/initjmp for RV32I
>   fixup! sandbox: asm: implement setjmp/longjmp/initjmp
>   fixup! x86: implement setjmp/longjmp/initjmp

Applied, thanks

Sascha

> 
>  arch/arm/include/asm/setjmp.h      | 2 +-
>  arch/kvx/include/asm/setjmp.h      | 2 +-
>  arch/mips/include/asm/setjmp.h     | 2 +-
>  arch/openrisc/include/asm/setjmp.h | 2 +-
>  arch/powerpc/include/asm/setjmp.h  | 2 +-
>  arch/riscv/include/asm/setjmp.h    | 2 +-
>  arch/sandbox/include/asm/setjmp.h  | 2 +-
>  arch/x86/include/asm/setjmp.h      | 2 +-
>  8 files changed, 8 insertions(+), 8 deletions(-)
> 
> -- 
> 2.30.0
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
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] 10+ messages in thread

end of thread, other threads:[~2021-03-17 10:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-17 10:46 [PATCH 0/8] <asm/setjmp.h>: Don't use __noreturn without header Ahmad Fatoum
2021-03-17 10:46 ` [PATCH 1/8] fixup! ARM: asm: setjmp: implement coroutine dependency initjmp() Ahmad Fatoum
2021-03-17 10:46 ` [PATCH 2/8] fixup! kvx: Implement setjmp/longjmp/initjmp Ahmad Fatoum
2021-03-17 10:46 ` [PATCH 3/8] fixup! mips: Implement setjmp/longjmp/initjmp for 32BIT Ahmad Fatoum
2021-03-17 10:46 ` [PATCH 4/8] fixup! openrisc: Implement setjmp/longjmp/initjmp Ahmad Fatoum
2021-03-17 10:46 ` [PATCH 5/8] fixup! powerpc: Implement initjmp/setjmp/longjmp Ahmad Fatoum
2021-03-17 10:46 ` [PATCH 6/8] fixup! riscv: Implement setjmp/longjmp/initjmp for RV32I Ahmad Fatoum
2021-03-17 10:46 ` [PATCH 7/8] fixup! sandbox: asm: implement setjmp/longjmp/initjmp Ahmad Fatoum
2021-03-17 10:46 ` [PATCH 8/8] fixup! x86: " Ahmad Fatoum
2021-03-17 10:56 ` [PATCH 0/8] <asm/setjmp.h>: Don't use __noreturn without header Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox