frv compile error in set_pte()
I'm getting the follosing compile error in 2.6.18-rc5-mm1 (it might not be specific to -mm):
<-- snip -->
...
CC arch/frv/mm/dma-alloc.o/home/bunk/linux/kernel-2.6/linux-2.6.18-rc5-mm1/arch/frv/mm/dma-alloc.c: In function 'consistent_alloc':/home/bunk/linux/kernel-2.6/linux-2.6.18-rc5-mm1/arch/frv/mm/dma-alloc.c:66: error: impossible constraint in 'asm' make[2]: *** [arch/frv/mm/dma-alloc.o] Error 1
<-- snip -->
The problem is the following code in include/asm-frv/pgtable.h:
<-- snip -->
#define set_pte(pteptr, pteval) \
do { \
*(pteptr) = (pteval); \
asm volatile("dcf %M0" :: "U"(*pteptr)); \} while(0)
<-- snip -->
cu
Adrian
Signature · 8 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
--
VGER BF report: H 1.45283e-06Quoted 2 lines · Adrian Bunk
I'm getting the follosing compile error in 2.6.18-rc5-mm1 (it might not be specific to -mm):
Does your compiler support the 'M' and 'U' constraint modifiers on FRV?
David
Signature · 1 line
VGER BF report: H 0
Quoted 6 lines · David Howells
Quoted 2 lines · Adrian Bunk
I'm getting the follosing compile error in 2.6.18-rc5-mm1 (it might not be specific to -mm):
Does your compiler support the 'M' and 'U' constraint modifiers on FRV?
It's a gcc 4.1.1 from ftp.gnu.org.
Quoted 1 line
David
cu
Adrian
Signature · 8 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
--
VGER BF report: H 3.93628e-13Quoted 3 lines · Adrian Bunk
Quoted 1 line
Does your compiler support the 'M' and 'U' constraint modifiers on FRV?
It's a gcc 4.1.1 from ftp.gnu.org.
I presume this:
#define set_pte(pteptr, pteval) \
do { \
*(pteptr) = (pteval); \
asm volatile("dcf %M0" :: "U"(*pteptr)); \
} while(0)
void jump(unsigned long *ppte, unsigned long pte)
{
set_pte(ppte, pte);
}Shows the problem.
I was in the process of checking that all the FRV constraint stuff got upstream, but was stalled by an ICE whilst building the gcc-4.2. This logged as gcc bug #28583 and not as yet fixed.
However, I've run the above test program with the xgcc intermediate compiler built during the compilation of gcc, and that shows the problem you're reporting. I'll chase it up.
Meanwhile, if you want to use a working, though older gcc, you can find one in:
ftp://ftp.ges.redhat.com/private/releng/frv-060512-Fc6734/tools.tar.bz2
David
Signature · 1 line
VGER BF report: H 0.0672117
Quoted 1 line · Adrian Bunk
It's a gcc 4.1.1 from ftp.gnu.org.
If you patch it with the attached patch, does it then work?
David
---
config/frv/frv.h +3 -0
@@ -1376,6 +1376,9 @@ extern enum reg_class reg_class_from_let : (C) == 'U' ? EXTRA_CONSTRAINT_FOR_U (VALUE) \ : 0) +#define EXTRA_MEMORY_CONSTRAINT (C ,STR ) \ + ((C) == 'U' || (C) == 'R' || (C) == 'T') +#define CONSTRAINT_LEN (C ,STR ) \ ((C) == 'D' ? 3 : DEFAULT_CONSTRAINT_LEN ((C), (STR)))
Quoted 5 lines · David Howells
Quoted 1 line · Adrian Bunk
It's a gcc 4.1.1 from ftp.gnu.org.
If you patch it with the attached patch, does it then work?
Yes. :-)
Quoted 2 lines
David
...
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed