Linaro optimizations thnks to JustArchi

Change-Id: I10408cb6ec5fc1d5eab45407dcd4cf777215b3b0