aspeed/smc: Cache AspeedSMCClass
authorCédric Le Goater <clg@kaod.org>
Mon, 24 Oct 2022 09:20:15 +0000 (11:20 +0200)
committerCédric Le Goater <clg@kaod.org>
Mon, 24 Oct 2022 09:20:15 +0000 (11:20 +0200)
commitb84a9482a3c9e3b6fbdf1fd4b0477e4a7a51683e
tree3059a9ebf45c60cab849ad5504abdf3d39fc3241
parentdb96605a49b334eeb2a5d1cc12981778f7d792aa
aspeed/smc: Cache AspeedSMCClass

Store a reference on the AspeedSMC class under the flash object and
use it when accessing the flash contents. Avoiding the class cast
checkers in these hot paths improves performance by 10% when running
the aspeed avocado tests.

Message-Id: <20220923084803.498337-7-clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
hw/ssi/aspeed_smc.c
include/hw/ssi/aspeed_smc.h