diff -ur linux-23029p1/arch/alpha/kernel/ptrace.c linux-23029p1m2/arch/alpha/kernel/ptrace.c
--- linux-23029p1/arch/alpha/kernel/ptrace.c	Thu Jul 29 23:37:22 1999
+++ linux-23029p1m2/arch/alpha/kernel/ptrace.c	Sun Nov 21 15:13:54 1999
@@ -57,12 +57,8 @@
  *  |	        		     | v
  *  +================================+
  */
-#define PT_REG(reg)	(PAGE_SIZE*2 - sizeof(struct pt_regs)		\
-			 + (long)&((struct pt_regs *)0)->reg)
 
-#define SW_REG(reg)	(PAGE_SIZE*2 - sizeof(struct pt_regs)		\
-			 - sizeof(struct switch_stack)			\
-			 + (long)&((struct switch_stack *)0)->reg)
+/* Frame-reference macroes are moved to <asm/processor.h> */
 
 /* 
  * The following table maps a register index into the stack offset at
diff -ur linux-23029p1/arch/alpha/lib/io.c linux-23029p1m2/arch/alpha/lib/io.c
--- linux-23029p1/arch/alpha/lib/io.c	Thu Aug 19 18:28:03 1999
+++ linux-23029p1m2/arch/alpha/lib/io.c	Mon Nov 22 14:47:50 1999
@@ -37,93 +37,93 @@
 	__outl(b, addr);
 }
 
-unsigned long ___raw_readb(unsigned long addr)
+unsigned long ___raw_readb(volatile void * addr)
 {
 	return __readb(addr);
 }
 
-unsigned long ___raw_readw(unsigned long addr)
+unsigned long ___raw_readw(volatile void * addr)
 {
 	return __readw(addr);
 }
 
-unsigned long ___raw_readl(unsigned long addr)
+unsigned long ___raw_readl(volatile void * addr)
 {
 	return __readl(addr);
 }
 
-unsigned long ___raw_readq(unsigned long addr)
+unsigned long ___raw_readq(volatile void * addr)
 {
 	return __readq(addr);
 }
 
-unsigned long _readb(unsigned long addr)
+unsigned long _readb(volatile void * addr)
 {
 	unsigned long r = __readb(addr);
 	mb();
 	return r;
 }
 
-unsigned long _readw(unsigned long addr)
+unsigned long _readw(volatile void * addr)
 {
 	unsigned long r = __readw(addr);
 	mb();
 	return r;
 }
 
-unsigned long _readl(unsigned long addr)
+unsigned long _readl(volatile void * addr)
 {
 	unsigned long r = __readl(addr);
 	mb();
 	return r;
 }
 
-unsigned long _readq(unsigned long addr)
+unsigned long _readq(volatile void * addr)
 {
 	unsigned long r = __readq(addr);
 	mb();
 	return r;
 }
 
-void ___raw_writeb(unsigned char b, unsigned long addr)
+void ___raw_writeb(unsigned char b, volatile void * addr)
 {
 	__writeb(b, addr);
 }
 
-void ___raw_writew(unsigned short b, unsigned long addr)
+void ___raw_writew(unsigned short b, volatile void * addr)
 {
 	__writew(b, addr);
 }
 
-void ___raw_writel(unsigned int b, unsigned long addr)
+void ___raw_writel(unsigned int b, volatile void * addr)
 {
 	__writel(b, addr);
 }
 
-void ___raw_writeq(unsigned long b, unsigned long addr)
+void ___raw_writeq(unsigned long b, volatile void * addr)
 {
 	__writeq(b, addr);
 }
 
-void _writeb(unsigned char b, unsigned long addr)
+void _writeb(unsigned char b, volatile void * addr)
 {
 	__writeb(b, addr);
 	mb();
 }
 
-void _writew(unsigned short b, unsigned long addr)
+void _writew(unsigned short b, volatile void * addr)
 {
 	__writew(b, addr);
 	mb();
 }
 
-void _writel(unsigned int b, unsigned long addr)
+void _writel(unsigned int b, volatile void * addr)
 {
 	__writel(b, addr);
 	mb();
 }
 
-void _writeq(unsigned long b, unsigned long addr)
+void _writeq(unsigned long b, volatile void * addr)
 {
 	__writeq(b, addr);
 	mb();
@@ -411,44 +411,44 @@
 	/* Optimize co-aligned transfers.  Everything else gets handled
 	   a byte at a time. */
 
