You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/04/27 07:17:58 UTC

[GitHub] [incubator-nuttx] pussuw opened a new pull request, #6160: MPFS: Remove # CONFIG_ARCH_FPU is not set from defconfigs

pussuw opened a new pull request, #6160:
URL: https://github.com/apache/incubator-nuttx/pull/6160

   For some reason # CONFIG_ARCH_FPU is not set also unsets ARCH_FPU
   for the .config file, meaning FPU support is not built.
   
   ## Summary
   Without this, FPU does not get enabled
   ## Impact
   
   ## Testing
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #6160: MPFS: Remove # CONFIG_ARCH_FPU is not set from defconfigs

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #6160:
URL: https://github.com/apache/incubator-nuttx/pull/6160#discussion_r859621614


##########
arch/risc-v/src/opensbi/Make.defs:
##########
@@ -30,6 +30,7 @@ OPENSBI_CSRCS += opensbi/opensbi-3rdparty/lib/utils/timer/aclint_mtimer.c
 
 OPENSBI_ASRCS += opensbi/opensbi-3rdparty/lib/sbi/sbi_expected_trap.S
 OPENSBI_ASRCS += opensbi/opensbi-3rdparty/lib/sbi/sbi_hfence.S
+OPENSBI_ASRCS += opensbi/opensbi-3rdparty/lib/sbi/riscv_hardfp.S

Review Comment:
   let me check if `riscv_hardfp.S` is properly guarded



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pussuw commented on pull request #6160: MPFS: Remove # CONFIG_ARCH_FPU is not set from defconfigs

Posted by GitBox <gi...@apache.org>.
pussuw commented on PR #6160:
URL: https://github.com/apache/incubator-nuttx/pull/6160#issuecomment-1110793729

   > I think this is because `lib/sbi/riscv_hardfp.S` is not compiled
   
   Most likely yes. But I sitll don't understand why removing` # CONFIG_ARCH_FPU is not set` from a **NuttX Kconfig** file affects opensbi compilation, i.e. which files suddenly start referring those procedures ? Makes my head spin...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #6160: MPFS: Remove # CONFIG_ARCH_FPU is not set from defconfigs

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #6160:
URL: https://github.com/apache/incubator-nuttx/pull/6160#discussion_r859617730


##########
arch/risc-v/src/opensbi/Make.defs:
##########
@@ -30,6 +30,7 @@ OPENSBI_CSRCS += opensbi/opensbi-3rdparty/lib/utils/timer/aclint_mtimer.c
 
 OPENSBI_ASRCS += opensbi/opensbi-3rdparty/lib/sbi/sbi_expected_trap.S
 OPENSBI_ASRCS += opensbi/opensbi-3rdparty/lib/sbi/sbi_hfence.S
+OPENSBI_ASRCS += opensbi/opensbi-3rdparty/lib/sbi/riscv_hardfp.S

Review Comment:
   But I'm not sure if this is needed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on pull request #6160: MPFS: Remove # CONFIG_ARCH_FPU is not set from defconfigs

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on PR #6160:
URL: https://github.com/apache/incubator-nuttx/pull/6160#issuecomment-1110817636

   > Found it, __riscv_flen is not defined if CONFIG_ARCH_FPU is not set, and is set otherwise
   
   yes. because of
   ```
     ifeq ($(CONFIG_ARCH_FPU),y)
       ARCHRVISAF = f
     endif
   ```
   it gets defined if `CONFIG_ARCH_FPU` is set


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pussuw commented on pull request #6160: MPFS: Remove # CONFIG_ARCH_FPU is not set from defconfigs

