diff options
author | pc157239 <none@none> | 2005-09-06 07:01:36 -0700 |
---|---|---|
committer | pc157239 <none@none> | 2005-09-06 07:01:36 -0700 |
commit | 29df58e566c5f2275271512cbe9348ca89223745 (patch) | |
tree | 6d3f33c611d1299d8280461aac1fc6b30736f90d /usr/src/uts/sun | |
parent | 86632942f304299ddf8de785093de7383cda6137 (diff) | |
download | illumos-gate-29df58e566c5f2275271512cbe9348ca89223745.tar.gz |
6309975 gcc and sun fd don't get along
Diffstat (limited to 'usr/src/uts/sun')
-rw-r--r-- | usr/src/uts/sun/io/fd.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/usr/src/uts/sun/io/fd.c b/usr/src/uts/sun/io/fd.c index 2a5b60b273..f1dc71bb0d 100644 --- a/usr/src/uts/sun/io/fd.c +++ b/usr/src/uts/sun/io/fd.c @@ -1238,8 +1238,8 @@ fd_cleanup(dev_info_t *dip, struct fdctlr *fdc, int hard, int locks) FDERRPRINT(FDEP_L1, FDEM_ATTA, - (C, "fd_cleanup instance: %d ctlr: 0x%x\n", - ddi_get_instance(dip), (int)fdc)); + (C, "fd_cleanup instance: %d ctlr: 0x%p\n", + ddi_get_instance(dip), (void *)fdc)); if (fdc == NULL) { @@ -2432,7 +2432,7 @@ change failed. \n")); fc.fdc_flags = fc32.fdc_flags; fc.fdc_blkno = (daddr_t)fc32.fdc_blkno; fc.fdc_secnt = fc32.fdc_secnt; - fc.fdc_bufaddr = (caddr_t)fc32.fdc_bufaddr; + fc.fdc_bufaddr = (caddr_t)(uintptr_t)fc32.fdc_bufaddr; fc.fdc_buflen = fc32.fdc_buflen; fc.fdc_cmd = fc32.fdc_cmd; @@ -2606,7 +2606,7 @@ fdrawioctl(struct fdctlr *fdc, int unit, intptr_t arg, int mode) bcopy(fdr32.fdr_result, fdr.fdr_result, sizeof (fdr.fdr_result)); fdr.fdr_nbytes = fdr32.fdr_nbytes; - fdr.fdr_addr = (caddr_t)fdr32.fdr_addr; + fdr.fdr_addr = (caddr_t)(uintptr_t)fdr32.fdr_addr; break; #endif default: @@ -2912,7 +2912,7 @@ failed. \n")); bcopy(fdr.fdr_result, fdr32.fdr_result, sizeof (fdr32.fdr_result)); fdr32.fdr_nbytes = fdr.fdr_nbytes; - fdr32.fdr_addr = (caddr32_t)fdr.fdr_addr; + fdr32.fdr_addr = (caddr32_t)(uintptr_t)fdr.fdr_addr; if (ddi_copyout(&fdr32, (caddr_t)arg, sizeof (fdr32), mode)) { FDERRPRINT(FDEP_L1, FDEM_RAWI, (C, "fdrawioctl: can't copy results32\n")); @@ -3323,8 +3323,9 @@ fdstart(struct fdctlr *fdc) /* If platform supports DMA, set up DMA resources */ if (fdc->c_fdtype & FDCTYPE_DMA) { if ((fdc->c_fdtype & FDCTYPE_SB) && - (((uint32_t)addr & 0xFFFF0000) != - (((uint32_t)addr + tlen) & 0xFFFF0000))) { + (((uint32_t)(uintptr_t)addr & 0xFFFF0000) != + (((uint32_t)(uintptr_t)addr + tlen) & + 0xFFFF0000))) { csb->csb_addr = fdc->dma_buf; sb_temp_buf_used = 1; if (csb->csb_read != CSB_READ) { @@ -5903,19 +5904,9 @@ fd_getauxiova(dev_info_t *dip) if (auxdip == NULL) return (NULL); - addr = (caddr_t)(caddr32_t)ddi_getprop(DDI_DEV_T_ANY, + addr = (caddr_t)(uintptr_t)(caddr32_t)ddi_getprop(DDI_DEV_T_ANY, auxdip, DDI_PROP_DONTPASS, "address", 0); - /* - * The device tree on some sun4c machines (SS1+) incorrectly - * reports the "auxiliary-io" as being word wide at an - * aligned address rather than byte wide at an offset of 3. - * Here we correct for this .. - */ - if (strcmp(ddi_get_name(auxdip), "auxiliary-io") == 0 && - (((int)addr & 3) == 0)) - addr += 3; - return (addr); } |