Commit Graph

52361 Commits

Author SHA1 Message Date
Warner Losh
040cba413a Minor style(9)isms. 2005-02-21 07:22:50 +00:00
Scott Long
5f2657119e - Remove dead code.
- Protect against negative values as array indexes.

Submitted by: Coverity Prevent analysis tool
2005-02-21 05:17:29 +00:00
Scott Long
b21e62e35a Check for BIOS version 3.0 as well as 3.1.
Submitted by: Coverity Prevent analysis tool
2005-02-21 00:32:03 +00:00
Scott Long
38cedb4414 Reference a pointer correctly when copying to it's location.
Submitted by: Coverity Prevent analysis tool
2005-02-21 00:28:36 +00:00
Scott Long
01910bab7d Check the correct periph pointer after search for it.
Submitted by: Coverity Prevent analysis tool
2005-02-20 23:51:20 +00:00
Scott Long
661658a6fa Protect against trying to free a non-existant peripheral.
Submitted by: Coverity Prevent analysis tool
MFC After: 3 days
2005-02-20 23:45:49 +00:00
Nate Lawson
a47331bb73 Don't attach ichss if est is present. On systems that seem to support both,
the multi-setting EST is preferable.
2005-02-20 23:41:20 +00:00
Robert Watson
892af6b930 style(9)-ize function headers, remove use of 'register'.
MFC after:	3 days
2005-02-20 23:22:13 +00:00
David Schultz
e8ed933099 Remove VFS_START(). Its original purpose involved the mfs filesystem,
which is long gone.

Discussed with:	mckusick
Reviewed by:	phk
2005-02-20 23:02:20 +00:00
David Schultz
0e2b18143f Replace the workaround for a deadlock bug in Coda with a different
workaround that does not rely on vfs_start().
2005-02-20 23:01:57 +00:00
Olivier Houchard
6d4b3b4cb5 MFp4: get the code that set the pc correctly to work, remove a few IQ31244
specific mappings from locore.S, re-organize iq31244_machdep.c to work with
the new locore.S

Spotted out by:	jmg
2005-02-20 21:34:59 +00:00
Warner Losh
509cfe6fb0 Be more verbose on errors with CIS reading. This should be a noop, but
appears to fix the ath problem that had been reported.  I don't see how
it can, so there's likely some other hidden bug.
2005-02-20 20:36:16 +00:00
Warner Losh
164b196506 style(9) nit 2005-02-20 20:32:44 +00:00
Nate Lawson
f5a3ee3088 Hook EST up to the build. 2005-02-20 20:29:04 +00:00
Nate Lawson
f0fe2e77e2 Add the Enhanced SpeedStep driver (EST). Currently, this driver only works
on the previous generation of Pentium-M processors (Banias).  Support for
Dothan and later processors involves working with acpi_perf(4) to extract
information about supported states.  This driver should work on MP systems
including HTT.  It is experimental and may have a few bugs but has been
tested to not crash at least.

Thanks to Colin Percival for his initial work on this driver.
2005-02-20 20:27:59 +00:00
Robert Watson
d664e4fa50 In unp_attach(), allow uma_zalloc to zero the new unpcb rather than
explicitly using bzero().

Update copyright.

MFC after:	3 days
2005-02-20 20:05:11 +00:00
Warner Losh
57be6dcf4c Fix merging botch I made in last version. 2005-02-20 19:59:29 +00:00
Warner Losh
df889dba95 Perliminary support for Fujitsu SCSI LAN combo card. At least for the
LAN side of things.  It appears that all that's necessary is to relax
the check on the DLCR2 register in the probe.
2005-02-20 19:40:29 +00:00
Warner Losh
8600638b4c Back out part of 1.23. This was a work in progress to support the
Fujitsu LAN SCSI card's ethernet side.
2005-02-20 19:38:38 +00:00
Warner Losh
2f3ed70a98 Forced commit after moving mb86960.h from i386/isa/ic to dev/fe. It
is only used by the fe driver, and isn't MD.
2005-02-20 19:33:13 +00:00
Warner Losh
b38c5039bd Minor optimizations to compile out bits that aren't necessary when
certain options aren't enabled.

Submitted by: Chiharu Shibata-san (chi at bd mbn or jp)
2005-02-20 18:44:45 +00:00
Warner Losh
0bc7d522b1 Minor style(9) tweaks. 2005-02-20 18:39:54 +00:00
Warner Losh
89c8738b67 Correct typo in comment.
Submitted by: Chiharu Shibata-san (chi at bd mbn or jp)
2005-02-20 18:24:09 +00:00
Robert Watson
2b85a170d1 Prefer NULL to returning 0 cast to a pointer type.
MFC after:	3 days
2005-02-20 15:56:13 +00:00
Robert Watson
a00428ef92 In soreceive(), when considering delivery to a socket in SS_ISCONFIRMING,
only call the protocol's pru_rcvd() if the protocol has the flag
PR_WANTRCVD set.  This brings that instance of pru_rcvd() into line with
the rest, which do check the flag.

MFC after:	3 days
2005-02-20 15:54:44 +00:00
Xin LI
a16baf37b9 The recomputation of file system summary at mount time can be a
very slow process, especially for large file systems that is just
recovered from a crash.

Since the summary is already re-sync'ed every 30 second, we will
not lag behind too much after a crash.  With this consideration
in mind, it is more reasonable to transfer the responsibility to
background fsck, to reduce the delay after a crash.

Add a new sysctl variable, vfs.ffs.compute_summary_at_mount, to
control this behavior.  When set to nonzero, we will get the
"old" behavior, that the summary is computed immediately at mount
time.

Add five new sysctl variables to adjust ndir, nbfree, nifree,
nffree and numclusters respectively.  Teach fsck_ffs about these
API, however, intentionally not to check the existence, since
kernels without these sysctls must have recomputed the summary
and hence no adjustments are necessary.

This change has eliminated the usual tens of minutes of delay of
mounting large dirty volumes.

Reviewed by:	mckusick
MFC After:	1 week
2005-02-20 08:02:15 +00:00
Robert Watson
7301cf23ef Move assignment of UNIX domain socket pcb during unp_attach() outside
of the global UNIX domain socket mutex: no protection is needed that
early in the setup of the UNIX domain socket and socket structures.

MFC after:	3 days
2005-02-20 04:18:22 +00:00
Marius Strobl
6ff81db1a7 Add a note that all four HME chips on a SUNW,qfe card share the same PROM,
making it a bit more clear why we can read four NAs from the VPD.

MFC after:	1 day
2005-02-20 01:52:43 +00:00
Olivier Houchard
2f5f750d3c Removing the #endif as well sounds like a good idea. 2005-02-20 01:26:01 +00:00
Olivier Houchard
8c06401dab In cpufunc_control, uncomment the code responsible for returning the old
state of the control register.
2005-02-20 01:24:46 +00:00
Nate Lawson
e959a70bad Add the "freq_settings" sysctl to each device that registers with cpufreq
so their individual settings can be seen separately for debugging.
2005-02-20 00:59:15 +00:00
Ruslan Ermilov
3971d2cf5e Use a common multi-inclusion protection, and add such a
protection to alpha/include/exec.h.
2005-02-19 21:16:48 +00:00
Gleb Smirnoff
f1c6a420b1 Reimplement recursion protection, checking whether current thread holds
sockbuf mutex.

Reviewed by:	rwatson
2005-02-19 14:41:49 +00:00
Marius Strobl
949d92c657 Bump __FreeBSD_version for the Intel C/C++ compiler GCC-compatibility
fixes in src/include/stdbool.h rev. 1.7 and src/sys/i386/include/_types.h
rev. 1.10, required by ports/lang/icc.
2005-02-19 13:48:53 +00:00
Marius Strobl
b18fcf5ff2 Together with the changes to compile kernels with the Intel C/C++ compiler
preliminary support for using the GCC-compatibility of ICC was committed
but couldn't be tested at that time due to problems with ICC itself. Since
ICC 8.1 it's possible to use its GCC-compatibility under FreeBSD and it
turned out that a typedef for __gnuc_va_list is required in that case.
Revert the part of rev. 1.8 which #ifdef'ed out __gnuc_va_list for ICC.

MFC after:	1 week
2005-02-19 13:46:40 +00:00
Poul-Henning Kamp
dfd4be14bd Try to unbreak the vnode locking around vop_reclaim() (based mostly on
patch from kan@).