Posted by GitBox <gi...@apache.org>.
pussuw commented on PR #6160:
URL: https://github.com/apache/incubator-nuttx/pull/6160#issuecomment-1110781618

   > @pussuw : error happen in opensbi:
   > 
   > ```
   > /github/workspace/sources/nuttx/arch/risc-v/src/opensbi/opensbi-3rdparty/lib/sbi/sbi_hart.c:94: undefined reference to `put_f32_reg'
   > riscv64-unknown-elf-ld: /github/workspace/sources/nuttx/staging/libarch.a(sbi_misaligned_ldst.o): in function `sbi_misaligned_load_handler':
   > /github/workspace/sources/nuttx/arch/risc-v/src/opensbi/opensbi-3rdparty/lib/sbi/sbi_misaligned_ldst.c:142: undefined reference to `put_f64_reg'
   > riscv64-unknown-elf-ld: /github/workspace/sources/nuttx/arch/risc-v/src/opensbi/opensbi-3rdparty/lib/sbi/sbi_misaligned_ldst.c:136: undefined reference to `put_f32_reg'
   > riscv64-unknown-elf-ld: /github/workspace/sources/nuttx/staging/libarch.a(sbi_misaligned_ldst.o): in function `sbi_misaligned_store_handler':
   > /github/workspace/sources/nuttx/arch/risc-v/src/opensbi/opensbi-3rdparty/lib/sbi/sbi_misaligned_ldst.c:186: undefined reference to `get_f64_reg'
   > riscv64-unknown-elf-ld: /github/workspace/sources/nuttx/arch/risc-v/src/opensbi/opensbi-3rdparty/lib/sbi/sbi_misaligned_ldst.c:189: undefined reference to `get_f32_reg'
   > ```
   
   I'll look into it / delegate it internally. Did not expect nuttx kconfig values to affect opensbi sources.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on pull request #6160: MPFS: Remove # CONFIG_ARCH_FPU is not set from defconfigs

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on PR #6160:
URL: https://github.com/apache/incubator-nuttx/pull/6160#issuecomment-1110784816

   I think this is because `lib/sbi/riscv_hardfp.S` is not compiled


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #6160: MPFS: Remove # CONFIG_ARCH_FPU is not set from defconfigs

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged PR #6160:
URL: https://github.com/apache/incubator-nuttx/pull/6160


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pussuw commented on a diff in pull request #6160: MPFS: Remove # CONFIG_ARCH_FPU is not set from defconfigs

Posted by GitBox <gi...@apache.org>.
pussuw commented on code in PR #6160:
URL: https://github.com/apache/incubator-nuttx/pull/6160#discussion_r859625744


##########
arch/risc-v/src/opensbi/Make.defs:
##########
@@ -30,6 +30,7 @@ OPENSBI_CSRCS += opensbi/opensbi-3rdparty/lib/utils/timer/aclint_mtimer.c
 
 OPENSBI_ASRCS += opensbi/opensbi-3rdparty/lib/sbi/sbi_expected_trap.S
 OPENSBI_ASRCS += opensbi/opensbi-3rdparty/lib/sbi/sbi_hfence.S
+OPENSBI_ASRCS += opensbi/opensbi-3rdparty/lib/sbi/riscv_hardfp.S

Review Comment:
   Yep it was guarded so we can add the file safely, it will just become and empty object and garbage collection will wipe it



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #6160: MPFS: Remove # CONFIG_ARCH_FPU is not set from defconfigs

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #6160:
URL: https://github.com/apache/incubator-nuttx/pull/6160#discussion_r859617339


##########
arch/risc-v/src/opensbi/Make.defs:
##########
@@ -30,6 +30,7 @@ OPENSBI_CSRCS += opensbi/opensbi-3rdparty/lib/utils/timer/aclint_mtimer.c
 
 OPENSBI_ASRCS += opensbi/opensbi-3rdparty/lib/sbi/sbi_expected_trap.S
 OPENSBI_ASRCS += opensbi/opensbi-3rdparty/lib/sbi/sbi_hfence.S
+OPENSBI_ASRCS += opensbi/opensbi-3rdparty/lib/sbi/riscv_hardfp.S

Review Comment:
   ```suggestion
   ifeq ($(CONFIG_ARCH_FPU),y)
   OPENSBI_ASRCS += opensbi/opensbi-3rdparty/lib/sbi/riscv_hardfp.S
   endif
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pussuw commented on pull request #6160: MPFS: Remove # CONFIG_ARCH_FPU is not set from defconfigs

Posted by GitBox <gi...@apache.org>.
pussuw commented on PR #6160:
URL: https://github.com/apache/incubator-nuttx/pull/6160#issuecomment-1110801802

   Found it, __riscv_flen is not defined if # CONFIG_ARCH_FPU is not set, and is set otherwise


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #6160: MPFS: Remove # CONFIG_ARCH_FPU is not set from defconfigs

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #6160:
URL: https://github.com/apache/incubator-nuttx/pull/6160#issuecomment-1110779050

   @pussuw :
   error happen in opensbi:
   ```
   /github/workspace/sources/nuttx/arch/risc-v/src/opensbi/opensbi-3rdparty/lib/sbi/sbi_hart.c:94: undefined reference to `put_f32_reg'
   riscv64-unknown-elf-ld: /github/workspace/sources/nuttx/staging/libarch.a(sbi_misaligned_ldst.o): in function `sbi_misaligned_load_handler':
   /github/workspace/sources/nuttx/arch/risc-v/src/opensbi/opensbi-3rdparty/lib/sbi/sbi_misaligned_ldst.c:142: undefined reference to `put_f64_reg'
   riscv64-unknown-elf-ld: /github/workspace/sources/nuttx/arch/risc-v/src/opensbi/opensbi-3rdparty/lib/sbi/sbi_misaligned_ldst.c:136: undefined reference to `put_f32_reg'
   riscv64-unknown-elf-ld: /github/workspace/sources/nuttx/staging/libarch.a(sbi_misaligned_ldst.o): in function `sbi_misaligned_store_handler':
   /github/workspace/sources/nuttx/arch/risc-v/src/opensbi/opensbi-3rdparty/lib/sbi/sbi_misaligned_ldst.c:186: undefined reference to `get_f64_reg'
   riscv64-unknown-elf-ld: /github/workspace/sources/nuttx/arch/risc-v/src/opensbi/opensbi-3rdparty/lib/sbi/sbi_misaligned_ldst.c:189: undefined reference to `get_f32_reg'
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #6160: MPFS: Remove # CONFIG_ARCH_FPU is not set from defconfigs

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #6160:
URL: https://github.com/apache/incubator-nuttx/pull/6160#discussion_r859622256


##########
arch/risc-v/src/opensbi/Make.defs:
##########
@@ -30,6 +30,7 @@ OPENSBI_CSRCS += opensbi/opensbi-3rdparty/lib/utils/timer/aclint_mtimer.c
 
 OPENSBI_ASRCS += opensbi/opensbi-3rdparty/lib/sbi/sbi_expected_trap.S
 OPENSBI_ASRCS += opensbi/opensbi-3rdparty/lib/sbi/sbi_hfence.S
+OPENSBI_ASRCS += opensbi/opensbi-3rdparty/lib/sbi/riscv_hardfp.S

Review Comment:
   yes, it is `#ifdef __riscv_flen`. So this is not needed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org