[litmus] Enable check_dic_idc for PreSi and Kvm modes#1727
[litmus] Enable check_dic_idc for PreSi and Kvm modes#1727diaolo01 wants to merge 1 commit intoherd:masterfrom
Conversation
litmus/preSi.ml
Outdated
| | Some cache_type -> cache_type.dic, cache_type.idc in | ||
| begin match forall_procs test needs_dic, forall_procs test needs_idc with | ||
| | Some dic, Some idc -> | ||
| O.fi "check_dic_idc(%d, %d);" (if dic then 1 else 0) |
There was a problem hiding this comment.
It seems like we are checking DIC/IDC on one core and we assume that it's the same for all cores? Is that a good assumption?
If yes can you please add a comment here?
There was a problem hiding this comment.
Actually, this code was checking per core rather than a single core. The Arm ARM states: "All PEs in the same Inner Shareable shareability domain must have a common value of this field.".
I moved the check at the test level to match what is done for hardware updates. I have included a comment to capture the requirement above.
relokin
left a comment
There was a problem hiding this comment.
Two comments, otherwise this PR looks good to me.
|
|
||
| litmus-cata-aarch64-ifetch-test-kvm: litmus-aarch64-dep | ||
| mkdir $(KUT_DIR_AARCH64)/kvm-unit-tests/t | ||
| if $(RUN_TESTS); then NORUN=UDF+2FH; else NORUN=NO; fi ; \ |
There was a problem hiding this comment.
Couldn't you just do something along the lines of:
| if $(RUN_TESTS); then NORUN=UDF+2FH; else NORUN=NO; fi ; \ | |
| if $(RUN_TESTS); then \ | |
| NORUN=UDF+2FH \ | |
| TESTS=catalogue/aarch64-ifetch/tests/@dic0-idc0 \ | |
| else \ | |
| NORUN=NP \ | |
| TESTS=catalogue/aarch64-ifetch/tests/@all \ | |
| fi \ |
and then leave the recipe common for both?
| MP.FF+dc.cvau-dmb.ish+dsb.ish-ic.ivau-dsb.ish-rfiINSTNOP.litmus | ||
| MP.FF+dc.cvau-dsb.ish-ic.ivau-dsb.ish+dmb.ish+rfiINST.litmus | ||
| MP.FF+dc.cvau-dsb.ish-ic.ivau-dsb.ish+po.litmus | ||
| MP.FF+dc.cvau-dsb.ish-ic.vau-dsb.ish+dmb.ish+rfiINST.litmus |
This PR enables PreSi and Kvm modes to check whether a core has DIC/IDC implemented. It also runs tests with
DIC=0 & IDC=0as part ofmake-aarch64-litmus, while only compiling tests that require either DIC or IDC.=====
This has been identified as part of #1716. This fix has been tested against that patch and the desired behaviour was observed on an M2:
The missing call was not flagged by the compiler because GCC/Clang do not warn about unused
static inlinefunctions by default.