]> git.baikalelectronics.ru Git - arm-tf.git/commit
refactor(cpufeat): check FEAT_FGT in a new way
authorAndre Przywara <andre.przywara@arm.com>
Mon, 14 Nov 2022 15:42:44 +0000 (15:42 +0000)
committerAndre Przywara <andre.przywara@arm.com>
Wed, 11 Jan 2023 16:02:58 +0000 (16:02 +0000)
commitb45dd74e3a1b125eb231a873c663e92da797b7fa
tree89aa6ec1a3db7589b42ace64556694b71a3c5efa
parent69c17f52f90b55bcaf7c4e4e72babe30fe3a79eb
refactor(cpufeat): check FEAT_FGT in a new way

To implement proper runtime checking of features, and to be able to
extend feat_detect.c to catch other cases, rework the FEAT_FGT check to
directly call a generic function instead of providing a trivial specific
one. The #ifdef is moved into the function, and rewritten as a proper C
if statement.
We need to force the compiler to inline that function, otherwise the
optimisation won't work, once we exceed a certain number of callers.

This starts with FEAT_FGT, but all the other features will be moved over
eventually, in separate patches.

For all features checked this way, we delay the panic() until after
every feature has been checked, to list them all during one run.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Change-Id: Ic576922ff2c4f8d3c1b87b5843b3626729fe4514
common/feat_detect.c