avz: guard the S3C/capsule cases in the dcache-flush switch with CONFIG_SOO#275
Merged
Merged
Conversation
…IG_SOO The issue #274 dcache-flush optimization listed AVZ_INJECT_CAPSULE, AVZ_S3C_{READ,WRITE}_SNAPSHOT, AVZ_KILL_S3C and AVZ_GRANT_TABLE_OP in the flush switch outside #ifdef CONFIG_SOO, but those command macros are only defined via <soo/uapi/soo.h>, whose include is itself CONFIG_SOO-gated. A non-SOO AVZ build (e.g. the e1c-capsule config used by edge-m1) then failed to compile with "'AVZ_INJECT_CAPSULE' undeclared". These hypercalls are never issued without CONFIG_SOO (their handlers in the first switch are already guarded), so move the whole case group -- flush body included -- inside the existing #ifdef CONFIG_SOO. This also avoids the -Wswitch-unreachable warning that guarding only the labels would leave. Builds clean both ways: virt64_avz_defconfig (SOO off) and virt64_avz_soo_defconfig (SOO on).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The issue #274 dcache-flush optimization listed
AVZ_INJECT_CAPSULE,AVZ_S3C_{READ,WRITE}_SNAPSHOT,AVZ_KILL_S3CandAVZ_GRANT_TABLE_OPin theflush switch outside
#ifdef CONFIG_SOO, but those command macros are onlydefined via
<soo/uapi/soo.h>, whose include is itselfCONFIG_SOO-gated.A non-SOO AVZ build (e.g. the
virt64_avz_defconfig/ e1c-capsule config usedby edge-m1) therefore failed to compile:
These hypercalls are never issued without
CONFIG_SOO(their handlers in thefirst switch are already guarded), so move the whole case group — flush body
included — inside the existing
#ifdef CONFIG_SOO. Keeping the body inside theguard also avoids the
-Wswitch-unreachablewarning that guarding only thelabels would leave.
Validation
Builds clean both ways with the aarch64 cross toolchain:
virt64_avz_defconfig(CONFIG_SOO off) →hypercalls.ocompiles, no error, no warning.virt64_avz_soo_defconfig(CONFIG_SOO on) → compiles, SOO path unaffected.