svn commit: r232040 - head/sys/dev/sf
Author: yongari Date: Thu Feb 23 08:22:44 2012 New Revision: 232040 URL: http://svn.freebsd.org/changeset/base/232040 Log: Add check for IFF_DRV_RUNNING flag after serving an interrupt and don't give RX path more priority than TX path. Also remove infinite loop in interrupt handler and limit number of iteration to 32. This change addresses system load fluctuations under high network load. Modified: head/sys/dev/sf/if_sf.c Modified: head/sys/dev/sf/if_sf.c == --- head/sys/dev/sf/if_sf.c Thu Feb 23 07:56:19 2012(r232039) +++ head/sys/dev/sf/if_sf.c Thu Feb 23 08:22:44 2012(r232040) @@ -1549,7 +1549,9 @@ sf_rxeof(struct sf_softc *sc) */ eidx = 0; prog = 0; - for (cons = sc-sf_cdata.sf_rxc_cons; ; SF_INC(cons, SF_RX_CLIST_CNT)) { + for (cons = sc-sf_cdata.sf_rxc_cons; + (ifp-if_drv_flags IFF_DRV_RUNNING) != 0; + SF_INC(cons, SF_RX_CLIST_CNT)) { cur_cmp = sc-sf_rdata.sf_rx_cring[cons]; status = le32toh(cur_cmp-sf_rx_status1); if (status == 0) @@ -1852,6 +1854,7 @@ sf_intr(void *arg) struct sf_softc *sc; struct ifnet*ifp; uint32_tstatus; + int cnt; sc = (struct sf_softc *)arg; SF_LOCK(sc); @@ -1870,13 +1873,13 @@ sf_intr(void *arg) if ((ifp-if_capenable IFCAP_POLLING) != 0) goto done_locked; #endif - if ((ifp-if_drv_flags IFF_DRV_RUNNING) == 0) - goto done_locked; /* Disable interrupts. */ csr_write_4(sc, SF_IMR, 0x); - for (; (status SF_INTRS) != 0;) { + for (cnt = 32; (status SF_INTRS) != 0;) { + if ((ifp-if_drv_flags IFF_DRV_RUNNING) == 0) + break; if ((status SF_ISR_RXDQ1_DMADONE) != 0) sf_rxeof(sc); @@ -1911,15 +1914,19 @@ sf_intr(void *arg) #endif } } + if (!IFQ_DRV_IS_EMPTY(ifp-if_snd)) + sf_start_locked(ifp); + if (--cnt = 0) + break; /* Reading the ISR register clears all interrrupts. */ status = csr_read_4(sc, SF_ISR); } - /* Re-enable interrupts. */ - csr_write_4(sc, SF_IMR, SF_INTRS); + if ((ifp-if_drv_flags IFF_DRV_RUNNING) != 0) { + /* Re-enable interrupts. */ + csr_write_4(sc, SF_IMR, SF_INTRS); + } - if (!IFQ_DRV_IS_EMPTY(ifp-if_snd)) - sf_start_locked(ifp); done_locked: SF_UNLOCK(sc); } ___ 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: r232041 - head/sys/dev/ath
Author: adrian Date: Thu Feb 23 08:32:54 2012 New Revision: 232041 URL: http://svn.freebsd.org/changeset/base/232041 Log: Use the passed-in channel rather than ic-ic_curchan. I'm not sure _why_ the ic is NULL here, but I've seen it occasionally do this after I've been tinkering with things for a while. It ends up crashing in a call to ath_chan_set() via the net80211 scan code and scan task. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c == --- head/sys/dev/ath/if_ath.c Thu Feb 23 08:22:44 2012(r232040) +++ head/sys/dev/ath/if_ath.c Thu Feb 23 08:32:54 2012(r232041) @@ -5432,7 +5432,7 @@ ath_chan_set(struct ath_softc *sc, struc sc-sc_diversity = ath_hal_getdiversity(ah); /* Let DFS at it in case it's a DFS channel */ - ath_dfs_radar_enable(sc, ic-ic_curchan); + ath_dfs_radar_enable(sc, chan); /* * Re-enable rx framework. ___ 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: r232045 - stable/9/sys/dev/re
Author: yongari Date: Thu Feb 23 11:25:30 2012 New Revision: 232045 URL: http://svn.freebsd.org/changeset/base/232045 Log: MFC r231622: For RTL8168/8111D controller, make sure to wake PHY from power down mode. Otherwise, PHY access times out under certain conditions. Modified: stable/9/sys/dev/re/if_re.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/re/if_re.c == --- stable/9/sys/dev/re/if_re.c Thu Feb 23 10:19:24 2012(r232044) +++ stable/9/sys/dev/re/if_re.c Thu Feb 23 11:25:30 2012(r232045) @@ -1429,11 +1429,16 @@ re_attach(device_t dev) sc-rl_flags |= RL_FLAG_MACSLEEP; /* FALLTHROUGH */ case RL_HWREV_8168CP: - case RL_HWREV_8168D: sc-rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_JUMBOV2 | RL_FLAG_WOL_MANLINK; break; + case RL_HWREV_8168D: + sc-rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PHYWAKE_PM | + RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | + RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_JUMBOV2 | + RL_FLAG_WOL_MANLINK; + break; case RL_HWREV_8168DP: sc-rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_AUTOPAD | ___ 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: r232046 - stable/8/sys/dev/re
Author: yongari Date: Thu Feb 23 11:26:47 2012 New Revision: 232046 URL: http://svn.freebsd.org/changeset/base/232046 Log: MFC r231622: For RTL8168/8111D controller, make sure to wake PHY from power down mode. Otherwise, PHY access times out under certain conditions. Approved by:re (kib) Modified: stable/8/sys/dev/re/if_re.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (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) stable/8/sys/dev/e1000/ (props changed) Modified: stable/8/sys/dev/re/if_re.c == --- stable/8/sys/dev/re/if_re.c Thu Feb 23 11:25:30 2012(r232045) +++ stable/8/sys/dev/re/if_re.c Thu Feb 23 11:26:47 2012(r232046) @@ -1429,11 +1429,16 @@ re_attach(device_t dev) sc-rl_flags |= RL_FLAG_MACSLEEP; /* FALLTHROUGH */ case RL_HWREV_8168CP: - case RL_HWREV_8168D: sc-rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_JUMBOV2 | RL_FLAG_WOL_MANLINK; break; + case RL_HWREV_8168D: + sc-rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PHYWAKE_PM | + RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | + RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_JUMBOV2 | + RL_FLAG_WOL_MANLINK; + break; case RL_HWREV_8168DP: sc-rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_AUTOPAD | ___ 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: r232047 - stable/7/sys/dev/re
Author: yongari Date: Thu Feb 23 11:28:19 2012 New Revision: 232047 URL: http://svn.freebsd.org/changeset/base/232047 Log: MFC r231622: For RTL8168/8111D controller, make sure to wake PHY from power down mode. Otherwise, PHY access times out under certain conditions. Approved by:re (kib) Modified: stable/7/sys/dev/re/if_re.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/re/if_re.c == --- stable/7/sys/dev/re/if_re.c Thu Feb 23 11:26:47 2012(r232046) +++ stable/7/sys/dev/re/if_re.c Thu Feb 23 11:28:19 2012(r232047) @@ -1434,11 +1434,16 @@ re_attach(device_t dev) sc-rl_flags |= RL_FLAG_MACSLEEP; /* FALLTHROUGH */ case RL_HWREV_8168CP: - case RL_HWREV_8168D: sc-rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_JUMBOV2 | RL_FLAG_WOL_MANLINK; break; + case RL_HWREV_8168D: + sc-rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PHYWAKE_PM | + RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | + RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_JUMBOV2 | + RL_FLAG_WOL_MANLINK; + break; case RL_HWREV_8168DP: sc-rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_AUTOPAD | ___ 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: r232048 - in head/sys: kern sys
Author: kib Date: Thu Feb 23 11:50:23 2012 New Revision: 232048 URL: http://svn.freebsd.org/changeset/base/232048 Log: Allow the parent to gather the exit status of the children reparented to the debugger. When reparenting for debugging, keep the child in the new orphan list of old parent. When looping over the children in kern_wait(), iterate over both children list and orphan list to search for the process by pid. Submitted by: Dmitry Mikulin dmitrym juniper.net MFC after:2 weeks Modified: head/sys/kern/kern_exit.c head/sys/kern/kern_fork.c head/sys/kern/sys_process.c head/sys/sys/proc.h Modified: head/sys/kern/kern_exit.c == --- head/sys/kern/kern_exit.c Thu Feb 23 11:28:19 2012(r232047) +++ head/sys/kern/kern_exit.c Thu Feb 23 11:50:23 2012(r232048) @@ -720,7 +720,6 @@ proc_reap(struct thread *td, struct proc if (p-p_oppid (t = pfind(p-p_oppid)) != NULL) { PROC_LOCK(p); proc_reparent(p, t); - p-p_pptr-p_dbg_child--; p-p_oppid = 0; PROC_UNLOCK(p); pksignal(t, SIGCHLD, p-p_ksi); @@ -739,6 +738,10 @@ proc_reap(struct thread *td, struct proc LIST_REMOVE(p, p_list); /* off zombproc */ sx_xunlock(allproc_lock); LIST_REMOVE(p, p_sibling); + if (p-p_flag P_ORPHAN) { + LIST_REMOVE(p, p_orphan); + p-p_flag = ~P_ORPHAN; + } leavepgrp(p); #ifdef PROCDESC if (p-p_procdesc != NULL) @@ -803,12 +806,53 @@ proc_reap(struct thread *td, struct proc sx_xunlock(allproc_lock); } +static int +proc_to_reap(struct thread *td, struct proc *p, pid_t pid, int *status, +int options, struct rusage *rusage) +{ + struct proc *q; + + q = td-td_proc; + PROC_LOCK(p); + if (pid != WAIT_ANY p-p_pid != pid p-p_pgid != -pid) { + PROC_UNLOCK(p); + return (0); + } + if (p_canwait(td, p)) { + PROC_UNLOCK(p); + return (0); + } + + /* +* This special case handles a kthread spawned by linux_clone +* (see linux_misc.c). The linux_wait4 and linux_waitpid +* functions need to be able to distinguish between waiting +* on a process and waiting on a thread. It is a thread if +* p_sigparent is not SIGCHLD, and the WLINUXCLONE option +* signifies we want to wait for threads and not processes. +*/ + if ((p-p_sigparent != SIGCHLD) ^ + ((options WLINUXCLONE) != 0)) { + PROC_UNLOCK(p); + return (0); + } + + PROC_SLOCK(p); + if (p-p_state == PRS_ZOMBIE) { + proc_reap(td, p, status, options, rusage); + return (-1); + } + PROC_SUNLOCK(p); + PROC_UNLOCK(p); + return (1); +} + int kern_wait(struct thread *td, pid_t pid, int *status, int options, struct rusage *rusage) { struct proc *p, *q; - int error, nfound; + int error, nfound, ret; AUDIT_ARG_PID(pid); AUDIT_ARG_VALUE(options); @@ -831,37 +875,16 @@ loop: nfound = 0; sx_xlock(proctree_lock); LIST_FOREACH(p, q-p_children, p_sibling) { - PROC_LOCK(p); - if (pid != WAIT_ANY - p-p_pid != pid p-p_pgid != -pid) { - PROC_UNLOCK(p); + ret = proc_to_reap(td, p, pid, status, options, rusage); + if (ret == 0) continue; - } - if (p_canwait(td, p)) { - PROC_UNLOCK(p); - continue; - } - - /* -* This special case handles a kthread spawned by linux_clone -* (see linux_misc.c). The linux_wait4 and linux_waitpid -* functions need to be able to distinguish between waiting -* on a process and waiting on a thread. It is a thread if -* p_sigparent is not SIGCHLD, and the WLINUXCLONE option -* signifies we want to wait for threads and not processes. -*/ - if ((p-p_sigparent != SIGCHLD) ^ - ((options WLINUXCLONE) != 0)) { - PROC_UNLOCK(p); - continue; - } + else if (ret == 1) + nfound++; + else + return (0); - nfound++; + PROC_LOCK(p); PROC_SLOCK(p); - if (p-p_state == PRS_ZOMBIE) { - proc_reap(td, p, status, options, rusage); - return (0); - } if ((p-p_flag P_STOPPED_SIG) (p-p_suspcount == p-p_numthreads)
Re: svn commit: r231999 - head/sys/conf
On Wed Feb 22 12, Doug Barton wrote: On 02/22/2012 07:05, Josh Paetzel wrote: -# CPU. This behaviour is enabled by default, so this option can be used That's not a typo, it's an alternate spelling, which we usually don't correct (same with initialisation). I'm not asking for the change to be backed out, just letting you know for future reference. i think the commit should be reverted. freebsd is an international project and by turning comments that were made by people using british english spelling into american english spelling, this commit implies that freebsd prefers a certain spelling. expecially, if the comments came from someone who lives in a native english speaking country, changing the perfectly valid spelling into american english might be offensive. just my 0.02 $ though. cheers. alex Doug -- It's always a long day; 86400 doesn't fit into a short. Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ ___ 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: r232050 - head/sys/fs/nfsserver
Author: rmacklem Date: Thu Feb 23 16:47:05 2012 New Revision: 232050 URL: http://svn.freebsd.org/changeset/base/232050 Log: hrs@ reported a panic to freebsd-stable@ under the subject line panic in 8.3-PRERELEASE on Feb. 22, 2012. This panic was caused by use of a mix of tsleep() and msleep() calls on the same event in the new NFS server DRC code. It did mtx_unlock(); tsleep(); in two places, which kib@ noted introduced a slight risk that the wakeup() would occur before the tsleep(), resulting in a 10sec delay before waking up. This patch fixes the problem by replacing mtx_unlock(); tsleep(); with mtx_sleep(..PDROP..). It also changes a nfsmsleep() call to mtx_sleep() so that the code uses mtx_sleep() consistently within the file. Tested by:hrs (in progress) Reviewed by: jhb MFC after:5 days Modified: head/sys/fs/nfsserver/nfs_nfsdcache.c Modified: head/sys/fs/nfsserver/nfs_nfsdcache.c == --- head/sys/fs/nfsserver/nfs_nfsdcache.c Thu Feb 23 14:35:56 2012 (r232049) +++ head/sys/fs/nfsserver/nfs_nfsdcache.c Thu Feb 23 16:47:05 2012 (r232050) @@ -336,9 +336,8 @@ loop: nfsaddr_match(NETFAMILY(rp), rp-rc_haddr, nd-nd_nam)) { if ((rp-rc_flag RC_LOCKED) != 0) { rp-rc_flag |= RC_WANTED; - NFSUNLOCKCACHE(); - (void) tsleep((caddr_t)rp, PZERO - 1, - nfsrc, 10 * hz); + (void)mtx_sleep(rp, NFSCACHEMUTEXPTR, + (PZERO - 1) | PDROP, nfsrc, 10 * hz); goto loop; } if (rp-rc_flag == 0) @@ -622,8 +621,8 @@ tryagain: rp = hitrp; if ((rp-rc_flag RC_LOCKED) != 0) { rp-rc_flag |= RC_WANTED; - NFSUNLOCKCACHE(); - (void) tsleep((caddr_t)rp, PZERO-1, nfsrc, 10 * hz); + (void)mtx_sleep(rp, NFSCACHEMUTEXPTR, + (PZERO - 1) | PDROP, nfsrc, 10 * hz); goto tryagain; } if (rp-rc_flag == 0) @@ -694,7 +693,7 @@ nfsrc_lock(struct nfsrvcache *rp) NFSCACHELOCKREQUIRED(); while ((rp-rc_flag RC_LOCKED) != 0) { rp-rc_flag |= RC_WANTED; - (void) nfsmsleep((caddr_t)rp, NFSCACHEMUTEXPTR, PZERO - 1, + (void)mtx_sleep(rp, NFSCACHEMUTEXPTR, PZERO - 1, nfsrc, 0); } rp-rc_flag |= RC_LOCKED; ___ 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: r232051 - in head: . share/man/man9 sys/kern
Author: brueffer Date: Thu Feb 23 17:47:19 2012 New Revision: 232051 URL: http://svn.freebsd.org/changeset/base/232051 Log: Catch up with r195837 (2.5 years ago) which renamed net_add_domain() to domain_add(). PR: 165424 Submitted by: Lachlan Kang MFC after:1 week Modified: head/ObsoleteFiles.inc head/share/man/man9/Makefile head/share/man/man9/domain.9 head/sys/kern/uipc_domain.c Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Thu Feb 23 16:47:05 2012(r232050) +++ head/ObsoleteFiles.inc Thu Feb 23 17:47:19 2012(r232051) @@ -707,6 +707,8 @@ OLD_LIBS+=usr/lib32/pam_unix.so.4 .endif # 20090718: the gdm pam.d file is no longer required. OLD_FILES+=etc/pam.d/gdm +# 20090714: net_add_domain(9) renamed to domain_add(9) +OLD_FILES+=usr/share/man/man9/net_add_domain.9.gz # 20090713: vimage container structs removed. OLD_FILES+=usr/include/netinet/vinet.h OLD_FILES+=usr/include/netinet6/vinet6.h Modified: head/share/man/man9/Makefile == --- head/share/man/man9/MakefileThu Feb 23 16:47:05 2012 (r232050) +++ head/share/man/man9/MakefileThu Feb 23 17:47:19 2012 (r232051) @@ -615,7 +615,7 @@ MLINKS+=disk.9 disk_alloc.9 \ disk.9 disk_destroy.9 \ disk.9 disk_gone.9 MLINKS+=domain.9 DOMAIN_SET.9 \ - domain.9 net_add_domain.9 \ + domain.9 domain_add.9 \ domain.9 pfctlinput.9 \ domain.9 pfctlinput2.9 \ domain.9 pffindproto.9 \ Modified: head/share/man/man9/domain.9 == --- head/share/man/man9/domain.9Thu Feb 23 16:47:05 2012 (r232050) +++ head/share/man/man9/domain.9Thu Feb 23 17:47:19 2012 (r232051) @@ -26,11 +26,11 @@ .\ .\ $FreeBSD$ .\ -.Dd December 23, 2008 +.Dd February 23, 2012 .Dt DOMAIN 9 .Os .Sh NAME -.Nm net_add_domain , +.Nm domain_add , .Nm pfctlinput , .Nm pfctlinput2 , .Nm pffindproto , @@ -43,7 +43,7 @@ .In sys/protosw.h .In sys/domain.h .Ft void -.Fn net_add_domain void *data +.Fn domain_add void *data .Ft void .Fn pfctlinput int cmd struct sockaddr *sa .Ft void @@ -142,7 +142,7 @@ have their .Fn pr_ctlinput function called. .Pp -.Fn net_add_domain +.Fn domain_add adds a new protocol domain to the system. The argument .Fa data @@ -153,13 +153,13 @@ within the function, but is declared in order to prevent compiler warnings when new domains are registered with .Fn SYSINIT . In most cases -.Fn net_add_domain +.Fn domain_add is not called directly, instead .Fn DOMAIN_SET is used. .Pp If the new domain has defined an initialization routine, it is called by -.Fn net_add_domain ; +.Fn domain_add ; as well, each of the protocols within the domain that have defined an initialization routine will have theirs called. .Pp Modified: head/sys/kern/uipc_domain.c == --- head/sys/kern/uipc_domain.c Thu Feb 23 16:47:05 2012(r232050) +++ head/sys/kern/uipc_domain.c Thu Feb 23 17:47:19 2012(r232051) @@ -220,7 +220,7 @@ domain_add(void *data) domains = dp; KASSERT(domain_init_status = 1, - (attempt to net_add_domain(%s) before domaininit(), + (attempt to domain_add(%s) before domaininit(), dp-dom_name)); #ifndef INVARIANTS if (domain_init_status 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: r232052 - head/usr.bin/calendar
Author: osa (ports committer) Date: Thu Feb 23 17:47:48 2012 New Revision: 232052 URL: http://svn.freebsd.org/changeset/base/232052 Log: Add pt_BR.ISO8859-1 and pt_BR.UTF-8 directories to install. It was forgotten in r219937 commit. Approved by: edwin MFC after:1 week Modified: head/usr.bin/calendar/Makefile Modified: head/usr.bin/calendar/Makefile == --- head/usr.bin/calendar/Makefile Thu Feb 23 17:47:19 2012 (r232051) +++ head/usr.bin/calendar/Makefile Thu Feb 23 17:47:48 2012 (r232052) @@ -7,7 +7,8 @@ SRCS= calendar.c locale.c events.c dates DPADD= ${LIBM} LDADD= -lm INTER= de_AT.ISO_8859-15 de_DE.ISO8859-1 fr_FR.ISO8859-1 \ - hr_HR.ISO8859-2 hu_HU.ISO8859-2 ru_RU.KOI8-R uk_UA.KOI8-U + hr_HR.ISO8859-2 hu_HU.ISO8859-2 pt_BR.ISO8859-1 \ + pt_BR.UTF-8 ru_RU.KOI8-R uk_UA.KOI8-U DE_LINKS= de_DE.ISO8859-15 FR_LINKS= fr_FR.ISO8859-15 TEXTMODE?= 444 ___ 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: r232053 - in stable/9/release/doc: en_US.ISO8859-1/hardware share/misc
Author: brueffer Date: Thu Feb 23 17:57:08 2012 New Revision: 232053 URL: http://svn.freebsd.org/changeset/base/232053 Log: MFC: r231943 Add oce(4) to the hardware notes. Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml stable/9/release/doc/share/misc/dev.archlist.txt Directory Properties: stable/9/release/ (props changed) stable/9/release/doc/en_US.ISO8859-1/hardware/ (props changed) stable/9/release/picobsd/tinyware/passwd/ (props changed) Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml == --- stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml Thu Feb 23 17:47:48 2012(r232052) +++ stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml Thu Feb 23 17:57:08 2012(r232053) @@ -956,6 +956,8 @@ hwlist.nxge; + hwlist.oce; + hwlist.pcn; hwlist.qlxgb; Modified: stable/9/release/doc/share/misc/dev.archlist.txt == --- stable/9/release/doc/share/misc/dev.archlist.txtThu Feb 23 17:47:48 2012(r232052) +++ stable/9/release/doc/share/misc/dev.archlist.txtThu Feb 23 17:57:08 2012(r232053) @@ -97,6 +97,7 @@ ng_ubti386,pc98,amd64 nspi386,pc98 nvei386,amd64 nxge i386,amd64 +ocei386,amd64 ohci i386,pc98,ia64,amd64,powerpc oltr i386 pcni386,pc98,ia64,amd64 ___ 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: r232054 - in head/sys: net netinet netinet6
Author: kmacy Date: Thu Feb 23 18:21:37 2012 New Revision: 232054 URL: http://svn.freebsd.org/changeset/base/232054 Log: When using flowtable llentrys can outlive the interface with which they're associated at which the lle_tbl pointer points to freed memory and the llt_free pointer is no longer valid. Move the free pointer in to the llentry itself and update the initalization sites. MFC after:2 weeks Modified: head/sys/net/if_llatbl.h head/sys/netinet/in.c head/sys/netinet6/in6.c Modified: head/sys/net/if_llatbl.h == --- head/sys/net/if_llatbl.hThu Feb 23 17:57:08 2012(r232053) +++ head/sys/net/if_llatbl.hThu Feb 23 18:21:37 2012(r232054) @@ -106,7 +106,6 @@ struct llentry { (negative refcnt %d, (lle)-lle_refcnt)); \ (lle)-lle_refcnt++;\ } while (0) - #defineLLE_REMREF(lle) do {\ LLE_WLOCK_ASSERT(lle); \ KASSERT((lle)-lle_refcnt 1, \ @@ -116,7 +115,7 @@ struct llentry { #defineLLE_FREE_LOCKED(lle) do { \ if ((lle)-lle_refcnt = 1) \ - (lle)-lle_tbl-llt_free((lle)-lle_tbl, (lle));\ + (lle)-lle_free((lle)-lle_tbl, (lle));\ else { \ (lle)-lle_refcnt--;\ LLE_WUNLOCK(lle); \ @@ -152,7 +151,6 @@ struct lltable { int llt_af; struct ifnet*llt_ifp; - void(*llt_free)(struct lltable *, struct llentry *); void(*llt_prefix_free)(struct lltable *, const struct sockaddr *prefix, const struct sockaddr *mask, Modified: head/sys/netinet/in.c == --- head/sys/netinet/in.c Thu Feb 23 17:57:08 2012(r232053) +++ head/sys/netinet/in.c Thu Feb 23 18:21:37 2012(r232054) @@ -1260,6 +1260,20 @@ struct in_llentry { struct sockaddr_in l3_addr4; }; +/* + * Deletes an address from the address table. + * This function is called by the timer functions + * such as arptimer() and nd6_llinfo_timer(), and + * the caller does the locking. + */ +static void +in_lltable_free(struct lltable *llt, struct llentry *lle) +{ + LLE_WUNLOCK(lle); + LLE_LOCK_DESTROY(lle); + free(lle, M_LLTABLE); +} + static struct llentry * in_lltable_new(const struct sockaddr *l3addr, u_int flags) { @@ -1277,25 +1291,11 @@ in_lltable_new(const struct sockaddr *l3 lle-base.la_expire = time_uptime; /* mark expired */ lle-l3_addr4 = *(const struct sockaddr_in *)l3addr; lle-base.lle_refcnt = 1; + lle-base.lle_free = in_lltable_free; LLE_LOCK_INIT(lle-base); return lle-base; } -/* - * Deletes an address from the address table. - * This function is called by the timer functions - * such as arptimer() and nd6_llinfo_timer(), and - * the caller does the locking. - */ -static void -in_lltable_free(struct lltable *llt, struct llentry *lle) -{ - LLE_WUNLOCK(lle); - LLE_LOCK_DESTROY(lle); - free(lle, M_LLTABLE); -} - - #define IN_ARE_MASKED_ADDR_EQUAL(d, a, m) ( \ (((ntohl((d)-sin_addr.s_addr) ^ (a)-sin_addr.s_addr) (m)-sin_addr.s_addr)) == 0 ) @@ -1577,7 +1577,6 @@ in_domifattach(struct ifnet *ifp) llt = lltable_init(ifp, AF_INET); if (llt != NULL) { - llt-llt_free = in_lltable_free; llt-llt_prefix_free = in_lltable_prefix_free; llt-llt_lookup = in_lltable_lookup; llt-llt_dump = in_lltable_dump; Modified: head/sys/netinet6/in6.c == --- head/sys/netinet6/in6.c Thu Feb 23 17:57:08 2012(r232053) +++ head/sys/netinet6/in6.c Thu Feb 23 18:21:37 2012(r232054) @@ -2439,6 +2439,20 @@ struct in6_llentry { struct sockaddr_in6 l3_addr6; }; +/* + * Deletes an address from the address table. + * This function is called by the timer functions + * such as arptimer() and nd6_llinfo_timer(), and + * the caller does the locking. + */ +static void +in6_lltable_free(struct lltable *llt, struct llentry *lle) +{ + LLE_WUNLOCK(lle); + LLE_LOCK_DESTROY(lle); + free(lle, M_LLTABLE); +} + static struct llentry * in6_lltable_new(const struct sockaddr *l3addr, u_int flags) { @@ -2451,6 +2465,7 @@ in6_lltable_new(const struct sockaddr *l lle-l3_addr6 = *(const struct sockaddr_in6 *)l3addr;
svn commit: r232055 - in head/sys: fs/fifofs kern sys
Author: kmacy Date: Thu Feb 23 18:37:30 2012 New Revision: 232055 URL: http://svn.freebsd.org/changeset/base/232055 Log: merge pipe and fifo implementations Also reviewed by: jhb, jilles (initial revision) Tested by: pho, jilles Submitted by: gianni Reviewed by: bde Modified: head/sys/fs/fifofs/fifo.h head/sys/fs/fifofs/fifo_vnops.c head/sys/kern/sys_pipe.c head/sys/sys/pipe.h Modified: head/sys/fs/fifofs/fifo.h == --- head/sys/fs/fifofs/fifo.h Thu Feb 23 18:21:37 2012(r232054) +++ head/sys/fs/fifofs/fifo.h Thu Feb 23 18:37:30 2012(r232055) @@ -33,6 +33,7 @@ /* * Prototypes for fifo operations on vnodes. */ +intfifo_iseof(struct file *); intfifo_vnoperate(struct vop_generic_args *); intfifo_printinfo(struct vnode *); Modified: head/sys/fs/fifofs/fifo_vnops.c == --- head/sys/fs/fifofs/fifo_vnops.c Thu Feb 23 18:21:37 2012 (r232054) +++ head/sys/fs/fifofs/fifo_vnops.c Thu Feb 23 18:37:30 2012 (r232055) @@ -2,6 +2,7 @@ * Copyright (c) 1990, 1993, 1995 * The Regents of the University of California. * Copyright (c) 2005 Robert N. M. Watson + * Copyright (c) 2012 Giovanni Trematerra * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,11 +43,10 @@ #include sys/lock.h #include sys/mutex.h #include sys/malloc.h -#include sys/poll.h +#include sys/selinfo.h +#include sys/pipe.h #include sys/proc.h #include sys/signalvar.h -#include sys/socket.h -#include sys/socketvar.h #include sys/sx.h #include sys/systm.h #include sys/un.h @@ -54,43 +54,19 @@ #include sys/vnode.h #include fs/fifofs/fifo.h -static fo_rdwr_tfifo_read_f; -static fo_rdwr_tfifo_write_f; -static fo_ioctl_t fifo_ioctl_f; -static fo_poll_tfifo_poll_f; -static fo_kqfilter_tfifo_kqfilter_f; -static fo_stat_tfifo_stat_f; -static fo_close_t fifo_close_f; -static fo_truncate_tfifo_truncate_f; - -struct fileops fifo_ops_f = { - .fo_read = fifo_read_f, - .fo_write = fifo_write_f, - .fo_truncate = fifo_truncate_f, - .fo_ioctl = fifo_ioctl_f, - .fo_poll = fifo_poll_f, - .fo_kqfilter = fifo_kqfilter_f, - .fo_stat = fifo_stat_f, - .fo_close = fifo_close_f, - .fo_chmod = vn_chmod, - .fo_chown = vn_chown, - .fo_flags = DFLAG_PASSABLE -}; - /* * This structure is associated with the FIFO vnode and stores * the state associated with the FIFO. * Notes about locking: - * - fi_readsock and fi_writesock are invariant since init time. - * - fi_readers and fi_writers are vnode lock protected. - * - fi_wgen is fif_mtx lock protected. + * - fi_pipe is invariant since init time. + * - fi_readers and fi_writers are protected by the vnode lock. + * - fi_wgen is protected by the pipe mutex. */ struct fifoinfo { - struct socket *fi_readsock; - struct socket *fi_writesock; - longfi_readers; - longfi_writers; - int fi_wgen; + struct pipe *fi_pipe; + longfi_readers; + longfi_writers; + int fi_wgen; }; static vop_print_t fifo_print; @@ -99,29 +75,6 @@ static vop_close_t fifo_close; static vop_pathconf_t fifo_pathconf; static vop_advlock_t fifo_advlock; -static voidfilt_fifordetach(struct knote *kn); -static int filt_fiforead(struct knote *kn, long hint); -static voidfilt_fifowdetach(struct knote *kn); -static int filt_fifowrite(struct knote *kn, long hint); -static voidfilt_fifodetach_notsup(struct knote *kn); -static int filt_fifo_notsup(struct knote *kn, long hint); - -static struct filterops fiforead_filtops = { - .f_isfd = 1, - .f_detach = filt_fifordetach, - .f_event = filt_fiforead, -}; -static struct filterops fifowrite_filtops = { - .f_isfd = 1, - .f_detach = filt_fifowdetach, - .f_event = filt_fifowrite, -}; -static struct filterops fifo_notsup_filtops = { - .f_isfd = 1, - .f_detach = filt_fifodetach_notsup, - .f_event = filt_fifo_notsup, -}; - struct vop_vector fifo_specops = { .vop_default = default_vnodeops, @@ -150,22 +103,19 @@ struct vop_vector fifo_specops = { .vop_write =VOP_PANIC, }; -struct mtx fifo_mtx; -MTX_SYSINIT(fifo, fifo_mtx, fifo mutex, MTX_DEF); - /* * Dispose of fifo resources. */ static void fifo_cleanup(struct vnode *vp) { - struct fifoinfo *fip = vp-v_fifoinfo; + struct fifoinfo *fip; ASSERT_VOP_ELOCKED(vp, fifo_cleanup); + fip = vp-v_fifoinfo; if (fip-fi_readers == 0 fip-fi_writers == 0) { vp-v_fifoinfo = NULL; - (void)soclose(fip-fi_readsock); -
svn commit: r232056 - head/share/man/man4
Author: brueffer Date: Thu Feb 23 18:48:02 2012 New Revision: 232056 URL: http://svn.freebsd.org/changeset/base/232056 Log: Rename DESCRIPTION section to HARDWARE, so this manpage can be used for automatic hardware notes generation. MFC after:3 days Modified: head/share/man/man4/isci.4 Modified: head/share/man/man4/isci.4 == --- head/share/man/man4/isci.4 Thu Feb 23 18:37:30 2012(r232055) +++ head/share/man/man4/isci.4 Thu Feb 23 18:48:02 2012(r232056) @@ -52,7 +52,7 @@ Or, to load the driver as a module at bo .Bd -literal -offset indent isci_load=YES .Ed -.Sh DESCRIPTION +.Sh HARDWARE The .Nm driver provides support for Intel C600 ___ 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: r232057 - in stable/8/release: doc/en_US.ISO8859-1/hardware doc/share/misc picobsd/floppy.tree/sbin
Author: brueffer Date: Thu Feb 23 18:49:38 2012 New Revision: 232057 URL: http://svn.freebsd.org/changeset/base/232057 Log: MFC: r231943 Add oce(4) to the hardware notes. Approved by: re (bz) Modified: stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml stable/8/release/doc/share/misc/dev.archlist.txt Directory Properties: stable/8/release/ (props changed) stable/8/release/doc/en_US.ISO8859-1/hardware/ (props changed) stable/8/release/picobsd/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/dhclient-script (props changed) stable/8/release/picobsd/qemu/ (props changed) stable/8/release/picobsd/tinyware/login/ (props changed) stable/8/release/picobsd/tinyware/passwd/ (props changed) stable/8/release/powerpc/ (props changed) Modified: stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml == --- stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml Thu Feb 23 18:48:02 2012(r232056) +++ stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml Thu Feb 23 18:49:38 2012(r232057) @@ -900,6 +900,8 @@ hwlist.nxge; + hwlist.oce; + hwlist.pcn; hwlist.re; Modified: stable/8/release/doc/share/misc/dev.archlist.txt == --- stable/8/release/doc/share/misc/dev.archlist.txtThu Feb 23 18:48:02 2012(r232056) +++ stable/8/release/doc/share/misc/dev.archlist.txtThu Feb 23 18:49:38 2012(r232057) @@ -97,6 +97,7 @@ ng_ubti386,pc98,amd64 nspi386,pc98 nvei386,amd64 nxge i386,amd64 +ocei386,amd64 ohci i386,pc98,ia64,amd64,powerpc oltr i386 pcni386,pc98,ia64,amd64 ___ 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: r232058 - stable/9/sys/net
Author: kmacy Date: Thu Feb 23 18:50:19 2012 New Revision: 232058 URL: http://svn.freebsd.org/changeset/base/232058 Log: MFC r230598 A flowtable entry can continue referencing an llentry indefinitely if the entry is repeatedly referenced within its timeout window. This change clears the LLE_VALID flag when an llentry is removed from an interface's hash table and adds an extra check to the flowtable code for the LLE_VALID flag in llentry to avoid retaining and using a stale reference. Modified: stable/9/sys/net/flowtable.c stable/9/sys/net/if_llatbl.c Modified: stable/9/sys/net/flowtable.c == --- stable/9/sys/net/flowtable.cThu Feb 23 18:49:38 2012 (r232057) +++ stable/9/sys/net/flowtable.cThu Feb 23 18:50:19 2012 (r232058) @@ -1185,12 +1185,14 @@ keycheck: rt = __DEVOLATILE(struct rtentry *, fle-f_rt); lle = __DEVOLATILE(struct llentry *, fle-f_lle); if ((rt != NULL) +lle != NULL fle-f_fhash == hash flowtable_key_equal(fle, key) (proto == fle-f_proto) (fibnum == fle-f_fibnum) (rt-rt_flags RTF_UP) -(rt-rt_ifp != NULL)) { +(rt-rt_ifp != NULL) +(lle-la_flags LLE_VALID)) { fs-ft_hits++; fle-f_uptime = time_uptime; fle-f_flags |= flags; Modified: stable/9/sys/net/if_llatbl.c == --- stable/9/sys/net/if_llatbl.cThu Feb 23 18:49:38 2012 (r232057) +++ stable/9/sys/net/if_llatbl.cThu Feb 23 18:50:19 2012 (r232058) @@ -125,6 +125,7 @@ llentry_free(struct llentry *lle) (%s: la_numheld %d 0, pkts_droped %zd, __func__, lle-la_numheld, pkts_dropped)); + lle-la_flags = ~LLE_VALID; LLE_FREE_LOCKED(lle); return (pkts_dropped); ___ 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: r232059 - in head: sys/fs/devfs sys/fs/nullfs sys/kern sys/sys usr.sbin/jail
Author: mm Date: Thu Feb 23 18:51:24 2012 New Revision: 232059 URL: http://svn.freebsd.org/changeset/base/232059 Log: To improve control over the use of mount(8) inside a jail(8), introduce a new jail parameter node with the following parameters: allow.mount.devfs: allow mounting the devfs filesystem inside a jail allow.mount.nullfs: allow mounting the nullfs filesystem inside a jail Both parameters are disabled by default (equals the behavior before devfs and nullfs in jails). Administrators have to explicitly allow mounting devfs and nullfs for each jail. The value -1 of the devfs_ruleset parameter is removed in favor of the new allow setting. Reviewed by: jamie Suggested by: pjd MFC after:2 weeks Modified: head/sys/fs/devfs/devfs_vfsops.c head/sys/fs/nullfs/null_vfsops.c head/sys/kern/kern_jail.c head/sys/sys/jail.h head/usr.sbin/jail/jail.8 Modified: head/sys/fs/devfs/devfs_vfsops.c == --- head/sys/fs/devfs/devfs_vfsops.cThu Feb 23 18:50:19 2012 (r232058) +++ head/sys/fs/devfs/devfs_vfsops.cThu Feb 23 18:51:24 2012 (r232059) @@ -71,7 +71,7 @@ devfs_mount(struct mount *mp) struct devfs_mount *fmp; struct vnode *rvp; struct thread *td = curthread; - int rsnum; + int injail, rsnum; if (devfs_unr == NULL) devfs_unr = new_unrhdr(0, INT_MAX, NULL); @@ -81,7 +81,11 @@ devfs_mount(struct mount *mp) if (mp-mnt_flag MNT_ROOTFS) return (EOPNOTSUPP); + if (!prison_allow(td-td_ucred, PR_ALLOW_MOUNT_DEVFS)) + return (EPERM); + rsnum = 0; + injail = jailed(td-td_ucred); if (mp-mnt_optnew != NULL) { if (vfs_filteropt(mp-mnt_optnew, devfs_opts)) @@ -89,24 +93,20 @@ devfs_mount(struct mount *mp) if (vfs_getopt(mp-mnt_optnew, ruleset, NULL, NULL) == 0 (vfs_scanopt(mp-mnt_optnew, ruleset, %d, - rsnum) != 1 || rsnum 0 || rsnum 65535)) - error = EINVAL; - } + rsnum) != 1 || rsnum 0 || rsnum 65535)) { + vfs_mount_error(mp, %s, + invalid ruleset specification); + return (EINVAL); + } - /* jails enforce their ruleset, prison0 has no restrictions */ - if (td-td_ucred-cr_prison-pr_devfs_rsnum != 0) { - rsnum = td-td_ucred-cr_prison-pr_devfs_rsnum; - if (rsnum == -1) + if (injail rsnum != 0 + rsnum != td-td_ucred-cr_prison-pr_devfs_rsnum) return (EPERM); - /* check rsnum for sanity, devfs_rsnum is uint16_t */ - if (rsnum 0 || rsnum 65535) - error = EINVAL; } - if (error) { - vfs_mount_error(mp, %s, invalid ruleset specification); - return (error); - } + /* jails enforce their ruleset */ + if (injail) + rsnum = td-td_ucred-cr_prison-pr_devfs_rsnum; if (mp-mnt_flag MNT_UPDATE) { if (rsnum != 0) { Modified: head/sys/fs/nullfs/null_vfsops.c == --- head/sys/fs/nullfs/null_vfsops.cThu Feb 23 18:50:19 2012 (r232058) +++ head/sys/fs/nullfs/null_vfsops.cThu Feb 23 18:51:24 2012 (r232059) @@ -50,6 +50,7 @@ #include sys/namei.h #include sys/proc.h #include sys/vnode.h +#include sys/jail.h #include fs/nullfs/null.h @@ -75,12 +76,16 @@ nullfs_mount(struct mount *mp) struct vnode *lowerrootvp, *vp; struct vnode *nullm_rootvp; struct null_mount *xmp; + struct thread *td = curthread; char *target; int isvnunlocked = 0, len; struct nameidata nd, *ndp = nd; NULLFSDEBUG(nullfs_mount(mp = %p)\n, (void *)mp); + if (!prison_allow(td-td_ucred, PR_ALLOW_MOUNT_NULLFS)) + return (EPERM); + if (mp-mnt_flag MNT_ROOTFS) return (EOPNOTSUPP); /* Modified: head/sys/kern/kern_jail.c == --- head/sys/kern/kern_jail.c Thu Feb 23 18:50:19 2012(r232058) +++ head/sys/kern/kern_jail.c Thu Feb 23 18:51:24 2012(r232059) @@ -201,6 +201,8 @@ static char *pr_allow_names[] = { allow.mount, allow.quotas, allow.socket_af, + allow.mount.devfs, + allow.mount.nullfs, }; const size_t pr_allow_names_size = sizeof(pr_allow_names); @@ -212,12 +214,14 @@ static char *pr_allow_nonames[] = { allow.nomount, allow.noquotas, allow.nosocket_af, + allow.mount.nodevfs, + allow.mount.nonullfs, }; const size_t pr_allow_nonames_size =
svn commit: r232060 - in head/release/doc: en_US.ISO8859-1/hardware share/misc
Author: brueffer Date: Thu Feb 23 18:54:33 2012 New Revision: 232060 URL: http://svn.freebsd.org/changeset/base/232060 Log: Add isci(4) to the hardware notes. MFC after:3 days Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml head/release/doc/share/misc/dev.archlist.txt Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml == --- head/release/doc/en_US.ISO8859-1/hardware/article.sgml Thu Feb 23 18:51:24 2012(r232059) +++ head/release/doc/en_US.ISO8859-1/hardware/article.sgml Thu Feb 23 18:54:33 2012(r232060) @@ -788,6 +788,8 @@ hwlist.ips; + hwlist.isci; + hwlist.isp; hwlist.mfi; Modified: head/release/doc/share/misc/dev.archlist.txt == --- head/release/doc/share/misc/dev.archlist.txtThu Feb 23 18:51:24 2012(r232059) +++ head/release/doc/share/misc/dev.archlist.txtThu Feb 23 18:54:33 2012(r232060) @@ -80,6 +80,7 @@ ida i386 ie i386 iiri386,ia64,amd64 ipsi386,amd64 +isci i386,amd64 ixgb i386,amd64 kuei386,pc98,ia64,amd64,powerpc lgei386,pc98,amd64 ___ 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: r232061 - head/sys/dev/fb
Author: jkim Date: Thu Feb 23 18:59:32 2012 New Revision: 232061 URL: http://svn.freebsd.org/changeset/base/232061 Log: Fix a typo introduced in r231843. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c == --- head/sys/dev/fb/vesa.c Thu Feb 23 18:54:33 2012(r232060) +++ head/sys/dev/fb/vesa.c Thu Feb 23 18:59:32 2012(r232061) @@ -1481,7 +1481,7 @@ vesa_load_state(video_adapter_t *adp, vo (void)vesa_bios_post(); mode = adp-va_mode; (void)vesa_set_mode(adp, adp-va_initial_mode); - if (mode != adp-va_initial_mode); + if (mode != adp-va_initial_mode) (void)vesa_set_mode(adp, mode); return (vesa_bios_save_restore(STATE_LOAD, ((adp_state_t *)p)-regs)); ___ 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: r232063 - head/sys/dev/fb
Author: jkim Date: Thu Feb 23 19:05:57 2012 New Revision: 232063 URL: http://svn.freebsd.org/changeset/base/232063 Log: Probe supported states for save/restore function. Some VBE implementation refuses to save/restore states if an unsupported bit is set. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c == --- head/sys/dev/fb/vesa.c Thu Feb 23 19:03:22 2012(r232062) +++ head/sys/dev/fb/vesa.c Thu Feb 23 19:05:57 2012(r232063) @@ -80,6 +80,7 @@ typedef struct adp_state adp_state_t; static struct mtx vesa_lock; +static int vesa_state; static void *vesa_state_buf = NULL; static uint32_t vesa_state_buf_offs = 0; static ssize_t vesa_state_buf_size = 0; @@ -205,13 +206,7 @@ static int vesa_bios_load_palette2(int s #define STATE_SIZE 0 #define STATE_SAVE 1 #define STATE_LOAD 2 -#define STATE_HW (10) -#define STATE_DATA (11) -#define STATE_DAC (12) -#define STATE_REG (13) -#define STATE_MOST (STATE_HW | STATE_DATA | STATE_REG) -#define STATE_ALL (STATE_HW | STATE_DATA | STATE_DAC | STATE_REG) -static ssize_t vesa_bios_state_buf_size(void); +static ssize_t vesa_bios_state_buf_size(int); static int vesa_bios_save_restore(int code, void *p); #ifdef MODE_TABLE_BROKEN static int vesa_bios_get_line_length(void); @@ -509,14 +504,14 @@ vesa_bios_load_palette2(int start, int c } static ssize_t -vesa_bios_state_buf_size(void) +vesa_bios_state_buf_size(int state) { x86regs_t regs; x86bios_init_regs(regs); regs.R_AX = 0x4f04; /* regs.R_DL = STATE_SIZE; */ - regs.R_CX = STATE_MOST; + regs.R_CX = state; x86bios_intr(regs, 0x10); @@ -537,7 +532,7 @@ vesa_bios_save_restore(int code, void *p x86bios_init_regs(regs); regs.R_AX = 0x4f04; regs.R_DL = code; - regs.R_CX = STATE_MOST; + regs.R_CX = vesa_state; regs.R_ES = X86BIOS_PHYSTOSEG(vesa_state_buf_offs); regs.R_BX = X86BIOS_PHYSTOOFF(vesa_state_buf_offs); @@ -1041,7 +1036,12 @@ vesa_bios_init(void) x86bios_free(vmbuf, sizeof(*buf)); - vesa_state_buf_size = vesa_bios_state_buf_size(); + /* Probe supported save/restore states. */ + for (i = 0; i 4; i++) + if (vesa_bios_state_buf_size(1 i) 0) + vesa_state |= 1 i; + if (vesa_state != 0) + vesa_state_buf_size = vesa_bios_state_buf_size(vesa_state); vesa_palette = x86bios_alloc(vesa_palette_offs, VESA_PALETTE_SIZE + vesa_state_buf_size, M_WAITOK); if (vesa_state_buf_size 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: r232064 - head/cddl/contrib/opensolaris/cmd/zfs
Author: mm Date: Thu Feb 23 19:13:19 2012 New Revision: 232064 URL: http://svn.freebsd.org/changeset/base/232064 Log: Import illumos changeset 13608 [1]: add support for -t datatype argument to zfs get References: https://www.illumos.org/issues/1936 Update zfs(8) manpage in respect of [1]. Fix typo in zfs(8) manpage. Obtained from:illumos (issue #1936) MFC after:1 week Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 == --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Thu Feb 23 19:05:57 2012 (r232063) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Thu Feb 23 19:13:19 2012 (r232064) @@ -1,5 +1,5 @@ '\ te -.\ Copyright (c) 2011, Martin Matuska m...@freebsd.org. +.\ Copyright (c) 2012, Martin Matuska m...@freebsd.org. .\ All Rights Reserved. .\ .\ The contents of this file are subject to the terms of the @@ -18,8 +18,8 @@ .\ information: Portions Copyright [] [name of copyright owner] .\ .\ Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved. -.\ Copyright 2011 Nexenta Systems, Inc. All rights reserved. .\ Copyright (c) 2011 by Delphix. All rights reserved. +.\ Copyright (c) 2012 Nexenta Systems, Inc. All Rights Reserved. .\ Copyright (c) 2011, Pawel Jakub Dawidek p...@freebsd.org .\ .\ $FreeBSD$ @@ -113,6 +113,7 @@ .Op Fl r Ns | Ns Fl d Ar depth .Op Fl Hp .Op Fl o Ar all | field Ns Op , Ns Ar ... +.Op Fl t Ar type Ns Op , Ns Ar ... .Op Fl s Ar source Ns Op , Ns Ar ... .Ar all | property Ns Op , Ns Ar ... .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot @@ -1753,7 +1754,7 @@ A comma-separated list of types to displ is one of .Sy filesystem , snapshot , volume , No or Sy all . For example, specifying -.Fl o Cm snapshot +.Fl t Cm snapshot displays only snapshots. .It Fl s Ar property A property for sorting the output by column in ascending order based on the @@ -1811,6 +1812,7 @@ section. .Op Fl r Ns | Ns Fl d Ar depth .Op Fl Hp .Op Fl o Ar all | field Ns Op , Ns Ar ... +.Op Fl t Ar type Ns Op , Ns Ar ... .Op Fl s Ar source Ns Op , Ns Ar ... .Ar all | property Ns Op , Ns Ar ... .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot @@ -1871,6 +1873,14 @@ Default values are The keyword .Cm all specifies all columns. +.It Fl t Ar type Ns Op , Ns Ar ... +A comma-separated list of types to display, where +.Ar type +is one of +.Sy filesystem , snapshot , volume , No or Sy all . +For example, specifying +.Fl t Cm snapshot +displays only snapshots. .It Fl s Ar source Ns Op , Ns Ar ... A comma-separated list of sources to display. Those properties coming from a source other than those in this list are ignored. Each source must be one of Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c == --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cThu Feb 23 19:05:57 2012(r232063) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cThu Feb 23 19:13:19 2012(r232064) @@ -227,7 +227,8 @@ get_usage(zfs_help_t idx) snapshot[%snapname][,...]\n)); case HELP_GET: return (gettext(\tget [-rHp] [-d max] - [-o \all\ | field[,...]] [-s source[,...]]\n + [-o \all\ | field[,...]] [-t type[,...]] + [-s source[,...]]\n \t\all\ | property[,...] [filesystem|volume|snapshot] ...\n)); case HELP_INHERIT: @@ -1473,6 +1474,7 @@ zfs_do_get(int argc, char **argv) { zprop_get_cbdata_t cb = { 0 }; int i, c, flags = ZFS_ITER_ARGS_CAN_BE_PATHS; + int types = ZFS_TYPE_DATASET; char *value, *fields; int ret = 0; int limit = 0; @@ -1489,7 +1491,7 @@ zfs_do_get(int argc, char **argv) cb.cb_type = ZFS_TYPE_DATASET; /* check options */ - while ((c = getopt(argc, argv, :d:o:s:rHp)) != -1) { + while ((c = getopt(argc, argv, :d:o:s:rt:Hp)) != -1) { switch (c) { case 'p': cb.cb_literal = B_TRUE; @@ -1607,6 +1609,37 @@ zfs_do_get(int argc, char **argv) } break; + case 't': + types = 0; + flags = ~ZFS_ITER_PROP_LISTSNAPS; + while (*optarg != '\0') { + static char *type_subopts[] = { filesystem, + volume, snapshot, all, NULL }; + + switch (getsubopt(optarg, type_subopts, + value)) { + case 0: + types |= ZFS_TYPE_FILESYSTEM; +
svn commit: r232065 - head/sys/dev/fb
Author: jkim Date: Thu Feb 23 19:16:05 2012 New Revision: 232065 URL: http://svn.freebsd.org/changeset/base/232065 Log: Update my copyright date. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c == --- head/sys/dev/fb/vesa.c Thu Feb 23 19:13:19 2012(r232064) +++ head/sys/dev/fb/vesa.c Thu Feb 23 19:16:05 2012(r232065) @@ -1,6 +1,6 @@ /*- * Copyright (c) 1998 Kazutaka YOKOTA and Michael Smith - * Copyright (c) 2009-2010 Jung-uk Kim j...@freebsd.org + * Copyright (c) 2009-2012 Jung-uk Kim j...@freebsd.org * All rights reserved. * * Redistribution and use in source and binary forms, with or without ___ 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: r232066 - in stable/9: cddl/contrib/opensolaris/lib/libzpool/common/sys sys/amd64/amd64 sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/sys sys/vm
Author: kmacy Date: Thu Feb 23 19:20:36 2012 New Revision: 232066 URL: http://svn.freebsd.org/changeset/base/232066 Log: MFC r230623 exclude kmem_alloc'ed ARC data buffers from kernel minidumps on amd64 excluding other allocations including UMA now entails the addition of a single flag to kmem_alloc or uma zone create Reviewed by: alc,avg Modified: stable/9/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h stable/9/sys/amd64/amd64/minidump_machdep.c stable/9/sys/amd64/amd64/uma_machdep.c stable/9/sys/cddl/compat/opensolaris/sys/kmem.h stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c stable/9/sys/sys/malloc.h stable/9/sys/vm/uma.h stable/9/sys/vm/uma_core.c stable/9/sys/vm/vm_kern.c stable/9/sys/vm/vm_page.c stable/9/sys/vm/vm_page.h Modified: stable/9/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h == --- stable/9/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Thu Feb 23 19:16:05 2012(r232065) +++ stable/9/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Thu Feb 23 19:20:36 2012(r232066) @@ -329,6 +329,7 @@ extern void cv_broadcast(kcondvar_t *cv) #defineKM_SLEEPUMEM_NOFAIL #defineKM_PUSHPAGE KM_SLEEP #defineKM_NOSLEEP UMEM_DEFAULT +#defineKM_NODEBUG 0 #defineKMC_NODEBUG UMC_NODEBUG #defineKMC_NOTOUCH 0 /* not needed for userland caches */ #definekmem_alloc(_s, _f) umem_alloc(_s, _f) Modified: stable/9/sys/amd64/amd64/minidump_machdep.c == --- stable/9/sys/amd64/amd64/minidump_machdep.c Thu Feb 23 19:16:05 2012 (r232065) +++ stable/9/sys/amd64/amd64/minidump_machdep.c Thu Feb 23 19:20:36 2012 (r232066) @@ -41,6 +41,7 @@ __FBSDID($FreeBSD$); #include sys/watchdog.h #endif #include vm/vm.h +#include vm/vm_page.h #include vm/pmap.h #include machine/atomic.h #include machine/elf.h @@ -75,8 +76,11 @@ CTASSERT(sizeof(*vm_page_dump) == 8); static int is_dumpable(vm_paddr_t pa) { + vm_page_t m; int i; + if ((m = vm_phys_paddr_to_vm_page(pa)) != NULL) + return ((m-flags PG_NODUMP) == 0); for (i = 0; dump_avail[i] != 0 || dump_avail[i + 1] != 0; i += 2) { if (pa = dump_avail[i] pa dump_avail[i + 1]) return (1); Modified: stable/9/sys/amd64/amd64/uma_machdep.c == --- stable/9/sys/amd64/amd64/uma_machdep.c Thu Feb 23 19:16:05 2012 (r232065) +++ stable/9/sys/amd64/amd64/uma_machdep.c Thu Feb 23 19:20:36 2012 (r232066) @@ -66,7 +66,8 @@ uma_small_alloc(uma_zone_t zone, int byt break; } pa = m-phys_addr; - dump_add_page(pa); + if ((wait M_NODUMP) == 0) + dump_add_page(pa); va = (void *)PHYS_TO_DMAP(pa); if ((wait M_ZERO) (m-flags PG_ZERO) == 0) pagezero(va); Modified: stable/9/sys/cddl/compat/opensolaris/sys/kmem.h == --- stable/9/sys/cddl/compat/opensolaris/sys/kmem.h Thu Feb 23 19:16:05 2012(r232065) +++ stable/9/sys/cddl/compat/opensolaris/sys/kmem.h Thu Feb 23 19:20:36 2012(r232066) @@ -45,8 +45,10 @@ MALLOC_DECLARE(M_SOLARIS); #defineKM_SLEEPM_WAITOK #defineKM_PUSHPAGE M_WAITOK #defineKM_NOSLEEP M_NOWAIT -#defineKMC_NODEBUG 0 +#defineKM_ZERO M_ZERO +#defineKM_NODEBUG M_NODUMP #defineKMC_NOTOUCH 0 +#defineKMC_NODEBUG UMA_ZONE_NODUMP typedef struct kmem_cache { charkc_name[32]; Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c == --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Thu Feb 23 19:16:05 2012(r232065) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Thu Feb 23 19:20:36 2012(r232066) @@ -121,7 +121,7 @@ zio_init(void) size_t size = (c + 1) SPA_MINBLOCKSHIFT; size_t p2 = size; size_t align = 0; - size_t cflags = (size zio_buf_debug_limit) ? KMC_NODEBUG : 0; + size_t cflags = (size zio_buf_debug_limit) ? (KMC_NODEBUG|KMC_NOTOUCH) : 0; while (p2 (p2 - 1)) p2 = p2 - 1; @@ -242,7 +242,7 @@ zio_data_buf_alloc(size_t size) if (zio_use_uma) return
svn commit: r232067 - stable/9/sys/i386/conf
Author: cperciva Date: Thu Feb 23 19:49:25 2012 New Revision: 232067 URL: http://svn.freebsd.org/changeset/base/232067 Log: MFC 230184, 230185: Add XENHVM config file to i386. Added: stable/9/sys/i386/conf/XENHVM (contents, props changed) - copied, changed from r230184, head/sys/i386/conf/XENHVM Modified: Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Copied and modified: stable/9/sys/i386/conf/XENHVM (from r230184, head/sys/i386/conf/XENHVM) == --- head/sys/i386/conf/XENHVM Mon Jan 16 02:42:16 2012(r230184, copy source) +++ stable/9/sys/i386/conf/XENHVM Thu Feb 23 19:49:25 2012 (r232067) @@ -1,5 +1,5 @@ # -# XENHVM -- Xen HVM kernel configuration file for FreeBSD/amd64 +# XENHVM -- Xen HVM kernel configuration file for FreeBSD/i386 # # $FreeBSD$ # ___ 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: r232068 - in stable/9/sys: dev/xen/xenpci i386/conf
Author: cperciva Date: Thu Feb 23 19:52:33 2012 New Revision: 232068 URL: http://svn.freebsd.org/changeset/base/232068 Log: MFC 230183: Make XENHVM work on i386 by fixing the definition of __ffs. Modified: stable/9/sys/dev/xen/xenpci/evtchn.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/sys/dev/xen/xenpci/evtchn.c == --- stable/9/sys/dev/xen/xenpci/evtchn.cThu Feb 23 19:49:25 2012 (r232067) +++ stable/9/sys/dev/xen/xenpci/evtchn.cThu Feb 23 19:52:33 2012 (r232068) @@ -52,7 +52,7 @@ __FBSDID($FreeBSD$); #include dev/xen/xenpci/xenpcivar.h #if defined(__i386__) -#define__ffs(word) ffs(word) +#define__ffs(word) (ffs(word) - 1) #elif defined(__amd64__) static inline unsigned long __ffs(unsigned long word) { ___ 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: r232054 - in head/sys: net netinet netinet6
On 23. Feb 2012, at 18:21 , Kip Macy wrote: Author: kmacy Date: Thu Feb 23 18:21:37 2012 New Revision: 232054 URL: http://svn.freebsd.org/changeset/base/232054 Log: When using flowtable llentrys can outlive the interface with which they're associated at which the lle_tbl pointer points to freed memory and the llt_free pointer is no longer valid. Move the free pointer in to the llentry itself and update the initalization sites. MFC after: 2 weeks Please note that you cannot remove llt_free when MFCing; it's used in modules through the previous version of the macro. Modified: head/sys/net/if_llatbl.h head/sys/netinet/in.c head/sys/netinet6/in6.c -- Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! ___ 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: r232069 - head/sys/dev/fb
Author: jkim Date: Thu Feb 23 20:54:22 2012 New Revision: 232069 URL: http://svn.freebsd.org/changeset/base/232069 Log: If the VBE implementation does not support save/restore function, defer to VGA methods. Unconditionally reset the VESA adapter before restoring state. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c == --- head/sys/dev/fb/vesa.c Thu Feb 23 19:52:33 2012(r232068) +++ head/sys/dev/fb/vesa.c Thu Feb 23 20:54:22 2012(r232069) @@ -1451,15 +1451,13 @@ static int vesa_save_state(video_adapter_t *adp, void *p, size_t size) { - if (adp != vesa_adp) + if (adp != vesa_adp || vesa_state_buf_size == 0) return ((*prevvidsw-save_state)(adp, p, size)); - if (vesa_state_buf_size == 0) - return (1); if (size == 0) return (offsetof(adp_state_t, regs) + vesa_state_buf_size); if (size (offsetof(adp_state_t, regs) + vesa_state_buf_size)) - return (1); + return (EINVAL); ((adp_state_t *)p)-sig = V_STATE_SIG; bzero(((adp_state_t *)p)-regs, vesa_state_buf_size); @@ -1471,12 +1469,9 @@ vesa_load_state(video_adapter_t *adp, vo { int mode; - if ((adp != vesa_adp) || (((adp_state_t *)p)-sig != V_STATE_SIG)) + if (adp != vesa_adp) return ((*prevvidsw-load_state)(adp, p)); - if (vesa_state_buf_size == 0) - return (1); - /* Try BIOS POST to restore a sane state. */ (void)vesa_bios_post(); mode = adp-va_mode; @@ -1484,6 +1479,8 @@ vesa_load_state(video_adapter_t *adp, vo if (mode != adp-va_initial_mode) (void)vesa_set_mode(adp, mode); + if (((adp_state_t *)p)-sig != V_STATE_SIG) + return ((*prevvidsw-load_state)(adp, p)); return (vesa_bios_save_restore(STATE_LOAD, ((adp_state_t *)p)-regs)); } ___ 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: r232070 - head/sys/net
Author: thompsa Date: Thu Feb 23 20:58:52 2012 New Revision: 232070 URL: http://svn.freebsd.org/changeset/base/232070 Log: Indicate this function decrements the timer as well as testing for expiry. Modified: head/sys/net/bridgestp.c Modified: head/sys/net/bridgestp.c == --- head/sys/net/bridgestp.cThu Feb 23 20:54:22 2012(r232069) +++ head/sys/net/bridgestp.cThu Feb 23 20:58:52 2012(r232070) @@ -134,7 +134,7 @@ static void bstp_tick(void *); static voidbstp_timer_start(struct bstp_timer *, uint16_t); static voidbstp_timer_stop(struct bstp_timer *); static voidbstp_timer_latch(struct bstp_timer *); -static int bstp_timer_expired(struct bstp_timer *); +static int bstp_timer_dectest(struct bstp_timer *); static voidbstp_hello_timer_expiry(struct bstp_state *, struct bstp_port *); static voidbstp_message_age_expiry(struct bstp_state *, @@ -1862,7 +1862,7 @@ bstp_tick(void *arg) CURVNET_SET(bs-bs_vnet); /* poll link events on interfaces that do not support linkstate */ - if (bstp_timer_expired(bs-bs_link_timer)) { + if (bstp_timer_dectest(bs-bs_link_timer)) { LIST_FOREACH(bp, bs-bs_bplist, bp_next) { if (!(bp-bp_ifp-if_capabilities IFCAP_LINKSTATE)) bstp_ifupdstatus(bs, bp); @@ -1872,21 +1872,21 @@ bstp_tick(void *arg) LIST_FOREACH(bp, bs-bs_bplist, bp_next) { /* no events need to happen for these */ - bstp_timer_expired(bp-bp_tc_timer); - bstp_timer_expired(bp-bp_recent_root_timer); - bstp_timer_expired(bp-bp_forward_delay_timer); - bstp_timer_expired(bp-bp_recent_backup_timer); + bstp_timer_dectest(bp-bp_tc_timer); + bstp_timer_dectest(bp-bp_recent_root_timer); + bstp_timer_dectest(bp-bp_forward_delay_timer); + bstp_timer_dectest(bp-bp_recent_backup_timer); - if (bstp_timer_expired(bp-bp_hello_timer)) + if (bstp_timer_dectest(bp-bp_hello_timer)) bstp_hello_timer_expiry(bs, bp); - if (bstp_timer_expired(bp-bp_message_age_timer)) + if (bstp_timer_dectest(bp-bp_message_age_timer)) bstp_message_age_expiry(bs, bp); - if (bstp_timer_expired(bp-bp_migrate_delay_timer)) + if (bstp_timer_dectest(bp-bp_migrate_delay_timer)) bstp_migrate_delay_expiry(bs, bp); - if (bstp_timer_expired(bp-bp_edge_delay_timer)) + if (bstp_timer_dectest(bp-bp_edge_delay_timer)) bstp_edge_delay_expiry(bs, bp); /* update the various state machines for the port */ @@ -1925,7 +1925,7 @@ bstp_timer_latch(struct bstp_timer *t) } static int -bstp_timer_expired(struct bstp_timer *t) +bstp_timer_dectest(struct bstp_timer *t) { if (t-active == 0 || t-latched) return (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: r232071 - head/sys/vm
Author: kib Date: Thu Feb 23 21:07:16 2012 New Revision: 232071 URL: http://svn.freebsd.org/changeset/base/232071 Log: Account the writeable shared mappings backed by file in the vnode v_writecount. Keep the amount of the virtual address space used by the mappings in the new vm_object un_pager.vnp.writemappings counter. The vnode v_writecount is incremented when writemappings gets non-zero value, and decremented when writemappings is returned to zero. Writeable shared vnode-backed mappings are accounted for in vm_mmap(), and vm_map_insert() is instructed to set MAP_ENTRY_VN_WRITECNT flag on the created map entry. During deferred map entry deallocation, vm_map_process_deferred() checks for MAP_ENTRY_VN_WRITECOUNT and decrements writemappings for the vm object. Now, the writeable mount cannot be demoted to read-only while writeable shared mappings of the vnodes from the mount point exist. Also, execve(2) fails for such files with ETXTBUSY, as it should be. Noted by: tegge Reviewed by: tegge (long time ago, early version), alc Tested by:pho MFC after:3 weeks Modified: head/sys/vm/vm_map.c head/sys/vm/vm_map.h head/sys/vm/vm_mmap.c head/sys/vm/vm_object.h head/sys/vm/vnode_pager.c head/sys/vm/vnode_pager.h Modified: head/sys/vm/vm_map.c == --- head/sys/vm/vm_map.cThu Feb 23 20:58:52 2012(r232070) +++ head/sys/vm/vm_map.cThu Feb 23 21:07:16 2012(r232071) @@ -91,6 +91,7 @@ __FBSDID($FreeBSD$); #include vm/vm_pager.h #include vm/vm_kern.h #include vm/vm_extern.h +#include vm/vnode_pager.h #include vm/swap_pager.h #include vm/uma.h @@ -475,11 +476,23 @@ vm_map_process_deferred(void) { struct thread *td; vm_map_entry_t entry; + vm_object_t object; td = curthread; - while ((entry = td-td_map_def_user) != NULL) { td-td_map_def_user = entry-next; + if ((entry-eflags MAP_ENTRY_VN_WRITECNT) != 0) { + /* +* Decrement the object's writemappings and +* possibly the vnode's v_writecount. +*/ + KASSERT((entry-eflags MAP_ENTRY_IS_SUB_MAP) == 0, + (Submap with writecount)); + object = entry-object.vm_object; + KASSERT(object != NULL, (No object for writecount)); + vnode_pager_release_writecount(object, entry-start, + entry-end); + } vm_map_entry_deallocate(entry, FALSE); } } @@ -1174,6 +1187,8 @@ vm_map_insert(vm_map_t map, vm_object_t protoeflags |= MAP_ENTRY_NOSYNC; if (cow MAP_DISABLE_COREDUMP) protoeflags |= MAP_ENTRY_NOCOREDUMP; + if (cow MAP_VN_WRITECOUNT) + protoeflags |= MAP_ENTRY_VN_WRITECNT; if (cow MAP_INHERIT_SHARE) inheritance = VM_INHERIT_SHARE; else @@ -1516,6 +1531,11 @@ vm_map_simplify_entry(vm_map_t map, vm_m * references. Thus, the map lock can be kept * without causing a lock-order reversal with * the vnode lock. +* +* Since we count the number of virtual page +* mappings in object-un_pager.vnp.writemappings, +* the writemappings value should not be adjusted +* when the entry is disposed of. */ if (prev-object.vm_object) vm_object_deallocate(prev-object.vm_object); @@ -1627,6 +1647,13 @@ _vm_map_clip_start(vm_map_t map, vm_map_ if ((entry-eflags MAP_ENTRY_IS_SUB_MAP) == 0) { vm_object_reference(new_entry-object.vm_object); + /* +* The object-un_pager.vnp.writemappings for the +* object of MAP_ENTRY_VN_WRITECNT type entry shall be +* kept as is here. The virtual pages are +* re-distributed among the clipped entries, so the sum is +* left the same. +*/ } } @@ -2900,6 +2927,7 @@ vm_map_copy_entry( vm_ooffset_t *fork_charge) { vm_object_t src_object; + vm_map_entry_t fake_entry; vm_offset_t size; struct ucred *cred; int charged; @@ -2965,6 +2993,27 @@ vm_map_copy_entry( src_entry-eflags |= (MAP_ENTRY_COW|MAP_ENTRY_NEEDS_COPY); dst_entry-eflags |= (MAP_ENTRY_COW|MAP_ENTRY_NEEDS_COPY); dst_entry-offset = src_entry-offset; + if (src_entry-eflags MAP_ENTRY_VN_WRITECNT) { + /* +
svn commit: r232072 - head/usr.bin/kdump
Author: jhb Date: Thu Feb 23 21:08:21 2012 New Revision: 232072 URL: http://svn.freebsd.org/changeset/base/232072 Log: Pretty-print the advice constants passed to posix_fadvise(2). MFC after:2 weeks Modified: head/usr.bin/kdump/kdump.c head/usr.bin/kdump/mksubr Modified: head/usr.bin/kdump/kdump.c == --- head/usr.bin/kdump/kdump.c Thu Feb 23 21:07:16 2012(r232071) +++ head/usr.bin/kdump/kdump.c Thu Feb 23 21:08:21 2012(r232072) @@ -1014,6 +1014,15 @@ ktrsyscall(struct ktr_syscall *ktr, u_in } capname(arg); break; + case SYS_posix_fadvise: + print_number(ip,narg,c); + print_number(ip,narg,c); + print_number(ip,narg,c); + (void)putchar(','); + fadvisebehavname((int)*ip); + ip++; + narg--; + break; } } while (narg 0) { Modified: head/usr.bin/kdump/mksubr == --- head/usr.bin/kdump/mksubr Thu Feb 23 21:07:16 2012(r232071) +++ head/usr.bin/kdump/mksubr Thu Feb 23 21:08:21 2012(r232072) @@ -340,6 +340,7 @@ auto_or_type accessmodename auto_switch_type acltypename ACL_TYPE_[A-Z4_]+[[:space:]]+0x[0-9]+ sys/acl.h auto_or_type capname CAP_[A-Z]+[[:space:]]+0x[01248]{16}ULL sys/capability.h auto_switch_type extattrctlname EXTATTR_NAMESPACE_[A-Z]+[[:space:]]+0x[0-9]+ sys/extattr.h +auto_switch_type fadvisebehavnamePOSIX_FADV_[A-Z]+[[:space:]]+[0-9]+ sys/fcntl.h auto_or_type flagsname O_[A-Z]+[[:space:]]+0x[0-9A-Fa-f]+ sys/fcntl.h auto_or_type flockname LOCK_[A-Z]+[[:space:]]+0x[0-9]+ sys/fcntl.h auto_or_type getfsstatflagsname MNT_[A-Z]+[[:space:]]+[1-9][0-9]* sys/mount.h ___ 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: r232073 - head/sys/conf
Author: dim Date: Thu Feb 23 21:32:32 2012 New Revision: 232073 URL: http://svn.freebsd.org/changeset/base/232073 Log: Revert r231978, so I can apply a more proper fix to silence unneeded internal declaration warnings in several sys/cam/ctl files. MFC after:1 week Modified: head/sys/conf/files head/sys/conf/kern.mk Modified: head/sys/conf/files == --- head/sys/conf/files Thu Feb 23 21:08:21 2012(r232072) +++ head/sys/conf/files Thu Feb 23 21:32:32 2012(r232073) @@ -116,21 +116,16 @@ cam/scsi/scsi_cd.coptional cd cam/scsi/scsi_ch.c optional ch cam/ata/ata_da.c optional ada | da cam/ctl/ctl.c optional ctl -cam/ctl/ctl_backend.c optional ctl \ - compile-with ${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL} +cam/ctl/ctl_backend.c optional ctl cam/ctl/ctl_backend_block.coptional ctl cam/ctl/ctl_backend_ramdisk.c optional ctl -cam/ctl/ctl_cmd_table.coptional ctl \ - compile-with ${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL} -cam/ctl/ctl_frontend.c optional ctl \ - compile-with ${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL} +cam/ctl/ctl_cmd_table.coptional ctl +cam/ctl/ctl_frontend.c optional ctl cam/ctl/ctl_frontend_cam_sim.c optional ctl -cam/ctl/ctl_frontend_internal.coptional ctl \ - compile-with ${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL} +cam/ctl/ctl_frontend_internal.coptional ctl cam/ctl/ctl_mem_pool.c optional ctl cam/ctl/ctl_scsi_all.c optional ctl -cam/ctl/ctl_error.coptional ctl \ - compile-with ${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL} +cam/ctl/ctl_error.coptional ctl cam/ctl/ctl_util.c optional ctl cam/ctl/scsi_ctl.c optional ctl cam/scsi/scsi_da.c optional da Modified: head/sys/conf/kern.mk == --- head/sys/conf/kern.mk Thu Feb 23 21:08:21 2012(r232072) +++ head/sys/conf/kern.mk Thu Feb 23 21:32:32 2012(r232073) @@ -22,7 +22,6 @@ NO_WSHIFT_COUNT_NEGATIVE= -Wno-shift-cou NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-count-overflow NO_WUNUSED_VALUE= -Wno-unused-value NO_WSELF_ASSIGN= -Wno-self-assign -NO_WUNNEEDED_INTERNAL_DECL=-Wno-unneeded-internal-declaration NO_WFORMAT_SECURITY= -Wno-format-security # Several other warnings which might be useful in some cases, but not severe # enough to error out the whole kernel build. Display them anyway, so there is ___ 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: r232074 - head/sys/cam/ctl
Author: dim Date: Thu Feb 23 21:34:14 2012 New Revision: 232074 URL: http://svn.freebsd.org/changeset/base/232074 Log: Use a better way to silence unneeded internal declaration warnings in several sys/cam/ctl files. Suggested by: ed Reviewed by: ken MFC after:1 week Modified: head/sys/cam/ctl/ctl_private.h Modified: head/sys/cam/ctl/ctl_private.h == --- head/sys/cam/ctl/ctl_private.h Thu Feb 23 21:32:32 2012 (r232073) +++ head/sys/cam/ctl/ctl_private.h Thu Feb 23 21:34:14 2012 (r232074) @@ -297,7 +297,7 @@ struct ctl_page_index { #defineCTL_PAGE_DEFAULT0x02 #defineCTL_PAGE_SAVED 0x03 -static struct ctl_page_index page_index_template[] = { +static const struct ctl_page_index page_index_template[] = { {SMS_FORMAT_DEVICE_PAGE, 0, sizeof(struct scsi_format_page), NULL, CTL_PAGE_FLAG_DISK_ONLY, NULL, NULL}, {SMS_RIGID_DISK_PAGE, 0, sizeof(struct scsi_rigid_disk_page), NULL, ___ 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: r232075 - stable/9/sys/amd64/acpica
Author: jkim Date: Thu Feb 23 21:42:41 2012 New Revision: 232075 URL: http://svn.freebsd.org/changeset/base/232075 Log: MFC: r230777 Naturally align a newly added wakeup_fpusave. Modified: stable/9/sys/amd64/acpica/acpi_wakecode.S Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/acpica/acpi_wakecode.S == --- stable/9/sys/amd64/acpica/acpi_wakecode.S Thu Feb 23 21:34:14 2012 (r232074) +++ stable/9/sys/amd64/acpica/acpi_wakecode.S Thu Feb 23 21:42:41 2012 (r232075) @@ -267,11 +267,11 @@ wakeup_ctx: .quad 0 wakeup_pcb: .quad 0 +wakeup_fpusave: + .quad 0 wakeup_gdt: .word 0 .quad 0 -wakeup_fpusave: - .quad 0 ALIGN_DATA wakeup_efer: ___ 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: r232076 - stable/9/sys/amd64/acpica
Author: jkim Date: Thu Feb 23 21:44:44 2012 New Revision: 232076 URL: http://svn.freebsd.org/changeset/base/232076 Log: MFC: r230830 Restore XCR0 before restoring extended FPU states. Modified: stable/9/sys/amd64/acpica/acpi_switch.S stable/9/sys/amd64/acpica/acpi_wakecode.S stable/9/sys/amd64/acpica/acpi_wakeup.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/acpica/acpi_switch.S == --- stable/9/sys/amd64/acpica/acpi_switch.S Thu Feb 23 21:42:41 2012 (r232075) +++ stable/9/sys/amd64/acpica/acpi_switch.S Thu Feb 23 21:44:44 2012 (r232076) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001 Takanori Watanabe takaw...@jp.freebsd.org * Copyright (c) 2001 Mitsuru IWASAKI iwas...@jp.freebsd.org - * Copyright (c) 2008-2010 Jung-uk Kim j...@freebsd.org + * Copyright (c) 2008-2012 Jung-uk Kim j...@freebsd.org * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -95,7 +95,6 @@ ENTRY(acpi_restorecpu) /* Restore CR0 except for FPU mode. */ movqPCB_CR0(%rdi), %rax - movq%rax, %rcx andq$~(CR0_EM | CR0_TS), %rax movq%rax, %cr0 @@ -146,21 +145,26 @@ ENTRY(acpi_restorecpu) /* Restore FPU state. */ fninit - movqWAKEUP_CTX(fpusave),%rdi - cmpl$0,use_xsave - jne 1f - fxrstor (%rdi) + movqWAKEUP_CTX(xsmask), %rax + testq %rax, %rax + jz 1f + movq%rax, %rdx + shrq$32, %rdx + movl$XCR0, %ecx +/* xsetbv */ + .byte 0x0f, 0x01, 0xd1 + movqWAKEUP_CTX(fpusave), %rcx +/* xrstor (%rcx) */ + .byte 0x0f, 0xae, 0x29 jmp 2f -1: movlxsave_mask,%eax - movlxsave_mask+4,%edx -/* xrstor (%rdi) */ - .byte 0x0f,0xae,0x2f +1: + movqWAKEUP_CTX(fpusave), %rcx + fxrstor (%rcx) 2: /* Reload CR0. */ - movq%rcx, %cr0 - - movqWAKEUP_CTX(pcb),%rdi + movqPCB_CR0(%rdi), %rax + movq%rax, %cr0 /* Restore return address. */ movqPCB_RIP(%rdi), %rax Modified: stable/9/sys/amd64/acpica/acpi_wakecode.S == --- stable/9/sys/amd64/acpica/acpi_wakecode.S Thu Feb 23 21:42:41 2012 (r232075) +++ stable/9/sys/amd64/acpica/acpi_wakecode.S Thu Feb 23 21:44:44 2012 (r232076) @@ -2,7 +2,7 @@ * Copyright (c) 2001 Takanori Watanabe takaw...@jp.freebsd.org * Copyright (c) 2001 Mitsuru IWASAKI iwas...@jp.freebsd.org * Copyright (c) 2003 Peter Wemm - * Copyright (c) 2008-2010 Jung-uk Kim j...@freebsd.org + * Copyright (c) 2008-2012 Jung-uk Kim j...@freebsd.org * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -284,6 +284,8 @@ wakeup_cstar: .quad 0 wakeup_sfmask: .quad 0 +wakeup_xsmask: + .quad 0 wakeup_cpu: .long 0 dummy: Modified: stable/9/sys/amd64/acpica/acpi_wakeup.c == --- stable/9/sys/amd64/acpica/acpi_wakeup.c Thu Feb 23 21:42:41 2012 (r232075) +++ stable/9/sys/amd64/acpica/acpi_wakeup.c Thu Feb 23 21:44:44 2012 (r232076) @@ -2,7 +2,7 @@ * Copyright (c) 2001 Takanori Watanabe takaw...@jp.freebsd.org * Copyright (c) 2001 Mitsuru IWASAKI iwas...@jp.freebsd.org * Copyright (c) 2003 Peter Wemm - * Copyright (c) 2008-2010 Jung-uk Kim j...@freebsd.org + * Copyright (c) 2008-2012 Jung-uk Kim j...@freebsd.org * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -386,6 +386,7 @@ acpi_install_wakeup_handler(struct acpi_ WAKECODE_FIXUP(wakeup_lstar, uint64_t, rdmsr(MSR_LSTAR)); WAKECODE_FIXUP(wakeup_cstar, uint64_t, rdmsr(MSR_CSTAR)); WAKECODE_FIXUP(wakeup_sfmask, uint64_t, rdmsr(MSR_SF_MASK)); + WAKECODE_FIXUP(wakeup_xsmask, uint64_t, xsave_mask); /* Build temporary page tables below realmode code. */ pt4 = wakeaddr; ___ 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: r232077 - stable/9/sys/amd64/acpica
Author: jkim Date: Thu Feb 23 21:48:39 2012 New Revision: 232077 URL: http://svn.freebsd.org/changeset/base/232077 Log: MFC: r230957 Fix a function prototype to reflect reality. Modified: stable/9/sys/amd64/acpica/acpi_wakeup.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/acpica/acpi_wakeup.c == --- stable/9/sys/amd64/acpica/acpi_wakeup.c Thu Feb 23 21:44:44 2012 (r232076) +++ stable/9/sys/amd64/acpica/acpi_wakeup.c Thu Feb 23 21:48:39 2012 (r232077) @@ -74,7 +74,7 @@ static struct pcb **susppcbs; static void**suspfpusave; #endif -intacpi_restorecpu(vm_offset_t, struct pcb *); +intacpi_restorecpu(uint64_t, vm_offset_t); static void*acpi_alloc_wakeup_handler(void); static voidacpi_stop_beep(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: r232078 - stable/9/sys/amd64/acpica
Author: jkim Date: Thu Feb 23 21:50:13 2012 New Revision: 232078 URL: http://svn.freebsd.org/changeset/base/232078 Log: MFC: r230958 Restore callee saved registers later and micro-optimize. Modified: stable/9/sys/amd64/acpica/acpi_switch.S Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/acpica/acpi_switch.S == --- stable/9/sys/amd64/acpica/acpi_switch.S Thu Feb 23 21:48:39 2012 (r232077) +++ stable/9/sys/amd64/acpica/acpi_switch.S Thu Feb 23 21:50:13 2012 (r232078) @@ -120,15 +120,6 @@ ENTRY(acpi_restorecpu) #undef SDT_SYSTSS #undef SDT_SYSBSY - /* Restore other callee saved registers. */ - movqPCB_R15(%rdi), %r15 - movqPCB_R14(%rdi), %r14 - movqPCB_R13(%rdi), %r13 - movqPCB_R12(%rdi), %r12 - movqPCB_RBP(%rdi), %rbp - movqPCB_RSP(%rdi), %rsp - movqPCB_RBX(%rdi), %rbx - /* Restore debug registers. */ movqPCB_DR0(%rdi), %rax movq%rax, %dr0 @@ -145,6 +136,7 @@ ENTRY(acpi_restorecpu) /* Restore FPU state. */ fninit + movqWAKEUP_CTX(fpusave), %rbx movqWAKEUP_CTX(xsmask), %rax testq %rax, %rax jz 1f @@ -153,19 +145,26 @@ ENTRY(acpi_restorecpu) movl$XCR0, %ecx /* xsetbv */ .byte 0x0f, 0x01, 0xd1 - movqWAKEUP_CTX(fpusave), %rcx -/* xrstor (%rcx) */ - .byte 0x0f, 0xae, 0x29 +/* xrstor (%rbx) */ + .byte 0x0f, 0xae, 0x2b jmp 2f 1: - movqWAKEUP_CTX(fpusave), %rcx - fxrstor (%rcx) + fxrstor (%rbx) 2: /* Reload CR0. */ movqPCB_CR0(%rdi), %rax movq%rax, %cr0 + /* Restore other callee saved registers. */ + movqPCB_R15(%rdi), %r15 + movqPCB_R14(%rdi), %r14 + movqPCB_R13(%rdi), %r13 + movqPCB_R12(%rdi), %r12 + movqPCB_RBP(%rdi), %rbp + movqPCB_RSP(%rdi), %rsp + movqPCB_RBX(%rdi), %rbx + /* Restore return address. */ movqPCB_RIP(%rdi), %rax movq%rax, (%rsp) ___ 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: r232079 - stable/9/sys/amd64/amd64
Author: jkim Date: Thu Feb 23 21:54:04 2012 New Revision: 232079 URL: http://svn.freebsd.org/changeset/base/232079 Log: MFC: r231169 Do not EOI local APIC too early when suspending APs. Just do doreti instead of taking a shortcut. Modified: stable/9/sys/amd64/amd64/apic_vector.S Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/apic_vector.S == --- stable/9/sys/amd64/amd64/apic_vector.S Thu Feb 23 21:50:13 2012 (r232078) +++ stable/9/sys/amd64/amd64/apic_vector.S Thu Feb 23 21:54:04 2012 (r232079) @@ -300,13 +300,10 @@ IDTVEC(cpustop) IDTVEC(cpususpend) PUSH_FRAME + callcpususpend_handler movqlapic, %rax movl$0, LA_EOI(%rax)/* End Of Interrupt to APIC */ - - callcpususpend_handler - - POP_FRAME - jmp doreti_iret + jmp doreti /* * Executed by a CPU when it receives a RENDEZVOUS IPI from another CPU. ___ 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: r232080 - in head: share/man/man4 sys/net
Author: thompsa Date: Thu Feb 23 21:56:53 2012 New Revision: 232080 URL: http://svn.freebsd.org/changeset/base/232080 Log: Add a sysctl/tunable default value for the use_flowid sysctl in r232008. Modified: head/share/man/man4/lagg.4 head/sys/net/if_lagg.c Modified: head/share/man/man4/lagg.4 == --- head/share/man/man4/lagg.4 Thu Feb 23 21:54:04 2012(r232079) +++ head/share/man/man4/lagg.4 Thu Feb 23 21:56:53 2012(r232080) @@ -142,10 +142,12 @@ and modes will use the RSS hash from the network card if available to avoid computing one, this may give poor traffic distribution if the hash is invalid or uses less of the protocol header information. -Local hash computation can be forced by setting the +Local hash computation can be forced per interface by setting the .Va net.link.lagg.X.use_flowid .Xr sysctl 8 -variable to zero where X is the interface number. +variable to zero where X is the interface number, the default for +new interfaces is set via +.Va net.link.lagg.default_use_flowid . .Sh EXAMPLES Create a 802.3ad link aggregation using LACP with two .Xr bge 4 Modified: head/sys/net/if_lagg.c == --- head/sys/net/if_lagg.c Thu Feb 23 21:54:04 2012(r232079) +++ head/sys/net/if_lagg.c Thu Feb 23 21:56:53 2012(r232080) @@ -172,6 +172,11 @@ static int lagg_failover_rx_all = 0; /* SYSCTL_INT(_net_link_lagg, OID_AUTO, failover_rx_all, CTLFLAG_RW, lagg_failover_rx_all, 0, Accept input from any interface in a failover lagg); +static int def_use_flowid = 1; /* Default value for using M_FLOWID */ +TUNABLE_INT(net.link.lagg.default_use_flowid, def_use_flowid); +SYSCTL_INT(_net_link_lagg, OID_AUTO, default_use_flowid, CTLFLAG_RW, +def_use_flowid, 0, +Default setting for using flow id for load sharing); static int lagg_modevent(module_t mod, int type, void *data) @@ -274,7 +279,7 @@ lagg_clone_create(struct if_clone *ifc, sysctl_ctx_init(sc-ctx); snprintf(num, sizeof(num), %u, unit); - sc-use_flowid = 1; + sc-use_flowid = def_use_flowid; oid = SYSCTL_ADD_NODE(sc-ctx, SYSCTL_NODE_CHILDREN(_net_link, lagg), OID_AUTO, num, CTLFLAG_RD, NULL, ); SYSCTL_ADD_INT(sc-ctx, SYSCTL_CHILDREN(oid), OID_AUTO, ___ 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: r232081 - stable/9/sys/amd64/acpica
Author: jkim Date: Thu Feb 23 22:00:31 2012 New Revision: 232081 URL: http://svn.freebsd.org/changeset/base/232081 Log: MFC: r231787 Make ACPI resume beeper less cryptic. Set PIC timer2 mode properly. Modified: stable/9/sys/amd64/acpica/acpi_wakecode.S Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/acpica/acpi_wakecode.S == --- stable/9/sys/amd64/acpica/acpi_wakecode.S Thu Feb 23 21:56:53 2012 (r232080) +++ stable/9/sys/amd64/acpica/acpi_wakecode.S Thu Feb 23 22:00:31 2012 (r232081) @@ -30,7 +30,9 @@ */ #include machine/asmacros.h +#include machine/ppireg.h #include machine/specialreg.h +#include machine/timerreg.h #include assym.s @@ -71,13 +73,21 @@ wakeup_start: testb $~0, resume_beep - wakeup_start jz 1f movb$0, resume_beep - wakeup_start - movb$0xc0, %al - outb%al, $0x42 - movb$0x04, %al - outb%al, $0x42 - inb $0x61, %al - orb $0x3, %al - outb%al, $0x61 + + /* Set PIC timer2 to beep. */ + movb$(TIMER_SEL2 | TIMER_SQWAVE | TIMER_16BIT), %al + outb%al, $TIMER_MODE + + /* Turn on speaker. */ + inb $IO_PPI, %al + orb $PIT_SPKR, %al + outb%al, $IO_PPI + + /* Set frequency. */ + movw$0x4c0, %ax + outb%al, $TIMER_CNTR2 + shrw$8, %ax + outb%al, $TIMER_CNTR2 1: /* Re-initialize video BIOS if the reset_video tunable is set. */ ___ 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: r232082 - stable/9/sys/amd64/acpica
Author: jkim Date: Thu Feb 23 22:03:20 2012 New Revision: 232082 URL: http://svn.freebsd.org/changeset/base/232082 Log: MFC: r231791, r231840 Set up an event handler to turn off speaker if user requested it. Speaker will stop beeping after all device drivers are resumed. Use proper API to acquire and release PIC timer2 for consistency and correctness. Modified: stable/9/sys/amd64/acpica/acpi_wakeup.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/acpica/acpi_wakeup.c == --- stable/9/sys/amd64/acpica/acpi_wakeup.c Thu Feb 23 22:00:31 2012 (r232081) +++ stable/9/sys/amd64/acpica/acpi_wakeup.c Thu Feb 23 22:03:20 2012 (r232082) @@ -32,6 +32,7 @@ __FBSDID($FreeBSD$); #include sys/param.h #include sys/bus.h +#include sys/eventhandler.h #include sys/kernel.h #include sys/malloc.h #include sys/memrange.h @@ -40,6 +41,7 @@ __FBSDID($FreeBSD$); #include vm/vm.h #include vm/pmap.h +#include machine/clock.h #include machine/intr_machdep.h #include x86/mca.h #include machine/pcb.h @@ -92,11 +94,12 @@ static void acpi_wakeup_cpus(struct acp *addr = val;\ } while (0) -/* Turn off bits 12 of the PIT, stopping the beep. */ static void acpi_stop_beep(void *arg) { - outb(0x61, inb(0x61) ~0x3); + + if (acpi_resume_beep != 0) + timer_spkr_release(); } #ifdef SMP @@ -234,6 +237,9 @@ acpi_sleep_machdep(struct acpi_softc *sc CPU_CLR(PCPU_GET(cpuid), wakeup_cpus); #endif + if (acpi_resume_beep != 0) + timer_spkr_acquire(); + AcpiSetFirmwareWakingVector(WAKECODE_PADDR(sc)); rf = intr_disable(); @@ -312,10 +318,6 @@ out: mem_range_softc.mr_op-reinit != NULL) mem_range_softc.mr_op-reinit(mem_range_softc); - /* If we beeped, turn it off after a delay. */ - if (acpi_resume_beep) - timeout(acpi_stop_beep, NULL, 3 * hz); - return (ret); } @@ -338,6 +340,12 @@ acpi_alloc_wakeup_handler(void) printf(%s: can't alloc wake memory\n, __func__); return (NULL); } + if (EVENTHANDLER_REGISTER(power_resume, acpi_stop_beep, NULL, + EVENTHANDLER_PRI_LAST) == NULL) { + printf(%s: can't register event handler\n, __func__); + contigfree(wakeaddr, 4 * PAGE_SIZE, M_DEVBUF); + return (NULL); + } susppcbs = malloc(mp_ncpus * sizeof(*susppcbs), M_DEVBUF, M_WAITOK); suspfpusave = malloc(mp_ncpus * sizeof(void *), M_DEVBUF, M_WAITOK); for (i = 0; i mp_ncpus; i++) { ___ 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: r232083 - in stable/9: etc sys/dev/acpica
Author: jkim Date: Thu Feb 23 22:10:49 2012 New Revision: 232083 URL: http://svn.freebsd.org/changeset/base/232083 Log: MFC: r231226, r231295 Revert r211288 and move the logic to the acpi_timer itself. Modified: stable/9/etc/rc.resume stable/9/etc/rc.suspend stable/9/sys/dev/acpica/acpi_timer.c Directory Properties: stable/9/etc/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/etc/rc.resume == --- stable/9/etc/rc.resume Thu Feb 23 22:03:20 2012(r232082) +++ stable/9/etc/rc.resume Thu Feb 23 22:10:49 2012(r232083) @@ -43,12 +43,6 @@ if [ -r /var/run/rc.suspend.pid ]; then echo 'rc.resume: killed rc.suspend that was still around' fi -if [ -r /var/run/rc.suspend.tch ]; then - _t=`cat /var/run/rc.suspend.tch` - /sbin/sysctl -n kern.timecounter.hardware=$_t /dev/null 21 - /bin/rm -f /var/run/rc.suspend.tch -fi - # Turns on a power supply of a card in the slot inactivated. # See also contrib/pccardq.c (only for PAO users). # pccardq | awk -F '~' '$5 == inactive \ Modified: stable/9/etc/rc.suspend == --- stable/9/etc/rc.suspend Thu Feb 23 22:03:20 2012(r232082) +++ stable/9/etc/rc.suspend Thu Feb 23 22:10:49 2012(r232083) @@ -43,18 +43,6 @@ fi echo $$ 2 /dev/null /var/run/rc.suspend.pid -_t=`/sbin/sysctl -n kern.timecounter.hardware 2 /dev/null` -case ${_t#ACPI-} in -fast|safe) - /bin/rm -f /var/run/rc.suspend.tch - ;; -*) - { /sbin/sysctl -n kern.timecounter.hardware=ACPI-fast || \ - /sbin/sysctl -n kern.timecounter.hardware=ACPI-safe; } \ -/dev/null 21 echo $_t /var/run/rc.suspend.tch - ;; -esac - # If you have troubles on suspending with PC-CARD modem, try this. # See also contrib/pccardq.c (Only for PAO users). # pccardq | awk -F '~' '$5 == filled $4 ~ /uart/ \ Modified: stable/9/sys/dev/acpica/acpi_timer.c == --- stable/9/sys/dev/acpica/acpi_timer.cThu Feb 23 22:03:20 2012 (r232082) +++ stable/9/sys/dev/acpica/acpi_timer.cThu Feb 23 22:10:49 2012 (r232083) @@ -31,6 +31,7 @@ __FBSDID($FreeBSD$); #include opt_acpi.h #include sys/param.h #include sys/bus.h +#include sys/eventhandler.h #include sys/kernel.h #include sys/module.h #include sys/sysctl.h @@ -60,12 +61,15 @@ static device_t acpi_timer_dev; static struct resource *acpi_timer_reg; static bus_space_handle_t acpi_timer_bsh; static bus_space_tag_t acpi_timer_bst; +static eventhandler_tagacpi_timer_eh; static u_int acpi_timer_frequency = 14318182 / 4; static voidacpi_timer_identify(driver_t *driver, device_t parent); static int acpi_timer_probe(device_t dev); static int acpi_timer_attach(device_t dev); +static voidacpi_timer_resume_handler(struct timecounter *); +static voidacpi_timer_suspend_handler(struct timecounter *); static u_int acpi_timer_get_timecount(struct timecounter *tc); static u_int acpi_timer_get_timecount_safe(struct timecounter *tc); static int acpi_timer_sysctl_freq(SYSCTL_HANDLER_ARGS); @@ -244,9 +248,60 @@ acpi_timer_attach(device_t dev) return (ENXIO); acpi_timer_bsh = rman_get_bushandle(acpi_timer_reg); acpi_timer_bst = rman_get_bustag(acpi_timer_reg); + +/* Register suspend event handler. */ +if (EVENTHANDLER_REGISTER(power_suspend, acpi_timer_suspend_handler, + acpi_timer_timecounter, EVENTHANDLER_PRI_LAST) == NULL) + device_printf(dev, failed to register suspend event handler\n); + return (0); } +static void +acpi_timer_resume_handler(struct timecounter *newtc) +{ + struct timecounter *tc; + + tc = timecounter; + if (tc != newtc) { + if (bootverbose) + device_printf(acpi_timer_dev, + restoring timecounter, %s - %s\n, + tc-tc_name, newtc-tc_name); + (void)newtc-tc_get_timecount(newtc); + (void)newtc-tc_get_timecount(newtc); + timecounter = newtc; + } +} + +static void +acpi_timer_suspend_handler(struct timecounter *newtc) +{ + struct timecounter *tc; + + /* Deregister existing resume event handler. */ + if (acpi_timer_eh != NULL) { + EVENTHANDLER_DEREGISTER(power_resume, acpi_timer_eh); + acpi_timer_eh = NULL; + } + + KASSERT(newtc == acpi_timer_timecounter, + (acpi_timer_suspend_handler: wrong timecounter)); + + tc = timecounter; + if (tc != newtc) { + if (bootverbose) + device_printf(acpi_timer_dev, + switching timecounter, %s - %s\n, +
svn commit: r232084 - in stable/9/sys: amd64/acpica dev/acpica
Author: jkim Date: Thu Feb 23 22:15:56 2012 New Revision: 232084 URL: http://svn.freebsd.org/changeset/base/232084 Log: MFC: r231227 Reset clock after atrtc(4) is properly resumed. Modified: stable/9/sys/amd64/acpica/acpi_wakeup.c stable/9/sys/dev/acpica/acpi.c stable/9/sys/dev/acpica/acpivar.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/acpica/acpi_wakeup.c == --- stable/9/sys/amd64/acpica/acpi_wakeup.c Thu Feb 23 22:10:49 2012 (r232083) +++ stable/9/sys/amd64/acpica/acpi_wakeup.c Thu Feb 23 22:15:56 2012 (r232084) @@ -297,7 +297,6 @@ acpi_sleep_machdep(struct acpi_softc *sc if (!CPU_EMPTY(wakeup_cpus)) acpi_wakeup_cpus(sc, wakeup_cpus); #endif - acpi_resync_clock(sc); ret = 0; } Modified: stable/9/sys/dev/acpica/acpi.c == --- stable/9/sys/dev/acpica/acpi.c Thu Feb 23 22:10:49 2012 (r232083) +++ stable/9/sys/dev/acpica/acpi.c Thu Feb 23 22:15:56 2012 (r232084) @@ -152,6 +152,7 @@ static ACPI_STATUS acpi_EnterSleepState( static voidacpi_shutdown_final(void *arg, int howto); static voidacpi_enable_fixed_events(struct acpi_softc *sc); static BOOLEAN acpi_has_hid(ACPI_HANDLE handle); +static voidacpi_resync_clock(struct acpi_softc *sc); static int acpi_wake_sleep_prep(ACPI_HANDLE handle, int sstate); static int acpi_wake_run_prep(ACPI_HANDLE handle, int sstate); static int acpi_wake_prep_walk(int sstate); @@ -277,11 +278,13 @@ TUNABLE_INT(debug.acpi.interpreter_slac SYSCTL_INT(_debug_acpi, OID_AUTO, interpreter_slack, CTLFLAG_RDTUN, acpi_interpreter_slack, 1, Turn on interpreter slack mode.); +#ifdef __amd64__ /* Reset system clock while resuming. XXX Remove once tested. */ static int acpi_reset_clock = 1; TUNABLE_INT(debug.acpi.reset_clock, acpi_reset_clock); SYSCTL_INT(_debug_acpi, OID_AUTO, reset_clock, CTLFLAG_RW, acpi_reset_clock, 1, Reset system clock while resuming.); +#endif /* Allow users to override quirks. */ TUNABLE_INT(debug.acpi.quirks, acpi_quirks); @@ -2735,8 +2738,10 @@ backout: AcpiLeaveSleepState(state); if (slp_state = ACPI_SS_DEV_SUSPEND) DEVICE_RESUME(root_bus); -if (slp_state = ACPI_SS_SLEPT) +if (slp_state = ACPI_SS_SLEPT) { + acpi_resync_clock(sc); acpi_enable_fixed_events(sc); +} sc-acpi_next_sstate = 0; mtx_unlock(Giant); @@ -2759,10 +2764,10 @@ backout: return_ACPI_STATUS (status); } -void +static void acpi_resync_clock(struct acpi_softc *sc) { - +#ifdef __amd64__ if (!acpi_reset_clock) return; @@ -2772,6 +2777,7 @@ acpi_resync_clock(struct acpi_softc *sc) (void)timecounter-tc_get_timecount(timecounter); (void)timecounter-tc_get_timecount(timecounter); inittodr(time_second + sc-acpi_sleep_delay); +#endif } /* Enable or disable the device's wake GPE. */ Modified: stable/9/sys/dev/acpica/acpivar.h == --- stable/9/sys/dev/acpica/acpivar.h Thu Feb 23 22:10:49 2012 (r232083) +++ stable/9/sys/dev/acpica/acpivar.h Thu Feb 23 22:15:56 2012 (r232084) @@ -339,7 +339,6 @@ ACPI_STATUS acpi_SetIntrModel(int model) intacpi_ReqSleepState(struct acpi_softc *sc, int state); intacpi_AckSleepState(struct apm_clone_data *clone, int error); ACPI_STATUSacpi_SetSleepState(struct acpi_softc *sc, int state); -void acpi_resync_clock(struct acpi_softc *sc); intacpi_wake_set_enable(device_t dev, int enable); intacpi_parse_prw(ACPI_HANDLE h, struct acpi_prw_data *prw); ACPI_STATUSacpi_Startup(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: r232085 - in stable/9/sys/amd64: acpica amd64
Author: jkim Date: Thu Feb 23 22:20:52 2012 New Revision: 232085 URL: http://svn.freebsd.org/changeset/base/232085 Log: MFC: r231797 Clean up RFLAG and CR3 register handling and nearby comments. For BSP, use spinlock_enter()/spinlock_exit() to save/restore RFLAGS. We know interrupt is disabled when returning from S3. For AP, we do not have to save/restore it because IRET will do it for us any way. Do not save CR3 locally because savectx() does it and BSP does not have to switch to kernel map for amd64. Change contigmalloc(9) flag while I am in the neighborhood. Modified: stable/9/sys/amd64/acpica/acpi_wakeup.c stable/9/sys/amd64/amd64/mp_machdep.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/acpica/acpi_wakeup.c == --- stable/9/sys/amd64/acpica/acpi_wakeup.c Thu Feb 23 22:15:56 2012 (r232084) +++ stable/9/sys/amd64/acpica/acpi_wakeup.c Thu Feb 23 22:20:52 2012 (r232085) @@ -223,7 +223,6 @@ acpi_sleep_machdep(struct acpi_softc *sc #ifdef SMP cpuset_twakeup_cpus; #endif - register_t cr3, rf; ACPI_STATUS status; int ret; @@ -242,17 +241,9 @@ acpi_sleep_machdep(struct acpi_softc *sc AcpiSetFirmwareWakingVector(WAKECODE_PADDR(sc)); - rf = intr_disable(); + spinlock_enter(); intr_suspend(); - /* -* Temporarily switch to the kernel pmap because it provides -* an identity mapping (setup at boot) for the low physical -* memory region containing the wakeup code. -*/ - cr3 = rcr3(); - load_cr3(KPML4phys); - if (savectx(susppcbs[0])) { ctx_fpusave(suspfpusave[0]); #ifdef SMP @@ -291,6 +282,7 @@ acpi_sleep_machdep(struct acpi_softc *sc ia32_pause(); } else { pmap_init_pat(); + load_cr3(susppcbs[0]-pcb_cr3); PCPU_SET(switchtime, 0); PCPU_SET(switchticks, ticks); #ifdef SMP @@ -306,10 +298,9 @@ out: restart_cpus(wakeup_cpus); #endif - load_cr3(cr3); mca_resume(); intr_resume(); - intr_restore(rf); + spinlock_exit(); AcpiSetFirmwareWakingVector(0); @@ -333,7 +324,7 @@ acpi_alloc_wakeup_handler(void) * and ROM area (0xa and above). The temporary page tables must be * page-aligned. */ - wakeaddr = contigmalloc(4 * PAGE_SIZE, M_DEVBUF, M_NOWAIT, 0x500, + wakeaddr = contigmalloc(4 * PAGE_SIZE, M_DEVBUF, M_WAITOK, 0x500, 0xa, PAGE_SIZE, 0ul); if (wakeaddr == NULL) { printf(%s: can't alloc wake memory\n, __func__); Modified: stable/9/sys/amd64/amd64/mp_machdep.c == --- stable/9/sys/amd64/amd64/mp_machdep.c Thu Feb 23 22:15:56 2012 (r232084) +++ stable/9/sys/amd64/amd64/mp_machdep.c Thu Feb 23 22:20:52 2012 (r232085) @@ -1414,20 +1414,17 @@ cpustop_handler(void) void cpususpend_handler(void) { - register_t cr3, rf; u_int cpu; cpu = PCPU_GET(cpuid); - rf = intr_disable(); - cr3 = rcr3(); - if (savectx(susppcbs[cpu])) { ctx_fpusave(suspfpusave[cpu]); wbinvd(); CPU_SET_ATOMIC(cpu, stopped_cpus); } else { pmap_init_pat(); + load_cr3(susppcbs[cpu]-pcb_cr3); PCPU_SET(switchtime, 0); PCPU_SET(switchticks, ticks); } @@ -1439,11 +1436,9 @@ cpususpend_handler(void) CPU_CLR_ATOMIC(cpu, started_cpus); CPU_CLR_ATOMIC(cpu, stopped_cpus); - /* Restore CR3 and enable interrupts */ - load_cr3(cr3); + /* Resume MCA and local APIC */ mca_resume(); lapic_setup(0); - intr_restore(rf); } /* ___ 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: r232086 - stable/9/sys/dev/acpica
Author: jkim Date: Thu Feb 23 22:26:14 2012 New Revision: 232086 URL: http://svn.freebsd.org/changeset/base/232086 Log: MFC: r231161 - Give all clocks and timers on acpi0 the equal probing order. - Increase probing order for ECDT table to match HID-based probing. - Decrease probing order for HPET table to match HID-based probing. - Decrease probing order for CPUs and system resources. - Fix ACPI_DEV_BASE_ORDER to reflect the reality. Modified: stable/9/sys/dev/acpica/acpi.c stable/9/sys/dev/acpica/acpi_ec.c stable/9/sys/dev/acpica/acpi_hpet.c stable/9/sys/dev/acpica/acpi_timer.c stable/9/sys/dev/acpica/acpivar.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/acpica/acpi.c == --- stable/9/sys/dev/acpica/acpi.c Thu Feb 23 22:20:52 2012 (r232085) +++ stable/9/sys/dev/acpica/acpi.c Thu Feb 23 22:26:14 2012 (r232086) @@ -1815,23 +1815,29 @@ acpi_probe_children(device_t bus) static void acpi_probe_order(ACPI_HANDLE handle, int *order) { -ACPI_OBJECT_TYPE type; + ACPI_OBJECT_TYPE type; -/* - * 1. CPUs - * 2. I/O port and memory system resource holders - * 3. Embedded controllers (to handle early accesses) - * 4. PCI Link Devices - */ -AcpiGetType(handle, type); -if (type == ACPI_TYPE_PROCESSOR) - *order = 1; -else if (acpi_MatchHid(handle, PNP0C01) || acpi_MatchHid(handle, PNP0C02)) - *order = 2; -else if (acpi_MatchHid(handle, PNP0C09)) - *order = 3; -else if (acpi_MatchHid(handle, PNP0C0F)) - *order = 4; + /* +* 0. CPUs +* 1. I/O port and memory system resource holders +* 2. Clocks and timers (to handle early accesses) +* 3. Embedded controllers (to handle early accesses) +* 4. PCI Link Devices +*/ + AcpiGetType(handle, type); + if (type == ACPI_TYPE_PROCESSOR) + *order = 0; + else if (acpi_MatchHid(handle, PNP0C01) || + acpi_MatchHid(handle, PNP0C02)) + *order = 1; + else if (acpi_MatchHid(handle, PNP0100) || + acpi_MatchHid(handle, PNP0103) || + acpi_MatchHid(handle, PNP0B00)) + *order = 2; + else if (acpi_MatchHid(handle, PNP0C09)) + *order = 3; + else if (acpi_MatchHid(handle, PNP0C0F)) + *order = 4; } /* @@ -1892,7 +1898,7 @@ acpi_probe_child(ACPI_HANDLE handle, UIN * resources). */ ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, scanning '%s'\n, handle_str)); - order = level * 10 + 100; + order = level * 10 + ACPI_DEV_BASE_ORDER; acpi_probe_order(handle, order); child = BUS_ADD_CHILD(bus, order, NULL, -1); if (child == NULL) Modified: stable/9/sys/dev/acpica/acpi_ec.c == --- stable/9/sys/dev/acpica/acpi_ec.c Thu Feb 23 22:20:52 2012 (r232085) +++ stable/9/sys/dev/acpica/acpi_ec.c Thu Feb 23 22:26:14 2012 (r232086) @@ -295,7 +295,7 @@ acpi_ec_ecdt_probe(device_t parent) } /* Create the child device with the given unit number. */ -child = BUS_ADD_CHILD(parent, 0, acpi_ec, ecdt-Uid); +child = BUS_ADD_CHILD(parent, 3, acpi_ec, ecdt-Uid); if (child == NULL) { printf(%s: can't add child\n, __func__); return; Modified: stable/9/sys/dev/acpica/acpi_hpet.c == --- stable/9/sys/dev/acpica/acpi_hpet.c Thu Feb 23 22:20:52 2012 (r232085) +++ stable/9/sys/dev/acpica/acpi_hpet.c Thu Feb 23 22:26:14 2012 (r232086) @@ -342,7 +342,7 @@ hpet_identify(driver_t *driver, device_t if (found) continue; /* If not - create it from table info. */ - child = BUS_ADD_CHILD(parent, ACPI_DEV_BASE_ORDER, hpet, 0); + child = BUS_ADD_CHILD(parent, 2, hpet, 0); if (child == NULL) { printf(%s: can't add child\n, __func__); continue; Modified: stable/9/sys/dev/acpica/acpi_timer.c == --- stable/9/sys/dev/acpica/acpi_timer.cThu Feb 23 22:20:52 2012 (r232085) +++ stable/9/sys/dev/acpica/acpi_timer.cThu Feb 23 22:26:14 2012 (r232086) @@ -128,7 +128,7 @@ acpi_timer_identify(driver_t *driver, de acpi_timer_dev) return_VOID; -if ((dev = BUS_ADD_CHILD(parent, 0, acpi_timer, 0)) == NULL) { +if ((dev = BUS_ADD_CHILD(parent, 2, acpi_timer, 0)) == NULL) { device_printf(parent, could not add acpi_timer0\n); return_VOID; } Modified: stable/9/sys/dev/acpica/acpivar.h
svn commit: r232087 - stable/9/sys/dev/acpica/Osd
Author: jkim Date: Thu Feb 23 22:29:36 2012 New Revision: 232087 URL: http://svn.freebsd.org/changeset/base/232087 Log: MFC: r231474 De-obfuscate acpi_acquire_global_lock(). Modified: stable/9/sys/dev/acpica/Osd/OsdSynch.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/acpica/Osd/OsdSynch.c == --- stable/9/sys/dev/acpica/Osd/OsdSynch.c Thu Feb 23 22:26:14 2012 (r232086) +++ stable/9/sys/dev/acpica/Osd/OsdSynch.c Thu Feb 23 22:29:36 2012 (r232087) @@ -566,11 +566,8 @@ AcpiOsReleaseLock(ACPI_SPINLOCK Handle, } /* Section 5.2.10.1: global lock acquire/release functions */ -#defineGL_ACQUIRED (-1) -#defineGL_BUSY 0 #defineGL_BIT_PENDING 0x01 #defineGL_BIT_OWNED0x02 -#defineGL_BIT_MASK (GL_BIT_PENDING | GL_BIT_OWNED) /* * Acquire the global lock. If busy, set the pending bit. The caller @@ -584,11 +581,12 @@ acpi_acquire_global_lock(uint32_t *lock) do { old = *lock; - new = ((old ~GL_BIT_MASK) | GL_BIT_OWNED) | - ((old 1) GL_BIT_PENDING); + new = (old ~GL_BIT_PENDING) | GL_BIT_OWNED; + if ((old GL_BIT_OWNED) != 0) + new |= GL_BIT_PENDING; } while (atomic_cmpset_acq_int(lock, old, new) == 0); - return ((new GL_BIT_MASK) ? GL_ACQUIRED : GL_BUSY); + return ((new GL_BIT_PENDING) == 0); } /* @@ -603,8 +601,8 @@ acpi_release_global_lock(uint32_t *lock) do { old = *lock; - new = old ~GL_BIT_MASK; + new = old ~(GL_BIT_PENDING | GL_BIT_OWNED); } while (atomic_cmpset_rel_int(lock, old, new) == 0); - return (old GL_BIT_PENDING); + return ((old GL_BIT_PENDING) != 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: r232088 - stable/9/sys/amd64/amd64
Author: jkim Date: Thu Feb 23 22:34:44 2012 New Revision: 232088 URL: http://svn.freebsd.org/changeset/base/232088 Log: MFC: r231781 Some BIOSes are known for corrupting low 64KB between suspend and resume. Mask off the first 16 pages unless we appear to be running in a VM. This address may be overridden by 'hw.physmem.start' tunable from loader. Modified: stable/9/sys/amd64/amd64/machdep.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/machdep.c == --- stable/9/sys/amd64/amd64/machdep.c Thu Feb 23 22:29:36 2012 (r232087) +++ stable/9/sys/amd64/amd64/machdep.c Thu Feb 23 22:34:44 2012 (r232088) @@ -1352,7 +1352,7 @@ getmemsize(caddr_t kmdp, u_int64_t first { int i, physmap_idx, pa_indx, da_indx; vm_paddr_t pa, physmap[PHYSMAP_SIZE]; - u_long physmem_tunable, memtest; + u_long physmem_start, physmem_tunable, memtest; pt_entry_t *pte; struct bios_smap *smapbase, *smap, *smapend; u_int32_t smapsize; @@ -1440,8 +1440,19 @@ getmemsize(caddr_t kmdp, u_int64_t first /* * Size up each available chunk of physical memory. +* +* XXX Some BIOSes corrupt low 64KB between suspend and resume. +* By default, mask off the first 16 pages unless we appear to be +* running in a VM. */ - physmap[0] = PAGE_SIZE; /* mask off page 0 */ + physmem_start = (vm_guest VM_GUEST_NO ? 1 : 16) PAGE_SHIFT; + TUNABLE_ULONG_FETCH(hw.physmem.start, physmem_start); + if (physmem_start PAGE_SIZE) + physmap[0] = PAGE_SIZE; + else if (physmem_start = physmap[1]) + physmap[0] = round_page(physmap[1] - PAGE_SIZE); + else + physmap[0] = round_page(physmem_start); pa_indx = 0; da_indx = 1; phys_avail[pa_indx++] = physmap[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
Re: svn commit: r231989 - in head: lib/libthr/thread sys/kern sys/sys
On Thu, Feb 23, 2012 at 08:07:49AM +0800, David Xu wrote: On 2012/2/23 7:42, Jilles Tjoelker wrote: On Wed, Feb 22, 2012 at 03:22:50AM +, David Xu wrote: Author: davidxu Date: Wed Feb 22 03:22:49 2012 New Revision: 231989 URL: http://svn.freebsd.org/changeset/base/231989 Log: Use unused fourth argument of umtx_op to pass flags to kernel for operation UMTX_OP_WAIT. Upper 16bits is enough to hold a clock id, and lower 16bits is used to pass flags. The change saves a clock_gettime() syscall from libthr. Modified: head/lib/libthr/thread/thr_umtx.c head/sys/kern/kern_umtx.c head/sys/sys/umtx.h Modified: head/lib/libthr/thread/thr_umtx.c == --- head/lib/libthr/thread/thr_umtx.c Wed Feb 22 01:50:13 2012 (r231988) +++ head/lib/libthr/thread/thr_umtx.c Wed Feb 22 03:22:49 2012 (r231989) @@ -200,20 +200,10 @@ int + abstime != NULL ? (void *)(uintptr_t)((clockid 16) | UMTX_WAIT_ABSTIME) : 0, Please check that this shift does not lose any information (i.e., clockid= 0 clockid= 0x) before doing it. Implementing clock_getcpuclockid() will require clockids greater than 65535 because such clockids contain a process id. In which document said the clock id includes a process id ? I think the clock_getcpuclockid() is a simplified version of getrusage(). clock_getcpuclockid() lets you find a clock ID for the CPU time clock of a process. Usage could be like this: int error; pid_t pid; clockid_t clk; struct timespec ts; error = clock_getcpuclockid(pid, clk); if (error == 0) if (clock_gettime(clk, ts) == 0) printf(%lu.%09lu\n, (unsigned long)ts.tv_sec, (unsigned long)ts.tv_usec); One way to implement it is to reserve a PID_MAX sized subrange of clockid_t for this purpose. Similarly, pthread_getcpuclockid() lets you find a clock ID for the CPU time clock of a thread. These seem mostly useful for clock_getres(), clock_gettime() and possibly timer_create(). Besides, sem_timedwait() doesn't even let you specify a clock ID. -- Jilles Tjoelker ___ 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: r232080 - in head: share/man/man4 sys/net
First, I'm always glad to see devs updating the documentation, so please don't take this as in any way being critical, just trying to help. :) On 02/23/2012 13:56, Andrew Thompson wrote: Modified: head/share/man/man4/lagg.4 == --- head/share/man/man4/lagg.4Thu Feb 23 21:54:04 2012 (r232079) +++ head/share/man/man4/lagg.4Thu Feb 23 21:56:53 2012 (r232080) @@ -142,10 +142,12 @@ and modes will use the RSS hash from the network card if available to avoid computing one, this may give poor traffic distribution if the hash is invalid or uses less of the protocol header information. -Local hash computation can be forced by setting the +Local hash computation can be forced per interface by setting the This is a great example of why we use short lines in the man page sources. It allows people to come along later and add text without having to make changes to multiple lines. .Va net.link.lagg.X.use_flowid .Xr sysctl 8 -variable to zero where X is the interface number. +variable to zero where X is the interface number, the default for +new interfaces is set via +.Va net.link.lagg.default_use_flowid . If adding a comma there was the right change the new clause should still have started on the next line, for the reason described above. However, what you added is actually a sentence that can/should stand on its own. hth, Doug -- It's always a long day; 86400 doesn't fit into a short. Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ ___ 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: r232065 - head/sys/dev/fb
According to the logs you didn't make any changes to this file in 2011, so that would be properly written as: 2009-2010, 2012 hth, Doug On 02/23/2012 11:16, Jung-uk Kim wrote: Author: jkim Date: Thu Feb 23 19:16:05 2012 New Revision: 232065 URL: http://svn.freebsd.org/changeset/base/232065 Log: Update my copyright date. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c == --- head/sys/dev/fb/vesa.cThu Feb 23 19:13:19 2012(r232064) +++ head/sys/dev/fb/vesa.cThu Feb 23 19:16:05 2012(r232065) @@ -1,6 +1,6 @@ /*- * Copyright (c) 1998 Kazutaka YOKOTA and Michael Smith - * Copyright (c) 2009-2010 Jung-uk Kim j...@freebsd.org + * Copyright (c) 2009-2012 Jung-uk Kim j...@freebsd.org * All rights reserved. * * Redistribution and use in source and binary forms, with or without -- It's always a long day; 86400 doesn't fit into a short. Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ ___ 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: r232089 - head/share/man/man4
Author: thompsa Date: Thu Feb 23 23:37:29 2012 New Revision: 232089 URL: http://svn.freebsd.org/changeset/base/232089 Log: Break the last part to its own sentence rather than a run-on. Suggested by: dougb Modified: head/share/man/man4/lagg.4 Modified: head/share/man/man4/lagg.4 == --- head/share/man/man4/lagg.4 Thu Feb 23 22:34:44 2012(r232088) +++ head/share/man/man4/lagg.4 Thu Feb 23 23:37:29 2012(r232089) @@ -145,9 +145,10 @@ or uses less of the protocol header info Local hash computation can be forced per interface by setting the .Va net.link.lagg.X.use_flowid .Xr sysctl 8 -variable to zero where X is the interface number, the default for -new interfaces is set via -.Va net.link.lagg.default_use_flowid . +variable to zero where X is the interface number. +The default for new interfaces is set via the +.Va net.link.lagg.default_use_flowid +.Xr sysctl 8 . .Sh EXAMPLES Create a 802.3ad link aggregation using LACP with two .Xr bge 4 ___ 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: r232090 - in head: share/man/man4 sys/dev/amdtemp
Author: jkim Date: Fri Feb 24 00:02:46 2012 New Revision: 232090 URL: http://svn.freebsd.org/changeset/base/232090 Log: - Add support for Family 12h, 14h and 15h processors. - Remove all attempts to guess physical temperature using DiodeOffset. There are too many reports that it varies wildly depending on motherboard. Instead, if it is known to scale well and its offset is known from other temperature sensors on board, the user may set dev.amdtemp.0.sensor_offset tunable to compensate the difference. Document the caveats in amdtemp(4). - Add a quirk for Socket AM2 Revision G processors. These processors are known to have a different offset according to Linux k8temp driver. - Warn about Family 10h Erratum 319. These processors have broken sensors. - Report temperature in more logical orders under dev.amdtemp node. For example, dev.amdtemp.0.sensor0.core0 is now dev.amdtemp.0.core0.sensor0. - Replace K8, K10 and K11 with official processor names in amdtemp(4). Modified: head/share/man/man4/amdtemp.4 head/sys/dev/amdtemp/amdtemp.c Modified: head/share/man/man4/amdtemp.4 == --- head/share/man/man4/amdtemp.4 Thu Feb 23 23:37:29 2012 (r232089) +++ head/share/man/man4/amdtemp.4 Fri Feb 24 00:02:46 2012 (r232090) @@ -25,12 +25,14 @@ .\ .\ $FreeBSD$ .\ -.Dd April 8, 2008 +.Dd February 23, 2012 .Dt AMDTEMP 4 .Os .Sh NAME .Nm amdtemp -.Nd device driver for AMD K8, K10 and K11 on-die digital thermal sensor +.Nd device driver for +.Tn AMD +processor on-die digital thermal sensor .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your @@ -49,22 +51,38 @@ amdtemp_load=YES The .Nm driver provides support for the on-die digital thermal sensor present -in AMD K8, K10 and K11 processors. +in +.Tn AMD +Family 0Fh, 10h, 11h, 12h, 14h, and 15h processors. .Pp -For the K8 family, the +For Family 0Fh processors, the .Nm -driver reports each core's temperature through a sysctl node in the -corresponding CPU devices's sysctl tree, named -.Va dev.amdtemp.%d.sensor{0,1}.core{0,1} . +driver reports each core's temperature through sysctl nodes, named +.Va dev.amdtemp.%d.core{0,1}.sensor{0,1} . The driver also creates .Va dev.cpu.%d.temperature -displaying the maximum temperature of the two sensors -located in each CPU core. +in the corresponding CPU device's sysctl tree, displaying the maximum +temperature of the two sensors located in each CPU core. .Pp -For the K10 and K11 families, the driver creates +For Family 10h, 11h, 12h, 14h, and 15h processors, the driver reports each +package's temperature through a sysctl node, named +.Va dev.amdtemp.%d.core0.sensor0 . +The driver also creates .Va dev.cpu.%d.temperature -with the temperature of each core. +in the corresponding CPU device's sysctl tree, displaying the temperature +of the shared sensor located in each CPU package. +.Sh SYSCTL VARIABLES +The following variable is available as both +.Xr sysctl 8 +variable and +.Xr loader 8 +tunable: +.Bl -tag -width indent +.It Va dev.amdtemp.%d.sensor_offset +.El +Add the given offset to the temperature of the sensor. Default is 0. .Sh SEE ALSO +.Xr loader 8 , .Xr sysctl 8 .Sh HISTORY The @@ -74,6 +92,19 @@ driver first appeared in .Sh AUTHORS .An Rui Paulo Aq rpa...@freebsd.org .An Norikatsu Shigemura Aq n...@freebsd.org -.Sh BUGS -AMD K9 is not supported because temperature reporting has been replaced -by Maltese. +.An Jung-uk Kim Aq j...@freebsd.org +.Sh CAVEATS +For Family 10h and later processors, +.Do +(the reported temperature) is a non-physical temperature measured on +an arbitrary scale and it does not represent an actual physical +temperature like die or case temperature. Instead, it specifies +the processor temperature relative to the point at which the system +must supply the maximum cooling for the processor's specified maximum +case temperature and maximum thermal power dissipation +.Dc +according to +.Rs +.%T BIOS and Kernel Developer's Guide (BKDG) for AMD Processors +.%U http://developer.amd.com/documentation/guides/Pages/default.aspx +.Re Modified: head/sys/dev/amdtemp/amdtemp.c == --- head/sys/dev/amdtemp/amdtemp.c Thu Feb 23 23:37:29 2012 (r232089) +++ head/sys/dev/amdtemp/amdtemp.c Fri Feb 24 00:02:46 2012 (r232090) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2008, 2009 Rui Paulo rpa...@freebsd.org * Copyright (c) 2009 Norikatsu Shigemura n...@freebsd.org - * Copyright (c) 2009 Jung-uk Kim j...@freebsd.org + * Copyright (c) 2009-2012 Jung-uk Kim j...@freebsd.org * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,7 +27,7 @@ */ /* - * Driver for the AMD CPU on-die thermal sensors for Family 0Fh/10h/11h procs. + * Driver for the AMD CPU on-die thermal sensors. *
Re: svn commit: r232080 - in head: share/man/man4 sys/net
On 24 February 2012 12:23, Doug Barton do...@freebsd.org wrote: First, I'm always glad to see devs updating the documentation, so please don't take this as in any way being critical, just trying to help. :) n/p, I like feedback. On 02/23/2012 13:56, Andrew Thompson wrote: Modified: head/share/man/man4/lagg.4 == --- head/share/man/man4/lagg.4 Thu Feb 23 21:54:04 2012 (r232079) +++ head/share/man/man4/lagg.4 Thu Feb 23 21:56:53 2012 (r232080) @@ -142,10 +142,12 @@ and modes will use the RSS hash from the network card if available to avoid computing one, this may give poor traffic distribution if the hash is invalid or uses less of the protocol header information. -Local hash computation can be forced by setting the +Local hash computation can be forced per interface by setting the This is a great example of why we use short lines in the man page sources. It allows people to come along later and add text without having to make changes to multiple lines. I can see your point here. .Va net.link.lagg.X.use_flowid .Xr sysctl 8 -variable to zero where X is the interface number. +variable to zero where X is the interface number, the default for +new interfaces is set via +.Va net.link.lagg.default_use_flowid . If adding a comma there was the right change the new clause should still have started on the next line, for the reason described above. However, what you added is actually a sentence that can/should stand on its own. Fixed. Andrew ___ 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: r232080 - in head: share/man/man4 sys/net
On 02/23/2012 15:38, Andrew Thompson wrote: Fixed. Thanks for the quick response. :) -- It's always a long day; 86400 doesn't fit into a short. Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ ___ 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: r232065 - head/sys/dev/fb
On Thursday 23 February 2012 06:24 pm, Doug Barton wrote: According to the logs you didn't make any changes to this file in 2011, so that would be properly written as: 2009-2010, 2012 I made few local changes in 2011 but forgot to commit. ;-) Besides, I remember there were some discussions in developers@ that 2009-2012 is more appropriate than 2009, 2010, 2012 or 2009-2010, 2012, if my memory serves. Anyone? 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
Re: svn commit: r232065 - head/sys/dev/fb
On 02/23/2012 16:17, Jung-uk Kim wrote: I remember there were some discussions in developers@ that 2009-2012 is more appropriate than 2009, 2010, 2012 or 2009-2010, 2012, if my memory serves. Anyone? 2009, 2010, 2012 is as synonym for 2009-2010, 2012 and I see it both ways. That's not the issue. (However, if it were 2008-2010 that is generally preferred vs. listing all 3 years individually.) The issue is that it's a basic tenet of copyright law that you cannot claim copyright in a year that you didn't actually make any changes. This makes sense if you think about it ... your rights from the last year you changed something don't expire at the end of that year, and if you didn't make changes in 2011 you don't have any new material that needs protection. For instance: Copyright 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. Doug -- It's always a long day; 86400 doesn't fit into a short. Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ ___ 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: r232091 - head/sys/dev/pci
Author: marius Date: Fri Feb 24 00:42:50 2012 New Revision: 232091 URL: http://svn.freebsd.org/changeset/base/232091 Log: Forced commit to denote that the commit message of r231621 should have read: - As it turns out, MSI-X is broken for at least LSI SAS1068E when passed through by VMware so blacklist their PCI-PCI bridge for MSI/MSI-X here. Note that besides currently there not being a quirk type that disables MSI-X only and there's no evidence that MSI doesn't work with the VMware pass-through, it's really questionable whether MSI generally works in that setup as VMware only mention three know working devices [1, p. 4]. Also not that this quirk entry currently doesn't affect the devices emulated by VMware in any way as these don't claim support MSI/MSI-X to begin with. [2] While at it, make the PCI quirk table const and static. - Remove some duplicated empty lines. - Use DEVMETHOD_END. PR: 163812, http://forums.freebsd.org/showthread.php?t=27899 [2] Reviewed by: jhb MFC after:3 days [1]: http://www.vmware.com/pdf/vsp_4_vmdirectpath_host.pdf Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c == ___ 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: r232092 - stable/9/sys/dev/pci
Author: marius Date: Fri Feb 24 00:47:14 2012 New Revision: 232092 URL: http://svn.freebsd.org/changeset/base/232092 Log: MFC: r231621 - As it turns out, MSI-X is broken for at least LSI SAS1068E when passed through by VMware so blacklist their PCI-PCI bridge for MSI/MSI-X here. Note that besides currently there not being a quirk type that disables MSI-X only and there's no evidence that MSI doesn't work with the VMware pass-through, it's really questionable whether MSI generally works in that setup as VMware only mention three know working devices [1, p. 4]. Also not that this quirk entry currently doesn't affect the devices emulated by VMware in any way as these don't claim support MSI/MSI-X to begin with. [2] While at it, make the PCI quirk table const and static. - Remove some duplicated empty lines. - Use DEVMETHOD_END. PR: 163812, http://forums.freebsd.org/showthread.php?t=27899 [2] Reviewed by: jhb [1]: http://www.vmware.com/pdf/vsp_4_vmdirectpath_host.pdf Modified: stable/9/sys/dev/pci/pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/pci/pci.c == --- stable/9/sys/dev/pci/pci.c Fri Feb 24 00:42:50 2012(r232091) +++ stable/9/sys/dev/pci/pci.c Fri Feb 24 00:47:14 2012(r232092) @@ -73,7 +73,6 @@ __FBSDID($FreeBSD$); #definePCIR_IS_BIOS(cfg, reg) \ (((cfg)-hdrtype == PCIM_HDRTYPE_NORMAL reg == PCIR_BIOS) || \ ((cfg)-hdrtype == PCIM_HDRTYPE_BRIDGE reg == PCIR_BIOS_1)) - static pci_addr_t pci_mapbase(uint64_t mapreg); static const char *pci_maptype(uint64_t mapreg); @@ -171,7 +170,7 @@ static device_method_t pci_methods[] = { DEVMETHOD(pci_msi_count,pci_msi_count_method), DEVMETHOD(pci_msix_count, pci_msix_count_method), - { 0, 0 } + DEVMETHOD_END }; DEFINE_CLASS_0(pci, pci_driver, pci_methods, 0); @@ -183,7 +182,6 @@ MODULE_VERSION(pci, 1); static char*pci_vendordata; static size_t pci_vendordata_size; - struct pci_quirk { uint32_t devid; /* Vendor/device of the card */ int type; @@ -194,7 +192,7 @@ struct pci_quirk { int arg2; }; -struct pci_quirk pci_quirks[] = { +static const struct pci_quirk const pci_quirks[] = { /* The Intel 82371AB and 82443MX has a map register at offset 0x90. */ { 0x71138086, PCI_QUIRK_MAP_REG,0x90,0 }, { 0x719b8086, PCI_QUIRK_MAP_REG,0x90,0 }, @@ -227,6 +225,12 @@ struct pci_quirk pci_quirks[] = { { 0x74501022, PCI_QUIRK_DISABLE_MSI,0, 0 }, /* +* MSI-X doesn't work with at least LSI SAS1068E passed through by +* VMware. +*/ + { 0x079015ad, PCI_QUIRK_DISABLE_MSI,0, 0 }, + + /* * Some virtualization environments emulate an older chipset * but support MSI just fine. QEMU uses the Intel 82440. */ @@ -724,7 +728,6 @@ pci_read_cap(device_t pcib, pcicfgregs * } } - #if defined(__i386__) || defined(__amd64__) || defined(__powerpc__) /* * Enable the MSI mapping window for all HyperTransport @@ -1873,7 +1876,7 @@ pci_remap_intr_method(device_t bus, devi int pci_msi_device_blacklisted(device_t dev) { - struct pci_quirk *q; + const struct pci_quirk *q; if (!pci_honor_msi_blacklist) return (0); @@ -1893,7 +1896,7 @@ pci_msi_device_blacklisted(device_t dev) static int pci_msi_vm_chipset(device_t dev) { - struct pci_quirk *q; + const struct pci_quirk *q; for (q = pci_quirks[0]; q-devid; q++) { if (q-devid == pci_get_devid(dev) @@ -3023,7 +3026,7 @@ pci_add_resources(device_t bus, device_t struct pci_devinfo *dinfo = device_get_ivars(dev); pcicfgregs *cfg = dinfo-cfg; struct resource_list *rl = dinfo-resources; - struct pci_quirk *q; + const struct pci_quirk *q; int i; /* ATA devices needs special map treatment */ @@ -3864,7 +3867,6 @@ pci_write_ivar(device_t dev, device_t ch } } - #include opt_ddb.h #ifdef DDB #include ddb/ddb.h
svn commit: r232093 - stable/8/sys/dev/pci
Author: marius Date: Fri Feb 24 00:48:27 2012 New Revision: 232093 URL: http://svn.freebsd.org/changeset/base/232093 Log: MFC: r231621 - As it turns out, MSI-X is broken for at least LSI SAS1068E when passed through by VMware so blacklist their PCI-PCI bridge for MSI/MSI-X here. Note that besides currently there not being a quirk type that disables MSI-X only and there's no evidence that MSI doesn't work with the VMware pass-through, it's really questionable whether MSI generally works in that setup as VMware only mention three know working devices [1, p. 4]. Also not that this quirk entry currently doesn't affect the devices emulated by VMware in any way as these don't claim support MSI/MSI-X to begin with. [2] While at it, make the PCI quirk table const and static. - Remove some duplicated empty lines. - Use DEVMETHOD_END. PR: 163812, http://forums.freebsd.org/showthread.php?t=27899 [2] Reviewed by: jhb Approved by: re (kib) [1]: http://www.vmware.com/pdf/vsp_4_vmdirectpath_host.pdf Modified: stable/8/sys/dev/pci/pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (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) stable/8/sys/dev/e1000/ (props changed) Modified: stable/8/sys/dev/pci/pci.c == --- stable/8/sys/dev/pci/pci.c Fri Feb 24 00:47:14 2012(r232092) +++ stable/8/sys/dev/pci/pci.c Fri Feb 24 00:48:27 2012(r232093) @@ -170,7 +170,7 @@ static device_method_t pci_methods[] = { DEVMETHOD(pci_msi_count,pci_msi_count_method), DEVMETHOD(pci_msix_count, pci_msix_count_method), - { 0, 0 } + DEVMETHOD_END }; DEFINE_CLASS_0(pci, pci_driver, pci_methods, 0); @@ -182,7 +182,6 @@ MODULE_VERSION(pci, 1); static char*pci_vendordata; static size_t pci_vendordata_size; - struct pci_quirk { uint32_t devid; /* Vendor/device of the card */ int type; @@ -193,7 +192,7 @@ struct pci_quirk { int arg2; }; -struct pci_quirk pci_quirks[] = { +static const struct pci_quirk const pci_quirks[] = { /* The Intel 82371AB and 82443MX has a map register at offset 0x90. */ { 0x71138086, PCI_QUIRK_MAP_REG,0x90,0 }, { 0x719b8086, PCI_QUIRK_MAP_REG,0x90,0 }, @@ -226,6 +225,12 @@ struct pci_quirk pci_quirks[] = { { 0x74501022, PCI_QUIRK_DISABLE_MSI,0, 0 }, /* +* MSI-X doesn't work with at least LSI SAS1068E passed through by +* VMware. +*/ + { 0x079015ad, PCI_QUIRK_DISABLE_MSI,0, 0 }, + + /* * Some virtualization environments emulate an older chipset * but support MSI just fine. QEMU uses the Intel 82440. */ @@ -1813,7 +1818,7 @@ pci_remap_intr_method(device_t bus, devi int pci_msi_device_blacklisted(device_t dev) { - struct pci_quirk *q; + const struct pci_quirk *q; if (!pci_honor_msi_blacklist) return (0); @@ -1833,7 +1838,7 @@ pci_msi_device_blacklisted(device_t dev) static int pci_msi_vm_chipset(device_t dev) { - struct pci_quirk *q; + const struct pci_quirk *q; for (q = pci_quirks[0]; q-devid; q++) { if (q-devid == pci_get_devid(dev) @@ -2788,7 +2793,7 @@ pci_add_resources(device_t bus, device_t struct pci_devinfo *dinfo = device_get_ivars(dev); pcicfgregs *cfg = dinfo-cfg; struct resource_list *rl = dinfo-resources; - struct pci_quirk *q; + const struct pci_quirk *q; int i; /* ATA devices needs special map treatment */ @@ -3593,7 +3598,6 @@ pci_write_ivar(device_t dev, device_t ch } } - #include opt_ddb.h #ifdef DDB #include ddb/ddb.h @@ -3734,7 +3738,6 @@ out:; return (res); } - struct resource * pci_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) ___ 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: r232094 - stable/7/sys/dev/pci
Author: marius Date: Fri Feb 24 00:49:18 2012 New Revision: 232094 URL: http://svn.freebsd.org/changeset/base/232094 Log: MFC: r231621 - As it turns out, MSI-X is broken for at least LSI SAS1068E when passed through by VMware so blacklist their PCI-PCI bridge for MSI/MSI-X here. Note that besides currently there not being a quirk type that disables MSI-X only and there's no evidence that MSI doesn't work with the VMware pass-through, it's really questionable whether MSI generally works in that setup as VMware only mention three know working devices [1, p. 4]. Also not that this quirk entry currently doesn't affect the devices emulated by VMware in any way as these don't claim support MSI/MSI-X to begin with. [2] While at it, make the PCI quirk table const and static. - Remove some duplicated empty lines. - Use DEVMETHOD_END. PR: 163812, http://forums.freebsd.org/showthread.php?t=27899 [2] Reviewed by: jhb [1]: http://www.vmware.com/pdf/vsp_4_vmdirectpath_host.pdf Modified: stable/7/sys/dev/pci/pci.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/pci/pci.c == --- stable/7/sys/dev/pci/pci.c Fri Feb 24 00:48:27 2012(r232093) +++ stable/7/sys/dev/pci/pci.c Fri Feb 24 00:49:18 2012(r232094) @@ -160,7 +160,7 @@ static device_method_t pci_methods[] = { DEVMETHOD(pci_msi_count,pci_msi_count_method), DEVMETHOD(pci_msix_count, pci_msix_count_method), - { 0, 0 } + DEVMETHOD_END }; DEFINE_CLASS_0(pci, pci_driver, pci_methods, 0); @@ -172,7 +172,6 @@ MODULE_VERSION(pci, 1); static char*pci_vendordata; static size_t pci_vendordata_size; - struct pci_quirk { uint32_t devid; /* Vendor/device of the card */ int type; @@ -183,7 +182,7 @@ struct pci_quirk { int arg2; }; -struct pci_quirk pci_quirks[] = { +static const struct pci_quirk const pci_quirks[] = { /* The Intel 82371AB and 82443MX has a map register at offset 0x90. */ { 0x71138086, PCI_QUIRK_MAP_REG,0x90,0 }, { 0x719b8086, PCI_QUIRK_MAP_REG,0x90,0 }, @@ -216,6 +215,12 @@ struct pci_quirk pci_quirks[] = { { 0x74501022, PCI_QUIRK_DISABLE_MSI,0, 0 }, /* +* MSI-X doesn't work with at least LSI SAS1068E passed through by +* VMware. +*/ + { 0x079015ad, PCI_QUIRK_DISABLE_MSI,0, 0 }, + + /* * Some virtualization environments emulate an older chipset * but support MSI just fine. QEMU uses the Intel 82440. */ @@ -1767,7 +1772,7 @@ pci_remap_msi_irq(device_t dev, u_int ir int pci_msi_device_blacklisted(device_t dev) { - struct pci_quirk *q; + const struct pci_quirk *q; if (!pci_honor_msi_blacklist) return (0); @@ -1787,7 +1792,7 @@ pci_msi_device_blacklisted(device_t dev) static int pci_msi_vm_chipset(device_t dev) { - struct pci_quirk *q; + const struct pci_quirk *q; for (q = pci_quirks[0]; q-devid; q++) { if (q-devid == pci_get_devid(dev) @@ -2627,7 +2632,7 @@ pci_add_resources(device_t bus, device_t struct pci_devinfo *dinfo = device_get_ivars(dev); pcicfgregs *cfg = dinfo-cfg; struct resource_list *rl = dinfo-resources; - struct pci_quirk *q; + const struct pci_quirk *q; int i; /* ATA devices needs special map treatment */ @@ -3423,7 +3428,6 @@ pci_write_ivar(device_t dev, device_t ch } } - #include opt_ddb.h #ifdef DDB #include ddb/ddb.h @@ -3564,7 +3568,6 @@ out:; return (res); } - struct resource * pci_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) ___ 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: r232065 - head/sys/dev/fb
On Thursday 23 February 2012 07:24 pm, Doug Barton wrote: On 02/23/2012 16:17, Jung-uk Kim wrote: I remember there were some discussions in developers@ that 2009-2012 is more appropriate than 2009, 2010, 2012 or 2009-2010, 2012, if my memory serves. Anyone? 2009, 2010, 2012 is as synonym for 2009-2010, 2012 and I see it both ways. That's not the issue. (However, if it were 2008-2010 that is generally preferred vs. listing all 3 years individually.) The issue is that it's a basic tenet of copyright law that you cannot claim copyright in a year that you didn't actually make any changes. This makes sense if you think about it ... your rights from the last year you changed something don't expire at the end of that year, and if you didn't make changes in 2011 you don't have any new material that needs protection. I am not a lawyer but I do know the date is optional, at least in the US. I just googled a bit. Some people say first-last form is fine. Some say otherwise. Also, it seems it depends on where they live. Is there any authoritative answer from the Foundation, I wonder? For instance: Copyright 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. Yeah, I know that example very well. I've seen that copyright notice for two decades or so. :-) 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
Re: svn commit: r231989 - in head: lib/libthr/thread sys/kern sys/sys
On 2012/2/24 6:43, Jilles Tjoelker wrote: On Thu, Feb 23, 2012 at 08:07:49AM +0800, David Xu wrote: On 2012/2/23 7:42, Jilles Tjoelker wrote: On Wed, Feb 22, 2012 at 03:22:50AM +, David Xu wrote: Author: davidxu Date: Wed Feb 22 03:22:49 2012 New Revision: 231989 URL: http://svn.freebsd.org/changeset/base/231989 Log: Use unused fourth argument of umtx_op to pass flags to kernel for operation UMTX_OP_WAIT. Upper 16bits is enough to hold a clock id, and lower 16bits is used to pass flags. The change saves a clock_gettime() syscall from libthr. Modified: head/lib/libthr/thread/thr_umtx.c head/sys/kern/kern_umtx.c head/sys/sys/umtx.h Modified: head/lib/libthr/thread/thr_umtx.c == --- head/lib/libthr/thread/thr_umtx.c Wed Feb 22 01:50:13 2012 (r231988) +++ head/lib/libthr/thread/thr_umtx.c Wed Feb 22 03:22:49 2012 (r231989) @@ -200,20 +200,10 @@ int + abstime != NULL ? (void *)(uintptr_t)((clockid 16) | UMTX_WAIT_ABSTIME) : 0, Please check that this shift does not lose any information (i.e., clockid= 0 clockid= 0x) before doing it. Implementing clock_getcpuclockid() will require clockids greater than 65535 because such clockids contain a process id. In which document said the clock id includes a process id ? I think the clock_getcpuclockid() is a simplified version of getrusage(). clock_getcpuclockid() lets you find a clock ID for the CPU time clock of a process. Usage could be like this: int error; pid_t pid; clockid_t clk; struct timespec ts; error = clock_getcpuclockid(pid,clk); if (error == 0) if (clock_gettime(clk,ts) == 0) printf(%lu.%09lu\n, (unsigned long)ts.tv_sec, (unsigned long)ts.tv_usec); One way to implement it is to reserve a PID_MAX sized subrange of clockid_t for this purpose. Similarly, pthread_getcpuclockid() lets you find a clock ID for the CPU time clock of a thread. So the clock ID may be dynamically allocated in theory ? These seem mostly useful for clock_getres(), clock_gettime() and possibly timer_create(). Besides, sem_timedwait() doesn't even let you specify a clock ID. Yes, sem_timedwait does not specify a clock ID, it is inconsistent with pthread condition variable, it is not surprising, it is not first time that the POSIX has a bug. ___ 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: r232057 - in stable/8/release: doc/en_US.ISO8859-1/hardware doc/share/misc picobsd/floppy.tree/sbin
On Thu, Feb 23, 2012 at 06:49:39PM +, Christian Brueffer wrote: Author: brueffer Date: Thu Feb 23 18:49:38 2012 New Revision: 232057 URL: http://svn.freebsd.org/changeset/base/232057 Log: MFC: r231943 Add oce(4) to the hardware notes. I'm not sure this should have been MFCd to 8-STABLE; I don't see a manual for oce(4), which appears to be breaking the www build. Glen Approved by:re (bz) Modified: stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml stable/8/release/doc/share/misc/dev.archlist.txt Directory Properties: stable/8/release/ (props changed) stable/8/release/doc/en_US.ISO8859-1/hardware/ (props changed) stable/8/release/picobsd/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/dhclient-script (props changed) stable/8/release/picobsd/qemu/ (props changed) stable/8/release/picobsd/tinyware/login/ (props changed) stable/8/release/picobsd/tinyware/passwd/ (props changed) stable/8/release/powerpc/ (props changed) Modified: stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgml == --- stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgmlThu Feb 23 18:48:02 2012(r232056) +++ stable/8/release/doc/en_US.ISO8859-1/hardware/article.sgmlThu Feb 23 18:49:38 2012(r232057) @@ -900,6 +900,8 @@ hwlist.nxge; + hwlist.oce; + hwlist.pcn; hwlist.re; Modified: stable/8/release/doc/share/misc/dev.archlist.txt == --- stable/8/release/doc/share/misc/dev.archlist.txt Thu Feb 23 18:48:02 2012(r232056) +++ stable/8/release/doc/share/misc/dev.archlist.txt Thu Feb 23 18:49:38 2012(r232057) @@ -97,6 +97,7 @@ ng_ubt i386,pc98,amd64 nsp i386,pc98 nve i386,amd64 nxge i386,amd64 +oce i386,amd64 ohci i386,pc98,ia64,amd64,powerpc oltr i386 pcn i386,pc98,ia64,amd64 ___ 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: r232095 - head/sys/net80211
Author: adrian Date: Fri Feb 24 05:33:11 2012 New Revision: 232095 URL: http://svn.freebsd.org/changeset/base/232095 Log: Add a radiotap vendor header definition. Modified: head/sys/net80211/ieee80211_radiotap.h Modified: head/sys/net80211/ieee80211_radiotap.h == --- head/sys/net80211/ieee80211_radiotap.h Fri Feb 24 00:49:18 2012 (r232094) +++ head/sys/net80211/ieee80211_radiotap.h Fri Feb 24 05:33:11 2012 (r232095) @@ -54,6 +54,12 @@ #defineIEEE80211_RADIOTAP_HDRLEN 64 /* XXX deprecated */ +struct ieee80211_radiotap_vendor_header { + uint8_t vh_oui[3]; /* 3 byte vendor OUI */ + uint8_t vh_sub_ns; /* Sub namespace of this section */ + uint16_tvh_skip_len;/* Length of this vendor section */ +} __packed; + /* * The radio capture header precedes the 802.11 header. * ___ 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: r232096 - head/sys/net80211
Author: adrian Date: Fri Feb 24 05:39:00 2012 New Revision: 232096 URL: http://svn.freebsd.org/changeset/base/232096 Log: Although it's documented that the vap newstate call can drop the comlock, I'd like to find and analyse these cases to see if they really are valid. So, throw in a lock here and wait for the (hopefully!) inevitable complaints. Modified: head/sys/net80211/ieee80211_proto.c Modified: head/sys/net80211/ieee80211_proto.c == --- head/sys/net80211/ieee80211_proto.c Fri Feb 24 05:33:11 2012 (r232095) +++ head/sys/net80211/ieee80211_proto.c Fri Feb 24 05:39:00 2012 (r232096) @@ -1615,6 +1615,7 @@ markwaiting(struct ieee80211vap *vap0) if (vap-iv_state != IEEE80211_S_INIT) { /* NB: iv_newstate may drop the lock */ vap-iv_newstate(vap, IEEE80211_S_INIT, 0); + IEEE80211_LOCK_ASSERT(ic); vap-iv_flags_ext |= IEEE80211_FEXT_SCANWAIT; } } @@ -1649,6 +1650,7 @@ wakeupwaiting(struct ieee80211vap *vap0) vap-iv_newstate(vap, vap-iv_opmode == IEEE80211_M_STA ? IEEE80211_S_SCAN : IEEE80211_S_RUN, 0); + IEEE80211_LOCK_ASSERT(ic); } } } @@ -1678,6 +1680,7 @@ ieee80211_newstate_cb(void *xvap, int np ieee80211_state_name[vap-iv_state], ieee80211_state_name[IEEE80211_S_INIT], arg); vap-iv_newstate(vap, IEEE80211_S_INIT, arg); + IEEE80211_LOCK_ASSERT(ic); vap-iv_flags_ext = ~IEEE80211_FEXT_REINIT; } @@ -1699,6 +1702,7 @@ ieee80211_newstate_cb(void *xvap, int np ieee80211_state_name[ostate], ieee80211_state_name[nstate], arg); rc = vap-iv_newstate(vap, nstate, arg); + IEEE80211_LOCK_ASSERT(ic); vap-iv_flags_ext = ~IEEE80211_FEXT_STATEWAIT; if (rc != 0) { /* State transition failed */ @@ -1724,7 +1728,9 @@ ieee80211_newstate_cb(void *xvap, int np * Note this can also happen as a result of SLEEP-RUN * (i.e. coming out of power save mode). */ + IF_LOCK(vap-iv_ifp-if_snd); vap-iv_ifp-if_drv_flags = ~IFF_DRV_OACTIVE; + IF_UNLOCK(vap-iv_ifp-if_snd); if_start(vap-iv_ifp); /* bring up any vaps waiting on us */ ___ 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: r232097 - head/sys/net80211
Author: adrian Date: Fri Feb 24 05:40:36 2012 New Revision: 232097 URL: http://svn.freebsd.org/changeset/base/232097 Log: Hold IF_LOCK when manipulating the interface flags. It doesn't _really_ help all that much, I'll commit something to sys/net/if.c at some point explaining why, but the lock should be held when checking/manipulating/branching because of said lock. Modified: head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_output.c == --- head/sys/net80211/ieee80211_output.cFri Feb 24 05:39:00 2012 (r232096) +++ head/sys/net80211/ieee80211_output.cFri Feb 24 05:40:36 2012 (r232097) @@ -157,8 +157,10 @@ ieee80211_start(struct ifnet *ifp) %s: ignore queue, in %s state\n, __func__, ieee80211_state_name[vap-iv_state]); vap-iv_stats.is_tx_badstate++; - ifp-if_drv_flags |= IFF_DRV_OACTIVE; IEEE80211_UNLOCK(ic); + IFQ_LOCK(ifp-if_snd); + ifp-if_drv_flags |= IFF_DRV_OACTIVE; + IFQ_UNLOCK(ifp-if_snd); return; } IEEE80211_UNLOCK(ic); @@ -389,7 +391,9 @@ ieee80211_output(struct ifnet *ifp, stru struct ieee80211_frame *wh; int error; + IFQ_LOCK(ifp-if_snd); if (ifp-if_drv_flags IFF_DRV_OACTIVE) { + IFQ_UNLOCK(ifp-if_snd); /* * Short-circuit requests if the vap is marked OACTIVE * as this can happen because a packet came down through @@ -400,6 +404,7 @@ ieee80211_output(struct ifnet *ifp, stru */ senderr(ENETDOWN); } + IFQ_UNLOCK(ifp-if_snd); vap = ifp-if_softc; /* * Hand to the 802.3 code if not tagged as ___ 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: r232098 - stable/9/share/man/man4
Author: brueffer Date: Fri Feb 24 07:00:29 2012 New Revision: 232098 URL: http://svn.freebsd.org/changeset/base/232098 Log: MFC: r231880,r231915,r231937 Add a manpage for the oce(4) driver. Added: stable/9/share/man/man4/oce.4 - copied, changed from r231880, head/share/man/man4/oce.4 Modified: stable/9/share/man/man4/Makefile Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/Makefile == --- stable/9/share/man/man4/MakefileFri Feb 24 05:40:36 2012 (r232097) +++ stable/9/share/man/man4/MakefileFri Feb 24 07:00:29 2012 (r232098) @@ -328,6 +328,7 @@ MAN=aac.4 \ ${_nvram.4} \ ${_nvram2env.4} \ ${_nxge.4} \ + oce.4 \ ohci.4 \ orm.4 \ ${_padlock.4} \ Copied and modified: stable/9/share/man/man4/oce.4 (from r231880, head/share/man/man4/oce.4) == --- head/share/man/man4/oce.4 Fri Feb 17 14:02:44 2012(r231880, copy source) +++ stable/9/share/man/man4/oce.4 Fri Feb 24 07:00:29 2012 (r232098) @@ -36,9 +36,7 @@ .\ .\ $FreeBSD$ .\ - - -.Dd February 14, 2012 +.Dd February 19, 2012 .Dt OCE 4 .Os .Sh NAME @@ -49,64 +47,85 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd device pci .Cd device oce .Ed .Pp -To load the driver as a +Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent if_oce_load=YES .Ed .Sh DESCRIPTION -Emulex one connect adapters come in various skews and with +Emulex OneConnect adapters come in various skews and with different combinations of NIC, FCoE and iSCSI functions. -oce claims the NIC functions in all these adapters. +The +.Nm +driver claims the NIC functions in all these adapters. .Pp The .Nm driver supports VLAN Hardware offload, TCP checksum offload, TCP segmentation offload (TSO), Large receive offload (LRO), Bonding, Jumbo frames (from 1500 - 9000), Multiple TX queues, -Receive-Side Scaling(RSS) and MSI-X interrupts. +Receive-Side Scaling (RSS) and MSI-X interrupts. .Sh HARDWARE +The .Nm -driver supports the following Emulex network adapters: +driver supports the following network adapters: +.Pp .Bl -bullet -compact .It -BladeEngine 2 +Emulex BladeEngine 2 .It -BladeEngine 3 +Emulex BladeEngine 3 .It -Lancer +Emulex Lancer .El .Sh UPDATING FIRMWARE Adapter firmware updates are persistent. - +.Pp Firmware can be updated by following the steps below: -.nf - 1) Copy the below code to a Makefile - .KMOD=elxflash - FIRMWS=imagename.ufi:elxflash - .include bsd.kmod.mk - 2) Replace imagename in above with UFI file name. - 3) Copy Makefile and UFI to a directory - 4) Execute make copy generated elxflash.ko to /lib/modules - 5) sysctl dev.oce.if_id.fw_upgrade=elxflash - 6) Reboot the machine. - +.Bl -enum +.It +Copy the below code to a Makefile: +.Pp +.Bd -literal -offset indent +\.KMOD=elxflash +FIRMWS=imagename.ufi:elxflash +\.include bsd.kmod.mk +.Ed +.It +Replace imagename in above with UFI file name +.It +Copy Makefile and UFI file to a directory +.It +Execute make copy generated elxflash.ko to +.Pa /lib/modules +.It +sysctl dev.oce.if_id.fw_upgrade=elxflash +.It +Reboot the machine +.El +.Pp In case of issues with supplied UFI, flashing fails with one -of the below errors. - 1) Invalid BE3 firmware image - 2) Invalid Cookie. Firmware image corrupted ? - 3) cmd to write to flash rom failed. -.fi +of the following errors. +.Pp +.Bl -enum -compact +.It +.Qq Invalid BE3 firmware image +.It +.Qq Invalid Cookie. Firmware image corrupted ? +.It +.Qq cmd to write to flash rom failed. +.El .Sh SUPPORT For general information and support, go to the Emulex website at: -.Fa http://www.Emulex.com/ -or E-Mail at -.Fa freebsd-driv...@emulex.com. +.Pa http://www.Emulex.com/ +or E-Mail at +.Pa freebsd-driv...@emulex.com . .Sh SEE ALSO .Xr ifconfig 8 .Sh AUTHORS @@ -114,4 +133,4 @@ or E-Mail at The .Nm driver was written by -.An freebsd-driv...@emulex.com. +.An freebsd-driv...@emulex.com . ___ 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: r232099 - head/sys/fs/ntfs
Author: kevlo Date: Fri Feb 24 07:29:06 2012 New Revision: 232099 URL: http://svn.freebsd.org/changeset/base/232099 Log: Check if the user has necessary permissions on the device Modified: head/sys/fs/ntfs/ntfs_vfsops.c Modified: head/sys/fs/ntfs/ntfs_vfsops.c == --- head/sys/fs/ntfs/ntfs_vfsops.c Fri Feb 24 07:00:29 2012 (r232098) +++ head/sys/fs/ntfs/ntfs_vfsops.c Fri Feb 24 07:29:06 2012 (r232099) @@ -33,6 +33,7 @@ #include sys/systm.h #include sys/namei.h #include sys/conf.h +#include sys/priv.h #include sys/proc.h #include sys/kernel.h #include sys/vnode.h @@ -150,13 +151,16 @@ static const char *ntfs_opts[] = { }; static int -ntfs_mount (struct mount *mp) +ntfs_mount(struct mount *mp) { - int err = 0, error; - struct vnode*devvp; + int err = 0, error; + accmode_t accmode; + struct vnode *devvp; struct nameidata ndp; + struct thread *td; char *from; + td = curthread; if (vfs_filteropt(mp-mnt_optnew, ntfs_opts)) return (EINVAL); @@ -183,7 +187,7 @@ ntfs_mount (struct mount *mp) * Not an update, or updating the name: look up the name * and verify that it refers to a sensible block device. */ - NDINIT(ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, from, curthread); + NDINIT(ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, from, td); err = namei(ndp); if (err) { /* can't get devvp!*/ @@ -197,6 +201,21 @@ ntfs_mount (struct mount *mp) return (err); } + /* +* If mount by non-root, then verify that user has necessary +* permissions on the device. +*/ + accmode = VREAD; + if ((mp-mnt_flag MNT_RDONLY) == 0) + accmode |= VWRITE; + err = VOP_ACCESS(devvp, accmode, td-td_ucred, td); + if (err) + err = priv_check(td, PRIV_VFS_MOUNT_PERM); + if (err) { + vput(devvp); + return (err); + } + if (mp-mnt_flag MNT_UPDATE) { #if 0 /* @@ -230,7 +249,7 @@ ntfs_mount (struct mount *mp) /* Save mounted from info for mount point (NULL pad)*/ vfs_mountedfrom(mp, from); - err = ntfs_mountfs(devvp, mp, curthread); + err = ntfs_mountfs(devvp, mp, td); } if (err) { vrele(devvp); @@ -243,7 +262,7 @@ error_1:/* no state to back out*/ /* XXX: missing NDFREE(ndp, ...) */ success: - return(err); + return (err); } /* ___ 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: r232100 - head/sys/fs/ntfs
Author: kevlo Date: Fri Feb 24 07:30:44 2012 New Revision: 232100 URL: http://svn.freebsd.org/changeset/base/232100 Log: Remove an unused structure and unnecessary cast Modified: head/sys/fs/ntfs/ntfs.h head/sys/fs/ntfs/ntfs_vfsops.c Modified: head/sys/fs/ntfs/ntfs.h == --- head/sys/fs/ntfs/ntfs.h Fri Feb 24 07:29:06 2012(r232099) +++ head/sys/fs/ntfs/ntfs.h Fri Feb 24 07:30:44 2012(r232100) @@ -36,7 +36,7 @@ typedef u_int16_t wchar; #pragma pack(1) #define BBSIZE 1024 #defineBBOFF ((off_t)(0)) -#defineBBLOCK ((daddr_t)(0)) +#defineBBLOCK 0 #defineNTFS_MFTINO 0 #defineNTFS_VOLUMEINO 3 #defineNTFS_ATTRDEFINO 4 Modified: head/sys/fs/ntfs/ntfs_vfsops.c == --- head/sys/fs/ntfs/ntfs_vfsops.c Fri Feb 24 07:29:06 2012 (r232099) +++ head/sys/fs/ntfs/ntfs_vfsops.c Fri Feb 24 07:30:44 2012 (r232100) @@ -67,8 +67,6 @@ MALLOC_DEFINE(M_NTFSNTNODE,ntfs_ntnode MALLOC_DEFINE(M_NTFSFNODE,ntfs_fnode, NTFS fnode information); MALLOC_DEFINE(M_NTFSDIR,ntfs_dir, NTFS dir buffer); -struct sockaddr; - static int ntfs_mountfs(register struct vnode *, struct mount *, struct thread *); static int ntfs_calccfree(struct ntfsmount *ntmp, cn_t *cfreep); ___ 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: r232101 - head/usr.sbin/wake
Author: jh Date: Fri Feb 24 07:49:55 2012 New Revision: 232101 URL: http://svn.freebsd.org/changeset/base/232101 Log: style(9). MFC after:2 weeks Modified: head/usr.sbin/wake/wake.c Modified: head/usr.sbin/wake/wake.c == --- head/usr.sbin/wake/wake.c Fri Feb 24 07:30:44 2012(r232100) +++ head/usr.sbin/wake/wake.c Fri Feb 24 07:49:55 2012(r232101) @@ -78,7 +78,7 @@ wake(int bpf, const char *host) if (get_ether(host, macaddr) == -1) return (-1); - return send_wakeup(bpf, macaddr); + return (send_wakeup(bpf, macaddr)); } static int @@ -111,10 +111,10 @@ find_ether(char *dst, size_t len) int nifs; if (dst == NULL || len == 0) - return 0; + return (0); if (getifaddrs(ifap) != 0) - return -1; + return (-1); /* XXX also check the link state */ for (nifs = 0, ifa = ifap; ifa; ifa = ifa-ifa_next) @@ -128,7 +128,7 @@ find_ether(char *dst, size_t len) } freeifaddrs(ifap); - return nifs == 1 ? 0 : -1; + return (nifs == 1 ? 0 : -1); } static int ___ 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: r232102 - head/usr.sbin/wake
Author: jh Date: Fri Feb 24 07:54:08 2012 New Revision: 232102 URL: http://svn.freebsd.org/changeset/base/232102 Log: Exit with proper status when wake() fails. PR: bin/153527 Submitted by: Douglas Steinwand MFC after:2 weeks Modified: head/usr.sbin/wake/wake.c Modified: head/usr.sbin/wake/wake.c == --- head/usr.sbin/wake/wake.c Fri Feb 24 07:49:55 2012(r232101) +++ head/usr.sbin/wake/wake.c Fri Feb 24 07:54:08 2012(r232102) @@ -183,7 +183,7 @@ send_wakeup(int bpf, struct ether_addr c int main(int argc, char *argv[]) { - int bpf, n; + int bpf, n, rval; char ifname[IF_NAMESIZE]; if (argc 2) @@ -204,10 +204,13 @@ main(int argc, char *argv[]) if (n = argc) usage(); - for (; n argc; n++) - if (wake(bpf, argv[n])) + rval = 0; + for (; n argc; n++) { + if (wake(bpf, argv[n]) != 0) { + rval = 1; warn(Cannot send Wake on LAN frame over `%s' to `%s', ifname, argv[n]); - - return (0); + } + } + exit(rval); } ___ 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