svn commit: r232912 - head/sys/mips/atheros
Author: adrian Date: Tue Mar 13 06:15:20 2012 New Revision: 232912 URL: http://svn.freebsd.org/changeset/base/232912 Log: Correctly (I hope) deallocate the if_arge RX buffer ring on arge_stop(). I had some interesting hangs until I realised I should try flushing the DDR FIFO register and lo and behold, hangs stopped occuring. I've put in a few DDR flushes here and there in case people decide to reuse some of these functions. It's very very likely they're almost all superflous. To test: * Connect to a network with a _lot_ of broadcast traffic * Do this: # while true; do ifconfig arge0 down; ifconfig arge0 up; done This fixes the mbuf exhaustion that has been reported when the interface state flaps up/down. Modified: head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/if_arge.c == --- head/sys/mips/atheros/if_arge.c Tue Mar 13 05:21:14 2012 (r232911) +++ head/sys/mips/atheros/if_arge.c Tue Mar 13 06:15:20 2012 (r232912) @@ -118,6 +118,7 @@ static int arge_probe(device_t); static void arge_reset_dma(struct arge_softc *); static int arge_resume(device_t); static int arge_rx_ring_init(struct arge_softc *); +static void arge_rx_ring_free(struct arge_softc *sc); static int arge_tx_ring_init(struct arge_softc *); #ifdef DEVICE_POLLING static int arge_poll(struct ifnet *, enum poll_cmd, int); @@ -807,6 +808,12 @@ arge_reset_dma(struct arge_softc *sc) DMA_RX_STATUS_BUS_ERROR | DMA_RX_STATUS_OVERFLOW); ARGE_WRITE(sc, AR71XX_DMA_TX_STATUS, DMA_TX_STATUS_BUS_ERROR | DMA_TX_STATUS_UNDERRUN); + + /* +* Force a DDR flush so any pending data is properly +* flushed to RAM before underlying buffers are freed. +*/ + arge_flush_ddr(sc); } @@ -1083,6 +1090,10 @@ arge_stop(struct arge_softc *sc) ARGE_WRITE(sc, AR71XX_DMA_INTR, 0); arge_reset_dma(sc); + + /* Flush FIFO and free any existing mbufs */ + arge_flush_ddr(sc); + arge_rx_ring_free(sc); } @@ -1531,6 +1542,12 @@ arge_rx_ring_init(struct arge_softc *sc) bzero(rd-arge_rx_ring, sizeof(rd-arge_rx_ring)); for (i = 0; i ARGE_RX_RING_COUNT; i++) { rxd = sc-arge_cdata.arge_rxdesc[i]; + if (rxd-rx_m != NULL) { + device_printf(sc-arge_dev, + %s: ring[%d] rx_m wasn't free?\n, + __func__, + i); + } rxd-rx_m = NULL; rxd-desc = rd-arge_rx_ring[i]; if (i == ARGE_RX_RING_COUNT - 1) @@ -1551,6 +1568,32 @@ arge_rx_ring_init(struct arge_softc *sc) } /* + * Free all the buffers in the RX ring. + * + * TODO: ensure that DMA is disabled and no pending DMA + * is lurking in the FIFO. + */ +static void +arge_rx_ring_free(struct arge_softc *sc) +{ + int i; + struct arge_rxdesc *rxd; + + ARGE_LOCK_ASSERT(sc); + + for (i = 0; i ARGE_RX_RING_COUNT; i++) { + rxd = sc-arge_cdata.arge_rxdesc[i]; + /* Unmap the mbuf */ + if (rxd-rx_m != NULL) { + bus_dmamap_unload(sc-arge_cdata.arge_rx_tag, + rxd-rx_dmamap); + m_free(rxd-rx_m); + rxd-rx_m = NULL; + } + } +} + +/* * Initialize an RX descriptor and attach an MBUF cluster. */ static int ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r232913 - in head/sys: conf mips/conf
Author: jmallett Date: Tue Mar 13 06:22:49 2012 New Revision: 232913 URL: http://svn.freebsd.org/changeset/base/232913 Log: Don't build kernel.tramp on Octeon. Probably building it should be opt-in not opt-out, but I don't know enough about which ports need it to get the defaults right. Modified: head/sys/conf/Makefile.mips head/sys/mips/conf/OCTEON1 Modified: head/sys/conf/Makefile.mips == --- head/sys/conf/Makefile.mips Tue Mar 13 06:15:20 2012(r232912) +++ head/sys/conf/Makefile.mips Tue Mar 13 06:22:49 2012(r232913) @@ -63,6 +63,7 @@ TRAMP_ELFSIZE=32 # XXX hardcoded kernel entry point ASM_CFLAGS+=${CFLAGS} -D_LOCORE -DLOCORE +.if !defined(WITHOUT_KERNEL_TRAMPOLINE) KERNEL_EXTRA=trampoline trampoline: ${KERNEL_KO}.tramp.bin ${KERNEL_KO}.tramp.bin: ${KERNEL_KO} $S/$M/$M/elf_trampoline.c \ @@ -78,6 +79,7 @@ ${KERNEL_KO}.tramp.bin: ${KERNEL_KO} $S/ -o ${KERNEL_KO}.tramp.elf ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.elf \ ${KERNEL_KO}.tramp.bin +.endif %BEFORE_DEPEND Modified: head/sys/mips/conf/OCTEON1 == --- head/sys/mips/conf/OCTEON1 Tue Mar 13 06:15:20 2012(r232912) +++ head/sys/mips/conf/OCTEON1 Tue Mar 13 06:22:49 2012(r232913) @@ -27,6 +27,9 @@ makeoptions LDSCRIPT_NAME=ldscript.mips. makeoptionsMODULES_OVERRIDE= makeoptionsKERNLOADADDR=0x8010 +# We don't need to build a trampolined version of the kernel. +makeoptionsWITHOUT_KERNEL_TRAMPOLINE=1 + include../cavium/std.octeon1 hints OCTEON1.hints #Default places to look for devices. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r232914 - head/sys/mips/atheros
Author: adrian Date: Tue Mar 13 06:28:52 2012 New Revision: 232914 URL: http://svn.freebsd.org/changeset/base/232914 Log: Fix link status handling on if_arge upon system boot to allow bootp/NFS to function. From the submitter: This patch fixes an issue I encountered using an NFS root with an ar71xx-based MikroTik RouterBoard 450G on -current where the kernel fails to contact a DHCP/BOOTP server via if_arge when it otherwise should be able to. This may be the same issue that Monthadar Al Jaberi reported against an RSPRO on 6 March, as the signature is the same: %%% DHCP/BOOTP timeout for server 255.255.255.255 DHCP/BOOTP timeout for server 255.255.255.255 DHCP/BOOTP timeout for server 255.255.255.255 . . . DHCP/BOOTP timeout for server 255.255.255.255 DHCP/BOOTP timeout for server 255.255.255.255 arge0: initialization failed: no memory for rx buffers DHCP/BOOTP timeout for server 255.255.255.255 arge0: initialization failed: no memory for rx buffers %%% The primary issue that I found is that the DHCP/BOOTP message that bootpc_call() is sending never makes it onto the wire, which I believe is due to the following: - Last December, a change was made to the ifioctl that bootpc_call() uses to adjust the netmask around the sosend(). - The new ioctl (SIOCAIFADDR) performs an if_init when invoked, whereas the old one (SIOCSIFNETMASK) did not. - if_arge maintains its own sense of link state in sc-arge_link_status. - On a single-phy interface, sc-arge_link_status is initialized to 0 in arge_init_locked(). - sc-arge_link_status remains 0 until a phy state change notification causes arge_link_task to run, notice the link is up, and set it to 1. - The inits caused by the ifioctls in bootpc_call are reinitializing the interface, but not the phy, so sc-arge_link_status goes to 0 and remains there. - arge_start_locked() always sees sc-arge_link_status == 0 and returns without queuing anything. The attached patch changes arge_init_locked() such that in the single-phy case, instead of initializing sc-arge_link_status to 0, it runs arge_link_task() to set it according to the current phy state. This change has allowed my setup to mount an NFS root successfully. Submitted by: Patrick Kelsey kel...@ieee.org Reviewed by: juli Modified: head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/if_arge.c == --- head/sys/mips/atheros/if_arge.c Tue Mar 13 06:22:49 2012 (r232913) +++ head/sys/mips/atheros/if_arge.c Tue Mar 13 06:28:52 2012 (r232914) @@ -110,6 +110,7 @@ static int arge_ioctl(struct ifnet *, u_ static void arge_init(void *); static void arge_init_locked(struct arge_softc *); static void arge_link_task(void *, int); +static void arge_update_link_locked(struct arge_softc *sc); static void arge_set_pll(struct arge_softc *, int, int); static int arge_miibus_readreg(device_t, int, int); static void arge_miibus_statchg(device_t); @@ -684,13 +685,20 @@ static void arge_link_task(void *arg, int pending) { struct arge_softc *sc; + sc = (struct arge_softc *)arg; + + ARGE_LOCK(sc); + arge_update_link_locked(sc); + ARGE_UNLOCK(sc); +} + +static void +arge_update_link_locked(struct arge_softc *sc) +{ struct mii_data *mii; struct ifnet*ifp; uint32_tmedia, duplex; - sc = (struct arge_softc *)arg; - - ARGE_LOCK(sc); mii = device_get_softc(sc-arge_miibus); ifp = sc-arge_ifp; if (mii == NULL || ifp == NULL || @@ -708,10 +716,10 @@ arge_link_task(void *arg, int pending) duplex = mii-mii_media_active IFM_GMASK; arge_set_pll(sc, media, duplex); } - } else + } else { sc-arge_link_status = 0; + } - ARGE_UNLOCK(sc); } static void @@ -853,7 +861,6 @@ arge_init_locked(struct arge_softc *sc) if (sc-arge_miibus) { - sc-arge_link_status = 0; mii = device_get_softc(sc-arge_miibus); mii_mediachg(mii); } @@ -867,8 +874,10 @@ arge_init_locked(struct arge_softc *sc) ifp-if_drv_flags |= IFF_DRV_RUNNING; ifp-if_drv_flags = ~IFF_DRV_OACTIVE; - if (sc-arge_miibus) + if (sc-arge_miibus) { callout_reset(sc-arge_stat_callout, hz, arge_tick, sc); + arge_update_link_locked(sc); + } ARGE_WRITE(sc, AR71XX_DMA_TX_DESC, ARGE_TX_RING_ADDR(sc, 0)); ARGE_WRITE(sc, AR71XX_DMA_RX_DESC, ARGE_RX_RING_ADDR(sc, 0)); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r232915 - head/sys/contrib/octeon-sdk
Author: jmallett Date: Tue Mar 13 06:48:26 2012 New Revision: 232915 URL: http://svn.freebsd.org/changeset/base/232915 Log: Remove some files not used by the FreeBSD kernel which have been adding quite a bit of bloat to the kernel source tree's size. Deleted: head/sys/contrib/octeon-sdk/cvmx-csr-db-support.c head/sys/contrib/octeon-sdk/cvmx-csr-db.c head/sys/contrib/octeon-sdk/cvmx-csr-db.h head/sys/contrib/octeon-sdk/cvmx-error-custom.c head/sys/contrib/octeon-sdk/cvmx-error-custom.h head/sys/contrib/octeon-sdk/cvmx-error-init-cn30xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn31xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn38xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn38xxp2.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn50xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn52xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn52xxp1.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn56xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn56xxp1.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn58xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn58xxp1.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn61xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn63xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn63xxp1.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn66xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn68xx.c head/sys/contrib/octeon-sdk/cvmx-error-init-cn68xxp1.c head/sys/contrib/octeon-sdk/cvmx-error-init-cnf71xx.c head/sys/contrib/octeon-sdk/cvmx-error.c head/sys/contrib/octeon-sdk/cvmx-error.h Modified: head/sys/contrib/octeon-sdk/cvmx-pcie.c head/sys/contrib/octeon-sdk/cvmx-twsi.c head/sys/contrib/octeon-sdk/cvmx-usb.c Modified: head/sys/contrib/octeon-sdk/cvmx-pcie.c == --- head/sys/contrib/octeon-sdk/cvmx-pcie.c Tue Mar 13 06:28:52 2012 (r232914) +++ head/sys/contrib/octeon-sdk/cvmx-pcie.c Tue Mar 13 06:48:26 2012 (r232915) @@ -76,7 +76,9 @@ #include asm/octeon/cvmx-wqe.h #else #include cvmx.h +#if !defined(CVMX_BUILD_FOR_FREEBSD_KERNEL) #include cvmx-csr-db.h +#endif #include cvmx-pcie.h #include cvmx-sysinfo.h #include cvmx-swap.h Modified: head/sys/contrib/octeon-sdk/cvmx-twsi.c == --- head/sys/contrib/octeon-sdk/cvmx-twsi.c Tue Mar 13 06:28:52 2012 (r232914) +++ head/sys/contrib/octeon-sdk/cvmx-twsi.c Tue Mar 13 06:48:26 2012 (r232915) @@ -59,8 +59,10 @@ #else #include cvmx.h #include cvmx-twsi.h +#if !defined(CVMX_BUILD_FOR_FREEBSD_KERNEL) #include cvmx-csr-db.h #endif +#endif //#define PRINT_TWSI_CONFIG #ifdef PRINT_TWSI_CONFIG Modified: head/sys/contrib/octeon-sdk/cvmx-usb.c == --- head/sys/contrib/octeon-sdk/cvmx-usb.c Tue Mar 13 06:28:52 2012 (r232914) +++ head/sys/contrib/octeon-sdk/cvmx-usb.c Tue Mar 13 06:48:26 2012 (r232915) @@ -72,7 +72,9 @@ #include cvmx-usb.h #include cvmx-helper.h #include cvmx-helper-board.h +#if !defined(CVMX_BUILD_FOR_FREEBSD_KERNEL) #include cvmx-csr-db.h +#endif #include cvmx-swap.h #if !defined(CVMX_BUILD_FOR_FREEBSD_KERNEL) #include cvmx-error.h ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r232916 - head/sys/mips/atheros
Author: adrian Date: Tue Mar 13 06:50:56 2012 New Revision: 232916 URL: http://svn.freebsd.org/changeset/base/232916 Log: Remove a now unneeded ARGE_UNLOCK(). Whilst I'm here, remove a couple blank lines. Modified: head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/if_arge.c == --- head/sys/mips/atheros/if_arge.c Tue Mar 13 06:48:26 2012 (r232915) +++ head/sys/mips/atheros/if_arge.c Tue Mar 13 06:50:56 2012 (r232916) @@ -703,7 +703,6 @@ arge_update_link_locked(struct arge_soft ifp = sc-arge_ifp; if (mii == NULL || ifp == NULL || (ifp-if_drv_flags IFF_DRV_RUNNING) == 0) { - ARGE_UNLOCK(sc); return; } @@ -719,7 +718,6 @@ arge_update_link_locked(struct arge_soft } else { sc-arge_link_status = 0; } - } static void @@ -859,7 +857,6 @@ arge_init_locked(struct arge_softc *sc) arge_reset_dma(sc); - if (sc-arge_miibus) { mii = device_get_softc(sc-arge_miibus); mii_mediachg(mii); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r232901 - head/usr.sbin/pc-sysinstall/backend
On 03/12/12 23:41, Josh Paetzel wrote: Author: jpaetzel Date: Mon Mar 12 21:41:29 2012 New Revision: 232901 URL: http://svn.freebsd.org/changeset/base/232901 Log: Use gpart -a flag to 4k alignment. Submitted by:kris Obtained from: PC-BSD Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh == --- head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Mon Mar 12 21:34:10 2012(r232900) +++ head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Mon Mar 12 21:41:29 2012(r232901) @@ -314,7 +314,7 @@ setup_gpart_partitions() if [ $CURPART = 2 ] ; then # If this is GPT, make sure first partition is aligned to 4k sleep 2 - rc_halt gpart add -b 2016 ${SOUT} -t ${PARTYPE} ${_pDisk} + rc_halt gpart add -a 4k ${SOUT} -t ${PARTYPE} ${_pDisk} else sleep 2 rc_halt gpart add ${SOUT} -t ${PARTYPE} ${_pDisk} Just to note: if neither -b, nor -a is specified, gpart should now use stripe size/offset values provided by GEOM. So, for example, if partition is created on top of GEOM_STRIPE with 64K strip size, gpart would automatically align to that value. Forcing 4K alignment is a safety measure in case if device with 4K sectors wasn't detected as such, but it can be a pessimization for devices with stripes bigger then 4K. -- Alexander Motin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r232917 - head/sys/kern
Author: mav Date: Tue Mar 13 08:18:54 2012 New Revision: 232917 URL: http://svn.freebsd.org/changeset/base/232917 Log: Rewrite thread CPU usage percentage math to not depend on periodic calls with HZ rate through the sched_tick() calls from hardclock(). Potentially it can be used to improve precision, but now it is just minus one more reason to call hardclock() for every HZ tick on every active CPU. SCHED_4BSD never used sched_tick(), but keep it in place for now, as at least SCHED_FBFS existing in patches out of the tree depends on it. MFC after:1 month Modified: head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_ule.c == --- head/sys/kern/sched_ule.c Tue Mar 13 06:50:56 2012(r232916) +++ head/sys/kern/sched_ule.c Tue Mar 13 08:18:54 2012(r232917) @@ -99,7 +99,6 @@ struct td_sched { u_int ts_slptime; /* Number of ticks we vol. slept */ u_int ts_runtime; /* Number of ticks we were running */ int ts_ltick; /* Last tick that we were running on */ - int ts_incrtick;/* Last tick that we incremented on */ int ts_ftick; /* First tick that we were running on */ int ts_ticks; /* Tick count */ #ifdef KTR @@ -291,7 +290,7 @@ static void sched_thread_priority(struct static int sched_interact_score(struct thread *); static void sched_interact_update(struct thread *); static void sched_interact_fork(struct thread *); -static void sched_pctcpu_update(struct td_sched *); +static void sched_pctcpu_update(struct td_sched *, int); /* Operations on per processor queues */ static struct thread *tdq_choose(struct tdq *); @@ -671,7 +670,7 @@ cpu_search(const struct cpu_group *cg, s } } if (match CPU_SEARCH_HIGHEST) - if (hgroup.cs_load != -1 + if (hgroup.cs_load = 0 (load hload || (load == hload hgroup.cs_load high-cs_load))) { hload = load; @@ -1590,24 +1589,21 @@ sched_rr_interval(void) * mechanism since it happens with less regular and frequent events. */ static void -sched_pctcpu_update(struct td_sched *ts) +sched_pctcpu_update(struct td_sched *ts, int run) { + int t = ticks; - if (ts-ts_ticks == 0) - return; - if (ticks - (hz / 10) ts-ts_ltick - SCHED_TICK_TOTAL(ts) SCHED_TICK_MAX) - return; - /* -* Adjust counters and watermark for pctcpu calc. -*/ - if (ts-ts_ltick ticks - SCHED_TICK_TARG) - ts-ts_ticks = (ts-ts_ticks / (ticks - ts-ts_ftick)) * - SCHED_TICK_TARG; - else + if (t - ts-ts_ltick = SCHED_TICK_TARG) { ts-ts_ticks = 0; - ts-ts_ltick = ticks; - ts-ts_ftick = ts-ts_ltick - SCHED_TICK_TARG; + ts-ts_ftick = t - SCHED_TICK_TARG; + } else if (t - ts-ts_ftick = SCHED_TICK_MAX) { + ts-ts_ticks = (ts-ts_ticks / (ts-ts_ltick - ts-ts_ftick)) * + (ts-ts_ltick - (t - SCHED_TICK_TARG)); + ts-ts_ftick = t - SCHED_TICK_TARG; + } + if (run) + ts-ts_ticks += (t - ts-ts_ltick) SCHED_TICK_SHIFT; + ts-ts_ltick = t; } /* @@ -1826,6 +1822,7 @@ sched_switch(struct thread *td, struct t tdq = TDQ_CPU(cpuid); ts = td-td_sched; mtx = td-td_lock; + sched_pctcpu_update(ts, 1); ts-ts_rltick = ticks; td-td_lastcpu = td-td_oncpu; td-td_oncpu = NOCPU; @@ -1880,6 +1877,7 @@ sched_switch(struct thread *td, struct t #endif lock_profile_release_lock(TDQ_LOCKPTR(tdq)-lock_object); TDQ_LOCKPTR(tdq)-mtx_lock = (uintptr_t)newtd; + sched_pctcpu_update(newtd-td_sched, 0); #ifdef KDTRACE_HOOKS /* @@ -1974,12 +1972,9 @@ sched_wakeup(struct thread *td) slptick = td-td_slptick; td-td_slptick = 0; if (slptick slptick != ticks) { - u_int hzticks; - - hzticks = (ticks - slptick) SCHED_TICK_SHIFT; - ts-ts_slptime += hzticks; + ts-ts_slptime += (ticks - slptick) SCHED_TICK_SHIFT; sched_interact_update(td); - sched_pctcpu_update(ts); + sched_pctcpu_update(ts, 0); } /* Reset the slice value after we sleep. */ ts-ts_slice = sched_slice; @@ -1994,6 +1989,7 @@ void sched_fork(struct thread *td, struct thread *child) { THREAD_LOCK_ASSERT(td, MA_OWNED); + sched_pctcpu_update(td-td_sched, 1); sched_fork_thread(td, child); /* * Penalize the parent and child for forking. @@ -2029,7 +2025,6 @@ sched_fork_thread(struct
svn commit: r232918 - in head/sys/fs: fdescfs nullfs portalfs unionfs
Author: kevlo Date: Tue Mar 13 10:04:13 2012 New Revision: 232918 URL: http://svn.freebsd.org/changeset/base/232918 Log: Use NULL instead of 0 Modified: head/sys/fs/fdescfs/fdesc_vfsops.c head/sys/fs/nullfs/null_vfsops.c head/sys/fs/portalfs/portal_vfsops.c head/sys/fs/unionfs/union_vfsops.c Modified: head/sys/fs/fdescfs/fdesc_vfsops.c == --- head/sys/fs/fdescfs/fdesc_vfsops.c Tue Mar 13 08:18:54 2012 (r232917) +++ head/sys/fs/fdescfs/fdesc_vfsops.c Tue Mar 13 10:04:13 2012 (r232918) @@ -98,7 +98,7 @@ fdesc_mount(struct mount *mp) error = fdesc_allocvp(Froot, -1, FD_ROOT, mp, rvp); if (error) { free(fmp, M_FDESCMNT); - mp-mnt_data = 0; + mp-mnt_data = NULL; return (error); } rvp-v_type = VDIR; @@ -152,7 +152,7 @@ fdesc_unmount(mp, mntflags) */ mtx_lock(fdesc_hashmtx); data = mp-mnt_data; - mp-mnt_data = 0; + mp-mnt_data = NULL; mtx_unlock(fdesc_hashmtx); free(data, M_FDESCMNT); /* XXX */ Modified: head/sys/fs/nullfs/null_vfsops.c == --- head/sys/fs/nullfs/null_vfsops.cTue Mar 13 08:18:54 2012 (r232917) +++ head/sys/fs/nullfs/null_vfsops.cTue Mar 13 10:04:13 2012 (r232918) @@ -188,7 +188,7 @@ nullfs_mount(struct mount *mp) mp-mnt_kern_flag |= lowerrootvp-v_mount-mnt_kern_flag (MNTK_MPSAFE | MNTK_SHARED_WRITES); MNT_IUNLOCK(mp); - mp-mnt_data = xmp; + mp-mnt_data = xmp; vfs_getnewfsid(mp); vfs_mountedfrom(mp, target); @@ -224,7 +224,7 @@ nullfs_unmount(mp, mntflags) * Finally, throw away the null_mount structure */ mntdata = mp-mnt_data; - mp-mnt_data = 0; + mp-mnt_data = NULL; free(mntdata, M_NULLFSMNT); return 0; } Modified: head/sys/fs/portalfs/portal_vfsops.c == --- head/sys/fs/portalfs/portal_vfsops.cTue Mar 13 08:18:54 2012 (r232917) +++ head/sys/fs/portalfs/portal_vfsops.cTue Mar 13 10:04:13 2012 (r232918) @@ -164,7 +164,7 @@ portal_mount(struct mount *mp) MNT_ILOCK(mp); mp-mnt_flag |= MNT_LOCAL; MNT_IUNLOCK(mp); - mp-mnt_data = fmp; + mp-mnt_data = fmp; vfs_getnewfsid(mp); vfs_mountedfrom(mp, p); @@ -213,7 +213,7 @@ portal_unmount(mp, mntflags) * Finally, throw away the portalmount structure */ free(mp-mnt_data, M_PORTALFSMNT); /* XXX */ - mp-mnt_data = 0; + mp-mnt_data = NULL; return (0); } Modified: head/sys/fs/unionfs/union_vfsops.c == --- head/sys/fs/unionfs/union_vfsops.c Tue Mar 13 08:18:54 2012 (r232917) +++ head/sys/fs/unionfs/union_vfsops.c Tue Mar 13 10:04:13 2012 (r232918) @@ -352,7 +352,7 @@ unionfs_unmount(struct mount *mp, int mn return (error); free(ump, M_UNIONFSMNT); - mp-mnt_data = 0; + mp-mnt_data = NULL; return (0); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r232919 - in head: share/man/man4 sys/kern
Author: mav Date: Tue Mar 13 10:21:08 2012 New Revision: 232919 URL: http://svn.freebsd.org/changeset/base/232919 Log: Add kern.eventtimer.activetick tunable/sysctl, specifying whether each hardclock() tick should be run on every active CPU, or on only one. On my tests, avoiding extra interrupts because of this on 8-CPU Core i7 system with HZ=1 saves about 2% of performance. At this moment option implemented only for global timers, as reprogramming per-CPU timers is too expensive now to be compensated by this benefit, especially since we still have to regularly run hardclock() on at least one active CPU to update system uptime. For global timer it is quite trivial: timer runs always, but we just skip IPIs to other CPUs when possible. Option is enabled by default now, keeping previous behavior, as periodic hardclock() calls are still used at least to implement setitimer(2) with ITIMER_VIRTUAL and ITIMER_PROF arguments. But since default schedulers don't depend on it since r232917, we are much more free to experiment with it. MFC after:1 month Modified: head/share/man/man4/eventtimers.4 head/sys/kern/kern_clocksource.c Modified: head/share/man/man4/eventtimers.4 == --- head/share/man/man4/eventtimers.4 Tue Mar 13 10:04:13 2012 (r232918) +++ head/share/man/man4/eventtimers.4 Tue Mar 13 10:21:08 2012 (r232919) @@ -24,7 +24,7 @@ .\ .\ $FreeBSD$ .\ -.Dd September 15, 2010 +.Dd March 13, 2012 .Dt EVENTTIMERS 4 .Os .Sh NAME @@ -143,6 +143,12 @@ By default this options is disabled. If chosen timer is per-CPU and runs in periodic mode, this option has no effect - all interrupts are always generating. +.It Va kern.eventtimer.activetick +makes each CPU to receive all kinds of timer interrupts when they are busy. +Disabling it allows to skip some hardclock() calls in some cases. +By default this options is enabled. +If chosen timer is per-CPU, this option has no effect - all interrupts are +always generating, as timer reprogramming is too expensive for that case. .El .Sh SEE ALSO .Xr apic 4 , Modified: head/sys/kern/kern_clocksource.c == --- head/sys/kern/kern_clocksource.cTue Mar 13 10:04:13 2012 (r232918) +++ head/sys/kern/kern_clocksource.cTue Mar 13 10:21:08 2012 (r232919) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Alexander Motin m...@freebsd.org + * Copyright (c) 2010-2012 Alexander Motin m...@freebsd.org * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -99,6 +99,7 @@ static struct bintime hardperiod; /* har static struct bintime statperiod; /* statclock() events period. */ static struct bintime profperiod; /* profclock() events period. */ static struct bintime nexttick; /* Next global timer tick time. */ +static struct bintime nexthard; /* Next global hardlock() event. */ static u_int busy = 0; /* Reconfiguration is in progress. */ static int profiling = 0; /* Profiling events enabled. */ @@ -110,11 +111,16 @@ TUNABLE_INT(kern.eventtimer.singlemul, SYSCTL_INT(_kern_eventtimer, OID_AUTO, singlemul, CTLFLAG_RW, singlemul, 0, Multiplier for periodic mode); -static u_int idletick = 0; /* Idle mode allowed. */ +static u_int idletick = 0; /* Run periodic events when idle. */ TUNABLE_INT(kern.eventtimer.idletick, idletick); SYSCTL_UINT(_kern_eventtimer, OID_AUTO, idletick, CTLFLAG_RW, idletick, 0, Run periodic events when idle); +static u_int activetick = 1; /* Run all periodic events when active. */ +TUNABLE_INT(kern.eventtimer.activetick, activetick); +SYSCTL_UINT(_kern_eventtimer, OID_AUTO, activetick, CTLFLAG_RW, activetick, +0, Run all periodic events when active); + static int periodic = 0; /* Periodic or one-shot mode. */ static int want_periodic = 0; /* What mode to prefer. */ TUNABLE_INT(kern.eventtimer.periodic, want_periodic); @@ -202,6 +208,9 @@ handleevents(struct bintime *now, int fa bintime_add(state-nexthard, hardperiod); runs++; } + if ((timer-et_flags ET_FLAGS_PERCPU) == 0 + bintime_cmp(state-nexthard, nexthard, )) + nexthard = state-nexthard; if (runs fake 2) { hardclock_cnt(runs, usermode); done = 1; @@ -263,9 +272,11 @@ getnextcpuevent(struct bintime *event, i int skip; state = DPCPU_PTR(timerstate); + /* Handle hardclock() events. */ *event = state-nexthard; - if (idle) { /* If CPU is idle - ask callouts for how long. */ - skip = 4; + if (idle || (!activetick !profiling + (timer-et_flags ET_FLAGS_PERCPU) == 0)) { + skip = idle ? 4 : (stathz /
svn commit: r232920 - head/share/man/man4
Author: mav Date: Tue Mar 13 10:54:14 2012 New Revision: 232920 URL: http://svn.freebsd.org/changeset/base/232920 Log: Some formatting for r232919. Submitted by: pluknet Modified: head/share/man/man4/eventtimers.4 Modified: head/share/man/man4/eventtimers.4 == --- head/share/man/man4/eventtimers.4 Tue Mar 13 10:21:08 2012 (r232919) +++ head/share/man/man4/eventtimers.4 Tue Mar 13 10:54:14 2012 (r232920) @@ -145,7 +145,9 @@ and runs in periodic mode, this option h always generating. .It Va kern.eventtimer.activetick makes each CPU to receive all kinds of timer interrupts when they are busy. -Disabling it allows to skip some hardclock() calls in some cases. +Disabling it allows to skip some +.Fn hardclock +calls in some cases. By default this options is enabled. If chosen timer is per-CPU, this option has no effect - all interrupts are always generating, as timer reprogramming is too expensive for that case. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r232921 - in head/sys: modules/netgraph/netflow netgraph/netflow
On 13. Mar 2012, at 11:08 , Alexander V. Chernikov wrote: Author: melifaro Date: Tue Mar 13 11:08:40 2012 New Revision: 232921 URL: http://svn.freebsd.org/changeset/base/232921 Log: Use rt_numfibs variable instead of compile-time RT_NUMFIBS. Thanks a lot for doing this! This will allow us to go ahead and get rid of the mandatory kernel option now. I'll try to find my patch from last year and post it for your review. Are you intending to MFC this? Requested by: bz (a while ago with low prio) Reviewed by:glebius (previous version) Approved by:kib(mentor), ae(mentor) Modified: head/sys/modules/netgraph/netflow/Makefile head/sys/netgraph/netflow/netflow.c head/sys/netgraph/netflow/ng_netflow.c head/sys/netgraph/netflow/ng_netflow.h Modified: head/sys/modules/netgraph/netflow/Makefile == --- head/sys/modules/netgraph/netflow/MakefileTue Mar 13 10:54:14 2012(r232920) +++ head/sys/modules/netgraph/netflow/MakefileTue Mar 13 11:08:40 2012(r232921) @@ -17,8 +17,6 @@ opt_inet6.h: echo #define INET6 1 ${.TARGET} .endif -opt_route.h: - echo #define ROUTETABLES RT_MAXFIBS ${.TARGET} .endif .include bsd.kmod.mk Modified: head/sys/netgraph/netflow/netflow.c == --- head/sys/netgraph/netflow/netflow.c Tue Mar 13 10:54:14 2012 (r232920) +++ head/sys/netgraph/netflow/netflow.c Tue Mar 13 11:08:40 2012 (r232921) @@ -630,7 +630,7 @@ ng_netflow_cache_flush(priv_p priv) free(priv-hash6, M_NETFLOW_HASH); #endif - for (i = 0; i RT_NUMFIBS; i++) { + for (i = 0; i priv-maxfibs; i++) { if ((fe = priv_to_fib(priv, i)) == NULL) continue; Modified: head/sys/netgraph/netflow/ng_netflow.c == --- head/sys/netgraph/netflow/ng_netflow.cTue Mar 13 10:54:14 2012 (r232920) +++ head/sys/netgraph/netflow/ng_netflow.cTue Mar 13 11:08:40 2012 (r232921) @@ -225,6 +225,11 @@ ng_netflow_constructor(node_p node) /* Initialize private data */ priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO); + /* Initialize fib data */ + priv-maxfibs = rt_numfibs; + priv-fib_data = malloc(sizeof(fib_export_p) * priv-maxfibs, + M_NETGRAPH, M_WAITOK | M_ZERO); + /* Make node and its data point at each other */ NG_NODE_SET_PRIVATE(node, priv); priv-node = node; @@ -901,8 +906,10 @@ loopend: /* Check packet FIB */ fib = M_GETFIB(m); - if (fib = RT_NUMFIBS) { - CTR2(KTR_NET, ng_netflow_rcvdata(): packet fib %d is out of range of available fibs: 0 .. %d, fib, RT_NUMFIBS); + if (fib = priv-maxfibs) { + CTR2(KTR_NET, ng_netflow_rcvdata(): packet fib %d is out of + range of available fibs: 0 .. %d, + fib, priv-maxfibs); goto bypass; } @@ -973,6 +980,7 @@ ng_netflow_rmnode(node_p node) NG_NODE_SET_PRIVATE(node, NULL); NG_NODE_UNREF(priv-node); + free(priv-fib_data, M_NETGRAPH); free(priv, M_NETGRAPH); return (0); Modified: head/sys/netgraph/netflow/ng_netflow.h == --- head/sys/netgraph/netflow/ng_netflow.hTue Mar 13 10:54:14 2012 (r232920) +++ head/sys/netgraph/netflow/ng_netflow.hTue Mar 13 11:08:40 2012 (r232921) @@ -413,7 +413,8 @@ struct netflow { struct flow_hash_entry *hash6; #endif /* Multiple FIB support */ - fib_export_pfib_data[RT_NUMFIBS]; /* array of pointers to fib-specific data */ + fib_export_p*fib_data; /* array of pointers to per-fib data */ + uint16_tmaxfibs; /* number of allocated fibs */ /* * RFC 3954 clause 7.3 -- Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r232921 - in head/sys: modules/netgraph/netflow netgraph/netflow
On 13.03.2012 16:51, Bjoern A. Zeeb wrote: On 13. Mar 2012, at 11:08 , Alexander V. Chernikov wrote: Author: melifaro Date: Tue Mar 13 11:08:40 2012 New Revision: 232921 URL: http://svn.freebsd.org/changeset/base/232921 Log: Use rt_numfibs variable instead of compile-time RT_NUMFIBS. Thanks a lot for doing this! Sorry for doing this for too long. This will allow us to go ahead and get rid of the mandatory kernel option now. I'll try to find my patch from last year and post it for your review. Are you intending to MFC this? netflow v9 stuff is still not MFCed to 8/7 (And I forgot 9 contains it). So it should be 2w for 9 Requested by: bz (a while ago with low prio) Reviewed by:glebius (previous version) Approved by:kib(mentor), ae(mentor) Modified: head/sys/modules/netgraph/netflow/Makefile head/sys/netgraph/netflow/netflow.c head/sys/netgraph/netflow/ng_netflow.c head/sys/netgraph/netflow/ng_netflow.h Modified: head/sys/modules/netgraph/netflow/Makefile == --- head/sys/modules/netgraph/netflow/Makefile Tue Mar 13 10:54:14 2012 (r232920) +++ head/sys/modules/netgraph/netflow/Makefile Tue Mar 13 11:08:40 2012 (r232921) @@ -17,8 +17,6 @@ opt_inet6.h: echo #define INET6 1 ${.TARGET} .endif -opt_route.h: - echo #define ROUTETABLES RT_MAXFIBS ${.TARGET} .endif .includebsd.kmod.mk Modified: head/sys/netgraph/netflow/netflow.c == --- head/sys/netgraph/netflow/netflow.c Tue Mar 13 10:54:14 2012 (r232920) +++ head/sys/netgraph/netflow/netflow.c Tue Mar 13 11:08:40 2012 (r232921) @@ -630,7 +630,7 @@ ng_netflow_cache_flush(priv_p priv) free(priv-hash6, M_NETFLOW_HASH); #endif - for (i = 0; i RT_NUMFIBS; i++) { + for (i = 0; i priv-maxfibs; i++) { if ((fe = priv_to_fib(priv, i)) == NULL) continue; Modified: head/sys/netgraph/netflow/ng_netflow.c == --- head/sys/netgraph/netflow/ng_netflow.c Tue Mar 13 10:54:14 2012 (r232920) +++ head/sys/netgraph/netflow/ng_netflow.c Tue Mar 13 11:08:40 2012 (r232921) @@ -225,6 +225,11 @@ ng_netflow_constructor(node_p node) /* Initialize private data */ priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO); + /* Initialize fib data */ + priv-maxfibs = rt_numfibs; + priv-fib_data = malloc(sizeof(fib_export_p) * priv-maxfibs, + M_NETGRAPH, M_WAITOK | M_ZERO); + /* Make node and its data point at each other */ NG_NODE_SET_PRIVATE(node, priv); priv-node = node; @@ -901,8 +906,10 @@ loopend: /* Check packet FIB */ fib = M_GETFIB(m); - if (fib= RT_NUMFIBS) { - CTR2(KTR_NET, ng_netflow_rcvdata(): packet fib %d is out of range of available fibs: 0 .. %d, fib, RT_NUMFIBS); + if (fib= priv-maxfibs) { + CTR2(KTR_NET, ng_netflow_rcvdata(): packet fib %d is out of + range of available fibs: 0 .. %d, + fib, priv-maxfibs); goto bypass; } @@ -973,6 +980,7 @@ ng_netflow_rmnode(node_p node) NG_NODE_SET_PRIVATE(node, NULL); NG_NODE_UNREF(priv-node); + free(priv-fib_data, M_NETGRAPH); free(priv, M_NETGRAPH); return (0); Modified: head/sys/netgraph/netflow/ng_netflow.h == --- head/sys/netgraph/netflow/ng_netflow.h Tue Mar 13 10:54:14 2012 (r232920) +++ head/sys/netgraph/netflow/ng_netflow.h Tue Mar 13 11:08:40 2012 (r232921) @@ -413,7 +413,8 @@ struct netflow { struct flow_hash_entry *hash6; #endif /* Multiple FIB support */ - fib_export_pfib_data[RT_NUMFIBS]; /* array of pointers to fib-specific data */ + fib_export_p*fib_data; /* array of pointers to per-fib data */ + uint16_tmaxfibs; /* number of allocated fibs */ /* * RFC 3954 clause 7.3 -- WBR, Alexander ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r232832 - in head/lib/csu: . amd64 arm common i386-elf mips powerpc powerpc64 sparc64
On 03/11/12 15:04, Konstantin Belousov wrote: Author: kib Date: Sun Mar 11 20:04:09 2012 New Revision: 232832 URL: http://svn.freebsd.org/changeset/base/232832 Log: Stop calling _init/_fini methods from crt1 for dynamic binaries. Do call preinit, init and fini arrays methods from crt1 for static binaries. Mark new crt1 with FreeBSD-specific ELF note. Move some common crt1 code into new MI file ignore_init.c, to reduce duplication. Also, conservatively adjust nearby sources for style. Reviewed by: kan Tested by: andrew (arm), flo (sparc64) MFC after: 3 weeks This change makes /usr/libexec/cc1 seg fault on init on powerpc64. Dynamically linked (and most statically linked) binaries seem to work, but there is some remaining problem. -Nathan ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r232926 - in head: include/xlocale lib/libc/locale
Author: theraven Date: Tue Mar 13 14:14:13 2012 New Revision: 232926 URL: http://svn.freebsd.org/changeset/base/232926 Log: More xlocale cleanups. Approved by: dim (mentor) Modified: head/include/xlocale/_ctype.h head/lib/libc/locale/Symbol.map Modified: head/include/xlocale/_ctype.h == --- head/include/xlocale/_ctype.h Tue Mar 13 14:10:33 2012 (r232925) +++ head/include/xlocale/_ctype.h Tue Mar 13 14:14:13 2012 (r232926) @@ -68,19 +68,19 @@ _RuneLocale *__runes_for_locale(locale_t #endif /* _XLOCALE_INLINE */ #ifdef _XLOCALE_WCTYPES -static __inline int -__maskrune_l(__ct_rune_t _c, unsigned long _f, locale_t locale) +_XLOCALE_INLINE int +__maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { - int mb_sb_limit; - _RuneLocale *runes = __runes_for_locale(locale, mb_sb_limit); - return (_c 0 || _c = _CACHED_RUNES) ? ___runetype_l(_c, locale) : - runes-__runetype[_c] _f; + int __limit; + _RuneLocale *runes = __runes_for_locale(__loc, __limit); + return (__c 0 || __c = _CACHED_RUNES) ? ___runetype_l(__c, __loc) : + runes-__runetype[__c] __f; } -static __inline int -__istype_l(__ct_rune_t _c, unsigned long _f, locale_t locale) +_XLOCALE_INLINE __inline int +__istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { - return (!!__maskrune_l(_c, _f, locale)); + return (!!__maskrune_l(__c, __f, __loc)); } #define XLOCALE_ISCTYPE(fname, cat) \ @@ -88,25 +88,25 @@ __istype_l(__ct_rune_t _c, unsigned long _XLOCALE_INLINE int isw##fname##_l(int __c, locale_t __l)\ { return __istype_l(__c, cat, __l); } #else -static __inline int -__sbmaskrune_l(__ct_rune_t _c, unsigned long _f, locale_t locale) +_XLOCALE_INLINE int +__sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { - int mb_sb_limit; - _RuneLocale *runes = __runes_for_locale(locale, mb_sb_limit); - return (_c 0 || _c = mb_sb_limit) ? 0 : - runes-__runetype[_c] _f; + int __limit; + _RuneLocale *runes = __runes_for_locale(__loc, __limit); + return (__c 0 || __c = __limit) ? 0 : + runes-__runetype[__c] __f; } -static __inline int -__sbistype_l(__ct_rune_t _c, unsigned long _f, locale_t locale) +_XLOCALE_INLINE int +__sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { - return (!!__sbmaskrune_l(_c, _f, locale)); + return (!!__sbmaskrune_l(__c, __f, __loc)); } -#define XLOCALE_ISCTYPE(fname, cat) \ - _XLOCALE_INLINE int is##fname##_l(int c, locale_t l); \ - _XLOCALE_INLINE int is##fname##_l(int c, locale_t l)\ - { return __sbistype_l(c, cat, l); } +#define XLOCALE_ISCTYPE(__fname, __cat) \ + _XLOCALE_INLINE int is##__fname##_l(int, locale_t); \ + _XLOCALE_INLINE int is##__fname##_l(int __c, locale_t __l)\ + { return __sbistype_l(__c, __cat, __l); } #endif XLOCALE_ISCTYPE(alnum, _CTYPE_A|_CTYPE_D) @@ -136,15 +136,15 @@ _XLOCALE_INLINE int towupper_l(int, loca _XLOCALE_INLINE int towlower_l(int __c, locale_t __l) { - int mb_sb_limit; - _RuneLocale *__runes = __runes_for_locale(__l, mb_sb_limit); + int __limit; + _RuneLocale *__runes = __runes_for_locale(__l, __limit); return (__c 0 || __c = _CACHED_RUNES) ? ___tolower_l(__c, __l) : __runes-__maplower[__c]; } _XLOCALE_INLINE int towupper_l(int __c, locale_t __l) { - int mb_sb_limit; - _RuneLocale *__runes = __runes_for_locale(__l, mb_sb_limit); + int __limit; + _RuneLocale *__runes = __runes_for_locale(__l, __limit); return (__c 0 || __c = _CACHED_RUNES) ? ___toupper_l(__c, __l) : __runes-__mapupper[__c]; } Modified: head/lib/libc/locale/Symbol.map == --- head/lib/libc/locale/Symbol.map Tue Mar 13 14:10:33 2012 (r232925) +++ head/lib/libc/locale/Symbol.map Tue Mar 13 14:14:13 2012 (r232926) @@ -60,9 +60,13 @@ FBSD_1.0 { nextwctype; nl_langinfo; __maskrune; + __maskrune_l; __sbmaskrune; + __sbmaskrune_l; __istype; + __istype_l; __sbistype; + __sbistype_l; __isctype; __toupper; __sbtoupper; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r232927 - head/include/xlocale
Author: theraven Date: Tue Mar 13 15:21:14 2012 New Revision: 232927 URL: http://svn.freebsd.org/changeset/base/232927 Log: Add missing prototypes. Approved by: dim (mentor) Modified: head/include/xlocale/_ctype.h Modified: head/include/xlocale/_ctype.h == --- head/include/xlocale/_ctype.h Tue Mar 13 14:14:13 2012 (r232926) +++ head/include/xlocale/_ctype.h Tue Mar 13 15:21:14 2012 (r232927) @@ -89,6 +89,11 @@ __istype_l(__ct_rune_t __c, unsigned lon { return __istype_l(__c, cat, __l); } #else _XLOCALE_INLINE int +__sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); +_XLOCALE_INLINE int +__sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); + +_XLOCALE_INLINE int __sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { int __limit; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r232582 - head/lib/libc/gen
On Mar 5, 2012, at 7:42 PM, Oleksandr Tymoshenko wrote: @@ -308,6 +308,13 @@ _init_tls() } } +#ifdef TLS_VARIANT_I + /* + * tls_static_space should include space for TLS structure + */ + tls_static_space += TLS_TCB_SIZE; +#endif + How does this change behaviour on ia64 or powerpc? -- Marcel Moolenaar mar...@xcllnt.net ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r232929 - head/include/xlocale
Author: theraven Date: Tue Mar 13 17:32:55 2012 New Revision: 232929 URL: http://svn.freebsd.org/changeset/base/232929 Log: Fix the other missing prototypes. Approved by: dim (mentor) Modified: head/include/xlocale/_ctype.h Modified: head/include/xlocale/_ctype.h == --- head/include/xlocale/_ctype.h Tue Mar 13 16:42:39 2012 (r232928) +++ head/include/xlocale/_ctype.h Tue Mar 13 17:32:55 2012 (r232929) @@ -69,6 +69,11 @@ _RuneLocale *__runes_for_locale(locale_t #ifdef _XLOCALE_WCTYPES _XLOCALE_INLINE int +__maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); +_XLOCALE_INLINE __inline int +__istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); + +_XLOCALE_INLINE int __maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { int __limit; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r232929 - head/include/xlocale
On 13.03.12 18:32, David Chisnall wrote: Author: theraven Date: Tue Mar 13 17:32:55 2012 New Revision: 232929 URL: http://svn.freebsd.org/changeset/base/232929 Log: Fix the other missing prototypes. Approved by: dim (mentor) Modified: head/include/xlocale/_ctype.h Modified: head/include/xlocale/_ctype.h == --- head/include/xlocale/_ctype.h Tue Mar 13 16:42:39 2012 (r232928) +++ head/include/xlocale/_ctype.h Tue Mar 13 17:32:55 2012 (r232929) @@ -69,6 +69,11 @@ _RuneLocale *__runes_for_locale(locale_t #ifdef _XLOCALE_WCTYPES _XLOCALE_INLINE int +__maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); +_XLOCALE_INLINE __inline int Duplicate inline. +__istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); + +_XLOCALE_INLINE int __maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { int __limit; Around line 85 too. I build with the below diff now. Gruss, Andreas Index: _ctype.h === --- _ctype.h(revision 232929) +++ _ctype.h(working copy) @@ -70,7 +70,7 @@ #ifdef _XLOCALE_WCTYPES _XLOCALE_INLINE int __maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); -_XLOCALE_INLINE __inline int +_XLOCALE_INLINE int __istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); _XLOCALE_INLINE int @@ -82,7 +82,7 @@ runes-__runetype[__c] __f; } -_XLOCALE_INLINE __inline int +_XLOCALE_INLINE int __istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { return (!!__maskrune_l(__c, __f, __loc)); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r232931 - head/include/xlocale
Author: theraven Date: Tue Mar 13 18:53:28 2012 New Revision: 232931 URL: http://svn.freebsd.org/changeset/base/232931 Log: And remove the duplicate inlines... Approved by: dim (mentor) Modified: head/include/xlocale/_ctype.h Modified: head/include/xlocale/_ctype.h == --- head/include/xlocale/_ctype.h Tue Mar 13 18:39:57 2012 (r232930) +++ head/include/xlocale/_ctype.h Tue Mar 13 18:53:28 2012 (r232931) @@ -70,7 +70,7 @@ _RuneLocale *__runes_for_locale(locale_t #ifdef _XLOCALE_WCTYPES _XLOCALE_INLINE int __maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); -_XLOCALE_INLINE __inline int +_XLOCALE_INLINE int __istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); _XLOCALE_INLINE int @@ -82,7 +82,7 @@ __maskrune_l(__ct_rune_t __c, unsigned l runes-__runetype[__c] __f; } -_XLOCALE_INLINE __inline int +_XLOCALE_INLINE int __istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { return (!!__maskrune_l(__c, __f, __loc)); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r232932 - head/lib/csu/powerpc64
Author: nwhitehorn Date: Tue Mar 13 18:59:19 2012 New Revision: 232932 URL: http://svn.freebsd.org/changeset/base/232932 Log: Work around a binutils bug on powerpc64 where the TOC would not be properly reloaded when calling _fini() in large binaries with multiple TOC sections (e.g. GCC), leading to a segmentation fault. Adding -mlongcall to crt1 flags causes the compiler to emit explicit TOC load instructions for all function calls, including _fini(). Reviewed by: kib Pointy hat to:kib Modified: head/lib/csu/powerpc64/Makefile Modified: head/lib/csu/powerpc64/Makefile == --- head/lib/csu/powerpc64/Makefile Tue Mar 13 18:53:28 2012 (r232931) +++ head/lib/csu/powerpc64/Makefile Tue Mar 13 18:59:19 2012 (r232932) @@ -6,7 +6,8 @@ SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include + -I${.CURDIR}/../../libc/include \ + -mlongcall all: ${OBJS} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r232933 - head/sys/conf
Author: dim Date: Tue Mar 13 19:18:34 2012 New Revision: 232933 URL: http://svn.freebsd.org/changeset/base/232933 Log: Update comments and CFLAGS in sys/conf/kern.mk, introduced in r221879, to match reality: clang does _not_ disable SSE automatically when -mno-mmx is used, you have to specify -mno-sse explicitly. Note this was the case even before r232894, which only makes a change in the 'positive' flag case; e.g. when you specify -msse, MMX gets enabled too. MFC after:1 week Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk == --- head/sys/conf/kern.mk Tue Mar 13 18:59:19 2012(r232932) +++ head/sys/conf/kern.mk Tue Mar 13 19:18:34 2012(r232933) @@ -46,16 +46,16 @@ CWARNEXTRA?=-Wno-error-tautological-com # Setting -mno-sse implies -mno-sse2, -mno-sse3 and -mno-ssse3 # # clang: -# Setting -mno-mmx implies -mno-3dnow, -mno-3dnowa, -mno-sse, -mno-sse2, -# -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42 +# Setting -mno-mmx implies -mno-3dnow and -mno-3dnowa +# Setting -mno-sse implies -mno-sse2, -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42 # .if ${MACHINE_CPUARCH} == i386 .if ${MK_CLANG_IS_CC} == no ${CC:T:Mclang} != clang -CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-sse +CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2 .else CFLAGS+= -mno-aes -mno-avx .endif -CFLAGS+= -mno-mmx -msoft-float +CFLAGS+= -mno-mmx -mno-sse -msoft-float INLINE_LIMIT?= 8000 .endif @@ -93,17 +93,15 @@ INLINE_LIMIT?= 15000 # Setting -mno-sse implies -mno-sse2, -mno-sse3, -mno-ssse3 and -mfpmath=387 # # clang: -# Setting -mno-mmx implies -mno-3dnow, -mno-3dnowa, -mno-sse, -mno-sse2, -# -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42 +# Setting -mno-mmx implies -mno-3dnow and -mno-3dnowa +# Setting -mno-sse implies -mno-sse2, -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42 # (-mfpmath= is not supported) # .if ${MACHINE_CPUARCH} == amd64 -.if ${MK_CLANG_IS_CC} == no ${CC:T:Mclang} != clang -CFLAGS+= -mno-sse -.else +.if ${MK_CLANG_IS_CC} != no || ${CC:T:Mclang} == clang CFLAGS+= -mno-aes -mno-avx .endif -CFLAGS+= -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float \ +CFLAGS+= -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float \ -fno-asynchronous-unwind-tables INLINE_LIMIT?= 8000 .endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r232894 - head/contrib/llvm/tools/clang/lib/Basic
On 2012-03-13 03:15, Alexander Best wrote: On Mon Mar 12 12, Dimitry Andric wrote: Author: dim Date: Mon Mar 12 21:07:22 2012 New Revision: 232894 URL: http://svn.freebsd.org/changeset/base/232894 Log: Pull in r145194 from upstream clang trunk: Make our handling of MMX x SSE closer to what gcc does: * Enabling sse enables mmx. * Disabling (-mno-mmx) mmx, doesn't disable sse (we got this right already). * The order in not important. -msse -mno-mmx is the same as -mno-mmx -msse. are you sure that sys/conf/kern.mk doesn't need updating after this commit? if now setting -mno-mmx doesn't imply -mno-sse, i think the i386 and amd64 sections in kern.mk needs to be updated (along with the comments). Setting -mno-mmx never implied -mno-sse, even before r232894. I have updated the comments and CFLAGS in r232933. Note that clang's default arch setting on 32-bit x86 is i486, so it would not have been using SSE anyway. That is, unless people set CPUTYPE to anything that does support it. :) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r232937 - in head/sys/modules: . acl_nfs4 acl_posix1e
Author: adrian Date: Tue Mar 13 20:28:42 2012 New Revision: 232937 URL: http://svn.freebsd.org/changeset/base/232937 Log: Add module building Makefile entries for NFSv4 and POSIX.1e ACL handling. Added: head/sys/modules/acl_nfs4/ head/sys/modules/acl_nfs4/Makefile (contents, props changed) head/sys/modules/acl_posix1e/ head/sys/modules/acl_posix1e/Makefile (contents, props changed) Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Tue Mar 13 20:27:48 2012(r232936) +++ head/sys/modules/Makefile Tue Mar 13 20:28:42 2012(r232937) @@ -11,6 +11,8 @@ SUBDIR= ${_3dfx} \ accf_data \ accf_dns \ accf_http \ + acl_nfs4 \ + acl_posix1e \ ${_acpi} \ ae \ ${_aesni} \ Added: head/sys/modules/acl_nfs4/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/acl_nfs4/Makefile Tue Mar 13 20:28:42 2012 (r232937) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.include bsd.own.mk + +.PATH: ${.CURDIR}/../../kern +KMOD= acl_nfs4 +SRCS= vnode_if.h subr_acl_nfs4.c + +.include bsd.kmod.mk Added: head/sys/modules/acl_posix1e/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/acl_posix1e/Makefile Tue Mar 13 20:28:42 2012 (r232937) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.include bsd.own.mk + +.PATH: ${.CURDIR}/../../kern +KMOD= acl_posix1e +SRCS= vnode_if.h subr_acl_posix1e.c + +.include bsd.kmod.mk ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r232939 - head/sys/conf
Author: adrian Date: Tue Mar 13 20:29:56 2012 New Revision: 232939 URL: http://svn.freebsd.org/changeset/base/232939 Log: (Re)-make these ACL routines optional. They're only currently used by ZFS and UFS_ACL. They're just wasting space on embedded platforms with neither enabled. Modified: head/sys/conf/files Modified: head/sys/conf/files == --- head/sys/conf/files Tue Mar 13 20:29:04 2012(r232938) +++ head/sys/conf/files Tue Mar 13 20:29:56 2012(r232939) @@ -2419,8 +2419,8 @@ kern/sched_ule.c optional sched_ule kern/serdev_if.m standard kern/stack_protector.c standard \ compile-with ${NORMAL_C:N-fstack-protector*} -kern/subr_acl_nfs4.c standard -kern/subr_acl_posix1e.cstandard +kern/subr_acl_nfs4.c optional ufs_acl +kern/subr_acl_posix1e.coptional ufs_acl kern/subr_autoconf.c standard kern/subr_blist.c standard kern/subr_bus.cstandard ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r232940 - in head/tools/tools/wtap: vis_map wtap
Author: adrian Date: Tue Mar 13 20:30:23 2012 New Revision: 232940 URL: http://svn.freebsd.org/changeset/base/232940 Log: Add a BINDIR so make install works. Modified: head/tools/tools/wtap/vis_map/Makefile head/tools/tools/wtap/wtap/Makefile Modified: head/tools/tools/wtap/vis_map/Makefile == --- head/tools/tools/wtap/vis_map/Makefile Tue Mar 13 20:29:56 2012 (r232939) +++ head/tools/tools/wtap/vis_map/Makefile Tue Mar 13 20:30:23 2012 (r232940) @@ -1,5 +1,6 @@ # $FreeBSD$ +BINDIR?= /usr/local/bin/ PROG= vis_map SRC= vis_map.c NO_MAN=1 Modified: head/tools/tools/wtap/wtap/Makefile == --- head/tools/tools/wtap/wtap/Makefile Tue Mar 13 20:29:56 2012 (r232939) +++ head/tools/tools/wtap/wtap/Makefile Tue Mar 13 20:30:23 2012 (r232940) @@ -1,5 +1,6 @@ # $FreeBSD$ +BINDIR?= /usr/local/bin PROG= wtap SRC= wtap.c NO_MAN=1 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r232582 - head/lib/libc/gen
On 13/03/2012 9:21 AM, Marcel Moolenaar wrote: On Mar 5, 2012, at 7:42 PM, Oleksandr Tymoshenko wrote: @@ -308,6 +308,13 @@ _init_tls() } } +#ifdef TLS_VARIANT_I + /* +* tls_static_space should include space for TLS structure +*/ + tls_static_space += TLS_TCB_SIZE; +#endif + How does this change behaviour on ia64 or powerpc? I believe it doesn't. nathanw@ performed some sanity tests on powerpc recently, and they passed. ia64 has not been tested. This issue manifested itself only with statically linked binaries. Juli presented some corner case test for MIPS that caused crash: binary compiled with -static -pthread without any actual thread- specific variables that tries to get TP pointer. This test case leads to crash and I used it for tracking down the root cause. For binaries with actual TLS data this issue would manifest itself as memory corruption. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r232946 - in head/sys: contrib/dev/ral modules/ralfw modules/ralfw/rt2860
Author: bschmidt Date: Tue Mar 13 21:25:25 2012 New Revision: 232946 URL: http://svn.freebsd.org/changeset/base/232946 Log: Update the rt2860's firmware and add a Makefile for the module. While here remove the ucode header file which was used to generate the fw files but by now is outdated. Reviewed by: ray Obtained from:OpenBSD Added: head/sys/modules/ralfw/rt2860/ head/sys/modules/ralfw/rt2860/Makefile (contents, props changed) Deleted: head/sys/contrib/dev/ral/rt2661_ucode.h Modified: head/sys/contrib/dev/ral/rt2860.fw.uu head/sys/modules/ralfw/Makefile Modified: head/sys/contrib/dev/ral/rt2860.fw.uu == --- head/sys/contrib/dev/ral/rt2860.fw.uu Tue Mar 13 20:37:57 2012 (r232945) +++ head/sys/contrib/dev/ral/rt2860.fw.uu Tue Mar 13 21:25:25 2012 (r232946) @@ -15,30 +15,27 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. begin 644 rt2860.fw -M`@#B`@+L(B+___\`;W__P(`'O__`@%NP.#`\,#P(+`T'70,*O -M,$4#$A`)D`06X##C#70(\.558`9D`V`T@.0!!3@(.#`@#5=(#PD'`2X/4V -MD`0$X3/8#`48$(DXF!'%!5)%P8.55)/Y@!Q1@0`A]`8`H?0*`))!P -M$.#U4(4V0-(!@#[E560#8`3E57`$?0*`84V0=(@FM5:\V$@+(@0!#@ -M]40!'@]402$6`!I!P$.#U13]KS82`LC2!)!P$^3PTJ_0T-T(/0\-#@ -M,GA_Y/;8_76!?0(!*0(^23H_CDDZ-``_:``?((W_2`*23H_A4!R0,R,,S -MQ%0/1#(@T`$]%:``4;VW^2`P$!`@0($`D`.:Y'X!DV\H_]4/S#E50? -M_N23HV`!#L]4P7@8*A`N.23H_KDDZ/XY).CR,6R,K%@\KPH\C%@LC*Q8/* -MW^GYX^P.#`\,#P(+`T.C`X.G`X.K`X.O`X.S`X.W`X.[`X._`X,*O,$4# -M$A`2TJ_0X/_0X/[0X/W0X/S0X/O0X/K0X/G0X/C0T-T(/0\-#@,L#@P/#` -M@\P-!UT!#KS!%`Q(0##!8N548`055(`PE@P60KE4`$%5``L)9U5,' -M,`$%4;2!#!%`Q(0#\*-TJ_0T-T(/0\-#@,A(##C!%`Q(0`S`!!B`)`Q(0 -M'#`!B`*`Q(0'S`#!B`+`Q(0'S`$!B`,`Q(0(B`32`1!N4K12Q@`].``.2 -MJ1(#/H_T(/0@OCDDW`2=`3`VCHY/X=`3]8*(@^1S=`*3:#OHZ.C@-^* -M@XFY'/([\CF^@CF2F`,R._(.86'`!%L,B[23__PT_\COR/8(QNWTR+ -M0])%Y/4@]2'U4_5]2OU+,)]5'U4O55D`08=(#PD`0:=`CP(N_T8!_D_A(# -M?T_Q(2`WWO\'0+O6Y#1P]8/M\(.O@3C(L#@P/#`@\P-!UT`CKS!% -M`Q(0!M*OT-#0@M#T/#0X#+KQ(`!A(HA(#)^3U(O5'D`0`=(#PTJ\B=8D -MY/6,]8KUB/6X]AUD!C2C'6H!2(P10,2$!7E('`#(!`#,!$#0X!(L[OSNY@ -M'__$@.3'H#U(LCOR.9@`Q;#(NT4]M,BR._(YF`%N8D_[,BPR)T%[U@N0T -M/6#(N^0`Y3D`0`PH8[V`#'X#Z(@$[`,N`/__ +M`@-;`@*F(B+___\`2S__P(`'O__`@#=P.#`\,#P(+`T'70,*O +M,$4#$A`)D`06X##C`W0(\)`$%.`@YP,`,MT@/0!+@]3:0!`3@),]@,!1@ +M0B3B8$48%4D(7!@Y54D_F`'%`()`)P'T!@A]`H`DD'`0X/50A39`T@` +M/N559`-@!.55`1]`H`)A39!T@*`*:U5KS82`H*`()!P$.#U1Y!P$#U1!(0 +M)8`D'`0X/5%Y/VO-A(@M($D'`3Y/0!/D\-*OT-#0@M#T/#0X#+`X,#P +MP(/`@L#0Z,#@Z#@ZL#@Z\#@[,#@[#@[L#@[\#@PJ\P10,2$!+2K]#@_]#@ +M_M#@_=#@_-#@^]#@^M#@^=#@^-#0T(+0@]#PT.`RP.#`\,#P(+`T'70$,*O +M,$4#$A`,,%@*Y51@!!54@`+6#!9N508`054(`PEG54PP8`051M($,$4# +M$A`/PHW2K]#0T(+0@]#PT.`RD'`JX##A0\*OD'`HX)`0'/0G@D!`=\)!P +M*N0$![PD!`X/4WD!`X#A\Y`0'.0CPD!`=X)!P*?0$![@D'`J\,(% +MTJ\B$@+(,$4#$A`#,`$(`D#$A`,`((`H#$A`?,`,(`L#$A`?,`0(`P# +M$A`B(!,)(!$Y2M%+`#TX`!PY*I$@,@+_0])%Y/4@]2'U4_5]2OU+,) +M]5'U4O55D`08=(#PD`0:=`CPPAK,(;(LCOR.;Z.9*8`S([\@(YA88`$6 +MPR+M)/_][#3_R._(]@C[;3(M#T(+XY)-P$G0!DW`-HZ.3^'0!D_6B(/D +MW0DVA@[Z.CHX#?[_1@'^3^$@-GX+3_$A(#9^_P=!PN]8+D-'#U@^WP(@Z^ +M!.,BP.#`\,#P(+`T'70,*O,$4#$A`TJ_0T-T(/0\-#@,L*O$@`$@() +M$@+AY/4B]40!`!T@/#2KR)UB0+D]8SUBO6(];CUZ'60-*,=:@%(N]@`Q^` +M^B+_P9T`\#@P(+`@W4FB+`)G0#P.#`@L#=288(C!%`Q(0%4@`,@$`,P +M$0-#AP$BSN_.[F`(?_\2`O@@/4BR._(YF`#%L,B[13VTR+([\CF8`86YB3_ +MLR+#(GA_Y/;8_76!7P(!Q704+O6Y#1P]8,B[Y`#Y.0`P!SAC_ M -M_\`F=`3`X,P(-U -M)@HBP9T!,#@P(+`@W4F+_ M M M @@ -106,81 +103,84 @@ M___ M M M -M_P(0*`(01`(010(2J0(2J@(310(31L,B__\%4@%AX$_T$TP!08@ -M#0,2%ILP!@8@#@,2+TP!P8@#P,2/XB(I`$%.`@YP,$IR0!+@]5:0!`3@ -M$@)/$(Q$+)1$+U2$+U3$+U4$7%@$/YA$;]B$/YC$AP$A)Q$CQR$FZ2 -MG``S`#'7TKU82`LB0!!1T@/#DD'`3\.56]'`#`A*`A*/A59!T@($IR0 -M!'@)/^21P(2G)`$!.`EX1=]50!#@_W1')5?XQN_D'`1X/]T257^,;O -MQN3]KU82`LB0!!1T@/#DD'`3\.56]'`#`A*`A*/D'`1X%0?]6+@5(#U9)!P -M$.#_?@0!`3@M$$?0``GT'[\CMR`B`!,SSC/.V/GU88Y@D'`1X%1@)/^2 -M+!48,035`4]6-U98!U9B-U9P9U:!AU:16M5Z]6$@+(D`04=(#PY)!P$_#E -M5O1P`P(2G`(2CY!P$!4'_5ND'`0X/5KD'`1X%1@)/^2+.!48,035`4]6]U -M4!UB1UP5U=!=U=M5Z]6$@+(D`04=(#PY)!P$_#E5O1P`P(2G`(2CY!P -M$.!@!-(:@`+2(JU7KU82`LB0!!1T@/#DD'`3\.56]'`#`A*`A*/D'`0X/Z0 -M!'@_WXYO57_:]6$@+(D`04=(#PY)!P$_#E5O1P`P(2G(!]D'`0X/Z0!'@ -M_WU@HZ#X/57_:]6$@+(D`04=(#PY)!P$_#E5O1@8H!3Y/5Z=7L!]6K+?4C -M]3O2+O5WPBSU)'5V*U7KU82`LB0!!1T@/#DD'`3\.56]`P@0!#@)/^2
svn commit: r232947 - head/sys/kern
Author: kib Date: Tue Mar 13 22:00:46 2012 New Revision: 232947 URL: http://svn.freebsd.org/changeset/base/232947 Log: Lock the process around manipulations with p_flag. Reported and reviewed by: jh MFC after:3 days Modified: head/sys/kern/kern_exit.c Modified: head/sys/kern/kern_exit.c == --- head/sys/kern/kern_exit.c Tue Mar 13 21:25:25 2012(r232946) +++ head/sys/kern/kern_exit.c Tue Mar 13 22:00:46 2012(r232947) @@ -738,10 +738,12 @@ proc_reap(struct thread *td, struct proc LIST_REMOVE(p, p_list); /* off zombproc */ sx_xunlock(allproc_lock); LIST_REMOVE(p, p_sibling); + PROC_LOCK(p); if (p-p_flag P_ORPHAN) { LIST_REMOVE(p, p_orphan); p-p_flag = ~P_ORPHAN; } + PROC_UNLOCK(p); leavepgrp(p); #ifdef PROCDESC if (p-p_procdesc != NULL) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r232948 - head/sys/ufs/ffs
Author: kib Date: Tue Mar 13 22:04:27 2012 New Revision: 232948 URL: http://svn.freebsd.org/changeset/base/232948 Log: Supply boolean as the second argument to ffs_update(), and not a MNT_[NO]WAIT constants, which in fact always caused sync operation. Based on the submission by: bde Reviewed by: mckusick MFC after:2 weeks Modified: head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ffs/ffs_vnops.c Modified: head/sys/ufs/ffs/ffs_softdep.c == --- head/sys/ufs/ffs/ffs_softdep.c Tue Mar 13 22:00:46 2012 (r232947) +++ head/sys/ufs/ffs/ffs_softdep.c Tue Mar 13 22:04:27 2012 (r232948) @@ -6311,7 +6311,7 @@ softdep_journal_freeblocks(ip, cred, len DIP_SET(ip, i_size, length); ip-i_flag |= IN_CHANGE | IN_UPDATE; allocbuf(bp, frags); - ffs_update(vp, MNT_NOWAIT); + ffs_update(vp, 0); bawrite(bp); } else if (lastoff != 0 vp-v_type != VDIR) { int size; @@ -12346,7 +12346,7 @@ flush_newblk_dep(vp, mp, lbn) * point at the newdirblk before the dependency * will go away. */ - error = ffs_update(vp, MNT_WAIT); + error = ffs_update(vp, 1); if (error) break; ACQUIRE_LOCK(lk); @@ -12382,7 +12382,7 @@ restart: */ if (dap-da_state MKDIR_PARENT) { FREE_LOCK(lk); - if ((error = ffs_update(pvp, MNT_WAIT)) != 0) + if ((error = ffs_update(pvp, 1)) != 0) break; ACQUIRE_LOCK(lk); /* @@ -12424,7 +12424,7 @@ restart: * disk. */ if (error == 0 dap == LIST_FIRST(diraddhdp)) - error = ffs_update(vp, MNT_WAIT); + error = ffs_update(vp, 1); vput(vp); if (error != 0) break; @@ -12481,7 +12481,7 @@ retry: if ((error = ffs_vgetf(mp, inum, LK_EXCLUSIVE, vp, FFSV_FORCEINSMQ))) break; - error = ffs_update(vp, MNT_WAIT); + error = ffs_update(vp, 1); vput(vp); if (error) break; Modified: head/sys/ufs/ffs/ffs_vnops.c == --- head/sys/ufs/ffs/ffs_vnops.cTue Mar 13 22:00:46 2012 (r232947) +++ head/sys/ufs/ffs/ffs_vnops.cTue Mar 13 22:04:27 2012 (r232948) @@ -324,7 +324,7 @@ next: /* Write the inode after sync passes to flush deps. */ if (wait DOINGSOFTDEP(vp) noupdate == 0) { BO_UNLOCK(bo); - ffs_update(vp, MNT_WAIT); + ffs_update(vp, 1); BO_LOCK(bo); } /* switch between sync/async. */ @@ -339,7 +339,7 @@ next: BO_UNLOCK(bo); error = 0; if (noupdate == 0) - error = ffs_update(vp, MNT_WAIT); + error = ffs_update(vp, 1); if (DOINGSUJ(vp)) softdep_journal_fsync(VTOI(vp)); return (error); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r232951 - head/sys/dev/fxp
Author: yongari Date: Wed Mar 14 00:26:36 2012 New Revision: 232951 URL: http://svn.freebsd.org/changeset/base/232951 Log: fxp(4) does not handle deferred dma map loading. Tell bus_dmamap_load(9) that it should return immediately with error when there are insufficient mapping resources. Modified: head/sys/dev/fxp/if_fxp.c Modified: head/sys/dev/fxp/if_fxp.c == --- head/sys/dev/fxp/if_fxp.c Wed Mar 14 00:09:36 2012(r232950) +++ head/sys/dev/fxp/if_fxp.c Wed Mar 14 00:26:36 2012(r232951) @@ -681,7 +681,8 @@ fxp_attach(device_t dev) goto fail; } error = bus_dmamap_load(sc-fxp_stag, sc-fxp_smap, sc-fxp_stats, - sizeof(struct fxp_stats), fxp_dma_map_addr, sc-stats_addr, 0); + sizeof(struct fxp_stats), fxp_dma_map_addr, sc-stats_addr, + BUS_DMA_NOWAIT); if (error) { device_printf(dev, could not load the stats DMA buffer\n); goto fail; @@ -705,7 +706,7 @@ fxp_attach(device_t dev) error = bus_dmamap_load(sc-cbl_tag, sc-cbl_map, sc-fxp_desc.cbl_list, FXP_TXCB_SZ, fxp_dma_map_addr, - sc-fxp_desc.cbl_addr, 0); + sc-fxp_desc.cbl_addr, BUS_DMA_NOWAIT); if (error) { device_printf(dev, could not load TxCB DMA buffer\n); goto fail; @@ -729,7 +730,8 @@ fxp_attach(device_t dev) goto fail; } error = bus_dmamap_load(sc-mcs_tag, sc-mcs_map, sc-mcsp, - sizeof(struct fxp_cb_mcs), fxp_dma_map_addr, sc-mcs_addr, 0); + sizeof(struct fxp_cb_mcs), fxp_dma_map_addr, sc-mcs_addr, + BUS_DMA_NOWAIT); if (error) { device_printf(dev, can't load the multicast setup DMA buffer\n); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r232953 - head/sys/dev/fxp
Author: yongari Date: Wed Mar 14 00:54:37 2012 New Revision: 232953 URL: http://svn.freebsd.org/changeset/base/232953 Log: Fix white space nits. Modified: head/sys/dev/fxp/if_fxp.c Modified: head/sys/dev/fxp/if_fxp.c == --- head/sys/dev/fxp/if_fxp.c Wed Mar 14 00:41:37 2012(r232952) +++ head/sys/dev/fxp/if_fxp.c Wed Mar 14 00:54:37 2012(r232953) @@ -236,11 +236,11 @@ static intfxp_ioctl(struct ifnet *ifp, caddr_t data); static voidfxp_watchdog(struct fxp_softc *sc); static voidfxp_add_rfabuf(struct fxp_softc *sc, - struct fxp_rx *rxp); + struct fxp_rx *rxp); static voidfxp_discard_rfabuf(struct fxp_softc *sc, - struct fxp_rx *rxp); + struct fxp_rx *rxp); static int fxp_new_rfabuf(struct fxp_softc *sc, - struct fxp_rx *rxp); + struct fxp_rx *rxp); static int fxp_mc_addrs(struct fxp_softc *sc); static voidfxp_mc_setup(struct fxp_softc *sc); static uint16_tfxp_eeprom_getword(struct fxp_softc *sc, int offset, @@ -272,7 +272,7 @@ static int sysctl_hw_fxp_int_delay(SYSC static voidfxp_scb_wait(struct fxp_softc *sc); static voidfxp_scb_cmd(struct fxp_softc *sc, int cmd); static voidfxp_dma_wait(struct fxp_softc *sc, - volatile uint16_t *status, bus_dma_tag_t dmat, + volatile uint16_t *status, bus_dma_tag_t dmat, bus_dmamap_t map); static device_method_t fxp_methods[] = { @@ -1543,7 +1543,7 @@ fxp_encap(struct fxp_softc *sc, struct m } *m_head = m; error = bus_dmamap_load_mbuf_sg(sc-fxp_txmtag, txp-tx_map, - *m_head, segs, nseg, 0); + *m_head, segs, nseg, 0); if (error != 0) { m_freem(*m_head); *m_head = NULL; @@ -2050,7 +2050,7 @@ fxp_update_stats(struct fxp_softc *sc) */ sc-rx_idle_secs++; } - ifp-if_ierrors += + ifp-if_ierrors += le32toh(sp-rx_crc_errors) + le32toh(sp-rx_alignment_errors) + le32toh(sp-rx_rnr_errors) + @@ -2177,7 +2177,7 @@ fxp_stop(struct fxp_softc *sc) txp = sc-fxp_desc.tx_list; if (txp != NULL) { for (i = 0; i FXP_NTXCB; i++) { - if (txp[i].tx_mbuf != NULL) { + if (txp[i].tx_mbuf != NULL) { bus_dmamap_sync(sc-fxp_txmtag, txp[i].tx_map, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc-fxp_txmtag, ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org