PERFORCE change 161613 for review
Marko Zec
zec at FreeBSD.org
Tue May 5 11:18:30 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=161613
Change 161613 by zec at zec_tpx32 on 2009/05/05 11:18:22
IFC @ 161608
Affected files ...
.. //depot/projects/vimage/src/share/man/man4/u3g.4#4 integrate
.. //depot/projects/vimage/src/sys/amd64/amd64/identcpu.c#16 integrate
.. //depot/projects/vimage/src/sys/amd64/amd64/local_apic.c#18 integrate
.. //depot/projects/vimage/src/sys/amd64/amd64/mp_machdep.c#22 integrate
.. //depot/projects/vimage/src/sys/amd64/include/apicvar.h#8 integrate
.. //depot/projects/vimage/src/sys/amd64/include/clock.h#6 integrate
.. //depot/projects/vimage/src/sys/amd64/isa/clock.c#11 integrate
.. //depot/projects/vimage/src/sys/amd64/linux32/linux32_sysvec.c#16 integrate
.. //depot/projects/vimage/src/sys/compat/linux/linux_futex.c#11 integrate
.. //depot/projects/vimage/src/sys/compat/linux/linux_futex.h#7 integrate
.. //depot/projects/vimage/src/sys/compat/linux/linux_mib.c#5 integrate
.. //depot/projects/vimage/src/sys/compat/linux/linux_socket.c#18 integrate
.. //depot/projects/vimage/src/sys/conf/files#66 integrate
.. //depot/projects/vimage/src/sys/conf/kern.post.mk#8 integrate
.. //depot/projects/vimage/src/sys/conf/options#48 integrate
.. //depot/projects/vimage/src/sys/dev/acpica/acpi_cpu.c#11 integrate
.. //depot/projects/vimage/src/sys/dev/ath/if_ath.c#35 integrate
.. //depot/projects/vimage/src/sys/dev/bwi/bitops.h#1 branch
.. //depot/projects/vimage/src/sys/dev/bwi/bwimac.c#1 branch
.. //depot/projects/vimage/src/sys/dev/bwi/bwimac.h#1 branch
.. //depot/projects/vimage/src/sys/dev/bwi/bwiphy.c#1 branch
.. //depot/projects/vimage/src/sys/dev/bwi/bwiphy.h#1 branch
.. //depot/projects/vimage/src/sys/dev/bwi/bwirf.c#1 branch
.. //depot/projects/vimage/src/sys/dev/bwi/bwirf.h#1 branch
.. //depot/projects/vimage/src/sys/dev/bwi/if_bwi.c#1 branch
.. //depot/projects/vimage/src/sys/dev/bwi/if_bwi_pci.c#1 branch
.. //depot/projects/vimage/src/sys/dev/bwi/if_bwireg.h#1 branch
.. //depot/projects/vimage/src/sys/dev/bwi/if_bwivar.h#1 branch
.. //depot/projects/vimage/src/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#22 integrate
.. //depot/projects/vimage/src/sys/dev/if_ndis/if_ndis.c#25 integrate
.. //depot/projects/vimage/src/sys/dev/if_ndis/if_ndisvar.h#11 integrate
.. //depot/projects/vimage/src/sys/dev/ipw/if_ipw.c#14 integrate
.. //depot/projects/vimage/src/sys/dev/ipw/if_ipwvar.h#5 integrate
.. //depot/projects/vimage/src/sys/dev/iwi/if_iwi.c#15 integrate
.. //depot/projects/vimage/src/sys/dev/iwi/if_iwivar.h#5 integrate
.. //depot/projects/vimage/src/sys/dev/iwn/if_iwn.c#8 integrate
.. //depot/projects/vimage/src/sys/dev/iwn/if_iwnvar.h#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/wlan/if_rum.c#7 integrate
.. //depot/projects/vimage/src/sys/dev/usb/wlan/if_rumvar.h#6 integrate
.. //depot/projects/vimage/src/sys/dev/usb/wlan/if_uath.c#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/wlan/if_uathvar.h#2 integrate
.. //depot/projects/vimage/src/sys/dev/usb/wlan/if_ural.c#8 integrate
.. //depot/projects/vimage/src/sys/dev/usb/wlan/if_uralvar.h#6 integrate
.. //depot/projects/vimage/src/sys/dev/usb/wlan/if_zyd.c#7 integrate
.. //depot/projects/vimage/src/sys/dev/usb/wlan/if_zydreg.h#4 integrate
.. //depot/projects/vimage/src/sys/dev/usb/wlan/usb_wlan.h#4 delete
.. //depot/projects/vimage/src/sys/dev/wi/if_wi.c#15 integrate
.. //depot/projects/vimage/src/sys/dev/wi/if_wivar.h#6 integrate
.. //depot/projects/vimage/src/sys/dev/wpi/if_wpi.c#11 integrate
.. //depot/projects/vimage/src/sys/dev/wpi/if_wpivar.h#4 integrate
.. //depot/projects/vimage/src/sys/fs/nfs/nfs.h#1 branch
.. //depot/projects/vimage/src/sys/fs/nfs/nfs_commonacl.c#1 branch
.. //depot/projects/vimage/src/sys/fs/nfs/nfs_commonkrpc.c#1 branch
.. //depot/projects/vimage/src/sys/fs/nfs/nfs_commonport.c#1 branch
.. //depot/projects/vimage/src/sys/fs/nfs/nfs_commonsubs.c#1 branch
.. //depot/projects/vimage/src/sys/fs/nfs/nfs_var.h#1 branch
.. //depot/projects/vimage/src/sys/fs/nfs/nfscl.h#1 branch
.. //depot/projects/vimage/src/sys/fs/nfs/nfsclstate.h#1 branch
.. //depot/projects/vimage/src/sys/fs/nfs/nfsdport.h#1 branch
.. //depot/projects/vimage/src/sys/fs/nfs/nfskpiport.h#1 branch
.. //depot/projects/vimage/src/sys/fs/nfs/nfsm_subs.h#1 branch
.. //depot/projects/vimage/src/sys/fs/nfs/nfsport.h#1 branch
.. //depot/projects/vimage/src/sys/fs/nfs/nfsproto.h#1 branch
.. //depot/projects/vimage/src/sys/fs/nfs/nfsrvcache.h#1 branch
.. //depot/projects/vimage/src/sys/fs/nfs/nfsrvstate.h#1 branch
.. //depot/projects/vimage/src/sys/fs/nfs/nfsv4_errstr.h#1 branch
.. //depot/projects/vimage/src/sys/fs/nfs/rpcv2.h#1 branch
.. //depot/projects/vimage/src/sys/fs/nfs/xdr_subs.h#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsclient/nfs.h#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsclient/nfs_clbio.c#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsclient/nfs_clcomsubs.c#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsclient/nfs_clkrpc.c#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsclient/nfs_cllock.c#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsclient/nfs_clnfsiod.c#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsclient/nfs_clnode.c#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsclient/nfs_clport.c#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsclient/nfs_clrpcops.c#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsclient/nfs_clstate.c#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsclient/nfs_clsubs.c#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsclient/nfs_clvfsops.c#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsclient/nfs_clvnops.c#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsclient/nfs_lock.h#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsclient/nfsargs.h#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsclient/nfsdiskless.h#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsclient/nfsmount.h#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsclient/nfsnode.h#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsclient/nlminfo.h#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsserver/nfs_nfsdcache.c#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsserver/nfs_nfsdkrpc.c#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsserver/nfs_nfsdport.c#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsserver/nfs_nfsdserv.c#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsserver/nfs_nfsdsocket.c#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsserver/nfs_nfsdstate.c#1 branch
.. //depot/projects/vimage/src/sys/fs/nfsserver/nfs_nfsdsubs.c#1 branch
.. //depot/projects/vimage/src/sys/geom/vinum/geom_vinum_var.h#4 integrate
.. //depot/projects/vimage/src/sys/i386/bios/apm.c#7 integrate
.. //depot/projects/vimage/src/sys/i386/i386/identcpu.c#18 integrate
.. //depot/projects/vimage/src/sys/i386/i386/local_apic.c#18 integrate
.. //depot/projects/vimage/src/sys/i386/i386/mp_machdep.c#21 integrate
.. //depot/projects/vimage/src/sys/i386/include/apicvar.h#9 integrate
.. //depot/projects/vimage/src/sys/i386/include/clock.h#6 integrate
.. //depot/projects/vimage/src/sys/i386/isa/clock.c#10 integrate
.. //depot/projects/vimage/src/sys/i386/linux/linux_sysvec.c#12 integrate
.. //depot/projects/vimage/src/sys/i386/xen/clock.c#6 integrate
.. //depot/projects/vimage/src/sys/i386/xen/mp_machdep.c#10 integrate
.. //depot/projects/vimage/src/sys/isa/atrtc.c#3 integrate
.. //depot/projects/vimage/src/sys/isa/rtc.h#3 integrate
.. //depot/projects/vimage/src/sys/kern/init_main.c#25 integrate
.. //depot/projects/vimage/src/sys/kern/kern_fork.c#24 integrate
.. //depot/projects/vimage/src/sys/kern/kern_linker.c#25 integrate
.. //depot/projects/vimage/src/sys/kern/kern_osd.c#5 integrate
.. //depot/projects/vimage/src/sys/kern/kern_vimage.c#86 integrate
.. //depot/projects/vimage/src/sys/kern/subr_pcpu.c#9 integrate
.. //depot/projects/vimage/src/sys/kern/sys_socket.c#15 integrate
.. //depot/projects/vimage/src/sys/kern/tty.c#34 integrate
.. //depot/projects/vimage/src/sys/kern/uipc_socket.c#32 integrate
.. //depot/projects/vimage/src/sys/kern/uipc_syscalls.c#24 integrate
.. //depot/projects/vimage/src/sys/kern/uipc_usrreq.c#25 integrate
.. //depot/projects/vimage/src/sys/modules/bwi/Makefile#1 branch
.. //depot/projects/vimage/src/sys/net/bpf.c#34 integrate
.. //depot/projects/vimage/src/sys/net/if.c#81 integrate
.. //depot/projects/vimage/src/sys/net/if_clone.c#14 integrate
.. //depot/projects/vimage/src/sys/net/if_ethersubr.c#40 integrate
.. //depot/projects/vimage/src/sys/net/if_var.h#35 integrate
.. //depot/projects/vimage/src/sys/net/netisr.c#15 integrate
.. //depot/projects/vimage/src/sys/net/rtsock.c#34 integrate
.. //depot/projects/vimage/src/sys/net80211/ieee80211.c#32 integrate
.. //depot/projects/vimage/src/sys/net80211/ieee80211.h#14 integrate
.. //depot/projects/vimage/src/sys/net80211/ieee80211_adhoc.c#10 integrate
.. //depot/projects/vimage/src/sys/net80211/ieee80211_ddb.c#23 integrate
.. //depot/projects/vimage/src/sys/net80211/ieee80211_freebsd.c#20 integrate
.. //depot/projects/vimage/src/sys/net80211/ieee80211_freebsd.h#18 integrate
.. //depot/projects/vimage/src/sys/net80211/ieee80211_ht.h#11 integrate
.. //depot/projects/vimage/src/sys/net80211/ieee80211_ioctl.c#24 integrate
.. //depot/projects/vimage/src/sys/net80211/ieee80211_node.c#22 integrate
.. //depot/projects/vimage/src/sys/net80211/ieee80211_node.h#14 integrate
.. //depot/projects/vimage/src/sys/net80211/ieee80211_proto.c#16 integrate
.. //depot/projects/vimage/src/sys/net80211/ieee80211_scan.c#10 integrate
.. //depot/projects/vimage/src/sys/net80211/ieee80211_scan.h#6 integrate
.. //depot/projects/vimage/src/sys/net80211/ieee80211_scan_sta.c#15 integrate
.. //depot/projects/vimage/src/sys/net80211/ieee80211_superg.c#4 integrate
.. //depot/projects/vimage/src/sys/net80211/ieee80211_superg.h#2 integrate
.. //depot/projects/vimage/src/sys/net80211/ieee80211_var.h#27 integrate
.. //depot/projects/vimage/src/sys/netgraph/netgraph.h#21 integrate
.. //depot/projects/vimage/src/sys/netinet/if_ether.c#43 integrate
.. //depot/projects/vimage/src/sys/netinet/igmp.c#38 integrate
.. //depot/projects/vimage/src/sys/netinet/in_rmx.c#33 integrate
.. //depot/projects/vimage/src/sys/netinet/ip_input.c#56 integrate
.. //depot/projects/vimage/src/sys/netinet/tcp_hostcache.c#36 integrate
.. //depot/projects/vimage/src/sys/netinet6/in6_rmx.c#35 integrate
.. //depot/projects/vimage/src/sys/netinet6/ip6_mroute.c#24 integrate
.. //depot/projects/vimage/src/sys/netinet6/mld6.c#24 integrate
.. //depot/projects/vimage/src/sys/netinet6/nd6.c#50 integrate
.. //depot/projects/vimage/src/sys/netinet6/nd6_nbr.c#35 integrate
.. //depot/projects/vimage/src/sys/netipsec/xform_tcp.c#6 integrate
.. //depot/projects/vimage/src/sys/nfsclient/nfs_kdtrace.c#2 integrate
.. //depot/projects/vimage/src/sys/nfsclient/nfs_krpc.c#4 integrate
.. //depot/projects/vimage/src/sys/nfsclient/nfs_vnops.c#33 integrate
.. //depot/projects/vimage/src/sys/pc98/cbus/clock.c#8 integrate
.. //depot/projects/vimage/src/sys/sys/jail.h#12 integrate
.. //depot/projects/vimage/src/sys/sys/proc.h#30 integrate
.. //depot/projects/vimage/src/sys/sys/ucred.h#8 integrate
.. //depot/projects/vimage/src/sys/sys/vimage.h#90 integrate
.. //depot/projects/vimage/src/sys/vm/vnode_pager.c#14 integrate
Differences ...
==== //depot/projects/vimage/src/share/man/man4/u3g.4#4 (text+ko) ====
@@ -16,7 +16,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.\" $FreeBSD: src/share/man/man4/u3g.4,v 1.10 2009/04/23 08:37:56 brueffer Exp $
+.\" $FreeBSD: src/share/man/man4/u3g.4,v 1.11 2009/05/02 11:59:56 hrs Exp $
.\"
.Dd October 7, 2008
.Dt U3G 4
@@ -66,13 +66,13 @@
.It
Huawei B190, E220 ('<Huawei Mobile>')
.It
-Novatal U740, MC950D, X950D, etc.
+Novatel U740, MC950D, X950D, etc.
.It
Sierra MC875U, MC8775U, etc.
.El
.Pp
(See
-.Pa /sys/dev/u3g.c
+.Pa /sys/dev/usb/serial/u3g.c
for the complete list of supported cards for each vendor
mentioned above.)
.Pp
==== //depot/projects/vimage/src/sys/amd64/amd64/identcpu.c#16 (text+ko) ====
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.172 2009/04/29 06:54:40 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.173 2009/05/04 18:05:27 jkim Exp $");
#include "opt_cpu.h"
@@ -472,6 +472,22 @@
cpu_feature = regs[3];
cpu_feature2 = regs[2];
+ /*
+ * Clear "Limit CPUID Maxval" bit and get the largest standard CPUID
+ * function number again if it is set from BIOS. It is necessary
+ * for probing correct CPU topology later.
+ * XXX This is only done on the BSP package.
+ */
+ if (cpu_vendor_id == CPU_VENDOR_INTEL && cpu_high > 0 && cpu_high < 4) {
+ uint64_t msr;
+ msr = rdmsr(MSR_IA32_MISC_ENABLE);
+ if ((msr & 0x400000ULL) != 0) {
+ wrmsr(MSR_IA32_MISC_ENABLE, msr & ~0x400000ULL);
+ do_cpuid(0, regs);
+ cpu_high = regs[0];
+ }
+ }
+
if (cpu_vendor_id == CPU_VENDOR_INTEL ||
cpu_vendor_id == CPU_VENDOR_AMD ||
cpu_vendor_id == CPU_VENDOR_CENTAUR) {
==== //depot/projects/vimage/src/sys/amd64/amd64/local_apic.c#18 (text+ko) ====
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.54 2009/05/01 20:53:37 mav Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.55 2009/05/05 01:13:20 mav Exp $");
#include "opt_hwpmc_hooks.h"
#include "opt_kdtrace.h"
@@ -319,7 +319,7 @@
}
/* We don't setup the timer during boot on the BSP until later. */
- if (!(boot && PCPU_GET(cpuid) == 0)) {
+ if (!(boot && PCPU_GET(cpuid) == 0) && lapic_timer_hz != 0) {
KASSERT(lapic_timer_period != 0, ("lapic%u: zero divisor",
lapic_id()));
lapic_timer_set_divisor(lapic_timer_divisor);
==== //depot/projects/vimage/src/sys/amd64/amd64/mp_machdep.c#22 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.305 2009/04/30 22:10:04 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.306 2009/05/02 12:20:43 mav Exp $");
#include "opt_cpu.h"
#include "opt_kstack_pages.h"
@@ -57,6 +57,7 @@
#include <vm/vm_extern.h>
#include <machine/apicreg.h>
+#include <machine/clock.h>
#include <machine/cputypes.h>
#include <machine/cpufunc.h>
#include <machine/md_var.h>
@@ -1124,6 +1125,15 @@
sched_preempt(curthread);
/* Nothing to do for AST */
+
+ if (ipi_bitmap & (1 << IPI_HARDCLOCK))
+ hardclockintr(&frame);
+
+ if (ipi_bitmap & (1 << IPI_STATCLOCK))
+ statclockintr(&frame);
+
+ if (ipi_bitmap & (1 << IPI_PROFCLOCK))
+ profclockintr(&frame);
}
/*
==== //depot/projects/vimage/src/sys/amd64/include/apicvar.h#8 (text+ko) ====
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/include/apicvar.h,v 1.28 2009/03/17 00:48:11 jkim Exp $
+ * $FreeBSD: src/sys/amd64/include/apicvar.h,v 1.29 2009/05/02 12:20:43 mav Exp $
*/
#ifndef _MACHINE_APICVAR_H_
@@ -126,7 +126,10 @@
/* IPIs handled by IPI_BITMAPED_VECTOR (XXX ups is there a better place?) */
#define IPI_AST 0 /* Generate software trap. */
#define IPI_PREEMPT 1
-#define IPI_BITMAP_LAST IPI_PREEMPT
+#define IPI_HARDCLOCK 2
+#define IPI_STATCLOCK 3
+#define IPI_PROFCLOCK 4
+#define IPI_BITMAP_LAST IPI_PROFCLOCK
#define IPI_IS_BITMAPED(x) ((x) <= IPI_BITMAP_LAST)
#define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */
==== //depot/projects/vimage/src/sys/amd64/include/clock.h#6 (text+ko) ====
@@ -3,7 +3,7 @@
* Garrett Wollman, September 1994.
* This file is in the public domain.
*
- * $FreeBSD: src/sys/amd64/include/clock.h,v 1.61 2008/10/21 00:38:00 jkim Exp $
+ * $FreeBSD: src/sys/amd64/include/clock.h,v 1.63 2009/05/03 17:47:21 mav Exp $
*/
#ifndef _MACHINE_CLOCK_H_
@@ -15,7 +15,6 @@
* XXX large parts of the driver and its interface are misplaced.
*/
extern int clkintr_pending;
-extern int statclock_disable;
extern u_int i8254_freq;
extern int i8254_max_count;
extern uint64_t tsc_freq;
@@ -24,6 +23,12 @@
void i8254_init(void);
+struct trapframe;
+
+int hardclockintr(struct trapframe *frame);
+int statclockintr(struct trapframe *frame);
+int profclockintr(struct trapframe *frame);
+
/*
* Driver to clock driver interface.
*/
==== //depot/projects/vimage/src/sys/amd64/isa/clock.c#11 (text+ko) ====
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/isa/clock.c,v 1.244 2009/05/01 21:43:04 mav Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/isa/clock.c,v 1.246 2009/05/03 17:47:21 mav Exp $");
/*
* Routines to handle clock hardware.
@@ -53,6 +53,7 @@
#include <sys/kernel.h>
#include <sys/module.h>
#include <sys/sched.h>
+#include <sys/smp.h>
#include <sys/sysctl.h>
#include <machine/clock.h>
@@ -62,6 +63,7 @@
#include <machine/apicvar.h>
#include <machine/ppireg.h>
#include <machine/timerreg.h>
+#include <machine/smp.h>
#include <isa/rtc.h>
#ifdef DEV_ISA
@@ -74,7 +76,6 @@
int clkintr_pending;
static int pscnt = 1;
static int psdiv = 1;
-int statclock_disable;
#ifndef TIMER_FREQ
#define TIMER_FREQ 1193182
#endif
@@ -89,6 +90,7 @@
static u_int32_t i8254_offset;
static int (*i8254_pending)(struct intsrc *);
static int i8254_ticked;
+static int using_atrtc_timer;
static int using_lapic_timer;
/* Values for timerX_state: */
@@ -112,6 +114,37 @@
0 /* quality */
};
+int
+hardclockintr(struct trapframe *frame)
+{
+
+ if (PCPU_GET(cpuid) == 0)
+ hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame));
+ else
+ hardclock_cpu(TRAPF_USERMODE(frame));
+ if (!using_atrtc_timer)
+ statclockintr(frame);
+ return (FILTER_HANDLED);
+}
+
+int
+statclockintr(struct trapframe *frame)
+{
+
+ if (profprocs != 0)
+ profclock(TRAPF_USERMODE(frame), TRAPF_PC(frame));
+ statclock(TRAPF_USERMODE(frame));
+ return (FILTER_HANDLED);
+}
+
+int
+profclockintr(struct trapframe *frame)
+{
+
+ profclock(TRAPF_USERMODE(frame), TRAPF_PC(frame));
+ return (FILTER_HANDLED);
+}
+
static int
clkintr(struct trapframe *frame)
{
@@ -128,7 +161,11 @@
mtx_unlock_spin(&clock_lock);
}
KASSERT(!using_lapic_timer, ("clk interrupt enabled with lapic timer"));
- hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame));
+#ifdef SMP
+ if (smp_started)
+ ipi_all_but_self(IPI_HARDCLOCK);
+#endif
+ hardclockintr(frame);
return (FILTER_HANDLED);
}
@@ -209,10 +246,19 @@
if (profprocs != 0) {
if (--pscnt == 0)
pscnt = psdiv;
+#ifdef SMP
+ if (pscnt != psdiv && smp_started)
+ ipi_all_but_self(IPI_PROFCLOCK);
+#endif
profclock(TRAPF_USERMODE(frame), TRAPF_PC(frame));
}
- if (pscnt == psdiv)
+ if (pscnt == psdiv) {
+#ifdef SMP
+ if (smp_started)
+ ipi_all_but_self(IPI_STATCLOCK);
+#endif
statclock(TRAPF_USERMODE(frame));
+ }
}
return(flag ? FILTER_HANDLED : FILTER_STRAY);
}
@@ -414,7 +460,6 @@
void
cpu_initclocks()
{
- int diag;
using_lapic_timer = lapic_setup_clock();
/*
@@ -446,21 +491,17 @@
* kernel clocks, then setup the RTC to periodically interrupt to
* drive statclock() and profclock().
*/
- if (!statclock_disable && !using_lapic_timer) {
- diag = rtcin(RTC_DIAG);
- if (diag != 0)
- printf("RTC BIOS diagnostic error %b\n",
- diag, RTCDG_BITS);
-
- /* Setting stathz to nonzero early helps avoid races. */
- stathz = RTC_NOPROFRATE;
- profhz = RTC_PROFRATE;
-
- /* Enable periodic interrupts from the RTC. */
- intr_add_handler("rtc", 8,
- (driver_filter_t *)rtcintr, NULL, NULL,
- INTR_TYPE_CLK, NULL);
- atrtc_enable_intr();
+ if (!using_lapic_timer) {
+ using_atrtc_timer = atrtc_setup_clock();
+ if (using_atrtc_timer) {
+ /* Enable periodic interrupts from the RTC. */
+ intr_add_handler("rtc", 8,
+ (driver_filter_t *)rtcintr, NULL, NULL,
+ INTR_TYPE_CLK, NULL);
+ atrtc_enable_intr();
+ } else {
+ profhz = stathz = hz;
+ }
}
init_TSC_tc();
==== //depot/projects/vimage/src/sys/amd64/linux32/linux32_sysvec.c#16 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_sysvec.c,v 1.47 2009/05/01 15:36:02 dchagin Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_sysvec.c,v 1.48 2009/05/02 10:06:49 dchagin Exp $");
#include "opt_compat.h"
#ifndef COMPAT_IA32
@@ -76,6 +76,7 @@
#include <amd64/linux32/linux.h>
#include <amd64/linux32/linux32_proto.h>
+#include <compat/linux/linux_futex.h>
#include <compat/linux/linux_emul.h>
#include <compat/linux/linux_mib.h>
#include <compat/linux/linux_misc.h>
@@ -127,9 +128,6 @@
u_long stack, u_long ps_strings);
static void linux32_fixlimit(struct rlimit *rl, int which);
-extern LIST_HEAD(futex_list, futex) futex_list;
-extern struct mtx futex_mtx;
-
static eventhandler_tag linux_exit_tag;
static eventhandler_tag linux_schedtail_tag;
static eventhandler_tag linux_exec_tag;
==== //depot/projects/vimage/src/sys/compat/linux/linux_futex.c#11 (text+ko) ====
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linux/linux_futex.c,v 1.20 2009/05/01 15:36:02 dchagin Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linux/linux_futex.c,v 1.21 2009/05/02 10:06:49 dchagin Exp $");
#if 0
__KERNEL_RCSID(1, "$NetBSD: linux_futex.c,v 1.7 2006/07/24 19:01:49 manu Exp $");
#endif
@@ -81,7 +81,7 @@
TAILQ_HEAD(lf_waiting_proc, waiting_proc) f_waiting_proc;
};
-LIST_HEAD(futex_list, futex) futex_list;
+struct futex_list futex_list;
#define FUTEX_LOCK(f) sx_xlock(&(f)->f_lck)
#define FUTEX_UNLOCK(f) sx_xunlock(&(f)->f_lck)
==== //depot/projects/vimage/src/sys/compat/linux/linux_futex.h#7 (text+ko) ====
@@ -30,12 +30,15 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/compat/linux/linux_futex.h,v 1.6 2009/03/15 19:38:34 dchagin Exp $
+ * $FreeBSD: src/sys/compat/linux/linux_futex.h,v 1.7 2009/05/02 10:06:49 dchagin Exp $
*/
#ifndef _LINUX_FUTEX_H
#define _LINUX_FUTEX_H
+extern LIST_HEAD(futex_list, futex) futex_list;
+extern struct mtx futex_mtx;
+
#define LINUX_FUTEX_WAIT 0
#define LINUX_FUTEX_WAKE 1
#define LINUX_FUTEX_FD 2 /* unused */
==== //depot/projects/vimage/src/sys/compat/linux/linux_mib.c#5 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linux/linux_mib.c,v 1.30 2008/06/03 17:50:13 rdivacky Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linux/linux_mib.c,v 1.31 2009/05/04 19:06:05 jamie Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -78,7 +78,7 @@
}
SYSCTL_PROC(_compat_linux, OID_AUTO, osname,
- CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON,
+ CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE,
0, 0, linux_sysctl_osname, "A",
"Linux kernel OS name");
@@ -100,7 +100,7 @@
}
SYSCTL_PROC(_compat_linux, OID_AUTO, osrelease,
- CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON,
+ CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE,
0, 0, linux_sysctl_osrelease, "A",
"Linux kernel OS release");
@@ -121,7 +121,7 @@
}
SYSCTL_PROC(_compat_linux, OID_AUTO, oss_version,
- CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_PRISON,
+ CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE,
0, 0, linux_sysctl_oss_version, "I",
"Linux OSS version");
==== //depot/projects/vimage/src/sys/compat/linux/linux_socket.c#18 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.81 2009/04/26 22:06:42 zec Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.82 2009/05/02 10:51:40 dchagin Exp $");
/* XXX we use functions that might not exist. */
#include "opt_compat.h"
@@ -859,7 +859,10 @@
return (EINVAL);
bsd_args.type = args->type;
- bsd_args.protocol = args->protocol;
+ if (bsd_args.domain == AF_LOCAL && args->protocol == PF_UNIX)
+ bsd_args.protocol = 0;
+ else
+ bsd_args.protocol = args->protocol;
bsd_args.rsv = (int *)PTRIN(args->rsv);
return (socketpair(td, &bsd_args));
}
==== //depot/projects/vimage/src/sys/conf/files#66 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1396 2009/05/01 17:16:33 sam Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1398 2009/05/05 10:56:12 zec Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -712,6 +712,11 @@
dev/buslogic/bt_isa.c optional bt isa
dev/buslogic/bt_mca.c optional bt mca
dev/buslogic/bt_pci.c optional bt pci
+dev/bwi/bwiirf.c optional bwi
+dev/bwi/bwimac.c optional bwi
+dev/bwi/bwiphy.c optional bwi
+dev/bwi/if_bwi.c optional bwi
+dev/bwi/if_bwi_pci.c optional bwi pci
dev/cardbus/cardbus.c optional cardbus
dev/cardbus/cardbus_cis.c optional cardbus
dev/cardbus/cardbus_device.c optional cardbus
==== //depot/projects/vimage/src/sys/conf/kern.post.mk#8 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/kern.post.mk,v 1.104 2009/01/07 09:56:54 bz Exp $
+# $FreeBSD: src/sys/conf/kern.post.mk,v 1.105 2009/05/04 20:25:56 jhb Exp $
# Part of a unified Makefile for building kernels. This part includes all
# the definitions that need to be after all the % directives except %RULES
@@ -12,7 +12,8 @@
.if defined(DESTDIR)
MKMODULESENV+= DESTDIR="${DESTDIR}"
.endif
-MKMODULESENV+= KERNBUILDDIR="${.CURDIR}"
+SYSDIR?= ${S:C;^[^/];${.CURDIR}/&;}
+MKMODULESENV+= KERNBUILDDIR="${.CURDIR}" SYSDIR="${SYSDIR}"
.MAIN: all
@@ -29,7 +30,6 @@
# Handle out of tree ports
.if !defined(NO_MODULES) && defined(PORTS_MODULES)
-SYSDIR?= ${S:C;^[^/];${.CURDIR}/&;}
PORTSMODULESENV=SYSDIR=${SYSDIR}
.for __target in all install reinstall clean
${__target}: ports-${__target}
==== //depot/projects/vimage/src/sys/conf/options#48 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.667 2009/05/01 17:18:45 sam Exp $
+# $FreeBSD: src/sys/conf/options,v 1.668 2009/05/03 04:01:43 imp Exp $
#
# On the handling of kernel options
#
@@ -764,6 +764,10 @@
AH_USE_INIPDGAIN opt_ah.h
AH_MAXCHAN opt_ah.h
+# options for the Broadcom BCM43xx driver (bwi)
+BWI_DEBUG opt_bwi.h
+BWI_DEBUG_VERBOSE opt_bwi.h
+
# options for the Marvell 8335 wireless driver
MALO_DEBUG opt_malo.h
MALO_TXBUF opt_malo.h
==== //depot/projects/vimage/src/sys/dev/acpica/acpi_cpu.c#11 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_cpu.c,v 1.74 2009/03/26 21:10:35 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_cpu.c,v 1.77 2009/05/03 06:25:37 mav Exp $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -79,7 +79,6 @@
int cpu_features; /* Child driver supported features. */
/* Runtime state. */
int cpu_non_c3; /* Index of lowest non-C3 state. */
- int cpu_short_slp; /* Count of < 1us sleeps. */
u_int cpu_cx_stats[MAX_CX_STATES];/* Cx usage history. */
/* Values for sysctl. */
struct sysctl_ctx_list cpu_sysctl_ctx;
@@ -882,43 +881,13 @@
return;
}
- /*
- * If we slept 100 us or more, use the lowest Cx state. Otherwise,
- * find the lowest state that has a latency less than or equal to
- * the length of our last sleep.
- */
- cx_next_idx = sc->cpu_cx_lowest;
- if (sc->cpu_prev_sleep < 100) {
- /*
- * If we sleep too short all the time, this system may not implement
- * C2/3 correctly (i.e. reads return immediately). In this case,
- * back off and use the next higher level.
- * It seems that when you have a dual core cpu (like the Intel Core Duo)
- * that both cores will get out of C3 state as soon as one of them
- * requires it. This breaks the sleep detection logic as the sleep
- * counter is local to each cpu. Disable the sleep logic for now as a
- * workaround if there's more than one CPU. The right fix would probably
- * be to add quirks for system that don't really support C3 state.
- */
- if (mp_ncpus < 2 && sc->cpu_prev_sleep <= 1) {
- sc->cpu_short_slp++;
- if (sc->cpu_short_slp == 1000 && sc->cpu_cx_lowest != 0) {
- if (sc->cpu_non_c3 == sc->cpu_cx_lowest && sc->cpu_non_c3 != 0)
- sc->cpu_non_c3--;
- sc->cpu_cx_lowest--;
- sc->cpu_short_slp = 0;
- device_printf(sc->cpu_dev,
- "too many short sleeps, backing off to C%d\n",
- sc->cpu_cx_lowest + 1);
- }
- } else
- sc->cpu_short_slp = 0;
-
- for (i = sc->cpu_cx_lowest; i >= 0; i--)
- if (sc->cpu_cx_states[i].trans_lat <= sc->cpu_prev_sleep) {
- cx_next_idx = i;
- break;
- }
+ /* Find the lowest state that has small enough latency. */
+ cx_next_idx = 0;
+ for (i = sc->cpu_cx_lowest; i >= 0; i--) {
+ if (sc->cpu_cx_states[i].trans_lat * 3 <= sc->cpu_prev_sleep) {
+ cx_next_idx = i;
+ break;
+ }
}
/*
@@ -943,10 +912,10 @@
/*
* Execute HLT (or equivalent) and wait for an interrupt. We can't
* calculate the time spent in C1 since the place we wake up is an
- * ISR. Assume we slept one quantum and return.
+ * ISR. Assume we slept half of quantum and return.
*/
if (cx_next->type == ACPI_STATE_C1) {
- sc->cpu_prev_sleep = 1000000 / hz;
+ sc->cpu_prev_sleep = (sc->cpu_prev_sleep * 3 + 500000 / hz) / 4;
acpi_cpu_c1();
return;
}
@@ -989,9 +958,9 @@
}
ACPI_ENABLE_IRQS();
- /* Find the actual time asleep in microseconds, minus overhead. */
+ /* Find the actual time asleep in microseconds. */
end_time = acpi_TimerDelta(end_time, start_time);
- sc->cpu_prev_sleep = PM_USEC(end_time) - cx_next->trans_lat;
+ sc->cpu_prev_sleep = (sc->cpu_prev_sleep * 3 + PM_USEC(end_time)) / 4;
}
/*
@@ -1136,8 +1105,9 @@
sbuf_printf(&sb, "%u.%02u%% ", (u_int)(whole / sum),
(u_int)(fract / sum));
} else
- sbuf_printf(&sb, "0%% ");
+ sbuf_printf(&sb, "0.00%% ");
}
+ sbuf_printf(&sb, "last %dus", sc->cpu_prev_sleep);
sbuf_trim(&sb);
sbuf_finish(&sb);
sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req);
==== //depot/projects/vimage/src/sys/dev/ath/if_ath.c#35 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.248 2009/04/13 20:58:47 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.249 2009/05/02 20:16:55 sam Exp $");
/*
* Driver for the Atheros Wireless LAN controller.
@@ -3995,12 +3995,7 @@
if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0) {
#ifdef IEEE80211_SUPPORT_SUPERG
- if (ic->ic_stageqdepth) {
- ieee80211_age_stageq(ic, WME_AC_VO, 100);
- ieee80211_age_stageq(ic, WME_AC_VI, 100);
- ieee80211_age_stageq(ic, WME_AC_BE, 100);
- ieee80211_age_stageq(ic, WME_AC_BK, 100);
- }
+ ieee80211_ff_age_all(ic, 100);
#endif
if (!IFQ_IS_EMPTY(&ifp->if_snd))
ath_start(ifp);
@@ -4980,7 +4975,7 @@
* Flush fast-frame staging queue when traffic slows.
*/
if (txq->axq_depth <= 1)
- ieee80211_flush_stageq(ic, txq->axq_ac);
+ ieee80211_ff_flush(ic, txq->axq_ac);
#endif
return nacked;
}
==== //depot/projects/vimage/src/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#22 (text+ko) ====
@@ -28,7 +28,7 @@
***************************************************************************/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c,v 1.30 2009/04/11 22:07:19 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c,v 1.31 2009/05/05 10:56:12 zec Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1217,9 +1217,9 @@
* receive window.
*/
static __inline int
-select_rcv_wscale(int space, struct socket *so)
+select_rcv_wscale(int space, struct vnet *vnet)
{
- INIT_VNET_INET(so->so_vnet);
+ INIT_VNET_INET(vnet);
int wscale = 0;
if (space > MAX_RCV_WND)
@@ -1326,7 +1326,7 @@
calc_opt0h(struct socket *so, int mtu_idx)
{
struct tcpcb *tp = so_sototcpcb(so);
- int wscale = select_rcv_wscale(tp->rcv_wnd, so);
+ int wscale = select_rcv_wscale(tp->rcv_wnd, so->so_vnet);
return V_NAGLE((tp->t_flags & TF_NODELAY) == 0) |
V_KEEP_ALIVE((so_options_get(so) & SO_KEEPALIVE) != 0) | F_TCAM_BYPASS |
==== //depot/projects/vimage/src/sys/dev/if_ndis/if_ndis.c#25 (text+ko) ====
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis.c,v 1.157 2009/04/16 23:42:00 thompsa Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis.c,v 1.158 2009/05/02 15:14:18 thompsa Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -50,7 +50,6 @@
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/kthread.h>
-#include <sys/taskqueue.h>
#include <net/if.h>
@@ -173,7 +172,7 @@
int);
static int ndis_nettype_chan (uint32_t);
static int ndis_nettype_mode (uint32_t);
-static void ndis_scan (void *, int);
+static void ndis_scan (void *);
static void ndis_scan_results (struct ndis_softc *);
static void ndis_scan_start (struct ieee80211com *);
static void ndis_scan_end (struct ieee80211com *);
@@ -184,8 +183,6 @@
static void ndis_stop (struct ndis_softc *);
static int ndis_ifmedia_upd (struct ifnet *);
static void ndis_ifmedia_sts (struct ifnet *, struct ifmediareq *);
-static void ndis_auth (void *, int);
-static void ndis_assoc (void *, int);
static int ndis_get_assoc (struct ndis_softc *, ndis_wlan_bssid_ex **);
static int ndis_probe_offload (struct ndis_softc *);
static int ndis_set_offload (struct ndis_softc *);
@@ -741,13 +738,7 @@
uint32_t arg;
int r;
- sc->ndis_tq = taskqueue_create("nids_taskq", M_NOWAIT | M_ZERO,
- taskqueue_thread_enqueue, &sc->ndis_tq);
- taskqueue_start_threads(&sc->ndis_tq, 1, PI_NET, "%s taskq",
- device_get_nameunit(dev));
- TASK_INIT(&sc->ndis_scantask, 0, ndis_scan, sc);
- TASK_INIT(&sc->ndis_authtask, 0, ndis_auth, sc);
- TASK_INIT(&sc->ndis_assoctask, 0, ndis_assoc, sc);
+ callout_init(&sc->ndis_scan_callout, CALLOUT_MPSAFE);
ifp->if_ioctl = ndis_ioctl_80211;
ic->ic_ifp = ifp;
@@ -1054,12 +1045,6 @@
} else
NDIS_UNLOCK(sc);
- if (sc->ndis_80211) {
- taskqueue_drain(sc->ndis_tq, &sc->ndis_scantask);
- taskqueue_drain(sc->ndis_tq, &sc->ndis_authtask);
- taskqueue_drain(sc->ndis_tq, &sc->ndis_assoctask);
- }
-
if (sc->ndis_tickitem != NULL)
IoFreeWorkItem(sc->ndis_tickitem);
if (sc->ndis_startitem != NULL)
@@ -1121,8 +1106,6 @@
if (sc->ndis_iftype == PCIBus)
bus_dma_tag_destroy(sc->ndis_parent_tag);
- if (sc->ndis_80211)
- taskqueue_free(sc->ndis_tq);
return(0);
}
@@ -2419,30 +2402,6 @@
}
static void
-ndis_auth(void *arg, int npending)
-{
- struct ndis_softc *sc = arg;
- struct ifnet *ifp = sc->ifp;
- struct ieee80211com *ic = ifp->if_l2com;
- struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
-
- vap->iv_state = IEEE80211_S_AUTH;
- ndis_auth_and_assoc(sc, vap);
-}
-
-static void
-ndis_assoc(void *arg, int npending)
-{
- struct ndis_softc *sc = arg;
- struct ifnet *ifp = sc->ifp;
- struct ieee80211com *ic = ifp->if_l2com;
- struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
-
- vap->iv_state = IEEE80211_S_ASSOC;
- ndis_auth_and_assoc(sc, vap);
-}
-
-static void
ndis_auth_and_assoc(sc, vap)
struct ndis_softc *sc;
struct ieee80211vap *vap;
@@ -2656,9 +2615,6 @@
if (rval)
device_printf (sc->ndis_dev, "set ssid failed: %d\n", rval);
- if (vap->iv_state == IEEE80211_S_AUTH)
- ieee80211_new_state(vap, IEEE80211_S_ASSOC, 0);
-
return;
}
@@ -3304,13 +3260,18 @@
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list