[PATCH 5.4 147/214] arm64: Move handling of erratum 1418040 into C code