
Miscellaneous updates
 - Add a couple of new sysctls
 - Patch from Ryan Bradetich for correct buswalks on E class machines.
 - Randolph Chung fixed the kernel entry/exit asm
 - Randolph also fixed some of the 32-bit emulation problems with signals.
 - $$mulU no longer exists to be exported
 - Grant Grundler fixed a probem in our PCI code
 - Adam Richter fixed our probem with our DMA mapping support
 - Al Viro pointed out we don't need to track our own mod count since
   we set owner.
 - Helge Deller updated our syscalls.

diff -urpNX build-tools/dontdiff linus-2.5/arch/parisc/kernel/asm-offsets.c parisc-2.5/arch/parisc/kernel/asm-offsets.c
--- linus-2.5/arch/parisc/kernel/asm-offsets.c	Tue Nov  5 11:16:58 2002
+++ parisc-2.5/arch/parisc/kernel/asm-offsets.c	Wed Nov 27 09:13:35 2002
@@ -29,6 +29,7 @@
 
 int main(void)
 {
+	DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, thread_info));
 	DEFINE(TASK_STATE, offsetof(struct task_struct, state));
 	DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags));
 	DEFINE(TASK_SIGPENDING, offsetof(struct task_struct, pending));
@@ -213,6 +214,7 @@ int main(void)
 	DEFINE(PT_SIZE, sizeof(struct pt_regs));
 	DEFINE(PT_SZ_ALGN, align(sizeof(struct pt_regs), 64));
 	BLANK();
+	DEFINE(TI_TASK, offsetof(struct thread_info, task));
 	DEFINE(TI_EXEC_DOMAIN, offsetof(struct thread_info, exec_domain));
 	DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
 	DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
diff -urpNX build-tools/dontdiff linus-2.5/arch/parisc/kernel/drivers.c parisc-2.5/arch/parisc/kernel/drivers.c
--- linus-2.5/arch/parisc/kernel/drivers.c	Tue Nov  5 11:16:59 2002
+++ parisc-2.5/arch/parisc/kernel/drivers.c	Wed Nov 27 09:13:35 2002
@@ -9,6 +9,7 @@
  * Copyright (c) 1999 The Puffin Group
  * Copyright (c) 2001 Matthew Wilcox for Hewlett Packard
  * Copyright (c) 2001 Helge Deller <deller@gmx.de>
+ * Copyright (c) 2001,2002 Ryan Bradetich 
  * 
  * The file handles registering devices and drivers, then matching them.
  * It's the closest we get to a dating agency.
@@ -467,27 +468,41 @@ int register_parisc_device(struct parisc
         ((gsc_readl(&((struct bc_module *)dev->hpa)->io_status) \
                 & BC_PORT_MASK) == BC_LOWER_PORT)
 
-#define READ_IO_IO_LOW(dev) \
-	(dev->id.hw_type == HPHW_IOA ? \
-	        __raw_readl((unsigned long)&((struct bc_module *)dev->hpa)->io_io_low) << 16 : \
-	        __raw_readl((unsigned long)&((struct bc_module *)dev->hpa)->io_io_low))
+#define MAX_NATIVE_DEVICES 64
+#define NATIVE_DEVICE_OFFSET 0x1000
+
+#define FLEX_MASK 	(unsigned long)0xfffffffffffc0000
+#define IO_IO_LOW	offsetof(struct bc_module, io_io_low)
+#define IO_IO_HIGH	offsetof(struct bc_module, io_io_high)
+#define READ_IO_IO_LOW(dev)  (unsigned long)(signed int)__raw_readl(dev->hpa + IO_IO_LOW)
+#define READ_IO_IO_HIGH(dev) (unsigned long)(signed int)__raw_readl(dev->hpa + IO_IO_HIGH)
+
+static void walk_native_bus(unsigned long io_io_low, unsigned long io_io_high,
+                            struct parisc_device *parent);
 
-static void walk_native_bus(unsigned long addr, struct parisc_device *parent);
 void walk_lower_bus(struct parisc_device *dev)
 {
+	unsigned long io_io_low, io_io_high;
 
 	if(!BUS_CONVERTER(dev) || IS_LOWER_PORT(dev))
 		return;
 
-	walk_native_bus((unsigned long)(signed int)READ_IO_IO_LOW(dev), dev);
-}
+	if(dev->id.hw_type == HPHW_IOA) {
+		io_io_low = (unsigned long)(signed int)(READ_IO_IO_LOW(dev) << 16);
+		io_io_high = io_io_low + MAX_NATIVE_DEVICES * NATIVE_DEVICE_OFFSET;
+	} else {
+		io_io_low = (READ_IO_IO_LOW(dev) + ~FLEX_MASK) & FLEX_MASK;
+		io_io_high = (READ_IO_IO_HIGH(dev)+ ~FLEX_MASK) & FLEX_MASK;
+	}
 
-#define MAX_NATIVE_DEVICES 64
-#define NATIVE_DEVICE_OFFSET 0x1000
+	walk_native_bus(io_io_low, io_io_high, dev);
+}
 
 /**
  * walk_native_bus -- Probe a bus for devices
- * @addr: Base address of this bus.
+ * @io_io_low: Base address of this bus.
+ * @io_io_high: Last address of this bus.
+ * @parent: The parent bus device.
  * 
  * A native bus (eg Runway or GSC) may have up to 64 devices on it,
  * spaced at intervals of 0x1000 bytes.  PDC may not inform us of these
@@ -495,28 +510,32 @@ void walk_lower_bus(struct parisc_device
  * devices which are not physically connected (such as extra serial &
  * keyboard ports).  This problem is not yet solved.
  */