Pull bufobj_invalbuf() out of vinvalbuf() and make g_vfs call it on
close.  This is not yet a generally safe function, but for this very
specific use it is safe.  This solves the problem with buffers not
being flushed by unmount or after failed mount attempts.
2005-02-19 11:44:57 +00:00
Xin LI
d5128ab2af When clearing a fragment, it's possible that the length is zero.
Reviewed by:	mckusick
MFC After:	1 week
2005-02-19 07:31:33 +00:00
Nate Lawson
28d7170f1c Add a new field to struct cf_setting for special values. These are driver-
specific values that other components may want to use.  Add support to
acpi_perf(4) to export the control and status values via this field.
2005-02-19 06:13:26 +00:00
David Xu
1089f0319b Don't restart a timeout wait in kern_sigtimedwait, also allow it
to wait longer than a single integer can represent.
2005-02-19 06:05:49 +00:00
Paul Saab
7a5147540a Fix for a potential NFS client race where shared data is updated from
base context as well as the socket callback.

Submitted by:	Mohan Srinivasan
2005-02-18 23:41:39 +00:00
Ruslan Ermilov
6ee20ab521 Allocate the M_VLANTAG m_pkthdr flag, and use it to indicate that
a packet has VLAN mbuf tag attached.  This is faster to check than
m_tag_locate(), and allows us to use the tags in non-vlan(4) VLAN
producers.

The first argument to VLAN_OUTPUT_TAG() is now unused but retained
for backward compatibility.

While here, embellish a fix in rev. 1.174 of if_ethersubr.c -- it
now checks for packets with VLAN (mbuf) tags, and it should now
be possible to bridge(4) on vlan(4)'s whose parent interfaces
support VLAN decapsulation in hardware.

Reviewed by:	sam
2005-02-18 22:31:19 +00:00
Paul Saab
b7820945ac Swap the arguments for CP so we copy the correct source and
destination.
2005-02-18 22:14:40 +00:00
Robert Watson
29bdd01910 Remove now unused 'int s' from spl().
MFC after:	3 days
2005-02-18 21:39:55 +00:00
Robert Watson
d8d716bef5 De-spl kern_connect().
MFC after:	3 days
2005-02-18 19:37:36 +00:00
Robert Watson
a7ae36bc45 Correct a typo in the comment describing soreceive_rcvoob().
MFC after:	3 days
2005-02-18 19:15:22 +00:00
Robert Watson
1b5c4b15b4 In soconnect(), when resetting so->so_error, the socket lock is not
required due to a straight integer write in which minor races are not
a problem.
2005-02-18 19:13:51 +00:00
Robert Watson
11d06c4b78 Re-style do_setopt_accept_filter() to match uipc_accf.c style, and fix
one other style nit in the file.

MFC after:	3 days
2005-02-18 19:01:22 +00:00
John Baldwin
38765a3178 - Add a custom version of exec_copyin_args() to deal with the 32-bit
pointers in argv and envv in userland and use that together with
  kern_execve() and exec_free_args() to implement freebsd32_execve()
  without using the stackgap.
- Fix freebsd32_adjtime() to call adjtime() rather than utimes().  Still
  uses stackgap for now.
- Use kern_setitimer(), kern_getitimer(), kern_select(), kern_utimes(),
  kern_statfs(), kern_fstatfs(), kern_fhstatfs(), kern_stat(),
  kern_fstat(), and kern_lstat().

Tested by:	cokane (amd64)
Silence on:	amd64, ia64
2005-02-18 18:56:04 +00:00
Robert Watson
78e436448f Move do_setopt_accept_filter() from uipc_socket.c to uipc_accf.c, where
the rest of the accept filter code currently lives.

MFC after:	3 days
2005-02-18 18:54:42 +00:00
John Baldwin
1d15fdd97b - Add a custom version of exec_copyin_args() to deal with the 32-bit
pointers in argv and envv in userland and use that together with
  kern_execve() and exec_free_args() to implement linux_execve() for the
  amd64/linux32 ABI without using the stackgap.
- Implement linux_nanosleep() using the recently added kern_nanosleep().
- Use linux_emul_convpath() instead of linux_emul_find() in
  exec_linux_imgact_try().

Tested by:	cokane
Silence on:	amd64
2005-02-18 18:51:59 +00:00