Date: Sat, 24 Feb 2007 15:02:52 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 114972 for review Message-ID: <200702241502.l1OF2qen045810@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=114972 Change 114972 by jhb@jhb_zion on 2007/02/24 15:02:19 IFC @114971. Affected files ... .. //depot/projects/smpng/sys/boot/i386/cdboot/cdboot.s#6 integrate .. //depot/projects/smpng/sys/compat/linux/linux_emul.c#7 integrate .. //depot/projects/smpng/sys/compat/linux/linux_misc.c#79 integrate .. //depot/projects/smpng/sys/conf/files#198 integrate .. //depot/projects/smpng/sys/dev/fdc/fdc.c#28 integrate .. //depot/projects/smpng/sys/dev/isp/isp.c#54 integrate .. //depot/projects/smpng/sys/dev/isp/isp_freebsd.h#38 integrate .. //depot/projects/smpng/sys/dev/isp/isp_pci.c#51 integrate .. //depot/projects/smpng/sys/dev/isp/isp_sbus.c#22 integrate .. //depot/projects/smpng/sys/dev/isp/ispmbox.h#26 integrate .. //depot/projects/smpng/sys/dev/isp/ispreg.h#10 integrate .. //depot/projects/smpng/sys/dev/mpt/mpt.h#20 integrate .. //depot/projects/smpng/sys/dev/mpt/mpt_pci.c#31 integrate .. //depot/projects/smpng/sys/dev/pdq/if_fea.c#11 integrate .. //depot/projects/smpng/sys/dev/ppc/ppc.c#15 integrate .. //depot/projects/smpng/sys/dev/si/si_eisa.c#6 integrate .. //depot/projects/smpng/sys/dev/wl/if_wl.c#30 integrate .. //depot/projects/smpng/sys/geom/geom_dev.c#42 integrate .. //depot/projects/smpng/sys/geom/geom_io.c#45 integrate .. //depot/projects/smpng/sys/i386/linux/linux_machdep.c#43 integrate .. //depot/projects/smpng/sys/i4b/capi/iavc/iavc_isa.c#12 integrate .. //depot/projects/smpng/sys/i4b/capi/iavc/iavc_pci.c#13 integrate .. //depot/projects/smpng/sys/i4b/layer1/ifpi/i4b_ifpi_pci.c#13 integrate .. //depot/projects/smpng/sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c#15 integrate .. //depot/projects/smpng/sys/i4b/layer1/ifpnp/i4b_ifpnp_avm.c#10 integrate .. //depot/projects/smpng/sys/i4b/layer1/ihfc/i4b_ihfc_pnp.c#7 integrate .. //depot/projects/smpng/sys/i4b/layer1/isic/i4b_avm_a1.c#6 integrate .. //depot/projects/smpng/sys/i4b/layer1/isic/i4b_elsa_pcc16.c#7 integrate .. //depot/projects/smpng/sys/i4b/layer1/isic/i4b_elsa_qs1p.c#10 integrate .. //depot/projects/smpng/sys/i4b/layer1/isic/i4b_isic_pnp.c#9 integrate .. //depot/projects/smpng/sys/i4b/layer1/isic/i4b_itk_ix1.c#7 integrate .. //depot/projects/smpng/sys/i4b/layer1/isic/i4b_tel_s016.c#7 integrate .. //depot/projects/smpng/sys/i4b/layer1/isic/i4b_tel_s0163.c#6 integrate .. //depot/projects/smpng/sys/i4b/layer1/isic/i4b_tel_s08.c#7 integrate .. //depot/projects/smpng/sys/i4b/layer1/isic/i4b_usr_sti.c#6 integrate .. //depot/projects/smpng/sys/i4b/layer1/itjc/i4b_itjc_pci.c#17 integrate .. //depot/projects/smpng/sys/i4b/layer1/iwic/i4b_iwic_pci.c#10 integrate .. //depot/projects/smpng/sys/kern/subr_rman.c#32 integrate .. //depot/projects/smpng/sys/modules/ip_mroute_mod/Makefile#8 integrate .. //depot/projects/smpng/sys/netinet/ip_mroute.c#52 integrate .. //depot/projects/smpng/sys/netinet6/in6.c#39 integrate .. //depot/projects/smpng/sys/netinet6/in6_proto.c#18 integrate .. //depot/projects/smpng/sys/netinet6/ip6_input.c#47 integrate .. //depot/projects/smpng/sys/netinet6/ip6_mroute.c#28 integrate .. //depot/projects/smpng/sys/netinet6/ip6_mroute.h#6 integrate .. //depot/projects/smpng/sys/netinet6/ip6_var.h#19 integrate .. //depot/projects/smpng/sys/netinet6/raw_ip6.c#42 integrate .. //depot/projects/smpng/sys/pc98/cbus/olpt.c#3 integrate .. //depot/projects/smpng/sys/pci/if_sis.c#64 integrate .. //depot/projects/smpng/sys/pci/if_sisreg.h#19 integrate .. //depot/projects/smpng/sys/ufs/ffs/ffs_alloc.c#46 integrate .. //depot/projects/smpng/sys/ufs/ffs/ffs_softdep.c#60 integrate Differences ... ==== //depot/projects/smpng/sys/boot/i386/cdboot/cdboot.s#6 (text+ko) ==== @@ -27,7 +27,7 @@ # SUCH DAMAGE. # -# $FreeBSD: src/sys/boot/i386/cdboot/cdboot.s,v 1.16 2006/04/11 17:36:08 jhb Exp $ +# $FreeBSD: src/sys/boot/i386/cdboot/cdboot.s,v 1.17 2007/02/23 21:07:44 remko Exp $ # # This program is a freestanding boot program to load an a.out binary @@ -472,7 +472,7 @@ twiddle: push %ax # Save push %bx # Save mov twiddle_index,%al # Load index - mov twiddle_chars,%bx # Address table + mov $twiddle_chars,%bx # Address table inc %al # Next and $3,%al # char mov %al,twiddle_index # Save index for next call ==== //depot/projects/smpng/sys/compat/linux/linux_emul.c#7 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_emul.c,v 1.15 2007/02/02 08:58:16 kib Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_emul.c,v 1.17 2007/02/23 22:39:26 netchild Exp $"); #include "opt_compat.h" @@ -168,26 +168,29 @@ /* reparent all procs that are not a thread leader to initproc */ if (em->shared->group_pid != p->p_pid) { - sx_xlock(&proctree_lock); - wakeup(initproc); + child_clear_tid = em->child_clear_tid; + EMUL_UNLOCK(&emul_lock); + sx_xlock(&proctree_lock); + wakeup(initproc); PROC_LOCK(p); proc_reparent(p, initproc); p->p_sigparent = SIGCHLD; PROC_UNLOCK(p); - sx_xunlock(&proctree_lock); + sx_xunlock(&proctree_lock); + } else { + child_clear_tid = em->child_clear_tid; + EMUL_UNLOCK(&emul_lock); } - child_clear_tid = em->child_clear_tid; - - EMUL_UNLOCK(&emul_lock); - EMUL_SHARED_WLOCK(&emul_shared_lock); LIST_REMOVE(em, threads); em->shared->refs--; - if (em->shared->refs == 0) + if (em->shared->refs == 0) { + EMUL_SHARED_WUNLOCK(&emul_shared_lock); free(em->shared, M_LINUX); - EMUL_SHARED_WUNLOCK(&emul_shared_lock); + } else + EMUL_SHARED_WUNLOCK(&emul_shared_lock); if (child_clear_tid != NULL) { struct linux_sys_futex_args cup; @@ -272,9 +275,11 @@ PROC_UNLOCK(p); em->shared->refs--; - if (em->shared->refs == 0) + if (em->shared->refs == 0) { + EMUL_SHARED_WUNLOCK(&emul_shared_lock); free(em->shared, M_LINUX); - EMUL_SHARED_WUNLOCK(&emul_shared_lock); + } else + EMUL_SHARED_WUNLOCK(&emul_shared_lock); free(em, M_LINUX); } ==== //depot/projects/smpng/sys/compat/linux/linux_misc.c#79 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.206 2007/02/01 13:33:33 kib Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.207 2007/02/23 22:39:26 netchild Exp $"); #include "opt_compat.h" #include "opt_mac.h" @@ -1642,6 +1642,7 @@ struct proc *p = td->td_proc; char comm[LINUX_MAX_COMM_LEN]; struct linux_emuldata *em; + int pdeath_signal; #ifdef DEBUG if (ldebug(prctl)) @@ -1661,10 +1662,11 @@ case LINUX_PR_GET_PDEATHSIG: em = em_find(p, EMUL_DOLOCK); KASSERT(em != NULL, ("prctl: emuldata not found.\n")); - error = copyout(&em->pdeath_signal, + pdeath_signal = em->pdeath_signal; + EMUL_UNLOCK(&emul_lock); + error = copyout(&pdeath_signal, (void *)(register_t)args->arg2, - sizeof(em->pdeath_signal)); - EMUL_UNLOCK(&emul_lock); + sizeof(pdeath_signal)); break; case LINUX_PR_SET_NAME: /* ==== //depot/projects/smpng/sys/conf/files#198 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1177 2007/02/15 01:28:22 rwatson Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1178 2007/02/24 11:38:47 bms Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -1760,7 +1760,7 @@ netinet/ip_input.c optional inet netinet/ip_ipsec.c optional ipsec netinet/ip_ipsec.c optional fast_ipsec -netinet/ip_mroute.c optional mrouting +netinet/ip_mroute.c optional mrouting inet | mrouting inet6 netinet/ip_options.c optional inet netinet/ip_output.c optional inet netinet/raw_ip.c optional inet @@ -1815,7 +1815,7 @@ netinet6/ip6_forward.c optional inet6 netinet6/ip6_id.c optional inet6 netinet6/ip6_input.c optional inet6 -netinet6/ip6_mroute.c optional inet6 +netinet6/ip6_mroute.c optional mrouting inet6 netinet6/ip6_output.c optional inet6 netinet6/ipcomp_core.c optional ipsec netinet6/ipcomp_input.c optional ipsec ==== //depot/projects/smpng/sys/dev/fdc/fdc.c#28 (text+ko) ==== @@ -51,7 +51,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/fdc/fdc.c,v 1.315 2007/02/23 12:18:40 piso Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/fdc/fdc.c,v 1.316 2007/02/23 23:06:10 jhb Exp $"); #include "opt_fdc.h" @@ -790,7 +790,7 @@ if (fdc->flags & FDC_NEEDS_RESET) { fdc->flags &= ~FDC_NEEDS_RESET; fdc_reset(fdc); - msleep(fdc, NULL, PRIBIO, "fdcrst", hz); + tsleep(fdc, PRIBIO, "fdcrst", hz); /* Discard results */ for (i = 0; i < 4; i++) fdc_sense_int(fdc, &st0, &cyl); @@ -855,7 +855,7 @@ retry_line = __LINE__; if (fdc_cmd(fdc, 2, NE7CMD_RECAL, fd->fdsu, 0)) return (1); - msleep(fdc, NULL, PRIBIO, "fdrecal", hz); + tsleep(fdc, PRIBIO, "fdrecal", hz); retry_line = __LINE__; if (fdc_sense_int(fdc, &st0, &cyl) == FD_NOT_VALID) return (1); /* XXX */ @@ -867,7 +867,7 @@ retry_line = __LINE__; if (fdc_cmd(fdc, 3, NE7CMD_SEEK, fd->fdsu, 1, 0)) return (1); - msleep(fdc, NULL, PRIBIO, "fdseek", hz); + tsleep(fdc, PRIBIO, "fdseek", hz); retry_line = __LINE__; if (fdc_sense_int(fdc, &st0, &cyl) == FD_NOT_VALID) return (1); /* XXX */ @@ -956,7 +956,7 @@ retry_line = __LINE__; if (fdc_cmd(fdc, 2, NE7CMD_RECAL, fd->fdsu, 0)) return (1); - msleep(fdc, NULL, PRIBIO, "fdrecal", hz); + tsleep(fdc, PRIBIO, "fdrecal", hz); retry_line = __LINE__; if (fdc_sense_int(fdc, &st0, &cyl) == FD_NOT_VALID) return (1); /* XXX */ @@ -967,7 +967,7 @@ fd->track = 0; /* let the heads settle */ if (settle) - msleep(fdc->fd, NULL, PRIBIO, "fdhdstl", settle); + tsleep(fdc->fd, PRIBIO, "fdhdstl", settle); } /* @@ -983,7 +983,7 @@ retry_line = __LINE__; if (fdc_cmd(fdc, 3, NE7CMD_SEEK, fd->fdsu, descyl, 0)) return (1); - msleep(fdc, NULL, PRIBIO, "fdseek", hz); + tsleep(fdc, PRIBIO, "fdseek", hz); retry_line = __LINE__; if (fdc_sense_int(fdc, &st0, &cyl) == FD_NOT_VALID) return (1); /* XXX */ @@ -994,7 +994,7 @@ } /* let the heads settle */ if (settle) - msleep(fdc->fd, NULL, PRIBIO, "fdhdstl", settle); + tsleep(fdc->fd, PRIBIO, "fdhdstl", settle); } fd->track = cylinder; @@ -1080,7 +1080,7 @@ } /* Wait for interrupt */ - i = msleep(fdc, NULL, PRIBIO, "fddata", hz); + i = tsleep(fdc, PRIBIO, "fddata", hz); /* PIO if the read looks good */ if (i == 0 && (fdc->flags & FDC_NODMA) && (bp->bio_cmd & BIO_READ)) @@ -1279,7 +1279,7 @@ fd_enqueue(fd, bp); do { - msleep(bp, NULL, PRIBIO, "fdwait", hz); + tsleep(bp, PRIBIO, "fdwait", hz); } while (!(bp->bio_flags & BIO_DONE)); error = bp->bio_error; ==== //depot/projects/smpng/sys/dev/isp/isp.c#54 (text+ko) ==== @@ -43,7 +43,7 @@ #endif #ifdef __FreeBSD__ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/isp/isp.c,v 1.138 2007/02/23 05:39:58 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/isp/isp.c,v 1.139 2007/02/23 21:59:21 mjacob Exp $"); #include <dev/isp/isp_freebsd.h> #endif #ifdef __OpenBSD__ @@ -1555,6 +1555,7 @@ fcparam *fcp; isp_icb_t local, *icbp = &local; mbreg_t mbs; + int ownloopid; uint64_t nwwn, pwwn; fcp = isp->isp_param; @@ -1630,25 +1631,17 @@ icbp->icb_retry_delay = fcp->isp_retry_delay; icbp->icb_retry_count = fcp->isp_retry_count; icbp->icb_hardaddr = fcp->isp_loopid; + ownloopid = (isp->isp_confopts & ISP_CFG_OWNLOOPID) != 0; if (icbp->icb_hardaddr > 125) { - /* - * We end up with these Loop IDs for F-Port topologies - */ - if (icbp->icb_hardaddr != 0xff && - icbp->icb_hardaddr != 0x800 && - icbp->icb_hardaddr != 0xffff) { - isp_prt(isp, ISP_LOGERR, - "bad hard address %u- resetting to zero", - icbp->icb_hardaddr); - icbp->icb_hardaddr = 0; - } + icbp->icb_hardaddr = 0; + ownloopid = 0; } /* * Our life seems so much better with 2200s and later with * the latest f/w if we set Hard Address. */ - if (ISP_FW_NEWER_THAN(isp, 2, 2, 5)) { + if (ownloopid || ISP_FW_NEWER_THAN(isp, 2, 2, 5)) { icbp->icb_fwoptions |= ICBOPT_HARD_ADDRESS; } @@ -1800,6 +1793,7 @@ isp_mboxcmd(isp, &mbs); FC_SCRATCH_RELEASE(isp); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { + isp_print_bytes(isp, "isp_fibre_init", sizeof (*icbp), icbp); return; } isp->isp_reqidx = 0; @@ -1818,6 +1812,7 @@ fcparam *fcp; isp_icb_2400_t local, *icbp = &local; mbreg_t mbs; + int ownloopid; uint64_t nwwn, pwwn; fcp = isp->isp_param; @@ -1886,21 +1881,12 @@ icbp->icb_fwoptions1 = fcp->isp_fwoptions; icbp->icb_hardaddr = fcp->isp_loopid; + ownloopid = (isp->isp_confopts & ISP_CFG_OWNLOOPID) != 0; if (icbp->icb_hardaddr > 125) { - /* - * We end up with these Loop IDs for F-Port topologies - */ - if (icbp->icb_hardaddr != 0xff && - icbp->icb_hardaddr != 0x800 && - icbp->icb_hardaddr != 0xffff) { - isp_prt(isp, ISP_LOGERR, - "bad hard address %u- resetting to zero", - icbp->icb_hardaddr); - icbp->icb_hardaddr = 0; - } + icbp->icb_hardaddr = 0; + ownloopid = 0; } - - if (isp->isp_confopts & ISP_CFG_OWNLOOPID) { + if (ownloopid) { icbp->icb_fwoptions1 |= ICB2400_OPT1_HARD_ADDRESS; } @@ -2280,7 +2266,6 @@ "isp_plogi_old: portid 0x%06x already logged in as %u", portid, mbs.param[1]); return (MBOX_PORT_ID_USED | (mbs.param[1] << 16)); - break; case MBOX_LOOP_ID_USED: isp_prt(isp, ISP_LOGDEBUG0, @@ -2963,19 +2948,17 @@ /* * Check to make sure it's still a valid entry. The 24XX seems * to return a portid but not a WWPN/WWNN or role for devices - * which shift on a loop, or have a WWPN/WWNN but no portid. + * which shift on a loop. */ if (tmp.node_wwn == 0 || tmp.port_wwn == 0 || tmp.portid == 0) { - if (isp->isp_dblev & ISP_LOGSANCFG) { - int a, b, c; - a = !(tmp.node_wwn == 0); - b = !(tmp.port_wwn == 0); - c = !(tmp.portid == 0); - isp_prt(isp, ISP_LOGALL, - "bad pdb (%1d%1d%1d) @ handle 0x%x", - a, b, c, handle); - isp_dump_portdb(isp); - } + int a, b, c; + a = (tmp.node_wwn == 0); + b = (tmp.port_wwn == 0); + c = (tmp.portid == 0); + isp_prt(isp, ISP_LOGWARN, + "bad pdb (%1d%1d%1d) @ handle 0x%x", a, b, c, + handle); + isp_dump_portdb(isp); continue; } @@ -4576,7 +4559,6 @@ if ((IS_FC(isp) && mbox != ASYNC_RIO_RESP) || isp->isp_state != ISP_RUNSTATE) { goto out; - return; } } @@ -7523,11 +7505,11 @@ for (loops = 0; loops < 5000; loops++) { USEC_DELAY(10); tmp = ISP_READ(isp, BIU2400_FLASH_ADDR); - if ((tmp & (1 << 31)) != 0) { + if ((tmp & (1U << 31)) != 0) { break; } } - if (tmp & (1 << 31)) { + if (tmp & (1U << 31)) { tmp = ISP_READ(isp, BIU2400_FLASH_DATA); *rp = tmp; } else { ==== //depot/projects/smpng/sys/dev/isp/isp_freebsd.h#38 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/isp/isp_freebsd.h,v 1.99 2007/02/15 17:21:30 luigi Exp $ */ +/* $FreeBSD: src/sys/dev/isp/isp_freebsd.h,v 1.100 2007/02/23 23:13:46 mjacob Exp $ */ /*- * Qlogic ISP SCSI Host Adapter FreeBSD Wrapper Definitions * @@ -492,6 +492,12 @@ bus_dma_tag_create(a, b, c, d, e, f, g, h, i, j, k, \ busdma_lock_mutex, &Giant, z) #endif +#if __FreeBSD_version < 700031 +#define isp_setup_intr(d, i, f, U, if, ifa, hp) \ + bus_setup_intr(d, i, f, if, ifa, hp) +#else +#define isp_setup_intr bus_setup_intr +#endif /* Should be BUS_SPACE_MAXSIZE, but MAXPHYS is larger than BUS_SPACE_MAXSIZE */ #define ISP_NSEGS ((MAXPHYS / PAGE_SIZE) + 1) ==== //depot/projects/smpng/sys/dev/isp/isp_pci.c#51 (text+ko) ==== @@ -30,7 +30,7 @@ * FreeBSD Version. */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.136 2007/02/23 12:18:44 piso Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.137 2007/02/23 23:13:46 mjacob Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1170,7 +1170,8 @@ locksetup++; #endif - if (bus_setup_intr(dev, irq, ISP_IFLAGS, NULL, isp_pci_intr, isp, &pcs->ih)) { + if (isp_setup_intr(dev, irq, ISP_IFLAGS, NULL, isp_pci_intr, isp, + &pcs->ih)) { device_printf(dev, "could not setup interrupt\n"); goto bad; } ==== //depot/projects/smpng/sys/dev/isp/isp_sbus.c#22 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/isp/isp_sbus.c,v 1.28 2007/02/23 12:18:44 piso Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/isp/isp_sbus.c,v 1.29 2007/02/23 23:13:46 mjacob Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -311,7 +311,7 @@ goto bad; } - if (bus_setup_intr(dev, sbs->sbus_ires, ISP_IFLAGS, + if (isp_setup_intr(dev, sbs->sbus_ires, ISP_IFLAGS, NULL, isp_sbus_intr, isp, &sbs->ih)) { device_printf(dev, "could not setup interrupt\n"); goto bad; ==== //depot/projects/smpng/sys/dev/isp/ispmbox.h#26 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/isp/ispmbox.h,v 1.57 2006/12/17 16:59:19 mjacob Exp $ */ +/* $FreeBSD: src/sys/dev/isp/ispmbox.h,v 1.58 2007/02/23 21:59:21 mjacob Exp $ */ /*- * Mailbox and Queue Entry Definitions for for Qlogic ISP SCSI adapters. * @@ -643,7 +643,7 @@ uint16_t ms_flags; uint16_t ms_reserved1; /* low 8 bits */ uint16_t ms_time; - uint16_t ms_cmd_cnt; /* Command DSD count */; + uint16_t ms_cmd_cnt; /* Command DSD count */ uint16_t ms_tot_cnt; /* Total DSD Count */ uint8_t ms_type; /* MS type */ uint8_t ms_r_ctl; /* R_CTL */ ==== //depot/projects/smpng/sys/dev/isp/ispreg.h#10 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/isp/ispreg.h,v 1.27 2006/11/02 03:21:31 mjacob Exp $ */ +/* $FreeBSD: src/sys/dev/isp/ispreg.h,v 1.28 2007/02/23 21:59:21 mjacob Exp $ */ /*- * Machine Independent (well, as best as possible) register * definitions for Qlogic ISP SCSI adapters. @@ -409,14 +409,14 @@ /* BIU2400_HCCR definitions */ -#define HCCR_2400_CMD_NOP (0x0 << 28) -#define HCCR_2400_CMD_RESET (0x1 << 28) -#define HCCR_2400_CMD_CLEAR_RESET (0x2 << 28) -#define HCCR_2400_CMD_PAUSE (0x3 << 28) -#define HCCR_2400_CMD_RELEASE (0x4 << 28) -#define HCCR_2400_CMD_SET_HOST_INT (0x5 << 28) -#define HCCR_2400_CMD_CLEAR_HOST_INT (0x6 << 28) -#define HCCR_2400_CMD_CLEAR_RISC_INT (0xA << 28) +#define HCCR_2400_CMD_NOP 0x00000000 +#define HCCR_2400_CMD_RESET 0x10000000 +#define HCCR_2400_CMD_CLEAR_RESET 0x20000000 +#define HCCR_2400_CMD_PAUSE 0x30000000 +#define HCCR_2400_CMD_RELEASE 0x40000000 +#define HCCR_2400_CMD_SET_HOST_INT 0x50000000 +#define HCCR_2400_CMD_CLEAR_HOST_INT 0x60000000 +#define HCCR_2400_CMD_CLEAR_RISC_INT 0xA0000000 #define HCCR_2400_RISC_ERR(x) (((x) >> 12) & 0x7) /* RO */ #define HCCR_2400_RISC2HOST_INT (1 << 6) /* RO */ ==== //depot/projects/smpng/sys/dev/mpt/mpt.h#20 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/mpt/mpt.h,v 1.37 2007/01/05 22:49:05 mjacob Exp $ */ +/* $FreeBSD: src/sys/dev/mpt/mpt.h,v 1.38 2007/02/23 23:13:46 mjacob Exp $ */ /*- * Generic defines for LSI '909 FC adapters. * FreeBSD Version. @@ -258,6 +258,13 @@ }; void mpt_map_rquest(void *, bus_dma_segment_t *, int, int); +/* **************************** NewBUS interrupt Crock ************************/ +#if __FreeBSD_version < 700031 +#define mpt_setup_intr(d, i, f, U, if, ifa, hp) \ + bus_setup_intr(d, i, f, if, ifa, hp) +#else +#define mpt_setup_intr bus_setup_intr +#endif /**************************** Kernel Thread Support ***************************/ #if __FreeBSD_version > 500005 ==== //depot/projects/smpng/sys/dev/mpt/mpt_pci.c#31 (text+ko) ==== @@ -99,7 +99,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt_pci.c,v 1.48 2007/02/23 12:18:46 piso Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt_pci.c,v 1.49 2007/02/23 23:13:46 mjacob Exp $"); #include <dev/mpt/mpt.h> #include <dev/mpt/mpt_cam.h> @@ -563,7 +563,7 @@ mpt_disable_ints(mpt); /* Register the interrupt handler */ - if (bus_setup_intr(dev, mpt->pci_irq, MPT_IFLAGS, NULL, mpt_pci_intr, + if (mpt_setup_intr(dev, mpt->pci_irq, MPT_IFLAGS, NULL, mpt_pci_intr, mpt, &mpt->ih)) { device_printf(dev, "could not setup interrupt\n"); goto bad; ==== //depot/projects/smpng/sys/dev/pdq/if_fea.c#11 (text+ko) ==== @@ -21,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/pdq/if_fea.c,v 1.29 2005/11/11 07:36:13 ru Exp $ + * $FreeBSD: src/sys/dev/pdq/if_fea.c,v 1.30 2007/02/23 20:11:25 piso Exp $ */ /* @@ -235,7 +235,7 @@ } error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET, - pdq_eisa_ifintr, dev, &sc->irq_ih); + NULL, pdq_eisa_ifintr, dev, &sc->irq_ih); if (error) { device_printf(dev, "Failed to setup interrupt handler.\n"); error = ENXIO; ==== //depot/projects/smpng/sys/dev/ppc/ppc.c#15 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ppc/ppc.c,v 1.54 2007/02/23 16:25:08 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ppc/ppc.c,v 1.55 2007/02/23 23:05:31 jhb Exp $"); #include "opt_ppc.h" @@ -71,7 +71,7 @@ #define DEVTOSOFTC(dev) ((struct ppc_data *)device_get_softc(dev)) devclass_t ppc_devclass; -const char ppc_driver_name[] = "ppc"; +const char ppc_driver_name[] = "ppc"; static char *ppc_models[] = { "SMC-like", "SMC FDC37C665GT", "SMC FDC37C666GT", "PC87332", "PC87306", ==== //depot/projects/smpng/sys/dev/si/si_eisa.c#6 (text+ko) ==== @@ -20,7 +20,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/si/si_eisa.c,v 1.6 2005/01/06 01:43:14 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/si/si_eisa.c,v 1.7 2007/02/23 20:11:27 piso Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -102,7 +102,7 @@ } sc->sc_irq = rman_get_start(sc->sc_irq_res); error = bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_TTY, - si_intr, sc,&ih); + NULL, si_intr, sc,&ih); if (error) { device_printf(dev, "couldn't activate interrupt"); goto fail; ==== //depot/projects/smpng/sys/dev/wl/if_wl.c#30 (text+ko) ==== @@ -173,7 +173,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/wl/if_wl.c,v 1.74 2006/11/06 13:41:56 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/wl/if_wl.c,v 1.75 2007/02/23 20:11:27 piso Exp $"); /* * NOTE: @@ -573,7 +573,7 @@ printf(", Freq %d MHz",sc->freq24); /* 2.4 Gz */ printf("\n"); /* 2.4 Gz */ - bus_setup_intr(device, sc->res_irq, INTR_TYPE_NET, wlintr, sc, &sc->intr_cookie); + bus_setup_intr(device, sc->res_irq, INTR_TYPE_NET, NULL, wlintr, sc, &sc->intr_cookie); if (bootverbose) wldump(sc); ==== //depot/projects/smpng/sys/geom/geom_dev.c#42 (text+ko) ==== @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/geom/geom_dev.c,v 1.90 2006/06/18 22:01:15 simon Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/geom_dev.c,v 1.91 2007/02/23 23:06:10 jhb Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -416,7 +416,7 @@ /* Wait for the cows to come home */ while (cp->nstart != cp->nend) - msleep(&dev, NULL, PRIBIO, "gdevorphan", hz / 10); + tsleep(&dev, PRIBIO, "gdevorphan", hz / 10); if (cp->acr > 0 || cp->acw > 0 || cp->ace > 0) g_access(cp, -cp->acr, -cp->acw, -cp->ace); ==== //depot/projects/smpng/sys/geom/geom_io.c#45 (text+ko) ==== @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/geom/geom_io.c,v 1.72 2007/01/28 23:36:07 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/geom_io.c,v 1.73 2007/02/23 23:06:10 jhb Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -492,7 +492,7 @@ g_bioq_unlock(&g_bio_run_down); if (pace > 0) { CTR1(KTR_GEOM, "g_down pacing self (pace %d)", pace); - msleep(&error, NULL, PRIBIO, "g_down", hz/10); + tsleep(&error, PRIBIO, "g_down", hz/10); pace--; } error = g_io_check(bp); ==== //depot/projects/smpng/sys/i386/linux/linux_machdep.c#43 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/i386/linux/linux_machdep.c,v 1.70 2007/02/15 00:54:40 jkim Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/linux/linux_machdep.c,v 1.71 2007/02/23 22:39:26 netchild Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -435,6 +435,10 @@ if ((args->flags & 0xffffff00) == THREADING_FLAGS) ff |= RFTHREAD; + if (args->flags & CLONE_PARENT_SETTID) + if (args->parent_tidptr == NULL) + return (EINVAL); + error = fork1(td, ff, 0, &p2); if (error) return (error); @@ -453,17 +457,6 @@ em = em_find(p2, EMUL_DOLOCK); KASSERT(em != NULL, ("clone: emuldata not found.\n")); /* and adjust it */ - if (args->flags & CLONE_PARENT_SETTID) { - if (args->parent_tidptr == NULL) { - EMUL_UNLOCK(&emul_lock); - return (EINVAL); - } - error = copyout(&p2->p_pid, args->parent_tidptr, sizeof(p2->p_pid)); - if (error) { - EMUL_UNLOCK(&emul_lock); - return (error); - } - } if (args->flags & CLONE_THREAD) { /* XXX: linux mangles pgrp and pptr somehow @@ -489,6 +482,12 @@ EMUL_UNLOCK(&emul_lock); + if (args->flags & CLONE_PARENT_SETTID) { + error = copyout(&p2->p_pid, args->parent_tidptr, sizeof(p2->p_pid)); + if (error) + printf(LMSG("copyout failed!")); + } + PROC_LOCK(p2); p2->p_sigparent = exit_signal; PROC_UNLOCK(p2); @@ -507,34 +506,37 @@ struct segment_descriptor sd; error = copyin((void *)td->td_frame->tf_esi, &info, sizeof(struct l_user_desc)); - if (error) - return (error); + if (error) { + printf(LMSG("copyin failed!")); + } else { - idx = info.entry_number; + idx = info.entry_number; - /* - * looks like we're getting the idx we returned - * in the set_thread_area() syscall - */ - if (idx != 6 && idx != 3) - return (EINVAL); + /* + * looks like we're getting the idx we returned + * in the set_thread_area() syscall + */ + if (idx != 6 && idx != 3) { + printf(LMSG("resetting idx!")); + idx = 3; + } - /* this doesnt happen in practice */ - if (idx == 6) { - /* we might copy out the entry_number as 3 */ - info.entry_number = 3; - error = copyout(&info, (void *) td->td_frame->tf_esi, sizeof(struct l_user_desc)); - if (error) - return (error); - } + /* this doesnt happen in practice */ + if (idx == 6) { + /* we might copy out the entry_number as 3 */ + info.entry_number = 3; + error = copyout(&info, (void *) td->td_frame->tf_esi, sizeof(struct l_user_desc)); + if (error) + printf(LMSG("copyout failed!")); + } - a[0] = LDT_entry_a(&info); - a[1] = LDT_entry_b(&info); + a[0] = LDT_entry_a(&info); + a[1] = LDT_entry_b(&info); - memcpy(&sd, &a, sizeof(a)); + memcpy(&sd, &a, sizeof(a)); #ifdef DEBUG - if (ldebug(clone)) - printf("Segment created in clone with CLONE_SETTLS: lobase: %x, hibase: %x, lolimit: %x, hilimit: %x, type: %i, dpl: %i, p: %i, xx: %i, def32: %i, gran: %i\n", sd.sd_lobase, + if (ldebug(clone)) + printf("Segment created in clone with CLONE_SETTLS: lobase: %x, hibase: %x, lolimit: %x, hilimit: %x, type: %i, dpl: %i, p: %i, xx: %i, def32: %i, gran: %i\n", sd.sd_lobase, sd.sd_hibase, sd.sd_lolimit, sd.sd_hilimit, @@ -546,9 +548,10 @@ sd.sd_gran); #endif - /* set %gs */ - td2->td_pcb->pcb_gsd = sd; - td2->td_pcb->pcb_gs = GSEL(GUGS_SEL, SEL_UPL); + /* set %gs */ + td2->td_pcb->pcb_gsd = sd; + td2->td_pcb->pcb_gs = GSEL(GUGS_SEL, SEL_UPL); + } } #ifdef DEBUG ==== //depot/projects/smpng/sys/i4b/capi/iavc/iavc_isa.c#12 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/i4b/capi/iavc/iavc_isa.c,v 1.10 2006/05/16 14:37:57 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/i4b/capi/iavc/iavc_isa.c,v 1.11 2007/02/23 20:11:26 piso Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -243,7 +243,7 @@ /* setup the interrupt */ if(bus_setup_intr(dev, sc->sc_resources.irq, INTR_TYPE_NET, - (void(*)(void*))iavc_isa_intr, + NULL, (void(*)(void*))iavc_isa_intr, sc, &ih)) { printf("iavc%d: irq setup failed\n", unit); ==== //depot/projects/smpng/sys/i4b/capi/iavc/iavc_pci.c#13 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/i4b/capi/iavc/iavc_pci.c,v 1.11 2006/05/16 14:37:57 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/i4b/capi/iavc/iavc_pci.c,v 1.12 2007/02/23 20:11:26 piso Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -250,7 +250,7 @@ /* setup the interrupt */ if(bus_setup_intr(dev, sc->sc_resources.irq, INTR_TYPE_NET, - (void(*)(void*))iavc_pci_intr, + NULL, (void(*)(void*))iavc_pci_intr, sc, &ih)) { printf("iavc%d: irq setup failed\n", unit); return(ENXIO); ==== //depot/projects/smpng/sys/i4b/layer1/ifpi/i4b_ifpi_pci.c#13 (text+ko) ==== @@ -39,7 +39,7 @@ *---------------------------------------------------------------------------*/ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/i4b/layer1/ifpi/i4b_ifpi_pci.c,v 1.17 2005/01/06 22:18:19 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/i4b/layer1/ifpi/i4b_ifpi_pci.c,v 1.18 2007/02/24 02:28:07 piso Exp $"); #include "opt_i4b.h" @@ -540,7 +540,7 @@ goto fail; } - error = bus_setup_intr(dev, sc->sc_resources.irq, INTR_TYPE_NET, avma1pp_intr, sc, &ih); + error = bus_setup_intr(dev, sc->sc_resources.irq, INTR_TYPE_NET, NULL, avma1pp_intr, sc, &ih); if (error) { bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_resources.irq); ==== //depot/projects/smpng/sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c#15 (text+ko) ==== @@ -38,7 +38,7 @@ *---------------------------------------------------------------------------*/ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c,v 1.17 2005/01/06 22:18:19 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/i4b/layer1/ifpi2/i4b_ifpi2_pci.c,v 1.18 2007/02/23 20:11:26 piso Exp $"); #include "opt_i4b.h" @@ -495,7 +495,7 @@ goto fail; } - error = bus_setup_intr(dev, sc->sc_resources.irq, INTR_TYPE_NET, avma1pp2_intr, sc, &ih); + error = bus_setup_intr(dev, sc->sc_resources.irq, INTR_TYPE_NET, NULL, avma1pp2_intr, sc, &ih); if (error) { bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_resources.irq); ==== //depot/projects/smpng/sys/i4b/layer1/ifpnp/i4b_ifpnp_avm.c#10 (text+ko) ==== @@ -38,7 +38,7 @@ *---------------------------------------------------------------------------*/ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/i4b/layer1/ifpnp/i4b_ifpnp_avm.c,v 1.12 2005/01/06 22:18:19 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/i4b/layer1/ifpnp/i4b_ifpnp_avm.c,v 1.13 2007/02/23 20:11:26 piso Exp $"); #include "opt_i4b.h" @@ -516,7 +516,7 @@ /* not needed */ sc->sc_irq = rman_get_start(sc->sc_resources.irq); bus_setup_intr(dev,sc->sc_resources.irq,INTR_TYPE_NET, - (void(*)(void*))avm_pnp_intr, sc,&ih); + NULL, (void(*)(void*))avm_pnp_intr, sc,&ih); sc->sc_unit = unit; /* end of new-bus stuff */ ==== //depot/projects/smpng/sys/i4b/layer1/ihfc/i4b_ihfc_pnp.c#7 (text+ko) ==== @@ -36,7 +36,7 @@ *---------------------------------------------------------------------------*/ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/i4b/layer1/ihfc/i4b_ihfc_pnp.c,v 1.10 2005/01/06 22:18:20 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/i4b/layer1/ihfc/i4b_ihfc_pnp.c,v 1.11 2007/02/23 20:11:26 piso Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -206,7 +206,7 @@ /* setup interrupt routine now to avvoid stray * * interrupts. */ - bus_setup_intr(dev, S_IRQ, INTR_TYPE_NET, (void(*)(void*)) + bus_setup_intr(dev, S_IRQ, INTR_TYPE_NET, NULL, (void(*)(void*)) HFC_INTR, sc, &dummy); flag = 1; @@ -298,7 +298,7 @@ /* setup interrupt routine now to avvoid stray * * interrupts. */ - bus_setup_intr(dev, S_IRQ, INTR_TYPE_NET, (void(*)(void*)) + bus_setup_intr(dev, S_IRQ, INTR_TYPE_NET, NULL, (void(*)(void*)) HFC_INTR, sc, &dummy); flag = 1; >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702241502.l1OF2qen045810>