-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bsp: cvitek: fix cv18xx_risc-v and c906_little IRQ_MAX_NR error num #9261
Conversation
Analysis: The IRQ_MAX_NR value of cv18xx_risc-v is wrong. The wrong IRQ_MAX_NR will cause the install of an interrupt number larger than its value to fail. Solution: Change IRQ_MAX_NR to the correct value 101 in the datasheet. Signed-off-by: Shicheng Chu <[email protected]> Reviewed-by: Chen Wang <[email protected]>
@@ -15,7 +15,7 @@ | |||
|
|||
#define IRQ_OFFSET 16 | |||
#ifndef IRQ_MAX_NR | |||
#define IRQ_MAX_NR 207 | |||
#define IRQ_MAX_NR 61 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
既然是作为 Kconfig 配置了,为啥还要在头文件中定义?请继续研究。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里只有在没有定义 IRQ_MAX_NR 的情况下才会启用。且该文件没有统一使用 libcpu 中的文件,继续推进可能涉及到 #8977
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
见上面 comments。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要继续修改
Analysis: The IRQ_MAX_NR value of c906_little is wrong. interrupt.h relies on IRQ_MAX_NR defined in rtconfig.h but does not explicitly include this header file. Solution: Change IRQ_MAX_NR to the correct value 61 in the datasheet. Explicitly include rtconfig.h in interrupt.h. Signed-off-by: Shicheng Chu <[email protected]> Reviewed-by: Chen Wang <[email protected]>
e671783
to
f35f06d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请将 commit 压缩成一个后再提交 review。
review request 前请仔细检查。
是因为 #9259 建议大小核分成两个 commit |
sorry, 我忘记了,我收回我的话。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已 review。
注意,这个 PR 包含了多个 commit,merge 时请保留,不要 squash,因为这是提交上的设计使然,不是中间过程。具体原因参考 #9259
拉取/合并请求描述:(PR description)
[
为什么提交这份PR (why to submit this PR)
Fixed #9259
你的解决方案是什么 (what is your solution)
参照datasheet将cv18xx_risc-v和c906_little的IRQ_MAX_NR值分别改为101和61
请提供验证的bsp和config (provide the config and bsp)
]
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0
代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up