-	if (count >= 8 && ((long)to & 7) == (from & 7)) {
+	if (count >= 8 && (((long)to) & 7) == (from & 7)) {
 		count -= 8;
 		do {
-			*(u64 *)to = __raw_readq(from);
+			*(u64 *)to = __raw_readq((void *)from);
 			count -= 8;
-			to += 8;
+			((char *)to) += 8;
 			from += 8;
 		} while (count >= 0);
 		count += 8;
 	}
 
-	if (count >= 4 && ((long)to & 3) == (from & 3)) {
+	if (count >= 4 && (((long)to) & 3) == (from & 3)) {
 		count -= 4;
 		do {
-			*(u32 *)to = __raw_readl(from);
+			*(u32 *)to = __raw_readl((void *)from);
 			count -= 4;
-			to += 4;
+			((char *)to) += 4;
 			from += 4;
 		} while (count >= 0);
 		count += 4;
 	}
 		
-	if (count >= 2 && ((long)to & 1) == (from & 1)) {
+	if (count >= 2 && (((long)to) & 1) == (from & 1)) {
 		count -= 2;
 		do {
-			*(u16 *)to = __raw_readw(from);
+			*(u16 *)to = __raw_readw((void *)from);
 			count -= 2;
-			to += 2;
+			((char *)to) += 2;
 			from += 2;
 		} while (count >= 0);
 		count += 2;
 	}
 
 	while (count > 0) {
-		*(u8 *) to = __raw_readb(from);
+		*(u8 *) to = __raw_readb((void *)from);
 		count--;
-		to++;
-		from++;
+		++(long)to;
+		++from;
 	}
 }
 
@@ -465,7 +465,7 @@
 	if (count >= 8 && (to & 7) == ((long)from & 7)) {
 		count -= 8;
 		do {
-			__raw_writeq(*(const u64 *)from, to);
+			__raw_writeq(*(const u64 *)from, (void*)to);
 			count -= 8;
 			to += 8;
 			from += 8;
@@ -476,7 +476,7 @@
 	if (count >= 4 && (to & 3) == ((long)from & 3)) {
 		count -= 4;
 		do {
-			__raw_writel(*(const u32 *)from, to);
+			__raw_writel(*(const u32 *)from, (void *)to);
 			count -= 4;
 			to += 4;
 			from += 4;
@@ -487,7 +487,7 @@
 	if (count >= 2 && (to & 1) == ((long)from & 1)) {
 		count -= 2;
 		do {
-			__raw_writew(*(const u16 *)from, to);
+			__raw_writew(*(const u16 *)from, (void *)to);
 			count -= 2;
 			to += 2;
 			from += 2;
@@ -496,7 +496,7 @@
 	}
 
 	while (count > 0) {
-		__raw_writeb(*(const u8 *) from, to);
+		__raw_writeb(*(const u8 *) from, (void *)to);
 		count--;
 		to++;
 		from++;
@@ -511,21 +511,21 @@
 {
 	/* Handle any initial odd byte */
 	if (count > 0 && (to & 1)) {
-		__raw_writeb(c, to);
+		__raw_writeb(c, (void *)to);
 		to++;
 		count--;
 	}
 
 	/* Handle any initial odd halfword */
 	if (count >= 2 && (to & 2)) {
-		__raw_writew(c, to);
+		__raw_writew(c, (void *)to);
 		to += 2;
 		count -= 2;
 	}
 
 	/* Handle any initial odd word */
 	if (count >= 4 && (to & 4)) {
-		__raw_writel(c, to);
+		__raw_writel(c, (void *)to);
 		to += 4;
 		count -= 4;
 	}
@@ -535,7 +535,7 @@
 	count -= 8;
 	if (count >= 0) {
 		do {
-			__raw_writeq(c, to);
+			__raw_writeq(c, (void *)to);
 			to += 8;
 			count -= 8;
 		} while (count >= 0);
@@ -544,21 +544,21 @@
 
 	/* The tail is word-aligned if we still have count >= 4 */
 	if (count >= 4) {
-		__raw_writel(c, to);
+		__raw_writel(c, (void *)to);
 		to += 4;
 		count -= 4;
 	}
 
 	/* The tail is half-word aligned if we have count >= 2 */
 	if (count >= 2) {
-		__raw_writew(c, to);
+		__raw_writew(c, (void *)to);
 		to += 2;
 		count -= 2;
 	}
 
 	/* And finally, one last byte.. */
 	if (count) {
-		__raw_writeb(c, to);
+		__raw_writeb(c, (void *)to);
 	}
 	mb();
 }
diff -ur linux-23029p1/drivers/block/cpqarray.c linux-23029p1m2/drivers/block/cpqarray.c
--- linux-23029p1/drivers/block/cpqarray.c	Fri Nov 12 14:29:47 1999
+++ linux-23029p1m2/drivers/block/cpqarray.c	Mon Nov 22 14:29:47 1999
@@ -109,7 +109,7 @@
 void cpqarray_init(void);
 static int cpqarray_pci_detect(void);
 static int cpqarray_pci_init(ctlr_info_t *c, unchar bus, unchar device_fn);
-static ulong remap_pci_mem(ulong base, ulong size);
+static char * remap_pci_mem(ulong base, ulong size);
 static int cpqarray_eisa_detect(void);
 static int pollcomplete(int ctlr);
 static void getgeometry(int ctlr);
@@ -697,13 +697,13 @@
 /*
  * Map (physical) PCI mem into (virtual) kernel space
  */
-static ulong remap_pci_mem(ulong base, ulong size)
+static char * remap_pci_mem(ulong base, ulong size)
 {
         ulong page_base        = ((ulong) base) & PAGE_MASK;
         ulong page_offs        = ((ulong) base) - page_base;
         ulong page_remapped    = (ulong) ioremap(page_base, page_offs+size);
 
-        return (ulong) (page_remapped ? (page_remapped + page_offs) : 0UL);
+        return (char *) (page_remapped ? (page_remapped + page_offs) : 0UL);
 }
 
 #ifndef MODULE
diff -ur linux-23029p1/drivers/block/cpqarray.h linux-23029p1m2/drivers/block/cpqarray.h
--- linux-23029p1/drivers/block/cpqarray.h	Tue Jul  6 20:11:40 1999
+++ linux-23029p1m2/drivers/block/cpqarray.h	Mon Nov 22 16:08:50 1999
@@ -91,7 +91,7 @@
 	__u32	board_id;
 	char	*product_name;	
 
-	__u32	vaddr;
+	char *	vaddr;
 	__u32	paddr;
 	__u32	ioaddr;
 	int	intr;
diff -ur linux-23029p1/drivers/char/drm/drmP.h linux-23029p1m2/drivers/char/drm/drmP.h
--- linux-23029p1/drivers/char/drm/drmP.h	Fri Nov 12 14:29:47 1999
+++ linux-23029p1m2/drivers/char/drm/drmP.h	Mon Nov 22 16:09:50 1999
@@ -47,6 +47,7 @@
 #include <asm/io.h>
 #include <asm/mman.h>
 #include <asm/uaccess.h>
+#include <asm/pgtable.h>
 #ifdef CONFIG_MTRR
 #include <asm/mtrr.h>
 #endif
diff -ur linux-23029p1/drivers/char/drm/lists.c linux-23029p1m2/drivers/char/drm/lists.c
--- linux-23029p1/drivers/char/drm/lists.c	Wed Sep  8 00:51:28 1999
+++ linux-23029p1m2/drivers/char/drm/lists.c	Mon Nov 22 17:09:35 1999
@@ -130,8 +130,8 @@
 
 int drm_freelist_put(drm_device_t *dev, drm_freelist_t *bl, drm_buf_t *buf)
 {
-	unsigned int	 old;
-	unsigned int	 new;
+	unsigned long	 old;
+	unsigned long	 new;
 	char		 failed;
 	int		 count = 0;
 	drm_device_dma_t *dma = dev->dma;
@@ -180,8 +180,8 @@
 
 static drm_buf_t *drm_freelist_try(drm_freelist_t *bl)
 {
-	unsigned int	  old;
-	unsigned int	  new;
+	unsigned long	  old;
+	unsigned long	  new;
 	char		  failed;
 	drm_buf_t	  *buf;
 	int		  count = 0;
@@ -190,7 +190,7 @@
 	
 				/* Get buffer */
 	do {
-		old = (unsigned int)bl->next;
+		old = (unsigned long)bl->next;
 		if (!old) {
 			return NULL;
 		}
diff -ur linux-23029p1/drivers/net/fc/iph5526_novram.c linux-23029p1m2/drivers/net/fc/iph5526_novram.c
--- linux-23029p1/drivers/net/fc/iph5526_novram.c	Mon Aug 23 20:12:38 1999
+++ linux-23029p1m2/drivers/net/fc/iph5526_novram.c	Mon Nov 22 14:34:46 1999
@@ -74,9 +74,9 @@
  ***********************/
 
 #define CFG_AND(val) { volatile int t; \
-			   t = readl(fi->n_r.ptr_novram_hw_control_reg);   \
+			   t = readl((void*)fi->n_r.ptr_novram_hw_control_reg);   \
 			   t &= (val);                                  \
-			   writel(t, fi->n_r.ptr_novram_hw_control_reg);   \
+			   writel(t, (void*)fi->n_r.ptr_novram_hw_control_reg);   \
 		   }
 
 /***********************
@@ -87,9 +87,9 @@
  ***********************/
 
 #define CFG_OR(val) { volatile int t; \
-			   t = readl(fi->n_r.ptr_novram_hw_control_reg);   \
+			   t = readl((void*)fi->n_r.ptr_novram_hw_control_reg);   \
 			   t |= (val);                                  \
-			   writel(t, fi->n_r.ptr_novram_hw_control_reg);   \
+			   writel(t, (void*)fi->n_r.ptr_novram_hw_control_reg);   \
 		   }
 
 /***********************
@@ -146,7 +146,7 @@
 			   KeStallExecutionProcessor(5);\
 		       CFG_AND(~NVSK); \
 			   KeStallExecutionProcessor(5);\
-		       val = (readl(fi->n_r.ptr_novram_hw_status_reg) & NVDO) ? 1 : 0; \
+		       val = (readl((void*)fi->n_r.ptr_novram_hw_status_reg) & NVDO) ? 1 : 0; \
 		       }
 
 /***********
diff -ur linux-23029p1/drivers/scsi/scsi_proc.c linux-23029p1m2/drivers/scsi/scsi_proc.c
--- linux-23029p1/drivers/scsi/scsi_proc.c	Mon Nov 22 17:50:08 1999
+++ linux-23029p1m2/drivers/scsi/scsi_proc.c	Mon Nov 22 20:20:41 1999
@@ -91,8 +91,8 @@
 				      * use some slack for overruns 
 				      */
 
-static ssize_t proc_scsi_write(struct file * file, const char * buf,
-                              unsigned long count, void *data)
+static int proc_scsi_write(struct file * file, const char * buf,
+                           unsigned long count, void *data)
 {
 	struct Scsi_Host *hpnt = data;
 	ssize_t ret = 0;
diff -ur linux-23029p1/drivers/video/vgacon.c linux-23029p1m2/drivers/video/vgacon.c
--- linux-23029p1/drivers/video/vgacon.c	Sat Oct  2 17:46:33 1999
+++ linux-23029p1m2/drivers/video/vgacon.c	Mon Nov 22 20:18:43 1999
@@ -166,7 +166,7 @@
 {
 	const char *display_desc = NULL;
 	u16 saved1, saved2;
-	volatile u16 *p;
+	u16 *p;
 
 	if (ORIG_VIDEO_ISVGA == VIDEO_TYPE_VLFB) {
 	no_vga:
@@ -285,7 +285,7 @@
 	 *	Find out if there is a graphics card present.
 	 *	Are there smarter methods around?
 	 */
-	p = (volatile u16 *)vga_vram_base;
+	p = (u16 *)vga_vram_base;
 	saved1 = scr_readw(p);
 	saved2 = scr_readw(p + 1);
 	scr_writew(0xAA55, p);
diff -ur linux-23029p1/fs/buffer.c linux-23029p1m2/fs/buffer.c
--- linux-23029p1/fs/buffer.c	Thu Nov 11 20:33:42 1999
+++ linux-23029p1m2/fs/buffer.c	Fri Nov 19 21:16:12 1999
@@ -1098,7 +1098,7 @@
 		/*
 		 * This catches illegal uses and preserves the offset:
 		 */
-		bh->b_data = (char *)(0 + offset);
+		bh->b_data = (char *)(0L + offset);
 	else
 		bh->b_data = (char *)(page_address(page) + offset);
 }
diff -ur linux-23029p1/fs/dquot.c linux-23029p1m2/fs/dquot.c
--- linux-23029p1/fs/dquot.c	Fri Nov 12 14:36:13 1999
+++ linux-23029p1m2/fs/dquot.c	Sun Nov 21 15:04:45 1999
@@ -722,7 +722,7 @@
 	}
 	inode->i_flags &= ~S_QUOTA;
 put_it:
-	if (dquot != NODQUOT)
+	if (dquot != NODQUOT) {
 		if (dqput_blocks(dquot)) {
 			if (dquot->dq_count != 1)
 				printk(KERN_WARNING "VFS: Adding dquot with dq_count %d to dispose list.\n", dquot->dq_count);
@@ -731,6 +731,7 @@
 		}
 		else
 			dqput(dquot);   /* We have guaranteed we won't block */
+	}
 	return 0;
 }
 
diff -ur linux-23029p1/fs/lockd/xdr.c linux-23029p1m2/fs/lockd/xdr.c
--- linux-23029p1/fs/lockd/xdr.c	Sat Feb  6 22:46:21 1999
+++ linux-23029p1m2/fs/lockd/xdr.c	Sun Nov 21 15:41:46 1999
@@ -96,7 +96,7 @@
 	if ((len = ntohl(*p++)) != sizeof(*f)) {
 		printk(KERN_NOTICE
 			"lockd: bad fhandle size %x (should be %d)\n",
-			len, sizeof(*f));
+			len, (int)sizeof(*f));
 		return NULL;
 	}
 	memcpy(f, p, sizeof(*f));
diff -ur linux-23029p1/fs/nfsd/export.c linux-23029p1m2/fs/nfsd/export.c
--- linux-23029p1/fs/nfsd/export.c	Mon Oct 25 20:40:19 1999
+++ linux-23029p1m2/fs/nfsd/export.c	Sun Nov 21 15:41:17 1999
@@ -233,7 +233,7 @@
 	    !exp_verify_string(nxp->ex_client, NFSCLNT_IDMAX))
 		goto out;
 
-	dprintk("exp_export called for %s:%s (%x/%ld fl %x).\n",
+	dprintk("exp_export called for %s:%s (%x/%lu fl %x).\n",
 			nxp->ex_client, nxp->ex_path,
 			nxp->ex_dev, nxp->ex_ino, nxp->ex_flags);
 	dev = to_kdev_t(nxp->ex_dev);
@@ -460,11 +460,11 @@
 		dev = dentry->d_inode->i_dev;
 		ino = dentry->d_inode->i_ino;
 	
-		dprintk("nfsd: exp_rootfh(%s [%p] %s:%x/%ld)\n",
+		dprintk("nfsd: exp_rootfh(%s [%p] %s:%x/%lu)\n",
 		         path, dentry, clp->cl_ident, dev, ino);
 		exp = exp_parent(clp, dev, dentry);
 	} else {
-		dprintk("nfsd: exp_rootfh(%s:%x/%ld)\n",
+		dprintk("nfsd: exp_rootfh(%s:%x/%lu)\n",
 		         clp->cl_ident, dev, ino);
 		if ((exp = exp_get(clp, dev, ino)))
 			if (!(dentry = dget(exp->ex_dentry))) {
@@ -485,7 +485,7 @@
 	if (inode->i_dev != dev || inode->i_ino != ino) {
 		printk("exp_rootfh: Aieee, ino/dev mismatch\n");
 		printk("exp_rootfh: arg[dev(%x):ino(%ld)]"
-		       " inode[dev(%x):ino(%ld)]\n",
+		       " inode[dev(%x):ino(%lu)]\n",
 		       dev, ino, inode->i_dev, inode->i_ino);
 	}
 
diff -ur linux-23029p1/fs/proc/kcore.c linux-23029p1m2/fs/proc/kcore.c
--- linux-23029p1/fs/proc/kcore.c	Mon Nov 22 17:50:08 1999
+++ linux-23029p1m2/fs/proc/kcore.c	Sun Nov 21 14:59:28 1999
@@ -119,7 +119,7 @@
 
 extern char saved_command_line[];
 
-static size_t get_kcore_size(int *num_vma, int *elf_buflen)
+static size_t get_kcore_size(int *num_vma, size_t *elf_buflen)
 {
 	size_t try, size = 0;
 	struct vm_struct *m;
diff -ur linux-23029p1/include/asm-alpha/core_apecs.h linux-23029p1m2/include/asm-alpha/core_apecs.h
--- linux-23029p1/include/asm-alpha/core_apecs.h	Tue Aug 31 20:50:45 1999
+++ linux-23029p1m2/include/asm-alpha/core_apecs.h	Mon Nov 22 14:12:45 1999
@@ -489,8 +489,9 @@
  * dense memory space, everything else through sparse space.
  */
 
-__EXTERN_INLINE unsigned long apecs_readb(unsigned long addr)
+__EXTERN_INLINE unsigned long apecs_readb(volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	unsigned long result, msb;
 
 	addr -= APECS_DENSE_MEM;
@@ -503,8 +504,9 @@
 	return __kernel_extbl(result, addr & 3);
 }
 
-__EXTERN_INLINE unsigned long apecs_readw(unsigned long addr)
+__EXTERN_INLINE unsigned long apecs_readw(volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	unsigned long result, msb;
 
 	addr -= APECS_DENSE_MEM;
@@ -517,18 +519,19 @@
 	return __kernel_extwl(result, addr & 3);
 }
 
-__EXTERN_INLINE unsigned long apecs_readl(unsigned long addr)
+__EXTERN_INLINE unsigned long apecs_readl(volatile void * addr)
 {
 	return *(vuip)addr;
 }
 
-__EXTERN_INLINE unsigned long apecs_readq(unsigned long addr)
+__EXTERN_INLINE unsigned long apecs_readq(volatile void * addr)
 {
 	return *(vulp)addr;
 }
 
-__EXTERN_INLINE void apecs_writeb(unsigned char b, unsigned long addr)
+__EXTERN_INLINE void apecs_writeb(unsigned char b, volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	unsigned long msb;
 
 	addr -= APECS_DENSE_MEM;
@@ -540,8 +543,9 @@
 	*(vuip) ((addr << 5) + APECS_SPARSE_MEM + 0x00) = b * 0x01010101;
 }
 
-__EXTERN_INLINE void apecs_writew(unsigned short b, unsigned long addr)
+__EXTERN_INLINE void apecs_writew(unsigned short b, volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	unsigned long msb;
 
 	addr -= APECS_DENSE_MEM;
@@ -553,12 +557,12 @@
 	*(vuip) ((addr << 5) + APECS_SPARSE_MEM + 0x08) = b * 0x00010001;
 }
 
-__EXTERN_INLINE void apecs_writel(unsigned int b, unsigned long addr)
+__EXTERN_INLINE void apecs_writel(unsigned int b, volatile void * addr)
 {
 	*(vuip)addr = b;
 }
 
-__EXTERN_INLINE void apecs_writeq(unsigned long b, unsigned long addr)
+__EXTERN_INLINE void apecs_writeq(unsigned long b, volatile void * addr)
 {
 	*(vulp)addr = b;
 }
@@ -609,10 +613,10 @@
 #define outb(x, port) \
   (__builtin_constant_p((port))?__outb((x),(port)):_outb((x),(port)))
 
-#define __raw_readl(a)		__readl((unsigned long)(a))
-#define __raw_readq(a)		__readq((unsigned long)(a))
-#define __raw_writel(v,a)	__writel((v),(unsigned long)(a))
-#define __raw_writeq(v,a)	__writeq((v),(unsigned long)(a))
+#define __raw_readl(a)		__readl(a)
+#define __raw_readq(a)		__readq(a)
+#define __raw_writel(v,a)	__writel((v),(a))
+#define __raw_writeq(v,a)	__writeq((v),(a))
 
 #endif /* __WANT_IO_DEF */
 
diff -ur linux-23029p1/include/asm-alpha/core_cia.h linux-23029p1m2/include/asm-alpha/core_cia.h
--- linux-23029p1/include/asm-alpha/core_cia.h	Thu Sep  2 01:34:01 1999
+++ linux-23029p1m2/include/asm-alpha/core_cia.h	Mon Nov 22 14:13:44 1999
@@ -394,8 +394,9 @@
  *
  */
 
-__EXTERN_INLINE unsigned long cia_readb(unsigned long addr)
+__EXTERN_INLINE unsigned long cia_readb(volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	unsigned long result;
 
 #if !CIA_ONE_HAE_WINDOW
@@ -411,8 +412,9 @@
 	return __kernel_extbl(result, addr & 3);
 }
 
-__EXTERN_INLINE unsigned long cia_readw(unsigned long addr)
+__EXTERN_INLINE unsigned long cia_readw(volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	unsigned long result;
 
 #if !CIA_ONE_HAE_WINDOW
@@ -428,8 +430,9 @@
 	return __kernel_extwl(result, addr & 3);
 }
 
-__EXTERN_INLINE void cia_writeb(unsigned char b, unsigned long addr)
+__EXTERN_INLINE void cia_writeb(unsigned char b, volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	unsigned long w;
 
 #if !CIA_ONE_HAE_WINDOW
@@ -445,8 +448,9 @@
 	*(vuip) ((addr << 5) + CIA_SPARSE_MEM + 0x00) = w;
 }
 
-__EXTERN_INLINE void cia_writew(unsigned short b, unsigned long addr)
+__EXTERN_INLINE void cia_writew(unsigned short b, volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	unsigned long w;
 
 #if !CIA_ONE_HAE_WINDOW
@@ -462,22 +466,22 @@
 	*(vuip) ((addr << 5) + CIA_SPARSE_MEM + 0x08) = w;
 }
 
-__EXTERN_INLINE unsigned long cia_readl(unsigned long addr)
+__EXTERN_INLINE unsigned long cia_readl(volatile void * addr)
 {
 	return *(vuip)addr;
 }
 
-__EXTERN_INLINE unsigned long cia_readq(unsigned long addr)
+__EXTERN_INLINE unsigned long cia_readq(volatile void * addr)
 {
 	return *(vulp)addr;
 }
 
-__EXTERN_INLINE void cia_writel(unsigned int b, unsigned long addr)
+__EXTERN_INLINE void cia_writel(unsigned int b, volatile void * addr)
 {
 	*(vuip)addr = b;
 }
 
-__EXTERN_INLINE void cia_writeq(unsigned long b, unsigned long addr)
+__EXTERN_INLINE void cia_writeq(unsigned long b, volatile void * addr)
 {
 	*(vulp)addr = b;
 }
@@ -523,10 +527,10 @@
 #define outb(x, port) \
   (__builtin_constant_p((port))?__outb((x),(port)):_outb((x),(port)))
 
-#define __raw_readl(a)		__readl((unsigned long)(a))
-#define __raw_readq(a)		__readq((unsigned long)(a))
-#define __raw_writel(v,a)	__writel((v),(unsigned long)(a))
-#define __raw_writeq(v,a)	__writeq((v),(unsigned long)(a))
+#define __raw_readl(a)		__readl((a))
+#define __raw_readq(a)		__readq((a))
+#define __raw_writel(v,a)	__writel((v),(a))
+#define __raw_writeq(v,a)	__writeq((v),(a))
 
 #endif /* __WANT_IO_DEF */
 
diff -ur linux-23029p1/include/asm-alpha/core_lca.h linux-23029p1m2/include/asm-alpha/core_lca.h
--- linux-23029p1/include/asm-alpha/core_lca.h	Thu Sep  2 01:34:01 1999
+++ linux-23029p1m2/include/asm-alpha/core_lca.h	Mon Nov 22 20:14:23 1999
@@ -293,8 +293,9 @@
  * dense memory space, everything else through sparse space.
  */
 
-__EXTERN_INLINE unsigned long lca_readb(unsigned long addr)
+__EXTERN_INLINE unsigned long lca_readb(volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	unsigned long result, msb;
 
 	addr -= LCA_DENSE_MEM;
@@ -307,8 +308,9 @@
 	return __kernel_extbl(result, addr & 3);
 }
 
-__EXTERN_INLINE unsigned long lca_readw(unsigned long addr)
+__EXTERN_INLINE unsigned long lca_readw(volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	unsigned long result, msb;
 
 	addr -= LCA_DENSE_MEM;
@@ -321,18 +323,19 @@
 	return __kernel_extwl(result, addr & 3);
 }
 
-__EXTERN_INLINE unsigned long lca_readl(unsigned long addr)
+__EXTERN_INLINE unsigned long lca_readl(volatile void * addr)
 {
 	return *(vuip)addr;
 }
 
-__EXTERN_INLINE unsigned long lca_readq(unsigned long addr)
+__EXTERN_INLINE unsigned long lca_readq(volatile void * addr)
 {
 	return *(vulp)addr;
 }
 
-__EXTERN_INLINE void lca_writeb(unsigned char b, unsigned long addr)
+__EXTERN_INLINE void lca_writeb(unsigned char b, volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	unsigned long msb;
 	unsigned long w;
 
@@ -346,8 +349,9 @@
 	*(vuip) ((addr << 5) + LCA_SPARSE_MEM + 0x00) = w;
 }
 
-__EXTERN_INLINE void lca_writew(unsigned short b, unsigned long addr)
+__EXTERN_INLINE void lca_writew(unsigned short b, volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	unsigned long msb;
 	unsigned long w;
 
@@ -361,12 +365,12 @@
 	*(vuip) ((addr << 5) + LCA_SPARSE_MEM + 0x08) = w;
 }
 
-__EXTERN_INLINE void lca_writel(unsigned int b, unsigned long addr)
+__EXTERN_INLINE void lca_writel(unsigned int b, volatile void * addr)
 {
 	*(vuip)addr = b;
 }
 
-__EXTERN_INLINE void lca_writeq(unsigned long b, unsigned long addr)
+__EXTERN_INLINE void lca_writeq(unsigned long b, volatile void * addr)
 {
 	*(vulp)addr = b;
 }
@@ -411,10 +415,10 @@
 #define outb(x, port) \
   (__builtin_constant_p((port))?__outb((x),(port)):_outb((x),(port)))
 
-#define __raw_readl(a)		__readl((unsigned long)(a))
-#define __raw_readq(a)		__readq((unsigned long)(a))
-#define __raw_writel(v,a)	__writel((v),(unsigned long)(a))
-#define __raw_writeq(v,a)	__writeq((v),(unsigned long)(a))
+#define __raw_readl(a)		__readl((a))
+#define __raw_readq(a)		__readq((a))
+#define __raw_writel(v,a)	__writel((v),(a))
+#define __raw_writeq(v,a)	__writeq((v),(a))
 
 #endif /* __WANT_IO_DEF */
 
diff -ur linux-23029p1/include/asm-alpha/core_mcpcia.h linux-23029p1m2/include/asm-alpha/core_mcpcia.h
--- linux-23029p1/include/asm-alpha/core_mcpcia.h	Thu Sep  2 01:34:01 1999
+++ linux-23029p1m2/include/asm-alpha/core_mcpcia.h	Mon Nov 22 13:39:48 1999
@@ -350,8 +350,9 @@
 	return addr >= MCPCIA_SPARSE(0);
 }
 
-__EXTERN_INLINE unsigned long mcpcia_readb(unsigned long in_addr)
+__EXTERN_INLINE unsigned long mcpcia_readb(volatile void * iaddr)
 {
+	unsigned long in_addr = (unsigned long) iaddr;
 	unsigned long addr = in_addr & 0xffffffffUL;
 	unsigned long hose = in_addr & ~0xffffffffUL;
 	unsigned long result, work;
@@ -369,8 +370,9 @@
 	return __kernel_extbl(result, addr & 3);
 }
 
-__EXTERN_INLINE unsigned long mcpcia_readw(unsigned long in_addr)
+__EXTERN_INLINE unsigned long mcpcia_readw(volatile void * iaddr)
 {
+	unsigned long in_addr = (unsigned long) iaddr;
 	unsigned long addr = in_addr & 0xffffffffUL;
 	unsigned long hose = in_addr & ~0xffffffffUL;
 	unsigned long result, work;
@@ -388,8 +390,9 @@
 	return __kernel_extwl(result, addr & 3);
 }
 
-__EXTERN_INLINE void mcpcia_writeb(unsigned char b, unsigned long in_addr)
+__EXTERN_INLINE void mcpcia_writeb(unsigned char b, volatile void * iaddr)
 {
+	unsigned long in_addr = (unsigned long) iaddr;
 	unsigned long addr = in_addr & 0xffffffffUL;
 	unsigned long hose = in_addr & ~0xffffffffUL;
 	unsigned long w;
@@ -406,8 +409,9 @@
 	*(vuip) ((addr << 5) + hose + 0x00) = w;
 }
 
-__EXTERN_INLINE void mcpcia_writew(unsigned short b, unsigned long in_addr)
+__EXTERN_INLINE void mcpcia_writew(unsigned short b, volatile void * iaddr)
 {
+	unsigned long in_addr = (unsigned long) iaddr;
 	unsigned long addr = in_addr & 0xffffffffUL;
 	unsigned long hose = in_addr & ~0xffffffffUL;
 	unsigned long w;
@@ -424,22 +428,22 @@
 	*(vuip) ((addr << 5) + hose + 0x08) = w;
 }
 
-__EXTERN_INLINE unsigned long mcpcia_readl(unsigned long addr)
+__EXTERN_INLINE unsigned long mcpcia_readl(volatile void * addr)
 {
 	return *(vuip)addr;
 }
 
-__EXTERN_INLINE unsigned long mcpcia_readq(unsigned long addr)
+__EXTERN_INLINE unsigned long mcpcia_readq(volatile void * addr)
 {
 	return *(vulp)addr;
 }
 
-__EXTERN_INLINE void mcpcia_writel(unsigned int b, unsigned long addr)
+__EXTERN_INLINE void mcpcia_writel(unsigned int b, volatile void * addr)
 {
 	*(vuip)addr = b;
 }
 
-__EXTERN_INLINE void mcpcia_writeq(unsigned long b, unsigned long addr)
+__EXTERN_INLINE void mcpcia_writeq(unsigned long b, volatile void * addr)
 {
 	*(vulp)addr = b;
 }
@@ -477,10 +481,10 @@
 # define outb(x, port) \
   (__builtin_constant_p((port))?__outb((x),(port)):_outb((x),(port)))
 
-#define __raw_readl(a)		__readl((unsigned long)(a))
-#define __raw_readq(a)		__readq((unsigned long)(a))
-#define __raw_writel(v,a)	__writel((v),(unsigned long)(a))
-#define __raw_writeq(v,a)	__writeq((v),(unsigned long)(a))
+#define __raw_readl(a)		__readl((a))
+#define __raw_readq(a)		__readq((a))
+#define __raw_writel(v,a)	__writel((v),(a))
+#define __raw_writeq(v,a)	__writeq((v),(a))
 
 #endif /* __WANT_IO_DEF */
 
diff -ur linux-23029p1/include/asm-alpha/core_polaris.h linux-23029p1m2/include/asm-alpha/core_polaris.h
--- linux-23029p1/include/asm-alpha/core_polaris.h	Thu Sep  2 01:34:01 1999
+++ linux-23029p1m2/include/asm-alpha/core_polaris.h	Mon Nov 22 13:41:36 1999
@@ -131,42 +131,42 @@
  * We will only support DENSE access via BWX insns.
  */
 
-__EXTERN_INLINE unsigned long polaris_readb(unsigned long addr)
+__EXTERN_INLINE unsigned long polaris_readb(volatile void * addr)
 {
 	return __kernel_ldbu(*(vucp)addr);
 }
 
-__EXTERN_INLINE unsigned long polaris_readw(unsigned long addr)
+__EXTERN_INLINE unsigned long polaris_readw(volatile void * addr)
 {
 	return __kernel_ldwu(*(vusp)addr);
 }
 
-__EXTERN_INLINE unsigned long polaris_readl(unsigned long addr)
+__EXTERN_INLINE unsigned long polaris_readl(volatile void * addr)
 {
 	return *(vuip)addr;
 }
 
-__EXTERN_INLINE unsigned long polaris_readq(unsigned long addr)
+__EXTERN_INLINE unsigned long polaris_readq(volatile void * addr)
 {
 	return *(vulp)addr;
 }
 
-__EXTERN_INLINE void polaris_writeb(unsigned char b, unsigned long addr)
+__EXTERN_INLINE void polaris_writeb(unsigned char b, volatile void * addr)
 {
 	__kernel_stb(b, *(vucp)addr);
 }
 
-__EXTERN_INLINE void polaris_writew(unsigned short b, unsigned long addr)
+__EXTERN_INLINE void polaris_writew(unsigned short b, volatile void * addr)
 {
 	__kernel_stw(b, *(vusp)addr);
 }
 
-__EXTERN_INLINE void polaris_writel(unsigned int b, unsigned long addr)
+__EXTERN_INLINE void polaris_writel(unsigned int b, volatile void * addr)
 {
 	*(vuip)addr = b;
 }
 
-__EXTERN_INLINE void polaris_writeq(unsigned long b, unsigned long addr)
+__EXTERN_INLINE void polaris_writeq(unsigned long b, volatile void * addr)
 {
 	*(vulp)addr = b;
 }
@@ -215,14 +215,14 @@
 #define outw(v, port)	__outw((v),(port))
 #define outl(v, port)	__outl((v),(port))
 
-#define __raw_readb(a)		__readb((unsigned long)(a))
-#define __raw_readw(a)		__readw((unsigned long)(a))
-#define __raw_readl(a)		__readl((unsigned long)(a))
-#define __raw_readq(a)		__readq((unsigned long)(a))
-#define __raw_writeb(v,a)	__writeb((v),(unsigned long)(a))
-#define __raw_writew(v,a)	__writew((v),(unsigned long)(a))
-#define __raw_writel(v,a)	__writel((v),(unsigned long)(a))
-#define __raw_writeq(v,a)	__writeq((v),(unsigned long)(a))
+#define __raw_readb(a)		__readb((a))
+#define __raw_readw(a)		__readw((a))
+#define __raw_readl(a)		__readl((a))
+#define __raw_readq(a)		__readq((a))
+#define __raw_writeb(v,a)	__writeb((v),(a))
+#define __raw_writew(v,a)	__writew((v),(a))
+#define __raw_writel(v,a)	__writel((v),(a))
+#define __raw_writeq(v,a)	__writeq((v),(a))
 
 #endif /* __WANT_IO_DEF */
 
diff -ur linux-23029p1/include/asm-alpha/core_pyxis.h linux-23029p1m2/include/asm-alpha/core_pyxis.h
--- linux-23029p1/include/asm-alpha/core_pyxis.h	Thu Sep  2 01:34:01 1999
+++ linux-23029p1m2/include/asm-alpha/core_pyxis.h	Mon Nov 22 13:42:02 1999
@@ -355,42 +355,42 @@
  *
  */
 
-__EXTERN_INLINE unsigned long pyxis_readb(unsigned long addr)
+__EXTERN_INLINE unsigned long pyxis_readb(volatile void * addr)
 {
 	return __kernel_ldbu(*(vucp)addr);
 }
 
-__EXTERN_INLINE unsigned long pyxis_readw(unsigned long addr)
+__EXTERN_INLINE unsigned long pyxis_readw(volatile void * addr)
 {
 	return __kernel_ldwu(*(vusp)addr);
 }
 
-__EXTERN_INLINE unsigned long pyxis_readl(unsigned long addr)
+__EXTERN_INLINE unsigned long pyxis_readl(volatile void * addr)
 {
 	return *(vuip)addr;
 }
 
-__EXTERN_INLINE unsigned long pyxis_readq(unsigned long addr)
+__EXTERN_INLINE unsigned long pyxis_readq(volatile void * addr)
 {
 	return *(vulp)addr;
 }
 
-__EXTERN_INLINE void pyxis_writeb(unsigned char b, unsigned long addr)
+__EXTERN_INLINE void pyxis_writeb(unsigned char b, volatile void * addr)
 {
 	__kernel_stb(b, *(vucp)addr);
 }
 
-__EXTERN_INLINE void pyxis_writew(unsigned short b, unsigned long addr)
+__EXTERN_INLINE void pyxis_writew(unsigned short b, volatile void * addr)
 {
 	__kernel_stw(b, *(vusp)addr);
 }
 
-__EXTERN_INLINE void pyxis_writel(unsigned int b, unsigned long addr)
+__EXTERN_INLINE void pyxis_writel(unsigned int b, volatile void * addr)
 {
 	*(vuip)addr = b;
 }
 
-__EXTERN_INLINE void pyxis_writeq(unsigned long b, unsigned long addr)
+__EXTERN_INLINE void pyxis_writeq(unsigned long b, volatile void * addr)
 {
 	*(vulp)addr = b;
 }
@@ -443,10 +443,10 @@
 #define __raw_readw(addr)	__readw((addr))
 #define __raw_writeb(b, addr)	__writeb((b),(addr))
 #define __raw_writew(b, addr)	__writew((b),(addr))
-#define __raw_readl(a)		__readl((unsigned long)(a))
-#define __raw_readq(a)		__readq((unsigned long)(a))
-#define __raw_writel(v,a)	__writel((v),(unsigned long)(a))
-#define __raw_writeq(v,a)	__writeq((v),(unsigned long)(a))
+#define __raw_readl(a)		__readl((a))
+#define __raw_readq(a)		__readq((a))
+#define __raw_writel(v,a)	__writel((v),(a))
+#define __raw_writeq(v,a)	__writeq((v),(a))
 
 #endif /* __WANT_IO_DEF */
 
diff -ur linux-23029p1/include/asm-alpha/core_t2.h linux-23029p1m2/include/asm-alpha/core_t2.h
--- linux-23029p1/include/asm-alpha/core_t2.h	Tue Aug 31 20:50:45 1999
+++ linux-23029p1m2/include/asm-alpha/core_t2.h	Mon Nov 22 20:14:23 1999
@@ -420,8 +420,9 @@
  *
  */
 
-__EXTERN_INLINE unsigned long t2_readb(unsigned long addr)
+__EXTERN_INLINE unsigned long t2_readb(volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	unsigned long result, msb;
 
 	msb = addr & 0xE0000000;
@@ -432,8 +433,9 @@
 	return __kernel_extbl(result, addr & 3);
 }
 
-__EXTERN_INLINE unsigned long t2_readw(unsigned long addr)
+__EXTERN_INLINE unsigned long t2_readw(volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	unsigned long result, msb;
 
 	msb = addr & 0xE0000000;
@@ -445,8 +447,9 @@
 }
 
 /* On SABLE with T2, we must use SPARSE memory even for 32-bit access. */
-__EXTERN_INLINE unsigned long t2_readl(unsigned long addr)
+__EXTERN_INLINE unsigned long t2_readl(volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	unsigned long msb;
 
 	msb = addr & 0xE0000000;
@@ -456,8 +459,9 @@
 	return *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x18);
 }
 
-__EXTERN_INLINE unsigned long t2_readq(unsigned long addr)
+__EXTERN_INLINE unsigned long t2_readq(volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	unsigned long r0, r1, work, msb;
 
 	msb = addr & 0xE0000000;
@@ -470,8 +474,9 @@
 	return r1 << 32 | r0;
 }
 
-__EXTERN_INLINE void t2_writeb(unsigned char b, unsigned long addr)
+__EXTERN_INLINE void t2_writeb(unsigned char b, volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	unsigned long msb, w;
 
 	msb = addr & 0xE0000000;
@@ -482,8 +487,9 @@
 	*(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x00) = w;
 }
 
-__EXTERN_INLINE void t2_writew(unsigned short b, unsigned long addr)
+__EXTERN_INLINE void t2_writew(unsigned short b, volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	unsigned long msb, w;
 
 	msb = addr & 0xE0000000;
@@ -495,8 +501,9 @@
 }
 
 /* On SABLE with T2, we must use SPARSE memory even for 32-bit access. */
-__EXTERN_INLINE void t2_writel(unsigned int b, unsigned long addr)
+__EXTERN_INLINE void t2_writel(unsigned int b, volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	unsigned long msb;
 
 	msb = addr & 0xE0000000;
@@ -506,9 +513,10 @@
 	*(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x18) = b;
 }
 
-__EXTERN_INLINE void t2_writeq(unsigned long b, unsigned long addr)
+__EXTERN_INLINE void t2_writeq(unsigned long b, volatile void * iaddr)
 {
 	unsigned long msb, work;
+	unsigned long addr = (unsigned long) iaddr;
 
 	msb = addr & 0xE0000000;
 	addr &= T2_MEM_R1_MASK;
diff -ur linux-23029p1/include/asm-alpha/core_tsunami.h linux-23029p1m2/include/asm-alpha/core_tsunami.h
--- linux-23029p1/include/asm-alpha/core_tsunami.h	Thu Sep  2 01:34:01 1999
+++ linux-23029p1m2/include/asm-alpha/core_tsunami.h	Mon Nov 22 13:45:47 1999
@@ -390,42 +390,42 @@
 	return addr >= TSUNAMI_BASE;
 }
 
-__EXTERN_INLINE unsigned long tsunami_readb(unsigned long addr)
+__EXTERN_INLINE unsigned long tsunami_readb(volatile void * addr)
 {
 	return __kernel_ldbu(*(vucp)addr);
 }
 
-__EXTERN_INLINE unsigned long tsunami_readw(unsigned long addr)
+__EXTERN_INLINE unsigned long tsunami_readw(volatile void * addr)
 {
 	return __kernel_ldwu(*(vusp)addr);
 }
 
-__EXTERN_INLINE unsigned long tsunami_readl(unsigned long addr)
+__EXTERN_INLINE unsigned long tsunami_readl(volatile void * addr)
 {
 	return *(vuip)addr;
 }
 
-__EXTERN_INLINE unsigned long tsunami_readq(unsigned long addr)
+__EXTERN_INLINE unsigned long tsunami_readq(volatile void * addr)
 {
 	return *(vulp)addr;
 }
 
-__EXTERN_INLINE void tsunami_writeb(unsigned char b, unsigned long addr)
+__EXTERN_INLINE void tsunami_writeb(unsigned char b, volatile void * addr)
 {
 	__kernel_stb(b, *(vucp)addr);
 }
 
-__EXTERN_INLINE void tsunami_writew(unsigned short b, unsigned long addr)
+__EXTERN_INLINE void tsunami_writew(unsigned short b, volatile void * addr)
 {
 	__kernel_stw(b, *(vusp)addr);
 }
 
-__EXTERN_INLINE void tsunami_writel(unsigned int b, unsigned long addr)
+__EXTERN_INLINE void tsunami_writel(unsigned int b, volatile void * addr)
 {
 	*(vuip)addr = b;
 }
 
-__EXTERN_INLINE void tsunami_writeq(unsigned long b, unsigned long addr)
+__EXTERN_INLINE void tsunami_writeq(unsigned long b, volatile void * addr)
 {
 	*(vulp)addr = b;
 }
@@ -464,14 +464,14 @@
 #define outw(v, port)	__outw((v),(port))
 #define outl(v, port)	__outl((v),(port))
 
-#define __raw_readb(a)		__readb((unsigned long)(a))
-#define __raw_readw(a)		__readw((unsigned long)(a))
-#define __raw_readl(a)		__readl((unsigned long)(a))
-#define __raw_readq(a)		__readq((unsigned long)(a))
-#define __raw_writeb(v,a)	__writeb((v),(unsigned long)(a))
-#define __raw_writew(v,a)	__writew((v),(unsigned long)(a))
-#define __raw_writel(v,a)	__writel((v),(unsigned long)(a))
-#define __raw_writeq(v,a)	__writeq((v),(unsigned long)(a))
+#define __raw_readb(a)		__readb((a))
+#define __raw_readw(a)		__readw((a))
+#define __raw_readl(a)		__readl((a))
+#define __raw_readq(a)		__readq((a))
+#define __raw_writeb(v,a)	__writeb((v),(a))
+#define __raw_writew(v,a)	__writew((v),(a))
+#define __raw_writel(v,a)	__writel((v),(a))
+#define __raw_writeq(v,a)	__writeq((v),(a))
 
 #endif /* __WANT_IO_DEF */
 
diff -ur linux-23029p1/include/asm-alpha/io.h linux-23029p1m2/include/asm-alpha/io.h
--- linux-23029p1/include/asm-alpha/io.h	Tue Aug 31 20:50:45 1999
+++ linux-23029p1m2/include/asm-alpha/io.h	Mon Nov 22 20:14:23 1999
@@ -95,14 +95,14 @@
 # define __outw		alpha_mv.mv_outw
 # define __outl		alpha_mv.mv_outl
 
-# define __readb(a)	alpha_mv.mv_readb((unsigned long)(a))
-# define __readw(a)	alpha_mv.mv_readw((unsigned long)(a))
-# define __readl(a)	alpha_mv.mv_readl((unsigned long)(a))
-# define __readq(a)	alpha_mv.mv_readq((unsigned long)(a))
-# define __writeb(v,a)	alpha_mv.mv_writeb((v),(unsigned long)(a))
-# define __writew(v,a)	alpha_mv.mv_writew((v),(unsigned long)(a))
-# define __writel(v,a)	alpha_mv.mv_writel((v),(unsigned long)(a))
-# define __writeq(v,a)	alpha_mv.mv_writeq((v),(unsigned long)(a))
+# define __readb(a)	alpha_mv.mv_readb((a))
+# define __readw(a)	alpha_mv.mv_readw((a))
+# define __readl(a)	alpha_mv.mv_readl((a))
+# define __readq(a)	alpha_mv.mv_readq((a))
+# define __writeb(v,a)	alpha_mv.mv_writeb((v),(a))
+# define __writew(v,a)	alpha_mv.mv_writew((v),(a))
+# define __writel(v,a)	alpha_mv.mv_writel((v),(a))
+# define __writeq(v,a)	alpha_mv.mv_writeq((v),(a))
 
 # define __ioremap(a)	alpha_mv.mv_ioremap(a)
 # define __is_ioaddr(a)	alpha_mv.mv_is_ioaddr(a)
@@ -170,14 +170,14 @@
 extern void		_outb (unsigned char b,unsigned long port);
 extern void		_outw (unsigned short w,unsigned long port);
 extern void		_outl (unsigned int l,unsigned long port);
-extern unsigned long	_readb(unsigned long addr);
-extern unsigned long	_readw(unsigned long addr);
-extern unsigned long	_readl(unsigned long addr);
-extern unsigned long	_readq(unsigned long addr);
-extern void		_writeb(unsigned char b, unsigned long addr);
-extern void		_writew(unsigned short b, unsigned long addr);
-extern void		_writel(unsigned int b, unsigned long addr);
-extern void		_writeq(unsigned long b, unsigned long addr);
+extern unsigned long	_readb(volatile void * addr);
+extern unsigned long	_readw(volatile void * addr);
+extern unsigned long	_readl(volatile void * addr);
+extern unsigned long	_readq(volatile void * addr);
+extern void		_writeb(unsigned char b,  volatile void * addr);
+extern void		_writew(unsigned short b, volatile void * addr);
+extern void		_writel(unsigned int b,   volatile void * addr);
+extern void		_writeq(unsigned long b,  volatile void * addr);
 
 #ifdef __KERNEL__
 /*
@@ -234,12 +234,12 @@
 extern void		outb (unsigned char b,unsigned long port);
 extern void		outw (unsigned short w,unsigned long port);
 extern void		outl (unsigned int l,unsigned long port);
-extern unsigned long	readb(unsigned long addr);
-extern unsigned long	readw(unsigned long addr);
-extern unsigned long	readl(unsigned long addr);
-extern void		writeb(unsigned char b, unsigned long addr);
-extern void		writew(unsigned short b, unsigned long addr);
-extern void		writel(unsigned int b, unsigned long addr);
+extern unsigned long	readb(volatile void * addr);
+extern unsigned long	readw(volatile void * addr);
+extern unsigned long	readl(volatile void * addr);
+extern void		writeb(unsigned char b,  volatile void * addr);
+extern void		writew(unsigned short b, volatile void * addr);
+extern void		writel(unsigned int b,   volatile void * addr);
 
 #endif /* __KERNEL__ */
 
@@ -264,14 +264,14 @@
 
 /* Indirect back to the macros provided.  */
 
-extern unsigned long	___raw_readb(unsigned long addr);
-extern unsigned long	___raw_readw(unsigned long addr);
-extern unsigned long	___raw_readl(unsigned long addr);
-extern unsigned long	___raw_readq(unsigned long addr);
-extern void		___raw_writeb(unsigned char b, unsigned long addr);
-extern void		___raw_writew(unsigned short b, unsigned long addr);
-extern void		___raw_writel(unsigned int b, unsigned long addr);
-extern void		___raw_writeq(unsigned long b, unsigned long addr);
+extern unsigned long	___raw_readb(volatile void * addr);
+extern unsigned long	___raw_readw(volatile void * addr);
+extern unsigned long	___raw_readl(volatile void * addr);
+extern unsigned long	___raw_readq(volatile void * addr);
+extern void		___raw_writeb(unsigned char b,  volatile void * addr);
+extern void		___raw_writew(unsigned short b, volatile void * addr);
+extern void		___raw_writel(unsigned int b,   volatile void * addr);
+extern void		___raw_writeq(unsigned long b,  volatile void * addr);
 
 #ifdef __raw_readb
 # define readb(a)	({ unsigned long r_ = __raw_readb(a); mb(); r_; })
@@ -300,55 +300,55 @@
 #endif
 
 #ifndef __raw_readb
-# define __raw_readb(a)	___raw_readb((unsigned long)(a))
+# define __raw_readb(a)	___raw_readb((a))
 #endif
 #ifndef __raw_readw
-# define __raw_readw(a)	___raw_readw((unsigned long)(a))
+# define __raw_readw(a)	___raw_readw((a))
 #endif
 #ifndef __raw_readl
-# define __raw_readl(a)	___raw_readl((unsigned long)(a))
+# define __raw_readl(a)	___raw_readl((a))
 #endif
 #ifndef __raw_readq
-# define __raw_readq(a)	___raw_readq((unsigned long)(a))
+# define __raw_readq(a)	___raw_readq((a))
 #endif
 
 #ifndef __raw_writeb
-# define __raw_writeb(v,a)  ___raw_writeb((v),(unsigned long)(a))
+# define __raw_writeb(v,a)  ___raw_writeb((v),(a))
 #endif
 #ifndef __raw_writew
-# define __raw_writew(v,a)  ___raw_writew((v),(unsigned long)(a))
+# define __raw_writew(v,a)  ___raw_writew((v),(a))
 #endif
 #ifndef __raw_writel
-# define __raw_writel(v,a)  ___raw_writel((v),(unsigned long)(a))
+# define __raw_writel(v,a)  ___raw_writel((v),(a))
 #endif
 #ifndef __raw_writeq
-# define __raw_writeq(v,a)  ___raw_writeq((v),(unsigned long)(a))
+# define __raw_writeq(v,a)  ___raw_writeq((v),(a))
 #endif
 
 #ifndef readb
-# define readb(a)	_readb((unsigned long)(a))
+# define readb(a)	_readb((a))
 #endif
 #ifndef readw
-# define readw(a)	_readw((unsigned long)(a))
+# define readw(a)	_readw((a))
 #endif
 #ifndef readl
-# define readl(a)	_readl((unsigned long)(a))
+# define readl(a)	_readl((a))
 #endif
 #ifndef readq
-# define readq(a)	_readq((unsigned long)(a))
+# define readq(a)	_readq((a))
 #endif
 
 #ifndef writeb
-# define writeb(v,a)	_writeb((v),(unsigned long)(a))
+# define writeb(v,a)	_writeb((v),(a))
 #endif
 #ifndef writew
-# define writew(v,a)	_writew((v),(unsigned long)(a))
+# define writew(v,a)	_writew((v),(a))
 #endif
 #ifndef writel
-# define writel(v,a)	_writel((v),(unsigned long)(a))
+# define writel(v,a)	_writel((v),(a))
 #endif
 #ifndef writeq
-# define writeq(v,a)	_writeq((v),(unsigned long)(a))
+# define writeq(v,a)	_writeq((v),(a))
 #endif
 
 /*
@@ -389,7 +389,7 @@
   memcpy_fromio((skb)->data,(src),(len))
 
 static inline int
-check_signature(unsigned long io_addr, const unsigned char *signature,
+check_signature(void * io_addr, const unsigned char *signature,
 		int length)
 {
 	int retval = 0;
diff -ur linux-23029p1/include/asm-alpha/jensen.h linux-23029p1m2/include/asm-alpha/jensen.h
--- linux-23029p1/include/asm-alpha/jensen.h	Mon Aug 16 20:33:58 1999
+++ linux-23029p1m2/include/asm-alpha/jensen.h	Mon Nov 22 14:45:25 1999
@@ -221,8 +221,9 @@
  * Memory functions.
  */
 
-__EXTERN_INLINE unsigned long jensen_readb(unsigned long addr)
+__EXTERN_INLINE unsigned long jensen_readb(volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	long result;
 
 	jensen_set_hae(addr);
@@ -232,8 +233,9 @@
 	return 0xffUL & result;
 }
 
-__EXTERN_INLINE unsigned long jensen_readw(unsigned long addr)
+__EXTERN_INLINE unsigned long jensen_readw(volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	long result;
 
 	jensen_set_hae(addr);
@@ -243,15 +245,17 @@
 	return 0xffffUL & result;
 }
 
-__EXTERN_INLINE unsigned long jensen_readl(unsigned long addr)
+__EXTERN_INLINE unsigned long jensen_readl(volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	jensen_set_hae(addr);
 	addr &= JENSEN_HAE_MASK;
 	return *(vuip) ((addr << 7) + EISA_MEM + 0x60);
 }
 
-__EXTERN_INLINE unsigned long jensen_readq(unsigned long addr)
+__EXTERN_INLINE unsigned long jensen_readq(volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	unsigned long r0, r1;
 
 	jensen_set_hae(addr);
@@ -262,29 +266,33 @@
 	return r1 << 32 | r0;
 }
 
-__EXTERN_INLINE void jensen_writeb(unsigned char b, unsigned long addr)
+__EXTERN_INLINE void jensen_writeb(unsigned char b, volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	jensen_set_hae(addr);
 	addr &= JENSEN_HAE_MASK;
 	*(vuip) ((addr << 7) + EISA_MEM + 0x00) = b * 0x01010101;
 }
 
-__EXTERN_INLINE void jensen_writew(unsigned short b, unsigned long addr)
+__EXTERN_INLINE void jensen_writew(unsigned short b, volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	jensen_set_hae(addr);
 	addr &= JENSEN_HAE_MASK;
 	*(vuip) ((addr << 7) + EISA_MEM + 0x20) = b * 0x00010001;
 }
 
-__EXTERN_INLINE void jensen_writel(unsigned int b, unsigned long addr)
+__EXTERN_INLINE void jensen_writel(unsigned int b, volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	jensen_set_hae(addr);
 	addr &= JENSEN_HAE_MASK;
 	*(vuip) ((addr << 7) + EISA_MEM + 0x60) = b;
 }
 
-__EXTERN_INLINE void jensen_writeq(unsigned long b, unsigned long addr)
+__EXTERN_INLINE void jensen_writeq(unsigned long b, volatile void * iaddr)
 {
+	unsigned long addr = (unsigned long) iaddr;
 	jensen_set_hae(addr);
 	addr &= JENSEN_HAE_MASK;
 	addr = (addr << 7) + EISA_MEM + 0x60;
diff -ur linux-23029p1/include/asm-alpha/machvec.h linux-23029p1m2/include/asm-alpha/machvec.h
--- linux-23029p1/include/asm-alpha/machvec.h	Tue Aug 31 20:50:45 1999
+++ linux-23029p1m2/include/asm-alpha/machvec.h	Mon Nov 22 20:14:23 1999
@@ -46,19 +46,19 @@
 	unsigned int (*mv_inw)(unsigned long);
 	unsigned int (*mv_inl)(unsigned long);
 
-	void (*mv_outb)(unsigned char, unsigned long);
+	void (*mv_outb)(unsigned char,  unsigned long);
 	void (*mv_outw)(unsigned short, unsigned long);
-	void (*mv_outl)(unsigned int, unsigned long);
+	void (*mv_outl)(unsigned int,   unsigned long);
 	
-	unsigned long (*mv_readb)(unsigned long);
-	unsigned long (*mv_readw)(unsigned long);
-	unsigned long (*mv_readl)(unsigned long);
-	unsigned long (*mv_readq)(unsigned long);
+	unsigned long (*mv_readb)(volatile void *);
+	unsigned long (*mv_readw)(volatile void *);
+	unsigned long (*mv_readl)(volatile void *);
+	unsigned long (*mv_readq)(volatile void *);
 
-	void (*mv_writeb)(unsigned char, unsigned long);
-	void (*mv_writew)(unsigned short, unsigned long);
-	void (*mv_writel)(unsigned int, unsigned long);
-	void (*mv_writeq)(unsigned long, unsigned long);
+	void (*mv_writeb)(unsigned char,  volatile void *);
+	void (*mv_writew)(unsigned short, volatile void *);
+	void (*mv_writel)(unsigned int,   volatile void *);
+	void (*mv_writeq)(unsigned long,  volatile void *);
 
 	unsigned long (*mv_ioremap)(unsigned long);
 	int (*mv_is_ioaddr)(unsigned long);
diff -ur linux-23029p1/include/asm-alpha/posix_types.h linux-23029p1m2/include/asm-alpha/posix_types.h
--- linux-23029p1/include/asm-alpha/posix_types.h	Fri Aug 21 16:33:36 1998
+++ linux-23029p1m2/include/asm-alpha/posix_types.h	Sun Nov 21 15:36:00 1999
@@ -8,7 +8,7 @@
  */
 
 typedef unsigned int	__kernel_dev_t;
-typedef unsigned int	__kernel_ino_t;
+typedef unsigned long	__kernel_ino_t;
 typedef unsigned int	__kernel_mode_t;
 typedef unsigned int	__kernel_nlink_t;
 typedef long		__kernel_off_t;
diff -ur linux-23029p1/include/asm-alpha/processor.h linux-23029p1m2/include/asm-alpha/processor.h
--- linux-23029p1/include/asm-alpha/processor.h	Tue Nov  9 00:28:34 1999
+++ linux-23029p1m2/include/asm-alpha/processor.h	Sun Nov 21 15:17:13 1999
@@ -130,8 +130,29 @@
 /*
 * See arch/alpha/kernel/ptrace.c for details.
 */
-#define PT_REG(reg)		(PAGE_SIZE - sizeof(struct pt_regs)	\
-				 + (long)&((struct pt_regs *)0)->reg)
+/*
+ * Processes always block with the following stack-layout:
+ *
+ *  +================================+ <---- task + 2*PAGE_SIZE
+ *  | PALcode saved frame (ps, pc,   | ^
+ *  | gp, a0, a1, a2)		     | |
+ *  +================================+ | struct pt_regs
+ *  |	        		     | |
+ *  | frame generated by SAVE_ALL    | |
+ *  |	        		     | v
+ *  +================================+
+ *  |	        		     | ^
+ *  | frame saved by do_switch_stack | | struct switch_stack
+ *  |	        		     | v
+ *  +================================+
+ */
+#define PT_REG(reg)	(PAGE_SIZE*2 - sizeof(struct pt_regs)		\
+			 + (long)&((struct pt_regs *)0)->reg)
+
+#define SW_REG(reg)	(PAGE_SIZE*2 - sizeof(struct pt_regs)		\
+			 - sizeof(struct switch_stack)			\
+			 + (long)&((struct switch_stack *)0)->reg)
+
 #define KSTK_EIP(tsk) \
     (*(unsigned long *)(PT_REG(pc) + PAGE_SIZE + (unsigned long)(tsk)))
 #define KSTK_ESP(tsk)	((tsk) == current ? rdusp() : (tsk)->thread.usp)
diff -ur linux-23029p1/include/asm-alpha/system.h linux-23029p1m2/include/asm-alpha/system.h
--- linux-23029p1/include/asm-alpha/system.h	Tue Aug 31 21:30:48 1999
+++ linux-23029p1m2/include/asm-alpha/system.h	Mon Nov 22 20:14:23 1999
@@ -17,19 +17,19 @@
  * With a few other pages for various reasons, we'll use an initial
  * load address of PAGE_OFFSET+0x310000UL
  */
-#define BOOT_PCB	0x20000000
-#define BOOT_ADDR	0x20000000
+#define BOOT_PCB	0x20000000UL
+#define BOOT_ADDR	0x20000000UL
 /* Remove when official MILO sources have ELF support: */
 #define BOOT_SIZE	(16*1024)
 
 #define KERNEL_START	(PAGE_OFFSET+0x300000)
 #define SWAPPER_PGD	(PAGE_OFFSET+0x300000)
 #define INIT_STACK	(PAGE_OFFSET+0x302000)
-#define EMPTY_PGT	(PAGE_OFFSET+0x304000)
-#define EMPTY_PGE	(PAGE_OFFSET+0x308000)
-#define ZERO_PGE	(PAGE_OFFSET+0x30A000)
+#define EMPTY_PGT	((char*)(PAGE_OFFSET+0x304000UL))
+#define EMPTY_PGE	((char*)(PAGE_OFFSET+0x308000UL))
+#define ZERO_PGE	((char*)(PAGE_OFFSET+0x30A000UL))
 
-#define START_ADDR	(PAGE_OFFSET+0x310000)
+#define START_ADDR	(PAGE_OFFSET+0x310000UL)
 
 #ifndef __ASSEMBLY__
 
diff -ur linux-23029p1/include/asm-alpha/vga.h linux-23029p1m2/include/asm-alpha/vga.h
--- linux-23029p1/include/asm-alpha/vga.h	Tue Aug 31 20:50:48 1999
+++ linux-23029p1m2/include/asm-alpha/vga.h	Mon Nov 22 20:15:39 1999
@@ -13,10 +13,10 @@
 #define VT_BUF_HAVE_MEMSETW
 #define VT_BUF_HAVE_MEMCPYF
 
-extern inline void scr_writew(u16 val, u16 *addr)
+extern inline void scr_writew(u16 val, volatile u16 *addr)
 {
 	if (__is_ioaddr((unsigned long) addr))
-		__raw_writew(val, (unsigned long) addr);
+		__raw_writew(val, addr);
 	else
 		*addr = val;
 }
@@ -24,7 +24,7 @@
 extern inline u16 scr_readw(const u16 *addr)
 {
 	if (__is_ioaddr((unsigned long) addr))
-		return __raw_readw((unsigned long) addr);
+		return __raw_readw((volatile void *)addr);
 	else
 		return *addr;
 }
diff -ur linux-23029p1/kernel/acct.c linux-23029p1m2/kernel/acct.c
--- linux-23029p1/kernel/acct.c	Mon Aug 23 21:15:53 1999
+++ linux-23029p1m2/kernel/acct.c	Fri Nov 19 15:01:48 1999
@@ -257,8 +257,6 @@
  *  into the accounting file. This function should only be called from
  *  do_exit().
  */
-#define KSTK_EIP(stack) (((unsigned long *)(stack))[1019])
-#define KSTK_ESP(stack) (((unsigned long *)(stack))[1022])
 
 /*
  *  do_acct_process does all actual work.
diff -ur linux-23029p1/net/sunrpc/svcsock.c linux-23029p1m2/net/sunrpc/svcsock.c
--- linux-23029p1/net/sunrpc/svcsock.c	Mon Aug 23 20:01:02 1999
+++ linux-23029p1m2/net/sunrpc/svcsock.c	Sun Nov 21 15:43:53 1999
@@ -268,7 +268,7 @@
 
 	dprintk("svc: socket %p sendto([%p %d... ], %d, %d) = %d\n",
 			rqstp->rq_sock,
-			iov[0].iov_base, iov[0].iov_len, nr,
+			iov[0].iov_base, (int)iov[0].iov_len, nr,
 			buflen, len);
 
 	return len;
@@ -327,7 +327,7 @@
 #endif
 
 	dprintk("svc: socket %p recvfrom(%p, %d) = %d\n", rqstp->rq_sock,
-				iov[0].iov_base, iov[0].iov_len, len);
+				iov[0].iov_base, (int)iov[0].iov_len, len);
 
 	return len;
 }
