You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "lipengfei28 (via GitHub)" <gi...@apache.org> on 2025/11/25 08:09:33 UTC
[PR] Config irq type [nuttx]
lipengfei28 opened a new pull request, #17377:
URL: https://github.com/apache/nuttx/pull/17377
arm/arm64 add
up_set_irq_type
up_prioritize_irq
up_set_trigger_mode_irq
up_trigger_irq
*Update this section with information on why change is necessary,
what it exactly does and how, if new feature shows up, provide
references (dependencies, similar problems and solutions), etc.*
## Impact
*Update this section, where applicable, on how change affects users,
build process, hardware, documentation, security, compatibility, etc.*
## Testing
*This section should provide a detailed description of what you did
to verify your changes work and do not break existing code.*
*Please provide information about your host machine, the board(s) you
tested your changes on, and how you tested. Logs should be included.*
*For example, when changing something in the core OS functions, you
may want to run the OSTest application to verify that there are no
regressions. Changes to ADC code may warrant running the `adc`
example. Adding a new uORB driver may require that you run
`uorb_listener` to verify correct operation.*
*Pure documentation changes can just be tested with `make html`
(see docs) and verification of the correct format in your
browser.*
**_PRs without testing information will not be accepted. We will
request test logs._**
--
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
Re: [PR] Config irq type [nuttx]
Posted by "lipengfei28 (via GitHub)" <gi...@apache.org>.
lipengfei28 commented on PR #17377:
URL: https://github.com/apache/nuttx/pull/17377#issuecomment-3594658912
> @lipengfei28 please include Testing hardware proving it still working fine
done
--
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
Re: [PR] Config irq type [nuttx]
Posted by "lipengfei28 (via GitHub)" <gi...@apache.org>.
lipengfei28 commented on code in PR #17377:
URL: https://github.com/apache/nuttx/pull/17377#discussion_r2564384593
##########
arch/arm64/src/common/arm64_gicv2.c:
##########
@@ -1435,23 +1348,58 @@ void arm64_gic_secondary_init(void)
}
/****************************************************************************
- * Name: arm64_gic_raise_sgi
+ * Name: up_trigger_irq
*
* Description:
- * Raise software generated interrupt to the target
+ * Perform a Software Generated Interrupt (SGI). If CONFIG_SMP is
+ * selected, then the SGI is sent to all CPUs specified in the CPU set.
+ * That set may include the current CPU.
*
- * Input Parameters
- * sgi - The SGI interrupt ID (0-15)
+ * If CONFIG_SMP is not selected, the cpuset is ignored and SGI is sent
+ * only to the current CPU.
+ *
+ * Input Parameters:
+ * irq - The SGI interrupt ID (0-15)
* cpuset - The set of CPUs to receive the SGI
*
* Returned Value:
- * None
+ * OK is always returned at present.
*
****************************************************************************/
-void arm64_gic_raise_sgi(unsigned int sgi, uint16_t cpuset)
+void up_trigger_irq(int irq, uint16_t cpuset)
Review Comment:
done
--
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
Re: [PR] Config irq type [nuttx]
Posted by "lipengfei28 (via GitHub)" <gi...@apache.org>.
lipengfei28 commented on code in PR #17377:
URL: https://github.com/apache/nuttx/pull/17377#discussion_r2567073500
##########
arch/arm64/src/common/arm64_gicv2.c:
##########
@@ -1435,23 +1348,58 @@ void arm64_gic_secondary_init(void)
}
/****************************************************************************
- * Name: arm64_gic_raise_sgi
+ * Name: up_trigger_irq
*
* Description:
- * Raise software generated interrupt to the target
+ * Perform a Software Generated Interrupt (SGI). If CONFIG_SMP is
+ * selected, then the SGI is sent to all CPUs specified in the CPU set.
+ * That set may include the current CPU.
*
- * Input Parameters
- * sgi - The SGI interrupt ID (0-15)
+ * If CONFIG_SMP is not selected, the cpuset is ignored and SGI is sent
+ * only to the current CPU.
+ *
+ * Input Parameters:
+ * irq - The SGI interrupt ID (0-15)
* cpuset - The set of CPUs to receive the SGI
*
* Returned Value:
- * None
+ * OK is always returned at present.
*
****************************************************************************/
-void arm64_gic_raise_sgi(unsigned int sgi, uint16_t cpuset)
+void up_trigger_irq(int irq, uint16_t cpuset)
Review Comment:
cpuset_t is undefined.
--
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
Re: [PR] Config irq type [nuttx]
Posted by "anchao (via GitHub)" <gi...@apache.org>.
anchao commented on code in PR #17377:
URL: https://github.com/apache/nuttx/pull/17377#discussion_r2566989868
##########
include/nuttx/arch.h:
##########
@@ -92,6 +92,12 @@
* Pre-processor definitions
****************************************************************************/
+#define IRQ_RISING_EDGE 0x00
+#define IRQ_FALLING_EDGE 0x01
+#define IRQ_BOTH_EDGE 0x02
+#define IRQ_HIGH_LEVEL 0x03
+#define IRQ_LOW_LEVEL 0x04
Review Comment:
move the level and edge types first will make define more clearly, but this is not a mandatory option just my personal suggestion.
--
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
Re: [PR] arch/arm64: config irq type [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #17377:
URL: https://github.com/apache/nuttx/pull/17377
--
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
Re: [PR] Config irq type [nuttx]
Posted by "linguini1 (via GitHub)" <gi...@apache.org>.
linguini1 commented on code in PR #17377:
URL: https://github.com/apache/nuttx/pull/17377#discussion_r2569315374
##########
arch/arm/src/imx6/imx_serial.c:
##########
@@ -599,7 +599,7 @@ static int imx_attach(struct uart_dev_s *dev)
{
/* Configure as a (high) level interrupt */
- arm_gic_irq_trigger(priv->irq, false);
+ up_set_irq_type(priv->irq, IRQ_HIG_HLEVEL);
Review Comment:
This indicates that the changes were not even compile-tested. I will not trust this PR getting merged unless good test logs are provided.
--
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
Re: [PR] Config irq type [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #17377:
URL: https://github.com/apache/nuttx/pull/17377#discussion_r2560372402
##########
arch/arm64/src/common/arm64_gicv2.c:
##########
@@ -1435,23 +1348,58 @@ void arm64_gic_secondary_init(void)
}
/****************************************************************************
- * Name: arm64_gic_raise_sgi
+ * Name: up_trigger_irq
*
* Description:
- * Raise software generated interrupt to the target
+ * Perform a Software Generated Interrupt (SGI). If CONFIG_SMP is
+ * selected, then the SGI is sent to all CPUs specified in the CPU set.
+ * That set may include the current CPU.
*
- * Input Parameters
- * sgi - The SGI interrupt ID (0-15)
+ * If CONFIG_SMP is not selected, the cpuset is ignored and SGI is sent
+ * only to the current CPU.
+ *
+ * Input Parameters:
+ * irq - The SGI interrupt ID (0-15)
* cpuset - The set of CPUs to receive the SGI
*
* Returned Value:
- * None
+ * OK is always returned at present.
*
****************************************************************************/
-void arm64_gic_raise_sgi(unsigned int sgi, uint16_t cpuset)
+void up_trigger_irq(int irq, uint16_t cpuset)
Review Comment:
uint16_t to cpuset_t
--
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
Re: [PR] Config irq type [nuttx]
Posted by "anchao (via GitHub)" <gi...@apache.org>.
anchao commented on code in PR #17377:
URL: https://github.com/apache/nuttx/pull/17377#discussion_r2559077779
##########
include/nuttx/arch.h:
##########
@@ -92,6 +92,12 @@
* Pre-processor definitions
****************************************************************************/
+#define IRQ_RISING_EDGE 0x00
+#define IRQ_FALLING_EDGE 0x01
+#define IRQ_BOTH_EDGE 0x02
+#define IRQ_HIGH_LEVEL 0x03
+#define IRQ_LOW_LEVEL 0x04
Review Comment:
```suggestion
#define IRQ_EDGE_RISING 0x00
#define IRQ_EDGE_FALLING 0x01
#define IRQ_EDGE_BOTH 0x02
#define IRQ_LEVEL_HIGH 0x03
#define IRQ_LEVEL_LOW 0x04
```
--
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
Re: [PR] Config irq type [nuttx]
Posted by "linguini1 (via GitHub)" <gi...@apache.org>.
linguini1 commented on PR #17377:
URL: https://github.com/apache/nuttx/pull/17377#issuecomment-3586472000
> done
I'm sorry but your descriptions still do not meet the requirements. Please read the contribution guidelines.
Your summary doesn't really explain what you've done, it just lists function names.
Your impact should include any required changes by other code to use this change or what this change effects. Right now your impact is closer to a summary.
Your testing section provides no information on how this change was tested and does not include logs. You also still have part of the default template there.
--
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
Re: [PR] Config irq type [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on code in PR #17377:
URL: https://github.com/apache/nuttx/pull/17377#discussion_r2569305679
##########
arch/arm/src/imx6/imx_serial.c:
##########
@@ -599,7 +599,7 @@ static int imx_attach(struct uart_dev_s *dev)
{
/* Configure as a (high) level interrupt */
- arm_gic_irq_trigger(priv->irq, false);
+ up_set_irq_type(priv->irq, IRQ_HIG_HLEVEL);
Review Comment:
Please fix the error IRQ_HIG_HLEVEL not defined
--
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
Re: [PR] Config irq type [nuttx]
Posted by "lipengfei28 (via GitHub)" <gi...@apache.org>.
lipengfei28 commented on code in PR #17377:
URL: https://github.com/apache/nuttx/pull/17377#discussion_r2575522032
##########
boards/arm64/bcm2711/raspberrypi-4b/configs/cgol/defconfig:
##########
@@ -14,6 +14,7 @@ CONFIG_ARCH_CHIP="bcm2711"
CONFIG_ARCH_CHIP_BCM2711=y
CONFIG_ARCH_EARLY_PRINT=y
CONFIG_ARCH_INTERRUPTSTACK=4096
+CONFIG_ARCH_IRQPRIO=y
Review Comment:
done
--
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
Re: [PR] Config irq type [nuttx]
Posted by "lipengfei28 (via GitHub)" <gi...@apache.org>.
lipengfei28 commented on code in PR #17377:
URL: https://github.com/apache/nuttx/pull/17377#discussion_r2567073500
##########
arch/arm64/src/common/arm64_gicv2.c:
##########
@@ -1435,23 +1348,58 @@ void arm64_gic_secondary_init(void)
}
/****************************************************************************
- * Name: arm64_gic_raise_sgi
+ * Name: up_trigger_irq
*
* Description:
- * Raise software generated interrupt to the target
+ * Perform a Software Generated Interrupt (SGI). If CONFIG_SMP is
+ * selected, then the SGI is sent to all CPUs specified in the CPU set.
+ * That set may include the current CPU.
*
- * Input Parameters
- * sgi - The SGI interrupt ID (0-15)
+ * If CONFIG_SMP is not selected, the cpuset is ignored and SGI is sent
+ * only to the current CPU.
+ *
+ * Input Parameters:
+ * irq - The SGI interrupt ID (0-15)
* cpuset - The set of CPUs to receive the SGI
*
* Returned Value:
- * None
+ * OK is always returned at present.
*
****************************************************************************/
-void arm64_gic_raise_sgi(unsigned int sgi, uint16_t cpuset)
+void up_trigger_irq(int irq, uint16_t cpuset)
Review Comment:
cpuset_t is undefined.
--
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
Re: [PR] Config irq type [nuttx]
Posted by "lipengfei28 (via GitHub)" <gi...@apache.org>.
lipengfei28 commented on PR #17377:
URL: https://github.com/apache/nuttx/pull/17377#issuecomment-3584324259
> PR requires proper description according to template.
done
--
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
Re: [PR] arch/arm64: config irq type [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #17377:
URL: https://github.com/apache/nuttx/pull/17377#issuecomment-3749246030
> Please format the description properly.
@linguini1 please review again.
--
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
Re: [PR] Config irq type [nuttx]
Posted by "lipengfei28 (via GitHub)" <gi...@apache.org>.
lipengfei28 commented on code in PR #17377:
URL: https://github.com/apache/nuttx/pull/17377#discussion_r2564382384
##########
include/nuttx/arch.h:
##########
@@ -92,6 +92,12 @@
* Pre-processor definitions
****************************************************************************/
+#define IRQ_RISING_EDGE 0x00
+#define IRQ_FALLING_EDGE 0x01
+#define IRQ_BOTH_EDGE 0x02
+#define IRQ_HIGH_LEVEL 0x03
+#define IRQ_LOW_LEVEL 0x04
Review Comment:
hi anchao
#define IRQ_RISING_EDGE 0x00
#define IRQ_FALLING_EDGE 0x01
#define IRQ_BOTH_EDGE 0x02
#define IRQ_HIGH_LEVEL 0x03
#define IRQ_LOW_LEVEL 0x04
I think these macros can clearly illustrate the types of interrupts.
--
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
Re: [PR] Config irq type [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #17377:
URL: https://github.com/apache/nuttx/pull/17377#issuecomment-3586503214
@lipengfei28 please include Testing hardware proving it still working fine
--
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