Skip to contentSkip to conversation

RISC-V: Fix up some vector state related build failures

PATCH Applied Palmer Dabbelt 3 participants 4 messages Jun 20, 2023 – Jul 4, 2023 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RISC-V: Fix up some vector state related build failures

I get a few build failures along the lines of

./arch/riscv/include/uapi/asm/sigcontext.h:19:36: error: field ‘v_state’ has incomplete type
19 | struct __riscv_v_ext_state v_state;
| ^~~~~~~
./arch/riscv/include/uapi/asm/sigcontext.h:32:49: error: field ‘sc_extdesc’ has incomplete type
32 | struct __riscv_extra_ext_header sc_extdesc;

The V structures in question are defined for !assembly, so let's just do so for the others.

Fixes 8ee0b41898fa ("riscv: signal: Add sigcontext save/restore for vector")
---
 arch/riscv/include/uapi/asm/sigcontext.h | 4 ++++
 1 file changed, 4 insertions(+)
arch/riscv/include/uapi/asm/sigcontext.h +4 -0
index 8b8a8541673a..8c8712aa9551 100644
@@ -15,6 +15,8 @@
 /* The size of END signal context header. */
 #define END_HDR_SIZE	0x0
 
+#ifndef __ASSEMBLY__
+
 struct __sc_riscv_v_state {
 	struct __riscv_v_ext_state v_state;
 } __attribute__((aligned(16)));
@@ -33,4 +35,6 @@ struct sigcontext {
 	};
 };
 
+#endif /*!__ASSEMBLY__*/
+
 #endif /* _UAPI_ASM_RISCV_SIGCONTEXT_H */
Signature · 7 lines
2.40.1


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Palmer Dabbelt

I get a few build failures along the lines of

./arch/riscv/include/uapi/asm/sigcontext.h:19:36: error: field ‘v_state’ has incomplete type
19 | struct __riscv_v_ext_state v_state;
| ^~~~~~~
./arch/riscv/include/uapi/asm/sigcontext.h:32:49: error: field ‘sc_extdesc’ has incomplete type
32 | struct __riscv_extra_ext_header sc_extdesc;

Quoted 5 lines

The V structures in question are defined for !assembly, so let's just do so for the others.

Fixes 8ee0b41898fa ("riscv: signal: Add sigcontext save/restore for vector")

Not the first time you've caught this sort of problem in headers, is there a particular build that catches these?

Cheers,
Conor.

Quoted 32 lines
---
 arch/riscv/include/uapi/asm/sigcontext.h | 4 ++++
 1 file changed, 4 insertions(+)
arch/riscv/include/uapi/asm/sigcontext.h +4 -0
index 8b8a8541673a..8c8712aa9551 100644
@@ -15,6 +15,8 @@
 /* The size of END signal context header. */
 #define END_HDR_SIZE	0x0
 
+#ifndef __ASSEMBLY__
+
 struct __sc_riscv_v_state {
 	struct __riscv_v_ext_state v_state;
 } __attribute__((aligned(16)));
@@ -33,4 +35,6 @@ struct sigcontext {
 	};
 };
 
+#endif /*!__ASSEMBLY__*/
+
 #endif /* _UAPI_ASM_RISCV_SIGCONTEXT_H */
Signature · 7 lines
2.40.1


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

#2 lore raw
Quoted 9 lines · Conor Dooley
Quoted 8 lines · Palmer Dabbelt

I get a few build failures along the lines of

./arch/riscv/include/uapi/asm/sigcontext.h:19:36: error: field ‘v_state’ has incomplete type
19 | struct __riscv_v_ext_state v_state;
| ^~~~~~~
./arch/riscv/include/uapi/asm/sigcontext.h:32:49: error: field ‘sc_extdesc’ has incomplete type
32 | struct __riscv_extra_ext_header sc_extdesc;

Quoted 8 lines
Quoted 5 lines

The V structures in question are defined for !assembly, so let's just do so for the others.

Fixes 8ee0b41898fa ("riscv: signal: Add sigcontext save/restore for vector")

Not the first time you've caught this sort of problem in headers, is there a particular build that catches these?

I think we're missing some sort of dependency somewhere, these assembly-related issues tend to only show up once when I'm doing dirty builds. I'd guess it's because I'm bouncing between trees and such, not 100% sure though.

Quoted 34 lines

Cheers,
Conor.

Quoted 28 lines
---
 arch/riscv/include/uapi/asm/sigcontext.h | 4 ++++
 1 file changed, 4 insertions(+)
arch/riscv/include/uapi/asm/sigcontext.h +4 -1
index 8b8a8541673a..8c8712aa9551 100644
@@ -15,6 +15,8 @@
 /* The size of END signal context header. */
 #define END_HDR_SIZE	0x0
 
+#ifndef __ASSEMBLY__
+
 struct __sc_riscv_v_state {
 	struct __riscv_v_ext_state v_state;
 } __attribute__((aligned(16)));
@@ -33,4 +35,6 @@ struct sigcontext {
 	};
 };
 
+#endif /*!__ASSEMBLY__*/
+
 #endif /* _UAPI_ASM_RISCV_SIGCONTEXT_H */
--

2.40.1

Quoted 9 lines
Quoted 4 lines

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

#3 lore raw
In reply to Palmer Dabbelt
This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:

Hello:

This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:

Quoted 9 lines · On Mon, 19 Jun 2023 10:21:01 -0700 you wrote:

I get a few build failures along the lines of

./arch/riscv/include/uapi/asm/sigcontext.h:19:36: error: field ‘v_state’ has incomplete type
19 | struct __riscv_v_ext_state v_state;
| ^~~~~~~
./arch/riscv/include/uapi/asm/sigcontext.h:32:49: error: field ‘sc_extdesc’ has incomplete type
32 | struct __riscv_extra_ext_header sc_extdesc;

[...]

Here is the summary with links:
- RISC-V: Fix up some vector state related build failures

    https://git.kernel.org/riscv/c/e50db34efdc8

You are awesome, thank you!

Signature · 9 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv