peter [Sat, 13 Mar 2004 22:31:39 +0000 (22:31 +0000)]
Push Giant down a little further:
- no longer serialize on Giant for thread_single*() and family in fork,
exit and exec
- thread_wait() is mpsafe, assert no Giant
- reduce scope of Giant in exit to not cover thread_wait and just do
vm_waitproc().
- assert that thread_single() family are not called with Giant
- remove the DROP/PICKUP_GIANT macros from thread_single() family
- assert that thread_suspend_check() s not called with Giant
- remove manual drop_giant hack in thread_suspend_check since we know it
isn't held.
- remove the DROP/PICKUP_GIANT macros from thread_suspend_check() family
- mark kse_create() mpsafe
peter [Sat, 13 Mar 2004 22:16:34 +0000 (22:16 +0000)]
MFp4: comment out options that don't exist so that they cannot be
accidently added to config files and be silently accepted.
Comment out one bogo-option that crept into NOTES.
peter [Sat, 13 Mar 2004 19:21:35 +0000 (19:21 +0000)]
Drastically clean up the legacy host-pci bridge table. We don't need
all the ancient Intel/VIA/SIS/etc chipsets on amd64 systems. Even the
newer intel stuff won't need this since we use acpi by default and we
don't have all their magic programming information. Just use a generic
"Host to PCI bridge" name if we ever hit this code.
hrs [Sat, 13 Mar 2004 16:45:05 +0000 (16:45 +0000)]
New release note:
64-bit time_t on FreeBSD/sparc64,
em(4) hiccup during ifconfig em0 alias fixed,
ng_vlan(4) netgraph node type,
umass(4) ATAPI MMC commands support,
rc.d/gbde_swap and gbde_swap_enable in rc.conf,
mountd(8) -p <port> option,
nologin(8) syslog support,
OpenBSD's pf and the related userland utils imported,
SIZE attribute in distinfo enabled by default.
(when you find errors or inappropriate descriptions, please let me know.)
peadar [Sat, 13 Mar 2004 16:06:32 +0000 (16:06 +0000)]
Recognise the 82845G AGP bridge, and poke it appropriately at
attach/detach time.
Assigning the default behaviour to this particular device is
incorrect, corrupting the video BIOS aperture, and breaking
VESA support in the kernel and XFree86.
ru [Sat, 13 Mar 2004 15:46:34 +0000 (15:46 +0000)]
Create hierarchy before installing a new kernel. This is needed
because we require that a new kernel be installed prior to a new
world, and we may need some new directories to succeed.
Once MFCed, this will also help those poor souls who redundantly
``mv /modules /modules.old'' in RELENG_4 before an installkernel.
cperciva [Sat, 13 Mar 2004 11:02:37 +0000 (11:02 +0000)]
Don peril-sensitive glasses and throw the switch to move nologin(8) from
/sbin to /usr/sbin. A symlink from /sbin/nologin -> /usr/sbin/nologin
is created for compatibility purposes.
This will probably not cause any problems, but anyone who is doing
anything particularly unusual with nologin(8) or shells in general might
be well advised to check that everything still works.
rwatson [Sat, 13 Mar 2004 05:58:57 +0000 (05:58 +0000)]
Add annotations to mtx_lock(&Giant) in kern_select() and poll() that
we always grab Giant, even if we're actually only polling objects that
don't require giant. Once socket locking is merged, there will be
strong motivation to fix this.
rwatson [Sat, 13 Mar 2004 05:27:17 +0000 (05:27 +0000)]
Const-poison atmulticastaddr, which should be read but not modified.
While there, remove (caddr_t) casting of ethernet addresses, which
among other things discards the qualifier. This makes it clear that
atmulticastaddr does not require synchronization.
cperciva [Sat, 13 Mar 2004 04:39:45 +0000 (04:39 +0000)]
When nologin(8) is installed in /usr/sbin/, create a symlink from
/sbin/nologin for compatibility purposes. Also, remove the NO_NOLOGIN_LOG
option; we don't need to worry about conserving space as much on the /usr
partition.
Note that usr.sbin/nologin is not yet hooked up to the build.
bde [Sat, 13 Mar 2004 02:56:27 +0000 (02:56 +0000)]
Align the offset in vn_rdwr_inchunks() so that at most the first and
the last chunk are misaligned relative to a MAXBSIZE byte boundary.
vn_rdwr_inchunks() is used mainly for elf core dumps, and elf sections
are usually perfectly misaligned relative to MAXBSIZE, and chunking
prevents the file system from doing much realigning.
This gives a surprisingly large speedup for core dumps -- from 50 to
13 seconds for a 512MB core dump here. The pessimization was mostly
from an interaction of the misalignment with IO_DIRECT. It increased
the number of i/o's for each chunk by a factor of 5 (3 writes and 2
read-before-writes instead of 1 write).
brooks [Sat, 13 Mar 2004 02:31:40 +0000 (02:31 +0000)]
Remove if_withname. It came in with the KAME import, but never got
used. Should someone need its functionality, it's a really expensive
implementation of:
ifnet_byindex(sdl->sdl_index)
bde [Sat, 13 Mar 2004 00:46:33 +0000 (00:46 +0000)]
Fixed description of cx device. Use similar wording for ctau device
(NETGRAPH_CRONYX toggles NETGRAPH support for both). Fixed formatting
of description of cx device.
trhodes [Fri, 12 Mar 2004 21:45:33 +0000 (21:45 +0000)]
These are changes to allow to use the Intel C/C++ compiler (lang/icc)
to build the kernel. It doesn't affect the operation if gcc.
Most of the changes are just adding __INTEL_COMPILER to #ifdef's, as
icc v8 may define __GNUC__ some parts may look strange but are
necessary.
Additional changes:
- in_cksum.[ch]:
* use a generic C version instead of the assembly version in the !gcc
case (ASM code breaks with the optimizations icc does)
-> no bad checksums with an icc compiled kernel
Help from: andre, grehan, das
Stolen from: alpha version via ppc version
The entire checksum code should IMHO be replaced with the DragonFly
version (because it isn't guaranteed future revisions of gcc will
include similar optimizations) as in:
---snip---
Revision Changes Path
1.12 +1 -0 src/sys/conf/files.i386
1.4 +142 -558 src/sys/i386/i386/in_cksum.c
1.5 +33 -69 src/sys/i386/include/in_cksum.h
1.5 +2 -0 src/sys/netinet/igmp.c
1.6 +0 -1 src/sys/netinet/in.h
1.6 +2 -0 src/sys/netinet/ip_icmp.c
and finally remove
sys/i386/i386 in_cksum.c
sys/i386/include in_cksum.h
---snip---
- endian.h:
* DTRT in C++ mode
- quad.h:
* we don't use gcc v1 anymore, remove support for it
Suggested by: bde (long ago)
- assym.h:
* avoid zero-length arrays (remove dependency on a gcc specific
feature)
This change changes the contents of the object file, but as it's
only used to generate some values for a header, and the generator
knows how to handle this, there's no impact in the gcc case.
Explained by: bde
Submitted by: Marius Strobl <marius@alchemy.franken.de>
- aicasm.c:
* minor change to teach it about the way icc spells "-nostdinc"
Not approved by: gibbs (no reply to my mail)
- bump __FreeBSD_version (lang/icc needs to know about the changes)
Incarnations of this patch survive gcc compiles since a loooong time,
I use it on my desktop. An icc compiled kernel works since Nov. 2003
(exceptions: snd_* if used as modules), it survives a build of the
entire ports collection with icc.
Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.
trhodes [Fri, 12 Mar 2004 21:36:12 +0000 (21:36 +0000)]
This are the build infrastructure changes to allow to use the
Intel C/C++ compiler (lang/icc) to build the kernel.
The icc CPUTYPE CFLAGS use icc v7 syntax, icc v8 moans about them, but
doesn't abort. They also produce CPU specific code (new instructions
of the CPU, not only CPU specific scheduling), so if you get coredumps
with signal 4 (SIGILL, illegal instruction) you've used the wrong
CPUTYPE.
Incarnations of this patch survive gcc compiles and my make universe.
I use it on my desktop.
To use it update share/mk, add
/usr/local/intel/compiler70/ia32/bin (icc v7, works)
or
/usr/local/intel_cc_80/bin (icc v8, doesn't work)
to your PATH, make sure you have a new kernel compile directory
(e.g. MYKERNEL_icc) and run
CFLAGS="-O2 -ip" CC=icc make depend
CFLAGS="-O2 -ip" CC=icc make
in it.
Don't compile with -ipo, the build infrastructure uses ld directly to
link the kernel and the modules, but -ipo needs the link step to be
performed with Intel's linker.
Problems with icc v8:
- panic: npx0 cannot be emulated on an SMP system
- UP: first start of /bin/sh results in a FP exception
Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.
Reviewed by: silence on -arch
Submitted by: netchild
brooks [Fri, 12 Mar 2004 20:37:40 +0000 (20:37 +0000)]
Allow kernel with the BOOTP option to boot when DHCP/BOOTP sets the root
path to an absolute path without a host name. Previously, there was a
nasty POLA violation where a system would PXE boot until you added the
BOOTP option and then it would panic instead.
Reviewed by: tegge, Dirk-Willem van Gulik <dirkx at webweaving.org>
(a previous version)
Submitted by: tegge (getip function)
kensmith [Fri, 12 Mar 2004 20:35:21 +0000 (20:35 +0000)]
This is a temporary fix to solve a regression issue on sparc64 that
is caused by the way sparc64 registers its CPUs. Nate will work on
a real fix shortly.
wpaul [Fri, 12 Mar 2004 17:31:29 +0000 (17:31 +0000)]
Add if_ndis_pci.c and if_ndis_pccard.c so that building the NDISulator
directly into the kernel works again. Also make the 'ndisapi' entries
not depend on pccard anymore.
mux [Fri, 12 Mar 2004 17:05:06 +0000 (17:05 +0000)]
Don't set ifp->if_output to ether_output(), since ether_ifattach()
will do it for us (we either call ether_ifattach() directly, or it
gets called within ieee80211_ifattach()).
des [Fri, 12 Mar 2004 12:02:12 +0000 (12:02 +0000)]
Replace a manual check of a VMIO candidate with vn_canvmio(). This
silences an annoying warning in getblk() when VMIO'ing on a directory
vnode, which can happen when vfs.vmiodirenable is 1.
Bring the warning message in line with reality at the same time.
bde [Fri, 12 Mar 2004 12:02:03 +0000 (12:02 +0000)]
Initial support for C99's (or is it POSIX.1-2001's?) MATH_ERRNO,
MATH_ERREXCEPTION and math_errhandling, so that C99 applications at
least have the possibility of determining that errno is not set for
math functions. Set math_errhandling to the non-standard-conforming
value of 0 for now to indicate that we don't support either method
of reporting errors. We intentionally don't support MATH_ERRNO
because errno is a mistake, and we are missing support for
MATH_ERREXCEPTION (<fenv.h>, compiler support for <fenv.h>, and
actually setting the exception flags correctly).
brooks [Fri, 12 Mar 2004 04:40:16 +0000 (04:40 +0000)]
If /conf/diskless_remount exists, use it to remount the entire /conf
directory. This allows multiple roots (say for different architectures)
to share the same set of /conf files.
kientzle [Thu, 11 Mar 2004 20:00:10 +0000 (20:00 +0000)]
Don't run fsck if there's no /etc/fstab.
In particular, this allows a "virgin" system installed from
source (installworld, installkernel, cd etc && make distribution)
to boot correctly and modestly simplifies the creation
of single-partition network/cdrom/CF bootable images.
phk [Thu, 11 Mar 2004 18:50:33 +0000 (18:50 +0000)]
When I was a kid my work table was one cluttered mess an cleaning it up
were a rather overwhelming task. I soon learned that if you don't know
where you're going to store something, at least try to pile it next to
something slightly related in the hope that a pattern emerges.
Apply the same principle to the ffs/snapshot/softupdates code which have
leaked into specfs: Add yet a buf-quasi-method and call it from the
only two places I can see it can make a difference and implement the
magic in ffs_softdep.c where it belongs.
It's not pretty, but at least it's one less layer violated.
simon [Thu, 11 Mar 2004 18:12:48 +0000 (18:12 +0000)]
- Use variable names instead of numbers for the script arguments to
improve readability.
- Use mktemp to create the temporary files and directory.
- Mount temporary md(4) backed file system on a temporary directory,
instead of /mnt.
bde [Thu, 11 Mar 2004 13:38:54 +0000 (13:38 +0000)]
Don't implement anything in the ffs family in <machine/cpufunc.h>
in the non-_KERNEL case. This "fixes" applications that include
this "kernel-only" header and also include <strings.h> (or get
<strings.h> via the default _BSD_VISIBLE pollution in <string.h>.
In C++ there was a fatal error: the declaration specifies C linkage
but the implementation gives C++ linkage. In C there was only a
static/extern mismatch if the headers were included in a certain order
order, and a partially redundant declaration for all include orders;
gcc emits incomplete or wrong diagnostics for these, but only for
compiling with -Wsystem-headers and certain other warning options, so
the problem was usually not seen for C.
bde [Thu, 11 Mar 2004 11:30:57 +0000 (11:30 +0000)]
Fixed a misspelling of 0 as NULL.
Fixed a nearby bug. The "play it safe" code in dosysctl() was unsafe
because it overran the buffer by 1 if sysctl() filled all of the buffer.
Fixed a nearby style bug in output. Not just 1, but 2 extra newlines
were printed at the end by "vmstat -m" and "vmstat -z". Don't print
any newlines explicitly. This depends on 2 of the many formatting
bugs in the corresponding sysctls. First, the sysctls return an extra
newline at the end of the strings. This also messes up output from
sysctl(8). Second, the sysctls return an extra newline at the beginning
of the strings. This is good for separating the 2 tables output by
"vmstat -mz" and for starting the header on a new line in plain sysctl
output, but gives a bogus extra newline at the beginning for "vm -[m | z]"
and "sysctl -n [kern.malloc | vm.zone]".
Fixed some nearby style bugs in the source code:
- the same line that misspelled 0 as NULL also spelled NULL as 0.
- the size was doubled twice in the realloc loop.
- the "play it safe" comment was misleading. Terminating the buffer
is bogus because dosysctl() is only meant to work with sysctls that
return strings and the terminator is part of a string. However, the
kern.malloc sysctl has more than style bugs. It also doesn't return
a string. Termination is needed to work around this bug.