riscv-rt: new attribute macro to define custom _setup_interrupts function.
#390
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR provides the following changes:
custom-setup-interruptsfeature to opt-out the default implementation of_setup_interrupts_default_setup_interruptssymbol that acts as a weak implementation of_default_setup_interrupts,riscv-rtnow directly defines_setup_interrupts(protected under a feature gate). This reduces the amount of code in the final binary when users define their custom interrupt setup routine._setup_interruptscan accept anusizeinput argument that corresponds to the ID of the running hart. This might be useful in multi-hart targets to define hart-specific interrupt setup routines.riscv_macros::setup_interruptsattribute macro for aiding users defining their custom interrupt setup routine.About feature naming
I think
custom-setup-interruptsis a clear name for the feature, as it should be activated whenever users want to implement their custom interrupt setup routine. However, previous similar features follow ano-*name (e.g.,no-interruptsorno-exceptions). Let me know if you prefer to stick to theno-*naming or if you prefer usingcustom-*.While I am currently more inclined to
custom-*, I would like to know you opinion.