Skip to contentSkip to conversation

kexec/ppc: Use -O0 instead of -Os for purgatory

PATCH In review Matthew McClintock 2 participants 4 messages Oct 5, 2010 – Oct 6, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kexec/ppc: Use -O0 instead of -Os for purgatory

Purgatory code with -Os is not working on certain compilers, instead of finding out the hard way, just compile with -O0

---
Tried to get a dicussion going on this issue, but for now I suspect it is better to have a working kexec on ppc instead of waiting

 purgatory/arch/ppc/Makefile |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
purgatory/arch/ppc/Makefile +2 -0
index 72289a0..319870e 100644
@@ -2,6 +2,8 @@
 # Purgatory ppc
 #
 
+ppc_PURGATORY_EXTRA_CFLAGS = -O0
+
 ppc_PURGATORY_SRCS += purgatory/arch/ppc/v2wrap_32.S
 ppc_PURGATORY_SRCS += purgatory/arch/ppc/misc.S
 ppc_PURGATORY_SRCS += purgatory/arch/ppc/purgatory-ppc.c
Signature · 8 lines
1.6.6.1



_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#1 lore raw

I'm ok with that changes. I'm not sure why kernel did not turn this optimization off and goes
with compiling crt.s with sources. There could be a reasons for that. More likely to not put anything from
libgcc to kernel. We should do the same for purgatory code. So maybe it's reasonable
to apply my patch and go the same way as kernel goes (but it will break old compilers, that should not
be huge problem.)

Maxim.

2010/10/5 Matthew McClintock <[email protected]>:

Quoted 35 lines

Purgatory code with -Os is not working on certain compilers, instead of finding out the hard way, just compile with -O0

---
Tried to get a dicussion going on this issue, but for now I suspect it is better to have a working kexec on ppc instead of waiting

 purgatory/arch/ppc/Makefile |    2 ++

 1 files changed, 2 insertions(+), 0 deletions(-)
purgatory/arch/ppc/Makefile +2 -0
index 72289a0..319870e 100644
@@ -2,6 +2,8 @@
  # Purgatory ppc
  #
 
+ppc_PURGATORY_EXTRA_CFLAGS = -O0
+

 ppc_PURGATORY_SRCS += purgatory/arch/ppc/v2wrap_32.S ppc_PURGATORY_SRCS += purgatory/arch/ppc/misc.S ppc_PURGATORY_SRCS += purgatory/arch/ppc/purgatory-ppc.c --
1.6.6.1

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Signature · 7 lines
Best regards,
Maxim Uvarov

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#2 lore raw
Quoted 10 lines · Maxim Uvarov

I'm ok with that changes. I'm not sure why kernel did not turn this optimization off and goes
with compiling crt.s with sources. There could be a reasons for that. More likely to not put anything from
libgcc to kernel. We should do the same for purgatory code. So maybe it's reasonable
to apply my patch and go the same way as kernel goes (but it will break old compilers, that should not
be huge problem.)

Wait, do your recent patches have a similar effect?

-M

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#3 lore raw

2010/10/6 Matthew McClintock <[email protected]>:

Quoted 14 lines · Maxim Uvarov
Quoted 11 lines

I'm ok with that changes. I'm not sure why kernel did not turn this optimization off and goes
with compiling crt.s with sources. There could be a reasons for that. More likely to not put anything from
libgcc to kernel. We should do the same for purgatory code. So maybe it's reasonable
to apply my patch and go the same way as kernel goes (but it will break old compilers, that should not
be huge problem.)

Quoted 5 lines

Wait, do your recent patches have a similar effect?

-M

Yes please try this patch with -Os:
http://lists.infradead.org/pipermail/kexec/2010-September/004595.html

It fixes it. (I tested on 8572ds).

Quoted 6 lines

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Signature · 7 lines
Best regards,
Maxim Uvarov

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec