From Nobukazu.Sugiyama@am.sony.com  Tue Sep  4 20:57:42 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id UAA23369; Tue, 4 Sep 2001 20:57:42 +0200 (MET DST)
Received-Date: Tue, 4 Sep 2001 20:57:42 +0200 (MET DST)
Received: from mail6.fw-sj.sony.com(198.93.2.28)
 via SMTP by guadalquivir.fnet.fr, id smtpd023367; Tue Sep  4 20:57:36 2001
Received: from mail3.sjc.in.sel.sony.com (mail3.sjc.in.sel.sony.com [43.134.1.211])
	by mail6.fw-sj.sony.com (8.8.8/8.8.8) with ESMTP id SAA17429
	for <linux-mips@fnet.fr>; Tue, 4 Sep 2001 18:57:15 GMT
Received: by mail3.sjc.in.sel.sony.com id SAA18039; Tue, 4 Sep 2001 18:57:15 GMT
Message-ID: <3B95240B.5C273EC4@am.sony.com>
Date: Tue, 04 Sep 2001 11:57:15 -0700
From: Sugi <Nobukazu.Sugiyama@am.sony.com>
Organization: Sony Electronics
X-Mailer: Mozilla 4.75 [ja]C-CCK-MCD {Sony}  (Windows NT 5.0; U)
X-Accept-Language: ja
MIME-Version: 1.0
To: "linux-mips@fnet.fr" <linux-mips@fnet.fr>
Subject: Question about mmap()
Content-Type: text/plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Content-Length: 919
Lines: 35

Hi,

I have a trouble with mmap() in our driver on DDB5477
which use VR5432.  We need to call remap_page_range()
with a non_cached address in mmap().  But it seems to 
be a cached address, because, when user process get 
an address using mmap() and access that address,
that area was cached.
Could you tell me how to get a non_cached address?
# In case of PC arch, it seems OK.

Best Regards,

Sugi

----

static int dev_mmap(struct file *file, struct vm_area_start *vma)
{
 ....
 remap_page_range(vma->vm_start, 
                  ((unsigned long)p_my_driverData->base_address),
                  MY_DRIVER_REGISTER_SIZE, vma->vm_page_prot);
 ....
}


-- 

    **********************************************
         Nobukazu Sugiyama
         DNC. ATC. Sony Electronics Inc.
         tel;858-942-1358   fax;858-942-9000
         mailto:Nobukazu.Sugiyama@am.sony.com
    **********************************************

From macro@ds2.pg.gda.pl  Wed Sep  5 13:51:57 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id NAA02112; Wed, 5 Sep 2001 13:51:57 +0200 (MET DST)
Received-Date: Wed, 5 Sep 2001 13:51:57 +0200 (MET DST)
Received: from delta.ds2.pg.gda.pl(213.192.72.1)
 via SMTP by guadalquivir.fnet.fr, id smtpd002052; Wed Sep  5 13:51:45 2001
Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id NAA07793;
	Wed, 5 Sep 2001 13:50:12 +0200 (MET DST)
Date: Wed, 5 Sep 2001 13:50:11 +0200 (MET DST)
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
To: Sugi <Nobukazu.Sugiyama@am.sony.com>
cc: "linux-mips@fnet.fr" <linux-mips@fnet.fr>
Subject: Re: Question about mmap()
In-Reply-To: <3B95240B.5C273EC4@am.sony.com>
Message-ID: <Pine.GSO.3.96.1010905134553.7702A-100000@delta.ds2.pg.gda.pl>
Organization: Technical University of Gdansk
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Length: 598
Lines: 14

On Tue, 4 Sep 2001, Sugi wrote:

> Could you tell me how to get a non_cached address?

 See pgprot_noncached() in drivers/char/mem.c and how that's used for
mmap()ping /dev/mem.  Note that pgprot_noncached() should probably moved
to include/asm/pgtable.h as the comment suggests, so you'd better move the
relevant (MIPS) part there instead of duplicating the code.  This is
already done for ia64. 

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

From Nobukazu.Sugiyama@am.sony.com  Wed Sep  5 23:15:55 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id XAA06029; Wed, 5 Sep 2001 23:15:55 +0200 (MET DST)
Received-Date: Wed, 5 Sep 2001 23:15:55 +0200 (MET DST)
Received: from mail6.fw-sj.sony.com(198.93.2.28)
 via SMTP by guadalquivir.fnet.fr, id smtpd006027; Wed Sep  5 23:15:51 2001
Received: from mail3.sjc.in.sel.sony.com (mail3.sjc.in.sel.sony.com [43.134.1.211])
	by mail6.fw-sj.sony.com (8.8.8/8.8.8) with ESMTP id VAA24182;
	Wed, 5 Sep 2001 21:15:29 GMT
Received: by mail3.sjc.in.sel.sony.com id VAA14196; Wed, 5 Sep 2001 21:15:26 GMT
Message-ID: <3B9695EE.71F2DDEC@am.sony.com>
Date: Wed, 05 Sep 2001 14:15:26 -0700
From: Sugi <Nobukazu.Sugiyama@am.sony.com>
Organization: Sony Electronics
X-Mailer: Mozilla 4.75 [ja]C-CCK-MCD {Sony}  (Windows NT 5.0; U)
X-Accept-Language: ja
MIME-Version: 1.0
To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
CC: "linux-mips@fnet.fr" <linux-mips@fnet.fr>
Subject: Re: Question about mmap()
References: <Pine.GSO.3.96.1010905134553.7702A-100000@delta.ds2.pg.gda.pl>
Content-Type: text/plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Content-Length: 1181
Lines: 38

Thank for your help.

