Linux MIPS Architecture development
 help / color / mirror / Atom feed
* gcc -3.4.4 and linux-2.4.32
@ 2006-01-16 12:23 Kishore K
  2006-01-16 12:23 ` Kishore K
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Kishore K @ 2006-01-16 12:23 UTC (permalink / raw)
  To: linux-mips


[-- Attachment #1.1: Type: text/plain, Size: 640 bytes --]

hi
When 2.4.32 kernel (from linux-mips) is compiled with the tool chain based
on gcc 3.4.4 and binutils 2.16.1, the kernel crashes on malta board. The
crash file is enclosed along with the mail. If the same kernel is compiled
with the tool chain based on gcc 3.3.6, no problem is observed.

May I know, whether it is because of the changes in ABI in gcc 3.4. If so,
has any one got the patch to make 2.4.x kernels work with gcc 3.4 compilers?
From the changelog, I can infer that, some changes have been done in
2.4.28kernel to work with gcc
3.4 for i386. If so, has the same thing been done for MIPS as well.

TIA,
--kishore

[-- Attachment #1.2: Type: text/html, Size: 676 bytes --]

[-- Attachment #2: crash --]
[-- Type: application/octet-stream, Size: 3018 bytes --]

Start = 0x802c2040, range = (0x80100000,0x802fafff), format = SREC
                                                                                                                             
LINUX started...
CPU revision is: 00018005
Primary instruction cache 16kB, physically tagged, 4-way, linesize 16 bytes.
Primary data cache 16kB, 4-way, linesize 16 bytes.
Linux version 2.4.32 (inca@localhost.localdomain) (gcc version 3.4.4) #2 Mon Jan 16 17:24:34 IST 2006
Determined physical RAM map:
 memory: 00001000 @ 00000000 (reserved)
 memory: 000ef000 @ 00001000 (ROM data)
 memory: 00010000 @ 000f0000 (reserved)
 memory: 0022a000 @ 00100000 (reserved)
 memory: 03cd6000 @ 0032a000 (usable)
On node 0 totalpages: 16384
zone(0): 16384 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: ip=10.1.1.100:10.1.1.99:10.1.1.99:255.0.0.0:malta:eth0:off root=/dev/nfs nfsroot=/root/kishore/r1-alpha0calculating r4koff... 0009899a(625050)
CPU frequency 125.01 MHz
Using 62.505 MHz high precision timer.
Calibrating delay loop... 124.51 BogoMIPS
Memory: 61584k/62296k available (1787k kernel code, 712k reserved, 112k data, 108k init, 0k highmem)
Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
Inode cache hash table entries: 4096 (order: 3, 32768 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 16384 (order: 4, 65536 bytes)
Checking for 'wait' instruction...  available.
POSIX conformance testing by UNIFIX
Unable to handle kernel paging request at virtual address 00000014, epc == 8014579c, ra == 801457a4
Oops in fault.c::do_page_fault, line 206:
$0 : 00000000 1000fc00 00000000 810fb0a0 802ec184 810fb120 00000000 810fb000
$8 : 00000030 80285240 00000000 000010fb 802ebb80 00000000 1000fc01 80300000
$16: 80100784 810fb0a0 00010f00 810fb120 ffffffe9 00000001 80300000 00000000
$24: 0000002c ba2e8ba3                   802c0000 802c1e30 802dc300 801457a4
Hi : 00000000
Lo : 00000080
epc   : 8014579c    Not tainted
Status: 1000fc03
Cause : 90800008
PrId  : 00018005
Process swapper (pid: 0, stackpage=802c0000)
Stack:    80300000 0000059c 80300000 80300000 80300000 80300000 000f41ff
 80317248 802feb7c 80310000 0000059c 802ea920 802ff10c 00000060 00000000
 ba2e8ba3 80100784 00000000 00010f00 00000000 802dc300 00000001 80290000
 00000000 802dc300 8010726c 802c1ea8 801ac834 00000000 8032b428 000001f0
 8032b420 80107d00 00000001 00010f00 00000000 802c1f68 ffffffff 000001f0
 00000578 ...
Call Trace:   [<80100784>] [<80290000>] [<8010726c>] [<801ac834>] [<80107d00>]
 [<8015fb60>] [<80160118>] [<80100784>] [<80290000>] [<8018c998>] [<80111348>]
 [<801601e0>] [<80102780>] [<80111348>]
                                                                                                                             
Code: 00409821  3c168030  8ec26320 <0c055173> 8c440014  104000b0  00408021  0c0515a0  00402021
Kernel panic: Attempted to kill the idle task!
In idle task - not syncing



^ permalink raw reply	[flat|nested] 12+ messages in thread

* gcc -3.4.4 and linux-2.4.32
  2006-01-16 12:23 gcc -3.4.4 and linux-2.4.32 Kishore K
@ 2006-01-16 12:23 ` Kishore K
  2006-01-16 17:34 ` David Daney
  2006-01-17 13:40 ` Ralf Baechle
  2 siblings, 0 replies; 12+ messages in thread
