bug in arch/ppc/boot/common/util.S: cmplwi cr0,r3,r4 ?
I think "cmplwi" expects an immediate vale as last operand around line 255 of arch/ppc/boot/common/util.S:
addi r4,r4,_etext@l # r8 = &_etext 1: dcbf r0,r3 # Flush the data cache icbi r0,r3 # Invalidate the instruction cache addi r3,r3,0x10 # Increment by one cache line cmplwi cr0,r3,r4 # Are we at the end yet? ^^ blt 1b # No, keep flushing and invalidating
I guess it should have been:
cmplw cr0,r3,r4 # Are we at the end yet?
Signature · 1 line
Frank
Quoted 11 lines · Frank van Maarseveen
I think "cmplwi" expects an immediate vale as last operand around line 255 of
arch/ppc/boot/common/util.S:addi r4,r4,_etext@l # r8 = &_etext 1: dcbf r0,r3 # Flush the data cache icbi r0,r3 # Invalidate the instruction cache addi r3,r3,0x10 # Increment by one cache line cmplwi cr0,r3,r4 # Are we at the end yet? ^^ blt 1b # No, keep flushing and invalidating
Quoted 3 lines
I guess it should have been:
cmplw cr0,r3,r4 # Are we at the end yet?
Yup, looks like a real bug to me, Tom ?
Ben.
Quoted 12 lines · Benjamin Herrenschmidt
Quoted 11 lines · Frank van Maarseveen
I think "cmplwi" expects an immediate vale as last operand around line 255 of
arch/ppc/boot/common/util.S:addi r4,r4,_etext@l # r8 = &_etext 1: dcbf r0,r3 # Flush the data cache icbi r0,r3 # Invalidate the instruction cache addi r3,r3,0x10 # Increment by one cache line cmplwi cr0,r3,r4 # Are we at the end yet? ^^ blt 1b # No, keep flushing and invalidating
Quoted 5 lines
Quoted 3 lines
I guess it should have been:
cmplw cr0,r3,r4 # Are we at the end yet?
Yup, looks like a real bug to me, Tom ?
Sounds correct to me. I wonder why the assembler hasn't barfed, or is is translating the ascii values of r4. I'll pass this along once 2.6.14 opens just because the code has been that way for so many years, I don't think it's a critical bug.
Signature · 2 lines
Tom Rini http://gate.crashing.org/~trini/
Quoted 13 lines · Tom Rini
Quoted 12 lines · Benjamin Herrenschmidt
Quoted 11 lines · Frank van Maarseveen
I think "cmplwi" expects an immediate vale as last operand around line 255 of
arch/ppc/boot/common/util.S:addi r4,r4,_etext@l # r8 = &_etext 1: dcbf r0,r3 # Flush the data cache icbi r0,r3 # Invalidate the instruction cache addi r3,r3,0x10 # Increment by one cache line cmplwi cr0,r3,r4 # Are we at the end yet? ^^ blt 1b # No, keep flushing and invalidating
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
I guess it should have been:
cmplw cr0,r3,r4 # Are we at the end yet?
Yup, looks like a real bug to me, Tom ?
Sounds correct to me. I wonder why the assembler hasn't barfed, or is is translating the ascii values of r4.
include/asm-ppc/ppc_asm.h:
#define r4 4
Unfortunately -mregnames is quite stupid, so that wouldn't have helped us here either.
-Hollis
Quoted 15 lines · Tom Rini
Quoted 14 lines · Benjamin Herrenschmidt
Quoted 13 lines · Frank van Maarseveen
I think "cmplwi" expects an immediate vale as last operand around line 255 of
arch/ppc/boot/common/util.S:addi r4,r4,_etext@l # r8 = &_etext 1: dcbf r0,r3 # Flush the data cache icbi r0,r3 # Invalidate the instruction cache addi r3,r3,0x10 # Increment by one cache line cmplwi cr0,r3,r4 # Are we at the end yet? ^^ blt 1b # No, keep flushing and invalidatingI guess it should have been:
Quoted 9 lines
Quoted 3 lines
Quoted 1 line
cmplw cr0,r3,r4 # Are we at the end yet?
Yup, looks like a real bug to me, Tom ?
Sounds correct to me. I wonder why the assembler hasn't barfed, or is is translating the ascii values of r4. I'll pass this along once 2.6.14 opens just because the code has been that way for so many years, I don't think it's a critical bug.
Because our assembler has no clue what r4 is :) Look at our ppc_asm.h and you'll understand :)
Ben.