]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ARM: 7010/1: mm: fix invalid loop for poison_init_mem
authorJamie Iles <jamie@jamieiles.com>
Thu, 4 Aug 2011 08:39:31 +0000 (09:39 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 8 Aug 2011 08:38:06 +0000 (09:38 +0100)
commita1acf44d1fc47c242edc549dd535d0ef0b73cf1d
tree16a6ffb520d880cdc8662539d3369960e81cb5ba
parent769977be1c08d033f3907819cda752274b4c5d16
ARM: 7010/1: mm: fix invalid loop for poison_init_mem

poison_init_mem() used a loop of:

while ((count = count - 4))

which has 2 problems - an off by one error so that we do one less word
than we should, and the other is that if count == 0 then we loop forever
and poison too much.  On a platform with HAVE_TCM=y but nothing in the
TCM's, this caused corruption and the platform failed to boot.

Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/init.c