]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/nvram: Avoid unnecessary Xilinx eFuse backstore write
authorTong Ho <tong.ho@amd.com>
Wed, 26 Apr 2023 21:16:07 +0000 (14:16 -0700)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 17 Jul 2023 10:05:52 +0000 (11:05 +0100)
commitc2c1c4a35c7c2b1a4140b0942b9797c857e476a4
tree83c0c79893044cb23d374180c3fee16195fc95df
parente60a7d0d4d89c8bca8a74a877e31abce50e848e3
hw/nvram: Avoid unnecessary Xilinx eFuse backstore write

Add a check in the bit-set operation to write the backstore
only if the affected bit is 0 before.

With this in place, there will be no need for callers to
do the checking in order to avoid unnecessary writes.

Signed-off-by: Tong Ho <tong.ho@amd.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Francisco Iglesias <frasse.iglesias@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/nvram/xlnx-efuse.c