diff options
-rw-r--r-- | sys/dev/ic/i82586.h | 4 | ||||
-rw-r--r-- | sys/dev/ie/if_ie.c | 24 | ||||
-rw-r--r-- | sys/dev/isp/isp_pci.c | 6 | ||||
-rw-r--r-- | sys/i386/isa/aha1542.c | 6 | ||||
-rw-r--r-- | sys/i386/isa/ic/i82586.h | 4 | ||||
-rw-r--r-- | sys/i386/isa/if_ie.c | 24 | ||||
-rw-r--r-- | sys/pci/isp_pci.c | 6 | ||||
-rw-r--r-- | sys/pci/scsiiom.c | 2 |
8 files changed, 42 insertions, 34 deletions
diff --git a/sys/dev/ic/i82586.h b/sys/dev/ic/i82586.h index dd8f9cb..c1504fe 100644 --- a/sys/dev/ic/i82586.h +++ b/sys/dev/ic/i82586.h @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: i82586.h,v 1.5 1997/02/22 09:38:02 peter Exp $ + * $Id: i82586.h,v 1.6 1998/04/15 17:45:58 bde Exp $ */ /* @@ -311,7 +311,7 @@ ie_setup_config(volatile struct ie_config_cmd *cmd, static __inline caddr_t Align(caddr_t ptr) { - unsigned long l = (unsigned long)ptr; + uintptr_t l = (uintptr_t)ptr; l = (l + 3) & ~3L; return (caddr_t)l; } diff --git a/sys/dev/ie/if_ie.c b/sys/dev/ie/if_ie.c index aa629d6..f894dc5 100644 --- a/sys/dev/ie/if_ie.c +++ b/sys/dev/ie/if_ie.c @@ -47,7 +47,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ie.c,v 1.54 1998/07/13 09:52:59 bde Exp $ + * $Id: if_ie.c,v 1.55 1998/08/10 14:27:32 bde Exp $ */ /* @@ -325,8 +325,8 @@ static struct ie_softc { u_short irq_encoded; /* encoded interrupt on IEE16 */ } ie_softc[NIE]; -#define MK_24(base, ptr) ((caddr_t)((u_long)ptr - (u_long)base)) -#define MK_16(base, ptr) ((u_short)(u_long)MK_24(base, ptr)) +#define MK_24(base, ptr) ((caddr_t)((uintptr_t)ptr - (uintptr_t)base)) +#define MK_16(base, ptr) ((u_short)(uintptr_t)MK_24(base, ptr)) #define PORT ie_softc[unit].port #define MEM ie_softc[unit].iomem @@ -1633,9 +1633,10 @@ check_ie_present(int unit, caddr_t where, unsigned size) s = splimp(); - realbase = (u_long) where + size - (1 << 24); + realbase = (uintptr_t) where + size - (1 << 24); - scp = (volatile struct ie_sys_conf_ptr *) (realbase + IE_SCP_ADDR); + scp = (volatile struct ie_sys_conf_ptr *) (uintptr_t) + (realbase + IE_SCP_ADDR); bzero((char *) scp, sizeof *scp); /* @@ -1652,7 +1653,8 @@ check_ie_present(int unit, caddr_t where, unsigned size) scp->ie_bus_use = ie_softc[unit].bus_use; /* 8-bit or 16-bit */ scp->ie_iscp_ptr = (caddr_t) ((volatile caddr_t) iscp - - (volatile caddr_t) realbase); + (volatile caddr_t) (volatile uintptr_t) + realbase); iscp->ie_busy = 1; iscp->ie_scb_offset = MK_16(realbase, scb) + 256; @@ -1670,11 +1672,13 @@ check_ie_present(int unit, caddr_t where, unsigned size) * Now relocate the ISCP to its real home, and reset the controller * again. */ - iscp = (void *) Align((caddr_t) (realbase + IE_SCP_ADDR - - sizeof(struct ie_int_sys_conf_ptr))); + iscp = (void *) Align((caddr_t) (uintptr_t) + (realbase + IE_SCP_ADDR - + sizeof(struct ie_int_sys_conf_ptr))); bzero((char *) iscp, sizeof *iscp); /* ignore cast-qual */ - scp->ie_iscp_ptr = (caddr_t) ((caddr_t) iscp - (caddr_t) realbase); + scp->ie_iscp_ptr = (caddr_t) ((caddr_t) iscp - + (caddr_t) (uintptr_t) realbase); /* ignore cast-qual */ iscp->ie_busy = 1; @@ -1690,7 +1694,7 @@ check_ie_present(int unit, caddr_t where, unsigned size) return (0); } ie_softc[unit].iosize = size; - ie_softc[unit].iomem = (caddr_t) realbase; + ie_softc[unit].iomem = (caddr_t) (uintptr_t) realbase; ie_softc[unit].iscp = iscp; ie_softc[unit].scb = scb; diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c index fd9778e..e01fce8 100644 --- a/sys/dev/isp/isp_pci.c +++ b/sys/dev/isp/isp_pci.c @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $Id: isp_pci.c,v 1.1 1998/04/22 18:10:34 mjacob Exp $ */ +/* $Id: isp_pci.c,v 1.2 1998/07/13 09:53:09 bde Exp $ */ /* * PCI specific probe and attach routines for Qlogic ISP SCSI adapters. * FreeBSD Version. @@ -126,10 +126,10 @@ typedef int bus_space_tag_t; typedef u_long bus_space_handle_t; #define bus_space_read_2(st, sh, offset) \ (st == I386_BUS_SPACE_IO)? \ - inw((u_int16_t)sh + offset) : *((u_int16_t *) sh) + inw((u_int16_t)sh + offset) : *((u_int16_t *)(uintptr_t)sh) #define bus_space_write_2(st, sh, offset, val) \ if (st == I386_BUS_SPACE_IO) outw((u_int16_t)sh + offset, val); else \ - *((u_int16_t *) sh) = val + *((u_int16_t *)(uintptr_t)sh) = val struct isp_pcisoftc { diff --git a/sys/i386/isa/aha1542.c b/sys/i386/isa/aha1542.c index 918c069..b5f17a6 100644 --- a/sys/i386/isa/aha1542.c +++ b/sys/i386/isa/aha1542.c @@ -12,7 +12,7 @@ * on the understanding that TFS is not responsible for the correct * functioning of this software in any circumstances. * - * $Id: aha1542.c,v 1.77 1998/05/01 18:30:00 bde Exp $ + * $Id: aha1542.c,v 1.78 1998/06/21 14:53:07 bde Exp $ */ /* @@ -276,7 +276,7 @@ struct aha_extbios /*********************************** end of board definitions***************/ -#define PHYSTOKV(x) (((long int)(x)) ^ aha->kv_phys_xor) +#define PHYSTOKV(x) ((intptr_t)(((long int)(x)) ^ aha->kv_phys_xor)) #define KVTOPHYS(x) vtophys(x) #define AHA_DMA_PAGES AHA_NSEG @@ -582,7 +582,7 @@ ahaprobe(dev) * span pages) * eventually use the hash table in aha1742.c */ - aha->kv_phys_xor = (long int) aha ^ (KVTOPHYS(aha)); + aha->kv_phys_xor = (intptr_t) aha ^ (KVTOPHYS(aha)); /* * If it's there, put in it's interrupt vectors diff --git a/sys/i386/isa/ic/i82586.h b/sys/i386/isa/ic/i82586.h index dd8f9cb..c1504fe 100644 --- a/sys/i386/isa/ic/i82586.h +++ b/sys/i386/isa/ic/i82586.h @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: i82586.h,v 1.5 1997/02/22 09:38:02 peter Exp $ + * $Id: i82586.h,v 1.6 1998/04/15 17:45:58 bde Exp $ */ /* @@ -311,7 +311,7 @@ ie_setup_config(volatile struct ie_config_cmd *cmd, static __inline caddr_t Align(caddr_t ptr) { - unsigned long l = (unsigned long)ptr; + uintptr_t l = (uintptr_t)ptr; l = (l + 3) & ~3L; return (caddr_t)l; } diff --git a/sys/i386/isa/if_ie.c b/sys/i386/isa/if_ie.c index aa629d6..f894dc5 100644 --- a/sys/i386/isa/if_ie.c +++ b/sys/i386/isa/if_ie.c @@ -47,7 +47,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ie.c,v 1.54 1998/07/13 09:52:59 bde Exp $ + * $Id: if_ie.c,v 1.55 1998/08/10 14:27:32 bde Exp $ */ /* @@ -325,8 +325,8 @@ static struct ie_softc { u_short irq_encoded; /* encoded interrupt on IEE16 */ } ie_softc[NIE]; -#define MK_24(base, ptr) ((caddr_t)((u_long)ptr - (u_long)base)) -#define MK_16(base, ptr) ((u_short)(u_long)MK_24(base, ptr)) +#define MK_24(base, ptr) ((caddr_t)((uintptr_t)ptr - (uintptr_t)base)) +#define MK_16(base, ptr) ((u_short)(uintptr_t)MK_24(base, ptr)) #define PORT ie_softc[unit].port #define MEM ie_softc[unit].iomem @@ -1633,9 +1633,10 @@ check_ie_present(int unit, caddr_t where, unsigned size) s = splimp(); - realbase = (u_long) where + size - (1 << 24); + realbase = (uintptr_t) where + size - (1 << 24); - scp = (volatile struct ie_sys_conf_ptr *) (realbase + IE_SCP_ADDR); + scp = (volatile struct ie_sys_conf_ptr *) (uintptr_t) + (realbase + IE_SCP_ADDR); bzero((char *) scp, sizeof *scp); /* @@ -1652,7 +1653,8 @@ check_ie_present(int unit, caddr_t where, unsigned size) scp->ie_bus_use = ie_softc[unit].bus_use; /* 8-bit or 16-bit */ scp->ie_iscp_ptr = (caddr_t) ((volatile caddr_t) iscp - - (volatile caddr_t) realbase); + (volatile caddr_t) (volatile uintptr_t) + realbase); iscp->ie_busy = 1; iscp->ie_scb_offset = MK_16(realbase, scb) + 256; @@ -1670,11 +1672,13 @@ check_ie_present(int unit, caddr_t where, unsigned size) * Now relocate the ISCP to its real home, and reset the controller * again. */ - iscp = (void *) Align((caddr_t) (realbase + IE_SCP_ADDR - - sizeof(struct ie_int_sys_conf_ptr))); + iscp = (void *) Align((caddr_t) (uintptr_t) + (realbase + IE_SCP_ADDR - + sizeof(struct ie_int_sys_conf_ptr))); bzero((char *) iscp, sizeof *iscp); /* ignore cast-qual */ - scp->ie_iscp_ptr = (caddr_t) ((caddr_t) iscp - (caddr_t) realbase); + scp->ie_iscp_ptr = (caddr_t) ((caddr_t) iscp - + (caddr_t) (uintptr_t) realbase); /* ignore cast-qual */ iscp->ie_busy = 1; @@ -1690,7 +1694,7 @@ check_ie_present(int unit, caddr_t where, unsigned size) return (0); } ie_softc[unit].iosize = size; - ie_softc[unit].iomem = (caddr_t) realbase; + ie_softc[unit].iomem = (caddr_t) (uintptr_t) realbase; ie_softc[unit].iscp = iscp; ie_softc[unit].scb = scb; diff --git a/sys/pci/isp_pci.c b/sys/pci/isp_pci.c index fd9778e..e01fce8 100644 --- a/sys/pci/isp_pci.c +++ b/sys/pci/isp_pci.c @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $Id: isp_pci.c,v 1.1 1998/04/22 18:10:34 mjacob Exp $ */ +/* $Id: isp_pci.c,v 1.2 1998/07/13 09:53:09 bde Exp $ */ /* * PCI specific probe and attach routines for Qlogic ISP SCSI adapters. * FreeBSD Version. @@ -126,10 +126,10 @@ typedef int bus_space_tag_t; typedef u_long bus_space_handle_t; #define bus_space_read_2(st, sh, offset) \ (st == I386_BUS_SPACE_IO)? \ - inw((u_int16_t)sh + offset) : *((u_int16_t *) sh) + inw((u_int16_t)sh + offset) : *((u_int16_t *)(uintptr_t)sh) #define bus_space_write_2(st, sh, offset, val) \ if (st == I386_BUS_SPACE_IO) outw((u_int16_t)sh + offset, val); else \ - *((u_int16_t *) sh) = val + *((u_int16_t *)(uintptr_t)sh) = val struct isp_pcisoftc { diff --git a/sys/pci/scsiiom.c b/sys/pci/scsiiom.c index f178660b..4a7731a 100644 --- a/sys/pci/scsiiom.c +++ b/sys/pci/scsiiom.c @@ -1269,7 +1269,7 @@ NO_DEV: { pACB->DeviceCnt++; pPrevDCB = pDCB; - pACB->pDCB_free = (PDCB) ((ULONG) (pACB->pDCB_free) + sizeof( DC390_DCB )); + pACB->pDCB_free = (PDCB) ((uintptr_t) (pACB->pDCB_free) + sizeof( DC390_DCB )); pDCB->DevType = bval1; if(bval1 == SCSI_DASD || bval1 == SCSI_OPTICAL) { |