Commit Graph

56065 Commits

Author SHA1 Message Date
davidxu
cba44476d8 Micro optimization for context switch. Eliminate code for saving gs.base
and fs.base. We always update pcb.pcb_gsbase and pcb.pcb_fsbase
when user wants to set them, in context switch routine, we only need to
write them into registers, we never have to read them out from registers
when thread is switched away. Since rdmsr is a serialization instruction,
micro benchmark shows it is worthy to do.

Reviewed by: peter, jhb
2005-10-17 23:10:31 +00:00
jhb
04ba111c31 Another bit of sx(4) removal. 2005-10-17 18:35:57 +00:00
cognet
655fee75e3 Strip the $a, $t and $d symbols if we're using DDB. There are useless and
confusing in a backtrace.
2005-10-17 18:31:37 +00:00
jkim
d5f4317ec6 Split displaying number of physical and logical cores. 2005-10-17 15:51:28 +00:00
cognet
491c0c2f2d Use the clock count register as a timecounter, as it's more accurate. 2005-10-17 14:51:01 +00:00
suz
021524b6b5 fixed a kernel crash when IPv6 PIM-SM routing is enabled and a PIM register message is received
Obtained from: KAME
MFC After: 3 days
2005-10-17 13:47:31 +00:00
imp
cc449adce9 Minor commentary correction 2005-10-17 08:20:44 +00:00
rodrigc
cb57dd08dd Unconditionally mount a CD9660 filesystem as read-only, instead of
returning EROFS if we forget to mount it as read-only.
2005-10-17 03:29:53 +00:00
rodrigc
49d8776e03 Use the actual sector size of the media instead of hard-coding it to 2048.
This eliminates KASSERTs in GEOM if we accidentally mount an audio CD
as a cd9660 filesystem.
2005-10-17 03:27:35 +00:00
rodrigc
adce9d7a14 Unconditionally mount a UDF filesystem as read-only, instead of
returning an EROFS if we forget to mount it as read-only.
2005-10-17 03:07:36 +00:00
imp
d98f60cef4 Check against 8019 rather than 8029 for reading in the MAC addr since
the former is the ISA part, not the latter.

MFC After 6.0 is unfrozen (this bug doesn't exist in 6.0 because I didn't
	MFC the rtl80x9 changes for ISA due to an error on my part)
2005-10-17 02:32:23 +00:00
flz
a0cf3f9b58 - Fix typo.
Approved by:	ssouhlal
MFC after:	1 week
2005-10-17 00:04:35 +00:00
truckman
321926b9ba Update nwfs_lookup() to match the current cache_lookup() API.
cache_lookup() has returned a ref'ed and locked vnode since
vfs_cache.c:1.96, dated Tue Mar 29 12:59:06 2005 UTC.  This change
is similar to the change made to smbfs_lookup() in smbfs_vnops.c:1.58.

Tested by:	"Antony Mawer" ant AT mawer.org
MFC after:	2 weeks
2005-10-16 21:54:35 +00:00
kris
fa8ac58228 Reflect mpsafety of the underlying filesystem in the nullfs image.
I benchmarked this by simultaneously extracting 4 large tarballs (basically
world images) on a 4-processor AMD64 system, in a malloc-backed md.

With this patch, system time was reduced by 43%, and wall clock time by 33%.

Submitted by:	jeff
MFC after: 	1 week
2005-10-16 21:45:25 +00:00
truckman
80700e8efc Apply the same fix to a potential race in the ISDOTDOT code in
cd9660_lookup() that was used to fix an actual race in ufs_lookup.c:1.78.
This is not currently a hazard, but the bug would be activated by
marking cd9660 as MPSAFE.

Requested by:	bde
2005-10-16 21:41:54 +00:00
truckman
199934d64b Apply the same fix to a potential race in the ISDOTDOT code in
ext2_lookup() that was used to fix an actual race in ufs_lookup.c:1.78.
This is not currently a hazard, but the bug would be activated by
marking ext2fs as MPSAFE.

