linux-um archives
 help / color / mirror / Atom feed
From: Jeff Dike <jdike@addtoit.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: linux-kernel@vger.kernel.org,
	user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] [PATCH 1/16] UML - 2.6.11 updates
Date: Mon, 07 Mar 2005 15:37:07 -0500	[thread overview]
Message-ID: <200503072037.j27Kb7bc003942@ccure.user-mode-linux.org> (raw)

This patch makes some small changes that parallel changes in 2.6.11:
	The csum buffers are now unsigned char.
	Got rid of an unused define from pgtable-2level.h.

Signed-off-by: Jeff Dike <jdike@addtoit.com>

Index: linux-2.6.11/arch/um/include/sysdep-x86_64/checksum.h
===================================================================
--- linux-2.6.11.orig/arch/um/include/sysdep-x86_64/checksum.h	2005-03-04 14:16:38.000000000 -0500
+++ linux-2.6.11/arch/um/include/sysdep-x86_64/checksum.h	2005-03-04 19:28:02.000000000 -0500
@@ -9,7 +9,7 @@
 #include "linux/in6.h"
 #include "asm/uaccess.h"
 
-extern unsigned int csum_partial_copy_from(const char *src, char *dst, int len,
+extern unsigned int csum_partial_copy_from(const unsigned char *src, unsigned char *dst, int len,
 					   int sum, int *err_ptr);
 extern unsigned csum_partial(const unsigned char *buff, unsigned len,
                              unsigned sum);
@@ -23,7 +23,7 @@
  */
 
 static __inline__
-unsigned int csum_partial_copy_nocheck(const char *src, char *dst,
+unsigned int csum_partial_copy_nocheck(const unsigned char *src, unsigned char *dst,
 				       int len, int sum)
 {
 	memcpy(dst, src, len);
@@ -31,7 +31,7 @@
 }
 
 static __inline__
-unsigned int csum_partial_copy_from_user(const char *src, char *dst,
+unsigned int csum_partial_copy_from_user(const unsigned char *src, unsigned char *dst,
 					 int len, int sum, int *err_ptr)
 {
 	return csum_partial_copy_from(src, dst, len, sum, err_ptr);
Index: linux-2.6.11/arch/um/kernel/checksum.c
===================================================================
--- linux-2.6.11.orig/arch/um/kernel/checksum.c	2005-03-04 14:16:38.000000000 -0500
+++ linux-2.6.11/arch/um/kernel/checksum.c	2005-03-04 19:31:26.000000000 -0500
@@ -6,40 +6,31 @@
 
 unsigned int csum_partial(unsigned char *buff, int len, int sum)
 {
-	return arch_csum_partial(buff, len, sum);
+        return arch_csum_partial(buff, len, sum);
 }
 
 EXPORT_SYMBOL(csum_partial);
 
-unsigned int csum_partial_copy_to(const unsigned char *src, char __user *dst,
-				int len, int sum, int *err_ptr)
+unsigned int csum_partial_copy_to(const unsigned char *src, 
+                                  unsigned char __user *dst, int len, int sum,
+                                  int *err_ptr)
 {
-	if(copy_to_user(dst, src, len)){
-		*err_ptr = -EFAULT;
-		return(-1);
-	}
+        if(copy_to_user(dst, src, len)){
+                *err_ptr = -EFAULT;
+                return(-1);
+        }
 
-	return(arch_csum_partial(src, len, sum));
+        return(arch_csum_partial(src, len, sum));
 }
 
-unsigned int csum_partial_copy_from(const unsigned char __user *src, char *dst,
-				int len, int sum, int *err_ptr)
+unsigned int csum_partial_copy_from(const unsigned char __user *src, 
+                                    unsigned char *dst,	int len, int sum, 
+                                    int *err_ptr)
 {
-	if(copy_from_user(dst, src, len)){
-		*err_ptr = -EFAULT;
-		return(-1);
-	}
+        if(copy_from_user(dst, src, len)){
+                *err_ptr = -EFAULT;
+                return(-1);
+        }
 
-	return arch_csum_partial(dst, len, sum);
+        return arch_csum_partial(dst, len, sum);
 }
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
Index: linux-2.6.11/include/asm-um/pgtable-2level.h
===================================================================
--- linux-2.6.11.orig/include/asm-um/pgtable-2level.h	2005-03-04 14:17:00.000000000 -0500
+++ linux-2.6.11/include/asm-um/pgtable-2level.h	2005-03-04 19:38:54.000000000 -0500
@@ -21,7 +21,6 @@
  * we don't really have any PMD directory physically.
  */
 #define PTRS_PER_PTE	1024
-#define PTRS_PER_PMD	1
 #define USER_PTRS_PER_PGD ((TASK_SIZE + (PGDIR_SIZE - 1)) / PGDIR_SIZE)
 #define PTRS_PER_PGD	1024
 #define FIRST_USER_PGD_NR       0



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

                 reply	other threads:[~2005-03-07 19:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200503072037.j27Kb7bc003942@ccure.user-mode-linux.org \
    --to=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox