-
Notifications
You must be signed in to change notification settings - Fork 7.3k
arch: arm: clean up inclusions in assembly files #19709
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
arch: arm: clean up inclusions in assembly files #19709
Conversation
3c7d59f
to
d3bed7c
Compare
@stephanosio can you review this? |
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.
@stephanosio thanks again for the review.
So, I did another iteration and I am leaning towards the following order for inclusions in ASM:
- never include kernel_structs.h
- include always toolchain.h and linker/sections.h
- include offsets-short.h, if ASM accesses "offset" constants
- include arch/cpu.h, if ASM accesses CMSIS constants (defined locally in include/arch/arm)
- include file-specific headers, if ASM needs them (e.g. vector-table.h)
1fda513
to
7d35fb2
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.
@stephanosio could you take a look once 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.
Functionally, it looks good to me.
On a side note, not to be pedantic or anything but z_NanoFatalErrorHandler
in the comment seems to have been phased out.
This needs to be updated, good catch. I'll add it to the change. |
A clean-up commit that removes unnecessary inclusions from assembly files in arm/core and arm/core/cortex_m. It also ogranizes the inclusions based on the following order and set of rules: - never include kernel_structs.h - include toolchain.h and linker/sections.h in all ASM files - include offsets-short.h, if ASM accesses offset constants - include arch/cpu.h, if ASM accesses CMSIS constants (defined locally in include/arch/arm) - include file-specific headers, if needed (e.g. vector-table.h) Signed-off-by: Ioannis Glaropoulos <[email protected]>
arch/arm/core is shared between Cortex-M and Cortex-R, so enhance the file description headers accordingly. Signed-off-by: Ioannis Glaropoulos <[email protected]>
7d35fb2
to
ee1e268
Compare
@ioannisg is there any supporting Zephyr’s board based on Cortex-R? Thanks |
@wentongwu I'm currently working on TI Hercules support, which includes support for LAUNCHXL2-RM46 (see #19644 for more info). It only boots |
@stephanosio Thanks for the info. |
A clean-up commit that removes unnecessary inclusions from
assembly files in arm/core and arm/core/cortex_m.
Signed-off-by: Ioannis Glaropoulos [email protected]
No functional changes.
A second commit enhances the file descriptions under /arm/core, to stress that these are common source for -M and -R CPUs