-static void walk_native_bus(unsigned long addr, struct parisc_device *parent)
+static void walk_native_bus(unsigned long io_io_low, unsigned long io_io_high,
+                            struct parisc_device *parent)
 {
-	int i;
+	int i, devices_found = 0;
+	unsigned long hpa = io_io_low;
 	struct hardware_path path;
 
 	get_node_path(parent, &path);
-	for (i = 0; i < MAX_NATIVE_DEVICES; i++) {
-		unsigned long hpa = (addr + i * NATIVE_DEVICE_OFFSET);
-		struct parisc_device *dev;
-
-		/* Was the device already added by Firmware? */
-		dev = find_device_by_addr(hpa);
-		if (!dev) {
-			path.mod = i;
-			dev = alloc_pa_dev(hpa, &path);
-			if (!dev)
-				continue;
+	do {
+		for(i = 0; i < MAX_NATIVE_DEVICES; i++, hpa += NATIVE_DEVICE_OFFSET) {
+			struct parisc_device *dev;
 
-			register_parisc_device(dev);
+			/* Was the device already added by Firmware? */
+			dev = find_device_by_addr(hpa);
+			if (!dev) {
+				path.mod = i;
+				dev = alloc_pa_dev(hpa, &path);
+				if (!dev)
+					continue;
+
+				register_parisc_device(dev);
+				devices_found++;
+			}
+			walk_lower_bus(dev);
 		}
-		walk_lower_bus(dev);
-	}
+	} while(!devices_found && hpa < io_io_high);
 }
 
 #define CENTRAL_BUS_ADDR (unsigned long) 0xfffffffffff80000
@@ -529,7 +548,9 @@ static void walk_native_bus(unsigned lon
  */
 void walk_central_bus(void)
 {
-	walk_native_bus(CENTRAL_BUS_ADDR, &root);
+	walk_native_bus(CENTRAL_BUS_ADDR,
+			CENTRAL_BUS_ADDR + (MAX_NATIVE_DEVICES * NATIVE_DEVICE_OFFSET),
+			&root);
 }
 
 void fixup_child_irqs(struct parisc_device *parent, int base,
diff -urpNX build-tools/dontdiff linus-2.5/arch/parisc/kernel/entry.S parisc-2.5/arch/parisc/kernel/entry.S
--- linus-2.5/arch/parisc/kernel/entry.S	Tue Nov  5 11:16:59 2002
+++ parisc-2.5/arch/parisc/kernel/entry.S	Wed Nov 27 09:13:35 2002
@@ -38,13 +38,11 @@
 #include <asm/thread_info.h>
 
 #ifdef __LP64__
-#define FRAME_SIZE	128
 #define CMPIB           cmpib,*
 #define CMPB            cmpb,*
 
 	.level 2.0w
 #else
-#define FRAME_SIZE	64
 #define CMPIB           cmpib,
 #define CMPB            cmpb,
 
@@ -147,7 +145,7 @@
 
 	mfctl   %cr30, %r1
 	tophys  %r1,%r9
-	LDREG	0(%r9), %r1		/* thread_info -> task_struct */
+	LDREG	TI_TASK(%r9), %r1	/* thread_info -> task_struct */
 	tophys  %r1,%r9
 	ldo     TASK_REGS(%r9),%r9
 	STREG   %r30, PT_GR30(%r9)
@@ -499,9 +497,7 @@ fault_vector_11:
 #endif
 
 	.import		handle_interruption,code
-	.import		handle_real_interruption,code
 	.import		do_cpu_irq_mask,code
-	.import		parisc_stopkernel,code
 
 	/*
 	 * r26 = function to be called
@@ -529,7 +525,7 @@ __kernel_thread:
 	STREG	%r2, PT_GR27(%r1)	/* Store childs %dp */
 	ldd	16(%r26), %r26
 
-	STREG	%r22, PT_GR22(%r1)	/* Store childs %dp */
+	STREG	%r22, PT_GR22(%r1)	/* save r22 (arg5) */
 	copy	%r0, %r22		/* user_tid */
 #endif
 	STREG	%r26, PT_GR26(%r1)  /* Store function & argument for child */
@@ -568,7 +564,7 @@ ret_from_kernel_thread:
 	nop
 #endif
 
-	LDREG	-THREAD_SZ_ALGN(%r30), %r1
+	LDREG	TI_TASK-THREAD_SZ_ALGN(%r30), %r1
 	LDREG	TASK_PT_GR25(%r1), %r26
 #ifdef __LP64__
 	LDREG	TASK_PT_GR27(%r1), %r27
@@ -629,11 +625,7 @@ _switch_to:
 
 	STREG	%r30, TASK_PT_KSP(%r26)
 	LDREG	TASK_PT_KSP(%r25), %r30
-#ifdef __LP64__
-	LDREG	8(%r25), %r25
-#else
-	LDREG	4(%r25), %r25
-#endif
+	LDREG	TASK_THREAD_INFO(%r25), %r25
 	bv	%r0(%r2)
 	mtctl   %r25,%cr30
 
@@ -667,7 +659,7 @@ _switch_to_ret:
 	.export	syscall_exit_rfi
 syscall_exit_rfi:
 	mfctl   %cr30,%r16
-	LDREG	0(%r16), %r16		/* thread_info -> task_struct */
+	LDREG	TI_TASK(%r16), %r16	/* thread_info -> task_struct */
 	ldo	TASK_REGS(%r16),%r16
 	/* Force iaoq to userspace, as the user has had access to our current
 	 * context via sigcontext. Also Filter the PSW for the same reason.
@@ -824,8 +816,6 @@ intr_do_signal:
 	ldo	-16(%r30),%r29			/* Reference param save area */
 #endif
 
-#warning TAUSQ FIXME - review 2.5 signal return path changes
-
 	bl	do_signal,%r2
 	copy	%r0, %r26			/* sigset_t *oldset = NULL */
 
@@ -1985,8 +1975,7 @@ dtlb_fault:
 	.export sys_fork_wrapper
 	.export child_return
 sys_fork_wrapper:
-	mfctl	%cr30,%r1		/* get pt regs */
-	LDREG	0(%r1),%r1
+	LDREG	TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30), %r1
 	ldo	TASK_REGS(%r1),%r1
 	reg_save %r1
 	mfctl	%cr27, %r3
@@ -2011,9 +2000,8 @@ sys_fork_wrapper:
 	LDREG	-RP_OFFSET-FRAME_SIZE(%r30),%r2
 wrapper_exit:
 	ldo	-FRAME_SIZE(%r30),%r30		/* get the stackframe */
-	mfctl	%cr30,%r1		/* get pt regs */
-	LDREG	0(%r1),%r1
-	ldo	TASK_REGS(%r1),%r1
+	LDREG	TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
+	ldo	TASK_REGS(%r1),%r1	 /* get pt regs */
 
 	LDREG	PT_CR27(%r1), %r3
 	mtctl	%r3, %cr27
@@ -2031,18 +2019,16 @@ child_return:
 	nop
 #endif
 
-	mfctl	%cr30,%r2
-	LDREG	0(%r2),%r2
-	LDREG	TASK_PT_GR19(%r2),%r2
+	LDREG	TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE-FRAME_SIZE(%r30), %r1
+	LDREG	TASK_PT_GR19(%r1),%r2
 	b	wrapper_exit
 	copy	%r0,%r28
 
 	
 	.export sys_clone_wrapper
 sys_clone_wrapper:
-	mfctl	%cr30,%r1		/* get pt regs */
-	LDREG	0(%r1),%r1
-	ldo	TASK_REGS(%r1),%r1
+	LDREG	TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
+	ldo	TASK_REGS(%r1),%r1	/* get pt regs */
 	reg_save %r1
 	mfctl	%cr27, %r3
 	STREG	%r3, PT_CR27(%r1)
@@ -2063,9 +2049,8 @@ sys_clone_wrapper:
 
 	.export sys_vfork_wrapper
 sys_vfork_wrapper:
-	mfctl	%cr30,%r1		/* get pt regs */
-	LDREG	0(%r1),%r1
-	ldo	TASK_REGS(%r1),%r1
+	LDREG	TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
+	ldo	TASK_REGS(%r1),%r1	/* get pt regs */
 	reg_save %r1
 	mfctl	%cr27, %r3
 	STREG	%r3, PT_CR27(%r1)
@@ -2087,9 +2072,8 @@ sys_vfork_wrapper:
 
 	
 	.macro  execve_wrapper execve
-	mfctl	%cr30,%r1		/* get pt regs */
-	LDREG	0(%r1),%r1
-	ldo	TASK_REGS(%r1),%r1
+	LDREG	TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
+	ldo	TASK_REGS(%r1),%r1	/* get pt regs */
 
 	/*
 	 * Do we need to save/restore r3-r18 here?
@@ -2137,9 +2121,8 @@ sys32_execve_wrapper:
 
 	.export sys_rt_sigreturn_wrapper
 sys_rt_sigreturn_wrapper:
-	mfctl	%cr30,%r26		/* get pt regs */
-	LDREG	0(%r26),%r26
-	ldo	TASK_REGS(%r26),%r26
+	LDREG	TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r26
+	ldo	TASK_REGS(%r26),%r26	/* get pt regs */
 	/* Don't save regs, we are going to restore them from sigcontext. */
 	STREG	%r2, -RP_OFFSET(%r30)
 #ifdef __LP64__
@@ -2155,9 +2138,8 @@ sys_rt_sigreturn_wrapper:
 	LDREG	-RP_OFFSET(%r30), %r2
 
 	/* FIXME: I think we need to restore a few more things here. */
-	mfctl	%cr30,%r1		/* get pt regs */
-	LDREG	0(%r1),%r1
-	ldo	TASK_REGS(%r1),%r1
+	LDREG	TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
+	ldo	TASK_REGS(%r1),%r1	/* get pt regs */
 	reg_restore %r1
 
 	/* If the signal was received while the process was blocked on a
@@ -2170,8 +2152,8 @@ sys_rt_sigreturn_wrapper:
 	.export sys_sigaltstack_wrapper
 sys_sigaltstack_wrapper:
 	/* Get the user stack pointer */
-	mfctl	%cr30,%r24
-	LDREG	0(%r24),%r24
+	LDREG	TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
+	ldo	TASK_REGS(%r1),%r24	/* get pt regs */
 	LDREG	TASK_PT_GR30(%r24),%r24
 	STREG	%r2, -RP_OFFSET(%r30)
 #ifdef __LP64__
@@ -2192,8 +2174,7 @@ sys_sigaltstack_wrapper:
 	.export sys32_sigaltstack_wrapper
 sys32_sigaltstack_wrapper:
 	/* Get the user stack pointer */
-	mfctl	%cr30,%r24
-	LDREG	0(%r24),%r24
+	LDREG	TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r24
 	LDREG	TASK_PT_GR30(%r24),%r24
 	STREG	%r2, -RP_OFFSET(%r30)
 	ldo	FRAME_SIZE(%r30), %r30
@@ -2208,9 +2189,8 @@ sys32_sigaltstack_wrapper:
 
 	.export sys_rt_sigsuspend_wrapper
 sys_rt_sigsuspend_wrapper:
-	mfctl	%cr30,%r24		/* get pt regs */
-	LDREG	0(%r24),%r24
-	ldo	TASK_REGS(%r24),%r24
+	LDREG	TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30), %r1
+	ldo	TASK_REGS(%r1),%r24
 	reg_save %r24
 
 	STREG	%r2, -RP_OFFSET(%r30)
@@ -2226,8 +2206,7 @@ sys_rt_sigsuspend_wrapper:
 	ldo	-FRAME_SIZE(%r30), %r30
 	LDREG	-RP_OFFSET(%r30), %r2
 
-	mfctl	%cr30,%r1		/* get pt regs */
-	LDREG	0(%r1),%r1
+	LDREG	TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30), %r1
 	ldo	TASK_REGS(%r1),%r1
 	reg_restore %r1
 
@@ -2247,7 +2226,7 @@ syscall_exit:
 	/* save return value now */
 
 	mfctl     %cr30, %r1
-	LDREG     0(%r1),%r1
+	LDREG     TI_TASK(%r1),%r1
 	STREG     %r28,TASK_PT_GR28(%r1)
 
 	/* Save other hpux returns if personality is PER_HPUX */
@@ -2297,25 +2276,17 @@ syscall_check_resched:
 
 	/* check for reschedule */
 
-	LDREG  TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19	/* long */
-	bb,<,n %r19, 31-TIF_NEED_RESCHED, syscall_do_resched /* forward */
+	LDREG	TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19	/* long */
+	bb,<,n	%r19, 31-TIF_NEED_RESCHED, syscall_do_resched /* forward */
 
 syscall_check_sig:
-	/* These should be the same effect, but which is faster? */
-#if 1
-	mfctl   %cr30,%r1
-#else
-	ldo     -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1    /* get thread info ptr */
-#endif
-	/* check for pending signals */
-	LDREG    TI_FLAGS(%r1),%r19
-	bb,<,n   %r19, 31-TIF_SIGPENDING, syscall_do_signal /* forward */
+	LDREG	TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19    /* get ti flags */
+	bb,<,n	%r19, 31-TIF_SIGPENDING, syscall_do_signal /* forward */
 
 syscall_restore:
-	mfctl   %cr30,%r1
-	LDREG	TI_FLAGS(%r1), %r19		/* Are we being ptraced? */
+	LDREG	TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19    /* get ti flags */
 	bb,<	%r19, 31-TIF_SYSCALL_TRACE,syscall_restore_rfi
-	LDREG	0(%r1),%r1		  	   /* delay slot! */
+	LDREG	TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1	/* delay slot! */
 	ldo	TASK_PT_FR31(%r1),%r19		   /* reload fpregs */
 	rest_fp	%r19
 
@@ -2444,7 +2415,7 @@ syscall_do_signal:
 	   FIXME: After this point the process structure should be
 	   consistent with all the relevant state of the process
 	   before the syscall.  We need to verify this. */
-	LDREG	0(%r1),%r1
+	LDREG	TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 
 	ldo	TASK_REGS(%r1), %r25		/* struct pt_regs *regs */
 	reg_save %r25
 
@@ -2453,12 +2424,10 @@ syscall_do_signal:
 #ifdef __LP64__
 	ldo	-16(%r30),%r29			/* Reference param save area */
 #endif
-#warning TAUSQ FIXME, this is wrong
 	bl	do_signal,%r2
 	copy	%r0, %r26			/* sigset_t *oldset = NULL */
 
-	mfctl	%cr30,%r1			/* reload task ptr */
-	LDREG	0(%r1),%r1
+	LDREG	TI_TASK-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1
 	ldo	TASK_REGS(%r1), %r20		/* reload pt_regs */
 	reg_restore %r20
 
diff -urpNX build-tools/dontdiff linus-2.5/arch/parisc/kernel/head.S parisc-2.5/arch/parisc/kernel/head.S
--- linus-2.5/arch/parisc/kernel/head.S	Thu Oct 31 17:33:17 2002
+++ parisc-2.5/arch/parisc/kernel/head.S	Wed Nov 27 09:13:35 2002
@@ -277,8 +277,8 @@ smp_slave_stext:
 	ldo		R%PA(smp_init_current_idle_task)(%sp),%sp
 	ldw		0(%sp),%sp	/* load task address */
 	mtctl           %sp,%cr30       /* store in cr30 */
-	addil		L%TASK_SZ_ALGN,%sp	/* stack is above task */
-	ldo		R%TASK_SZ_ALGN(%r1),%sp
+	addil		L%THREAD_SZ_ALGN,%sp	/* stack is above task */
+	ldo		R%THREAD_SZ_ALGN(%r1),%sp
 
 	/* point CPU to kernel page tables */
 	ldil		L%PA(swapper_pg_dir),%r4
diff -urpNX build-tools/dontdiff linus-2.5/arch/parisc/kernel/head64.S parisc-2.5/arch/parisc/kernel/head64.S
--- linus-2.5/arch/parisc/kernel/head64.S	Thu Oct 31 10:27:07 2002
+++ parisc-2.5/arch/parisc/kernel/head64.S	Wed Nov 27 09:13:35 2002
@@ -176,7 +176,9 @@ common_stext:
 #endif /* CONFIG_SMP */
 
 	/* Save the rfi target address */
-	std		%r11,  TASK_PT_GR11-TASK_SZ_ALGN(%sp)
+	ldo		-THREAD_SZ_ALGN(%sp), %r1
+	ldd		TI_TASK(%r1), %r1
+	std		%r11,  TASK_PT_GR11(%r1)
 
 #ifndef CONFIG_PDC_NARROW
 	/* Switch to wide mode; Superdome doesn't support narrow PDC
@@ -206,7 +208,9 @@ common_stext:
 
 stext_pdc_ret:
 	/* restore rfi target address*/
-	ldd		TASK_PT_GR11-TASK_SZ_ALGN(%sp), %r11
+	ldo		-THREAD_SZ_ALGN(%sp), %r1
+	ldd		TI_TASK(%r1), %r1
+	ldd		TASK_PT_GR11(%r1), %r11
 
 	/* PARANOID: clear user scratch/user space SR's */
 	mtsp	%r0,%sr0
@@ -310,7 +314,7 @@ smp_slave_stext:
 	load32		PA(smp_init_current_idle_task),%sp
 	ldd		0(%sp),%sp	/* load task address */
 	mtctl           %sp,%cr30       /* store in cr30 */
-	ldo             TASK_SZ_ALGN(%sp),%sp
+	ldo             THREAD_SZ_ALGN(%sp),%sp
 	tophys_r1       %sp
 
 	/* point CPU to kernel page tables */
diff -urpNX build-tools/dontdiff linus-2.5/arch/parisc/kernel/parisc_ksyms.c parisc-2.5/arch/parisc/kernel/parisc_ksyms.c
--- linus-2.5/arch/parisc/kernel/parisc_ksyms.c	Tue Nov  5 11:17:00 2002
+++ parisc-2.5/arch/parisc/kernel/parisc_ksyms.c	Wed Nov 27 09:13:35 2002
@@ -141,7 +141,6 @@ extern void $$divU(void);
 extern void $$remI(void);
 extern void $$remU(void);
 extern void $$mulI(void);
-extern void $$mulU(void);
 extern void $$divU_3(void);
 extern void $$divU_5(void);
 extern void $$divU_6(void);
@@ -166,9 +165,6 @@ EXPORT_SYMBOL_NOVERS($$divU);
 EXPORT_SYMBOL_NOVERS($$remI);
 EXPORT_SYMBOL_NOVERS($$remU);
 EXPORT_SYMBOL_NOVERS($$mulI);
-#ifndef __LP64__
-EXPORT_SYMBOL_NOVERS($$mulU);
-#endif
 EXPORT_SYMBOL_NOVERS($$divU_3);
 EXPORT_SYMBOL_NOVERS($$divU_5);
 EXPORT_SYMBOL_NOVERS($$divU_6);
@@ -215,3 +211,5 @@ extern void $$dyncall(void);
 EXPORT_SYMBOL_NOVERS($$dyncall);
 #endif
 
+#include <asm/pgtable.h>
+EXPORT_SYMBOL_NOVERS(vmalloc_start);
diff -urpNX build-tools/dontdiff linus-2.5/arch/parisc/kernel/pci.c parisc-2.5/arch/parisc/kernel/pci.c
--- linus-2.5/arch/parisc/kernel/pci.c	Mon Nov 11 12:47:37 2002
+++ parisc-2.5/arch/parisc/kernel/pci.c	Mon Nov 11 13:28:20 2002
@@ -488,24 +488,6 @@ pcibios_setup_host_bridge(struct pci_bus
 
 
 /*
-** Mostly copied from drivers/pci/setup-bus.c:pci_assign_unassigned_resources()
-*/
-void __devinit
-pcibios_assign_unassigned_resources(struct pci_bus *bus)
-{
-	/* from drivers/pci/setup-bus.c */
-	extern void pbus_assign_resources(struct pci_bus *bus, struct pbus_set_ranges_data *ranges);
-
-	struct pbus_set_ranges_data ranges;
-
-	ranges.io_end = ranges.io_start
-				= bus->resource[0]->start + PCIBIOS_MIN_IO;
-	ranges.mem_end = ranges.mem_start
-				= bus->resource[1]->start + PCIBIOS_MIN_MEM;
-	pbus_assign_resources(bus, &ranges);
-}
-
-/*
 ** PARISC specific (unfortunately)
 */
 void pcibios_register_hba(struct pci_hba_data *hba)
diff -urpNX build-tools/dontdiff linus-2.5/arch/parisc/kernel/pdc_cons.c parisc-2.5/arch/parisc/kernel/pdc_cons.c
--- linus-2.5/arch/parisc/kernel/pdc_cons.c	Mon Nov 11 12:47:37 2002
+++ parisc-2.5/arch/parisc/kernel/pdc_cons.c	Fri Nov  8 08:42:39 2002
@@ -56,7 +56,7 @@ static int pdc_console_setup(struct cons
 #define PDC_CONSOLE_DEVICE pdc_console_device
 static kdev_t pdc_console_device (struct console *c)
 {
-        return mk_kdev(PDCCONS_MAJOR, 0);
+        return mk_kdev(MUX_MAJOR, 0);
 }
 #else
 #define PDC_CONSOLE_DEVICE NULL
diff -urpNX build-tools/dontdiff linus-2.5/arch/parisc/kernel/perf.c parisc-2.5/arch/parisc/kernel/perf.c
--- linus-2.5/arch/parisc/kernel/perf.c	Mon Nov 11 12:47:37 2002
+++ parisc-2.5/arch/parisc/kernel/perf.c	Wed Nov 27 09:13:35 2002
@@ -43,7 +43,6 @@
  */
 
 #include <linux/config.h>
-#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/proc_fs.h>
 #include <linux/miscdevice.h>
@@ -269,8 +268,6 @@ static int perf_open(struct inode *inode
 	perf_enabled = 1;
  	spin_unlock(&perf_lock);
 
-	MOD_INC_USE_COUNT;
-
 	return 0;
 }
 
@@ -282,8 +279,6 @@ static int perf_release(struct inode *in
 	spin_lock(&perf_lock);
 	perf_enabled = 0;
 	spin_unlock(&perf_lock);
-
-	MOD_DEC_USE_COUNT;
 
 	return 0;
 }
diff -urpNX build-tools/dontdiff linus-2.5/arch/parisc/kernel/process.c parisc-2.5/arch/parisc/kernel/process.c
--- linus-2.5/arch/parisc/kernel/process.c	Tue Nov  5 11:17:00 2002
+++ parisc-2.5/arch/parisc/kernel/process.c	Sun Nov 10 13:58:17 2002
@@ -295,6 +295,11 @@ copy_thread(int nr, unsigned long clone_
 	return 0;
 }
 
+unsigned long thread_saved_pc(struct task_struct *t)
+{
+	return t->thread.regs.kpc;
+}
+
 /*
  * sys_execve() executes a new program.
  */
diff -urpNX build-tools/dontdiff linus-2.5/arch/parisc/kernel/signal.c parisc-2.5/arch/parisc/kernel/signal.c
--- linus-2.5/arch/parisc/kernel/signal.c	Thu Oct 31 17:33:19 2002
+++ parisc-2.5/arch/parisc/kernel/signal.c	Thu Nov 14 10:12:52 2002
@@ -29,6 +29,7 @@
 #include <asm/rt_sigframe.h>
 #include <asm/uaccess.h>
 #include <asm/pgalloc.h>
+#include <asm/cacheflush.h>
 
 #define DEBUG_SIG 0
 
@@ -40,6 +41,10 @@
 
 #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
 
+/* Use this to get at 32-bit user passed pointers. 
+ *    See sys_sparc32.c for description about these. */
+#define A(__x)	((unsigned long)(__x))
+
 int do_signal(sigset_t *oldset, struct pt_regs *regs, int in_syscall);
 
 int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from)
@@ -308,28 +313,26 @@ setup_rt_frame(int sig, struct k_sigacti
 			   (unsigned long) &frame->tramp[4]);
 #else
 	/* It should *always* be cache line-aligned, but the compiler
-           sometimes screws up. */
+	sometimes screws up. */
 	asm volatile("fdc 0(%%sr3,%0)\n\t"
 		     "fdc %1(%%sr3,%0)\n\t"
 		     "sync\n\t"
 		     "fic 0(%%sr3,%0)\n\t"
 		     "fic %1(%%sr3,%0)\n\t"
 		     "sync\n\t"
-		     : : "r" (frame->tramp), "r" (L1_CACHE_BYTES));
+		      : : "r" (frame->tramp), "r" (L1_CACHE_BYTES));
 #endif
+
 	rp = (unsigned long) frame->tramp;
 
 	if (err)
 		goto give_sigsegv;
 
-#ifdef __LP64__
 /* Much more has to happen with signals than this -- but it'll at least */
 /* provide a pointer to some places which definitely need a look. */
-#define HACK unsigned int
-#else
-#define HACK unsigned long
-#endif
-	haddr = (HACK) ka->sa.sa_handler;
+#define HACK u32
+
+	haddr = (HACK)A(ka->sa.sa_handler);
 	/* ARGH!  Fucking brain damage.  You don't want to know. */
 	if (haddr & 2) {
 		HACK *plabel;
@@ -355,13 +358,13 @@ setup_rt_frame(int sig, struct k_sigacti
 
 	regs->gr[2]  = rp;                /* userland return pointer */
 	regs->gr[26] = sig;               /* signal number */
-	regs->gr[25] = (HACK) &frame->info; /* siginfo pointer */
-	regs->gr[24] = (HACK) &frame->uc;   /* ucontext pointer */
+	regs->gr[25] = (HACK)A(&frame->info); /* siginfo pointer */
+	regs->gr[24] = (HACK)A(&frame->uc);   /* ucontext pointer */
 	DBG(("making sigreturn frame: %#lx + %#x = %#lx\n",
 	       regs->gr[30], PARISC_RT_SIGFRAME_SIZE,
 	       regs->gr[30] + PARISC_RT_SIGFRAME_SIZE));
 	/* Raise the user stack pointer to make a proper call frame. */
-	regs->gr[30] = ((HACK) frame + PARISC_RT_SIGFRAME_SIZE);
+	regs->gr[30] = ((HACK)A(frame) + PARISC_RT_SIGFRAME_SIZE);
 
 	DBG(("SIG deliver (%s:%d): frame=0x%p sp=%#lx iaoq=%#lx/%#lx rp=%#lx\n",
 	       current->comm, current->pid, frame, regs->gr[30],
diff -urpNX build-tools/dontdiff linus-2.5/arch/parisc/kernel/syscall.S parisc-2.5/arch/parisc/kernel/syscall.S
--- linus-2.5/arch/parisc/kernel/syscall.S	Tue Nov  5 11:17:01 2002
+++ parisc-2.5/arch/parisc/kernel/syscall.S	Wed Nov 27 09:13:35 2002
@@ -23,12 +23,6 @@
 #endif
 	.text
 
-#ifdef __LP64__
-#define FRAME_SIZE	128
-#else
-#define FRAME_SIZE	64
-#endif
-
 	.import syscall_exit,code
 	.import syscall_exit_rfi,code
 	.export linux_gateway_page
@@ -101,7 +95,7 @@ linux_gateway_entry:
 	mtsp	%r0,%sr7			/* get kernel space into sr7 */
 	STREG	%r1,0(%r30)			/* Stick r1 (usp) here for now */
 	mfctl	%cr30,%r1			/*  get task ptr in %r1 */
-	LDREG	0(%r1),%r1
+	LDREG	TI_TASK(%r1),%r1
 
 	/* Save some registers for sigcontext and potential task
 	   switch (see entry.S for the details of which ones are
@@ -204,7 +198,7 @@ tracesys:
 	 * in the saved PSW.
 	 */
 	ldo     -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1      /* get task ptr */
-	LDREG	0(%r1), %r1
+	LDREG	TI_TASK(%r1), %r1
 	ssm	0,%r2
 	STREG	%r2,TASK_PT_PSW(%r1)		/* Lower 8 bits only!! */
 	mfsp	%sr0,%r2
@@ -255,7 +249,7 @@ tracesys_next:	
 	ldo     R%sys_call_table(%r1), %r19
 
 	ldo     -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1      /* get task ptr */
-	LDREG	0(%r1), %r1
+	LDREG	TI_TASK(%r1), %r1
 	LDREG   TASK_PT_GR20(%r1), %r20
 	LDREG   TASK_PT_GR26(%r1), %r26		/* Restore the users args */
 	LDREG   TASK_PT_GR25(%r1), %r25
@@ -292,14 +286,14 @@ tracesys_next:	
 	
 tracesys_exit:
 	ldo     -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1      /* get task ptr */
-	LDREG	0(%r1), %r1
+	LDREG	TI_TASK(%r1), %r1
 #ifdef __LP64__
 	ldo	-16(%r30),%r29			/* Reference param save area */
 #endif
 	bl	syscall_trace, %r2
 	STREG   %r28,TASK_PT_GR28(%r1)          /* save return value now */
 	ldo     -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1      /* get task ptr */
-	LDREG	0(%r1), %r1
+	LDREG	TI_TASK(%r1), %r1
 	LDREG   TASK_PT_GR28(%r1), %r28		/* Restore return val. */
 
 	ldil	L%syscall_exit,%r1
@@ -609,11 +603,31 @@ sys_call_table:
 #else
 	ENTRY_SAME(ni_syscall)
 	ENTRY_SAME(ni_syscall)
-	ENTRY_SAME(ni_syscall)
+	ENTRY_SAME(ni_syscall)		/* 205 */
 #endif
 	ENTRY_SAME(gettid)             
 	ENTRY_SAME(readahead)          
 	ENTRY_SAME(ni_syscall)		/* tkill */
+
+	ENTRY_DIFF(sendfile64)
+	ENTRY_SAME(futex)		/* 210 */
+	ENTRY_SAME(sched_setaffinity)
+	ENTRY_SAME(sched_getaffinity)
+	ENTRY_SAME(set_thread_area)
+	ENTRY_SAME(get_thread_area)
+	ENTRY_SAME(io_setup)		/* 215 */
+	ENTRY_SAME(io_destroy)
+	ENTRY_SAME(io_getevents)
+	ENTRY_SAME(io_submit)
+	ENTRY_SAME(io_cancel)
+	ENTRY_SAME(alloc_hugepages)	/* 220 */
+	ENTRY_SAME(free_hugepages)
+	ENTRY_SAME(exit_group)
+	ENTRY_SAME(lookup_dcookie)
+	ENTRY_SAME(epoll_create)
+	ENTRY_SAME(epoll_ctl)		/* 225 */
+	ENTRY_SAME(epoll_wait)
+ 	ENTRY_SAME(remap_file_pages)
 .end
 
 	/* Make sure nothing else is placed on this page */
diff -urpNX build-tools/dontdiff linus-2.5/arch/parisc/kernel/traps.c parisc-2.5/arch/parisc/kernel/traps.c
--- linus-2.5/arch/parisc/kernel/traps.c	Thu Oct 31 17:33:20 2002
+++ parisc-2.5/arch/parisc/kernel/traps.c	Mon Nov 11 10:44:07 2002
@@ -228,6 +228,9 @@ void die_if_kernel(char *str, struct pt_
 "                  U  ||----w |\n"
 "                     ||     ||\n");
 
+
+	printk("%s(%d): %s\n", current->comm, current->pid, str);
+
 	if (user_mode(regs)) {
 #ifdef PRINT_USER_FAULTS
 		if (err == 0)
diff -urpNX build-tools/dontdiff linus-2.5/arch/parisc/kernel/unaligned.c parisc-2.5/arch/parisc/kernel/unaligned.c
--- linus-2.5/arch/parisc/kernel/unaligned.c	Thu Oct 31 10:27:07 2002
+++ parisc-2.5/arch/parisc/kernel/unaligned.c	Wed Nov 27 09:13:35 2002
@@ -1,5 +1,4 @@
-/*    $Id: unaligned.c,v 1.1 2002/07/20 16:27:06 rhirst Exp $
- *
+/* 
  *    Unaligned memory access handler
  *
  *    Copyright (C) 2001 Randolph Chung <tausq@debian.org>
@@ -108,7 +107,7 @@
 #define OPCODE_STW_L    OPCODE4(0x1A)
 #define OPCODE_STW_L2   OPCODE4(0x1B)
 
-
+int unaligned_enabled = 1;
 
 void die_if_kernel (char *str, struct pt_regs *regs, long err);
 
@@ -281,6 +280,9 @@ void handle_unaligned(struct pt_regs *re
 		}
 	}
 
+	if (!unaligned_enabled)
+		goto force_sigbus;
+
 	/* TODO: make this cleaner... */
 	switch (regs->iir & OPCODE1_MASK)
 	{
@@ -368,7 +370,7 @@ void handle_unaligned(struct pt_regs *re
 	{
 		printk(KERN_CRIT "Unaligned handler failed, ret = %d\n", ret);
 		die_if_kernel("Unaligned data reference", regs, 28);
-
+force_sigbus:
 		/* couldn't handle it ... */
 		si.si_signo = SIGBUS;
 		si.si_errno = 0;
@@ -432,3 +434,4 @@ check_unaligned(struct pt_regs *regs)
 
 	return (int)(regs->ior & align_mask);
 }
+
diff -urpNX build-tools/dontdiff linus-2.5/drivers/parisc/Kconfig parisc-2.5/drivers/parisc/Kconfig
--- linus-2.5/drivers/parisc/Kconfig	Mon Nov 11 12:48:13 2002
+++ parisc-2.5/drivers/parisc/Kconfig	Fri Nov 15 08:40:36 2002
@@ -60,6 +67,8 @@ config PCI
 	  Beware that some GSC cards have a Dino onboard and PCI inside them,
 	  so it may be safest to say "Y" anyway.
 
+source "drivers/pci/Kconfig"
+
 config GSC_DINO
 	bool "GSCtoPCI/Dino PCI support"
 	depends on PCI && GSC
@@ -82,22 +91,21 @@ config PCI_LBA
 config IOSAPIC
 	bool
 	depends on PCI_LBA
-	default y
+	default PCI_LBA
 
 config IOMMU_SBA
 	bool
 	depends on PCI_LBA
-	default y
-
-source "drivers/pci/Kconfig"
+	default PCI_LBA
 
 #config PCI_EPIC
 #	bool "EPIC/SAGA PCI support"
 #	depends on PCI
 
 config SUPERIO
-	bool
+	bool "SuperIO (SuckyIO) support"
 	depends on PCI
+	default y
 	help
 	  Say Y here to support the SuperIO chip found in Bxxxx, C3xxx and
 	  J5xxx+ machines. This enables IDE, Floppy, Parallel Port, and
@@ -105,6 +113,7 @@ config SUPERIO
 
 config CHASSIS_LCD_LED
 	bool "Chassis LCD and LED support"
+	default y
 	help
 	  Say Y here if you want to enable support for the Heartbeat,
 	  Disk/Network activities LEDs on some PA-RISC machines,
diff -urpNX build-tools/dontdiff linus-2.5/drivers/parisc/ccio-dma.c parisc-2.5/drivers/parisc/ccio-dma.c
--- linus-2.5/drivers/parisc/ccio-dma.c	Fri Nov 29 08:30:56 2002
+++ parisc-2.5/drivers/parisc/ccio-dma.c	Fri Nov 29 08:30:56 2002
@@ -607,8 +607,6 @@ ccio_dma_supported(struct pci_dev *dev, 
 		return 0;
 	}
 
-	dev->dma_mask = mask;   /* save it */
-
 	/* only support 32-bit devices (ie PCI/GSC) */
 	return (int)(mask == 0xffffffffUL);
 }
diff -urpNX build-tools/dontdiff linus-2.5/drivers/parisc/ccio-rm-dma.c parisc-2.5/drivers/parisc/ccio-rm-dma.c
--- linus-2.5/drivers/parisc/ccio-rm-dma.c	Mon Nov 11 12:48:13 2002
+++ parisc-2.5/drivers/parisc/ccio-rm-dma.c	Wed Nov 27 09:14:02 2002
@@ -74,8 +74,6 @@ static int ccio_dma_supported( struct pc
 		return(0);
 	}
 
-	dev->dma_mask = mask;   /* save it */
-
 	/* only support 32-bit devices (ie PCI/GSC) */
 	return((int) (mask >= 0xffffffffUL));
 }
diff -urpNX build-tools/dontdiff linus-2.5/drivers/parisc/dino.c parisc-2.5/drivers/parisc/dino.c
--- linus-2.5/drivers/parisc/dino.c	Fri Nov 29 08:30:56 2002
+++ parisc-2.5/drivers/parisc/dino.c	Fri Nov 29 08:30:56 2002
@@ -498,7 +498,7 @@ dino_card_setup(struct pci_bus *bus, uns
 	}
 	gsc_writel(1 << i, base_addr + DINO_IO_ADDR_EN);
 
-	pcibios_assign_unassigned_resources(bus);
+	pbus_assign_resources(bus);
 }
 
 static void __init
diff -urpNX build-tools/dontdiff linus-2.5/drivers/parisc/lba_pci.c parisc-2.5/drivers/parisc/lba_pci.c
--- linus-2.5/drivers/parisc/lba_pci.c	Mon Nov 11 12:48:14 2002
+++ parisc-2.5/drivers/parisc/lba_pci.c	Mon Nov 11 13:28:48 2002
@@ -1431,8 +1431,8 @@ lba_driver_callback(struct parisc_device
 #ifdef __LP64__
 	if (is_pdc_pat()) {
 		/* assign resources to un-initialized devices */
-		DBG_PAT("LBA pcibios_assign_unassigned_resources()\n");
-		pcibios_assign_unassigned_resources(lba_bus);
+		DBG_PAT("LBA pbus_assign_resources()\n");
+		pbus_assign_resources(lba_bus);
 
 #ifdef DEBUG_LBA_PAT
 		DBG_PAT("\nLBA PIOP resource tree\n");
diff -urpNX build-tools/dontdiff linus-2.5/drivers/parisc/led.c parisc-2.5/drivers/parisc/led.c
--- linus-2.5/drivers/parisc/led.c	Fri Nov 29 08:30:56 2002
+++ parisc-2.5/drivers/parisc/led.c	Fri Nov 29 08:30:56 2002
@@ -404,7 +404,7 @@ static void led_get_diskio_stats(int add
 	int major, disk, total;
 	
 	total = 0;
-#ifdef 0
+#if 0
 	/*
 	 * this section will no longer work in 2.5, as we no longer
 	 * have either kstat.dk_drive nor DK_MAX_*.  It can probably
diff -urpNX build-tools/dontdiff linus-2.5/drivers/parisc/power.c parisc-2.5/drivers/parisc/power.c
--- linus-2.5/drivers/parisc/power.c	Fri Nov 29 08:30:56 2002
+++ parisc-2.5/drivers/parisc/power.c	Fri Nov 29 08:30:56 2002
@@ -44,8 +44,6 @@
 #include <linux/reboot.h>
 #include <linux/sched.h>
 #include <linux/interrupt.h>
-#include <linux/proc_fs.h>
-#include <linux/ctype.h>
 #include <linux/workqueue.h>
 
 #include <asm/pdc.h>
@@ -142,11 +140,7 @@ static void process_shutdown(void)
 DECLARE_TASKLET_DISABLED(power_tasklet, NULL, 0);
 
 /* soft power switch enabled/disabled */
-#ifdef CONFIG_PROC_FS
-static int pwrsw_enabled = 1;
-#else
-#define pwrsw_enabled (1)
-#endif
+int pwrsw_enabled = 1;
 
 /*
  * On gecko style machines (e.g. 712/xx and 715/xx) 
@@ -207,90 +201,6 @@ static void powerfail_interrupt(int code
 
 
 
-/* 
- * /proc filesystem support 
- */
-
-#ifdef CONFIG_SYSCTL
-static int power_proc_read(char *page, char **start, off_t off, int count, 
-	int *eof, void *data)
-{
-	char *out = page;
-	int len;
-
-	out += sprintf(out, "Software power switch support: ");
-	out += sprintf(out, pwrsw_enabled ? "enabled (1)" : "disabled (0)" );
-	out += sprintf(out, "\n");
-
-	len = out - page - off;
-	if (len < count) {
-		*eof = 1;
-		if (len <= 0) return 0;
-	} else {
-		len = count;
-	}
-	*start = page + off;
-	return len;
-}
-
-static int power_proc_write(struct file *file, const char *buf, 
-	unsigned long count, void *data)
-{
-	char *cur, lbuf[count];
-
-	if (!capable(CAP_SYS_ADMIN))
-		return -EACCES;
-
-	memset(lbuf, 0, count);
-
-	copy_from_user(lbuf, buf, count);
-	cur = lbuf;
-
-	/* skip initial spaces */
-	while (*cur && isspace(*cur))
-		cur++;
-
-	switch (*cur) {
-	case '0':	pwrsw_enabled = 0;
-			break;
-	case '1':	pwrsw_enabled = 1;
-			break;
-	default:	printk(KERN_CRIT "/proc/" SYSCTL_FILENAME 
-					": Parse error: only '0' or '1' allowed!\n");
-			return -EINVAL;
-	} /* switch() */
-
-	return count;
-}
-
-static struct proc_dir_entry *ent;
-
-static void __init power_create_procfs(void)
-{
-	if (!power_tasklet.func)
-		return;
-	
-	ent = create_proc_entry(SYSCTL_FILENAME, S_IFREG|S_IRUGO|S_IWUSR, 0);
-	if (!ent) return;
-	
-	ent->nlink = 1;
-	ent->read_proc = power_proc_read;
-	ent->write_proc = power_proc_write;
-	ent->owner = THIS_MODULE;
-}
-
-static void __exit power_remove_procfs(void)
-{
-	remove_proc_entry(SYSCTL_FILENAME, NULL);
-}
-
-#else
-#define power_create_procfs()	do { } while (0)
-#define power_remove_procfs()	do { } while (0)
-#endif	/* CONFIG_SYSCTL */
-
-
-
 /* parisc_panic_event() is called by the panic handler.
  * As soon as a panic occurs, our tasklets above will not be
  * executed any longer. This function then re-enables the 
@@ -344,7 +254,6 @@ static int __init power_init(void)
 	/* Register a call for panic conditions. */
 	notifier_chain_register(&panic_notifier_list, &parisc_panic_block);
 
-	power_create_procfs();
 	tasklet_enable(&power_tasklet);
 
 	return 0;
@@ -357,7 +266,6 @@ static void __exit power_exit(void)
 
 	tasklet_disable(&power_tasklet);
 	notifier_chain_unregister(&panic_notifier_list, &parisc_panic_block);
-	power_remove_procfs();
 	power_tasklet.func = NULL;
 	pdc_soft_power_button(0);
 }
diff -urpNX build-tools/dontdiff linus-2.5/drivers/parisc/sba_iommu.c parisc-2.5/drivers/parisc/sba_iommu.c
--- linus-2.5/drivers/parisc/sba_iommu.c	Mon Nov 11 12:48:14 2002
+++ parisc-2.5/drivers/parisc/sba_iommu.c	Wed Nov 27 09:14:02 2002
@@ -811,10 +811,8 @@ sba_dma_supported( struct pci_dev *dev, 
 		return(0);
 	}
 
-	dev->dma_mask = mask;	/* save it */
-
 	/* only support 32-bit PCI devices - no DAC support (yet) */
-	return((int) (mask == 0xffffffff));
+	return((int) (mask == 0xffffffffUL));
 }
 
 
diff -urpNX build-tools/dontdiff linus-2.5/drivers/parisc/superio.c parisc-2.5/drivers/parisc/superio.c
--- linus-2.5/drivers/parisc/superio.c	Mon Nov 11 12:48:14 2002
+++ parisc-2.5/drivers/parisc/superio.c	Tue Nov 12 09:51:14 2002
@@ -390,7 +390,7 @@ int superio_fixup_irq(struct pci_dev *pc
 void __devinit
 superio_serial_init(void)
 {
-#ifdef CONFIG_SERIAL
+#ifdef CONFIG_SERIAL_8250
 	struct serial_struct *serial;
 	int retval;
 	
@@ -443,7 +443,7 @@ superio_serial_init(void)
 	retval = register_serial(serial);
 	if (retval < 0)
 		printk(KERN_WARNING "SuperIO: Register Serial #1 failed.\n");
-#endif /* CONFIG_SERIAL */
+#endif /* CONFIG_SERIAL_8250 */
 }
 
 EXPORT_SYMBOL(superio_serial_init);
@@ -504,7 +504,7 @@ static int __devinit superio_probe(struc
 #ifdef CONFIG_PARPORT_PC
 		superio_parport_init();
 #endif
-#ifdef CONFIG_SERIAL
+#ifdef CONFIG_SERIAL_8250
 		superio_serial_init();
 #endif
 		/* REVISIT : superio_fdc_init() ? */
diff -urpNX build-tools/dontdiff linus-2.5/include/asm-parisc/assembly.h parisc-2.5/include/asm-parisc/assembly.h
--- linus-2.5/include/asm-parisc/assembly.h	Thu Oct 31 17:36:40 2002
+++ parisc-2.5/include/asm-parisc/assembly.h	Wed Nov 27 09:14:29 2002
@@ -105,10 +105,12 @@
 #define LDREG   ldd
 #define STREG   std
 #define RP_OFFSET	16
+#define FRAME_SIZE	128
 #else
 #define LDREG   ldw
 #define STREG   stw
 #define RP_OFFSET	20
+#define FRAME_SIZE	64
 #endif
 
 	.macro loadgp
diff -urpNX build-tools/dontdiff linus-2.5/include/asm-parisc/cache.h parisc-2.5/include/asm-parisc/cache.h
--- linus-2.5/include/asm-parisc/cache.h	Thu Oct 31 17:36:40 2002
+++ parisc-2.5/include/asm-parisc/cache.h	Wed Nov 27 09:14:29 2002
@@ -18,8 +18,10 @@
  */
 #ifdef CONFIG_PA20
 #define L1_CACHE_BYTES 64
+#define LA_CACHE_SHIFT 6
 #else
 #define L1_CACHE_BYTES 32
+#define L1_CACHE_SHIFT 5
 #endif
 
 #define L1_CACHE_ALIGN(x)       (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))
diff -urpNX build-tools/dontdiff linus-2.5/include/asm-parisc/dma.h parisc-2.5/include/asm-parisc/dma.h
--- linus-2.5/include/asm-parisc/dma.h	Tue Nov  5 11:19:10 2002
+++ parisc-2.5/include/asm-parisc/dma.h	Thu Nov 14 10:13:48 2002
@@ -30,7 +30,6 @@
 */
 #define MAX_DMA_ADDRESS (~0UL)
 
-
 /*
 ** We don't have DMA channels... well V-class does but the
 ** Dynamic DMA Mapping interface will support them... right? :^)
@@ -129,6 +128,9 @@ static __inline__ void disable_dma(unsig
 		dma_outb((dmanr & 3) | 4,  DMA2_MASK_REG);
 #endif
 }
+
+/* reserve a DMA channel */
+#define request_dma(dmanr, device_id)	(0)
 
 /* Clear the 'DMA Pointer Flip Flop'.
  * Write 0 for LSB/MSB, 1 for MSB/LSB access.
diff -urpNX build-tools/dontdiff linus-2.5/include/asm-parisc/ide.h parisc-2.5/include/asm-parisc/ide.h
--- linus-2.5/include/asm-parisc/ide.h	Thu Oct 31 17:36:40 2002
+++ parisc-2.5/include/asm-parisc/ide.h	Wed Nov 27 09:14:29 2002
@@ -84,13 +84,6 @@ static __inline__ void ide_init_default_
 #define ide_request_region(from,extent,name)	request_region((from), (extent), (name))
 #define ide_release_region(from,extent)		release_region((from), (extent))
 
-/*
- * The following are not needed for the non-m68k ports
- */
-#define ide_ack_intr(hwif)		(1)
-#define ide_release_lock(lock)		do {} while (0)
-#define ide_get_lock(lock, hdlr, data)	do {} while (0)
-
 #endif /* __KERNEL__ */
 
 #endif /* __ASM_PARISC_IDE_H */
diff -urpNX build-tools/dontdiff linus-2.5/include/asm-parisc/keyboard.h parisc-2.5/include/asm-parisc/keyboard.h
--- linus-2.5/include/asm-parisc/keyboard.h	Thu Oct 31 10:28:22 2002
+++ parisc-2.5/include/asm-parisc/keyboard.h	Fri Nov  8 06:06:45 2002
@@ -28,7 +28,6 @@
 #include <linux/config.h>
 
 #ifdef __KERNEL__
-#ifdef CONFIG_VT
 
 #include <linux/kernel.h>
 #include <linux/kd.h>
@@ -56,18 +55,11 @@ extern struct kbd_ops {
 	void (*init_hw)(void);
 
 	/* Keyboard driver resource allocation  */
-	void (*kbd_request_region)(void);
 	int (*kbd_request_irq)(void (*handler)(int, void *, struct pt_regs *));
 
-	/* Methods to access the keyboard processor's I/O registers  */
-	unsigned char (*kbd_read_input)(void);
-	void (*kbd_write_output)(unsigned char val);
-	void (*kbd_write_command)(unsigned char val);
-	unsigned char (*kbd_read_status)(void);
-
 	unsigned char sysrq_key;
 	unsigned char *sysrq_xlate;
-} *kbd_ops;
+} kbd_ops;
 
 #define kbd_setkeycode		(*kbd_ops->setkeycode)
 #define kbd_getkeycode		(*kbd_ops->getkeycode)
@@ -80,19 +72,12 @@ extern struct kbd_ops {
 #define	kbd_sysrq_xlate		(kbd_ops->sysrq_xlate)
 
 /* Do the actual calls via kbd_ops vector  */
-#define kbd_request_region() 	kbd_ops->kbd_request_region()
 #define kbd_request_irq(handler) kbd_ops->kbd_request_irq(handler)
-#define kbd_read_input() 	kbd_ops->kbd_read_input()
-#define kbd_write_output(val) 	kbd_ops->kbd_write_output(val)
-#define kbd_write_command(val) 	kbd_ops->kbd_write_command(val)
-#define kbd_read_status() 	kbd_ops->kbd_read_status()
 
 extern unsigned char hp_ps2kbd_sysrq_xlate[128]; 	/* from drivers/char/hp_keyb.c */
 
 extern void unregister_kbd_ops(void);
 extern void register_kbd_ops(struct kbd_ops *ops);
-
-#endif /* CONFIG_VT */
 
 #endif /* __KERNEL__ */
 
diff -urpNX build-tools/dontdiff linus-2.5/include/asm-parisc/pci.h parisc-2.5/include/asm-parisc/pci.h
--- linus-2.5/include/asm-parisc/pci.h	Thu Oct 31 17:36:40 2002
+++ parisc-2.5/include/asm-parisc/pci.h	Mon Nov 11 13:29:15 2002
@@ -243,7 +243,6 @@ extern struct pci_hba_data *parisc_pci_h
 #ifdef CONFIG_PCI
 extern void pcibios_register_hba(struct pci_hba_data *);
 extern void pcibios_set_master(struct pci_dev *);
-extern void pcibios_assign_unassigned_resources(struct pci_bus *);
 #else
 extern inline void pcibios_register_hba(struct pci_hba_data *x)
 {
diff -urpNX build-tools/dontdiff linus-2.5/include/asm-parisc/processor.h parisc-2.5/include/asm-parisc/processor.h
--- linus-2.5/include/asm-parisc/processor.h	Tue Nov  5 11:19:10 2002
+++ parisc-2.5/include/asm-parisc/processor.h	Sun Nov 10 13:59:06 2002
@@ -140,10 +140,7 @@ struct thread_struct {
  * Return saved PC of a blocked thread.  This is used by ps mostly.
  */
 
-static inline unsigned long thread_saved_pc(struct task_struct *t)
-{
-	return 0xabcdef;
-}
+unsigned long thread_saved_pc(struct task_struct *t);
 
 /*
  * Start user thread in another space.
diff -urpNX build-tools/dontdiff linus-2.5/include/asm-parisc/thread_info.h parisc-2.5/include/asm-parisc/thread_info.h
--- linus-2.5/include/asm-parisc/thread_info.h	Thu Oct 31 10:28:22 2002
+++ parisc-2.5/include/asm-parisc/thread_info.h	Wed Nov 27 09:14:30 2002
@@ -60,9 +60,6 @@ struct thread_info {
 #define TIF_POLLING_NRFLAG	4	/* true if poll_idle() is polling TIF_NEED_RESCHED */
 #define TIF_32BIT               5       /* 32 bit binary */
 
-#define TIF_WORK_MASK		0x7	/* like TIF_ALLWORK_BITS but sans TIF_SYSCALL_TRACE */
-#define TIF_ALLWORK_MASK	0xf	/* bits 0..3 are "work to do on user-return" bits */
-
 #define _TIF_SYSCALL_TRACE	(1 << TIF_SYSCALL_TRACE)
 #define _TIF_NOTIFY_RESUME	(1 << TIF_NOTIFY_RESUME)
 #define _TIF_SIGPENDING		(1 << TIF_SIGPENDING)
diff -urpNX build-tools/dontdiff linus-2.5/include/asm-parisc/uaccess.h parisc-2.5/include/asm-parisc/uaccess.h
--- linus-2.5/include/asm-parisc/uaccess.h	Thu Oct 31 17:36:40 2002
+++ parisc-2.5/include/asm-parisc/uaccess.h	Sun Nov 10 13:59:06 2002
@@ -37,8 +37,8 @@
 #if BITS_PER_LONG == 32
 #define LDD_KERNEL(ptr)		BUG()
 #define LDD_USER(ptr)		BUG()
-#define STD_KERNEL(x, ptr) __put_kernel_asm64(x,ptr)
-#define STD_USER(x, ptr) __put_user_asm64(x,ptr)
+#define STD_KERNEL(x, ptr) __put_kernel_asm64((u32)x,ptr)
+#define STD_USER(x, ptr) __put_user_asm64((u32)x,ptr)
 #else
 #define LDD_KERNEL(ptr) __get_kernel_asm("ldd",ptr)
 #define LDD_USER(ptr) __get_user_asm("ldd",ptr)
diff -urpNX build-tools/dontdiff linus-2.5/include/asm-parisc/unistd.h parisc-2.5/include/asm-parisc/unistd.h
--- linus-2.5/include/asm-parisc/unistd.h	Thu Oct 31 17:36:40 2002
+++ parisc-2.5/include/asm-parisc/unistd.h	Wed Nov 27 09:14:30 2002
@@ -701,8 +701,28 @@
 #define __NR_gettid             (__NR_Linux + 206)
 #define __NR_readahead          (__NR_Linux + 207)
 #define __NR_tkill		(__NR_Linux + 208)
+#define __NR_sendfile64		(__NR_Linux + 209)
+#define __NR_futex		(__NR_Linux + 210)
+#define __NR_sched_setaffinity	(__NR_Linux + 211)
+#define __NR_sched_getaffinity	(__NR_Linux + 212)
+#define __NR_set_thread_area	(__NR_Linux + 213)
+#define __NR_get_thread_area	(__NR_Linux + 214)
+#define __NR_io_setup		(__NR_Linux + 215)
+#define __NR_io_destroy		(__NR_Linux + 216)
+#define __NR_io_getevents	(__NR_Linux + 217)
+#define __NR_io_submit		(__NR_Linux + 218)
+#define __NR_io_cancel		(__NR_Linux + 219)
+#define __NR_alloc_hugepages	(__NR_Linux + 220)
+#define __NR_free_hugepages	(__NR_Linux + 221)
+#define __NR_exit_group		(__NR_Linux + 222)
+#define __NR_lookup_dcookie	(__NR_Linux + 223)
+#define __NR_epoll_create	(__NR_Linux + 224)
+#define __NR_epoll_ctl		(__NR_Linux + 225)
+#define __NR_epoll_wait		(__NR_Linux + 226)
+#define __NR_remap_file_pages	(__NR_Linux + 227)
 
-#define __NR_Linux_syscalls     208
+
+#define __NR_Linux_syscalls     228
 
 #define HPUX_GATEWAY_ADDR       0xC0000004
 #define LINUX_GATEWAY_ADDR      0x100
diff -urpNX build-tools/dontdiff linus-2.5/include/linux/input.h parisc-2.5/include/linux/input.h
--- linus-2.5/include/linux/input.h	Fri Nov 29 08:32:16 2002
+++ parisc-2.5/include/linux/input.h	Fri Nov 29 08:32:16 2002
@@ -581,6 +581,7 @@ struct input_absinfo {
 #define BUS_ADB			0x17
 #define BUS_I2C			0x18
 #define BUS_HOST		0x19
+#define BUS_GSC			0x1A
 
 /*
  * Values describing the status of an effect
diff -urpNX build-tools/dontdiff linus-2.5/include/linux/sysctl.h parisc-2.5/include/linux/sysctl.h
--- linus-2.5/include/linux/sysctl.h	Mon Nov 11 12:48:58 2002
+++ parisc-2.5/include/linux/sysctl.h	Wed Nov 27 09:14:36 2002
@@ -129,6 +129,8 @@ enum
 	KERN_CADPID=54,		/* int: PID of the process to notify on CAD */
 	KERN_PIDMAX=55,		/* int: PID # limit */
   	KERN_CORE_PATTERN=56,	/* string: pattern for core-file names */
+	KERN_HPPA_PWRSW=57,	/* int: hppa soft-power enable */
+	KERN_HPPA_UNALIGNED=58,	/* int: hppa unaligned-trap enable */
 };
 
 
diff -urpNX build-tools/dontdiff linus-2.5/include/video/fbcon.h parisc-2.5/include/video/fbcon.h
--- linus-2.5/include/video/fbcon.h	Fri Aug 30 10:22:06 2002
+++ parisc-2.5/include/video/fbcon.h	Fri Aug 30 14:00:43 2002
@@ -199,7 +199,7 @@ extern int set_all_vcs(int fbidx, struct
 #define fb_writel sbus_writel
 #define fb_memset sbus_memset_io
 
-#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__)
+#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__)
 
 #define fb_readb __raw_readb
 #define fb_readw __raw_readw
diff -urpNX build-tools/dontdiff linus-2.5/kernel/sysctl.c parisc-2.5/kernel/sysctl.c
--- linus-2.5/kernel/sysctl.c	Mon Nov 11 12:49:02 2002
+++ parisc-2.5/kernel/sysctl.c	Wed Nov 27 09:14:40 2002
@@ -82,6 +82,11 @@ extern char reboot_command [];
 extern int stop_a_enabled;
 #endif
 
+#ifdef __hppa__
+extern int pwrsw_enabled;
+extern int unaligned_enabled;
+#endif
+
 #ifdef CONFIG_ARCH_S390
 #ifdef CONFIG_MATHEMU
 extern int sysctl_ieee_emulation_warnings;
@@ -186,6 +191,12 @@ static ctl_table kern_table[] = {
 	{KERN_SPARC_REBOOT, "reboot-cmd", reboot_command,
 	 256, 0644, NULL, &proc_dostring, &sysctl_string },
 	{KERN_SPARC_STOP_A, "stop-a", &stop_a_enabled, sizeof (int),
+	 0644, NULL, &proc_dointvec},
+#endif
+#ifdef __hppa__
+	{KERN_HPPA_PWRSW, "soft-power", &pwrsw_enabled, sizeof (int),
+	 0644, NULL, &proc_dointvec},
+	{KERN_HPPA_UNALIGNED, "unaligned-trap", &unaligned_enabled, sizeof (int),
 	 0644, NULL, &proc_dointvec},
 #endif
 #if defined(CONFIG_PPC32) && defined(CONFIG_6xx)
