--- Comment #19 from andi-gcc at firstfloor dot org 2010-06-19 07:39
---
Technically I would say it was a kernel bug.
gcc can't really know how many instructions are there inside inline asm
so it's probably very conservative in its estimation.
So I would recommend to close it.
--- Comment #20 from rguenth at gcc dot gnu dot org 2010-06-19 10:37
---
GCC improved estimation of asm size from all-asms-are-size-1 we did in 4.4
to count the number of lines estimate that is also used by RTL optimizers.
--
rguenth at gcc dot gnu dot org changed:
What
--- Comment #21 from andi-gcc at firstfloor dot org 2010-06-19 12:23
---
This is the inline (after preprocessor)
I guess the many asm meta commands confuse the heuristic. Maybe it could
be fixed to ignore such commands.
static inline void rdtsc_barrier(void)
{
asm volatile
--- Comment #22 from rguenth at gcc dot gnu dot org 2010-06-19 12:58
---
(In reply to comment #21)
This is the inline (after preprocessor)
I guess the many asm meta commands confuse the heuristic. Maybe it could
be fixed to ignore such commands.
static inline void
--- Comment #23 from andi-gcc at firstfloor dot org 2010-06-19 13:13
---
It's two instructions with some metadata that controls patching these
instructions depending on the CPU capabilities.
Detecting that for gcc would be likely hard.
What would have also prevented this problem
--- Comment #16 from andi-gcc at firstfloor dot org 2010-06-18 21:11
---
This turned out to be a kernel bug, rdtsc_barrier() needed to be marked
__force_inline, otherwise gcc would not inline this function.
(although it's slightly fishy for gcc too not inline a function that
only has
--- Comment #17 from bdubbs at linuxfromscratch dot org 2010-06-19 00:05
---
I can confirm that changing inline to __always_inline in
arch/x86/include/asm/system.h fixed the panic for me.
I'm not sure if this fix is the result of an error in the kernel or gcc.
Leaving the bug open for
--- Comment #18 from kevin dot bowling at kev009 dot com 2010-06-19 00:07
---
Does it make sense for the default and distros to use an -Os kernel with modern
systems (i.e. 2M-8M cache). If gcc 4.5 won't inline this at -Os, I wonder what
other bad decisions are being made.
--
--- Comment #13 from itosre at trash-mail dot com 2010-05-30 15:09 ---
(In reply to comment #12)
I'm assuming this is current Linus git (post 2.6.34).
I'm guessing from
Tested on several kernels: 2.6.32.8, 2.6.33.4, 2.6.34-rc7
That this isn't the case. Strangely enough, it WFT
--- Comment #14 from bdubbs at linuxfromscratch dot org 2010-05-31 00:41
---
(In reply to comment #13)
(In reply to comment #12)
I'm assuming this is current Linus git (post 2.6.34).
I'm guessing from
Tested on several kernels: 2.6.32.8, 2.6.33.4, 2.6.34-rc7
That this
--- Comment #15 from hpa at zytor dot com 2010-05-31 01:04 ---
OK, thanks for confirming that it is not related to asm goto.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44129
--- Comment #12 from hpa at zytor dot com 2010-05-27 01:23 ---
I'm assuming this is current Linus git (post 2.6.34).
For the current merge window we merged a single instance of using the new asm
goto feature when compiling on gcc 4.5+; this is in fact exactly in the TSC
code, in the
--- Comment #11 from bdubbs at linuxfromscratch dot org 2010-05-24 06:32
---
Updated to gcc (GCC) 4.5.1 20100524 (prerelease) but still have the problem.
There is something about -Os that triggers the kernel panic in
arch/x86/kernel/tsc.c
I tried to disable all -O2 options after -Os
--- Comment #10 from kevin dot bowling at kev009 dot com 2010-05-19 08:33
---
Seeing Bruce's symptoms here, no relation to -Os vs -O2. gcc-4.5.0 on Gentoo
~amd64.
--
kevin dot bowling at kev009 dot com changed:
What|Removed |Added
--- Comment #9 from bdubbs at linuxfromscratch dot org 2010-05-16 06:38
---
I have traced the problem file for this bug to the kernel file
arch/x86/kernel/tsc.c
I have two source trees for the 2.6.33.4 kernel, one compiled with gcc-4.4.1
which works and gcc version 4.5.1 20100514
--- Comment #8 from bdubbs at linuxfromscratch dot org 2010-05-16 05:55
---
Created an attachment (id=20671)
-- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20671action=view)
Linux kernel configuration that fails with gcc-4.5
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44129
--- Comment #1 from rguenth at gcc dot gnu dot org 2010-05-14 12:26 ---
Waiting for a testcase. And for the reporter to try the tip of the 4.5 branch.
--
rguenth at gcc dot gnu dot org changed:
What|Removed |Added
--- Comment #2 from bdubbs at linuxfromscratch dot org 2010-05-14 21:27
---
OK, these are my procedures:
svn co svn://gcc.gnu.org/svn/gcc/branches/gcc-4_5-branch gcc45-svn
(revision 159398)
cd gcc45-svn
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
sed -i
--- Comment #3 from hjl dot tools at gmail dot com 2010-05-14 22:24 ---
There are some known issues with gcc 4.5.0 and
Linux kernel. Please try gcc 4.5.1 snapshot from
ftp://gcc.gnu.org/pub/gcc/snapshots/4.5-20100513/
or the mirror sites.
--
--- Comment #4 from hjl dot tools at gmail dot com 2010-05-14 22:27 ---
(In reply to comment #3)
There are some known issues with gcc 4.5.0 and
Linux kernel. Please try gcc 4.5.1 snapshot from
ftp://gcc.gnu.org/pub/gcc/snapshots/4.5-20100513/
or the mirror sites.
I saw you
--- Comment #5 from bdubbs at linuxfromscratch dot org 2010-05-14 22:50
---
(In reply to comment #4)
I saw you have tried revision 159398. I guess you
need to find which file is miscompiled.
I have no idea how to do that for the kernel.
BTW, you aren't using gold, are you?
I
--- Comment #6 from hjl dot tools at gmail dot com 2010-05-15 01:13 ---
(In reply to comment #5)
(In reply to comment #4)
I saw you have tried revision 159398. I guess you
need to find which file is miscompiled.
I have no idea how to do that for the kernel.
You build 2 kernel
--- Comment #7 from bdubbs at linuxfromscratch dot org 2010-05-15 04:06
---
(In reply to comment #6)
You build 2 kernel trees, one with gcc 4.5.1 and one
with gcc 4.4.4. You copy binaries from one tree to
another and rebuild kernel one file at a time until
you find the single file
23 matches
Mail list logo