svn commit: r217346 - stable/8/sys/net
Author: bz Date: Thu Jan 13 08:19:09 2011 New Revision: 217346 URL: http://svn.freebsd.org/changeset/base/217346 Log: MFC r215238 (originally by kib): Use 'z' modifier for size_t printing. Should have been merged with r215207 by gnn. Modified: stable/8/sys/net/if_llatbl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/net/if_llatbl.c == --- stable/8/sys/net/if_llatbl.cThu Jan 13 06:48:43 2011 (r217345) +++ stable/8/sys/net/if_llatbl.cThu Jan 13 08:19:09 2011 (r217346) @@ -122,7 +122,7 @@ llentry_free(struct llentry *lle) } KASSERT(lle->la_numheld == 0, - ("%s: la_numheld %d > 0, pkts_droped %ld", __func__, + ("%s: la_numheld %d > 0, pkts_droped %zd", __func__, lle->la_numheld, pkts_dropped)); LLE_FREE_LOCKED(lle); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r217332 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
On Wed, Jan 12, 2011 at 11:06:38PM +, Matthew D Fleming wrote: > Author: mdf > Date: Wed Jan 12 23:06:38 2011 > New Revision: 217332 > URL: http://svn.freebsd.org/changeset/base/217332 > > Log: > Revert cddl changes for sysctl(9) until I understand why this isn't > building on universe. Most ZFS bits are compiled to userland libzpool library. You need to add SYSCTL_UQUAD() to: cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h -- Pawel Jakub Dawidek http://www.wheelsystems.com p...@freebsd.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! pgpE2H0AWlizb.pgp Description: PGP signature
svn commit: r217347 - stable/8/tools/regression/bin/date
Author: keramida (doc committer) Date: Thu Jan 13 11:23:42 2011 New Revision: 217347 URL: http://svn.freebsd.org/changeset/base/217347 Log: MFC r217208 - regression/date: unset all LC_xxx vars and set LANG/LC_ALL When running with a custom locale setup, it's easy to confuse the date regression tests and cause them to fail, e.g. when LANG='C' but LC_ALL='el_GR.UTF-8'. Set LC_ALL to 'C', which overrides all other LC_xxx options, to avoid this sort of problem. Modified: stable/8/tools/regression/bin/date/regress.sh Directory Properties: stable/8/tools/regression/bin/date/ (props changed) Modified: stable/8/tools/regression/bin/date/regress.sh == --- stable/8/tools/regression/bin/date/regress.sh Thu Jan 13 08:19:09 2011(r217346) +++ stable/8/tools/regression/bin/date/regress.sh Thu Jan 13 11:23:42 2011(r217347) @@ -19,7 +19,7 @@ TEST1=343 # 1970-02-07 07:04:03 TEST2=100560 # 2001-11-12 21:11:12 -export LANG=C +export LC_ALL=C export TZ=UTC count=0 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r217348 - stable/7/tools/regression/bin/date
Author: keramida (doc committer) Date: Thu Jan 13 12:26:39 2011 New Revision: 217348 URL: http://svn.freebsd.org/changeset/base/217348 Log: MFC r217208 - regression/date: unset all LC_xxx vars and set LANG/LC_ALL When running with a custom locale setup, it's easy to confuse the date regression tests and cause them to fail, e.g. when LANG='C' but LC_ALL='el_GR.UTF-8'. Set LC_ALL to 'C', which overrides all other LC_xxx options, to avoid this sort of problem. Modified: stable/7/tools/regression/bin/date/regress.sh Directory Properties: stable/7/tools/regression/bin/date/ (props changed) Modified: stable/7/tools/regression/bin/date/regress.sh == --- stable/7/tools/regression/bin/date/regress.sh Thu Jan 13 11:23:42 2011(r217347) +++ stable/7/tools/regression/bin/date/regress.sh Thu Jan 13 12:26:39 2011(r217348) @@ -19,7 +19,7 @@ TEST1=343 # 1970-02-07 07:04:03 TEST2=100560 # 2001-11-12 21:11:12 -export LANG=C +export LC_ALL=C export TZ=UTC count=0 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r217349 - head/sys/dev/age
Author: jhb Date: Thu Jan 13 13:04:49 2011 New Revision: 217349 URL: http://svn.freebsd.org/changeset/base/217349 Log: Forgot to remove unlock of the driver lock from age_start_locked() when converting it to a locked variant. PR: kern/153948 Modified: head/sys/dev/age/if_age.c Modified: head/sys/dev/age/if_age.c == --- head/sys/dev/age/if_age.c Thu Jan 13 12:26:39 2011(r217348) +++ head/sys/dev/age/if_age.c Thu Jan 13 13:04:49 2011(r217349) @@ -1760,8 +1760,6 @@ age_start_locked(struct ifnet *ifp) /* Set a timeout in case the chip goes out to lunch. */ sc->age_watchdog_timer = AGE_TX_TIMEOUT; } - - AGE_UNLOCK(sc); } static void ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r217350 - head/sys/dev/usb
Author: jhb Date: Thu Jan 13 14:15:36 2011 New Revision: 217350 URL: http://svn.freebsd.org/changeset/base/217350 Log: Use software interrupt priorities for USB kthreads instead of hardware interrupt priorities. Reviewed by: hps MFC after:2 weeks Modified: head/sys/dev/usb/usb_process.h Modified: head/sys/dev/usb/usb_process.h == --- head/sys/dev/usb/usb_process.h Thu Jan 13 13:04:49 2011 (r217349) +++ head/sys/dev/usb/usb_process.h Thu Jan 13 14:15:36 2011 (r217350) @@ -27,11 +27,13 @@ #ifndef _USB_PROCESS_H_ #define_USB_PROCESS_H_ +#include #include +#include /* defines */ -#defineUSB_PRI_HIGH PI_NET -#defineUSB_PRI_MED PI_DISK +#defineUSB_PRI_HIGHPI_SWI(SWI_NET) +#defineUSB_PRI_MED PI_SWI(SWI_CAMBIO) #defineUSB_PROC_WAIT_TIMEOUT 2 #defineUSB_PROC_WAIT_DRAIN 1 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r217351 - head/sys/kern
Author: jhb Date: Thu Jan 13 14:22:27 2011 New Revision: 217351 URL: http://svn.freebsd.org/changeset/base/217351 Log: Introduce two new helper macros to define the priority ranges used for interactive timeshare threads (PRI_*_INTERACTIVE) and non-interactive timeshare threads (PRI_*_BATCH) and use these instead of PRI_*_REALTIME and PRI_*_TIMESHARE. No functional change. Reviewed by: jeff Modified: head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_ule.c == --- head/sys/kern/sched_ule.c Thu Jan 13 14:15:36 2011(r217350) +++ head/sys/kern/sched_ule.c Thu Jan 13 14:22:27 2011(r217351) @@ -117,6 +117,15 @@ static struct td_sched td_sched0; CPU_ISSET((cpu), &(td)->td_cpuset->cs_mask) /* + * Priority ranges used for interactive and non-interactive timeshare + * threads. Interactive threads use realtime priorities. + */ +#definePRI_MIN_INTERACTPRI_MIN_REALTIME +#definePRI_MAX_INTERACTPRI_MAX_REALTIME +#definePRI_MIN_BATCH PRI_MIN_TIMESHARE +#definePRI_MAX_BATCH PRI_MAX_TIMESHARE + +/* * Cpu percentage computation macros and defines. * * SCHED_TICK_SECS:Number of seconds to average the cpu usage across. @@ -147,8 +156,8 @@ static struct td_sched td_sched0; */ #defineSCHED_PRI_NRESV (PRIO_MAX - PRIO_MIN) #defineSCHED_PRI_NHALF (SCHED_PRI_NRESV / 2) -#defineSCHED_PRI_MIN (PRI_MIN_TIMESHARE + SCHED_PRI_NHALF) -#defineSCHED_PRI_MAX (PRI_MAX_TIMESHARE - SCHED_PRI_NHALF) +#defineSCHED_PRI_MIN (PRI_MIN_BATCH + SCHED_PRI_NHALF) +#defineSCHED_PRI_MAX (PRI_MAX_BATCH - SCHED_PRI_NHALF) #defineSCHED_PRI_RANGE (SCHED_PRI_MAX - SCHED_PRI_MIN + 1) #defineSCHED_PRI_TICKS(ts) \ (SCHED_TICK_HZ((ts)) / \ @@ -194,7 +203,7 @@ static int preempt_thresh = PRI_MIN_KERN #else static int preempt_thresh = 0; #endif -static int static_boost = PRI_MIN_TIMESHARE; +static int static_boost = PRI_MIN_BATCH; static int sched_idlespins = 1; static int sched_idlespinthresh = 16; @@ -393,15 +402,15 @@ sched_shouldpreempt(int pri, int cpri, i if (pri <= preempt_thresh) return (1); /* -* If we're realtime or better and there is timeshare or worse running -* preempt only remote processors. +* If we're interactive or better and there is non-interactive +* or worse running preempt only remote processors. */ - if (remote && pri <= PRI_MAX_REALTIME && cpri > PRI_MAX_REALTIME) + if (remote && pri <= PRI_MAX_INTERACT && cpri > PRI_MAX_INTERACT) return (1); return (0); } -#defineTS_RQ_PPQ (((PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE) + 1) / RQ_NQS) +#defineTS_RQ_PPQ (((PRI_MAX_BATCH - PRI_MIN_BATCH) + 1) / RQ_NQS) /* * Add a thread to the actual run-queue. Keeps transferable counts up to * date with what is actually on the run-queue. Selects the correct @@ -423,18 +432,18 @@ tdq_runq_add(struct tdq *tdq, struct thr tdq->tdq_transferable++; ts->ts_flags |= TSF_XFERABLE; } - if (pri <= PRI_MAX_REALTIME) { + if (pri < PRI_MIN_BATCH) { ts->ts_runq = &tdq->tdq_realtime; - } else if (pri <= PRI_MAX_TIMESHARE) { + } else if (pri <= PRI_MAX_BATCH) { ts->ts_runq = &tdq->tdq_timeshare; - KASSERT(pri <= PRI_MAX_TIMESHARE && pri >= PRI_MIN_TIMESHARE, + KASSERT(pri <= PRI_MAX_BATCH && pri >= PRI_MIN_BATCH, ("Invalid priority %d on timeshare runq", pri)); /* * This queue contains only priorities between MIN and MAX * realtime. Use the whole queue to represent these values. */ if ((flags & (SRQ_BORROWING|SRQ_PREEMPTED)) == 0) { - pri = (pri - PRI_MIN_TIMESHARE) / TS_RQ_PPQ; + pri = (pri - PRI_MIN_BATCH) / TS_RQ_PPQ; pri = (pri + tdq->tdq_idx) % RQ_NQS; /* * This effectively shortens the queue by one so we @@ -1205,7 +1214,7 @@ tdq_choose(struct tdq *tdq) return (td); td = runq_choose_from(&tdq->tdq_timeshare, tdq->tdq_ridx); if (td != NULL) { - KASSERT(td->td_priority >= PRI_MIN_TIMESHARE, + KASSERT(td->td_priority >= PRI_MIN_BATCH, ("tdq_choose: Invalid priority on timeshare queue %d", td->td_priority)); return (td); @@ -1405,10 +1414,10 @@ sched_priority(struct thread *td) */ score = imax(0, sched_interact_score(td) +
svn commit: r217353 - head/sys/dev/jme
Author: jhb Date: Thu Jan 13 14:42:43 2011 New Revision: 217353 URL: http://svn.freebsd.org/changeset/base/217353 Log: - Add a locked variant of jme_start() and invoke it directly while holding the lock instead of queueing it to a task. - Do not invoke jme_rxintr() to reclaim any unprocessed but received packets when shutting down the interface. Instead, just drop these packets to match the behavior of other drivers. - Hold the driver lock in the interrupt handler to avoid races with ioctl requests to down the interface. Reviewed by: yongari Modified: head/sys/dev/jme/if_jme.c head/sys/dev/jme/if_jmevar.h Modified: head/sys/dev/jme/if_jme.c == --- head/sys/dev/jme/if_jme.c Thu Jan 13 14:41:58 2011(r217352) +++ head/sys/dev/jme/if_jme.c Thu Jan 13 14:42:43 2011(r217353) @@ -126,8 +126,8 @@ static void jme_setwol(struct jme_softc static int jme_suspend(device_t); static int jme_resume(device_t); static int jme_encap(struct jme_softc *, struct mbuf **); -static void jme_tx_task(void *, int); static void jme_start(struct ifnet *); +static void jme_start_locked(struct ifnet *); static void jme_watchdog(struct jme_softc *); static int jme_ioctl(struct ifnet *, u_long, caddr_t); static void jme_mac_config(struct jme_softc *); @@ -882,7 +882,6 @@ jme_attach(device_t dev) ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); /* Create local taskq. */ - TASK_INIT(&sc->jme_tx_task, 1, jme_tx_task, ifp); sc->jme_tq = taskqueue_create_fast("jme_taskq", M_WAITOK, taskqueue_thread_enqueue, &sc->jme_tq); if (sc->jme_tq == NULL) { @@ -934,7 +933,6 @@ jme_detach(device_t dev) JME_UNLOCK(sc); callout_drain(&sc->jme_tick_ch); taskqueue_drain(sc->jme_tq, &sc->jme_int_task); - taskqueue_drain(sc->jme_tq, &sc->jme_tx_task); taskqueue_drain(taskqueue_swi, &sc->jme_link_task); /* Restore possibly modified station address. */ if ((sc->jme_flags & JME_FLAG_EFUSE) != 0) @@ -1872,16 +1870,18 @@ jme_encap(struct jme_softc *sc, struct m } static void -jme_tx_task(void *arg, int pending) +jme_start(struct ifnet *ifp) { - struct ifnet *ifp; +struct jme_softc *sc; - ifp = (struct ifnet *)arg; - jme_start(ifp); + sc = ifp->if_softc; + JME_LOCK(sc); + jme_start_locked(ifp); + JME_UNLOCK(sc); } static void -jme_start(struct ifnet *ifp) +jme_start_locked(struct ifnet *ifp) { struct jme_softc *sc; struct mbuf *m_head; @@ -1889,16 +1889,14 @@ jme_start(struct ifnet *ifp) sc = ifp->if_softc; - JME_LOCK(sc); + JME_LOCK_ASSERT(sc); if (sc->jme_cdata.jme_tx_cnt >= JME_TX_DESC_HIWAT) jme_txeof(sc); if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING || (sc->jme_flags & JME_FLAG_LINK) == 0) { - JME_UNLOCK(sc); + IFF_DRV_RUNNING || (sc->jme_flags & JME_FLAG_LINK) == 0) return; - } for (enq = 0; !IFQ_DRV_IS_EMPTY(&ifp->if_snd); ) { IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); @@ -1937,8 +1935,6 @@ jme_start(struct ifnet *ifp) /* Set a timeout in case the chip goes out to lunch. */ sc->jme_watchdog_timer = JME_TX_TIMEOUT; } - - JME_UNLOCK(sc); } static void @@ -1964,7 +1960,7 @@ jme_watchdog(struct jme_softc *sc) if_printf(sc->jme_ifp, "watchdog timeout (missed Tx interrupts) -- recovering\n"); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - taskqueue_enqueue(sc->jme_tq, &sc->jme_tx_task); + jme_start_locked(ifp); return; } @@ -1973,7 +1969,7 @@ jme_watchdog(struct jme_softc *sc) ifp->if_drv_flags &= ~IFF_DRV_RUNNING; jme_init_locked(sc); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - taskqueue_enqueue(sc->jme_tq, &sc->jme_tx_task); + jme_start_locked(ifp); } static int @@ -2267,10 +2263,8 @@ jme_link_task(void *arg, int pending) /* XXX Drain all queued tasks. */ JME_UNLOCK(sc); taskqueue_drain(sc->jme_tq, &sc->jme_int_task); - taskqueue_drain(sc->jme_tq, &sc->jme_tx_task); JME_LOCK(sc); - jme_rxintr(sc, JME_RX_RING_CNT); if (sc->jme_cdata.jme_rxhead != NULL) m_freem(sc->jme_cdata.jme_rxhead); JME_RXCHAIN_RESET(sc); @@ -2297,7 +2291,7 @@ jme_link_task(void *arg, int pending) /* * Reuse configured Rx descriptors and reset -* procuder/consumer index. +* producer/consumer index. */ sc->jme_cdata.jme_rx_cons = 0; sc->jme_morework = 0; @@ -2376,6 +2370,7 @@ jme_int_task(vo
svn commit: r217354 - in head/sys/mips: include mips rmi
Author: jchandra Date: Thu Jan 13 15:17:29 2011 New Revision: 217354 URL: http://svn.freebsd.org/changeset/base/217354 Log: Support for 64 bit PTEs on n32 and n64 compilation. In n32 and n64, add support for physical address above 4GB by having 64 bit page table entries and physical addresses. Major changes are: - param.h: update PTE sizes, masks and shift values to support 64 bit PTEs. - param.h: remove DELAY(), mips_btop(same as atop), mips_ptob (same as ptoa), and reformat. - param.h: remove casting to unsigned long in trunc_page and round_page since this will be used on physical addresses. - _types.h: have 64 bit __vm_paddr_t for n32. - pte.h: update TLB LO0/1 access macros to support 64 bit PTE - pte.h: assembly macros for PTE operations. - proc.h: md_upte is now 64 bit for n32 and n64. - exception.S and swtch.S: use the new PTE macros for PTE operations. - cpufunc.h: TLB_LO0/1 registers are 64bit for n32 and n64. - xlr_machdep.c: Add memory segments above 4GB to phys_avail[] as they are supported now. Reviewed by: jmallett (earlier version) Modified: head/sys/mips/include/_types.h head/sys/mips/include/cpufunc.h head/sys/mips/include/param.h head/sys/mips/include/proc.h head/sys/mips/include/pte.h head/sys/mips/mips/dump_machdep.c head/sys/mips/mips/exception.S head/sys/mips/mips/machdep.c head/sys/mips/mips/pmap.c head/sys/mips/mips/swtch.S head/sys/mips/rmi/xlr_machdep.c Modified: head/sys/mips/include/_types.h == --- head/sys/mips/include/_types.h Thu Jan 13 14:42:43 2011 (r217353) +++ head/sys/mips/include/_types.h Thu Jan 13 15:17:29 2011 (r217354) @@ -133,13 +133,17 @@ typedef __uint32_t __u_register_t; #endif #ifdef __LP64__ typedef__uint64_t __vm_offset_t; -typedef__uint64_t __vm_paddr_t; typedef__uint64_t __vm_size_t; #else typedef__uint32_t __vm_offset_t; -typedef__uint32_t __vm_paddr_t; typedef__uint32_t __vm_size_t; #endif +#if defined(__LP64__) || defined(__mips_n32) /* PHYSADDR_64_BIT */ +typedef__uint64_t __vm_paddr_t; +#else +typedef__uint32_t __vm_paddr_t; +#endif + typedef__int64_t __vm_ooffset_t; typedef__uint64_t __vm_pindex_t; Modified: head/sys/mips/include/cpufunc.h == --- head/sys/mips/include/cpufunc.h Thu Jan 13 14:42:43 2011 (r217353) +++ head/sys/mips/include/cpufunc.h Thu Jan 13 15:17:29 2011 (r217354) @@ -138,11 +138,13 @@ mips_wr_ ## n (uint64_t a0) \ #if defined(__mips_n64) MIPS_RW64_COP0(excpc, MIPS_COP_0_EXC_PC); -MIPS_RW64_COP0(entrylo0, MIPS_COP_0_TLB_LO0); -MIPS_RW64_COP0(entrylo1, MIPS_COP_0_TLB_LO1); MIPS_RW64_COP0(entryhi, MIPS_COP_0_TLB_HI); MIPS_RW64_COP0(pagemask, MIPS_COP_0_TLB_PG_MASK); #endif +#if defined(__mips_n64) || defined(__mips_n32) /* PHYSADDR_64_BIT */ +MIPS_RW64_COP0(entrylo0, MIPS_COP_0_TLB_LO0); +MIPS_RW64_COP0(entrylo1, MIPS_COP_0_TLB_LO1); +#endif MIPS_RW64_COP0(xcontext, MIPS_COP_0_TLB_XCONTEXT); #undef MIPS_RW64_COP0 @@ -221,11 +223,13 @@ MIPS_RW32_COP0(status, MIPS_COP_0_STATUS /* XXX: Some of these registers are specific to MIPS32. */ #if !defined(__mips_n64) -MIPS_RW32_COP0(entrylo0, MIPS_COP_0_TLB_LO0); -MIPS_RW32_COP0(entrylo1, MIPS_COP_0_TLB_LO1); MIPS_RW32_COP0(entryhi, MIPS_COP_0_TLB_HI); MIPS_RW32_COP0(pagemask, MIPS_COP_0_TLB_PG_MASK); #endif +#if !defined(__mips_n64) && !defined(__mips_n32) /* !PHYSADDR_64_BIT */ +MIPS_RW32_COP0(entrylo0, MIPS_COP_0_TLB_LO0); +MIPS_RW32_COP0(entrylo1, MIPS_COP_0_TLB_LO1); +#endif MIPS_RW32_COP0(prid, MIPS_COP_0_PRID); /* XXX 64-bit? */ MIPS_RW32_COP0_SEL(ebase, MIPS_COP_0_PRID, 1); Modified: head/sys/mips/include/param.h == --- head/sys/mips/include/param.h Thu Jan 13 14:42:43 2011 (r217353) +++ head/sys/mips/include/param.h Thu Jan 13 15:17:29 2011 (r217354) @@ -116,31 +116,39 @@ #defineCACHE_LINE_SHIFT6 #defineCACHE_LINE_SIZE (1 << CACHE_LINE_SHIFT) -#definePAGE_SHIFT 12 /* LOG2(PAGE_SIZE) */ -#definePAGE_SIZE (1<> (PAGE_SHIFT - DEV_BSHIFT)) +#definectod(x) ((x) << (PAGE_SHIFT - DEV_BSHIFT)) +#definedtoc(x) ((x) >> (PAGE_SHIFT - DEV_BSHIFT)) /* * Map a ``block device block'' to a file system block. @@ -160,24 +168,17 @@ * field from the disk label. * For now though just use DEV_BSIZE. */ -#definebdbtofsb(bn)((bn) / (BLKDEV_IOSIZE/DEV_BSIZE)) +#definebdbtofsb(bn)((bn) / (BLKDEV_IOSIZE/DEV_BSIZE)) /* * Mach derived conversion macros */ -#define
svn commit: r217356 - vendor-sys/acpica/20110112
Author: jkim Date: Thu Jan 13 16:13:53 2011 New Revision: 217356 URL: http://svn.freebsd.org/changeset/base/217356 Log: Tag ACPICA 20110112. Added: vendor-sys/acpica/20110112/ - copied from r217355, vendor-sys/acpica/dist/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r217357 - head/sys/ufs/ufs
Author: pluknet Date: Thu Jan 13 16:29:27 2011 New Revision: 217357 URL: http://svn.freebsd.org/changeset/base/217357 Log: Embed a quota error message (C string) into uprintf() fmt. While here, fix whitespaces. Approved by: kib (mentor) Modified: head/sys/ufs/ufs/ufs_quota.c Modified: head/sys/ufs/ufs/ufs_quota.c == --- head/sys/ufs/ufs/ufs_quota.cThu Jan 13 16:13:53 2011 (r217356) +++ head/sys/ufs/ufs/ufs_quota.cThu Jan 13 16:29:27 2011 (r217357) @@ -238,9 +238,9 @@ chkdq(struct inode *ip, ufs2_daddr_t cha dq->dq_flags |= DQ_MOD; DQI_UNLOCK(dq); if (warn) - uprintf("\n%s: warning, %s %s\n", - ITOV(ip)->v_mount->mnt_stat.f_mntonname, - quotatypes[i], "disk quota exceeded"); + uprintf("\n%s: warning, %s disk quota exceeded\n", + ITOV(ip)->v_mount->mnt_stat.f_mntonname, + quotatypes[i]); } return (0); } @@ -289,10 +289,10 @@ chkdqchg(struct inode *ip, ufs2_daddr_t ip->i_uid == cred->cr_uid) { dq->dq_flags |= DQ_BLKS; DQI_UNLOCK(dq); - uprintf("\n%s: write failed, %s %s\n", + uprintf("\n%s: write failed, %s " + "disk quota exceeded for too long\n", ITOV(ip)->v_mount->mnt_stat.f_mntonname, - quotatypes[type], - "disk quota exceeded for too long"); + quotatypes[type]); return (EDQUOT); } DQI_UNLOCK(dq); @@ -384,9 +384,9 @@ chkiq(struct inode *ip, int change, stru dq->dq_flags |= DQ_MOD; DQI_UNLOCK(dq); if (warn) - uprintf("\n%s: warning, %s %s\n", - ITOV(ip)->v_mount->mnt_stat.f_mntonname, - quotatypes[i], "inode quota exceeded"); + uprintf("\n%s: warning, %s inode quota exceeded\n", + ITOV(ip)->v_mount->mnt_stat.f_mntonname, + quotatypes[i]); } return (0); } @@ -434,10 +434,10 @@ chkiqchg(struct inode *ip, int change, s ip->i_uid == cred->cr_uid) { dq->dq_flags |= DQ_INODS; DQI_UNLOCK(dq); - uprintf("\n%s: write failed, %s %s\n", - ITOV(ip)->v_mount->mnt_stat.f_mntonname, - quotatypes[type], - "inode quota exceeded for too long"); + uprintf("\n%s: write failed, %s " + "inode quota exceeded for too long\n", + ITOV(ip)->v_mount->mnt_stat.f_mntonname, + quotatypes[type]); return (EDQUOT); } DQI_UNLOCK(dq); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r217358 - head/usr.sbin/usbdump
Author: weongyo Date: Thu Jan 13 16:37:12 2011 New Revision: 217358 URL: http://svn.freebsd.org/changeset/base/217358 Log: Documents OUTPUT formats. While I'm here cleans up styles and words. Reviewed by: brueffer@ Modified: head/usr.sbin/usbdump/usbdump.8 Modified: head/usr.sbin/usbdump/usbdump.8 == --- head/usr.sbin/usbdump/usbdump.8 Thu Jan 13 16:29:27 2011 (r217357) +++ head/usr.sbin/usbdump/usbdump.8 Thu Jan 13 16:37:12 2011 (r217358) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 14, 2010 +.Dd December 4, 2010 .Dt usbdump 8 .Os .Sh NAME @@ -41,24 +41,29 @@ .Sh DESCRIPTION The .Nm -utility provides a way to dump USB packets on each host controller. +utility provides a way to dump USB packets on host controllers. .Pp -The following options are accepted. +The following options are accepted: .Bl -tag -width ".Fl f Ar file" .It Fl i Ar ifname -Listen on USB bus interface. +Listen on USB bus interface +.Ar ifname . .It Fl r Ar file -Read the raw packets from file. +Read the raw packets from +.Ar file . .It Fl s Ar snaplen -Snapshot bytes from each packet. +Snapshot +.Ar snaplen +bytes from each packet. .It Fl v Enable debugging messages. -When it defined multiple times the verbose level increases. +When defined multiple times the verbosity level increases. .It Fl w Ar file -Write the raw packets to file. +Write the raw packets to +.Ar file . .El .Sh EXAMPLES -Captures the USB raw packets alive on usbus2: +Captures USB raw packets on usbus2: .Pp .Dl "usbdump -i usbus2 -s 256 -v" .Pp @@ -67,11 +72,61 @@ size limit: .Pp .Dl "usbdump -i usbus2 -s 0 -w /tmp/dump_pkts" .Pp -Read the USB raw packets from the file: +Read the USB raw packets from previous file: .Pp .Dl "usbdump -r /tmp/dump_pkts -v" +.Sh OUTPUT FORMAT +The output format of +.Nm +is as follows: +.Pp +.Dl " .(/) <...>" +.Pp +The meaning of the output format elements is as follows: +.Bl -tag -width "" +.It +A timestamp preceding all output lines. +The timestamp has the format "hh:mm:ss.frac" and is as accurate as +the kernel's clock. +.It +The USB host controller's bus unit number. +.It +The unique number of the USB device as allocated by the host controller driver. +.It +The USB endpoint address that indicates whether the address is +.Dv OUT +or +.Dv IN . +.It +The USB transfer type. +Can be +.Dv CTRL , +.Dv ISOC , +.Dv BULK +or +.Dv INTR . +.It +`S' indicates a USB submit. +`D' indicates a USB transfer done. +.It +Numbers of frames in this packets. +If this is a USB submit, its value is +.Li xfer->nframes +which means how many frames are acceptable or registered to transfer. +If this is a USB done, +.Li xfer->aframes +is the actual number of frames. +.It +Total packet size. +If this is a USB submit, its value is +.Li xfer->sumlen . +If this is a USB done, its value is +.Li xfer->actlen . +.It <...> +Optional field used for printing an error string if the packet is from USB done. +.El .Sh SEE ALSO .Xr usbconfig 8 .Sh AUTHORS .An Weongyo Jeong -.Aq weon...@freebsd.org . +.Aq weon...@freebsd.org ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r217359 - head/usr.sbin/kbdmap
Author: nwhitehorn Date: Thu Jan 13 16:42:16 2011 New Revision: 217359 URL: http://svn.freebsd.org/changeset/base/217359 Log: Use auto-sizing syntax appropriate for the new dialog(1). This should probably be modified to use libdialog. Modified: head/usr.sbin/kbdmap/kbdmap.c Modified: head/usr.sbin/kbdmap/kbdmap.c == --- head/usr.sbin/kbdmap/kbdmap.c Thu Jan 13 16:37:12 2011 (r217358) +++ head/usr.sbin/kbdmap/kbdmap.c Thu Jan 13 16:42:16 2011 (r217359) @@ -337,7 +337,7 @@ show_dialog(struct keymap **km_sorted, i exit(1); } asprintf(&dialog, "/usr/bin/dialog --clear --title \"Keyboard Menu\" " - "--menu \"%s\" -1 -1 10", menu); + "--menu \"%s\" 0 0 0", menu); ext = extract_name(dir); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r217360 - in head/sys: amd64/amd64 i386/i386 x86/x86
Author: jhb Date: Thu Jan 13 17:00:22 2011 New Revision: 217360 URL: http://svn.freebsd.org/changeset/base/217360 Log: If an interrupt on an I/O APIC is moved to a different CPU after it has started to execute, it seems that the corresponding ISR bit in the "old" local APIC can be cleared. This causes the local APIC interrupt routine to fail to find an interrupt to service. Rather than panic'ing in this case, simply return from the interrupt without sending an EOI to the local APIC. If there are any other pending interrupts in other ISR registers, the local APIC will assert a new interrupt. Tested by:steve Modified: head/sys/amd64/amd64/apic_vector.S head/sys/i386/i386/apic_vector.s head/sys/x86/x86/local_apic.c Modified: head/sys/amd64/amd64/apic_vector.S == --- head/sys/amd64/amd64/apic_vector.S Thu Jan 13 16:42:16 2011 (r217359) +++ head/sys/amd64/amd64/apic_vector.S Thu Jan 13 17:00:22 2011 (r217360) @@ -58,17 +58,15 @@ IDTVEC(vec_name) ; \ FAKE_MCOUNT(TF_RIP(%rsp)) ; \ movqlapic, %rdx ; /* pointer to local APIC */ \ movlLA_ISR + 16 * (index)(%rdx), %eax ; /* load ISR */ \ - bsrl%eax, %eax ;/* index of highset set bit in ISR */ \ - jz 2f ;\ + bsrl%eax, %eax ;/* index of highest set bit in ISR */ \ + jz 1f ;\ addl$(32 * index),%eax ;\ -1: ; \ movq%rsp, %rsi ; \ movl%eax, %edi ;/* pass the IRQ */ \ calllapic_handle_intr ; \ +1: ; \ MEXITCOUNT ;\ - jmp doreti ;\ -2: movl$-1, %eax ; /* send a vector of -1 */ \ - jmp 1b + jmp doreti /* * Handle "spurious INTerrupts". Modified: head/sys/i386/i386/apic_vector.s == --- head/sys/i386/i386/apic_vector.sThu Jan 13 16:42:16 2011 (r217359) +++ head/sys/i386/i386/apic_vector.sThu Jan 13 17:00:22 2011 (r217360) @@ -60,18 +60,16 @@ IDTVEC(vec_name) ; \ FAKE_MCOUNT(TF_EIP(%esp)) ; \ movllapic, %edx ; /* pointer to local APIC */ \ movlLA_ISR + 16 * (index)(%edx), %eax ; /* load ISR */ \ - bsrl%eax, %eax ;/* index of highset set bit in ISR */ \ - jz 2f ;\ + bsrl%eax, %eax ;/* index of highest set bit in ISR */ \ + jz 1f ;\ addl$(32 * index),%eax ;\ -1: ; \ pushl %esp; \ pushl %eax ; /* pass the IRQ */ \ calllapic_handle_intr ; \ addl$8, %esp ; /* discard parameter */ \ +1: ; \ MEXITCOUNT ;\ - jmp doreti ;\ -2: movl$-1, %eax ; /* send a vector of -1 */ \ - jmp 1b + jmp doreti /* * Handle "spurious INTerrupts". Modified: head/sys/x86/x86/local_apic.c == --- head/sys/x86/x86/local_apic.c Thu Jan 13 16:42:16 2011 (r217359) +++ head/sys/x86/x86/local_apic.c Thu Jan 13 17:00:22 2011 (r217360) @@ -780,8 +780,6 @@ lapic_handle_intr(int vector, struct tra { struct intsrc *isrc; - if (vector == -1) - panic("Couldn't get vector from ISR!"); isrc = intr_lookup_source(apic_idt_to_irq(PCPU_GET(apic_id), vector)); intr_execute_handlers(isrc, frame); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r217361 - head/sys/netinet/ipfw
Author: jhb Date: Thu Jan 13 17:02:39 2011 New Revision: 217361 URL: http://svn.freebsd.org/changeset/base/217361 Log: Use a blocking malloc() to initialize the dummynet taskq. Reviewed by: luigi Modified: head/sys/netinet/ipfw/ip_dummynet.c Modified: head/sys/netinet/ipfw/ip_dummynet.c == --- head/sys/netinet/ipfw/ip_dummynet.c Thu Jan 13 17:00:22 2011 (r217360) +++ head/sys/netinet/ipfw/ip_dummynet.c Thu Jan 13 17:02:39 2011 (r217361) @@ -2157,7 +2157,7 @@ ip_dn_init(void) DN_LOCK_INIT(); TASK_INIT(&dn_task, 0, dummynet_task, curvnet); - dn_tq = taskqueue_create("dummynet", M_NOWAIT, + dn_tq = taskqueue_create("dummynet", M_WAITOK, taskqueue_thread_enqueue, &dn_tq); taskqueue_start_threads(&dn_tq, 1, PI_NET, "dummynet"); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r217364 - head/usr.sbin/spkrtest
Author: nwhitehorn Date: Thu Jan 13 17:30:18 2011 New Revision: 217364 URL: http://svn.freebsd.org/changeset/base/217364 Log: Update spkrtest(8) to use new dialog auto-sizing syntax. Modified: head/usr.sbin/spkrtest/spkrtest.sh Modified: head/usr.sbin/spkrtest/spkrtest.sh == --- head/usr.sbin/spkrtest/spkrtest.sh Thu Jan 13 17:29:05 2011 (r217363) +++ head/usr.sbin/spkrtest/spkrtest.sh Thu Jan 13 17:30:18 2011 (r217364) @@ -53,7 +53,7 @@ fi /usr/bin/dialog --title "Speaker test" --checklist \ "Please select the melodies you wish to play (space for select)" \ - -1 -1 10 \ + 0 0 0 \ reveille "Reveille" OFF \ contact "Contact theme from Close Encounters" OFF \ dance "Lord of the Dance (aka Simple Gifts)" OFF \ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r217365 - in head: sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/debugger sys/contrib/dev/acpica/disassembler sys/contrib/
On Thursday 13 January 2011 12:32 pm, Jung-uk Kim wrote: > Author: jkim > Date: Thu Jan 13 17:32:32 2011 > New Revision: 217365 > URL: http://svn.freebsd.org/changeset/base/217365 > > Log: > Merge ACPICA 20110112. Switch to BSD/GPLv2 dual license[1]. I'd like to take this opportunity to say thanks to Intel ACPICA team for arranging new release with the dual license and continuing support for FreeBSD. Thank you! Jung-uk Kim ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r217367 - in head: cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mdf Date: Thu Jan 13 18:20:19 2011 New Revision: 217367 URL: http://svn.freebsd.org/changeset/base/217367 Log: Re-commit the zfs sysctl(9) type-safety changes. Thanks to dim and pjd for the pointer to zfs_context.h for building userland. Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h == --- head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Thu Jan 13 17:47:22 2011(r217366) +++ head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Thu Jan 13 18:20:19 2011(r217367) @@ -601,6 +601,7 @@ typedef uint32_tidmap_rid_t; #defineSYSCTL_UINT(...) #defineSYSCTL_ULONG(...) #defineSYSCTL_QUAD(...) +#defineSYSCTL_UQUAD(...) #ifdef TUNABLE_INT #undef TUNABLE_INT #undef TUNABLE_ULONG Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Jan 13 17:47:22 2011(r217366) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Jan 13 18:20:19 2011(r217367) @@ -188,9 +188,9 @@ TUNABLE_QUAD("vfs.zfs.arc_min", &zfs_arc TUNABLE_QUAD("vfs.zfs.arc_meta_limit", &zfs_arc_meta_limit); TUNABLE_INT("vfs.zfs.mdcomp_disable", &zfs_mdcomp_disable); SYSCTL_DECL(_vfs_zfs); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_max, CTLFLAG_RDTUN, &zfs_arc_max, 0, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_max, CTLFLAG_RDTUN, &zfs_arc_max, 0, "Maximum ARC size"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_min, CTLFLAG_RDTUN, &zfs_arc_min, 0, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_min, CTLFLAG_RDTUN, &zfs_arc_min, 0, "Minimum ARC size"); SYSCTL_INT(_vfs_zfs, OID_AUTO, mdcomp_disable, CTLFLAG_RDTUN, &zfs_mdcomp_disable, 0, "Disable metadata compression"); @@ -466,9 +466,9 @@ static uint64_t arc_loaned_bytes; static uint64_tarc_meta_used; static uint64_tarc_meta_limit; static uint64_tarc_meta_max = 0; -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_meta_used, CTLFLAG_RDTUN, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_meta_used, CTLFLAG_RDTUN, &arc_meta_used, 0, "ARC metadata used"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_meta_limit, CTLFLAG_RDTUN, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_meta_limit, CTLFLAG_RDTUN, &arc_meta_limit, 0, "ARC metadata limit"); typedef struct l2arc_buf_hdr l2arc_buf_hdr_t; @@ -638,15 +638,15 @@ boolean_t l2arc_noprefetch = B_FALSE; / boolean_t l2arc_feed_again = B_TRUE; /* turbo warmup */ boolean_t l2arc_norw = B_TRUE; /* no reads during writes */ -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_write_max, CTLFLAG_RW, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_write_max, CTLFLAG_RW, &l2arc_write_max, 0, "max write size"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_write_boost, CTLFLAG_RW, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_write_boost, CTLFLAG_RW, &l2arc_write_boost, 0, "extra write during warmup"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_headroom, CTLFLAG_RW, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_headroom, CTLFLAG_RW, &l2arc_headroom, 0, "number of dev writes"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_feed_secs, CTLFLAG_RW, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_feed_secs, CTLFLAG_RW, &l2arc_feed_secs, 0, "interval seconds"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, l2arc_feed_min_ms, CTLFLAG_RW, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_feed_min_ms, CTLFLAG_RW, &l2arc_feed_min_ms, 0, "min interval milliseconds"); SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_noprefetch, CTLFLAG_RW, @@ -656,46 +656,46 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_fee SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_norw, CTLFLAG_RW, &l2arc_norw, 0, "no reads during writes"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, anon_size, CTLFLAG_RD, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, anon_size, CTLFLAG_RD, &ARC_anon.arcs_size, 0, "size of anonymous state"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, anon_metadata_lsize, CTLFLAG_RD, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, anon_metadata_lsize, CTLFLAG_RD, &ARC_anon.arcs_lsize[ARC_BUFC_METADATA], 0, "size of anonymous state"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, anon_data_lsize, CTLFLAG_RD, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, anon_data_lsize, CTLFLAG_RD, &ARC_anon.arcs_lsize[ARC_BUFC_DATA], 0, "size of anonymous state"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_size, CTLFLAG_RD, +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_size, CTLFLAG_RD, &ARC_mru.arcs_size, 0, "size of mru state"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, mru_metadata_lsize, CTLFLAG_RD, +SYSCTL_UQUAD(_vfs_zfs, OID
svn commit: r217368 - in head/sys: amd64/amd64 cam dev/ath dev/sound/pcm kern
Author: mdf Date: Thu Jan 13 18:20:27 2011 New Revision: 217368 URL: http://svn.freebsd.org/changeset/base/217368 Log: Fix up a few more sysctl(9) mis-typing found in various LINT builds. Modified: head/sys/amd64/amd64/mp_machdep.c head/sys/cam/cam_xpt.c head/sys/dev/ath/if_ath.c head/sys/dev/sound/pcm/buffer.c head/sys/kern/kern_ntptime.c Modified: head/sys/amd64/amd64/mp_machdep.c == --- head/sys/amd64/amd64/mp_machdep.c Thu Jan 13 18:20:19 2011 (r217367) +++ head/sys/amd64/amd64/mp_machdep.c Thu Jan 13 18:20:27 2011 (r217368) @@ -1045,23 +1045,23 @@ u_int ipi_global; u_int ipi_page; u_int ipi_range; u_int ipi_range_size; -SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_global, CTLFLAG_RW, &ipi_global, 0, ""); -SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_page, CTLFLAG_RW, &ipi_page, 0, ""); -SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_range, CTLFLAG_RW, &ipi_range, 0, ""); -SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_range_size, CTLFLAG_RW, &ipi_range_size, -0, ""); +SYSCTL_UINT(_debug_xhits, OID_AUTO, ipi_global, CTLFLAG_RW, &ipi_global, 0, ""); +SYSCTL_UINT(_debug_xhits, OID_AUTO, ipi_page, CTLFLAG_RW, &ipi_page, 0, ""); +SYSCTL_UINT(_debug_xhits, OID_AUTO, ipi_range, CTLFLAG_RW, &ipi_range, 0, ""); +SYSCTL_UINT(_debug_xhits, OID_AUTO, ipi_range_size, CTLFLAG_RW, +&ipi_range_size, 0, ""); u_int ipi_masked_global; u_int ipi_masked_page; u_int ipi_masked_range; u_int ipi_masked_range_size; -SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_masked_global, CTLFLAG_RW, +SYSCTL_UINT(_debug_xhits, OID_AUTO, ipi_masked_global, CTLFLAG_RW, &ipi_masked_global, 0, ""); -SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_masked_page, CTLFLAG_RW, +SYSCTL_UINT(_debug_xhits, OID_AUTO, ipi_masked_page, CTLFLAG_RW, &ipi_masked_page, 0, ""); -SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_masked_range, CTLFLAG_RW, +SYSCTL_UINT(_debug_xhits, OID_AUTO, ipi_masked_range, CTLFLAG_RW, &ipi_masked_range, 0, ""); -SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_masked_range_size, CTLFLAG_RW, +SYSCTL_UINT(_debug_xhits, OID_AUTO, ipi_masked_range_size, CTLFLAG_RW, &ipi_masked_range_size, 0, ""); #endif /* COUNT_XINVLTLB_HITS */ Modified: head/sys/cam/cam_xpt.c == --- head/sys/cam/cam_xpt.c Thu Jan 13 18:20:19 2011(r217367) +++ head/sys/cam/cam_xpt.c Thu Jan 13 18:20:27 2011(r217368) @@ -197,11 +197,11 @@ u_int32_t cam_dflags = CAM_DEBUG_FLAGS; u_int32_t cam_dflags = CAM_DEBUG_NONE; #endif TUNABLE_INT("kern.cam.dflags", &cam_dflags); -SYSCTL_INT(_kern_cam, OID_AUTO, dflags, CTLFLAG_RW, +SYSCTL_UINT(_kern_cam, OID_AUTO, dflags, CTLFLAG_RW, &cam_dflags, 0, "Cam Debug Flags"); u_int32_t cam_debug_delay; TUNABLE_INT("kern.cam.debug_delay", &cam_debug_delay); -SYSCTL_INT(_kern_cam, OID_AUTO, debug_delay, CTLFLAG_RW, +SYSCTL_UINT(_kern_cam, OID_AUTO, debug_delay, CTLFLAG_RW, &cam_debug_delay, 0, "Cam Debug Flags"); #endif Modified: head/sys/dev/ath/if_ath.c == --- head/sys/dev/ath/if_ath.c Thu Jan 13 18:20:19 2011(r217367) +++ head/sys/dev/ath/if_ath.c Thu Jan 13 18:20:27 2011(r217368) @@ -6648,17 +6648,17 @@ ath_sysctlattach(struct ath_softc *sc) #ifdef IEEE80211_SUPPORT_TDMA if (ath_hal_macversion(ah) > 0x78) { sc->sc_tdmadbaprep = 2; - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "dbaprep", CTLFLAG_RW, &sc->sc_tdmadbaprep, 0, "TDMA DBA preparation time"); sc->sc_tdmaswbaprep = 10; - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "swbaprep", CTLFLAG_RW, &sc->sc_tdmaswbaprep, 0, "TDMA SWBA preparation time"); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "guardtime", CTLFLAG_RW, &sc->sc_tdmaguard, 0, "TDMA slot guard time"); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "superframe", CTLFLAG_RD, &sc->sc_tdmabintval, 0, "TDMA calculated super frame"); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, Modified: head/sys/dev/sound/pcm/buffer.c == --- head/sys/dev/sound/pcm/buffer.c Thu Jan 13 18:20:19 2011 (r217367) +++ head/sys/dev/sound/pcm/buffer.c Thu Jan 13 18:20:27 2011 (r217368) @@ -666,11 +666,11 @@ sndbuf_dispose(s
svn commit: r217369 - in head/sys: cam/scsi sys
Author: mdf Date: Thu Jan 13 18:20:33 2011 New Revision: 217369 URL: http://svn.freebsd.org/changeset/base/217369 Log: Add a 64-bit hex-printed sysctl(9) since there is at least one place in the code that wanted it. It is named X64 rather than XQUAD since the quad name is a historical abomination that should not be perpetuated. Modified: head/sys/cam/scsi/scsi_da.c head/sys/sys/sysctl.h Modified: head/sys/cam/scsi/scsi_da.c == --- head/sys/cam/scsi/scsi_da.c Thu Jan 13 18:20:27 2011(r217368) +++ head/sys/cam/scsi/scsi_da.c Thu Jan 13 18:20:33 2011(r217369) @@ -1127,9 +1127,9 @@ dasysctlinit(void *context, int pending) struct ccb_trans_settings_fc *fc = &cts.xport_specific.fc; if (fc->valid & CTS_FC_VALID_WWPN) { softc->wwpn = fc->wwpn; - SYSCTL_ADD_XLONG(&softc->sysctl_ctx, + SYSCTL_ADD_X64(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), - OID_AUTO, "wwpn", CTLTYPE_QUAD | CTLFLAG_RD, + OID_AUTO, "wwpn", CTLFLAG_RD, &softc->wwpn, "World Wide Port Name"); } } Modified: head/sys/sys/sysctl.h == --- head/sys/sys/sysctl.h Thu Jan 13 18:20:27 2011(r217368) +++ head/sys/sys/sysctl.h Thu Jan 13 18:20:33 2011(r217369) @@ -245,6 +245,8 @@ SYSCTL_ALLOWED_TYPES(ULONG, unsigned lon SYSCTL_ALLOWED_TYPES(XLONG, unsigned long *a; long *b; ); SYSCTL_ALLOWED_TYPES(INT64, int64_t *a; long long *b; ); SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a; unsigned long long *b; ); +SYSCTL_ALLOWED_TYPES(XINT64, uint64_t *a; int64_t *b; +unsigned long long *c; long long *d; ); #ifdef notyet #defineSYSCTL_ADD_ASSERT_TYPE(type, ptr) \ @@ -389,7 +391,6 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a SYSCTL_ADD_ASSERT_TYPE(INT64, ptr), 0, \ sysctl_handle_quad, "Q", __DESCR(descr)) -/* Oid for a quad. The pointer must be non NULL. */ #defineSYSCTL_UQUAD(parent, nbr, name, access, ptr, val, descr) \ SYSCTL_ASSERT_TYPE(UINT64, ptr, parent, name); \ SYSCTL_OID(parent, nbr, name, \ @@ -402,6 +403,18 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a SYSCTL_ADD_ASSERT_TYPE(UINT64, ptr), 0, \ sysctl_handle_quad, "QU", __DESCR(descr)) +#defineSYSCTL_X64(parent, nbr, name, access, ptr, val, descr) \ + SYSCTL_ASSERT_TYPE(XINT64, ptr, parent, name); \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_QUAD | CTLFLAG_MPSAFE | (access), \ + ptr, val, sysctl_handle_quad, "QX", descr) + +#defineSYSCTL_ADD_X64(ctx, parent, nbr, name, access, ptr, descr) \ + sysctl_add_oid(ctx, parent, nbr, name, \ + CTLTYPE_QUAD | CTLFLAG_MPSAFE | (access), \ + SYSCTL_ADD_ASSERT_TYPE(XINT64, ptr), 0, \ + sysctl_handle_quad, "QX", __DESCR(descr)) + /* Oid for an opaque object. Specified by a pointer and a length. */ #define SYSCTL_OPAQUE(parent, nbr, name, access, ptr, len, fmt, descr) \ SYSCTL_OID(parent, nbr, name, CTLTYPE_OPAQUE|(access), \ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r217370 - head/sys/kern
Author: mdf Date: Thu Jan 13 18:20:37 2011 New Revision: 217370 URL: http://svn.freebsd.org/changeset/base/217370 Log: One more sysctl(9) type-safety that I missed before. Modified: head/sys/kern/sched_4bsd.c Modified: head/sys/kern/sched_4bsd.c == --- head/sys/kern/sched_4bsd.c Thu Jan 13 18:20:33 2011(r217369) +++ head/sys/kern/sched_4bsd.c Thu Jan 13 18:20:37 2011(r217370) @@ -429,7 +429,7 @@ maybe_preempt(struct thread *td) /* decay 95% of `ts_pctcpu' in 60 seconds; see CCPU_SHIFT before changing */ static fixpt_t ccpu = 0.95122942450071400909 * FSCALE; /* exp(-1/20) */ -SYSCTL_INT(_kern, OID_AUTO, ccpu, CTLFLAG_RD, &ccpu, 0, ""); +SYSCTL_UINT(_kern, OID_AUTO, ccpu, CTLFLAG_RD, &ccpu, 0, ""); /* * If `ccpu' is not equal to `exp(-1/20)' and you still want to use the ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r217369 - in head/sys: cam/scsi sys
There appear to be 330 uses of SYSCTL and QUAD on the same line in CURRENT. This seems reasonable to change them to S64, U64 and X64 so they correctly reflect the size they operate upon. What do y'all think? Thanks, matthew On Thu, Jan 13, 2011 at 10:20 AM, Matthew D Fleming wrote: > Author: mdf > Date: Thu Jan 13 18:20:33 2011 > New Revision: 217369 > URL: http://svn.freebsd.org/changeset/base/217369 > > Log: > Add a 64-bit hex-printed sysctl(9) since there is at least one place in > the code that wanted it. It is named X64 rather than XQUAD since the > quad name is a historical abomination that should not be perpetuated. > > Modified: > head/sys/cam/scsi/scsi_da.c > head/sys/sys/sysctl.h > > Modified: head/sys/cam/scsi/scsi_da.c > == > --- head/sys/cam/scsi/scsi_da.c Thu Jan 13 18:20:27 2011 (r217368) > +++ head/sys/cam/scsi/scsi_da.c Thu Jan 13 18:20:33 2011 (r217369) > @@ -1127,9 +1127,9 @@ dasysctlinit(void *context, int pending) > struct ccb_trans_settings_fc *fc = &cts.xport_specific.fc; > if (fc->valid & CTS_FC_VALID_WWPN) { > softc->wwpn = fc->wwpn; > - SYSCTL_ADD_XLONG(&softc->sysctl_ctx, > + SYSCTL_ADD_X64(&softc->sysctl_ctx, > SYSCTL_CHILDREN(softc->sysctl_tree), > - OID_AUTO, "wwpn", CTLTYPE_QUAD | CTLFLAG_RD, > + OID_AUTO, "wwpn", CTLFLAG_RD, > &softc->wwpn, "World Wide Port Name"); > } > } > > Modified: head/sys/sys/sysctl.h > == > --- head/sys/sys/sysctl.h Thu Jan 13 18:20:27 2011 (r217368) > +++ head/sys/sys/sysctl.h Thu Jan 13 18:20:33 2011 (r217369) > @@ -245,6 +245,8 @@ SYSCTL_ALLOWED_TYPES(ULONG, unsigned lon > SYSCTL_ALLOWED_TYPES(XLONG, unsigned long *a; long *b; ); > SYSCTL_ALLOWED_TYPES(INT64, int64_t *a; long long *b; ); > SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a; unsigned long long *b; ); > +SYSCTL_ALLOWED_TYPES(XINT64, uint64_t *a; int64_t *b; > + unsigned long long *c; long long *d; ); > > #ifdef notyet > #define SYSCTL_ADD_ASSERT_TYPE(type, ptr) \ > @@ -389,7 +391,6 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a > SYSCTL_ADD_ASSERT_TYPE(INT64, ptr), 0, \ > sysctl_handle_quad, "Q", __DESCR(descr)) > > -/* Oid for a quad. The pointer must be non NULL. */ > #define SYSCTL_UQUAD(parent, nbr, name, access, ptr, val, descr) > \ > SYSCTL_ASSERT_TYPE(UINT64, ptr, parent, name); \ > SYSCTL_OID(parent, nbr, name, \ > @@ -402,6 +403,18 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a > SYSCTL_ADD_ASSERT_TYPE(UINT64, ptr), 0, \ > sysctl_handle_quad, "QU", __DESCR(descr)) > > +#define SYSCTL_X64(parent, nbr, name, access, ptr, val, descr) \ > + SYSCTL_ASSERT_TYPE(XINT64, ptr, parent, name); \ > + SYSCTL_OID(parent, nbr, name, \ > + CTLTYPE_QUAD | CTLFLAG_MPSAFE | (access), \ > + ptr, val, sysctl_handle_quad, "QX", descr) > + > +#define SYSCTL_ADD_X64(ctx, parent, nbr, name, access, ptr, descr) > \ > + sysctl_add_oid(ctx, parent, nbr, name, \ > + CTLTYPE_QUAD | CTLFLAG_MPSAFE | (access), \ > + SYSCTL_ADD_ASSERT_TYPE(XINT64, ptr), 0, \ > + sysctl_handle_quad, "QX", __DESCR(descr)) > + > /* Oid for an opaque object. Specified by a pointer and a length. */ > #define SYSCTL_OPAQUE(parent, nbr, name, access, ptr, len, fmt, descr) \ > SYSCTL_OID(parent, nbr, name, CTLTYPE_OPAQUE|(access), \ > ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r217371 - head/etc/mtree
Author: nwhitehorn Date: Thu Jan 13 18:52:13 2011 New Revision: 217371 URL: http://svn.freebsd.org/changeset/base/217371 Log: Remove /usr/share/examples/[lib]dialog, missed in the new dialog import. Submitted by: dim Modified: head/etc/mtree/BSD.usr.dist Modified: head/etc/mtree/BSD.usr.dist == --- head/etc/mtree/BSD.usr.dist Thu Jan 13 18:20:37 2011(r217370) +++ head/etc/mtree/BSD.usr.dist Thu Jan 13 18:52:13 2011(r217371) @@ -201,8 +201,6 @@ .. cvsup .. -dialog -.. diskless .. drivers @@ -251,8 +249,6 @@ .. .. .. -libdialog -.. libvgl .. mdoc ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r217374 - head/sys/dev/usb/controller
Author: hselasky Date: Thu Jan 13 20:03:55 2011 New Revision: 217374 URL: http://svn.freebsd.org/changeset/base/217374 Log: - Add support for 64-byte contexts to XHCI driver. - Remove some dead code. - Fixed one instance of missing endian conversion. Approved by: thompsa (mentor) Modified: head/sys/dev/usb/controller/xhci.c head/sys/dev/usb/controller/xhci.h Modified: head/sys/dev/usb/controller/xhci.c == --- head/sys/dev/usb/controller/xhci.c Thu Jan 13 19:25:15 2011 (r217373) +++ head/sys/dev/usb/controller/xhci.c Thu Jan 13 20:03:55 2011 (r217374) @@ -133,6 +133,12 @@ static usb_error_t xhci_configure_mask(s static usb_error_t xhci_cmd_evaluate_ctx(struct xhci_softc *, uint64_t, uint8_t); static void xhci_endpoint_doorbell(struct usb_xfer *); +static void xhci_ctx_set_le32(struct xhci_softc *sc, volatile uint32_t *ptr, uint32_t val); +static uint32_t xhci_ctx_get_le32(struct xhci_softc *sc, volatile uint32_t *ptr); +static void xhci_ctx_set_le64(struct xhci_softc *sc, volatile uint64_t *ptr, uint64_t val); +#ifdef USB_DEBUG +static uint64_t xhci_ctx_get_le64(struct xhci_softc *sc, volatile uint64_t *ptr); +#endif extern struct usb_bus_methods xhci_bus_methods; @@ -147,26 +153,26 @@ xhci_dump_trb(struct xhci_trb *trb) } static void -xhci_dump_endpoint(struct xhci_endp_ctx *pep) +xhci_dump_endpoint(struct xhci_softc *sc, struct xhci_endp_ctx *pep) { DPRINTFN(5, "pep = %p\n", pep); - DPRINTFN(5, "dwEpCtx0=0x%08x\n", pep->dwEpCtx0); - DPRINTFN(5, "dwEpCtx1=0x%08x\n", pep->dwEpCtx1); - DPRINTFN(5, "qwEpCtx2=0x%016llx\n", (long long)pep->qwEpCtx2); - DPRINTFN(5, "dwEpCtx4=0x%08x\n", pep->dwEpCtx4); - DPRINTFN(5, "dwEpCtx5=0x%08x\n", pep->dwEpCtx5); - DPRINTFN(5, "dwEpCtx6=0x%08x\n", pep->dwEpCtx6); - DPRINTFN(5, "dwEpCtx7=0x%08x\n", pep->dwEpCtx7); + DPRINTFN(5, "dwEpCtx0=0x%08x\n", xhci_ctx_get_le32(sc, &pep->dwEpCtx0)); + DPRINTFN(5, "dwEpCtx1=0x%08x\n", xhci_ctx_get_le32(sc, &pep->dwEpCtx1)); + DPRINTFN(5, "qwEpCtx2=0x%016llx\n", (long long)xhci_ctx_get_le64(sc, &pep->qwEpCtx2)); + DPRINTFN(5, "dwEpCtx4=0x%08x\n", xhci_ctx_get_le32(sc, &pep->dwEpCtx4)); + DPRINTFN(5, "dwEpCtx5=0x%08x\n", xhci_ctx_get_le32(sc, &pep->dwEpCtx5)); + DPRINTFN(5, "dwEpCtx6=0x%08x\n", xhci_ctx_get_le32(sc, &pep->dwEpCtx6)); + DPRINTFN(5, "dwEpCtx7=0x%08x\n", xhci_ctx_get_le32(sc, &pep->dwEpCtx7)); } static void -xhci_dump_device(struct xhci_slot_ctx *psl) +xhci_dump_device(struct xhci_softc *sc, struct xhci_slot_ctx *psl) { DPRINTFN(5, "psl = %p\n", psl); - DPRINTFN(5, "dwSctx0=0x%08x\n", psl->dwSctx0); - DPRINTFN(5, "dwSctx1=0x%08x\n", psl->dwSctx1); - DPRINTFN(5, "dwSctx2=0x%08x\n", psl->dwSctx2); - DPRINTFN(5, "dwSctx3=0x%08x\n", psl->dwSctx3); + DPRINTFN(5, "dwSctx0=0x%08x\n", xhci_ctx_get_le32(sc, &psl->dwSctx0)); + DPRINTFN(5, "dwSctx1=0x%08x\n", xhci_ctx_get_le32(sc, &psl->dwSctx1)); + DPRINTFN(5, "dwSctx2=0x%08x\n", xhci_ctx_get_le32(sc, &psl->dwSctx2)); + DPRINTFN(5, "dwSctx3=0x%08x\n", xhci_ctx_get_le32(sc, &psl->dwSctx3)); } #endif @@ -188,6 +194,60 @@ xhci_iterate_hw_softc(struct usb_bus *bu } } +static void +xhci_ctx_set_le32(struct xhci_softc *sc, volatile uint32_t *ptr, uint32_t val) +{ + if (sc->sc_ctx_is_64_byte) { + uint32_t offset; + /* exploit the fact that our structures are XHCI_PAGE_SIZE aligned */ + /* all contexts are initially 32-bytes */ + offset = ((uintptr_t)ptr) & ((XHCI_PAGE_SIZE - 1) & ~(31U)); + ptr = (volatile uint32_t *)(((volatile uint8_t *)ptr) + offset); + } + *ptr = htole32(val); +} + +static uint32_t +xhci_ctx_get_le32(struct xhci_softc *sc, volatile uint32_t *ptr) +{ + if (sc->sc_ctx_is_64_byte) { + uint32_t offset; + /* exploit the fact that our structures are XHCI_PAGE_SIZE aligned */ + /* all contexts are initially 32-bytes */ + offset = ((uintptr_t)ptr) & ((XHCI_PAGE_SIZE - 1) & ~(31U)); + ptr = (volatile uint32_t *)(((volatile uint8_t *)ptr) + offset); + } + return (le32toh(*ptr)); +} + +static void +xhci_ctx_set_le64(struct xhci_softc *sc, volatile uint64_t *ptr, uint64_t val) +{ + if (sc->sc_ctx_is_64_byte) { + uint32_t offset; + /* exploit the fact that our structures are XHCI_PAGE_SIZE aligned */ + /* all contexts are initially 32-bytes */ + offset = ((uintptr_t)ptr) & ((XHCI_PAGE_SIZE - 1) & ~(31U)); + ptr = (volatile uint64_t *)(((volatile uint8_t *)ptr) + offset); + } + *ptr = htole64(val); +} + +#ifdef USB_DEBUG +static uint64_t +xhci_ctx_get_le64(struct xhci_softc *sc, volatile uint64_t *ptr) +{ +
Re: svn commit: r217365 - in head: sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/debugger sys/contrib/dev/acpica/disassembler sys/contrib/
On Thu, Jan 13, 2011 at 01:10:17PM -0500, Jung-uk Kim wrote: > On Thursday 13 January 2011 12:32 pm, Jung-uk Kim wrote: > > Author: jkim > > Date: Thu Jan 13 17:32:32 2011 > > New Revision: 217365 > > URL: http://svn.freebsd.org/changeset/base/217365 > > > > Log: > > Merge ACPICA 20110112. Switch to BSD/GPLv2 dual license[1]. > > I'd like to take this opportunity to say thanks to Intel ACPICA team > for arranging new release with the dual license and continuing > support for FreeBSD. Yes, thanks to Intel for making this change - and let me also say thank you for the legwork on driving this through. -Ed ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r217375 - in head/lib/csu: amd64 arm common i386-elf ia64 mips powerpc powerpc64
Author: dim Date: Thu Jan 13 20:44:31 2011 New Revision: 217375 URL: http://svn.freebsd.org/changeset/base/217375 Log: Apply a workaround for a binutils issue with the .note.ABI-tag section generated from lib/csu/common/crtbrand.c (which ultimately ends up in executables and shared libraries, via crt1.o, gcrt1.o or Scrt1.o). For all arches except sparc, gcc emits the section directive for the abitag struct in crtbrand.c with a PROGBITS type. However, newer versions of binutils (after 2.16.90) require the section to be of NOTE type, to guarantee that the .note.ABI-tag section correctly ends up in the first page of the final executable. Unfortunately, there is no clean way to tell gcc to use another section type, so crtbrand.c (or the C files that include it) must be compiled in multiple steps: - Compile the .c file to a .s file. - Edit the .s file to change the 'progbits' type to 'note', for the section directive that defines the .note.ABI-tag section. - Compile the .s file to an object file. These steps are done in the invididual Makefiles for each applicable arch. Reviewed by: kib Modified: head/lib/csu/amd64/Makefile head/lib/csu/arm/Makefile head/lib/csu/common/crtbrand.c head/lib/csu/i386-elf/Makefile head/lib/csu/ia64/Makefile head/lib/csu/mips/Makefile head/lib/csu/powerpc/Makefile head/lib/csu/powerpc64/Makefile Modified: head/lib/csu/amd64/Makefile == --- head/lib/csu/amd64/Makefile Thu Jan 13 20:03:55 2011(r217374) +++ head/lib/csu/amd64/Makefile Thu Jan 13 20:44:31 2011(r217375) @@ -12,12 +12,31 @@ CFLAGS+=-fno-omit-frame-pointer all: ${OBJS} CLEANFILES=${OBJS} +CLEANFILES+= crt1.s gcrt1.s Scrt1.s -gcrt1.o: crt1.c - ${CC} ${CFLAGS} -DGCRT -c -o gcrt1.o ${.CURDIR}/crt1.c +# See the comment in lib/csu/common/crtbrand.c for the reason crt1.c is not +# directly compiled to .o files. -Scrt1.o: crt1.c - ${CC} ${CFLAGS} -fPIC -DPIC -c -o Scrt1.o ${.CURDIR}/crt1.c +crt1.s: crt1.c + ${CC} ${CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1.c + sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + +crt1.o: crt1.s + ${CC} ${CFLAGS} -c -o ${.TARGET} crt1.s + +gcrt1.s: crt1.c + ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c + sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + +gcrt1.o: gcrt1.s + ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1.s + +Scrt1.s: crt1.c + ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c + sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + +Scrt1.o: Scrt1.s + ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1.s realinstall: ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ Modified: head/lib/csu/arm/Makefile == --- head/lib/csu/arm/Makefile Thu Jan 13 20:03:55 2011(r217374) +++ head/lib/csu/arm/Makefile Thu Jan 13 20:44:31 2011(r217375) @@ -11,12 +11,31 @@ CFLAGS+=-I${.CURDIR}/../common \ all: ${OBJS} CLEANFILES=${OBJS} +CLEANFILES+= crt1.s gcrt1.s Scrt1.s -gcrt1.o: crt1.c - ${CC} ${CFLAGS} -DGCRT -c -o gcrt1.o ${.ALLSRC} +# See the comment in lib/csu/common/crtbrand.c for the reason crt1.c is not +# directly compiled to .o files. -Scrt1.o: crt1.c - ${CC} ${CFLAGS} -fPIC -DPIC -c -o Scrt1.o ${.ALLSRC} +crt1.s: crt1.c + ${CC} ${CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1.c + sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + +crt1.o: crt1.s + ${CC} ${CFLAGS} -c -o ${.TARGET} crt1.s + +gcrt1.s: crt1.c + ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c + sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + +gcrt1.o: gcrt1.s + ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1.s + +Scrt1.s: crt1.c + ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c + sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} + +Scrt1.o: Scrt1.s + ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1.s realinstall: ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ Modified: head/lib/csu/common/crtbrand.c == --- head/lib/csu/common/crtbrand.c Thu Jan 13 20:03:55 2011 (r217374) +++ head/lib/csu/common/crtbrand.c Thu Jan 13 20:44:31 2011 (r217375) @@ -36,6 +36,23 @@ __FBSDID("$FreeBSD$"); * Special ".note" entry specifying the ABI version. See * http://www.netbsd.org/Documentation/kernel/elf-notes.html * for more information. + * + * For all arches except sparc, gcc emits the section directive for the + * following struct with a PROGBITS type. However, newer versions of binutils + * (after 2.16.90) require the section to be of NOTE type, to guarantee that the + * .note.ABI-tag section correctly ends up in the fir
svn commit: r217379 - head/sys/dev/alc
Author: jhb Date: Thu Jan 13 21:49:14 2011 New Revision: 217379 URL: http://svn.freebsd.org/changeset/base/217379 Log: - Move ether_ifdetach() earlier and remove now-unneeded IN_DETACH flag. - Expand locking in interrupt handler. Reviewed by: yongari Modified: head/sys/dev/alc/if_alc.c head/sys/dev/alc/if_alcvar.h Modified: head/sys/dev/alc/if_alc.c == --- head/sys/dev/alc/if_alc.c Thu Jan 13 21:32:37 2011(r217378) +++ head/sys/dev/alc/if_alc.c Thu Jan 13 21:49:14 2011(r217379) @@ -1052,13 +1052,12 @@ alc_detach(device_t dev) ifp = sc->alc_ifp; if (device_is_attached(dev)) { + ether_ifdetach(ifp); ALC_LOCK(sc); - sc->alc_flags |= ALC_FLAG_DETACH; alc_stop(sc); ALC_UNLOCK(sc); callout_drain(&sc->alc_tick_ch); taskqueue_drain(sc->alc_tq, &sc->alc_int_task); - ether_ifdetach(ifp); } if (sc->alc_tq != NULL) { @@ -2368,7 +2367,7 @@ alc_ioctl(struct ifnet *ifp, u_long cmd, ((ifp->if_flags ^ sc->alc_if_flags) & (IFF_PROMISC | IFF_ALLMULTI)) != 0) alc_rxfilter(sc); - else if ((sc->alc_flags & ALC_FLAG_DETACH) == 0) + else alc_init_locked(sc); } else if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) alc_stop(sc); @@ -2663,6 +2662,7 @@ alc_int_task(void *arg, int pending) ifp = sc->alc_ifp; status = CSR_READ_4(sc, ALC_INTR_STATUS); + ALC_LOCK(sc); if (sc->alc_morework != 0) { sc->alc_morework = 0; status |= INTR_RX_PKT; @@ -2680,7 +2680,6 @@ alc_int_task(void *arg, int pending) if (more == EAGAIN) sc->alc_morework = 1; else if (more == EIO) { - ALC_LOCK(sc); ifp->if_drv_flags &= ~IFF_DRV_RUNNING; alc_init_locked(sc); ALC_UNLOCK(sc); @@ -2698,7 +2697,6 @@ alc_int_task(void *arg, int pending) if ((status & INTR_TXQ_TO_RST) != 0) device_printf(sc->alc_dev, "TxQ reset! -- resetting\n"); - ALC_LOCK(sc); ifp->if_drv_flags &= ~IFF_DRV_RUNNING; alc_init_locked(sc); ALC_UNLOCK(sc); @@ -2706,11 +2704,12 @@ alc_int_task(void *arg, int pending) } if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0 && !IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - alc_start(ifp); + alc_start_locked(ifp); } if (more == EAGAIN || (CSR_READ_4(sc, ALC_INTR_STATUS) & ALC_INTRS) != 0) { + ALC_UNLOCK(sc); taskqueue_enqueue(sc->alc_tq, &sc->alc_int_task); return; } @@ -2720,6 +2719,7 @@ done: /* Re-enable interrupts if we're running. */ CSR_WRITE_4(sc, ALC_INTR_STATUS, 0x7FFF); } + ALC_UNLOCK(sc); } static void @@ -3039,7 +3039,9 @@ alc_rxeof(struct alc_softc *sc, struct r #endif { /* Pass it on. */ + ALC_UNLOCK(sc); (*ifp->if_input)(ifp, m); + ALC_LOCK(sc); } } } Modified: head/sys/dev/alc/if_alcvar.h == --- head/sys/dev/alc/if_alcvar.hThu Jan 13 21:32:37 2011 (r217378) +++ head/sys/dev/alc/if_alcvar.hThu Jan 13 21:49:14 2011 (r217379) @@ -230,7 +230,6 @@ struct alc_softc { #defineALC_FLAG_L0S0x0400 #defineALC_FLAG_L1S0x0800 #defineALC_FLAG_APS0x1000 -#defineALC_FLAG_DETACH 0x4000 #defineALC_FLAG_LINK 0x8000 struct callout alc_tick_ch; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r217381 - head/sys/dev/re
Author: yongari Date: Thu Jan 13 22:49:10 2011 New Revision: 217381 URL: http://svn.freebsd.org/changeset/base/217381 Log: Allow TX/RX checksum offloading to be configured independently. Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c == --- head/sys/dev/re/if_re.c Thu Jan 13 21:53:51 2011(r217380) +++ head/sys/dev/re/if_re.c Thu Jan 13 22:49:10 2011(r217381) @@ -2923,14 +2923,20 @@ re_ioctl(struct ifnet *ifp, u_long comma } } #endif /* DEVICE_POLLING */ - if (mask & IFCAP_HWCSUM) { - ifp->if_capenable ^= IFCAP_HWCSUM; - if (ifp->if_capenable & IFCAP_TXCSUM) + if ((mask & IFCAP_TXCSUM) != 0 && + (ifp->if_capabilities & IFCAP_TXCSUM) != 0) { + ifp->if_capenable ^= IFCAP_TXCSUM; + if ((ifp->if_capenable & IFCAP_TXCSUM) != 0) ifp->if_hwassist |= RE_CSUM_FEATURES; else ifp->if_hwassist &= ~RE_CSUM_FEATURES; reinit = 1; } + if ((mask & IFCAP_RXCSUM) != 0 && + (ifp->if_capabilities & IFCAP_RXCSUM) != 0) { + ifp->if_capenable ^= IFCAP_RXCSUM; + reinit = 1; + } if ((mask & IFCAP_TSO4) != 0 && (ifp->if_capabilities & IFCAP_TSO) != 0) { ifp->if_capenable ^= IFCAP_TSO4; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r217382 - head/sys/dev/re
Author: yongari Date: Thu Jan 13 22:52:57 2011 New Revision: 217382 URL: http://svn.freebsd.org/changeset/base/217382 Log: re_reset() should be called only after setting device specific features. Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c == --- head/sys/dev/re/if_re.c Thu Jan 13 22:49:10 2011(r217381) +++ head/sys/dev/re/if_re.c Thu Jan 13 22:52:57 2011(r217382) @@ -1258,11 +1258,6 @@ re_attach(device_t dev) CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF); } - /* Reset the adapter. */ - RL_LOCK(sc); - re_reset(sc); - RL_UNLOCK(sc); - hw_rev = re_hwrevs; hwrev = CSR_READ_4(sc, RL_TXCFG); switch (hwrev & 0x7000) { @@ -1366,6 +1361,11 @@ re_attach(device_t dev) break; } + /* Reset the adapter. */ + RL_LOCK(sc); + re_reset(sc); + RL_UNLOCK(sc); + /* Enable PME. */ CSR_WRITE_1(sc, RL_EECMD, RL_EE_MODE); cfg = CSR_READ_1(sc, RL_CFG1); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r217383 - head/lib/csu/i386-elf
Author: kib Date: Thu Jan 13 23:00:22 2011 New Revision: 217383 URL: http://svn.freebsd.org/changeset/base/217383 Log: The (%esp & 0xf) == 0 should be true before the call instruction is executed, for the properly aligned stack. Reported and tested by: rstone Pointy hat to:kib MFC after:3 days Modified: head/lib/csu/i386-elf/crt1_s.S Modified: head/lib/csu/i386-elf/crt1_s.S == --- head/lib/csu/i386-elf/crt1_s.S Thu Jan 13 22:52:57 2011 (r217382) +++ head/lib/csu/i386-elf/crt1_s.S Thu Jan 13 23:00:22 2011 (r217383) @@ -42,6 +42,7 @@ _start: .cfi_def_cfa_register %ebp andl$0xfff0,%esp # align stack leal8(%ebp),%eax + subl$4,%esp pushl %eax# argv pushl 4(%ebp) # argc pushl %edx# rtld cleanup ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r217384 - head/sys/dev/re
Author: yongari Date: Thu Jan 13 23:00:28 2011 New Revision: 217384 URL: http://svn.freebsd.org/changeset/base/217384 Log: Make sure to check validity of dma maps before destroying. Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c == --- head/sys/dev/re/if_re.c Thu Jan 13 23:00:22 2011(r217383) +++ head/sys/dev/re/if_re.c Thu Jan 13 23:00:28 2011(r217384) @@ -1663,15 +1663,19 @@ re_detach(device_t dev) /* Destroy all the RX and TX buffer maps */ if (sc->rl_ldata.rl_tx_mtag) { - for (i = 0; i < sc->rl_ldata.rl_tx_desc_cnt; i++) - bus_dmamap_destroy(sc->rl_ldata.rl_tx_mtag, - sc->rl_ldata.rl_tx_desc[i].tx_dmamap); + for (i = 0; i < sc->rl_ldata.rl_tx_desc_cnt; i++) { + if (sc->rl_ldata.rl_tx_desc[i].tx_dmamap) + bus_dmamap_destroy(sc->rl_ldata.rl_tx_mtag, + sc->rl_ldata.rl_tx_desc[i].tx_dmamap); + } bus_dma_tag_destroy(sc->rl_ldata.rl_tx_mtag); } if (sc->rl_ldata.rl_rx_mtag) { - for (i = 0; i < sc->rl_ldata.rl_rx_desc_cnt; i++) - bus_dmamap_destroy(sc->rl_ldata.rl_rx_mtag, - sc->rl_ldata.rl_rx_desc[i].rx_dmamap); + for (i = 0; i < sc->rl_ldata.rl_rx_desc_cnt; i++) { + if (sc->rl_ldata.rl_rx_desc[i].rx_dmamap) + bus_dmamap_destroy(sc->rl_ldata.rl_rx_mtag, + sc->rl_ldata.rl_rx_desc[i].rx_dmamap); + } if (sc->rl_ldata.rl_rx_sparemap) bus_dmamap_destroy(sc->rl_ldata.rl_rx_mtag, sc->rl_ldata.rl_rx_sparemap); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r217385 - head/sys/dev/re
Author: yongari Date: Thu Jan 13 23:15:09 2011 New Revision: 217385 URL: http://svn.freebsd.org/changeset/base/217385 Log: If driver is not able to allocate RX buffer, do not start driver. While I'm here move RX buffer allocation and descriptor initialization up to not touch hardware registers in case of RX buffer allocation failure. Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c == --- head/sys/dev/re/if_re.c Thu Jan 13 23:00:28 2011(r217384) +++ head/sys/dev/re/if_re.c Thu Jan 13 23:15:09 2011(r217385) @@ -2622,6 +2622,16 @@ re_init_locked(struct rl_softc *sc) re_reset(sc); /* +* For C+ mode, initialize the RX descriptors and mbufs. +*/ + if (re_rx_list_init(sc) != 0) { + device_printf(sc->rl_dev, "no memory for RX buffers\n"); + re_stop(sc); + return; + } + re_tx_list_init(sc); + + /* * Enable C+ RX and TX mode, as well as VLAN stripping and * RX checksum offload. We must configure the C+ register * before all others. @@ -2673,12 +2683,6 @@ re_init_locked(struct rl_softc *sc) CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF); /* -* For C+ mode, initialize the RX descriptors and mbufs. -*/ - re_rx_list_init(sc); - re_tx_list_init(sc); - - /* * Load the addresses of the RX and TX lists into the chip. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r217386 - stable/8/share/man/man9
Author: lstewart Date: Fri Jan 14 00:57:13 2011 New Revision: 217386 URL: http://svn.freebsd.org/changeset/base/217386 Log: MFC r216995,217043: Add a man page for the Object Specific Data (OSD) KPI. Although not directly related the FreeBSD Foundation funded "Five New TCP Congestion Control Algorithms for FreeBSD" project, the understanding and inspiration required to write this documentation was significantly bolstered by the Foundation's support. Reviewed by: pjd Added: stable/8/share/man/man9/osd.9 - copied, changed from r216995, head/share/man/man9/osd.9 Modified: stable/8/share/man/man9/Makefile Directory Properties: stable/8/share/man/ (props changed) stable/8/share/man/man1/ (props changed) stable/8/share/man/man3/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/share/man/man5/ (props changed) stable/8/share/man/man7/ (props changed) stable/8/share/man/man8/ (props changed) stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man9/Makefile == --- stable/8/share/man/man9/MakefileThu Jan 13 23:15:09 2011 (r217385) +++ stable/8/share/man/man9/MakefileFri Jan 14 00:57:13 2011 (r217386) @@ -173,6 +173,7 @@ MAN=accept_filter.9 \ mutex.9 \ namei.9 \ netisr.9 \ + osd.9 \ panic.9 \ pbuf.9 \ p_candebug.9 \ Copied and modified: stable/8/share/man/man9/osd.9 (from r216995, head/share/man/man9/osd.9) == --- head/share/man/man9/osd.9 Wed Jan 5 11:49:23 2011(r216995, copy source) +++ stable/8/share/man/man9/osd.9 Fri Jan 14 00:57:13 2011 (r217386) @@ -34,7 +34,7 @@ .Nm osd_deregister , .Nm osd_set , .Nm osd_get , -.Nm osd_del, +.Nm osd_del , .Nm osd_call , .Nm osd_exit .Nd Object Specific Data ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r217387 - stable/7/share/man/man9
Author: lstewart Date: Fri Jan 14 01:07:39 2011 New Revision: 217387 URL: http://svn.freebsd.org/changeset/base/217387 Log: MFC r216995,217043: Add a man page for the Object Specific Data (OSD) KPI. Although not directly related the FreeBSD Foundation funded "Five New TCP Congestion Control Algorithms for FreeBSD" project, the understanding and inspiration required to write this documentation was significantly bolstered by the Foundation's support. Reviewed by: pjd Added: stable/7/share/man/man9/osd.9 - copied, changed from r216995, head/share/man/man9/osd.9 Modified: stable/7/share/man/man9/Makefile Directory Properties: stable/7/share/man/ (props changed) stable/7/share/man/man1/ (props changed) stable/7/share/man/man3/ (props changed) stable/7/share/man/man4/ (props changed) stable/7/share/man/man5/ (props changed) stable/7/share/man/man7/ (props changed) stable/7/share/man/man8/ (props changed) stable/7/share/man/man9/ (props changed) Modified: stable/7/share/man/man9/Makefile == --- stable/7/share/man/man9/MakefileFri Jan 14 00:57:13 2011 (r217386) +++ stable/7/share/man/man9/MakefileFri Jan 14 01:07:39 2011 (r217387) @@ -157,6 +157,7 @@ MAN=accept_filter.9 \ mtx_pool.9 \ mutex.9 \ namei.9 \ + osd.9 \ panic.9 \ pbuf.9 \ p_candebug.9 \ Copied and modified: stable/7/share/man/man9/osd.9 (from r216995, head/share/man/man9/osd.9) == --- head/share/man/man9/osd.9 Wed Jan 5 11:49:23 2011(r216995, copy source) +++ stable/7/share/man/man9/osd.9 Fri Jan 14 01:07:39 2011 (r217387) @@ -34,7 +34,7 @@ .Nm osd_deregister , .Nm osd_set , .Nm osd_get , -.Nm osd_del, +.Nm osd_del , .Nm osd_call , .Nm osd_exit .Nd Object Specific Data @@ -378,7 +378,7 @@ terminates prematurely and returns the m .Sh HISTORY The Object Specific Data (OSD) facility first appeared in -.Fx 8.0 . +.Fx 7.3 . .Sh AUTHORS .An -nosplit The ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r217330 - head/sys/x86/x86
On 01/12/2011 17:06, Bruce Evans wrote: On Wed, 12 Jan 2011, John Baldwin wrote: Log: Fix a brain fart. Since this file is shared between i386 and amd64, a bus_size_t may be 32 or 64 bits. Change the bounce_zone alignment field to explicitly be 32 bits, as I can't really imagine a DMA device that needs anything close to 2GB alignment of data. Hmm, we do have devices with 4GB boundaries though. I think I'd prefer it if you instead if you did this: #if defined(amd64) || defined(PAE) #defineSYSCTL_ADD_BUS_SIZE_TSYSCTL_ADD_UQUAD #else #defineSYSCTL_ADD_BUS_SIZE_TSYSCTL_ADD_UINT #endif and then just used SYSCTL_ADD_BUS_SIZE_T() in the code so we could let the members in the bounce zone retain the same types passed to bus_dma_tag_create(). U_LONG should work on all arches. malloc(9) still uses u_long instead of size_t. This works for scalars even on the recently removed i386's with 32-bit longs where u_long is larger than size_t, since larger is a fail-safe direction. This fails for pointers. Newer parts of malloc() and uma are broken unless u_long is the same as uintptr_t, since they cast pointers to u_long. This direction is fail-safe too, but gcc warns about it. u_long doesn't work for N32. There, the pointers may only be 32-bit, but PAs ar 64-bit. Longs are only 32-bits. Warner uquad_t should never be used, like unsigned long long. Similarly for signed types. Perhaps it could be removed in sysctl interfaces first. Bruce ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r217388 - head/sys/contrib/pf/net
Author: csjp Date: Fri Jan 14 04:24:53 2011 New Revision: 217388 URL: http://svn.freebsd.org/changeset/base/217388 Log: Correct bogus initialization. It should be noted that this change has been corrected in the vendor branch, but for now, silence clang warnings. Found by: clang Discussed with: mlaier MFC after:1 week Modified: head/sys/contrib/pf/net/pf_osfp.c Modified: head/sys/contrib/pf/net/pf_osfp.c == --- head/sys/contrib/pf/net/pf_osfp.c Fri Jan 14 01:07:39 2011 (r217387) +++ head/sys/contrib/pf/net/pf_osfp.c Fri Jan 14 04:24:53 2011 (r217388) @@ -601,7 +601,7 @@ pf_osfp_validate(void) if (find.fp_mss == 0) find.fp_mss = 128; if (f->fp_flags & PF_OSFP_WSIZE_MSS) - find.fp_wsize *= find.fp_mss, 1; + find.fp_wsize *= find.fp_mss; else if (f->fp_flags & PF_OSFP_WSIZE_MTU) find.fp_wsize *= (find.fp_mss + 40); else if (f->fp_flags & PF_OSFP_WSIZE_MOD) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r217369 - in head/sys: cam/scsi sys
On Thu, 13 Jan 2011, Matthew D Fleming wrote: Log: Add a 64-bit hex-printed sysctl(9) since there is at least one place in the code that wanted it. It is named X64 rather than XQUAD since the quad name is a historical abomination that should not be perpetuated. :-). It is only long long that is abominable. Both are historical. I think these X formats shouldn't exist, even as defaults. Instead, sysctl(8) should have option(s) to control the format. I'm used to typing lots of "p/x"s to get hex formatting in gdb. There is little reason for sysctl(8) to have finer-grained control than gdb (sysctl now has hard-coded defaults instead of control). Now with stricter type checking, even formats for integers are redundant. The CTLTYPE now always matches the type, and the format should always match the type. The space wasted for the format is 1 pointer plus the string. Perhaps there are some remaining type errors involving the kernel type being signed when it should be unsigned, or vice versa. This could be "fixed" by mis-specifying the format with a U, or vice versa. Since the specification is usually done by invoking a SYSCTL*() macro, most such fixes, if any, would have been undone by changing the macro to match the type, and it would take fixing the kernel type to fix the userland format. Modified: head/sys/cam/scsi/scsi_da.c == --- head/sys/cam/scsi/scsi_da.c Thu Jan 13 18:20:27 2011(r217368) +++ head/sys/cam/scsi/scsi_da.c Thu Jan 13 18:20:33 2011(r217369) @@ -1127,9 +1127,9 @@ dasysctlinit(void *context, int pending) struct ccb_trans_settings_fc *fc = &cts.xport_specific.fc; if (fc->valid & CTS_FC_VALID_WWPN) { softc->wwpn = fc->wwpn; - SYSCTL_ADD_XLONG(&softc->sysctl_ctx, + SYSCTL_ADD_X64(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), - OID_AUTO, "wwpn", CTLTYPE_QUAD | CTLFLAG_RD, + OID_AUTO, "wwpn", CTLFLAG_RD, &softc->wwpn, "World Wide Port Name"); } } Hmm, forcing hex might be best for flags (but I'll ask for binary then :-) and for mac addresses, but not for inet4 addresses. I don't know what sort of address this is. Bruce ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r217369 - in head/sys: cam/scsi sys
On Thu, 13 Jan 2011 m...@freebsd.org wrote: There appear to be 330 uses of SYSCTL and QUAD on the same line in CURRENT. This seems reasonable to change them to S64, U64 and X64 so they correctly reflect the size they operate upon. What do y'all think? Now I suggest delaying this until they can be renamed to a type- generic SYSCTL_INT() (would probably need to be spelled differently, SYSCTL_I() say, even if SYSCTL_INT() was changed at the same time). Bruce ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"