public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* frv compile error in set_pte()
@ 2006-09-03 22:06 Adrian Bunk
  2006-09-04  9:26 ` David Howells
  0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2006-09-03 22:06 UTC (permalink / raw)
  To: David Howells; +Cc: linux-kernel

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

-- 

       "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-06

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: frv compile error in set_pte()
  2006-09-03 22:06 frv compile error in set_pte() Adrian Bunk
@ 2006-09-04  9:26 ` David Howells
  2006-09-04 11:58   ` Adrian Bunk
  0 siblings, 1 reply; 6+ messages in thread
From: David Howells @ 2006-09-04  9:26 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: David Howells, linux-kernel

Adrian Bunk <bunk@stusta.de> wrote:

> 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

-- 
VGER BF report: H 0

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: frv compile error in set_pte()
  2006-09-04  9:26 ` David Howells
@ 2006-09-04 11:58   ` Adrian Bunk
  2006-09-04 12:35     ` David Howells
  2006-09-05 12:31     ` David Howells
  0 siblings, 2 replies; 6+ messages in thread
From: Adrian Bunk @ 2006-09-04 11:58 UTC (permalink / raw)
  To: David Howells; +Cc: linux-kernel

On Mon, Sep 04, 2006 at 10:26:25AM +0100, David Howells wrote:
> Adrian Bunk <bunk@stusta.de> wrote:
> 
> > 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.

> David

cu
Adrian

-- 

       "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-13

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: frv compile error in set_pte()
  2006-09-04 11:58   ` Adrian Bunk
@ 2006-09-04 12:35     ` David Howells
  2006-09-05 12:31     ` David Howells
  1 sibling, 0 replies; 6+ messages in thread
From: David Howells @ 2006-09-04 12:35 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: David Howells, linux-kernel

Adrian Bunk <bunk@stusta.de> wrote:

> > 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

-- 
VGER BF report: H 0.0672117

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: frv compile error in set_pte()
  2006-09-04 11:58   ` Adrian Bunk
  2006-09-04 12:35     ` David Howells
@ 2006-09-05 12:31     ` David Howells
  2006-09-05 13:11       ` Adrian Bunk
  1 sibling, 1 reply; 6+ messages in thread
From: David Howells @ 2006-09-05 12:31 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: David Howells, linux-kernel

Adrian Bunk <bunk@stusta.de> wrote:

> It's a gcc 4.1.1 from ftp.gnu.org.

If you patch it with the attached patch, does it then work?

David

---
Index: gcc/config/frv/frv.h
===================================================================
--- gcc/config/frv/frv.h	(revision 116693)
+++ gcc/config/frv/frv.h	(working copy)
@@ -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)))
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: frv compile error in set_pte()
  2006-09-05 12:31     ` David Howells
@ 2006-09-05 13:11       ` Adrian Bunk
  0 siblings, 0 replies; 6+ messages in thread
From: Adrian Bunk @ 2006-09-05 13:11 UTC (permalink / raw)
  To: David Howells; +Cc: linux-kernel

On Tue, Sep 05, 2006 at 01:31:32PM +0100, David Howells wrote:
> Adrian Bunk <bunk@stusta.de> wrote:
> 
> > It's a gcc 4.1.1 from ftp.gnu.org.
> 
> If you patch it with the attached patch, does it then work?

Yes.  :-)

> David
>...

cu
Adrian

-- 

       "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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-09-05 13:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-03 22:06 frv compile error in set_pte() Adrian Bunk
2006-09-04  9:26 ` David Howells
2006-09-04 11:58   ` Adrian Bunk
2006-09-04 12:35     ` David Howells
2006-09-05 12:31     ` David Howells
2006-09-05 13:11       ` Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox