Searched hist:c2fb8ef66ccc8222c70ab802cdaf29f1592cbbb6 (Results 1 – 2 of 2) sorted by relevance
| /rk3399_ARM-atf/plat/qti/common/src/ |
| H A D | qti_pm.c | c2fb8ef66ccc8222c70ab802cdaf29f1592cbbb6 Mon Nov 14 10:39:48 UTC 2022 Andre Przywara <andre.przywara@arm.com> feat(aarch64): make ID system register reads non-volatile
Our system register access function wrappers are using "volatile" inline assembly instructions. On the first glance this is a good idea, since many system registers have side effects, and we don't want the compiler to optimise or reorder them (what "volatile" prevents).
However this also naturally limits the compiler's freedom to optimise code better, and those volatile properties don't apply to every type of system register. One example are the CPU ID registers, which have constant values, are side-effect free and read-only.
Introduce a new wrapper type that drops the volatile keyword, and use that for the wrappers instantiating ID register accessors.
This allows the compiler to freely optimise those instructions away, if their result isn't actually used, which can trigger further optimisations.
Change-Id: I3c64716ae4f4bf603f0ea57b652bd50bcc67bb0e Signed-off-by: Andre Przywara <andre.przywara@arm.com>
|
| /rk3399_ARM-atf/include/arch/aarch64/ |
| H A D | arch_helpers.h | c2fb8ef66ccc8222c70ab802cdaf29f1592cbbb6 Mon Nov 14 10:39:48 UTC 2022 Andre Przywara <andre.przywara@arm.com> feat(aarch64): make ID system register reads non-volatile
Our system register access function wrappers are using "volatile" inline assembly instructions. On the first glance this is a good idea, since many system registers have side effects, and we don't want the compiler to optimise or reorder them (what "volatile" prevents).
However this also naturally limits the compiler's freedom to optimise code better, and those volatile properties don't apply to every type of system register. One example are the CPU ID registers, which have constant values, are side-effect free and read-only.
Introduce a new wrapper type that drops the volatile keyword, and use that for the wrappers instantiating ID register accessors.
This allows the compiler to freely optimise those instructions away, if their result isn't actually used, which can trigger further optimisations.
Change-Id: I3c64716ae4f4bf603f0ea57b652bd50bcc67bb0e Signed-off-by: Andre Przywara <andre.przywara@arm.com>
|