[parisc-linux-cvs] Re: DIFF 2.5.53 misc changes

Grant Grundler grundler@dsl2.external.hp.com
Thu, 26 Dec 2002 23:49:05 -0700


On Thu, Dec 26, 2002 at 11:45:25PM -0700, Grant Grundler wrote:
> Log message:
> Misc changes:
> head.S	4x speed up for clearing BSS at boot time
> perf.c  Missing include for parisc_dev stuff
> setup.c Only use conswitchp if CONFIG_VT is also defined
> sys_parisc32.c Add sys_sendfile64() wrapper.

setup.c might be solved with Kconfig changes but I didn't
see how. setup.o won't link w/o CONFIG_VT unless this is added.
Not sure if I've badly broken something else though.

grant


Index: arch/parisc/kernel/head.S
===================================================================
RCS file: /var/cvs/linux-2.5/arch/parisc/kernel/head.S,v
retrieving revision 1.7
diff -u -p -r1.7 head.S
--- arch/parisc/kernel/head.S	20 Dec 2002 21:03:12 -0000	1.7
+++ arch/parisc/kernel/head.S	27 Dec 2002 06:40:46 -0000
@@ -73,7 +73,7 @@ stext:
 	ldo             R%PA(_end)(%r4),%r4
 $bss_loop:
 	cmpb,<<,n       %r3,%r4,$bss_loop
-	stb,ma          %r0,1(%r3)
+	stw,ma          %r0,4(%r3)
 
 	/* Save away the arguments the boot loader passed in (32 bit args) */
 
Index: arch/parisc/kernel/perf.c
===================================================================
RCS file: /var/cvs/linux-2.5/arch/parisc/kernel/perf.c,v
retrieving revision 1.8
diff -u -p -r1.8 perf.c
--- arch/parisc/kernel/perf.c	17 Nov 2002 04:25:19 -0000	1.8
+++ arch/parisc/kernel/perf.c	27 Dec 2002 06:40:46 -0000
@@ -50,6 +50,7 @@
 
 #include <asm/uaccess.h>
 #include <asm/perf.h>
+#include <asm/parisc-device.h>
 #include <asm/processor.h>
 #include <asm/runway.h>
 #include <asm/io.h>		/* for __raw_read() */
Index: arch/parisc/kernel/setup.c
===================================================================
RCS file: /var/cvs/linux-2.5/arch/parisc/kernel/setup.c,v
retrieving revision 1.12
diff -u -p -r1.12 setup.c
--- arch/parisc/kernel/setup.c	20 Dec 2002 21:04:41 -0000	1.12
+++ arch/parisc/kernel/setup.c	27 Dec 2002 06:40:46 -0000
@@ -143,7 +143,7 @@ void __init setup_arch(char **cmdline_p)
 	dma_ops_init();
 #endif
 
-#ifdef CONFIG_DUMMY_CONSOLE
+#if defined(CONFIG_VT) && defined(CONFIG_DUMMY_CONSOLE)
 	conswitchp = &dummy_con;	/* we use take_over_console() later ! */
 #endif
 
Index: arch/parisc/kernel/sys_parisc32.c
===================================================================
RCS file: /var/cvs/linux-2.5/arch/parisc/kernel/sys_parisc32.c,v
retrieving revision 1.16
diff -u -p -r1.16 sys_parisc32.c
--- arch/parisc/kernel/sys_parisc32.c	29 Nov 2002 17:31:54 -0000	1.16
+++ arch/parisc/kernel/sys_parisc32.c	27 Dec 2002 06:40:46 -0000
@@ -2578,6 +2578,31 @@ asmlinkage int sys32_quotactl(int cmd, c
 	return -EINVAL;
 }
 
+
+
+extern asmlinkage ssize_t sys_sendfile64(int out_fd, int in_fd, loff_t *offset, size_t count);
+typedef long __kernel_loff_t32;		/* move this to asm/posix_types.h? */
+
+asmlinkage int sys32_sendfile64(int out_fd, int in_fd, __kernel_loff_t32 *offset, s32 count)
+{
+	mm_segment_t old_fs = get_fs();
+	int ret;
+	loff_t lof;
+	
+	if (offset && get_user(lof, offset))
+		return -EFAULT;
+		
+	set_fs(KERNEL_DS);
+	ret = sys_sendfile64(out_fd, in_fd, offset ? &lof : NULL, count);
+	set_fs(old_fs);
+	
+	if (offset && put_user(lof, offset))
+		return -EFAULT;
+		
+	return ret;
+}
+
+
 struct timex32 {
 	unsigned int modes;	/* mode selector */
 	int offset;		/* time offset (usec) */