I added the following line before calling remap_page_range();

  vma->vma_page_range_prot.pgprot = (vma->vm_page_prot.pgprot &
                               ~_CACHE_MASK) | _CACHE_UNCACHED;

And, now it works well.

Thanks a lot.

Sugi

"Maciej W. Rozycki" wrote:
> 
> On Tue, 4 Sep 2001, Sugi wrote:
> 
> > Could you tell me how to get a non_cached address?
> 
>  See pgprot_noncached() in drivers/char/mem.c and how that's used for
> mmap()ping /dev/mem.  Note that pgprot_noncached() should probably moved
> to include/asm/pgtable.h as the comment suggests, so you'd better move the
> relevant (MIPS) part there instead of duplicating the code.  This is
> already done for ia64.
> 
> --
> +  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
> +--------------------------------------------------------------+
> +        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

-- 

    **********************************************
         Nobukazu Sugiyama
         DNC. ATC. Sony Electronics Inc.
         tel;858-942-1358   fax;858-942-9000
         mailto:Nobukazu.Sugiyama@am.sony.com
    **********************************************

From ralf@linux-mips.net  Thu Sep  6 02:20:14 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id CAA08600; Thu, 6 Sep 2001 02:20:14 +0200 (MET DST)
Received-Date: Thu, 6 Sep 2001 02:20:14 +0200 (MET DST)
Received: from u-59-20.karlsruhe.ipdial.viaginterkom.de(62.180.20.59), claiming to be "dea.linux-mips.net"
 via SMTP by guadalquivir.fnet.fr, id smtpd008581; Thu Sep  6 02:20:01 2001
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.11.1/8.11.1) id f860IUg18575;
	Thu, 6 Sep 2001 02:18:30 +0200
Date: Thu, 6 Sep 2001 02:18:30 +0200
From: Ralf Baechle <ralf@uni-koblenz.de>
To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Cc: Sugi <Nobukazu.Sugiyama@am.sony.com>,
        "linux-mips@fnet.fr" <linux-mips@fnet.fr>
Subject: Re: Question about mmap()
Message-ID: <20010906021830.A10987@dea.linux-mips.net>
References: <3B95240B.5C273EC4@am.sony.com> <Pine.GSO.3.96.1010905134553.7702A-100000@delta.ds2.pg.gda.pl>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <Pine.GSO.3.96.1010905134553.7702A-100000@delta.ds2.pg.gda.pl>; from macro@ds2.pg.gda.pl on Wed, Sep 05, 2001 at 01:50:11PM +0200
X-Accept-Language: de,en,fr
Content-Length: 2850
Lines: 90

On Wed, Sep 05, 2001 at 01:50:11PM +0200, Maciej W. Rozycki wrote:

>  See pgprot_noncached() in drivers/char/mem.c and how that's used for
> mmap()ping /dev/mem.  Note that pgprot_noncached() should probably moved
> to include/asm/pgtable.h as the comment suggests, so you'd better move the
> relevant (MIPS) part there instead of duplicating the code.  This is
> already done for ia64. 

Just did that.

  Ralf

Index: include/asm-mips64/pgtable.h
===================================================================
RCS file: /home/pub/cvs/linux/include/asm-mips64/pgtable.h,v
retrieving revision 1.44
diff -u -r1.44 pgtable.h
--- include/asm-mips64/pgtable.h 2001/08/28 19:17:14 1.44  
+++ include/asm-mips64/pgtable.h 2001/09/06 00:16:41   
@@ -461,6 +461,23 @@
 }
 
 /*
+ * Macro to make mark a page protection value as "uncacheable".  Note
+ * that "protection" is really a misnomer here as the protection value
+ * contains the memory attribute bits, dirty bits, and various other
+ * bits as well.
+ */
+#define pgprot_noncached pgprot_noncached
+
+static inline pgprot_t pgprot_noncached(pgprot_t _prot)
+{
+	unsigned long prot = pgprot_val(_prot);
+
+	prot = (prot & ~_CACHE_MASK) | _CACHE_UNCACHED;
+
+	return __pgprot(prot);
+}
+
+/*
  * Conversion functions: convert a page and protection to a page entry,
  * and a page entry and page directory to the page they refer to.
  */
Index: include/asm-mips/pgtable.h
===================================================================
RCS file: /home/pub/cvs/linux/include/asm-mips/pgtable.h,v
retrieving revision 1.57
diff -u -r1.57 pgtable.h
--- include/asm-mips/pgtable.h 2001/08/15 02:11:39 1.57  
+++ include/asm-mips/pgtable.h 2001/09/06 00:16:41   
@@ -397,6 +397,23 @@
 	return pte;
 }
 
+/*
+ * Macro to make mark a page protection value as "uncacheable".  Note
+ * that "protection" is really a misnomer here as the protection value
+ * contains the memory attribute bits, dirty bits, and various other
+ * bits as well.
+ */
+#define pgprot_noncached pgprot_noncached
+
+static inline pgprot_t pgprot_noncached(pgprot_t _prot)
+{
+	unsigned long prot = pgprot_val(_prot);
+
+	prot = (prot & ~_CACHE_MASK) | _CACHE_UNCACHED;
+
+	return __pgprot(prot);
+}
+
 extern inline pte_t pte_mkyoung(pte_t pte)
 {
 	pte_val(pte) |= _PAGE_ACCESSED;
Index: drivers/char/mem.c
===================================================================
RCS file: /home/pub/cvs/linux/drivers/char/mem.c,v
retrieving revision 1.48
diff -u -r1.48 mem.c
--- drivers/char/mem.c 2001/08/24 03:38:36 1.48  
+++ drivers/char/mem.c 2001/09/06 00:16:42   
@@ -153,8 +153,6 @@
 	/* Use no-cache mode, serialized */
 	else if (MMU_IS_040 || MMU_IS_060)
 		prot = (prot & _CACHEMASK040) | _PAGE_NOCACHE_S;
-#elif defined(__mips__)
-	prot = (prot & ~_CACHE_MASK) | _CACHE_UNCACHED;
 #endif
 
 	return __pgprot(prot);

From macro@ds2.pg.gda.pl  Thu Sep  6 13:01:30 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id NAA13522; Thu, 6 Sep 2001 13:01:30 +0200 (MET DST)
Received-Date: Thu, 6 Sep 2001 13:01:30 +0200 (MET DST)
Received: from delta.ds2.pg.gda.pl(213.192.72.1)
 via SMTP by guadalquivir.fnet.fr, id smtpd013520; Thu Sep  6 13:01:24 2001
Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id NAA27653;
	Thu, 6 Sep 2001 13:00:13 +0200 (MET DST)
Date: Thu, 6 Sep 2001 13:00:13 +0200 (MET DST)
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Reply-To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
To: Sugi <Nobukazu.Sugiyama@am.sony.com>
cc: "linux-mips@fnet.fr" <linux-mips@fnet.fr>
Subject: Re: Question about mmap()
In-Reply-To: <3B9695EE.71F2DDEC@am.sony.com>
Message-ID: <Pine.GSO.3.96.1010906125822.27614B-100000@delta.ds2.pg.gda.pl>
Organization: Technical University of Gdansk
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Length: 618
Lines: 17

On Wed, 5 Sep 2001, Sugi wrote:

> I added the following line before calling remap_page_range();
> 
>   vma->vma_page_range_prot.pgprot = (vma->vm_page_prot.pgprot &
>                                ~_CACHE_MASK) | _CACHE_UNCACHED;
> 
> And, now it works well.

 Consider using pgprot_noncached() as Ralf has just added it.  You don't
have to worry about future implementation changes if you use the generic
function.

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

From macro@ds2.pg.gda.pl  Thu Sep  6 14:06:50 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id OAA14301; Thu, 6 Sep 2001 14:06:50 +0200 (MET DST)
Received-Date: Thu, 6 Sep 2001 14:06:50 +0200 (MET DST)
Received: from delta.ds2.pg.gda.pl(213.192.72.1)
 via SMTP by guadalquivir.fnet.fr, id smtpd014299; Thu Sep  6 14:06:47 2001
Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id OAA28664;
	Thu, 6 Sep 2001 14:08:43 +0200 (MET DST)
Date: Thu, 6 Sep 2001 14:08:43 +0200 (MET DST)
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Reply-To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
To: Ralf Baechle <ralf@oss.sgi.com>
cc: linux-mips@fnet.fr, linux-mips@oss.sgi.com
Subject: [patch] linux 2.4.8: __dbe_table resync
In-Reply-To: <Pine.GSO.3.96.1010828145209.20137C-100000@delta.ds2.pg.gda.pl>
Message-ID: <Pine.GSO.3.96.1010906134003.27614F-100000@delta.ds2.pg.gda.pl>
Organization: Technical University of Gdansk
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Length: 8046
Lines: 181

Ralf,

 This is an update to the current implementation of __dbe_table handling. 
The code matches one in 2.4.9-ac9 with an exception of a small fix that
goes to Alan independently and is already taken into account here.  Please
apply.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

patch-mips-2.4.8-20010903-dbe-14
diff -up --recursive --new-file linux-mips-2.4.8-20010903.macro/arch/mips/kernel/traps.c linux-mips-2.4.8-20010903/arch/mips/kernel/traps.c
--- linux-mips-2.4.8-20010903.macro/arch/mips/kernel/traps.c	Sat Aug 25 04:27:08 2001
+++ linux-mips-2.4.8-20010903/arch/mips/kernel/traps.c	Wed Sep  5 22:49:24 2001
@@ -267,8 +267,9 @@ search_dbe_table(unsigned long addr)
 
 	spin_lock_irqsave(&modlist_lock, flags);
 	for (mp = module_list; mp != NULL; mp = mp->next) {
-		if (!mod_member_present(mp, archdata_start) ||
-		    !mp->archdata_start)
+		if (!mod_member_present(mp, archdata_end) ||
+        	    !mod_archdata_member_present(mp, struct archdata,
+						 dbe_table_end))
 			continue;
 		ap = (struct archdata *)(mp->archdata_start);
 
diff -up --recursive --new-file linux-mips-2.4.8-20010903.macro/arch/mips64/sgi-ip22/ip22-berr.c linux-mips-2.4.8-20010903/arch/mips64/sgi-ip22/ip22-berr.c
--- linux-mips-2.4.8-20010903.macro/arch/mips64/sgi-ip22/ip22-berr.c	Wed Aug 22 04:26:17 2001
+++ linux-mips-2.4.8-20010903/arch/mips64/sgi-ip22/ip22-berr.c	Wed Sep  5 22:49:24 2001
@@ -63,8 +63,9 @@ search_dbe_table(unsigned long addr)
 
 	spin_lock_irqsave(&modlist_lock, flags);
 	for (mp = module_list; mp != NULL; mp = mp->next) {
-		if (!mod_member_present(mp, archdata_start) ||
-		    !mp->archdata_start)
+		if (!mod_member_present(mp, archdata_end) ||
+        	    !mod_archdata_member_present(mp, struct archdata,
+						 dbe_table_end))
 			continue;
 		ap = (struct archdata *)(mod->archdata_start);
 
diff -up --recursive --new-file linux-mips-2.4.8-20010903.macro/arch/mips64/sgi-ip27/ip27-berr.c linux-mips-2.4.8-20010903/arch/mips64/sgi-ip27/ip27-berr.c
--- linux-mips-2.4.8-20010903.macro/arch/mips64/sgi-ip27/ip27-berr.c	Wed Aug 22 04:26:17 2001
+++ linux-mips-2.4.8-20010903/arch/mips64/sgi-ip27/ip27-berr.c	Wed Sep  5 22:49:24 2001
@@ -66,8 +66,9 @@ search_dbe_table(unsigned long addr)
 
 	spin_lock_irqsave(&modlist_lock, flags);
 	for (mp = module_list; mp != NULL; mp = mp->next) {
-		if (!mod_member_present(mp, archdata_start) ||
-		    !mp->archdata_start)
+		if (!mod_member_present(mp, archdata_end) ||
+        	    !mod_archdata_member_present(mp, struct archdata,
+						 dbe_table_end))
 			continue;
 		ap = (struct archdata *)(mod->archdata_start);
 
diff -up --recursive --new-file linux-mips-2.4.8-20010903.macro/include/asm-alpha/module.h linux-mips-2.4.8-20010903/include/asm-alpha/module.h
--- linux-mips-2.4.8-20010903.macro/include/asm-alpha/module.h	Wed Aug 22 04:27:42 2001
+++ linux-mips-2.4.8-20010903/include/asm-alpha/module.h	Wed Sep  5 22:49:24 2001
@@ -13,7 +13,7 @@ static inline int
 alpha_module_init(struct module *mod)
 {
         if (!mod_bound(mod->gp - 0x8000, 0, mod)) {
-                printk(KERN_ERR "arch_init_module: mod->gp out of bounds.\n");
+                printk(KERN_ERR "module_arch_init: mod->gp out of bounds.\n");
                 return 1;
         }
 	return 0;
diff -up --recursive --new-file linux-mips-2.4.8-20010903.macro/include/asm-ia64/module.h linux-mips-2.4.8-20010903/include/asm-ia64/module.h
--- linux-mips-2.4.8-20010903.macro/include/asm-ia64/module.h	Wed Aug 22 04:27:44 2001
+++ linux-mips-2.4.8-20010903/include/asm-ia64/module.h	Wed Sep  5 22:58:19 2001
@@ -47,27 +47,27 @@ ia64_module_init(struct module *mod)
 
 	if (archdata->unw_table)
 	{
-		printk(KERN_ERR "arch_init_module: archdata->unw_table must be zero.\n");
+		printk(KERN_ERR "module_arch_init: archdata->unw_table must be zero.\n");
 		return 1;
 	}
 	if (!mod_bound(archdata->gp, 0, mod))
 	{
-		printk(KERN_ERR "arch_init_module: archdata->gp out of bounds.\n");
+		printk(KERN_ERR "module_arch_init: archdata->gp out of bounds.\n");
 		return 1;
 	}
 	if (!mod_bound(archdata->unw_start, 0, mod))
 	{
-		printk(KERN_ERR "arch_init_module: archdata->unw_start out of bounds.\n");
+		printk(KERN_ERR "module_arch_init: archdata->unw_start out of bounds.\n");
 		return 1;
 	}
 	if (!mod_bound(archdata->unw_end, 0, mod))
 	{
-		printk(KERN_ERR "arch_init_module: archdata->unw_end out of bounds.\n");
+		printk(KERN_ERR "module_arch_init: archdata->unw_end out of bounds.\n");
 		return 1;
 	}
 	if (!mod_bound(archdata->segment_base, 0, mod))
 	{
-		printk(KERN_ERR "arch_init_module: archdata->unw_table out of bounds.\n");
+		printk(KERN_ERR "module_arch_init: archdata->unw_table out of bounds.\n");
 		return 1;
 	}
 
diff -up --recursive --new-file linux-mips-2.4.8-20010903.macro/include/asm-mips/module.h linux-mips-2.4.8-20010903/include/asm-mips/module.h
--- linux-mips-2.4.8-20010903.macro/include/asm-mips/module.h	Wed Aug 22 04:27:47 2001
+++ linux-mips-2.4.8-20010903/include/asm-mips/module.h	Wed Sep  5 22:49:24 2001
@@ -26,9 +26,12 @@ mips_module_init(struct module *mod)
 {
 	struct archdata *archdata;
 
-	if (!mod_member_present(mod, archdata_start) || !mod->archdata_start)
+	if (!mod_member_present(mod, archdata_end))
 		return 0;
+
 	archdata = (struct archdata *)(mod->archdata_start);
+	if (!mod_archdata_member_present(mod, struct archdata, dbe_table_end))
+		return 0;
 
 	if (archdata->dbe_table_start > archdata->dbe_table_end ||
 	    (archdata->dbe_table_start &&
@@ -40,7 +43,7 @@ mips_module_init(struct module *mod)
 	      (unsigned long)archdata->dbe_table_end) %
 	     sizeof(struct exception_table_entry))) {
 		printk(KERN_ERR
-			"arch_init_module: archdata->dbe_table_* invalid.\n");
+			"module_arch_init: archdata->dbe_table_* invalid.\n");
 		return 1;
 	}
 
diff -up --recursive --new-file linux-mips-2.4.8-20010903.macro/include/asm-mips64/module.h linux-mips-2.4.8-20010903/include/asm-mips64/module.h
--- linux-mips-2.4.8-20010903.macro/include/asm-mips64/module.h	Wed Aug 22 04:27:48 2001
+++ linux-mips-2.4.8-20010903/include/asm-mips64/module.h	Wed Sep  5 22:49:24 2001
@@ -26,9 +26,12 @@ mips64_module_init(struct module *mod)
 {
 	struct archdata *archdata;
 
-	if (!mod_member_present(mod, archdata_start) || !mod->archdata_start)
+	if (!mod_member_present(mod, archdata_end))
 		return 0;
+
 	archdata = (struct archdata *)(mod->archdata_start);
+	if (!mod_archdata_member_present(mod, struct archdata, dbe_table_end))
+		return 0;
 
 	if (archdata->dbe_table_start > archdata->dbe_table_end ||
 	    (archdata->dbe_table_start &&
@@ -40,7 +43,7 @@ mips64_module_init(struct module *mod)
 	      (unsigned long)archdata->dbe_table_end) %
 	     sizeof(struct exception_table_entry))) {
 		printk(KERN_ERR
-			"arch_init_module: archdata->dbe_table_* invalid.\n");
+			"module_arch_init: archdata->dbe_table_* invalid.\n");
 		return 1;
 	}
 
diff -up --recursive --new-file linux-mips-2.4.8-20010903.macro/include/linux/module.h linux-mips-2.4.8-20010903/include/linux/module.h
--- linux-mips-2.4.8-20010903.macro/include/linux/module.h	Mon Jul 16 02:13:58 2001
+++ linux-mips-2.4.8-20010903/include/linux/module.h	Fri Aug 24 00:50:22 2001
@@ -130,6 +130,16 @@ struct module_info
 	((unsigned long)(&((struct module *)0L)->member + 1)		\
 	 <= (mod)->size_of_struct)
 
+/*
+ * Ditto for archdata.  Assumes mod->archdata_start and mod->archdata_end
+ * are validated elsewhere.
+ */
+#define mod_archdata_member_present(mod, type, member)			\
+	(((unsigned long)(&((type *)0L)->member) +			\
+	  sizeof(((type *)0L)->member)) <=				\
+	 ((mod)->archdata_end - (mod)->archdata_start))
+	 
+
 /* Check if an address p with number of entries n is within the body of module m */
 #define mod_bound(p, n, m) ((unsigned long)(p) >= ((unsigned long)(m) + ((m)->size_of_struct)) && \
 	         (unsigned long)((p)+(n)) <= (unsigned long)(m) + (m)->size)


From macro@ds2.pg.gda.pl  Thu Sep  6 14:29:30 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id OAA14881; Thu, 6 Sep 2001 14:29:30 +0200 (MET DST)
Received-Date: Thu, 6 Sep 2001 14:29:30 +0200 (MET DST)
Received: from delta.ds2.pg.gda.pl(213.192.72.1)
 via SMTP by guadalquivir.fnet.fr, id smtpd014879; Thu Sep  6 14:29:19 2001
Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id OAA29203;
	Thu, 6 Sep 2001 14:31:45 +0200 (MET DST)
Date: Thu, 6 Sep 2001 14:31:45 +0200 (MET DST)
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
To: linux-mips@fnet.fr, linux-mips@oss.sgi.com
Subject: linux 2.4.8: The DECstation 5000/2x0 NVRAM module driver
Message-ID: <Pine.GSO.3.96.1010906141756.28792A-100000@delta.ds2.pg.gda.pl>
Organization: Technical University of Gdansk
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Length: 835
Lines: 19

Hi,

 I've prepared a syntactic update to the DECstation 5000/2x0 NVRAM module
driver for linux 2.4.8.  There are no functional changes at the moment. 
The driver patch and supplementary changes are available at:
'ftp://ftp.ds2.pg.gda.pl/pub/macro/drivers/ms02-nv/'.  

 I'm looking for a tester with a DECstation 5000/200 and a MS02 NVRAM
module.  I'm going to improve the module detection code in the next
version to make it less firmware-dependent.  This is needed to support
multiple modules as well as single modules in non-standard slots.  I need
to make sure I can rely on bus error exceptions just like in the /240. 

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

From macro@ds2.pg.gda.pl  Thu Sep  6 15:15:40 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id PAA16055; Thu, 6 Sep 2001 15:15:40 +0200 (MET DST)
Received-Date: Thu, 6 Sep 2001 15:15:40 +0200 (MET DST)
Received: from delta.ds2.pg.gda.pl(213.192.72.1)
 via SMTP by guadalquivir.fnet.fr, id smtpd016053; Thu Sep  6 15:15:35 2001
Received: from localhost by delta.ds2.pg.gda.pl (8.9.3/8.9.3) with SMTP id PAA00046;
	Thu, 6 Sep 2001 15:17:12 +0200 (MET DST)
Date: Thu, 6 Sep 2001 15:17:12 +0200 (MET DST)
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
To: Stephen Frost <sfrost@snowman.net>
cc: linux-mips@fnet.fr, linux-mips@oss.sgi.com
Subject: Re: linux 2.4.8: The DECstation 5000/2x0 NVRAM module driver
In-Reply-To: <20010906083444.W11136@ns>
Message-ID: <Pine.GSO.3.96.1010906144712.28792C-100000@delta.ds2.pg.gda.pl>
Organization: Technical University of Gdansk
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Length: 2284
Lines: 53

On Thu, 6 Sep 2001, Stephen Frost wrote:

> 	Welp, I've got a DECstation 5000/200 but no clue what (if any)
> 	NVRAM module it has.  How can I find out? :)  I havn't booted
> 	the thing up in quite a while so I'm not even sure it's exactly
> 	functional, but I've been looking for an excuse to play with it.

 An NVRAM module is placed in a memory slot, usually the 15th, as that's
what DEC supports.  It differs from RAM modules visibly -- it has two
green LEDs and a lithium battery (mine is orange, which makes it easily
recognizable; I'm not sure if the color is a rule). 

 In a configuration dump it's marked explicitly as a "Presto-NVR" module
if placed in the 15th slot.  This is an example of a `cnfg 3' output from
my /240 system -- you would need to type `cnfg 7' for your /200: 

>>cnfg 3
 3: KN03-AA  DEC      V5.1b    TCF0  (352 MB,   1 MB NVRAM)
                                     (enet: 08-00-2b-1e-3b-78)
                                     (SCSI = 7)
            ---------------------------------------------------
            DEV   PID                VID        REV    SCSI DEV
            ===== ================== ========== ====== ========

        dcache( 64 KB), icache( 64 KB)
        mem( 0):  a0000000:a1ffffff  ( 32 MB)
        mem( 1):  a2000000:a3ffffff  ( 32 MB)
        mem( 2):  a4000000:a5ffffff  ( 32 MB)
        mem( 3):  a6000000:a67fffff  (  8 MB)
        mem( 4):  a8000000:a87fffff  (  8 MB)
        mem( 5):  aa000000:aa7fffff  (  8 MB)
        mem( 6):  ac000000:ac7fffff  (  8 MB)
        mem( 7):  ae000000:afffffff  ( 32 MB)
        mem( 8):  b0000000:b1ffffff  ( 32 MB)
        mem( 9):  b2000000:b3ffffff  ( 32 MB)
        mem(10):  b4000000:b5ffffff  ( 32 MB)
        mem(11):  b6000000:b7ffffff  ( 32 MB)
        mem(12):  b8000000:b9ffffff  ( 32 MB)
        mem(13):  ba000000:bbffffff  ( 32 MB)
        mem(14):  bc000000:bc0fffff  (  1 MB)     Presto-NVR

        mem(14):  valid, batt OK, unarmed
>>

 Note that there exists a TURBOchannel NVRAM module, namely the PMTNV-AA. 
This driver doesn't intend to support it. 

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

From ralf@linux-mips.net  Thu Sep  6 15:22:29 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id PAA16573; Thu, 6 Sep 2001 15:22:29 +0200 (MET DST)
Received-Date: Thu, 6 Sep 2001 15:22:29 +0200 (MET DST)
Received: from u-136-19.karlsruhe.ipdial.viaginterkom.de(62.180.19.136), claiming to be "dea.linux-mips.net"
 via SMTP by guadalquivir.fnet.fr, id smtpd016570; Thu Sep  6 15:22:24 2001
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.11.1/8.11.1) id f86DLNf07635;
	Thu, 6 Sep 2001 15:21:23 +0200
Date: Thu, 6 Sep 2001 15:21:23 +0200
From: Ralf Baechle <ralf@oss.sgi.com>
To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Cc: linux-mips@fnet.fr, linux-mips@oss.sgi.com
Subject: Re: [patch] linux 2.4.8: __dbe_table resync
Message-ID: <20010906152123.A7630@dea.linux-mips.net>
References: <Pine.GSO.3.96.1010828145209.20137C-100000@delta.ds2.pg.gda.pl> <Pine.GSO.3.96.1010906134003.27614F-100000@delta.ds2.pg.gda.pl>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <Pine.GSO.3.96.1010906134003.27614F-100000@delta.ds2.pg.gda.pl>; from macro@ds2.pg.gda.pl on Thu, Sep 06, 2001 at 02:08:43PM +0200
X-Accept-Language: de,en,fr
Content-Length: 323
Lines: 10

On Thu, Sep 06, 2001 at 02:08:43PM +0200, Maciej W. Rozycki wrote:

>  This is an update to the current implementation of __dbe_table handling. 
> The code matches one in 2.4.9-ac9 with an exception of a small fix that
> goes to Alan independently and is already taken into account here.  Please
> apply.

Applied.

  Ralf

From flo@rfc822.org  Fri Sep  7 12:05:32 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id MAA28934; Fri, 7 Sep 2001 12:05:32 +0200 (MET DST)
Received-Date: Fri, 7 Sep 2001 12:05:32 +0200 (MET DST)
Received: from noose.gt.owl.de(62.52.19.4)
 via SMTP by guadalquivir.fnet.fr, id smtpd028932; Fri Sep  7 12:05:27 2001
Received: by noose.gt.owl.de (Postfix, from userid 10)
	id 6AAFB7F7; Fri,  7 Sep 2001 12:05:19 +0200 (CEST)
Received: by paradigm.rfc822.org (Postfix, from userid 1000)
	id C919B4608; Fri,  7 Sep 2001 11:44:12 +0200 (CEST)
Date: Fri, 7 Sep 2001 11:44:12 +0200
From: Florian Lohoff <flo@rfc822.org>
To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Cc: Stephen Frost <sfrost@snowman.net>, linux-mips@fnet.fr,
        linux-mips@oss.sgi.com
Subject: Re: linux 2.4.8: The DECstation 5000/2x0 NVRAM module driver
Message-ID: <20010907114412.D7925@paradigm.rfc822.org>
References: <20010906083444.W11136@ns> <Pine.GSO.3.96.1010906144712.28792C-100000@delta.ds2.pg.gda.pl>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <Pine.GSO.3.96.1010906144712.28792C-100000@delta.ds2.pg.gda.pl>
User-Agent: Mutt/1.3.20i
Organization: rfc822 - pure communication
Sender: flo@rfc822.org
Content-Length: 516
Lines: 12

On Thu, Sep 06, 2001 at 03:17:12PM +0200, Maciej W. Rozycki wrote:
>  An NVRAM module is placed in a memory slot, usually the 15th, as that's
> what DEC supports.  It differs from RAM modules visibly -- it has two
> green LEDs and a lithium battery (mine is orange, which makes it easily
> recognizable; I'm not sure if the color is a rule). 

Mine is orange too 

Flo
-- 
Florian Lohoff                  flo@rfc822.org             +49-5201-669912
     Why is it called "common sense" when nobody seems to have any?

From joey@finlandia.infodrom.north.de  Wed Sep 12 17:50:09 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id RAA02908; Wed, 12 Sep 2001 17:50:09 +0200 (MET DST)
Received-Date: Wed, 12 Sep 2001 17:50:09 +0200 (MET DST)
Received: from kuolema.infodrom.north.de(217.89.86.35)
 via SMTP by guadalquivir.fnet.fr, id smtpd002886; Wed Sep 12 17:50:04 2001
Received: from finlandia.infodrom.north.de (finlandia.Infodrom.North.DE [217.89.86.34])
	by kuolema.infodrom.north.de (Postfix) with ESMTP
	id E84E54D755; Wed, 12 Sep 2001 17:49:21 +0200 (CEST)
Received: by finlandia.infodrom.north.de (Postfix, from userid 501)
	id C4BB0100D7; Wed, 12 Sep 2001 17:49:19 +0200 (CEST)
Date: Wed, 12 Sep 2001 17:49:19 +0200
From: Martin Schulze <joey@finlandia.infodrom.north.de>
To: parisc-linux@lists.parisc-linux.org, linux-mips@oss.sgi.com,
        linux-mips@fnet.fr, linux-mips@vger.kernel.org,
        linux-m68k@phil.uni-sb.de, linux-alpha@vger.kernel.org,
        sparclinux@vger.kernel.org, ultralinux@vger.kernel.org,
        linux-mca@vger.kernel.org
Subject: Invitation to the 6th Linux Developers Meeting in Oldenburg
Message-ID: <20010912174919.Q5720@finlandia.infodrom.north.de>
Reply-To: Martin Schulze <joey@infodrom.north.de>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="dgjlcl3Tl+kb3YDk"
Content-Disposition: inline
User-Agent: Mutt/1.3.20i
Content-Length: 3314
Lines: 99


--dgjlcl3Tl+kb3YDk
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline


              -----------------------------------------
	      6th Linux Developers Meeting in Oldenburg


	       Thursday, September 27th to Sunday, 30th


		   University of Oldenburg, Wechloy
              -----------------------------------------


This is the public invitation for Linux developers to attend this
years' Linux Developers Meeting in Oldenburg.  The scope of this
meeting is to port Linux to non-intel architectures. It is derived
from the linux/m68k meeting 1995 in Solingen , though, recently there
were a lot of other architectures as well.

Just like the last years, the purpose of this meeting is to get as
much of the Linux/m68k core developers and active users together to
discuss current problems, show off projects, exchange news, and
generally to have fun.

Like last year, the meeting will take place from thursday afternoon
(September 27th) to sunday evening (September 30th).  You don't have
to attend from thursday, it's an offer for those of you who would like
to and who can afford coming early.  If you can't make it that early,
just join when you can afford it.  The meeting will take place at the
same place like last year (that is University of Oldenburg, Wechloy).

For those of you, who don't know Oldenburg yet, it's in the northern
part of Germany.  That means, you'll find lots of green areas (trees,
meadows etc.), good air and less industries.  The meeting will be held
at the science building of the University of Oldenburg, in Oldenburg
Wechloy.

If you would like to attend the meeting, please send back this form,
so I can calculate space, power, food and stuff.  Space, power and
connectivity will thankfully be sponsored by the University, food and
stuff will be sponsored by ffis e.V., except dinner in restaurants.
We will be able to use showers inside of the sport building.

You'll need to take with you these things: machines, monitors,
technical documentation (very important), enough triple plugs for your
machines, some network cabling, some hubs/switches, sleeping bag, air
mattress, towel, shower stuff, plate, cutlery, coffee mug.

Comprehensive Information are on the web:
http://oldenburger.linuxtage.de/Oldenburg2001/


Regards,

        Joey

---------- 8< ---------- 8< ---------- 8< ---------- 8< ----------

Linux Developer's Meeting in Oldenburg 2001 - Sept 27th - 30th

Name  :
E-Mail:

I'd like to attend on these days:

    [ ] Thursday, September 27th
    [ ] Friday, September 28th
    [ ] Saturday, September 29th
    [ ] Sunday, September 30th

    Dinner will be from 7pm - 9pm or something.  If you plan to arrive
    within this period, make sure you know how to reach me mobile.

Number of machines ...........:
Number of monitors ...........:

Name may be placed on web page: ( ) yes
                                ( ) no

---------- 8< ---------- 8< ---------- 8< ---------- 8< ----------

--dgjlcl3Tl+kb3YDk
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7n4P/W5ql+IAeqTIRAv7+AJ9SHUH5c8PqV9YIE8beUzlUStZj/gCcCRpK
EjM0a/Wm5UnnwhVNlq6PWdo=
=Oqd1
-----END PGP SIGNATURE-----

--dgjlcl3Tl+kb3YDk--

From ralf@linux-mips.net  Sat Sep 22 13:41:10 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id NAA02210; Sat, 22 Sep 2001 13:41:10 +0200 (MET DST)
Received-Date: Sat, 22 Sep 2001 13:41:10 +0200 (MET DST)
Received: from u-1-18.karlsruhe.ipdial.viaginterkom.de(62.180.18.1), claiming to be "dea.linux-mips.net"
 via SMTP by guadalquivir.fnet.fr, id smtpd002208; Sat Sep 22 13:41:03 2001
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.11.1/8.11.1) id f8MBCJo30237;
	Sat, 22 Sep 2001 13:12:19 +0200