Requested by:	bde
MFC after:	2 weeks
2005-10-16 21:39:29 +00:00
truckman
48313c9c1a Correct the type of the temporary variable used by ufs_lookup.c:1.78
to fix the race condition in the ufs_lookup() ISDOTDOT code.

Noticed by:	bde
MFC after:	12 days
2005-10-16 21:31:46 +00:00
phk
49fa638000 Use new functions to call into drivers methods. 2005-10-16 21:07:31 +00:00
phk
10f4dbda56 Make ttyconsolemode() call ttsetwater() so that drivers don't have to. 2005-10-16 20:58:22 +00:00
phk
9f01990d4c Use new (inline) functions for calls into driver. 2005-10-16 20:44:18 +00:00
phk
ed89346cf3 Make ttsetcompat() static 2005-10-16 20:40:40 +00:00
phk
3b17d622f4 Add a bunch of inline functions to call the drivers tty implementing methods. 2005-10-16 20:39:04 +00:00
phk
c20636eefa we know it is called rpclose() so call it directly. 2005-10-16 20:35:05 +00:00
phk
2853ff590d Eliminate two unused arguments to ttycreate(). 2005-10-16 20:22:56 +00:00
sobomax
643ec6468f Re-implement rev.1.76 with respect to the code size. 2005-10-16 20:22:36 +00:00
sobomax
f2877535cf Backout previous commit - for some reason it overflows space constrains on
amd64. Better version will follow.
2005-10-16 19:49:44 +00:00
nyan
b7c16d25ef Reduce diffs from i386/i386/machdep.c 2005-10-16 12:33:14 +00:00
obrien
8004d24aab For AMD processors, nullify CPUID.HTT. FreeBSD has no need for the
information it conveys, and it is only confusing people.
This fixes incorrect output in the previous commit.
2005-10-16 08:58:27 +00:00
grehan
ef9b7e3a14 The BCM5401 dspcode load on media changes also applies
to the 100/1000 BCM5400 phy. This fixes the problem with
the GEM port not syncing up on Sawtooth G4's.

Obtained from:  NetBSD
Reported by:    Ben Rosengart <ben + freebsd org at narcissus net>
2005-10-16 05:29:14 +00:00
imp
bbd43600a6 Mempage should be 1024 not 4096. This fixes the multiple 16-bit cards
failing to work in, eg, Soekris boxes.

This is a critcal fix for 6.0.

MFC After: ASAP
2005-10-16 03:58:06 +00:00
sobomax
647fab7646 Add new option `q', which makes second stage loader quiet unless autoboot
is disabled or fails.

MFC after:	1 week
2005-10-16 01:55:35 +00:00
davidxu
d78f71b996 Fix compiling. 2005-10-15 22:57:39 +00:00
suz
b63fa30718 added a missing unlock
Submitted by: JINMEI Tatuya
MFC After: 1 day
2005-10-15 08:49:49 +00:00
ps
5dceb7fc4d regen after recvmsg, recvfrom, sendmsg 2005-10-15 05:57:34 +00:00
ps
a72385743d Implement the 32bit versions of recvmsg, recvfrom, sendmsg
Partially obtained from:	jhb
2005-10-15 05:57:06 +00:00
ps
36d05b2d9f regen for clock_gettime, clock_settime, clock_getres 2005-10-15 02:54:39 +00:00
ps
c63313b35d Implement 32bit wrappers for clock_gettime, clock_settime, and
clock_getres.
2005-10-15 02:54:18 +00:00
ps
a936b63f3d regen 2005-10-15 02:40:34 +00:00
ps
c7a8fca230 Correct the prototype for freebsd32_nanosleep and use the proper
size when copying struct timespec32 in and out.
2005-10-15 02:40:10 +00:00
davidxu
038296cec9 Fix compiling. 2005-10-15 02:09:43 +00:00
jkim
d1d407a24a Correct few MSR addresses.
PR:		amd64/85852
Submitted by:	Nate Eldredge <nge at cs dot hmc dot edu>
2005-10-15 00:44:56 +00:00
kris
4bb62bb563 mpsafevm has been stable and defaulted to 1 on sparc64 for over 6 months,
so we are ready for mpsafevfs=1 by default on sparc64 too.  I have been
running this on all my sparc64 machines for over 6 months, and have not
encountered MD problems.

MFC after:	1 week
2005-10-14 23:56:13 +00:00
yar
024c6e0e38 Let modules use the kernel's opt_*.h files if built along with
the kernel by wrapping all targets for fake opt_*.h files in
.if defined(KERNBUILDDIR).  Thus, such fake files won't be
created at all if modules are built with the kernel.

Some modules undergo cleanup like removing unused or unneeded
options or .h files, without which they wouldn't build this way
or the other.

Reviewed by:	ru
Tested by:	no binary changes in modules built alone
Tested on:	i386 sparc64 amd64
2005-10-14 23:30:17 +00:00
yar
924e74a759 In preparation for making the modules actually use opt_*.h files
provided in the kernel build directory, fix modules that were
failing to build this way due to not quite correct kernel option
usage.  In particular:

ng_mppc.c uses two complementary options, both of which are listed
in sys/conf/files.  Ideally, there should be a separate option for
including ng_mppc.c in kernel build, but now only
NETGRAPH_MPPC_ENCRYPTION is usable anyway, the other one requires
proprietary files.

nwfs and smbfs were trying to ensure they were built with proper
network components, but the check was rather questionable.

Discussed with:	ru
2005-10-14 23:17:45 +00:00
jkim
0dd10470ec - Print number of physical/logical cores and more CPUID info.
- Add newer CPUID definitions for future use.

Many thanks to Mike Tancsa <mike at sentex dot net> for providing test
cases for Intel Pentium D and AMD Athlon 64 X2.

Approved by:	anholt (mentor)
2005-10-14 22:52:01 +00:00
truckman
10f007ca7d Close a race in the ufs_lookup() code that handles the ISDOTDOT
case by saving the value of dp->i_ino before unlocking the vnode
for the current directory and passing the saved value to VFS_VGET().

Without this change, another thread can overwrite dp->i_ino after
the current directory is unlocked, causing  ufs_lookup() to lock
and return the wrong vnode in place of the vnode for its parent
directory.  A deadlock can occur if dp->i_ino was changed to a
subdirectory of the current directory because the root to leaf vnode
lock ordering will be violated.  A vnode lock can be leaked if
dp->i_ino was changed to point to the current directory, which
causes the current vnode lock for the current directory to be
recursed, which confuses lookup() into calling vrele() when it
should be calling vput().

The probability of this bug being triggered seems to be quite low
unless the sysctl variable debug.vfscache is set to 0.

Reviewed by:	jhb
MFC after:	2 weeks
2005-10-14 22:13:33 +00:00
jhb
0d876e6b17 Merge over the remaining changes from i386 of the ksiginfo_t changes so
that this compiles.

Pointy hat to:	davidxu
2005-10-14 22:03:39 +00:00
thompsa
f104248124 Make four more functions static that were missed in the last commit. 2005-10-14 20:57:02 +00:00
kris
9f87be2874 Add a default value for VM_BCACHE_SIZE_MAX of 400MB. This is copied from
amd64, and is a factor of 3 less than the value previously auto-sized on
a 12GB machine, which would cause an overflow in calculations involving the
maxbcache int, causing bufinit() to loop forever at boot.

Reviewed by:	mlaier, peter
2005-10-14 20:31:12 +00:00
jhb
ecc6e8dc5a The signal code is now an int rather than a long, so update debug printfs. 2005-10-14 20:22:57 +00:00