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/03/31 07:32:21 UTC
[GitHub] [incubator-nuttx] pussuw opened a new pull request #5919: arch/Kconfig: Add IRQ stack dependency to address environments
pussuw opened a new pull request #5919:
URL: https://github.com/apache/incubator-nuttx/pull/5919
When process a is switched to process b, the address environment
is swapped with a call to group_addrenv(). The stack upon entry
will be a's, and upon exit b's. This will fail, so a neutral stack
is required, either a kernel stack or an IRQ stack.
To me IRQ stack == kernel stack, so make the dependency like this.
## Summary
Sanity check
## Impact
None, unless someone uses ARCH_ADDRENV=y without an IRQ stack (which does not work as mentioned above)
## Testing
MPFS/icicle:knsh
--
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 a change in pull request #5919: arch/Kconfig: Add IRQ stack dependency to address environments
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #5919:
URL: https://github.com/apache/incubator-nuttx/pull/5919#discussion_r839417828
##########
File path: arch/Kconfig
##########
@@ -445,6 +445,7 @@ menuconfig ARCH_ADDRENV
bool "Address environments"
default n
depends on ARCH_HAVE_ADDRENV
+ depends on ARCH_INTERRUPTSTACK != 0
Review comment:
but "depends on ARCH_KERNEL_STACK || ARCH_INTERRUPTSTACK != 0" is more accurate.
--
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 a change in pull request #5919: arch/Kconfig: Add IRQ stack dependency to address environments
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #5919:
URL: https://github.com/apache/incubator-nuttx/pull/5919#discussion_r839494127
##########
File path: arch/Kconfig
##########
@@ -445,6 +445,7 @@ menuconfig ARCH_ADDRENV
bool "Address environments"
default n
depends on ARCH_HAVE_ADDRENV
+ depends on ARCH_INTERRUPTSTACK != 0
Review comment:
look like we have the circle dependence:(
--
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 change in pull request #5919: arch/Kconfig: Add IRQ stack dependency to address environments
Posted by GitBox <gi...@apache.org>.
pussuw commented on a change in pull request #5919:
URL: https://github.com/apache/incubator-nuttx/pull/5919#discussion_r839499676
##########
File path: arch/Kconfig
##########
@@ -445,6 +445,7 @@ menuconfig ARCH_ADDRENV
bool "Address environments"
default n
depends on ARCH_HAVE_ADDRENV
+ depends on ARCH_INTERRUPTSTACK != 0
Review comment:
Yes but of course. The per process kernel stack requires an address environment. The intent of this commit was to add a guard against a misconfiguration as group_addrenv() cannot be executed on the user stack.
But I guess we are left with these options:
- Require the IRQ stack, which is not really true
- Abandon this change, and hope future users of ARCH_ADDRENV realize that a neutral stack is needed
- Something else ?
--
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 change in pull request #5919: arch/Kconfig: Add IRQ stack dependency to address environments
Posted by GitBox <gi...@apache.org>.
pussuw commented on a change in pull request #5919:
URL: https://github.com/apache/incubator-nuttx/pull/5919#discussion_r839410792
##########
File path: arch/Kconfig
##########
@@ -445,6 +445,7 @@ menuconfig ARCH_ADDRENV
bool "Address environments"
default n
depends on ARCH_HAVE_ADDRENV
+ depends on ARCH_INTERRUPTSTACK != 0
Review comment:
It could be done but more complex to implement.
A separate stack for exception handling is needed when address environments are in use. Using a common one is simple and effective, and as far as I could tell all targets (sabre6-quad, sama5, unreleased icicle) that use address environments also define an interrupt stack, because it is needed. So this change works for all.
--
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 a change in pull request #5919: arch/Kconfig: Add IRQ stack dependency to address environments
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #5919:
URL: https://github.com/apache/incubator-nuttx/pull/5919#discussion_r839504888
##########
File path: arch/Kconfig
##########
@@ -445,6 +445,7 @@ menuconfig ARCH_ADDRENV
bool "Address environments"
default n
depends on ARCH_HAVE_ADDRENV
+ depends on ARCH_INTERRUPTSTACK != 0
Review comment:
let's add static_assert in exception_common.S or
```
#if xxx
# error "yyy"
#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 a change in pull request #5919: arch/Kconfig: Add IRQ stack dependency to address environments
Posted by GitBox <gi...@apache.org>.
pussuw commented on a change in pull request #5919:
URL: https://github.com/apache/incubator-nuttx/pull/5919#discussion_r839419200
##########
File path: arch/Kconfig
##########
@@ -445,6 +445,7 @@ menuconfig ARCH_ADDRENV
bool "Address environments"
default n
depends on ARCH_HAVE_ADDRENV
+ depends on ARCH_INTERRUPTSTACK != 0
Review comment:
True, however the infrastructure for using ARCH_KERNEL_STACK for this is not in place for any of the targets. So it can be a bit misleading IMO.
--
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 change in pull request #5919: arch/Kconfig: Add IRQ stack dependency to address environments
Posted by GitBox <gi...@apache.org>.
pussuw commented on a change in pull request #5919:
URL: https://github.com/apache/incubator-nuttx/pull/5919#discussion_r839430812
##########
File path: arch/Kconfig
##########
@@ -445,6 +445,7 @@ menuconfig ARCH_ADDRENV
bool "Address environments"
default n
depends on ARCH_HAVE_ADDRENV
+ depends on ARCH_INTERRUPTSTACK != 0
Review comment:
Sure, I'll add it here
--
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 a change in pull request #5919: arch/Kconfig: Add IRQ stack dependency to address environments
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #5919:
URL: https://github.com/apache/incubator-nuttx/pull/5919#discussion_r839397110
##########
File path: arch/Kconfig
##########
@@ -445,6 +445,7 @@ menuconfig ARCH_ADDRENV
bool "Address environments"
default n
depends on ARCH_HAVE_ADDRENV
+ depends on ARCH_INTERRUPTSTACK != 0
Review comment:
per task kernel stack also work?
--
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 change in pull request #5919: arch/Kconfig: Add IRQ stack dependency to address environments
Posted by GitBox <gi...@apache.org>.
pussuw commented on a change in pull request #5919:
URL: https://github.com/apache/incubator-nuttx/pull/5919#discussion_r839508004
##########
File path: arch/Kconfig
##########
@@ -445,6 +445,7 @@ menuconfig ARCH_ADDRENV
bool "Address environments"
default n
depends on ARCH_HAVE_ADDRENV
+ depends on ARCH_INTERRUPTSTACK != 0
Review comment:
Yeah makes sense, I'll do that instead
--
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 #5919: arch/Kconfig: Add IRQ stack dependency to address environments
Posted by GitBox <gi...@apache.org>.
pussuw commented on pull request #5919:
URL: https://github.com/apache/incubator-nuttx/pull/5919#issuecomment-1084470344
Abandoning
--
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 a change in pull request #5919: arch/Kconfig: Add IRQ stack dependency to address environments
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #5919:
URL: https://github.com/apache/incubator-nuttx/pull/5919#discussion_r839424931
##########
File path: arch/Kconfig
##########
@@ -445,6 +445,7 @@ menuconfig ARCH_ADDRENV
bool "Address environments"
default n
depends on ARCH_HAVE_ADDRENV
+ depends on ARCH_INTERRUPTSTACK != 0
Review comment:
Once it's implemented, the problem is resolved naturally, why not relax this condition at the beginning? I am afraid the developer who implement the kernel stack forget to change the condition, and other people who doesn't familiar the internal detail misunderstand that they can't remove the interrupt stack even the per task kernel stack is enabled.
--
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 a change in pull request #5919: arch/Kconfig: Add IRQ stack dependency to address environments
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #5919:
URL: https://github.com/apache/incubator-nuttx/pull/5919#discussion_r839504888
##########
File path: arch/Kconfig
##########
@@ -445,6 +445,7 @@ menuconfig ARCH_ADDRENV
bool "Address environments"
default n
depends on ARCH_HAVE_ADDRENV
+ depends on ARCH_INTERRUPTSTACK != 0
Review comment:
let's add static_assert in exception_common.S?
--
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 closed pull request #5919: arch/Kconfig: Add IRQ stack dependency to address environments
Posted by GitBox <gi...@apache.org>.
pussuw closed pull request #5919:
URL: https://github.com/apache/incubator-nuttx/pull/5919
--
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