* Big endian problem
@ 2001-10-12 16:26 ` Hanks Li
0 siblings, 0 replies; 29+ messages in thread
From: Hanks Li @ 2001-10-12 16:26 UTC (permalink / raw)
To: linux-mips
Hi,
Has anyone tried to compile in Big Endian mode? When I compile the code in
big endian, I got the following message. Does anybody know how to solve this
problem? The assembler I'm using is "GNU assembler 2.11.90.0.27". I have no
problem compiling the code in little endian at all.
Thanks
Hanshi Li
----------------------------------------------------------------------------
------------------------------------
mips-linux-gcc -I
/home/hli/linux/include/asm/gcc -D__KERNEL__ -I/home/hli/linux/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-ali
asing -fno-common -G
0 -mno-abicalls -fno-pic -mcpu=r5000 -mips2 -Wa,--trap -pipe -DEXPORT_SYMTAB
-c time.c
Assembler messages:
Warning: The -mcpu option is deprecated. Please use -march and -mtune
instead.
time.c: In function `calibrate_div32_gettimeoffset':
time.c:225: Unrecognizable insn:
(insn 60 144 66 (parallel[
(set (reg:SI 8 t0)
(asm_operands (".set push
.set noat
.set noreorder
b 1f
li %4,0x21
0:
sll $1,%0,0x1
srl %3,%0,0x1f
or %0,$1,$2
sll %1,%1,0x1
sll %2,%2,0x1
1:
bnez %3,2f
sltu $2,%0,%z5
bnez $2,3f
2:
addiu %4,%4,-1
subu %0,%0,%z5
addiu %2,%2,1
3:
bnez %4,0b
srl $2,%1,0x1f
.set pop") ("=&r") 0[
(reg/v:SI 4 a0)
(reg:SI 8 t0)
(reg:DI 6 a2)
(reg/v:SI 5 a1)
(reg:SI 9 t1)
]
[
(asm_input:SI ("Jr"))
(asm_input:SI ("0"))
(asm_input:DI ("1"))
(asm_input:SI ("2"))
(asm_input:SI ("3"))
] ("time.c") 201))
(set (reg:SI 6 a2)
(asm_operands (".set push
.set noat
.set noreorder
b 1f
li %4,0x21
0:
sll $1,%0,0x1
srl %3,%0,0x1f
or %0,$1,$2
sll %1,%1,0x1
sll %2,%2,0x1
1:
bnez %3,2f
sltu $2,%0,%z5
bnez $2,3f
2:
addiu %4,%4,-1
subu %0,%0,%z5
addiu %2,%2,1
3:
bnez %4,0b
srl $2,%1,0x1f
.set pop") ("=&r") 1[
(reg/v:SI 4 a0)
(reg:SI 8 t0)
(reg:DI 6 a2)
(reg/v:SI 5 a1)
(reg:SI 9 t1)
]
[
(asm_input:SI ("Jr"))
(asm_input:SI ("0"))
(asm_input:DI ("1"))
(asm_input:SI ("2"))
(asm_input:SI ("3"))
] ("time.c") 201))
(set (reg/v:SI 5 a1)
(asm_operands (".set push
.set noat
.set noreorder
b 1f
li %4,0x21
0:
sll $1,%0,0x1
srl %3,%0,0x1f
or %0,$1,$2
sll %1,%1,0x1
sll %2,%2,0x1
1:
bnez %3,2f
sltu $2,%0,%z5
bnez $2,3f
2:
addiu %4,%4,-1
subu %0,%0,%z5
addiu %2,%2,1
3:
bnez %4,0b
srl $2,%1,0x1f
.set pop") ("=&r") 2[
(reg/v:SI 4 a0)
(reg:SI 8 t0)
(reg:DI 6 a2)
(reg/v:SI 5 a1)
(reg:SI 9 t1)
]
[
(asm_input:SI ("Jr"))
(asm_input:SI ("0"))
(asm_input:DI ("1"))
(asm_input:SI ("2"))
(asm_input:SI ("3"))
] ("time.c") 201))
(set (reg:SI 9 t1)
(asm_operands (".set push
.set noat
.set noreorder
b 1f
li %4,0x21
0:
sll $1,%0,0x1
srl %3,%0,0x1f
or %0,$1,$2
sll %1,%1,0x1
sll %2,%2,0x1
1:
bnez %3,2f
sltu $2,%0,%z5
bnez $2,3f
2:
addiu %4,%4,-1
subu %0,%0,%z5
addiu %2,%2,1
3:
bnez %4,0b
srl $2,%1,0x1f
.set pop") ("=&r") 3[
(reg/v:SI 4 a0)
(reg:SI 8 t0)
(reg:DI 6 a2)
(reg/v:SI 5 a1)
(reg:SI 9 t1)
]
[
(asm_input:SI ("Jr"))
(asm_input:SI ("0"))
(asm_input:DI ("1"))
(asm_input:SI ("2"))
(asm_input:SI ("3"))
] ("time.c") 201))
(set (reg:SI 14 t6)
(asm_operands (".set push
.set noat
.set noreorder
b 1f
li %4,0x21
0:
sll $1,%0,0x1
srl %3,%0,0x1f
or %0,$1,$2
sll %1,%1,0x1
sll %2,%2,0x1
1:
bnez %3,2f
sltu $2,%0,%z5
bnez $2,3f
2:
addiu %4,%4,-1
subu %0,%0,%z5
addiu %2,%2,1
3:
bnez %4,0b
srl $2,%1,0x1f
.set pop") ("=&r") 4[
(reg/v:SI 4 a0)
(reg:SI 8 t0)
(reg:DI 6 a2)
(reg/v:SI 5 a1)
(reg:SI 9 t1)
]
[
(asm_input:SI ("Jr"))
(asm_input:SI ("0"))
(asm_input:DI ("1"))
(asm_input:SI ("2"))
(asm_input:SI ("3"))
] ("time.c") 201))
(clobber (reg:QI 2 v0))
(clobber (reg:QI 1 at))
] ) -1 (insn_list:REG_DEP_OUTPUT 13 (insn_list 38 (insn_list 53 (insn_list
51 (insn_list 41 (nil))))))
(nil))
time.c:225: confused by earlier errors, bailing out
make[1]: *** [time.o] Error 1
make[1]: Leaving directory `/home/hli/linux/arch/mips/kernel'
make: *** [_dir_arch/mips/kernel] Error 2
----------------------------------------------------------------------------
---------------------------------
^ permalink raw reply [flat|nested] 29+ messages in thread
* Big endian problem
@ 2001-10-12 16:26 ` Hanks Li
0 siblings, 0 replies; 29+ messages in thread
From: Hanks Li @ 2001-10-12 16:26 UTC (permalink / raw)
To: linux-mips
Hi,
Has anyone tried to compile in Big Endian mode? When I compile the code in
big endian, I got the following message. Does anybody know how to solve this
problem? The assembler I'm using is "GNU assembler 2.11.90.0.27". I have no
problem compiling the code in little endian at all.
Thanks
Hanshi Li
----------------------------------------------------------------------------
------------------------------------
mips-linux-gcc -I
/home/hli/linux/include/asm/gcc -D__KERNEL__ -I/home/hli/linux/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-ali
asing -fno-common -G
0 -mno-abicalls -fno-pic -mcpu=r5000 -mips2 -Wa,--trap -pipe -DEXPORT_SYMTAB
-c time.c
Assembler messages:
Warning: The -mcpu option is deprecated. Please use -march and -mtune
instead.
time.c: In function `calibrate_div32_gettimeoffset':
time.c:225: Unrecognizable insn:
(insn 60 144 66 (parallel[
(set (reg:SI 8 t0)
(asm_operands (".set push
.set noat
.set noreorder
b 1f
li %4,0x21
0:
sll $1,%0,0x1
srl %3,%0,0x1f
or %0,$1,$2
sll %1,%1,0x1
sll %2,%2,0x1
1:
bnez %3,2f
sltu $2,%0,%z5
bnez $2,3f
2:
addiu %4,%4,-1
subu %0,%0,%z5
addiu %2,%2,1
3:
bnez %4,0b
srl $2,%1,0x1f
.set pop") ("=&r") 0[
(reg/v:SI 4 a0)
(reg:SI 8 t0)
(reg:DI 6 a2)
(reg/v:SI 5 a1)
(reg:SI 9 t1)
]
[
(asm_input:SI ("Jr"))
(asm_input:SI ("0"))
(asm_input:DI ("1"))
(asm_input:SI ("2"))
(asm_input:SI ("3"))
] ("time.c") 201))
(set (reg:SI 6 a2)
(asm_operands (".set push
.set noat
.set noreorder
b 1f
li %4,0x21
0:
sll $1,%0,0x1
srl %3,%0,0x1f
or %0,$1,$2
sll %1,%1,0x1
sll %2,%2,0x1
1:
bnez %3,2f
sltu $2,%0,%z5
bnez $2,3f
2:
addiu %4,%4,-1
subu %0,%0,%z5
addiu %2,%2,1
3:
bnez %4,0b
srl $2,%1,0x1f
.set pop") ("=&r") 1[
(reg/v:SI 4 a0)
(reg:SI 8 t0)
(reg:DI 6 a2)
(reg/v:SI 5 a1)
(reg:SI 9 t1)
]
[
(asm_input:SI ("Jr"))
(asm_input:SI ("0"))
(asm_input:DI ("1"))
(asm_input:SI ("2"))
(asm_input:SI ("3"))
] ("time.c") 201))
(set (reg/v:SI 5 a1)
(asm_operands (".set push
.set noat
.set noreorder
b 1f
li %4,0x21
0:
sll $1,%0,0x1
srl %3,%0,0x1f
or %0,$1,$2
sll %1,%1,0x1
sll %2,%2,0x1
1:
bnez %3,2f
sltu $2,%0,%z5
bnez $2,3f
2:
addiu %4,%4,-1
subu %0,%0,%z5
addiu %2,%2,1
3:
bnez %4,0b
srl $2,%1,0x1f
.set pop") ("=&r") 2[
(reg/v:SI 4 a0)
(reg:SI 8 t0)
(reg:DI 6 a2)
(reg/v:SI 5 a1)
(reg:SI 9 t1)
]
[
(asm_input:SI ("Jr"))
(asm_input:SI ("0"))
(asm_input:DI ("1"))
(asm_input:SI ("2"))
(asm_input:SI ("3"))
] ("time.c") 201))
(set (reg:SI 9 t1)
(asm_operands (".set push
.set noat
.set noreorder
b 1f
li %4,0x21
0:
sll $1,%0,0x1
srl %3,%0,0x1f
or %0,$1,$2
sll %1,%1,0x1
sll %2,%2,0x1
1:
bnez %3,2f
sltu $2,%0,%z5
bnez $2,3f
2:
addiu %4,%4,-1
subu %0,%0,%z5
addiu %2,%2,1
3:
bnez %4,0b
srl $2,%1,0x1f
.set pop") ("=&r") 3[
(reg/v:SI 4 a0)
(reg:SI 8 t0)
(reg:DI 6 a2)
(reg/v:SI 5 a1)
(reg:SI 9 t1)
]
[
(asm_input:SI ("Jr"))
(asm_input:SI ("0"))
(asm_input:DI ("1"))
(asm_input:SI ("2"))
(asm_input:SI ("3"))
] ("time.c") 201))
(set (reg:SI 14 t6)
(asm_operands (".set push
.set noat
.set noreorder
b 1f
li %4,0x21
0:
sll $1,%0,0x1
srl %3,%0,0x1f
or %0,$1,$2
sll %1,%1,0x1
sll %2,%2,0x1
1:
bnez %3,2f
sltu $2,%0,%z5
bnez $2,3f
2:
addiu %4,%4,-1
subu %0,%0,%z5
addiu %2,%2,1
3:
bnez %4,0b
srl $2,%1,0x1f
.set pop") ("=&r") 4[
(reg/v:SI 4 a0)
(reg:SI 8 t0)
(reg:DI 6 a2)
(reg/v:SI 5 a1)
(reg:SI 9 t1)
]
[
(asm_input:SI ("Jr"))
(asm_input:SI ("0"))
(asm_input:DI ("1"))
(asm_input:SI ("2"))
(asm_input:SI ("3"))
] ("time.c") 201))
(clobber (reg:QI 2 v0))
(clobber (reg:QI 1 at))
] ) -1 (insn_list:REG_DEP_OUTPUT 13 (insn_list 38 (insn_list 53 (insn_list
51 (insn_list 41 (nil))))))
(nil))
time.c:225: confused by earlier errors, bailing out
make[1]: *** [time.o] Error 1
make[1]: Leaving directory `/home/hli/linux/arch/mips/kernel'
make: *** [_dir_arch/mips/kernel] Error 2
----------------------------------------------------------------------------
---------------------------------
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Big endian problem
2001-10-12 16:26 ` Hanks Li
(?)
@ 2001-10-12 17:45 ` Ralf Baechle
-1 siblings, 0 replies; 29+ messages in thread
From: Ralf Baechle @ 2001-10-12 17:45 UTC (permalink / raw)
To: Hanks Li; +Cc: linux-mips
On Fri, Oct 12, 2001 at 12:26:07PM -0400, Hanks Li wrote:
> Has anyone tried to compile in Big Endian mode? When I compile the code in
> big endian, I got the following message. Does anybody know how to solve this
> problem? The assembler I'm using is "GNU assembler 2.11.90.0.27". I have no
> problem compiling the code in little endian at all.
What compiler is this?
Ralf
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Big endian problem
2001-10-12 16:26 ` Hanks Li
(?)
(?)
@ 2001-10-12 17:47 ` Jun Sun
2001-10-12 20:13 ` Dan Aizenstros
-1 siblings, 1 reply; 29+ messages in thread
From: Jun Sun @ 2001-10-12 17:47 UTC (permalink / raw)
To: Hanks Li; +Cc: linux-mips
Which time.c is this? I have seen this problem caused by mis-defined
USECS_PER_JIFFY_FRAC macro. Look at other time.c files for the right one.
Or better yet, upgrade your port to use the common time.c. See
Documantation/mips/time.README file.
Jun
Hanks Li wrote:
>
> Hi,
>
> Has anyone tried to compile in Big Endian mode? When I compile the code in
> big endian, I got the following message. Does anybody know how to solve this
> problem? The assembler I'm using is "GNU assembler 2.11.90.0.27". I have no
> problem compiling the code in little endian at all.
>
> Thanks
>
> Hanshi Li
>
> ----------------------------------------------------------------------------
> ------------------------------------
> mips-linux-gcc -I
> /home/hli/linux/include/asm/gcc -D__KERNEL__ -I/home/hli/linux/include -Wall
> -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-ali
> asing -fno-common -G
> 0 -mno-abicalls -fno-pic -mcpu=r5000 -mips2 -Wa,--trap -pipe -DEXPORT_SYMTAB
> -c time.c
> Assembler messages:
> Warning: The -mcpu option is deprecated. Please use -march and -mtune
> instead.
> time.c: In function `calibrate_div32_gettimeoffset':
> time.c:225: Unrecognizable insn:
> (insn 60 144 66 (parallel[
> (set (reg:SI 8 t0)
> (asm_operands (".set push
> .set noat
> .set noreorder
> b 1f
> li %4,0x21
> 0:
> sll $1,%0,0x1
> srl %3,%0,0x1f
> or %0,$1,$2
> sll %1,%1,0x1
> sll %2,%2,0x1
> 1:
> bnez %3,2f
> sltu $2,%0,%z5
> bnez $2,3f
> 2:
> addiu %4,%4,-1
> subu %0,%0,%z5
> addiu %2,%2,1
> 3:
> bnez %4,0b
> srl $2,%1,0x1f
> .set pop") ("=&r") 0[
> (reg/v:SI 4 a0)
> (reg:SI 8 t0)
> (reg:DI 6 a2)
> (reg/v:SI 5 a1)
> (reg:SI 9 t1)
> ]
> [
> (asm_input:SI ("Jr"))
> (asm_input:SI ("0"))
> (asm_input:DI ("1"))
> (asm_input:SI ("2"))
> (asm_input:SI ("3"))
> ] ("time.c") 201))
> (set (reg:SI 6 a2)
> (asm_operands (".set push
> .set noat
> .set noreorder
> b 1f
> li %4,0x21
> 0:
> sll $1,%0,0x1
> srl %3,%0,0x1f
> or %0,$1,$2
> sll %1,%1,0x1
> sll %2,%2,0x1
> 1:
> bnez %3,2f
> sltu $2,%0,%z5
> bnez $2,3f
> 2:
> addiu %4,%4,-1
> subu %0,%0,%z5
> addiu %2,%2,1
> 3:
> bnez %4,0b
> srl $2,%1,0x1f
> .set pop") ("=&r") 1[
> (reg/v:SI 4 a0)
> (reg:SI 8 t0)
> (reg:DI 6 a2)
> (reg/v:SI 5 a1)
> (reg:SI 9 t1)
> ]
> [
> (asm_input:SI ("Jr"))
> (asm_input:SI ("0"))
> (asm_input:DI ("1"))
> (asm_input:SI ("2"))
> (asm_input:SI ("3"))
> ] ("time.c") 201))
> (set (reg/v:SI 5 a1)
> (asm_operands (".set push
> .set noat
> .set noreorder
> b 1f
> li %4,0x21
> 0:
> sll $1,%0,0x1
> srl %3,%0,0x1f
> or %0,$1,$2
> sll %1,%1,0x1
> sll %2,%2,0x1
> 1:
> bnez %3,2f
> sltu $2,%0,%z5
> bnez $2,3f
> 2:
> addiu %4,%4,-1
> subu %0,%0,%z5
> addiu %2,%2,1
> 3:
> bnez %4,0b
> srl $2,%1,0x1f
> .set pop") ("=&r") 2[
> (reg/v:SI 4 a0)
> (reg:SI 8 t0)
> (reg:DI 6 a2)
> (reg/v:SI 5 a1)
> (reg:SI 9 t1)
> ]
> [
> (asm_input:SI ("Jr"))
> (asm_input:SI ("0"))
> (asm_input:DI ("1"))
> (asm_input:SI ("2"))
> (asm_input:SI ("3"))
> ] ("time.c") 201))
> (set (reg:SI 9 t1)
> (asm_operands (".set push
> .set noat
> .set noreorder
> b 1f
> li %4,0x21
> 0:
> sll $1,%0,0x1
> srl %3,%0,0x1f
> or %0,$1,$2
> sll %1,%1,0x1
> sll %2,%2,0x1
> 1:
> bnez %3,2f
> sltu $2,%0,%z5
> bnez $2,3f
> 2:
> addiu %4,%4,-1
> subu %0,%0,%z5
> addiu %2,%2,1
> 3:
> bnez %4,0b
> srl $2,%1,0x1f
> .set pop") ("=&r") 3[
> (reg/v:SI 4 a0)
> (reg:SI 8 t0)
> (reg:DI 6 a2)
> (reg/v:SI 5 a1)
> (reg:SI 9 t1)
> ]
> [
> (asm_input:SI ("Jr"))
> (asm_input:SI ("0"))
> (asm_input:DI ("1"))
> (asm_input:SI ("2"))
> (asm_input:SI ("3"))
> ] ("time.c") 201))
> (set (reg:SI 14 t6)
> (asm_operands (".set push
> .set noat
> .set noreorder
> b 1f
> li %4,0x21
> 0:
> sll $1,%0,0x1
> srl %3,%0,0x1f
> or %0,$1,$2
> sll %1,%1,0x1
> sll %2,%2,0x1
> 1:
> bnez %3,2f
> sltu $2,%0,%z5
> bnez $2,3f
> 2:
> addiu %4,%4,-1
> subu %0,%0,%z5
> addiu %2,%2,1
> 3:
> bnez %4,0b
> srl $2,%1,0x1f
> .set pop") ("=&r") 4[
> (reg/v:SI 4 a0)
> (reg:SI 8 t0)
> (reg:DI 6 a2)
> (reg/v:SI 5 a1)
> (reg:SI 9 t1)
> ]
> [
> (asm_input:SI ("Jr"))
> (asm_input:SI ("0"))
> (asm_input:DI ("1"))
> (asm_input:SI ("2"))
> (asm_input:SI ("3"))
> ] ("time.c") 201))
> (clobber (reg:QI 2 v0))
> (clobber (reg:QI 1 at))
> ] ) -1 (insn_list:REG_DEP_OUTPUT 13 (insn_list 38 (insn_list 53 (insn_list
> 51 (insn_list 41 (nil))))))
> (nil))
> time.c:225: confused by earlier errors, bailing out
> make[1]: *** [time.o] Error 1
> make[1]: Leaving directory `/home/hli/linux/arch/mips/kernel'
> make: *** [_dir_arch/mips/kernel] Error 2
> ----------------------------------------------------------------------------
> ---------------------------------
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Big endian problem
2001-10-12 17:47 ` Jun Sun
@ 2001-10-12 20:13 ` Dan Aizenstros
2001-10-13 0:35 ` Jun Sun
0 siblings, 1 reply; 29+ messages in thread
From: Dan Aizenstros @ 2001-10-12 20:13 UTC (permalink / raw)
To: Jun Sun; +Cc: Hanks Li, linux-mips
Hello Jun,
The file is the common time.c from linux/arch/mips/kernel as you
can see from the third to last line of Hanshi's email. The tools
he is using are from H. J. Lu's RedHat 7.1 RPMs on the oss.sgi.com
ftp site. The file compiles just fine with the little endian version
of the same tools from the same place.
Hanshi and I will look at the USECS_PER_JIFFY_FRAC macro. Thanks for
the pointer.
-- Dan A.
Jun Sun wrote:
> Which time.c is this? I have seen this problem caused by mis-defined
> USECS_PER_JIFFY_FRAC macro. Look at other time.c files for the right one.
>
> Or better yet, upgrade your port to use the common time.c. See
> Documantation/mips/time.README file.
>
> Jun
>
> Hanks Li wrote:
>
>>Hi,
>>
>>Has anyone tried to compile in Big Endian mode? When I compile the code in
>>big endian, I got the following message. Does anybody know how to solve this
>>problem? The assembler I'm using is "GNU assembler 2.11.90.0.27". I have no
>>problem compiling the code in little endian at all.
>>
>>Thanks
>>
>>Hanshi Li
>>
>>----------------------------------------------------------------------------
>>------------------------------------
>>mips-linux-gcc -I
>>/home/hli/linux/include/asm/gcc -D__KERNEL__ -I/home/hli/linux/include -Wall
>> -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-ali
>>asing -fno-common -G
>>0 -mno-abicalls -fno-pic -mcpu=r5000 -mips2 -Wa,--trap -pipe -DEXPORT_SYMTAB
>> -c time.c
>>Assembler messages:
>>Warning: The -mcpu option is deprecated. Please use -march and -mtune
>>instead.
>>time.c: In function `calibrate_div32_gettimeoffset':
>>time.c:225: Unrecognizable insn:
>>(insn 60 144 66 (parallel[
>>(set (reg:SI 8 t0)
>>(asm_operands (".set push
>>.set noat
>>.set noreorder
>>b 1f
>>li %4,0x21
>>0:
>>sll $1,%0,0x1
>>srl %3,%0,0x1f
>>or %0,$1,$2
>>sll %1,%1,0x1
>>sll %2,%2,0x1
>>1:
>>bnez %3,2f
>>sltu $2,%0,%z5
>>bnez $2,3f
>>2:
>>addiu %4,%4,-1
>>subu %0,%0,%z5
>>addiu %2,%2,1
>>3:
>>bnez %4,0b
>>srl $2,%1,0x1f
>>.set pop") ("=&r") 0[
>>(reg/v:SI 4 a0)
>>(reg:SI 8 t0)
>>(reg:DI 6 a2)
>>(reg/v:SI 5 a1)
>>(reg:SI 9 t1)
>>]
>>[
>>(asm_input:SI ("Jr"))
>>(asm_input:SI ("0"))
>>(asm_input:DI ("1"))
>>(asm_input:SI ("2"))
>>(asm_input:SI ("3"))
>>] ("time.c") 201))
>>(set (reg:SI 6 a2)
>>(asm_operands (".set push
>>.set noat
>>.set noreorder
>>b 1f
>>li %4,0x21
>>0:
>>sll $1,%0,0x1
>>srl %3,%0,0x1f
>>or %0,$1,$2
>>sll %1,%1,0x1
>>sll %2,%2,0x1
>>1:
>>bnez %3,2f
>>sltu $2,%0,%z5
>>bnez $2,3f
>>2:
>>addiu %4,%4,-1
>>subu %0,%0,%z5
>>addiu %2,%2,1
>>3:
>>bnez %4,0b
>>srl $2,%1,0x1f
>>.set pop") ("=&r") 1[
>>(reg/v:SI 4 a0)
>>(reg:SI 8 t0)
>>(reg:DI 6 a2)
>>(reg/v:SI 5 a1)
>>(reg:SI 9 t1)
>>]
>>[
>>(asm_input:SI ("Jr"))
>>(asm_input:SI ("0"))
>>(asm_input:DI ("1"))
>>(asm_input:SI ("2"))
>>(asm_input:SI ("3"))
>>] ("time.c") 201))
>>(set (reg/v:SI 5 a1)
>>(asm_operands (".set push
>>.set noat
>>.set noreorder
>>b 1f
>>li %4,0x21
>>0:
>>sll $1,%0,0x1
>>srl %3,%0,0x1f
>>or %0,$1,$2
>>sll %1,%1,0x1
>>sll %2,%2,0x1
>>1:
>>bnez %3,2f
>>sltu $2,%0,%z5
>>bnez $2,3f
>>2:
>>addiu %4,%4,-1
>>subu %0,%0,%z5
>>addiu %2,%2,1
>>3:
>>bnez %4,0b
>>srl $2,%1,0x1f
>>.set pop") ("=&r") 2[
>>(reg/v:SI 4 a0)
>>(reg:SI 8 t0)
>>(reg:DI 6 a2)
>>(reg/v:SI 5 a1)
>>(reg:SI 9 t1)
>>]
>>[
>>(asm_input:SI ("Jr"))
>>(asm_input:SI ("0"))
>>(asm_input:DI ("1"))
>>(asm_input:SI ("2"))
>>(asm_input:SI ("3"))
>>] ("time.c") 201))
>>(set (reg:SI 9 t1)
>>(asm_operands (".set push
>>.set noat
>>.set noreorder
>>b 1f
>>li %4,0x21
>>0:
>>sll $1,%0,0x1
>>srl %3,%0,0x1f
>>or %0,$1,$2
>>sll %1,%1,0x1
>>sll %2,%2,0x1
>>1:
>>bnez %3,2f
>>sltu $2,%0,%z5
>>bnez $2,3f
>>2:
>>addiu %4,%4,-1
>>subu %0,%0,%z5
>>addiu %2,%2,1
>>3:
>>bnez %4,0b
>>srl $2,%1,0x1f
>>.set pop") ("=&r") 3[
>>(reg/v:SI 4 a0)
>>(reg:SI 8 t0)
>>(reg:DI 6 a2)
>>(reg/v:SI 5 a1)
>>(reg:SI 9 t1)
>>]
>>[
>>(asm_input:SI ("Jr"))
>>(asm_input:SI ("0"))
>>(asm_input:DI ("1"))
>>(asm_input:SI ("2"))
>>(asm_input:SI ("3"))
>>] ("time.c") 201))
>>(set (reg:SI 14 t6)
>>(asm_operands (".set push
>>.set noat
>>.set noreorder
>>b 1f
>>li %4,0x21
>>0:
>>sll $1,%0,0x1
>>srl %3,%0,0x1f
>>or %0,$1,$2
>>sll %1,%1,0x1
>>sll %2,%2,0x1
>>1:
>>bnez %3,2f
>>sltu $2,%0,%z5
>>bnez $2,3f
>>2:
>>addiu %4,%4,-1
>>subu %0,%0,%z5
>>addiu %2,%2,1
>>3:
>>bnez %4,0b
>>srl $2,%1,0x1f
>>.set pop") ("=&r") 4[
>>(reg/v:SI 4 a0)
>>(reg:SI 8 t0)
>>(reg:DI 6 a2)
>>(reg/v:SI 5 a1)
>>(reg:SI 9 t1)
>>]
>>[
>>(asm_input:SI ("Jr"))
>>(asm_input:SI ("0"))
>>(asm_input:DI ("1"))
>>(asm_input:SI ("2"))
>>(asm_input:SI ("3"))
>>] ("time.c") 201))
>>(clobber (reg:QI 2 v0))
>>(clobber (reg:QI 1 at))
>>] ) -1 (insn_list:REG_DEP_OUTPUT 13 (insn_list 38 (insn_list 53 (insn_list
>>51 (insn_list 41 (nil))))))
>>(nil))
>>time.c:225: confused by earlier errors, bailing out
>>make[1]: *** [time.o] Error 1
>>make[1]: Leaving directory `/home/hli/linux/arch/mips/kernel'
>>make: *** [_dir_arch/mips/kernel] Error 2
>>----------------------------------------------------------------------------
>>---------------------------------
>>
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Big endian problem
2001-10-12 20:13 ` Dan Aizenstros
@ 2001-10-13 0:35 ` Jun Sun
2001-10-13 0:55 ` Thiemo Seufer
2001-10-13 5:54 ` H . J . Lu
0 siblings, 2 replies; 29+ messages in thread
From: Jun Sun @ 2001-10-13 0:35 UTC (permalink / raw)
To: Dan Aizenstros; +Cc: Hanks Li, linux-mips
[-- Attachment #1: Type: text/plain, Size: 699 bytes --]
On Fri, Oct 12, 2001 at 04:13:50PM -0400, Dan Aizenstros wrote:
> Hello Jun,
>
> The file is the common time.c from linux/arch/mips/kernel as you
> can see from the third to last line of Hanshi's email. The tools
> he is using are from H. J. Lu's RedHat 7.1 RPMs on the oss.sgi.com
> ftp site. The file compiles just fine with the little endian version
> of the same tools from the same place.
>
> Hanshi and I will look at the USECS_PER_JIFFY_FRAC macro. Thanks for
> the pointer.
>
> -- Dan A.
>
It is indeed a strange problem as it only shows up in BE tools.
Some tool gurus want to look into it?
Meanwhile the following patch seems to fix it (and a couple of other
time.c files)
Jun
[-- Attachment #2: time_JIFFY_FRAC.patch --]
[-- Type: text/plain, Size: 1137 bytes --]
diff -Nru linux/arch/mips/dec/time.c.orig linux/arch/mips/dec/time.c
--- linux/arch/mips/dec/time.c.orig Thu Aug 23 15:24:23 2001
+++ linux/arch/mips/dec/time.c Fri Oct 12 17:35:51 2001
@@ -8,6 +8,7 @@
* found in some MIPS systems.
*
*/
+#include <linux/types.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/sched.h>
@@ -44,7 +45,7 @@
/* This is for machines which generate the exact clock. */
#define USECS_PER_JIFFY (1000000/HZ)
-#define USECS_PER_JIFFY_FRAC ((1000000ULL << 32) / HZ & 0xffffffff)
+#define USECS_PER_JIFFY_FRAC ((u32)((1000000ULL << 32) / HZ))
/* Cycle counter value at the previous timer interrupt.. */
diff -Nru linux/arch/mips/kernel/time.c.orig linux/arch/mips/kernel/time.c
--- linux/arch/mips/kernel/time.c.orig Sat Oct 6 22:04:40 2001
+++ linux/arch/mips/kernel/time.c Fri Oct 12 17:35:17 2001
@@ -30,7 +30,7 @@
/* This is for machines which generate the exact clock. */
#define USECS_PER_JIFFY (1000000/HZ)
-#define USECS_PER_JIFFY_FRAC ((1000000ULL << 32) / HZ & 0xffffffff)
+#define USECS_PER_JIFFY_FRAC ((u32)((1000000ULL << 32) / HZ))
/*
* forward reference
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Big endian problem
2001-10-13 0:35 ` Jun Sun
@ 2001-10-13 0:55 ` Thiemo Seufer
2001-10-13 5:54 ` H . J . Lu
1 sibling, 0 replies; 29+ messages in thread
From: Thiemo Seufer @ 2001-10-13 0:55 UTC (permalink / raw)
To: linux-mips
Jun Sun wrote:
[snip]
> > Hanshi and I will look at the USECS_PER_JIFFY_FRAC macro. Thanks for
> > the pointer.
> >
> > -- Dan A.
> >
>
> It is indeed a strange problem as it only shows up in BE tools.
> Some tool gurus want to look into it?
I use the BE CVS tools and haven't seen this.
How does the preprocessed code look like?
Thiemo
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Big endian problem
@ 2001-10-13 5:54 ` H . J . Lu
0 siblings, 0 replies; 29+ messages in thread
From: H . J . Lu @ 2001-10-13 5:54 UTC (permalink / raw)
To: Jun Sun; +Cc: Dan Aizenstros, Hanks Li, linux-mips
On Fri, Oct 12, 2001 at 05:35:52PM -0700, Jun Sun wrote:
> On Fri, Oct 12, 2001 at 04:13:50PM -0400, Dan Aizenstros wrote:
> > Hello Jun,
> >
> > The file is the common time.c from linux/arch/mips/kernel as you
> > can see from the third to last line of Hanshi's email. The tools
> > he is using are from H. J. Lu's RedHat 7.1 RPMs on the oss.sgi.com
> > ftp site. The file compiles just fine with the little endian version
> > of the same tools from the same place.
> >
> > Hanshi and I will look at the USECS_PER_JIFFY_FRAC macro. Thanks for
> > the pointer.
> >
> > -- Dan A.
> >
>
> It is indeed a strange problem as it only shows up in BE tools.
> Some tool gurus want to look into it?
>
> Meanwhile the following patch seems to fix it (and a couple of other
> time.c files)
>
> Jun
This is what I sent out in July.
H.J.
----
From hjl@lucon.org Tue Jul 24 13:25:34 2001
Date: Tue, 24 Jul 2001 13:25:34 -0700
From: "H . J . Lu" <hjl@lucon.org>
To: Marc Karasek <marc_karasek@ivivity.com>
Cc: linux-mips@oss.sgi.com
Subject: Re: GCC and Modules
Message-ID: <20010724132534.A25416@lucon.org>
References: <25369470B6F0D41194820002B328BDD27D2E@ATLOPS> <20010724085544.A20610@lucon.org> <995995907.1331.5.camel@localhost.localdomain>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <995995907.1331.5.camel@localhost.localdomain>; from marc_karasek@ivivity.com on Tue, Jul 24, 2001 at 01:31:41PM -0400
Status: RO
Content-Length: 954
Lines: 29
On Tue, Jul 24, 2001 at 01:31:41PM -0400, Marc Karasek wrote:
> The way to see this bug is just try to compile the MIPS kernel (either
> 2.4.1 or 2.4.3) as follows:
>
> 1) make distclean
> 2) copy linux/arch/mips/defconfig-malta linux/.config
> 3) make oldconfig
> 4) make menuconfig
> 5) change the endianess from little to big
> 6) make dep
> 7) make zImage
>
That is a kernel bug. The code only works on littl endian by accident
Here is a patch.
H.J.
--- arch/mips/mips-boards/generic/time.c.int64 Tue Jul 24 13:21:21 2001
+++ arch/mips/mips-boards/generic/time.c Tue Jul 24 13:22:02 2001
@@ -275,7 +275,7 @@ void __init time_init(void)
/* This is for machines which generate the exact clock. */
#define USECS_PER_JIFFY (1000000/HZ)
-#define USECS_PER_JIFFY_FRAC (0x100000000*1000000/HZ&0xffffffff)
+#define USECS_PER_JIFFY_FRAC ((long) (0x100000000*1000000/HZ&0xffffffff))
/* Cycle counter value at the previous timer interrupt.. */
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: Big endian problem
@ 2001-10-13 5:54 ` H . J . Lu
0 siblings, 0 replies; 29+ messages in thread
From: H . J . Lu @ 2001-10-13 5:54 UTC (permalink / raw)
To: Jun Sun; +Cc: Dan Aizenstros, Hanks Li, linux-mips
On Fri, Oct 12, 2001 at 05:35:52PM -0700, Jun Sun wrote:
> On Fri, Oct 12, 2001 at 04:13:50PM -0400, Dan Aizenstros wrote:
> > Hello Jun,
> >
> > The file is the common time.c from linux/arch/mips/kernel as you
> > can see from the third to last line of Hanshi's email. The tools
> > he is using are from H. J. Lu's RedHat 7.1 RPMs on the oss.sgi.com
> > ftp site. The file compiles just fine with the little endian version
> > of the same tools from the same place.
> >
> > Hanshi and I will look at the USECS_PER_JIFFY_FRAC macro. Thanks for
> > the pointer.
> >
> > -- Dan A.
> >
>
> It is indeed a strange problem as it only shows up in BE tools.
> Some tool gurus want to look into it?
>
> Meanwhile the following patch seems to fix it (and a couple of other
> time.c files)
>
> Jun
This is what I sent out in July.
H.J.
----
^ permalink raw reply [flat|nested] 29+ messages in thread
* MySQL
@ 2001-10-13 21:02 ` Yoshi-K
0 siblings, 0 replies; 29+ messages in thread
From: Yoshi-K @ 2001-10-13 21:02 UTC (permalink / raw)
To: linux-mips
hello.
As for everybody, does MySQL operate without trouble?
OS: PS2 Linux.
CPU: R5900
gcc 2.95.2
glibc 2.2.2
$ uname -a
Linux speed-ps 2.2.1 #94 Thu Apr 19 12:13:01 JST 2001 mips unknown
# cd mysql-3.23.42
# ./configure --with-charset=ujis --with-mysqld-user=mysql
# make;make install
# chown -R mysql.mysql /usr/local/var
# /usr/local/bin/mysql_install_db --user=mysql
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
011006 21:20:23 /usr/local/libexec/mysqld: Shutdown Complete
-------------------------
Yoshikatsu Kida
E-Mail: yoshi@galaxies.jp
http://galaxies.jp/
^ permalink raw reply [flat|nested] 29+ messages in thread
* MySQL
@ 2001-10-13 21:02 ` Yoshi-K
0 siblings, 0 replies; 29+ messages in thread
From: Yoshi-K @ 2001-10-13 21:02 UTC (permalink / raw)
To: linux-mips
hello.
As for everybody, does MySQL operate without trouble?
OS: PS2 Linux.
CPU: R5900
gcc 2.95.2
glibc 2.2.2
$ uname -a
Linux speed-ps 2.2.1 #94 Thu Apr 19 12:13:01 JST 2001 mips unknown
# cd mysql-3.23.42
# ./configure --with-charset=ujis --with-mysqld-user=mysql
# make;make install
# chown -R mysql.mysql /usr/local/var
# /usr/local/bin/mysql_install_db --user=mysql
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
ERROR: 1033 Incorrect information in file: './mysql/db.frm'
011006 21:20:23 /usr/local/libexec/mysqld: Shutdown Complete
-------------------------
Yoshikatsu Kida
E-Mail: yoshi@galaxies.jp
http://galaxies.jp/
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: MySQL
2001-10-13 21:02 ` MySQL Yoshi-K
(?)
@ 2001-10-14 16:30 ` H . J . Lu
2001-10-14 21:01 ` MySQL Ralf Baechle
-1 siblings, 1 reply; 29+ messages in thread
From: H . J . Lu @ 2001-10-14 16:30 UTC (permalink / raw)
To: Yoshi-K; +Cc: linux-mips
On Sun, Oct 14, 2001 at 06:02:35AM +0900, Yoshi-K wrote:
> hello.
> As for everybody, does MySQL operate without trouble?
>
> OS: PS2 Linux.
> CPU: R5900
> gcc 2.95.2
> glibc 2.2.2
> $ uname -a
> Linux speed-ps 2.2.1 #94 Thu Apr 19 12:13:01 JST 2001 mips unknown
>
I ported mysql 3.23.36 to mips II and above in my RedHat 7.1 for
mips.
H.J.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: MySQL
2001-10-14 16:30 ` MySQL H . J . Lu
@ 2001-10-14 21:01 ` Ralf Baechle
2001-10-15 5:46 ` MySQL H . J . Lu
0 siblings, 1 reply; 29+ messages in thread
From: Ralf Baechle @ 2001-10-14 21:01 UTC (permalink / raw)
To: H . J . Lu; +Cc: Yoshi-K, linux-mips
On Sun, Oct 14, 2001 at 09:30:52AM -0700, H . J . Lu wrote:
> > hello.
> > As for everybody, does MySQL operate without trouble?
> >
> > OS: PS2 Linux.
> > CPU: R5900
> > gcc 2.95.2
> > glibc 2.2.2
> > $ uname -a
> > Linux speed-ps 2.2.1 #94 Thu Apr 19 12:13:01 JST 2001 mips unknown
> >
>
> I ported mysql 3.23.36 to mips II and above in my RedHat 7.1 for
> mips.
I assume MIPS II means you're using ll/sc in the locking code in the MySQL.
Now that the ll/sc emulation is finally fixed these instructions will
also work for ll/sc-less CPUs.
Ralf
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: MySQL
2001-10-14 21:01 ` MySQL Ralf Baechle
@ 2001-10-15 5:46 ` H . J . Lu
0 siblings, 0 replies; 29+ messages in thread
From: H . J . Lu @ 2001-10-15 5:46 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Yoshi-K, linux-mips
On Sun, Oct 14, 2001 at 11:01:30PM +0200, Ralf Baechle wrote:
> On Sun, Oct 14, 2001 at 09:30:52AM -0700, H . J . Lu wrote:
>
> > > hello.
> > > As for everybody, does MySQL operate without trouble?
> > >
> > > OS: PS2 Linux.
> > > CPU: R5900
> > > gcc 2.95.2
> > > glibc 2.2.2
> > > $ uname -a
> > > Linux speed-ps 2.2.1 #94 Thu Apr 19 12:13:01 JST 2001 mips unknown
> > >
> >
> > I ported mysql 3.23.36 to mips II and above in my RedHat 7.1 for
> > mips.
>
> I assume MIPS II means you're using ll/sc in the locking code in the MySQL.
> Now that the ll/sc emulation is finally fixed these instructions will
> also work for ll/sc-less CPUs.
Yes. It has some Linux/mips patch. I can only guess Linux/mips looks
different than other Linux targets because of IRIX :-). See my RedHat
7.1 port for details.
H.J.
^ permalink raw reply [flat|nested] 29+ messages in thread
* IDE DMA mode in Big endian for mips
@ 2001-10-16 14:28 ` Hanks Li
0 siblings, 0 replies; 29+ messages in thread
From: Hanks Li @ 2001-10-16 14:28 UTC (permalink / raw)
To: linux-mips
Hi,
We are working on the IDE/ATAPI for mips. When I changed to Big endian mode,
the following information appared, and the program hang.
-------------------------------------
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PDC20262: IDE controller on PCI bus 00 dev 30
PDC20262: chipset revision 1
PDC20262: not 100% native mode: will probe irqs later
PDC20262: ROM enabled at 0x06fb0000
PDC20262: (U)DMA Burst Bit DISABLED Primary PCI Mode Secondary PCI Mode.
ide0: BM-DMA at 0xf800-0xf807, BIOS settings: hda:pio, hdb:pio
ide1: BM-DMA at 0xf808-0xf80f, BIOS settings: hdc:pio, hdd:pio
hda: QUANTUM FIREBALL EX10.2A, ATA DISK drive
ide0 at 0xec00-0xec07,0xe802 on irq 7
hda: 20044080 sectors (10263 MB) w/418KiB Cache, CHS=19885/16/63, (U)DMA
Partition check:
hda:hda: dma_timer_expiry: status=0x58 { DriveReady SeekComplete
DataRequest }
hda: timeout waiting for DMA
ide_dmaproc: chipset supported ide_dma_timeout func only: 14
-------------------------------------
When I turned off "IDE,ATA and ATAPI Block Devices->Generic PCI bus-master
DMA support", there was no problem at all. The following information
appared:
------------------------------------
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PDC20262: IDE controller on PCI bus 00 dev 30
PDC20262: chipset revision 1
PDC20262: not 100% native mode: will probe irqs later
hda: QUANTUM FIREBALL EX10.2A, ATA DISK drive
ide0 at 0xec00-0xec07,0xe802 on irq 7
hda: 20044080 sectors (10263 MB) w/418KiB Cache, CHS=19885/16/63
Partition check:
hda: [PTBL] [1247/255/63] hda1 hda2 hda3
------------------------------------
What could be the cause of this problem?
Regards,
Hanshi Li
^ permalink raw reply [flat|nested] 29+ messages in thread
* IDE DMA mode in Big endian for mips
@ 2001-10-16 14:28 ` Hanks Li
0 siblings, 0 replies; 29+ messages in thread
From: Hanks Li @ 2001-10-16 14:28 UTC (permalink / raw)
To: linux-mips
Hi,
We are working on the IDE/ATAPI for mips. When I changed to Big endian mode,
the following information appared, and the program hang.
-------------------------------------
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PDC20262: IDE controller on PCI bus 00 dev 30
PDC20262: chipset revision 1
PDC20262: not 100% native mode: will probe irqs later
PDC20262: ROM enabled at 0x06fb0000
PDC20262: (U)DMA Burst Bit DISABLED Primary PCI Mode Secondary PCI Mode.
ide0: BM-DMA at 0xf800-0xf807, BIOS settings: hda:pio, hdb:pio
ide1: BM-DMA at 0xf808-0xf80f, BIOS settings: hdc:pio, hdd:pio
hda: QUANTUM FIREBALL EX10.2A, ATA DISK drive
ide0 at 0xec00-0xec07,0xe802 on irq 7
hda: 20044080 sectors (10263 MB) w/418KiB Cache, CHS=19885/16/63, (U)DMA
Partition check:
hda:hda: dma_timer_expiry: status=0x58 { DriveReady SeekComplete
DataRequest }
hda: timeout waiting for DMA
ide_dmaproc: chipset supported ide_dma_timeout func only: 14
-------------------------------------
When I turned off "IDE,ATA and ATAPI Block Devices->Generic PCI bus-master
DMA support", there was no problem at all. The following information
appared:
------------------------------------
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PDC20262: IDE controller on PCI bus 00 dev 30
PDC20262: chipset revision 1
PDC20262: not 100% native mode: will probe irqs later
hda: QUANTUM FIREBALL EX10.2A, ATA DISK drive
ide0 at 0xec00-0xec07,0xe802 on irq 7
hda: 20044080 sectors (10263 MB) w/418KiB Cache, CHS=19885/16/63
Partition check:
hda: [PTBL] [1247/255/63] hda1 hda2 hda3
------------------------------------
What could be the cause of this problem?
Regards,
Hanshi Li
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: IDE DMA mode in Big endian for mips
2001-10-16 14:28 ` Hanks Li
(?)
@ 2001-10-16 17:30 ` Jun Sun
-1 siblings, 0 replies; 29+ messages in thread
From: Jun Sun @ 2001-10-16 17:30 UTC (permalink / raw)
To: Hanks Li; +Cc: linux-mips
Some host-PCI bridge controller may have smart endian conversion features.
Make sure you set it up correctly. The fact that DMA does not work but
polling works might also indicate the smart conversion only happens from PCI
to memory, not in the patch PCI -> CPU.
Perhaps your memory is still in LE mode even when your CPU runs in BE mode?
Jun
Hanks Li wrote:
>
> Hi,
>
> We are working on the IDE/ATAPI for mips. When I changed to Big endian mode,
> the following information appared, and the program hang.
>
> -------------------------------------
> Uniform Multi-Platform E-IDE driver Revision: 6.31
> ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
> PDC20262: IDE controller on PCI bus 00 dev 30
> PDC20262: chipset revision 1
> PDC20262: not 100% native mode: will probe irqs later
> PDC20262: ROM enabled at 0x06fb0000
> PDC20262: (U)DMA Burst Bit DISABLED Primary PCI Mode Secondary PCI Mode.
> ide0: BM-DMA at 0xf800-0xf807, BIOS settings: hda:pio, hdb:pio
> ide1: BM-DMA at 0xf808-0xf80f, BIOS settings: hdc:pio, hdd:pio
> hda: QUANTUM FIREBALL EX10.2A, ATA DISK drive
> ide0 at 0xec00-0xec07,0xe802 on irq 7
> hda: 20044080 sectors (10263 MB) w/418KiB Cache, CHS=19885/16/63, (U)DMA
> Partition check:
> hda:hda: dma_timer_expiry: status=0x58 { DriveReady SeekComplete
> DataRequest }
> hda: timeout waiting for DMA
> ide_dmaproc: chipset supported ide_dma_timeout func only: 14
> -------------------------------------
>
> When I turned off "IDE,ATA and ATAPI Block Devices->Generic PCI bus-master
> DMA support", there was no problem at all. The following information
> appared:
>
> ------------------------------------
>
> Uniform Multi-Platform E-IDE driver Revision: 6.31
> ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
> PDC20262: IDE controller on PCI bus 00 dev 30
> PDC20262: chipset revision 1
> PDC20262: not 100% native mode: will probe irqs later
> hda: QUANTUM FIREBALL EX10.2A, ATA DISK drive
> ide0 at 0xec00-0xec07,0xe802 on irq 7
> hda: 20044080 sectors (10263 MB) w/418KiB Cache, CHS=19885/16/63
> Partition check:
> hda: [PTBL] [1247/255/63] hda1 hda2 hda3
> ------------------------------------
>
> What could be the cause of this problem?
>
> Regards,
>
> Hanshi Li
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: IDE DMA mode in Big endian for mips
2001-10-16 14:28 ` Hanks Li
(?)
(?)
@ 2001-10-17 2:38 ` Atsushi Nemoto
2001-10-17 5:48 ` Geert Uytterhoeven
` (3 more replies)
-1 siblings, 4 replies; 29+ messages in thread
From: Atsushi Nemoto @ 2001-10-17 2:38 UTC (permalink / raw)
To: hli; +Cc: linux-mips
>>>>> On Tue, 16 Oct 2001 10:28:56 -0400, "Hanks Li" <hli@quicklogic.com> said:
hli> We are working on the IDE/ATAPI for mips. When I changed to Big
hli> endian mode, the following information appared, and the program
hli> hang.
When I tried PCI-IDE in BigEndian (with 2.4.6 kernel), this patch
solved my problem.
--- linux/drivers/ide/ide-dma.c:1.1.1.1 Fri Jul 6 11:24:54 2001
+++ linux/drivers/ide/ide-dma.c Fri Aug 17 20:17:30 2001
@@ -492,7 +492,11 @@
SELECT_READ_WRITE(hwif,drive,func);
if (!(count = ide_build_dmatable(drive, func)))
return 1; /* try PIO instead of DMA */
+#if defined(__mips__) && defined(__BIG_ENDIAN) /* XXX mips only? */
+ outl(cpu_to_le32(hwif->dmatable_dma), dma_base + 4); /* PRD table */
+#else
outl(hwif->dmatable_dma, dma_base + 4); /* PRD table */
+#endif
outb(reading, dma_base); /* specify r/w */
outb(inb(dma_base+2)|6, dma_base+2); /* clear INTR & ERROR flags */
drive->waiting_for_dma = 1;
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: IDE DMA mode in Big endian for mips
2001-10-17 2:38 ` Atsushi Nemoto
@ 2001-10-17 5:48 ` Geert Uytterhoeven
2001-10-17 9:33 ` Gleb O. Raiko
` (2 subsequent siblings)
3 siblings, 0 replies; 29+ messages in thread
From: Geert Uytterhoeven @ 2001-10-17 5:48 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: hli, Linux/MIPS Development
On Wed, 17 Oct 2001, Atsushi Nemoto wrote:
> >>>>> On Tue, 16 Oct 2001 10:28:56 -0400, "Hanks Li" <hli@quicklogic.com> said:
> hli> We are working on the IDE/ATAPI for mips. When I changed to Big
> hli> endian mode, the following information appared, and the program
> hli> hang.
>
> When I tried PCI-IDE in BigEndian (with 2.4.6 kernel), this patch
> solved my problem.
>
> --- linux/drivers/ide/ide-dma.c:1.1.1.1 Fri Jul 6 11:24:54 2001
> +++ linux/drivers/ide/ide-dma.c Fri Aug 17 20:17:30 2001
> @@ -492,7 +492,11 @@
> SELECT_READ_WRITE(hwif,drive,func);
> if (!(count = ide_build_dmatable(drive, func)))
> return 1; /* try PIO instead of DMA */
> +#if defined(__mips__) && defined(__BIG_ENDIAN) /* XXX mips only? */
> + outl(cpu_to_le32(hwif->dmatable_dma), dma_base + 4); /* PRD table */
> +#else
> outl(hwif->dmatable_dma, dma_base + 4); /* PRD table */
> +#endif
Since cpu_to_le32() does nothing on little endian, you can rewrite it like
#if defined(__mips__) /* XXX mips only? */
outl(cpu_to_le32(hwif->dmatable_dma), dma_base + 4); /* PRD table */
#else
outl(hwif->dmatable_dma, dma_base + 4); /* PRD table */
#endif
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] 29+ messages in thread
* Re: IDE DMA mode in Big endian for mips
2001-10-17 2:38 ` Atsushi Nemoto
2001-10-17 5:48 ` Geert Uytterhoeven
@ 2001-10-17 9:33 ` Gleb O. Raiko
2001-10-17 11:43 ` Atsushi Nemoto
2001-10-17 17:52 ` Hanks Li
2001-10-21 16:50 ` Alan Cox
3 siblings, 1 reply; 29+ messages in thread
From: Gleb O. Raiko @ 2001-10-17 9:33 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: hli, linux-mips
Atsushi Nemoto wrote:
> When I tried PCI-IDE in BigEndian (with 2.4.6 kernel), this patch
> solved my problem.
>
It seems you need either own version of outl and outw with byte swapping
or instruct your hw to do that itself (if your hw can, of course).
Regards,
Gleb.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: IDE DMA mode in Big endian for mips
2001-10-17 9:33 ` Gleb O. Raiko
@ 2001-10-17 11:43 ` Atsushi Nemoto
2001-10-18 2:18 ` Atsushi Nemoto
0 siblings, 1 reply; 29+ messages in thread
From: Atsushi Nemoto @ 2001-10-17 11:43 UTC (permalink / raw)
To: raiko; +Cc: hli, linux-mips
>>>>> On Wed, 17 Oct 2001 13:33:35 +0400, "Gleb O. Raiko" <raiko@niisi.msk.ru> said:
raiko> It seems you need either own version of outl and outw with byte
raiko> swapping or instruct your hw to do that itself (if your hw can,
raiko> of course).
Yes, I depend on hardware swapping on word/dword access. It seems
many pci drivers depend on this swapping too.
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 29+ messages in thread
* RE: IDE DMA mode in Big endian for mips
@ 2001-10-17 17:52 ` Hanks Li
0 siblings, 0 replies; 29+ messages in thread
From: Hanks Li @ 2001-10-17 17:52 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: linux-mips
Thanks Atsushi San, the patch did help. The partition check can pass now.
But my boot (such as: usb, ethernet, etc.) could not continue after solving
the IDE problem.
Could anybody give me a hint?
Thanks
Hanks Li
-----Original Message-----
From: owner-linux-mips@oss.sgi.com
[mailto:owner-linux-mips@oss.sgi.com]On Behalf Of Atsushi Nemoto
Sent: Tuesday, October 16, 2001 10:39 PM
To: hli@quicklogic.com
Cc: linux-mips@oss.sgi.com
Subject: Re: IDE DMA mode in Big endian for mips
>>>>> On Tue, 16 Oct 2001 10:28:56 -0400, "Hanks Li" <hli@quicklogic.com>
said:
hli> We are working on the IDE/ATAPI for mips. When I changed to Big
hli> endian mode, the following information appared, and the program
hli> hang.
When I tried PCI-IDE in BigEndian (with 2.4.6 kernel), this patch
solved my problem.
--- linux/drivers/ide/ide-dma.c:1.1.1.1 Fri Jul 6 11:24:54 2001
+++ linux/drivers/ide/ide-dma.c Fri Aug 17 20:17:30 2001
@@ -492,7 +492,11 @@
SELECT_READ_WRITE(hwif,drive,func);
if (!(count = ide_build_dmatable(drive, func)))
return 1; /* try PIO instead of DMA */
+#if defined(__mips__) && defined(__BIG_ENDIAN) /* XXX mips only? */
+ outl(cpu_to_le32(hwif->dmatable_dma), dma_base + 4); /* PRD table */
+#else
outl(hwif->dmatable_dma, dma_base + 4); /* PRD table */
+#endif
outb(reading, dma_base); /* specify r/w */
outb(inb(dma_base+2)|6, dma_base+2); /* clear INTR & ERROR flags */
drive->waiting_for_dma = 1;
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 29+ messages in thread
* RE: IDE DMA mode in Big endian for mips
@ 2001-10-17 17:52 ` Hanks Li
0 siblings, 0 replies; 29+ messages in thread
From: Hanks Li @ 2001-10-17 17:52 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: linux-mips
Thanks Atsushi San, the patch did help. The partition check can pass now.
But my boot (such as: usb, ethernet, etc.) could not continue after solving
the IDE problem.
Could anybody give me a hint?
Thanks
Hanks Li
-----Original Message-----
From: owner-linux-mips@oss.sgi.com
[mailto:owner-linux-mips@oss.sgi.com]On Behalf Of Atsushi Nemoto
Sent: Tuesday, October 16, 2001 10:39 PM
To: hli@quicklogic.com
Cc: linux-mips@oss.sgi.com
Subject: Re: IDE DMA mode in Big endian for mips
>>>>> On Tue, 16 Oct 2001 10:28:56 -0400, "Hanks Li" <hli@quicklogic.com>
said:
hli> We are working on the IDE/ATAPI for mips. When I changed to Big
hli> endian mode, the following information appared, and the program
hli> hang.
When I tried PCI-IDE in BigEndian (with 2.4.6 kernel), this patch
solved my problem.
--- linux/drivers/ide/ide-dma.c:1.1.1.1 Fri Jul 6 11:24:54 2001
+++ linux/drivers/ide/ide-dma.c Fri Aug 17 20:17:30 2001
@@ -492,7 +492,11 @@
SELECT_READ_WRITE(hwif,drive,func);
if (!(count = ide_build_dmatable(drive, func)))
return 1; /* try PIO instead of DMA */
+#if defined(__mips__) && defined(__BIG_ENDIAN) /* XXX mips only? */
+ outl(cpu_to_le32(hwif->dmatable_dma), dma_base + 4); /* PRD table */
+#else
outl(hwif->dmatable_dma, dma_base + 4); /* PRD table */
+#endif
outb(reading, dma_base); /* specify r/w */
outb(inb(dma_base+2)|6, dma_base+2); /* clear INTR & ERROR flags */
drive->waiting_for_dma = 1;
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: IDE DMA mode in Big endian for mips
2001-10-17 11:43 ` Atsushi Nemoto
@ 2001-10-18 2:18 ` Atsushi Nemoto
2001-10-18 5:54 ` Geert Uytterhoeven
2001-10-18 10:33 ` Gleb O. Raiko
0 siblings, 2 replies; 29+ messages in thread
From: Atsushi Nemoto @ 2001-10-18 2:18 UTC (permalink / raw)
To: raiko; +Cc: hli, linux-mips
>>>>> On Wed, 17 Oct 2001 20:43:58 +0900 (JST), Atsushi Nemoto <nemoto@toshiba-tops.co.jp> said:
nemoto> Yes, I depend on hardware swapping on word/dword access. It
nemoto> seems many pci drivers depend on this swapping too.
Sorry, last sentence might be wrong. I doubt I have been
misunderstanding long time...
Can anybody explain me a PCI driver's policy of endianness? Should we
use cpu_to_le32 with outl/writel? Should we use cpu_to_le32 to write
32bit data to DMA area?
Thank you.
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: IDE DMA mode in Big endian for mips
2001-10-18 2:18 ` Atsushi Nemoto
@ 2001-10-18 5:54 ` Geert Uytterhoeven
2001-10-18 10:33 ` Gleb O. Raiko
1 sibling, 0 replies; 29+ messages in thread
From: Geert Uytterhoeven @ 2001-10-18 5:54 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: raiko, hli, Linux/MIPS Development
On Thu, 18 Oct 2001, Atsushi Nemoto wrote:
> >>>>> On Wed, 17 Oct 2001 20:43:58 +0900 (JST), Atsushi Nemoto <nemoto@toshiba-tops.co.jp> said:
> nemoto> Yes, I depend on hardware swapping on word/dword access. It
> nemoto> seems many pci drivers depend on this swapping too.
>
> Sorry, last sentence might be wrong. I doubt I have been
> misunderstanding long time...
>
> Can anybody explain me a PCI driver's policy of endianness? Should we
> use cpu_to_le32 with outl/writel? Should we use cpu_to_le32 to write
> 32bit data to DMA area?
The PCI bus is little-endian.
All accesses should be done using one of
- {read,write}[bwlq]: PCI memory space
- {in,out}[bwl]: PCI (and ISA) I/O space
- isa_{read,write}[bwl]: ISA memory space
The functions above should take care of endian conversion.
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] 29+ messages in thread
* Re: IDE DMA mode in Big endian for mips
2001-10-18 2:18 ` Atsushi Nemoto
2001-10-18 5:54 ` Geert Uytterhoeven
@ 2001-10-18 10:33 ` Gleb O. Raiko
1 sibling, 0 replies; 29+ messages in thread
From: Gleb O. Raiko @ 2001-10-18 10:33 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: hli, linux-mips
Atsushi Nemoto wrote:
> Can anybody explain me a PCI driver's policy of endianness?
It depens on device and board. Most drivers assume PCI is little-endian,
but rely on outl implementation in byte swapping policy.
> Should we use cpu_to_le32 with outl/writel?
If you can't instruct hw to perform byte-swapping for PCI IO, you have
to add cpu_to_le32, it's clear. For writel, i.e. PCI MEM the situation
is a bit subtle. The problem is your videocard, that may or may not
support byte swapping. So, in order to suport videocards that aren't
able to swap bytes, you have to setup PCI MEM in big-endian mode.
Look, for example, at the tulip driver, it swaps bytes for DMA and
doesn't do it for register access.
> Should we use cpu_to_le32 to write 32bit data to DMA area?
DMA data is stream of bytes. I would treat a device/board as broken, if
it would need byte swapping for DMA data.
Regards,
Gleb.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: IDE DMA mode in Big endian for mips
2001-10-17 17:52 ` Hanks Li
(?)
@ 2001-10-19 9:54 ` Atsushi Nemoto
-1 siblings, 0 replies; 29+ messages in thread
From: Atsushi Nemoto @ 2001-10-19 9:54 UTC (permalink / raw)
To: geert; +Cc: raiko, hli, linux-mips
>>>>> On Thu, 18 Oct 2001 07:54:18 +0200 (MEST), Geert Uytterhoeven <geert@linux-m68k.org> said:
geert> The functions above should take care of endian conversion.
This is what I wanted to know. Thank you.
>>>>> On Wed, 17 Oct 2001 13:52:20 -0400, "Hanks Li" <hli@quicklogic.com> said:
hli> Thanks Atsushi San, the patch did help. The partition check can
hli> pass now.
Sorry, my patch is not correct. You can configure your PCI controller
to swap dword (if your hw have this function), or you can use
CONFIG_SWAP_IO_SPACE.
If your hardware have not this function AND you want to swap entire
I/O access (for example, do swap for PCI, not for other area), you may
have to create your own version of outl/outw etc. (This is my
case...)
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: IDE DMA mode in Big endian for mips
@ 2001-10-21 16:50 ` Alan Cox
0 siblings, 0 replies; 29+ messages in thread
From: Alan Cox @ 2001-10-21 16:50 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: hli, linux-mips
> return 1; /* try PIO instead of DMA */
> +#if defined(__mips__) && defined(__BIG_ENDIAN) /* XXX mips only? */
> + outl(cpu_to_le32(hwif->dmatable_dma), dma_base + 4); /* PRD table */
> +#else
> outl(hwif->dmatable_dma, dma_base + 4); /* PRD table */
> +#endif
You should actually just be able to delete the #if stuff. On an LE machine
cpu_to_le32() is a null operation
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: IDE DMA mode in Big endian for mips
@ 2001-10-21 16:50 ` Alan Cox
0 siblings, 0 replies; 29+ messages in thread
From: Alan Cox @ 2001-10-21 16:50 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: hli, linux-mips
> return 1; /* try PIO instead of DMA */
> +#if defined(__mips__) && defined(__BIG_ENDIAN) /* XXX mips only? */
> + outl(cpu_to_le32(hwif->dmatable_dma), dma_base + 4); /* PRD table */
> +#else
> outl(hwif->dmatable_dma, dma_base + 4); /* PRD table */
> +#endif
You should actually just be able to delete the #if stuff. On an LE machine
cpu_to_le32() is a null operation
^ permalink raw reply [flat|nested] 29+ messages in thread
end of thread, other threads:[~2001-10-21 16:50 UTC | newest]
Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-12 16:26 Big endian problem Hanks Li
2001-10-12 16:26 ` Hanks Li
2001-10-12 17:45 ` Ralf Baechle
2001-10-12 17:47 ` Jun Sun
2001-10-12 20:13 ` Dan Aizenstros
2001-10-13 0:35 ` Jun Sun
2001-10-13 0:55 ` Thiemo Seufer
2001-10-13 5:54 ` H . J . Lu
2001-10-13 5:54 ` H . J . Lu
2001-10-13 21:02 ` MySQL Yoshi-K
2001-10-13 21:02 ` MySQL Yoshi-K
2001-10-14 16:30 ` MySQL H . J . Lu
2001-10-14 21:01 ` MySQL Ralf Baechle
2001-10-15 5:46 ` MySQL H . J . Lu
2001-10-16 14:28 ` IDE DMA mode in Big endian for mips Hanks Li
2001-10-16 14:28 ` Hanks Li
2001-10-16 17:30 ` Jun Sun
2001-10-17 2:38 ` Atsushi Nemoto
2001-10-17 5:48 ` Geert Uytterhoeven
2001-10-17 9:33 ` Gleb O. Raiko
2001-10-17 11:43 ` Atsushi Nemoto
2001-10-18 2:18 ` Atsushi Nemoto
2001-10-18 5:54 ` Geert Uytterhoeven
2001-10-18 10:33 ` Gleb O. Raiko
2001-10-17 17:52 ` Hanks Li
2001-10-17 17:52 ` Hanks Li
2001-10-19 9:54 ` Atsushi Nemoto
2001-10-21 16:50 ` Alan Cox
2001-10-21 16:50 ` Alan Cox
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.