reiserfs gcc alias bug only on ppc32
PATCH 1/1 reiserfs gcc alias bug only on ppc32
Hi,
The workaround in reiserfs for a gcc bug in some ppc32 compilers does not affect the ppc64 compiler. A quick test to see stack usage for both options shows:
gcc -O1reiserfs_delete_solid_item: 976reiserfs_rename: 960reiserfs_cut_from_item: 880
gcc -O2reiserfs_rename: 1008reiserfs_delete_solid_item: 976reiserfs_cut_from_item: 896
So there is no reason to compile reiserfs using -O1 on ppc64.
Anton
fs/reiserfs/Makefile +3 -3
@@ -13,13 +13,13 @@ obj-m := $(O_TARGET) -# gcc -O2 (the kernel default) is overaggressive on ppc when many inline +# gcc -O2 (the kernel default) is overaggressive on ppc32 when many inline # functions are used. This causes the compiler to advance the stack # pointer out of the available stack space, corrupting kernel space, -# and causing a panic. Since this behavior only affects ppc, this ifeq +# and causing a panic. Since this behavior only affects ppc32, this ifeq # will work around it. If any other architecture displays this behavior, # add it here. -ifeq ($(shell uname -m),ppc) +ifeq ($(CONFIG_PPC32),y) EXTRA_CFLAGS := -O1 endif