Date: Sat, 22 Sep 2001 13:12:19 +0200
From: Ralf Baechle <ralf@uni-koblenz.de>
To: Eyal Lebedinsky <eyal@eyal.emu.id.au>
Cc: "list, linux-kernel" <linux-kernel@vger.kernel.org>,
        linux-mips@oss.sgi.com, linux-mips@fnet.fr
Subject: Re: Why the net driver for saa9730 is not a module?
Message-ID: <20010922131219.A27982@dea.linux-mips.net>
References: <3BA91980.C829078B@eyal.emu.id.au>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <3BA91980.C829078B@eyal.emu.id.au>; from eyal@eyal.emu.id.au on Thu, Sep 20, 2001 at 08:17:36AM +1000
X-Accept-Language: de,en,fr
Content-Length: 605
Lines: 15

On Thu, Sep 20, 2001 at 08:17:36AM +1000, Eyal Lebedinsky wrote:

> The config does not offer it. Any reason?
> 
> I had no trouble building it, however I do not have the hware to check
> that all is well.

SAA9730 is such an extremly buggy piece of silicon that Phillips stopped
supporting it.  So this driver is used for the Atlas board only which
also has been superseeded by the Malta board; and you shouldn't expect any
future development on this driver.  That said, the driver doesn't work
as a module; a quick look at it shows that at least the module_exit()
functionality isn't supported.

  Ralf

From ralf@linux-mips.net  Sat Sep 22 23:53:26 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id XAA07020; Sat, 22 Sep 2001 23:53:26 +0200 (MET DST)
Received-Date: Sat, 22 Sep 2001 23:53:26 +0200 (MET DST)
Received: from u-105-19.karlsruhe.ipdial.viaginterkom.de(62.180.19.105), claiming to be "dea.linux-mips.net"
 via SMTP by guadalquivir.fnet.fr, id smtpd007018; Sat Sep 22 23:53:15 2001
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.11.1/8.11.1) id f8MLr4H22730;
	Sat, 22 Sep 2001 23:53:04 +0200
Date: Sat, 22 Sep 2001 23:53:04 +0200
From: Ralf Baechle <ralf@uni-koblenz.de>
To: linux-mips@oss.sgi.com, linux-mips@fnet.fr
Subject: [manu@netbsd.org: Need an account on a Linux/Mips box]
Message-ID: <20010922235304.A22411@dea.linux-mips.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
X-Accept-Language: de,en,fr
Content-Length: 713
Lines: 27

----- Forwarded message from Emmanuel Dreyfus <manu@netbsd.org> -----

From: manu@netbsd.org (Emmanuel Dreyfus)
Date: Sat, 22 Sep 2001 18:58:18 +0200
To: linux-mips@oss.sgi.com
Subject: Need an account on a Linux/Mips box

Hello everybody

I'm working on Linux compatibility on NetBSD/Mips. In order to implement
things such as signals, I need a user account on a big endian Linux/Mips
system.

I would use this account mainly for building and running tests programs,
in order to check that our Linux emulation is accurate.

Anyone can helop here?

-- 
Emmanuel Dreyfus.
Si la reponse est NT, c'est probablement 
que vous n'avez pas compris la question.
manu@netbsd.org

----- End forwarded message -----

  Ralf

From ralf@linux-mips.net  Wed Sep 26 00:12:03 2001
Received: (uucp@localhost) by guadalquivir.fnet.fr (8.8.8/97.02.12/Guadalquivir); id AAA08982; Wed, 26 Sep 2001 00:12:03 +0200 (MET DST)
Received-Date: Wed, 26 Sep 2001 00:12:03 +0200 (MET DST)
Received: from u-247-10.karlsruhe.ipdial.viaginterkom.de(62.180.10.247), claiming to be "dea.linux-mips.net"
 via SMTP by guadalquivir.fnet.fr, id smtpd008980; Wed Sep 26 00:12:01 2001
Received: (from ralf@localhost)
	by dea.linux-mips.net (8.11.1/8.11.1) id f8PMBaJ07681;
	Wed, 26 Sep 2001 00:11:36 +0200
