]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Don't flush/invalidate the d/icache for an unknown relocation type
authorKevin Hao <haokexin@gmail.com>
Thu, 27 Jun 2013 01:09:43 +0000 (09:09 +0800)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 1 Jul 2013 01:10:34 +0000 (11:10 +1000)
commitf08038d62ed9b8c6223b4572170669f38a94c920
tree987f8ab221d1a3172212605b4f17dc4e8da7485d
parent593992b3a8654c4faa3c37f8440ea19a82265131
powerpc: Don't flush/invalidate the d/icache for an unknown relocation type

For an unknown relocation type since the value of r4 is just the 8bit
relocation type, the sum of r4 and r7 may yield an invalid memory
address. For example:
    In normal case:
             r4 = c00xxxxx
             r7 = 40000000
             r4 + r7 = 000xxxxx

    For an unknown relocation type:
             r4 = 000000xx
             r7 = 40000000
             r4 + r7 = 400000xx
   400000xx is an invalid memory address for a board which has just
   512M memory.

And for operations such as dcbst or icbi may cause bus error for an
invalid memory address on some platforms and then cause the board
reset. So we should skip the flush/invalidate the d/icache for
an unknown relocation type.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Acked-by: Suzuki K. Poulose <suzuki@in.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/reloc_32.S