From: Andi Kleen a...@linux.intel.com
Signed-off-by: Andi Kleen a...@linux.intel.com
---
lib/rwsem.c |4
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/lib/rwsem.c b/lib/rwsem.c
index 8337e1b..4a33b58 100644
--- a/lib/rwsem.c
+++ b/lib/rwsem.c
@@ -222,6 +222,7 @@
From: Andi Kleen a...@linux.intel.com
To check the linker version. Used by the LTO makefile.
Signed-off-by: Andi Kleen a...@linux.intel.com
---
scripts/Kbuild.include |9 +
scripts/ld-version.sh |8
2 files changed, 17 insertions(+), 0 deletions(-)
create mode 100755
From: Andi Kleen a...@linux.intel.com
Also warn for too long symbols
Signed-off-by: Andi Kleen a...@linux.intel.com
---
scripts/kallsyms.c |8 +++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 487ac6f..acde016 100644
---
From: Andi Kleen a...@linux.intel.com
With LTO gcc will do whole program optimizations for
the whole kernel and each module. This increases compile time,
but can generate faster code.
LTO allows gcc to inline functions between different files and
do various other optimization across the whole
From: Andi Kleen a...@linux.intel.com
The fancy x86 hweight uses different compiler options for the
hweight file. This does not work with LTO. Just disable the optimization
with LTO
Signed-off-by: Andi Kleen a...@linux.intel.com
---
arch/x86/Kconfig|5 +++--
From: Andi Kleen a...@linux.intel.com
Add build documentation for LTO.
Signed-off-by: Andi Kleen a...@linux.intel.com
---
Documentation/lto-build | 115 +++
1 files changed, 115 insertions(+), 0 deletions(-)
create mode 100644
From: Andi Kleen a...@linux.intel.com
For LTO we need to run the link step with gcc, not ld.
Since there are a lot of linker options passed to it, add a gcc-ld wrapper
that wraps them as -Wl,
Signed-off-by: Andi Kleen a...@linux.intel.com
---
scripts/gcc-ld | 29 +
This rather large patchkit enables gcc Link Time Optimization (LTO)
support for the kernel.
With LTO gcc will do whole program optimizations for
the whole kernel and each module. This increases compile time,
but can generate faster code.
LTO allows gcc to inline functions between different
From: Andi Kleen a...@linux.intel.com
Various kernel/mutex.c functions can be called from
inline assembler, so they should be all global and
__visible
Signed-off-by: Andi Kleen a...@linux.intel.com
---
kernel/mutex.c |9 -
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git
From: Andi Kleen a...@linux.intel.com
Signed-off-by: Andi Kleen a...@linux.intel.com
---
arch/x86/platform/efi/efi.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 2dc29f5..02bc41a 100644
---
From: Andi Kleen a...@linux.intel.com
The VDSO does not play well with LTO, so just disable LTO for it.
Also pass a 32bit linker flag for the 32bit version.
Signed-off-by: Andi Kleen a...@linux.intel.com
---
arch/x86/vdso/Makefile | 10 +++---
1 files changed, 7 insertions(+), 3
From: Andi Kleen a...@linux.intel.com
Signed-off-by: Andi Kleen a...@linux.intel.com
---
arch/x86/kernel/apm_32.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
index d65464e..61c9aa7 100644
---
From: Andi Kleen a...@linux.intel.com
Signed-off-by: Andi Kleen a...@linux.intel.com
---
drivers/rapidio/rio.h |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/rapidio/rio.h b/drivers/rapidio/rio.h
index b1af414..1fd0138 100644
--- a/drivers/rapidio/rio.h
+++
From: Andi Kleen a...@linux.intel.com
LTO gcc has trouble with the weak alias definitions in sys_ni.
This leads to missing symbols. Just disable LTO for this file.
Signed-off-by: Andi Kleen a...@linux.intel.com
---
kernel/Makefile |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
From: Andi Kleen a...@linux.intel.com
Work around a LTO gcc problem: when there is no reference to a variable
in a module it will be moved to the end of the program. This causes
reordering of initcalls which the kernel does not like.
Add a dummy reference function to avoid this. The function is
From: Andi Kleen a...@linux.intel.com
Making this visible fixes some missing symbols with gcc 4.7 LTO.
This is a workaround for a compiler problem.
Signed-off-by: Andi Kleen a...@linux.intel.com
---
drivers/media/video/pvrusb2/pvrusb2-audio.c |6 +++---
1 files changed, 3 insertions(+), 3
From: Andi Kleen a...@linux.intel.com
On a 32bit build gcc 4.7 with LTO decides to clobber the 6th argument on the
stack. Unfortunately this corrupts the user EBP and leads to later crashes.
For now mark do_futex noinline to prevent this.
I wish there was a generic way to handle this. Seems
From: Andi Kleen a...@linux.intel.com
The asm-offset.c technique to fish data out of the assembler file
does not work with LTO. Just disable for the asm-offset.c build.
Signed-off-by: Andi Kleen a...@linux.intel.com
---
scripts/Makefile.build |2 +-
1 files changed, 1 insertions(+), 1
From: Andi Kleen a...@linux.intel.com
Every includer of vvar.h currently gets own static variables
for all the vvar addresses. Generate just one set each for the
main kernel and for the vdso. This saves some data space.
Cc: Andy Lutomirski l...@mit.edu
Signed-off-by: Andi Kleen
From: Andi Kleen a...@linux.intel.com
The gcc 4.7 LTO with -fno-toplevel-reorder sometimes drops data
variables. These show up as undefined symbols at link time.
As a workaround just make a few where it happened visible for now.
There isl nothing wrong with this driver, just a toolchain problem.
On Sat, Aug 18, 2012 at 05:50:02AM -0400, Namjae Jeon wrote:
From: Namjae Jeon namjae.j...@samsung.com
This patch is based on suggestion by Wu Fengguang:
https://lkml.org/lkml/2011/8/19/19
kernel has mechanism to do writeback as per dirty_ratio and dirty_background
ratio. It also
From: Andi Kleen a...@linux.intel.com
Disable static detection: the static currently drops a lot of useful information
including clones generated by gcc. Drop this. The statics will appear now
without static. prefix.
But remove the LTO .NUMBER postfixes that look ugly
Signed-off-by: Andi Kleen
From: Joe Mario jma...@redhat.com
With the added postfixes that LTO adds for local
symbols, the longest name in the kernel overflows
the namebuf[KSYM_NAME_LEN] array by two bytes. That name is:
From: Andi Kleen a...@linux.intel.com
Signed-off-by: Andi Kleen a...@linux.intel.com
---
include/linux/linkage.h |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index 807f1e5..8d6ff27 100644
---
From: Andi Kleen a...@linux.intel.com
Signed-off-by: Andi Kleen a...@linux.intel.com
---
kernel/trace/ftrace.c |4 ++--
kernel/trace/trace.h |4 ++--
kernel/trace/trace_branch.c |8
kernel/trace/trace_events.c |4 ++--
kernel/trace/trace_syscalls.c |
From: Andi Kleen a...@linux.intel.com
The VMX code references a local assembler label between two inline
assembler statements. This assumes they both end up in the same
assembler files. In some experimental builds of gcc this is not
necessarily true, causing linker failures.
Replace the local
From: Andi Kleen a...@linux.intel.com
Make the ksymtab symbols for EXPORT_SYMBOL visible.
This prevents the LTO compiler from adding a .NUMBER prefix,
which avoids various problems in later export processing.
Signed-off-by: Andi Kleen a...@linux.intel.com
---
include/linux/export.h |4 ++--
From: Andi Kleen a...@linux.intel.com
lockdep_sys_exit can be called from assembler code, so make it
asmlinkage
Signed-off-by: Andi Kleen a...@linux.intel.com
---
include/linux/lockdep.h |2 +-
kernel/lockdep.c|2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git
From: Andi Kleen a...@linux.intel.com
The new LTO EXPORT_SYMBOL references symbols even without CONFIG_MODULES.
Since these functions are macros in this case this doesn't work.
Add a ifdef to fix the build.
Cc: ti...@suse.de
Signed-off-by: Andi Kleen a...@linux.intel.com
---
From: Andi Kleen a...@linux.intel.com
The paravirt thunks use a hack of using a static reference to a static
function to reference that function from the top level statement.
This assumes that gcc always generates static function names in a specific
format, which is not necessarily true.
Simply
From: Andi Kleen a...@linux.intel.com
The paravirt patching code assumes that it can reference a
local assembler label between two different top level assembler
statements. This does not work with some experimental gcc builds,
where the assembler code may end up in different assembler files.
From: Andi Kleen a...@linux.intel.com
Signed-off-by: Andi Kleen a...@linux.intel.com
---
lib/bug.c |2 +-
lib/dynamic_debug.c |4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/bug.c b/lib/bug.c
index a28c141..f81e1a6 100644
--- a/lib/bug.c
+++
From: Andi Kleen a...@linux.intel.com
... since it can be called from assembler code
Signed-off-by: Andi Kleen a...@linux.intel.com
---
include/linux/kernel.h |2 +-
kernel/exit.c |2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/kernel.h
From: Andi Kleen a...@linux.intel.com
A label declared in inline assembler has to be visible
Signed-off-by: Andi Kleen a...@linux.intel.com
---
arch/x86/kernel/cpu/amd.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/amd.c
From: Andi Kleen a...@linux.intel.com
Signed-off-by: Andi Kleen a...@linux.intel.com
---
include/linux/jump_label.h |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h
index 0976fc4..a39e8e3 100644
---
From: Andi Kleen a...@linux.intel.com
Signed-off-by: Andi Kleen a...@linux.intel.com
---
arch/sh/include/asm/sections.h |8
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/sh/include/asm/sections.h b/arch/sh/include/asm/sections.h
index 1b61997..e18e132 100644
From: Andi Kleen a...@linux.intel.com
The AMD K6 errata check relies on timing a indirect call.
But the way it was written it could be optimized to a direct call.
Force gcc to actually do a indirect call and not just
constant resolve the target address.
Signed-off-by: Andi Kleen
From: Andi Kleen a...@linux.intel.com
When __gnu_lto_* is present that means that the module hasn't run with
LTO yet.
Cc: ru...@rustcorp.com.au
Signed-off-by: Andi Kleen a...@linux.intel.com
---
kernel/module.c |5 -
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git
From: Andi Kleen a...@linux.intel.com
- Make the C code used by the paravirt stubs visible
- Since they have to be global now, give them a more unique
name.
Cc: ru...@rustcorp.com.au
Signed-off-by: Andi Kleen a...@linux.intel.com
---
arch/x86/lguest/boot.c | 12 ++--
1 files changed,
From: Andi Kleen a...@linux.intel.com
Signed-off-by: Andi Kleen a...@linux.intel.com
---
init/do_mounts_initrd.c |2 +-
init/initramfs.c|4 ++--
init/main.c |2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/init/do_mounts_initrd.c
From: Andi Kleen a...@linux.intel.com
It needs special options for a file, which LTO does not support.
XXX: may need some more __visibles
Cc: b...@kernel.crashing.org
Cc: h...@zytor.com
Signed-off-by: Andi Kleen a...@linux.intel.com
---
lib/raid6/Makefile |2 +-
1 files changed, 1
From: Andi Kleen a...@linux.intel.com
Making these symbols visible works around a gcc 4.7 LTO compiler
problem with missing symbols.
Signed-off-by: Andi Kleen a...@linux.intel.com
---
.../net/wireless/ath/ath9k/dfs_pattern_detector.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
From: Andi Kleen a...@linux.intel.com
Signed-off-by: Andi Kleen a...@linux.intel.com
---
kernel/extable.c |4 ++--
kernel/ksysfs.c |4 ++--
kernel/module.c | 30 +++---
kernel/params.c |6 +++---
kernel/spinlock.c |2 +-
5 files changed, 23
From: Andi Kleen a...@linux.intel.com
Signed-off-by: Andi Kleen a...@linux.intel.com
---
arch/m68k/include/asm/module.h |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/m68k/include/asm/module.h b/arch/m68k/include/asm/module.h
index edffe66..15cb110 100644
---
From: Andi Kleen a...@linux.intel.com
- Make all the external assembler template symbols __visible
- Move the templates inline assembler code into a top level
assembler statement, not inside a function. This avoids it being
optimized away or cloned.
Cc: ana...@in.ibm.com
Signed-off-by: Andi
From: Andi Kleen a...@linux.intel.com
LTO turns all global symbols effectively into statics. This
has the side effect that they all have a .NUMBER postfix to make
them unique. In modpost drop this postfix because it confuses
it.
Signed-off-by: Andi Kleen a...@linux.intel.com
---
From: Andi Kleen a...@linux.intel.com
gcc 4.6+ has support for a externally_visible attribute, that prevents
the optimizer from optimizing unused symbols away. Add a __visible macro
to use it with that compiler version or later.
Signed-off-by: Andi Kleen a...@linux.intel.com
---
From: Andi Kleen a...@linux.intel.com
Signed-off-by: Andi Kleen a...@linux.intel.com
---
arch/x86/include/asm/pgtable.h |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 49afb3f..72b24ab 100644
---
From: Andi Kleen a...@linux.intel.com
Signed-off-by: Andi Kleen a...@linux.intel.com
---
arch/x86/include/asm/vvar.h |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/include/asm/vvar.h b/arch/x86/include/asm/vvar.h
index de656ac..d76ac40 100644
---
From: Joe Mario jma...@redhat.com
Here is the workaround I made for having the kernel not reject modules
built with -flto. The clean solution would be to get the compiler to not
emit the symbol. Or if it has to emit the symbol, then emit it as
initialized data but put it into a comdat/linkonce
From: Andi Kleen a...@linux.intel.com
The vsyscall code is compiled without LTO. This also includes
its init function. The function which are called by it have
to be visible, otherwise they could be optimized away
Signed-off-by: Andi Kleen a...@linux.intel.com
---
drivers/char/random.c |2
From: Andi Kleen a...@linux.intel.com
Signed-off-by: Andi Kleen a...@linux.intel.com
---
include/linux/export.h | 14 --
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/include/linux/export.h b/include/linux/export.h
index 696c0f4..784617e 100644
---
From: Andi Kleen a...@linux.intel.com
Mark 32bit dotraplinkage functions as __visible for LTO.
64bit already is using asmlinkage which includes it.
Signed-off-by: Andi Kleen a...@linux.intel.com
---
arch/x86/include/asm/traps.h |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff
From: Andi Kleen a...@linux.intel.com
This is an arch/x86 sweep to add asmlinkage or __visible
to all functions accessed by assembler code. A lot of
functions already had it, but not all.
This is needed for the LTO kernel so that these functions are
not optimized away.
I used asmlinkage for
From: Andi Kleen a...@linux.intel.com
- Inline assembler defining C callable code has to be global
- The function has to be visible
Do this in wan/sbni
Signed-off-by: Andi Kleen a...@linux.intel.com
---
drivers/net/wan/sbni.c |6 +++---
drivers/net/wan/sbni.h |2 +-
2 files changed, 4
From: Andi Kleen a...@linux.intel.com
Cc: herb...@gondor.apana.org.au
Signed-off-by: Andi Kleen a...@linux.intel.com
---
arch/x86/crypto/camellia_glue.c | 16
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/x86/crypto/camellia_glue.c
From: Andi Kleen a...@linux.intel.com
LTO in gcc 4.6/47. has trouble with global register variables. They were used
to read the stack pointer. Use a simple inline assembler statement instead.
I verified this generates the same binary (on 64bit) as the original
register variable.
Signed-off-by:
Commit-ID: 515c7af85ed92696c311c53d53cb4898ff32d784
Gitweb: http://git.kernel.org/tip/515c7af85ed92696c311c53d53cb4898ff32d784
Author: Mike Frysinger vap...@gentoo.org
AuthorDate: Sat, 18 Aug 2012 16:11:37 -0400
Committer: H. Peter Anvin h...@zytor.com
CommitDate: Sat, 18 Aug 2012
Adding linux-net to the CC list.
On Fri, Aug 17, 2012 at 11:57:56PM +0100, Dave Haywood wrote:
[1.] One line summary of the problem:
BUG: unable to handle kernel paging request at 00010016
System boots then crashes a 5-10 or so seconds after getting to the
login prompt
Booting
On Sat, 18 Aug 2012, Yu, Fenghua wrote:
From: Henrique de Moraes Holschuh [mailto:h...@hmh.eng.br] On Sat, 18 Aug
2012, Fenghua Yu wrote:
Given a file's name, find its starting point in a cpio formated area.
This will
be used to find microcode in combined initrd image. But this
On Sun, 19 Aug 2012, Yu, Fenghua wrote:
From: Henrique de Moraes Holschuh [mailto:h...@hmh.eng.br]
On Sat, 18 Aug 2012, Fenghua Yu wrote:
+ char ucode_name[] =
kernel/x86/microcode/GenuineIntel/microcode.hex;
Why name it .hex when you're loading binary data? I suggest .bin.
It
From: Fengguang Wu fengguang...@intel.com
We need to free up memory in this order:
free csrows[i]-channels[j]
free csrows[i]-channels
free csrows[i]
free csrows
Signed-off-by: Fengguang Wu fengguang...@intel.com
---
drivers/edac/edac_mc.c | 12 +++-
1 file changed, 7
edac_mc_free() may need to deallocate any memory associated with struct
mem_ctl_info directly if the structure was never registered with sysfs in
edac_mc_add_mc(). This moves the error handling code from edac_mc_alloc() into a
dedicated function to be called by edac_mc_free() as well if necessary.
With kernel version 3.6-rc2 on a Dell Poweredge 2600 I experienced a NULL
pointer dereference that did not occur with on 3.5. I believe the error is
related to commit de3910eb79a edac: change the mem allocation scheme to make
Documentation/kobject.txt happy [1] and the fact that my system is going
There are no more embedded kobjects in struct mem_ctl_info. Remove a header and
a comment that does not reflect the code anymore.
Signed-off-by: Shaun Ruffell sruff...@digium.com
---
drivers/edac/edac_mc.c | 7 ---
include/linux/edac.h | 1 -
2 files changed, 8 deletions(-)
diff --git
On Sun, Aug 19, 2012 at 03:59:11AM +0200, Andi Kleen wrote:
On Sat, Aug 18, 2012 at 04:23:04PM -0700, Guenter Roeck wrote:
On Sat, Aug 18, 2012 at 10:30:05AM -0700, Andi Kleen wrote:
From: Andi Kleen a...@linux.intel.com
Signed-off-by: Andi Kleen a...@linux.intel.com
Applied.
On 08/18/2012 09:35 PM, Henrique de Moraes Holschuh wrote:
On Sat, 18 Aug 2012, Yu, Fenghua wrote:
From: Henrique de Moraes Holschuh [mailto:h...@hmh.eng.br] On Sat, 18 Aug
2012, Fenghua Yu wrote:
Given a file's name, find its starting point in a cpio formated area.
This will
be used to find
On 08/18/2012 07:38 PM, Yu, Fenghua wrote:
In this early phase, detecting vendor in initrd is much simpler code.
Otherwise, detecting vendor by cpuid (and without cpuid) needs
similar but different code as existing functions and coding would be
awkward.
I'm confused by this statement.
On Sat, 2012-08-18 at 11:57 +0200, Thomas Haschka wrote:
Hello everybody!
Hi Thomas,
Unfortunately, there are quite a few things wrong with your patch that
will likely prevent any kernel developers from picking it up as-is.
Please read through the file Documentation/SubmittingPatches, it has a
On 2012.08.18 at 17:08 -0700, Linus Torvalds wrote:
On Sat, Aug 18, 2012 at 12:32 PM, Markus Trippelsdorf
mar...@trippelsdorf.de wrote:
Yes. Everything is fine again with this patch applied.
Ok, can you write a commit message and sign off on it, and I'll apply
it (or Greg will, either
501 - 570 of 570 matches
Mail list logo