alpha: makefile: don't enforce small data model for kernel builds
PATCH 1/1 alpha: makefile: don't enforce small data model for kernel builds
Due to all of the goodness being packed into today's kernels, the resulting image isn't as slim as it once was.
In light of this, don't pass -msmall-data to the tools, which results in link failures due to impossible relocations when compiling anything but the most trivial configurations.
--- arch/alpha/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/alpha/Makefile +1 -1
@@ -12,7 +12,7 @@ NM := $(NM) -B LDFLAGS_vmlinux := -static -N #-relax CHECKFLAGS += -D__alpha__ -m64 -cflags-y := -pipe -mno-fp-regs -ffixed-8 -msmall-data +cflags-y := -pipe -mno-fp-regs -ffixed-8 cflags-y += $(call cc-option, -fno-jump-tables) cpuflags-$(CONFIG_ALPHA_EV4) := -mcpu=ev4
Signature · 1 line
1.8.0
Quoted 6 lines · Will Deacon
Due to all of the goodness being packed into today's kernels, the resulting image isn't as slim as it once was.
In light of this, don't pass -msmall-data to the tools, which results in link failures due to impossible relocations when compiling anything but the most trivial configurations.
I think many of us have been using -mlarge-data when compiling with gcc-4.6 or later so maybe it is time to get the change upstream.
The interesting thing is that the kernel still compiles fine with gcc-4.5 and the relocation errors only appear if compiling with gcc-4.6 or later. I had asked before on this forum what had changed with gcc-4.6 that results in the extra usage of the small data area but never got an answer. I am still curious to know.
BTW, the phrase "to the tools" in the commit message makes me think immediately of the tools directory (containing perf, etc.) which is not what is intended.
Matt: Are you able to collect up this and the other patches of Will and get them sent to Linus?
Cheers
Michael.
Will Deacon
Tested-by Thorsten KranzkowskiQuoted 19 lines · Michael Cree
Quoted 8 lines · Will Deacon
Due to all of the goodness being packed into today's kernels, the resulting image isn't as slim as it once was.
In light of this, don't pass -msmall-data to the tools, which results in
link failures due to impossible relocations when compiling anything but
the most trivial configurations.I think many of us have been using -mlarge-data when compiling with gcc-4.6 or later so maybe it is time to get the change upstream.
The interesting thing is that the kernel still compiles fine with gcc-4.5 and the relocation errors only appear if compiling with gcc-4.6 or later. I had asked before on this forum what had changed with gcc-4.6 that results in the extra usage of the small data area but never got an answer. I am still curious to know.
Quoted 6 lines
BTW, the phrase "to the tools" in the commit message makes me think immediately of the tools directory (containing perf, etc.) which is not what is intended.
Matt: Are you able to collect up this and the other patches of Will and get them sent to Linus?
Any news on these? I've included an updated version of the first patch, with the Tested-by-tag and a tweaked commit message below.
Will
--->8
From 8cbd016322bb01593795ec76cbdcbb52ac010203 Mon Sep 17 00:00:00 2001
From: Will Deacon <[email protected]>
Date: Mon, 4 Mar 2013 04:46:44 +0000
Subject: [PATCH] alpha: makefile: don't enforce small data model for kernel
builds
Due to all of the goodness being packed into today's kernels, the resulting image isn't as slim as it once was.
In light of this, don't pass -msmall-data to gcc, which otherwise results in link failures due to impossible relocations when compiling anything but the most trivial configurations.
--- arch/alpha/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/alpha/Makefile +1 -1
@@ -12,7 +12,7 @@ NM := $(NM) -B LDFLAGS_vmlinux := -static -N #-relax CHECKFLAGS += -D__alpha__ -m64 -cflags-y := -pipe -mno-fp-regs -ffixed-8 -msmall-data +cflags-y := -pipe -mno-fp-regs -ffixed-8 cflags-y += $(call cc-option, -fno-jump-tables) cpuflags-$(CONFIG_ALPHA_EV4) := -mcpu=ev4
Signature · 1 line
1.8.0
Hi!
Quoted 2 lines · Will Deacon
Any news on these? I've included an updated version of the first patch, with the Tested-by-tag and a tweaked commit message below.
As a data point, I tried vanilla 3.8.4 on the weekend. With my usual config on a UP1500, it will fail at build time with relocation errors. If I remove -msmall-data (or replace it with ~big~), the machine hangs hard immediatly after aboot telling me it's starting it. I'll take a closer look later today, but there seems to be a very fundamental thing wrong with the startup code in these scenarios.
Regards,
Tobias
Signature · 2 lines
"Brain, konban wa nani o shimashitai?" "Your Japanese is terrible, Pinky."
Quoted 9 lines · Tobias Klausmann
Quoted 2 lines · Will Deacon
Any news on these? I've included an updated version of the first patch, with the Tested-by-tag and a tweaked commit message below.
As a data point, I tried vanilla 3.8.4 on the weekend. With my usual config on a UP1500, it will fail at build time with relocation errors. If I remove -msmall-data (or replace it with ~big~), the machine hangs hard immediatly after aboot telling me it's starting it.
You probably want the "alpha: Add irongate_io to to PCI bus resources" patch posted by Matt Turner in the linux-alpha forum. Looks like it has not been sent to Linus.
If Matt does not respond in the next day or two I'll collect patches and send them on to Linus.
Cheers
Michael.
Matt Turner
maintainerQuoted 16 lines · Michael Cree
Quoted 8 lines · Tobias Klausmann
Quoted 4 lines · Will Deacon
Any news on these? I've included an updated version of the first patch, with
the Tested-by-tag and a tweaked commit message below.Quoted 5 lines
As a data point, I tried vanilla 3.8.4 on the weekend. With my usual config on a UP1500, it will fail at build time with relocation errors. If I remove -msmall-data (or replace it with ~big~), the machine hangs hard immediatly after aboot telling me it's starting it.
Quoted 6 lines
You probably want the "alpha: Add
irongate_ioto to PCI bus resources" patch posted by Matt Turner in the linux-alpha forum. Looks like it has not been sent to Linus.If Matt does not respond in the next day or two I'll collect patches and send them on to Linus.
Yes, please do. I haven't powered on an alpha in a few months.
Matt
Quoted 21 lines · Matt Turner
Quoted 5 lines · Michael Cree
Quoted 4 lines · Tobias Klausmann
Quoted 2 lines · Will Deacon
Any news on these? I've included an updated version of the first
patch,
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
with
the Tested-by-tag and a tweaked commit message below.Quoted 8 lines
Quoted 5 lines
As a data point, I tried vanilla 3.8.4 on the weekend. With my usual config on a UP1500, it will fail at build time with relocation errors. If I remove -msmall-data (or replace it with ~big~), the machine hangs hard immediatly after aboot telling me it's starting it.
You probably want the "alpha: Add
irongate_ioto to PCI busresources" patch
Quoted 1 line
posted by Matt Turner in the linux-alpha forum. Looks like it has
Quoted 8 lines
not been
Quoted 3 lines
sent to Linus.
If Matt does not respond in the next day or two I'll collect
patches and
Quoted 1 line
send them on to Linus.
Yes, please do. I haven't powered on an alpha in a few months.
What would it take to add Alpha system support to qemu? (It's got userspace, but not the system management mode instructions, mmu, or a board emulation.)
Rob
Hi!
Quoted 12 lines · Michael Cree
Quoted 10 lines · Tobias Klausmann
Quoted 3 lines · Will Deacon
Any news on these? I've included an updated version of the first patch, with
the Tested-by-tag and a tweaked commit message below.As a data point, I tried vanilla 3.8.4 on the weekend. With my usual config on a UP1500, it will fail at build time with relocation errors. If I remove -msmall-data (or replace it with ~big~), the machine hangs hard immediatly after aboot telling me it's starting it.
Quoted 3 lines
You probably want the "alpha: Add
irongate_ioto to PCI bus resources" patch posted by Matt Turner in the linux-alpha forum. Looks like it has not been sent to Linus.
Tried that, same effect. Interestingly, rebooting without a full init cycle crashes differently:
aboot: loading uncompressed vmlinuz-3.8.4...
aboot: loading compressed vmlinuz-3.8.4...
aboot: PHDR 0 vaddr 0xfffffc0000310000 offset 0x100 size 0x59e4ac
aboot: bss at 0xfffffc00008ae4ac, size 0x1814dc
aboot: zero-filling 1578204 bytes at 0xfffffc00008ae4ac
aboot: starting kernel vmlinuz-3.8.4 with arguments root=/dev/md0 console=tty1 console=ttyS0 rootfstype=ext4
halted CPU 0
halt code = 5
HALT instruction executed
PC = fffffc00008b4e40
IrqVectorSet 60
Adding Vector ffffffe0 b
impure halt code 5
Quoted 1 line
Quoted 1 line
Quoted 1 line
Without the irongate patch, the same (HALT on soft reboot, hard crash on full init) happens.
Any hints on making the whole thing more debuggable are appreciated.
Regards,
Tobias
Signature · 2 lines
One of the main causes of the fall of the roman empire was that, lacking zero, they had no way to indicate successful termination of their C programs.
Hi!
On a whim, I tried fiddling with ALPHA_LEGACY_START_ADDRESS. While this necessitates switching the system type to GENERIC_ALPHA, it makes the whole thing work. I suspect the change in segment size shifted stuff around enough to make the DP264 layout a "legacy" one.
Regards,
Tobias
Signature · 2 lines
Sent from aboard the Culture ship ROU (Killer-class) Trade Surplus
Hi guys,
Quoted 19 lines · Michael Cree
Quoted 8 lines · Will Deacon
Due to all of the goodness being packed into today's kernels, the resulting image isn't as slim as it once was.
In light of this, don't pass -msmall-data to the tools, which results in
link failures due to impossible relocations when compiling anything but
the most trivial configurations.I think many of us have been using -mlarge-data when compiling with gcc-4.6 or later so maybe it is time to get the change upstream.
The interesting thing is that the kernel still compiles fine with gcc-4.5 and the relocation errors only appear if compiling with gcc-4.6 or later. I had asked before on this forum what had changed with gcc-4.6 that results in the extra usage of the small data area but never got an answer. I am still curious to know.
Quoted 6 lines
BTW, the phrase "to the tools" in the commit message makes me think immediately of the tools directory (containing perf, etc.) which is not what is intended.
Matt: Are you able to collect up this and the other patches of Will and get them sent to Linus?
I noticed Matt agreed to this, but I was dropped from CC:
https://lkml.org/lkml/2013/3/25/486
Any chance you could send the patches on please?
Thanks,
Will
Quoted 6 lines · Will Deacon
Due to all of the goodness being packed into today's kernels, the resulting image isn't as slim as it once was.
In light of this, don't pass -msmall-data to the tools, which results in link failures due to impossible relocations when compiling anything but the most trivial configurations.
I use the same patch locally for quite some time, so
Quoted 22 lines
Cc Richard Henderson <[email protected]>Cc Ivan Kokshaysky <[email protected]>Cc Matt Turner <[email protected]>Signed-off-by Will Deacon <[email protected]>--- arch/alpha/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/alpha/Makefile +1
-1@@ -12,7 +12,7 @@ NM := $(NM) -B LDFLAGS_vmlinux := -static -N #-relax CHECKFLAGS += -D__alpha__ -m64 -cflags-y := -pipe -mno-fp-regs -ffixed-8 -msmall-data +cflags-y := -pipe -mno-fp-regs -ffixed-8 cflags-y += $(call cc-option, -fno-jump-tables) cpuflags-$(CONFIG_ALPHA_EV4) := -mcpu=ev4
Signature · 3 lines
| Thorsten Kranzkowski Internet: [email protected] | | Mobile: ++49 170 1876134 Snail: Kiebitzstr. 14, 49324 Melle, Germany | | Ampr: dl8bcu@db0lj.#rpl.deu.eu, [email protected] [44.130.8.19] |