Date: Wed, 26 Sep 2001 00:11:36 +0200
From: Ralf Baechle <ralf@oss.sgi.com>
To: tommy.christensen@eicon.com
Cc: linux-mips@oss.sgi.com, linux-mips@fnet.fr
Subject: Re: Register allocation in copy_to_user
Message-ID: <20010926001136.A5828@dea.linux-mips.net>
References: <3BB0D217.80E313F5@eicon.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <3BB0D217.80E313F5@eicon.com>; from tommy.christensen@eicon.com on Tue, Sep 25, 2001 at 08:51:03PM +0200
X-Accept-Language: de,en,fr
Content-Length: 1275
Lines: 27

On Tue, Sep 25, 2001 at 08:51:03PM +0200, tommy.christensen@eicon.com wrote:

> For some time, I have seen occasional corruption of tty-output (pty's and
> serial). This turned out to be caused by a register collision in read_chan
> ()
> in n_tty.c. In the expansion of copy_to_user, the compiler chose register
> "a0" to hold the value of local variable __cu_from. Since this register is
> modified in the asm statement, before __cu_from is used, the corruption
> occured.
> 
> I am not sure, whether this is a compiler-bug (egcs-2.91.66) or the code
> should prevent this from happening. Have the semantics about side-effects
> of asm statements changed?
> 
> Anyway, the attached patch solves this by explicitly building the arguments
> to __copy_user in the argument registers ;-) instead of moving them around.
> So it actually saves some instructions as well. And the compiler can
> generate better code since it now has more registers for temporary
> variables ...
> 
> Is this OK? It works just fine for me with a 2.4.9 kernel (VR5000).

Unfortunately I had to find that your bugreport is correct.   To make
things worse at the time when I implemented this code I used your approach
(which definately is the cleaner approach) and I ran into the same problem.

  Ralf

