]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: rtas_flash needs to use rtas_data_buf
authorMilton Miller <miltonm@us.ibm.com>
Sat, 12 Jun 2010 03:48:47 +0000 (03:48 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 15 Jun 2010 05:02:37 +0000 (15:02 +1000)
commita78cce60e2b12d61dea733f92b6619dcab96b58d
tree229dc6bbc855c2391343a0bf5202aae0bbf1d2bb
parent3a1a2b7047bbb8ad762782ea865a390a5bc2404f
powerpc: rtas_flash needs to use rtas_data_buf

When trying to flash a machine via the update_flash command, Anton received the
following error:

    Restarting system.
    FLASH: kernel bug...flash list header addr above 4GB

The code in question has a comment that the flash list should be in
the kernel data and therefore under 4GB:

        /* NOTE: the "first" block list is a global var with no data
         * blocks in the kernel data segment.  We do this because
         * we want to ensure this block_list addr is under 4GB.
         */

Unfortunately the Kconfig option is marked tristate which means the variable
may not be in the kernel data and could be above 4GB.

Instead of relying on the data segment being below 4GB, use the static
data buffer allocated by the kernel for use by rtas.  Since we don't
use the header struct directly anymore, convert it to a simple pointer.

Reported-By: Anton Blanchard <anton@samba.org>
Signed-Off-By: Milton Miller <miltonm@bga.com
Tested-By: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/rtas_flash.c