From: Kishore K @ 2006-01-16 12:23 UTC (permalink / raw)
  To: linux-mips


[-- Attachment #1.1: Type: text/plain, Size: 449 bytes --]

hi
When 2.4.32 kernel (from linux-mips) is compiled with the tool chain based
on gcc 3.4.4 and binutils 2.16.1, the kernel crashes on malta board. The
crash file is enclosed along with the mail. If the same kernel is compiled
with the tool chain based on gcc 3.3.6, no problem is observed.

May I know, whether it is because of the changes in ABI in gcc 3.4. If so,
has any one got the patch to make 2.4.x kernels work with gcc 3.4 compilers?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: gcc -3.4.4 and linux-2.4.32
  2006-01-16 12:23 gcc -3.4.4 and linux-2.4.32 Kishore K
  2006-01-16 12:23 ` Kishore K
@ 2006-01-16 17:34 ` David Daney
  2006-01-17 12:07   ` Kishore K
                     ` (2 more replies)
  2006-01-17 13:40 ` Ralf Baechle
  2 siblings, 3 replies; 12+ messages in thread
From: David Daney @ 2006-01-16 17:34 UTC (permalink / raw)
  To: Kishore K; +Cc: linux-mips

Kishore K wrote:
> hi
> When 2.4.32 kernel (from linux-mips) is compiled with the tool chain 
> based on gcc 3.4.4 and binutils 2.16.1, the kernel crashes on malta 
> board. The crash file is enclosed along with the mail. If the same 
> kernel is compiled with the tool chain based on gcc 3.3.6, no problem is 
> observed.
> 
> May I know, whether it is because of the changes in ABI in gcc 3.4.

Not exactly.  It has to do with -funit-at-a-time.  In the 2.4.x kernel 
it is assumed that gcc will not reorder top level asm statements and 
functions.  For gcc-3.3.x and earlier this was a valid assumption.  With 
3.4.x and later it is not.

> If 
> so, has any one got the patch to make 2.4.x kernels work with gcc 3.4 
> compilers? From the changelog, I can infer that, some changes have been 
> done in 2.4.28 kernel to work with gcc 3.4 for i386. If so, has the same 
> thing been done for MIPS as well.
> 
IIRC the patches were never applied to linux-mips.org.  If you search 
the archives of this list for messages that I sent, you can find the 
patches.

David Daney.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: gcc -3.4.4 and linux-2.4.32
  2006-01-16 17:34 ` David Daney
@ 2006-01-17 12:07   ` Kishore K
  2006-01-17 12:26   ` P. Christeas
  2006-01-17 13:43   ` gcc -3.4.4 and linux-2.4.32 Ralf Baechle
  2 siblings, 0 replies; 12+ messages in thread
From: Kishore K @ 2006-01-17 12:07 UTC (permalink / raw)
  To: David Daney; +Cc: linux-mips

[-- Attachment #1: Type: text/plain, Size: 854 bytes --]

On 1/16/06, David Daney <ddaney@avtrex.com> wrote:
>
> Kishore K wrote:
> > hi
> > When 2.4.32 kernel (from linux-mips) is compiled with the tool chain
> > based on gcc 3.4.4 and binutils 2.16.1, the kernel crashes on malta
> > board. The crash file is enclosed along with the mail. If the same
> > kernel is compiled with the tool chain based on gcc 3.3.6, no problem is
> > observed.
> >
> > May I know, whether it is because of the changes in ABI in gcc 3.4.
>
> Not exactly.  It has to do with -funit-at-a-time.  In the 2.4.x kernel
> it is assumed that gcc will not reorder top level asm statements and
> functions.  For gcc-3.3.x and earlier this was a valid assumption.  With
> 3.4.x and later it is not.


Thanks for the information.  The board is up, when the kernel is compiled
with the above mentioned option.

--kishore

[-- Attachment #2: Type: text/html, Size: 1228 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: gcc -3.4.4 and linux-2.4.32
  2006-01-16 17:34 ` David Daney
  2006-01-17 12:07   ` Kishore K
@ 2006-01-17 12:26   ` P. Christeas
  2006-01-18 22:35     ` P. Christeas
  2006-01-17 13:43   ` gcc -3.4.4 and linux-2.4.32 Ralf Baechle
  2 siblings, 1 reply; 12+ messages in thread
From: P. Christeas @ 2006-01-17 12:26 UTC (permalink / raw)
  To: David Daney; +Cc: Kishore K, linux-mips

On Monday 16 January 2006 7:34 pm, David Daney wrote:
> Kishore K wrote:
> > hi
> > When 2.4.32 kernel (from linux-mips) is compiled with the tool chain
> > based on gcc 3.4.4 and binutils 2.16.1, the kernel crashes on malta
> > board. The crash file is enclosed along with the mail. If the same
> > kernel is compiled with the tool chain based on gcc 3.3.6, no problem is
> > observed.
> >
> > May I know, whether it is because of the changes in ABI in gcc 3.4.
>
> Not exactly.  It has to do with -funit-at-a-time.  In the 2.4.x kernel
> it is assumed that gcc will not reorder top level asm statements and
> functions.  For gcc-3.3.x and earlier this was a valid assumption.  With
> 3.4.x and later it is not.
>
Does that apply to gcc-4.0.2 as well? It is mentioned in linux documentation 
that -funit-at-a-time is safe as of gcc-4.x. Is there (I'm not a MIPS expert) 
a way to verify whether gcc produces wrong instructions?
I've had a similar problem (I only try with gcc 4, because I compile linux 
2.6) and is reduced when I use -fno-unit-at-a-time. Still, I have 
instability, which now appears less often.
I've tried the '-fno-unit-at-a-time' solution (for the whole kernel) and the 
'pop/push' at interrupt.h fix.

> > If
> > so, has any one got the patch to make 2.4.x kernels work with gcc 3.4
> > compilers? From the changelog, I can infer that, some changes have been
> > done in 2.4.28 kernel to work with gcc 3.4 for i386. If so, has the same
> > thing been done for MIPS as well.
>
> IIRC the patches were never applied to linux-mips.org.  If you search
> the archives of this list for messages that I sent, you can find the
> patches.
Can you please list the necessary patches? One line for each would do, as I 
want to check if I have them all. 

>
> David Daney.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: gcc -3.4.4 and linux-2.4.32
  2006-01-16 12:23 gcc -3.4.4 and linux-2.4.32 Kishore K
  2006-01-16 12:23 ` Kishore K
  2006-01-16 17:34 ` David Daney
@ 2006-01-17 13:40 ` Ralf Baechle
  2 siblings, 0 replies; 12+ messages in thread
From: Ralf Baechle @ 2006-01-17 13:40 UTC (permalink / raw)
  To: Kishore K; +Cc: linux-mips

On Mon, Jan 16, 2006 at 05:53:26PM +0530, Kishore K wrote:

> When 2.4.32 kernel (from linux-mips) is compiled with the tool chain based
> on gcc 3.4.4 and binutils 2.16.1, the kernel crashes on malta board. The
> crash file is enclosed along with the mail. If the same kernel is compiled
> with the tool chain based on gcc 3.3.6, no problem is observed.

Linux 2.4 is known to be broken with gcc 3.4 since ages and I won't fix
this.

  Ralf

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: gcc -3.4.4 and linux-2.4.32
  2006-01-16 17:34 ` David Daney
  2006-01-17 12:07   ` Kishore K
  2006-01-17 12:26   ` P. Christeas
@ 2006-01-17 13:43   ` Ralf Baechle
  2 siblings, 0 replies; 12+ messages in thread
From: Ralf Baechle @ 2006-01-17 13:43 UTC (permalink / raw)
  To: David Daney; +Cc: Kishore K, linux-mips

On Mon, Jan 16, 2006 at 09:34:19AM -0800, David Daney wrote:

> Not exactly.  It has to do with -funit-at-a-time.  In the 2.4.x kernel 
> it is assumed that gcc will not reorder top level asm statements and 
> functions.  For gcc-3.3.x and earlier this was a valid assumption.  With 
> 3.4.x and later it is not.

This is not the only gcc 3.4 related issue.  Building the 2.4 defconfig
for example will fail.

  Ralf

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: gcc -3.4.4 and linux-2.4.32
  2006-01-17 12:26   ` P. Christeas
@ 2006-01-18 22:35     ` P. Christeas
  2006-01-19 10:00       ` Geert Uytterhoeven
  0 siblings, 1 reply; 12+ messages in thread
From: P. Christeas @ 2006-01-18 22:35 UTC (permalink / raw)
  To: David Daney; +Cc: Kishore K, linux-mips

On Tuesday 17 January 2006 2:26 pm, P. Christeas wrote:

>
> Does that apply to gcc-4.0.2 as well? It is mentioned in linux
> documentation that -funit-at-a-time is safe as of gcc-4.x. Is there (I'm
> not a MIPS expert) a way to verify whether gcc produces wrong instructions?
> I've had a similar problem (I only try with gcc 4, because I compile linux
> 2.6) and is reduced when I use -fno-unit-at-a-time. Still, I have
> instability, which now appears less often.
> I've tried the '-fno-unit-at-a-time' solution (for the whole kernel) and
> the 'pop/push' at interrupt.h fix.
>
Just to let you know:
In a very interesting twist, gcc4.0.2 produces a faulty kernel with the 2.4.31 
kernel (as the latter is provided from the hardware's manufacturer).
I'm validating gcc and binutils at the moment.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: gcc -3.4.4 and linux-2.4.32
  2006-01-18 22:35     ` P. Christeas
@ 2006-01-19 10:00       ` Geert Uytterhoeven
  2006-01-19 10:30         ` P. Christeas
  0 siblings, 1 reply; 12+ messages in thread
From: Geert Uytterhoeven @ 2006-01-19 10:00 UTC (permalink / raw)
  To: P. Christeas; +Cc: David Daney, Kishore K, Linux/MIPS Development

On Thu, 19 Jan 2006, P. Christeas wrote:
> On Tuesday 17 January 2006 2:26 pm, P. Christeas wrote:
> > Does that apply to gcc-4.0.2 as well? It is mentioned in linux
> > documentation that -funit-at-a-time is safe as of gcc-4.x. Is there (I'm
> > not a MIPS expert) a way to verify whether gcc produces wrong instructions?
> > I've had a similar problem (I only try with gcc 4, because I compile linux
> > 2.6) and is reduced when I use -fno-unit-at-a-time. Still, I have
> > instability, which now appears less often.
> > I've tried the '-fno-unit-at-a-time' solution (for the whole kernel) and
> > the 'pop/push' at interrupt.h fix.
> >
> Just to let you know:
> In a very interesting twist, gcc4.0.2 produces a faulty kernel with the 2.4.31 
> kernel (as the latter is provided from the hardware's manufacturer).
> I'm validating gcc and binutils at the moment.

That's why 2 days ago this one went in in 2.4.x:

| [PATCH] document that gcc 4 is not supported
| 
| gcc 4 is not supported for compiling kernel 2.4, and I don't see any
| compelling reason why kernel 2.4 should ever be adapted to gcc 4.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: gcc -3.4.4 and linux-2.4.32
  2006-01-19 10:00       ` Geert Uytterhoeven
@ 2006-01-19 10:30         ` P. Christeas
  2006-01-19 12:33           ` "useless" pgprot_noncached define in include/asm-mips/pgtable.h Niels Sterrenburg
  0 siblings, 1 reply; 12+ messages in thread
From: P. Christeas @ 2006-01-19 10:30 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: David Daney, Kishore K, Linux/MIPS Development

On Thursday 19 January 2006 12:00 pm, Geert Uytterhoeven wrote:
> On Thu, 19 Jan 2006, P. Christeas wrote:
> > Just to let you know:
> > In a very interesting twist, gcc4.0.2 produces a faulty kernel with the
> > 2.4.31 kernel (as the latter is provided from the hardware's
> > manufacturer). I'm validating gcc and binutils at the moment.
>
> That's why 2 days ago this one went in in 2.4.x:
> | [PATCH] document that gcc 4 is not supported
> |
> | gcc 4 is not supported for compiling kernel 2.4, and I don't see any
> | compelling reason why kernel 2.4 should ever be adapted to gcc 4.

Which comes round to the main reason I'm doing this work (port the platform to 
2.6): if we are not using the *latest* kernel with the *latest* build/user 
tools, then we cannot share our work. Patches to an old kernel/gcc may 
probably get discarded when moving to the next version.

Nevertheless, I think my problem has been the binutils. After switching to 
version 2.16.1, the oops probability (per reset) dropped from 80% to <20% and 
the oops is less random. (that is, there is also one, real, bug)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* "useless" pgprot_noncached define in include/asm-mips/pgtable.h
  2006-01-19 10:30         ` P. Christeas
@ 2006-01-19 12:33           ` Niels Sterrenburg
  2006-01-23 15:54             ` Atsushi Nemoto
  0 siblings, 1 reply; 12+ messages in thread
From: Niels Sterrenburg @ 2006-01-19 12:33 UTC (permalink / raw)
  To: Linux/MIPS Development; +Cc: niels.sterrenburg

Hi,

I'm trying to understand the vm implementation on MIPS
and I see the following #define in include/asm-mips/pgtable.h:

#define pgprot_noncached pgprot_noncached

Was there any ideas behind this code or can it be removed ?

regards,

Niels Sterrenburg

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: "useless" pgprot_noncached define in include/asm-mips/pgtable.h
  2006-01-19 12:33           ` "useless" pgprot_noncached define in include/asm-mips/pgtable.h Niels Sterrenburg
@ 2006-01-23 15:54             ` Atsushi Nemoto
  0 siblings, 0 replies; 12+ messages in thread
From: Atsushi Nemoto @ 2006-01-23 15:54 UTC (permalink / raw)
  To: pulsar; +Cc: linux-mips, niels.sterrenburg

>>>>> On Thu, 19 Jan 2006 13:33:47 +0100 (CET), "Niels Sterrenburg" <pulsar@kpsws.com> said:

pulsar> #define pgprot_noncached pgprot_noncached
pulsar> Was there any ideas behind this code or can it be removed ?

There are some codes testing whether pgprot_noncached is defined or
not.  Please see phys_mem_access_prot() in drivers/char/mem.c.

---
Atsushi Nemoto

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2006-01-23 15:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-16 12:23 gcc -3.4.4 and linux-2.4.32 Kishore K
2006-01-16 12:23 ` Kishore K
2006-01-16 17:34 ` David Daney
2006-01-17 12:07   ` Kishore K
2006-01-17 12:26   ` P. Christeas
2006-01-18 22:35     ` P. Christeas
2006-01-19 10:00       ` Geert Uytterhoeven
2006-01-19 10:30         ` P. Christeas
2006-01-19 12:33           ` "useless" pgprot_noncached define in include/asm-mips/pgtable.h Niels Sterrenburg
2006-01-23 15:54             ` Atsushi Nemoto
2006-01-17 13:43   ` gcc -3.4.4 and linux-2.4.32 Ralf Baechle
2006-01-17 13:40 ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox