Skip to contentSkip to conversation

should we teach gcc some new tricks?

parisc-linux John David Anglin 2 participants 4 messages Jul 3, 2005 – Jul 7, 2005 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 11 lines
Quoted 11 lines

good news with gcc-4.0 (debian pakage) and '-mfixed-range=fr6-fr21,fr27-fr31'

o 2.6.9-rc2-pa1 seems to works as fine as with original option
o 2.6.9-rc2-pa13 the same

(just have to backport some small stuff to reach to compile kernels)

I apply my stress test (tar loops + kernel build loops) during a full day for each one without any pb ;-)

I can now try a step forward: 2.6.10-pa + gcc-4.0, ...

I'll have to try a gcc-4.0 built kernel to see if it improves things on the c3k.

Just a note, a patch to fix the function pointer canonicalization issue that you and others noticed was installed Friday to the 4.0 branch, and Saturday to the GCC head.

Dave

Signature · 6 lines
J. David Anglin                                  [email protected]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
#2 lore raw

Hello Dave,

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

good news with gcc-4.0 (debian pakage) and '-mfixed-range=3Dfr6-fr2=

1,fr27-fr31'

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

o 2.6.9-rc2-pa1 seems to works as fine as with original option
o 2.6.9-rc2-pa13 the same

(just have to backport some small stuff to reach to compile kernel=

s)

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

I apply my stress test (tar loops + kernel build loops) during a fu=

ll

Quoted 8 lines

day

Quoted 3 lines
Quoted 3 lines

for each one without any pb ;-)

I can now try a step forward: 2.6.10-pa + gcc-4.0, ...

I'll have to try a gcc-4.0 built kernel to see if it improves things on the c3k.

cool ;-)

btw for the 2.6.10-pa11 I had to apply those small backports:
diff -NaurX dontdiff linux-2.6.10-pa10-20050112/arch/parisc/Makefile linu= x-2.6.10-pa10-20050112-gcc40/arch/parisc/Makefile
--- linux-2.6.10-pa10-20050112/arch/parisc/Makefile 2005-01-04 07:37:=
20.000000000
+0100
+++ linux-2.6.10-pa10-20050112-gcc40/arch/parisc/Makefile 2005-07-0=
1
17:30:00.000000000 +0200
@@ -44,6 +44,7 @@
# If that gets optimized, we might need to disable the use of fpregs in
the

 # kernel.
 #cflags-y      +=3D -mdisable-fpregs
+cflags-y       +=3D -mfixed-range=3Dfr6-fr21,fr27-fr31

# Without this, "ld -r" results in .text sections that are too big # (> 0x40000) for branches to reach stubs.
diff -NaurX dontdiff linux-2.6.10-pa10-20050112/drivers/eisa/Makefile lin= ux-2.6.10-pa10-20050112-gcc40/drivers/eisa/Makefile
--- linux-2.6.10-pa10-20050112/drivers/eisa/Makefile 2003-09-08 23:42:=
02.000000000
+0200
+++ linux-2.6.10-pa10-20050112-gcc40/drivers/eisa/Makefile 2005-07-0=
1
18:12:25.000000000 +0200
@@ -1,8 +1,5 @@
# Makefile for the Linux device tree

-# Being anal sometimes saves a crash/reboot cycle... ;-)
-EXTRA_CFLAGS :=3D -Werror
-
obj-$(CONFIG_EISA) +=3D eisa-bus.o
obj-${CONFIG_EISA_PCI_EISA} +=3D pci_eisa.o

diff -NaurX dontdiff linux-2.6.10-pa10-20050112/include/linux/fb.h linux-= 2.6.10-pa10-20050112-gcc40/include/linux/fb.h
--- linux-2.6.10-pa10-20050112/include/linux/fb.h 2004-11-30 07:45:=
36.000000000
+0100
+++ linux-2.6.10-pa10-20050112-gcc40/include/linux/fb.h 2005-07-01 18:38:= 07.000000000
+0200
@@ -857,7 +857,6 @@

/* drivers/video/modedb.c */
#define VESA_MODEDB_SIZE 34
-extern const struct fb_videomode vesa_modes[];
extern void fb_var_to_videomode(struct fb_videomode *mode,

                                struct fb_var_screeninfo *var);
 extern void fb_videomode_to_var(struct fb_var_screeninfo *var,
@@ -902,6 +901,8 @@
        u32 flag;

};

+extern const struct fb_videomode vesa_modes[];
+

 struct fb_modelist {
        struct list_head list;
        struct fb_videomode mode;

=3D=3D=3D=3D<>=3D=3D=3D=3D

And eventualy:
diff -NaurX dontdiff linux-2.6.10-pa10-20050112/Makefile linux-2.6.10-pa1= 0-20050112-gcc40/Makefile
--- linux-2.6.10-pa10-20050112/Makefile 2005-01-10 12:00:43.000000000 +01= 00
+++ linux-2.6.10-pa10-20050112-gcc40/Makefile 2005-07-01 17:29:16.00000=
0000
+0200
@@ -201,7 +201,7 @@
else if [ -x /bin/bash ]; then echo /bin/bash; \
else echo sh; fi ; fi)

-HOSTCC         =3D gcc
+HOSTCC         =3D gcc-4.0
 HOSTCXX        =3D g++
 HOSTCFLAGS     =3D -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
 HOSTCXXFLAGS   =3D -O2

@@ -318,7 +318,7 @@

 AS             =3D $(CROSS_COMPILE)as
 LD             =3D $(CROSS_COMPILE)ld
-CC             =3D $(CROSS_COMPILE)gcc
+CC             =3D $(CROSS_COMPILE)gcc-4.0
 CPP            =3D $(CC) -E
 AR             =3D $(CROSS_COMPILE)ar
 NM             =3D $(CROSS_COMPILE)nm

=3D=3D=3D=3D<>=3D=3D=3D=3D

Still have to find back what should still have to be backported (as kyle did for 2.6.8) for b2k ;-)

Quoted 2 lines

Just a note, a patch to fix the function pointer canonicalization issue that you and others noticed was installed Friday to the 4.0 branc=

h,

Quoted 2 lines

and Saturday to the GCC head.

Thanks for feedback (I will try it asap),

Joel

_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

#3 lore raw

Hello Dave and * pa,

I trust, it's already a good news:

# cat /proc/cpuinfo ; uname -a ; echo " "; uptime
processor       : 0
cpu family      : PA-RISC 1.1e
cpu             : PA7300LC (PCX-L2)
cpu MHz         : 180.000000
model           : 9000/778/B180L
model name      : Merlin L2+ 180 (9000/778/B180L)
hversion        : 0x00005040
sversion        : 0x00000481
I-cache         : 64 KB
D-cache         : 64 KB (WB, 0-way associative)
ITLB entries    : 96
DTLB entries    : 96 - shared with ITLB
BTLB fixed      : max. 16384 pages, pagesize=4096 (64MB)
BTLB fix-entr.  : 0 instruction, 0 data (8 combined)
BTLB var-entr.  : 0 instruction, 0 data (0 combined)
bogomips        : 119.60
software id     : 2010134099

Linux patst004 2.6.10-pa10-b180 #1 Fri Jul 1 18:49:47 CEST 2005 parisc GNU/Linux

16:43:53 up 2 days, 23:16, 4 users, load average: 7.85, 7.10, 7.15
====<>====

# cat /proc/cpuinfo ; uname -a ; echo " "; uptime
processor       : 0
cpu family      : PA-RISC 2.0
cpu             : PA8600 (PCX-W+)
cpu MHz         : 400.000000
model           : 9000/785/B2000
model name      : Kazoo W+
hversion        : 0x00005d00
sversion        : 0x00000481
I-cache         : 512 KB
D-cache         : 1024 KB (WB, 0-way associative)
ITLB entries    : 160
DTLB entries    : 160 - shared with ITLB
bogomips        : 794.62
software id     : 2011773200

Linux patst005 2.6.10-pa11-b2k32 #2 Mon Jul 4 19:37:53 CEST 2005 parisc GNU/Linux

16:44:35 up 21:03, 6 users, load average: 8.23, 8.08, 8.10
======<>====

Previously those 32bit kernel was panicing more/less quickly after the start of my "stress test" (respectively 2h and 5min)

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

good news with gcc-4.0 (debian pakage) and '-mfixed-range=fr6-fr21,fr27-fr31'

o 2.6.9-rc2-pa1 seems to works as fine as with original option
o 2.6.9-rc2-pa13 the same

(just have to backport some small stuff to reach to compile kernels)

I apply my stress test (tar loops + kernel build loops) during a

full

Quoted 10 lines
Quoted 8 lines

day

Quoted 3 lines
Quoted 3 lines

for each one without any pb ;-)

I can now try a step forward: 2.6.10-pa + gcc-4.0, ...

I'll have to try a gcc-4.0 built kernel to see if it improves things on the c3k.

cool ;-)

[...]
(in case of interest I attached my diff file)

Quoted 5 lines
Quoted 5 lines

Just a note, a patch to fix the function pointer canonicalization issue that you and others noticed was installed Friday to the 4.0 branch, and Saturday to the GCC head.

Next test (tomorow :-)

Thanks,
Joel

_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

#4 lore raw
In reply to Joel Soete

Joel,

Quoted 2 lines

#cflags-y += -mdisable-fpregs
+cflags-y += -mfixed-range=fr6-fr21,fr27-fr31

See <http://lists.parisc-linux.org/pipermail/parisc-linux-cvs/2005-July/035965.html>.
It's now clear why you had success with the -mfixed-range in gcc 4.0. The range above disables gcc's use of the floating-point no clobber registers.

Dave

Signature · 6 lines
J. David Anglin                                  [email protected]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux