## Automatically generated incremental diff
## From:   linux-2.4.22-pre10
## To:     linux-2.4.22-rc1
## Robot:  $Id: make-incremental-diff,v 1.11 2002/02/20 02:59:33 hpa Exp $

diff -urN linux-2.4.22-pre10/Documentation/devices.txt linux-2.4.22-rc1/Documentation/devices.txt
--- linux-2.4.22-pre10/Documentation/devices.txt	2003-08-05 11:40:46.000000000 -0700
+++ linux-2.4.22-rc1/Documentation/devices.txt	2003-08-05 11:40:57.000000000 -0700
@@ -384,7 +384,7 @@
 		180 = /dev/vrbuttons	Vr41xx button input device
 		181 = /dev/toshiba	Toshiba laptop SMM support
 		182 = /dev/perfctr	Performance-monitoring counters
-		183 = /dev/intel_rng	Intel i8x0 random number generator
+		183 = /dev/hwrandom	Hardware random number generator (RNG)
 		184 = /dev/cpu/microcode CPU microcode update interface
 		186 = /dev/atomicps	Atomic shapshot of process state data
 		187 = /dev/irnet	IrNET device
diff -urN linux-2.4.22-pre10/Documentation/i810_rng.txt linux-2.4.22-rc1/Documentation/i810_rng.txt
--- linux-2.4.22-pre10/Documentation/i810_rng.txt	2003-06-13 07:51:29.000000000 -0700
+++ linux-2.4.22-rc1/Documentation/i810_rng.txt	2003-08-05 11:40:57.000000000 -0700
@@ -10,7 +10,7 @@
 
 	In order to make effective use of this device driver, you
 	should download the support software as well.  Download the
-	latest version of the "intel-rng-tools" package from the
+	latest version of the "rng-tools" package from the
 	i810_rng driver's official Web site:
 
 		http://sourceforge.net/projects/gkernel/
@@ -36,7 +36,7 @@
 	a security-conscious person would run fitness tests on the
 	data before assuming it is truly random.
 
-	/dev/intel_rng is char device major 10, minor 183.
+	/dev/hwrandom is char device major 10, minor 183.
 
 Driver notes:
 
diff -urN linux-2.4.22-pre10/Makefile linux-2.4.22-rc1/Makefile
--- linux-2.4.22-pre10/Makefile	2003-08-05 11:40:46.000000000 -0700
+++ linux-2.4.22-rc1/Makefile	2003-08-05 11:40:57.000000000 -0700
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 22
-EXTRAVERSION = -pre10
+EXTRAVERSION = -rc1
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff -urN linux-2.4.22-pre10/arch/i386/kernel/setup.c linux-2.4.22-rc1/arch/i386/kernel/setup.c
--- linux-2.4.22-pre10/arch/i386/kernel/setup.c	2003-08-05 11:40:47.000000000 -0700
+++ linux-2.4.22-rc1/arch/i386/kernel/setup.c	2003-08-05 11:40:57.000000000 -0700
@@ -128,6 +128,7 @@
 struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, -1, 1, 0, 0, -1 };
 
 unsigned long mmu_cr4_features;
+EXPORT_SYMBOL(mmu_cr4_features);
 
 /*
  * Bus types ..
diff -urN linux-2.4.22-pre10/arch/sh/kernel/pci-sh7751.c linux-2.4.22-rc1/arch/sh/kernel/pci-sh7751.c
--- linux-2.4.22-pre10/arch/sh/kernel/pci-sh7751.c	2003-08-05 11:40:48.000000000 -0700
+++ linux-2.4.22-rc1/arch/sh/kernel/pci-sh7751.c	2003-08-05 11:40:58.000000000 -0700
@@ -200,8 +200,10 @@
 	unsigned int tmp, id;
 
 	/* check for SH7751 hardware */
-	id = (SH7751_DEVICE_ID << 16) | SH7751_VENDOR_ID;
-	if(inl(SH7751_PCIREG_BASE+SH7751_PCICONF0) != id) {
+	id = inl(SH7751_PCIREG_BASE + SH7751_PCICONF0);
+
+	if ((id != ((SH7751_DEVICE_ID << 16) | SH7751_VENDOR_ID)) &&
+	    (id != ((SH7751R_DEVICE_ID << 16) | SH7751_VENDOR_ID))) {
 		PCIDBG(2,"PCI: This is not an SH7751\n");
 		return NULL;
 	}
diff -urN linux-2.4.22-pre10/arch/sh/kernel/ptrace.c linux-2.4.22-rc1/arch/sh/kernel/ptrace.c
--- linux-2.4.22-pre10/arch/sh/kernel/ptrace.c	2003-08-05 11:40:48.000000000 -0700
+++ linux-2.4.22-rc1/arch/sh/kernel/ptrace.c	2003-08-05 11:40:58.000000000 -0700
@@ -71,6 +71,8 @@
 	/* bra & bsr */
 	if (nib[0] == 0xa || nib[0] == 0xb) {
 		*pc1 = regs->pc + 4 + ((short) ((inst & 0xfff) << 4) >> 3);
+		if(*pc1 == regs->pc + 2)
+			*pc1 = regs->pc + 4;
 		*pc2 = (unsigned long) -1;
 		return;
 	}
@@ -85,7 +87,12 @@
 	/* bt/s & bf/s */
 	if (nib[0] == 0x8 && (nib[1] == 0xd || nib[1] == 0xf)) {
 		*pc1 = regs->pc + 4 + ((char) (inst & 0xff) << 1);
-		*pc2 = regs->pc + 4;
+		if(*pc1 == regs->pc + 2) {
+			*pc1 = regs->pc + 4;
+			*pc2 = (unsigned long) -1;
+		}
+		else
+			*pc2 = regs->pc + 4;
 		return;
 	}
 
@@ -93,6 +100,8 @@
 	if (nib[0] == 0x4 && nib[3] == 0xb
 	    && (nib[2] == 0x0 || nib[2] == 0x2)) {
 		*pc1 = regs->regs[nib[1]];
+		if(*pc1 == regs->pc + 2)
+			*pc1 = regs->pc + 4;
 		*pc2 = (unsigned long) -1;
 		return;
 	}
@@ -101,12 +110,16 @@
 	if (nib[0] == 0x0 && nib[3] == 0x3
 	    && (nib[2] == 0x0 || nib[2] == 0x2)) {
 		*pc1 = regs->pc + 4 + regs->regs[nib[1]];
+		if(*pc1 == regs->pc + 2)
+			*pc1 = regs->pc + 4;
 		*pc2 = (unsigned long) -1;
 		return;
 	}
 
 	if (inst == 0x000b) {
 		*pc1 = regs->pr;
+		if(*pc1 == regs->pc + 2)
+			*pc1 = regs->pc + 4;
 		*pc2 = (unsigned long) -1;
 		return;
 	}
diff -urN linux-2.4.22-pre10/arch/sh/kernel/setup_snapgear.c linux-2.4.22-rc1/arch/sh/kernel/setup_snapgear.c
--- linux-2.4.22-pre10/arch/sh/kernel/setup_snapgear.c	2003-08-05 11:40:48.000000000 -0700
+++ linux-2.4.22-rc1/arch/sh/kernel/setup_snapgear.c	2003-08-05 11:40:58.000000000 -0700
@@ -17,7 +17,6 @@
 #include <linux/init.h>
 #include <linux/irq.h>
 #include <linux/timer.h>
-#include <linux/ledman.h>
 #include <linux/delay.h>
 #include <linux/module.h>
 #include <linux/sched.h>
diff -urN linux-2.4.22-pre10/arch/x86_64/kernel/setup.c linux-2.4.22-rc1/arch/x86_64/kernel/setup.c
--- linux-2.4.22-pre10/arch/x86_64/kernel/setup.c	2003-08-05 11:40:48.000000000 -0700
+++ linux-2.4.22-rc1/arch/x86_64/kernel/setup.c	2003-08-05 11:40:58.000000000 -0700
@@ -30,6 +30,7 @@
 #include <linux/blk.h>
 #include <linux/highmem.h>
 #include <linux/bootmem.h>
+#include <linux/module.h>
 #include <asm/processor.h>
 #include <linux/console.h>
 #include <linux/seq_file.h>
@@ -58,6 +59,7 @@
 };
 
 unsigned long mmu_cr4_features;
+EXPORT_SYMBOL(mmu_cr4_features);
 
 /* For PCI or other memory-mapped resources */
 unsigned long pci_mem_start = 0x10000000;
diff -urN linux-2.4.22-pre10/drivers/acpi/system.c linux-2.4.22-rc1/drivers/acpi/system.c
--- linux-2.4.22-pre10/drivers/acpi/system.c	2003-08-05 11:40:49.000000000 -0700
+++ linux-2.4.22-rc1/drivers/acpi/system.c	2003-08-05 11:40:58.000000000 -0700
@@ -59,6 +59,8 @@
 static int acpi_system_add (struct acpi_device *device);
 static int acpi_system_remove (struct acpi_device *device, int type);
 
+acpi_status acpi_suspend (u32 state);
+
 static struct acpi_driver acpi_system_driver = {
 	.name =		ACPI_SYSTEM_DRIVER_NAME,
 	.class =	ACPI_SYSTEM_CLASS,
diff -urN linux-2.4.22-pre10/drivers/char/n_tty.c linux-2.4.22-rc1/drivers/char/n_tty.c
--- linux-2.4.22-pre10/drivers/char/n_tty.c	2002-08-02 17:39:43.000000000 -0700
+++ linux-2.4.22-rc1/drivers/char/n_tty.c	2003-08-05 11:40:59.000000000 -0700
@@ -1238,7 +1238,8 @@
 		else
 			tty->minimum_to_wake = 1;
 	}
-	if (tty->driver.chars_in_buffer(tty) < WAKEUP_CHARS)
+	if (tty->driver.chars_in_buffer(tty) < WAKEUP_CHARS &&
+			tty->driver.write_room(tty) > 0)
 		mask |= POLLOUT | POLLWRNORM;
 	return mask;
 }
diff -urN linux-2.4.22-pre10/drivers/macintosh/mediabay.c linux-2.4.22-rc1/drivers/macintosh/mediabay.c
--- linux-2.4.22-pre10/drivers/macintosh/mediabay.c	2002-02-25 11:37:58.000000000 -0800
+++ linux-2.4.22-rc1/drivers/macintosh/mediabay.c	2003-08-05 11:40:59.000000000 -0700
@@ -109,7 +109,7 @@
 #ifdef CONFIG_BLK_DEV_IDE
 /* check the busy bit in the media-bay ide interface
    (assumes the media-bay contains an ide device) */
-#define MB_IDE_READY(i)	((inb(media_bays[i].cd_base + 0x70) & 0x80) == 0)
+#define MB_IDE_READY(i)	((readb(media_bays[i].cd_base + 0x70) & 0x80) == 0)
 #endif
 
 /* Note: All delays are not in milliseconds and converted to HZ relative
@@ -577,7 +577,8 @@
 				MBDBG("mediabay %d IDE ready\n", i);
 			}
 			break;
-	    	}
+	    	} else if (bay->timer > 0)
+	    		bay->timer--;
 	    	if (bay->timer == 0) {
 			printk("\nIDE Timeout in bay %d !\n", i);
 			MBDBG("mediabay%d: nIDE Timeout !\n", i);
@@ -756,7 +757,7 @@
 		struct media_bay_info* bay = &media_bays[n];
 		if (!np->parent || np->n_addrs == 0 || !request_OF_resource(np, 0, NULL)) {
 			np = np->next;
-			printk(KERN_ERR "media-bay: Can't request IO resource !\n");
+			printk(KERN_ERR "mediabay: Can't request IO resource !\n");
 			continue;
 		}
 		bay->mb_type = mb_ohare;
@@ -771,7 +772,7 @@
 			bay->mb_type = mb_ohare;
 			bay->ops = &ohare_mb_ops;
 		} else {
-			printk(KERN_ERR "mediabay: Unknown bay type !\n");
+			printk(KERN_ERR "media-bay: Unknown bay type !\n");
 			np = np->next;
 			continue;
 		}
@@ -782,7 +783,7 @@
 			MB_BIS(bay, KEYLARGO_MBCR, KL_MBCR_MB0_ENABLE);
 #ifdef MB_USE_INTERRUPTS
 		if (np->n_intrs == 0) {
-			printk(KERN_ERR "media bay %d has no irq\n",n);
+			printk(KERN_ERR "media-bay %d has no irq\n",n);
 			np = np->next;
 			continue;
 		}
@@ -823,8 +824,9 @@
 		pmu_register_sleep_notifier(&mb_sleep_notifier);
 #endif /* CONFIG_PMAC_PBOOK */
 
-		kernel_thread(media_bay_task, NULL,
-			      CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
+		if (kernel_thread(media_bay_task, NULL,
+			      CLONE_FS | CLONE_FILES | CLONE_SIGHAND) < 0)
+			printk(KERN_ERR "media-bay: Cannot create polling thread !\n");
 	}
 }
 
diff -urN linux-2.4.22-pre10/fs/ext3/file.c linux-2.4.22-rc1/fs/ext3/file.c
--- linux-2.4.22-pre10/fs/ext3/file.c	2002-11-28 15:53:15.000000000 -0800
+++ linux-2.4.22-rc1/fs/ext3/file.c	2003-08-05 11:41:00.000000000 -0700
@@ -61,7 +61,8 @@
 static ssize_t
 ext3_file_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
 {
-	int ret, err;
+	ssize_t ret;
+	int err;
 	struct inode *inode = file->f_dentry->d_inode;
 
 	ret = generic_file_write(file, buf, count, ppos);
diff -urN linux-2.4.22-pre10/fs/noquot.c linux-2.4.22-rc1/fs/noquot.c
--- linux-2.4.22-pre10/fs/noquot.c	2000-05-12 11:21:20.000000000 -0700
+++ linux-2.4.22-rc1/fs/noquot.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,15 +0,0 @@
-/* noquot.c: Quota stubs necessary for when quotas are not
- *           compiled into the kernel.
- */
-
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <linux/errno.h>
-
-int nr_dquots, nr_free_dquots;
-int max_dquots;
-
-asmlinkage long sys_quotactl(int cmd, const char *special, int id, caddr_t addr)
-{
-	return(-ENOSYS);
-}
diff -urN linux-2.4.22-pre10/include/asm-i386/hw_irq.h linux-2.4.22-rc1/include/asm-i386/hw_irq.h
--- linux-2.4.22-pre10/include/asm-i386/hw_irq.h	2003-08-05 11:40:53.000000000 -0700
+++ linux-2.4.22-rc1/include/asm-i386/hw_irq.h	2003-08-05 11:41:03.000000000 -0700
@@ -13,10 +13,8 @@
  */
 
 #include <linux/config.h>
-#include <linux/smp_lock.h>
 #include <asm/atomic.h>
 #include <asm/irq.h>
-#include <asm/current.h>
 
 /*
  * IDT vectors usable for external interrupt sources start
diff -urN linux-2.4.22-pre10/include/asm-sh/io.h linux-2.4.22-rc1/include/asm-sh/io.h
--- linux-2.4.22-pre10/include/asm-sh/io.h	2003-08-05 11:40:54.000000000 -0700
+++ linux-2.4.22-rc1/include/asm-sh/io.h	2003-08-05 11:41:05.000000000 -0700
@@ -133,6 +133,8 @@
 #  include <asm/io_shmse.h>
 # elif defined(CONFIG_SH_ADX)
 #  include <asm/io_adx.h>
+# elif defined(CONFIG_SH_SECUREEDGE5410)
+#  include <asm/io_snapgear.h>
 # elif defined(CONFIG_SH_UNKNOWN)
 #  include <asm/io_unknown.h>
 # else
diff -urN linux-2.4.22-pre10/include/asm-sh/irq.h linux-2.4.22-rc1/include/asm-sh/irq.h
--- linux-2.4.22-pre10/include/asm-sh/irq.h	2003-08-05 11:40:54.000000000 -0700
+++ linux-2.4.22-rc1/include/asm-sh/irq.h	2003-08-05 11:41:05.000000000 -0700
@@ -24,6 +24,9 @@
 #define INTC_IPRA	0xffd00004UL
 #define INTC_IPRB	0xffd00008UL
 #define INTC_IPRC	0xffd0000cUL
+#if defined(CONFIG_CPU_SUBTYPE_SH7751)
+# define INTC_IPRD	0xffd00010UL
+#endif
 #endif
 
 #define TIMER_IRQ	16
diff -urN linux-2.4.22-pre10/include/asm-sh/machvec.h linux-2.4.22-rc1/include/asm-sh/machvec.h
--- linux-2.4.22-pre10/include/asm-sh/machvec.h	2003-08-05 11:40:54.000000000 -0700
+++ linux-2.4.22-rc1/include/asm-sh/machvec.h	2003-08-05 11:41:05.000000000 -0700
@@ -80,6 +80,7 @@
 	unsigned int mv_hw_hs7729pci : 1;
 	unsigned int mv_hw_7751se: 1;
 	unsigned int mv_hw_adx : 1;
+	unsigned int mv_hw_snapgear : 1;
 };
 
 extern struct sh_machine_vector sh_mv;
@@ -100,6 +101,7 @@
 #define MACH_HS7729PCI	(sh_mv.mv_hw_hs7729pci)
 #define MACH_7751SE	(sh_mv.mv_hw_7751se)
 #define MACH_ADX	(sh_mv.mv_hw_adx)
+#define MACH_SNAPGEAR	(sh_mv.mv_snapgear)
 #else
 # ifdef CONFIG_SH_SOLUTION_ENGINE
 #  define MACH_SE		1
@@ -176,6 +178,11 @@
 # else
 #  define MACH_ADX		0
 # endif
+# ifdef CONFIG_SH_SECUREEDGE5410
+#  define MACH_SNAPGEAR		1
+# else
+#  define MACH_SNAPGEAR		0
+# endif
 #endif
 
 #endif /* _ASM_SH_MACHVEC_H */
diff -urN linux-2.4.22-pre10/include/asm-sh/mc146818rtc.h linux-2.4.22-rc1/include/asm-sh/mc146818rtc.h
--- linux-2.4.22-pre10/include/asm-sh/mc146818rtc.h	2001-06-27 13:55:29.000000000 -0700
+++ linux-2.4.22-rc1/include/asm-sh/mc146818rtc.h	2003-08-05 11:41:05.000000000 -0700
@@ -17,6 +17,15 @@
 #define CMOS_READ(addr)		__CMOS_READ(addr,b)
 #define CMOS_WRITE(val,addr)	__CMOS_WRITE(val,addr,b)
 
+#elif defined(CONFIG_SH_SECUREEDGE5410)
+#include <asm/io.h>
+
+#define RTC_PORT(n)             SECUREEDGE_IOPORT_ADDR
+#define CMOS_READ(addr)         secureedge5410_cmos_read(addr)
+#define CMOS_WRITE(val,addr)    secureedge5410_cmos_write(val,addr)
+extern unsigned char secureedge5410_cmos_read(int addr);
+extern void secureedge5410_cmos_write(unsigned char val, int addr);
+
 #elif defined(__SH4__)
 #define RTC_PORT(n)		(R64CNT+(n)*4)
 #define CMOS_READ(addr)		__CMOS_READ(addr,w)
diff -urN linux-2.4.22-pre10/include/asm-sh/pci-sh7751.h linux-2.4.22-rc1/include/asm-sh/pci-sh7751.h
--- linux-2.4.22-pre10/include/asm-sh/pci-sh7751.h	2001-06-27 13:55:29.000000000 -0700
+++ linux-2.4.22-rc1/include/asm-sh/pci-sh7751.h	2003-08-05 11:41:05.000000000 -0700
@@ -36,6 +36,7 @@
 /* Platform Specific Values */
 #define SH7751_VENDOR_ID             0x1054
 #define SH7751_DEVICE_ID             0x3505
+#define SH7751R_DEVICE_ID            0x350e
 
 /* SH7751 Specific Values */
 #define SH7751_PCI_CONFIG_BASE	     0xFD000000  /* Config space base addr */
diff -urN linux-2.4.22-pre10/include/asm-sh/pci.h linux-2.4.22-rc1/include/asm-sh/pci.h
--- linux-2.4.22-pre10/include/asm-sh/pci.h	2003-08-05 11:40:54.000000000 -0700
+++ linux-2.4.22-rc1/include/asm-sh/pci.h	2003-08-05 11:41:05.000000000 -0700
@@ -25,8 +25,7 @@
 #elif defined(CONFIG_SH_BIGSUR) && defined(CONFIG_CPU_SUBTYPE_SH7751)
 #define PCIBIOS_MIN_IO		0x2000
 #define PCIBIOS_MIN_MEM		0xFD000000
-
-#elif defined(CONFIG_SH_7751_SOLUTION_ENGINE)
+#elif defined(CONFIG_SH_7751_SOLUTION_ENGINE) || defined(CONFIG_SH_SECUREEDGE5410)
 #define PCIBIOS_MIN_IO          0x4000
 #define PCIBIOS_MIN_MEM         0xFD000000
 #elif defined(CONFIG_PCI_SD0001)
diff -urN linux-2.4.22-pre10/include/asm-sh/pgtable.h linux-2.4.22-rc1/include/asm-sh/pgtable.h
--- linux-2.4.22-pre10/include/asm-sh/pgtable.h	2002-08-02 17:39:45.000000000 -0700
+++ linux-2.4.22-rc1/include/asm-sh/pgtable.h	2003-08-05 11:41:05.000000000 -0700
@@ -43,6 +43,7 @@
 #define flush_icache_page(vma,pg)		do { } while (0)
 #define flush_icache_user_range(vma,pg,adr,len)	do { } while (0)
 #define flush_cache_sigtramp(vaddr)		do { } while (0)
+#define __flush_icache_all()			do { } while (0)
 
 #define p3_cache_init()				do { } while (0)
 
@@ -310,4 +311,10 @@
  */
 #define pgtable_cache_init()	do { } while (0)
 
+/*
+ * Set pg flags to non-cached
+ */
+#define pgprot_noncached(_prot) __pgprot(pgprot_val(_prot) &= ~_PAGE_CACHABLE)
+
+
 #endif /* __ASM_SH_PAGE_H */
diff -urN linux-2.4.22-pre10/mm/filemap.c linux-2.4.22-rc1/mm/filemap.c
--- linux-2.4.22-pre10/mm/filemap.c	2003-08-05 11:40:54.000000000 -0700
+++ linux-2.4.22-rc1/mm/filemap.c	2003-08-05 11:41:06.000000000 -0700
@@ -3108,7 +3108,7 @@
 	struct page	*page, *cached_page;
 	ssize_t		written;
 	long		status = 0;
-	int		err;
+	ssize_t		err;
 	unsigned	bytes;
 
 	cached_page = NULL;
@@ -3229,7 +3229,7 @@
 	loff_t		pos;
 	ssize_t		written;
 	long		status = 0;
-	int		err;
+	ssize_t		err;
 
 	pos = *ppos;
 	written = 0;
@@ -3270,7 +3270,8 @@
 static int do_odirect_fallback(struct file *file, struct inode *inode,
 			       const char *buf, size_t count, loff_t *ppos)
 {
-	int ret, err;
+	ssize_t ret;
+	int err;
 
 	down(&inode->i_sem);
 	ret = do_generic_file_write(file, buf, count, ppos);
@@ -3287,7 +3288,7 @@
 generic_file_write(struct file *file,const char *buf,size_t count, loff_t *ppos)
 {
 	struct inode	*inode = file->f_dentry->d_inode->i_mapping->host;
-	int		err;
+	ssize_t		err;
 
 	if ((ssize_t) count < 0)
 		return -EINVAL;
