The previous commit included some commented-out macro-assignments
with comments documenting their function. These macros were of
considerable use to me in building a test "make release".
Make sure that a "make release" (more accurately the bit that makes
the crunched binary) get a non-cryptographic telnet. This is overkill
in that it covers stuff that is not normally used in a crunched binary.
harti [Thu, 24 Jul 2003 10:33:01 +0000 (10:33 +0000)]
Create a subtree 'harp' of the net sysctl tree. This uses a fixed
OID as the other protocol family sub-trees do, that is equal to the
protocol family identifier. Make the ATM layer debugging flags
available under this tree.
Submitted by: Vincent Jardin <vjardin@wanadoo.fr>
MFC after: 2 weeks
Implement _get_curthread and _set_curthread. We use GCCs builtin
function this, which expands to PAL calls (rduniq and wruniq).
This needs adjustment when TLS is implemented.
gordon [Thu, 24 Jul 2003 07:42:42 +0000 (07:42 +0000)]
Fix rescue build using -j. The problem appears to be make not being able
to find the source when the object was specified as <directory>/foo.o.
The fix makes the build go through a make objs before compiling the rest
of the crunchgen. This ensures that the dhclient bits are built in the
correct place where they are picked up for the final compile of rescue.
I'd like to thank dwhite@ and gad@ for helping me track down the problem.
Implement alpha_pal_wrunique() and alpha_pal_rdunique(). Both are
used to set and get the thread pointer. Note that a context switch
will automaticly save and restore the thread pointer.
Use a spare for the thread pointer (mc_thrptr). The thread pointer
is only read and written by set_mcontext() and get_mcontext() for
use by threading libraries.
peter [Thu, 24 Jul 2003 02:05:48 +0000 (02:05 +0000)]
Connect libncp/libsmb to the build. They compile, but have a couple of
silly bugs that probably wont quite make a segfault. eg: passing a pointer
to an int to sysctl instead of a pointer to a size_t.
peter [Thu, 24 Jul 2003 00:04:01 +0000 (00:04 +0000)]
Fix an annoying bug in tar. When it converted 'tar zcf' to 'tar -z -c -f'
it forgot to null terminate the new argv[] array. If you mixed this
with $TAR_OPTIONS, phkmalloc and a whole bunch of other variables, you
could end up with a segfault. This isn't strictly a phkmalloc victory
since tar walks off the end of an array rather than use uninitialized
malloc memory, but phkmalloc makes it easier to provoke.
Document an additional error return value. The connect(2) call can also
return EACCES on non-Unix domain sockets as demonstrated by the
following program:
Added the (undocumented) EMUL_BOOT variable (for TARGET=i386 only)
that causes the bootable ISO images to be created using the floppy
emulation (the old method) as opposed to the new "cdboot" method.
Only copy boot.flp to the 2nd CD-ROM if this variable is defined.
peter [Wed, 23 Jul 2003 20:29:13 +0000 (20:29 +0000)]
Initialize 'blocked' to NULL. I think this was a real problem, but I
am not sure about that. The lack of -Werror and the inline noise hid
this for a while.
peter [Wed, 23 Jul 2003 20:03:42 +0000 (20:03 +0000)]
Provide a knob for raising the inline instruction estimate threshold and
set an initial value. This is aimed at getting us closer to being able to
turn -Werror back on and we can adjust the settings later on. Yes, we
could turn off -Wno-inline instead, but that would hide the effect of
gcc's bogo-estimator ignoring inline (either rightly or wrongly).
Annotate pmap_changebit() as __always_inline. This function was
written as a template that when inlined is specialized for the caller
through constant value propagation and dead code elimination. Thus,
the specialized code that is generated for pmap_clear_reference() et
al. avoids several conditional branches inside of a loop.
Add a new macro APIC_ICRLO_RESV_MASK that contains all of the reserved
fields in the low 32 bits of the local APIC ICR register. Use this macro
in place of APIC_RESV2_MASK when masking off existing bits from the ICR
when writing to it to send an IPI.
Added the WORLDDIR variable (defaulting to ${.CURDIR}/..) that
points to a directory where "make buildworld" was run. Useful
for building 5.x snapshots on 4.x.
harti [Wed, 23 Jul 2003 14:28:57 +0000 (14:28 +0000)]
Convert a lot of uma_zalloc() calls to be NOWAIT instead of WAITOK. All
these may be called from contexts where we cannot sleep (callout handlers
for example).
Do not define BIGBOOTSIZE and the friends for amd64; it serves
no useful purpose other than wasting CPU time in "make release"
creating useless boot.flp.
peter [Wed, 23 Jul 2003 04:53:47 +0000 (04:53 +0000)]
Only provide one copy of the math functions. If we provide a MD function,
do not also provide a __generic_XXX version as well. This is how we
used to runtime select the generic vs i387 versions on the i386 platform.
This saves a pile of #defines in the src/math_private.h file to undo the
__generic_XXX renames in some of the *.c files.
peter [Wed, 23 Jul 2003 04:28:51 +0000 (04:28 +0000)]
Remove _ARCH_INDIRECT, it was the glue to enable having both hardware
and software versions of the floating point code in libm. The runtime
selection was done by reading the hw.floatingpoint sysctl via
__get_hw_float().
peter [Wed, 23 Jul 2003 04:23:36 +0000 (04:23 +0000)]
Now that we do not need to do runtime detection for the broken default
fp emulator, stop doing the runtime selection of hardware or emulated
floating point operations on i386. Note that I have not suppressed the
duplicate compiles yet.
While here, fix the alpha. It has provided specific copysign/copysignf
functions since the beginning of time, but they have never been used.
We sloppily created an array for the high FP registers (f32-f127),
but this just created a weird inconsistency when porting gdb(1).
Instead, we name each high FP register seperately, like we do for
all the other registers.
Move idle kse wakeup to outside of regions where locks are held.
This eliminates ping-ponging of locks, where the idle KSE wakes
up only to find the lock it needs is being held. This gives
little or no gain to M:N mode but greatly speeds up 1:1 mode.
peter [Tue, 22 Jul 2003 23:50:32 +0000 (23:50 +0000)]
Attempt to preempt any new gcc-ism references to
__attribute__((__always_inline__)) by adding an __always_inline macro
(used like __dead2 etc). __inline_damnit has also been suggested but we
have a precedent of keeping the names similar so they are easier to find.
Test 8.16 in sed.test tests the ability of a sed to handle an empty
regular expression as the first argument to a substitute command. If
used to test a sed which (erroneously) evaluates this at translation
time rather than at execution time, the bugged sed is put into an
infinite loop. This mode of failure seems excessive. Such a failing
sed is the Free Software Foundation's sed 3.02.
The specific test was also not being executed for the BSD sed.
harti [Tue, 22 Jul 2003 15:11:08 +0000 (15:11 +0000)]
Allocate network interfaces from malloc() instead of using a zone.
Usually one needs only a couple of them so using a zone is waste
of memory (esp. on multi-cpu systems).
harti [Tue, 22 Jul 2003 12:46:30 +0000 (12:46 +0000)]
Remove the zone limits for all the zones used in the ATM code.
These were a left over from when the private memory pools were
converted to use uma zones. The limit of UMA zones, however,
works differently. When a zone is limited to only one or two pages
than, on multi-cpu systems, processes can get stuck on the zonelimit,
because all remaining free items are in caches of other CPUs.
Also add rudimentary error handling in some places (panic) when a zone
cannot be created.
peter [Tue, 22 Jul 2003 06:50:34 +0000 (06:50 +0000)]
Go back to 64 bit precision for fadd/fsub/fsqrt etc. This is because on
AMD64, gcc (and the ABI) expects the x87 unit to be running in 80/64
mode (not 64/53) so that it can use it for 'long double' operations. It
takes the expected precision differences into account when generating
code.
peter [Tue, 22 Jul 2003 06:44:54 +0000 (06:44 +0000)]
Extend the machine/ieeefp.h that was inherited from i386 to support
the SSE mxcsr register as well. Since gcc will intermix SSE2 and x87
FP code, the fpsetround() etc mode had better be the same.
There are hooks to enable these inlines to be instantiated inside libc
for non-gcc or C++ callers. (g++ doesn't like the inlines that tried
to extract an integer and convert it to an enum).