Re: powerpc/ppc64: Allow allmodconfig to build (finally !)
From: Guenter Roeck <linux@roeck-us.net>
Date: 2014-05-13 00:28:58
On Mon, May 12, 2014 at 03:57:34PM +1000, Benjamin Herrenschmidt wrote:
This shuffles code around in exceptions-64s.S in order to allow an allmodconfig build to succeed. The main problems were: - We have a fixed hole from 0x7000 to 0x8000 for use by FW, under some circumstances the code before that would grow too big and hit the . = 0x7000 - The various attempts at making space in there would trigger cases where short conditional branches from assembly would no longer be able to reach their target. This is especially nasty when these branches reside in alternate feature sections which are appended at the end of each .o file This fixes it by essentially moving all the "second level" exception handlers to after the hole and moving a couple of functions near the hole itself so they sit at reachable distance of both the first level handlers (before the hole) and the alternate feature sections (end of file). In the long run, if we start hitting this again, we'll probably have to split the file in two, probably at the hole location, to keep the alt sections used by the first level handlers close to them, and move everything else further away. But for now, this will do. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Ben, After applying this patch, I get arch/powerpc/kernel/exceptions-64s.S:269: Error: operand out of range (0x000000000000814c is not between 0xffffffffffff8000 and 0x0000000000007ffc) arch/powerpc/kernel/exceptions-64s.S:729: Error: operand out of range (0x000000000000814c is not between 0xffffffffffff8000 and 0x0000000000007ffc) with powerpc:defconfig, powerpc:allmodconfig, powerpc:cell_defconfig, and powerpc:maple_defconfig. This is on top of v3.15-rc5. Any idea what is going on ? Compiler is powerpc64-poky-linux-gcc (GCC) 4.7.2 (from poky 1.4.0-1). Thanks, Guenter