]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoRemove unecessary include file. machine/rpb.h is very alpha specific
imp [Mon, 7 Nov 2005 07:41:17 +0000 (07:41 +0000)]
Remove unecessary include file.  machine/rpb.h is very alpha specific
and is not needed for this font, which isn't alpha speciifc.

18 years agoFinally (!?) get to the bottom of the mysterious G3 boot-time panics.
grehan [Mon, 7 Nov 2005 06:55:48 +0000 (06:55 +0000)]
Finally (!?) get to the bottom of the mysterious G3 boot-time panics.
After a number of tests using nop's to change the alignment, it was
confirmed that the mtibat instructions should be cache-aligned.
FreeScale app note AN2540 indicates that the isync before and after
the mtdbat is the right thing to do, but sync/isync isn't required
before the mtibat so it has been removed.

Fix by using a ".balign 32" to pull the code in question to the correct
alignment.

MFC after: 3 days

18 years agoPortability: timegm() isn't standard, so check for timegm() in
kientzle [Sun, 6 Nov 2005 23:38:01 +0000 (23:38 +0000)]
Portability:  timegm() isn't standard, so check for timegm() in
the configure script and substitute mktime() when necessary.

Thanks to:  Darin Broady

18 years agoEdit pathnames for -x but not for -t. Otherwise, people get confused
kientzle [Sun, 6 Nov 2005 22:53:51 +0000 (22:53 +0000)]
Edit pathnames for -x but not for -t.  Otherwise, people get confused
when list the archive contents, then try to extract selected files
(file selection always works against unedited pathnames).  With this change,
-t always shows the pathnames as they appear in the archive.

Thanks to: Robert Watson

18 years agoRefactor the PCI probe code a bit.
scottl [Sun, 6 Nov 2005 22:52:52 +0000 (22:52 +0000)]
Refactor the PCI probe code a bit.

18 years agoBe more consistent with the rest of the manual page.
pjd [Sun, 6 Nov 2005 20:01:47 +0000 (20:01 +0000)]
Be more consistent with the rest of the manual page.

18 years ago- Do not raise IFF_DRV_OACTIVE flag in vlan_start, because this
glebius [Sun, 6 Nov 2005 19:43:04 +0000 (19:43 +0000)]
- Do not raise IFF_DRV_OACTIVE flag in vlan_start, because this
  can lead to stalled interface
- Explain this fact in a comment.

Reviewed by: rwatson, thompsa, yar

18 years agoThe latest version of the Intel 2200BG/2915ABG driver (9.0.0.3-9) from
wpaul [Sun, 6 Nov 2005 19:38:34 +0000 (19:38 +0000)]
The latest version of the Intel 2200BG/2915ABG driver (9.0.0.3-9) from
Intel's web site requires some minor tweaks to get it to work:

- The driver seems to have been released with full WMI tracing enabled,
  and makes references to some WMI APIs, namely IoWMIRegistrationControl(),
  WmiQueryTraceInformation() and WmiTraceMessage(). Only the first
  one is ever called (during intialization). These have been implemented
  as do-nothing stubs for now. Also added a definition for STATUS_NOT_FOUND
  to ntoskrnl_var.h, which is used as a return code for one of the WMI
  routines.

- The driver references KeRaiseIrqlToDpcLevel() and KeLowerIrql()
  (the latter as a function, which is unusual because normally
  KeLowerIrql() is a macro in the Windows DDK that calls KfLowewIrql()).
  I'm not sure why these are being called since they're not really
  part of WDM. Presumeably they're being used for backwards
  compatibility with old versions of Windows. These have been
  implemented in subr_hal.c. (Note that they're _stdcall routines
  instead of _fastcall.)

- When querying the OID_802_11_BSSID_LIST OID to get a BSSID list,
  you don't know ahead of time how many networks the NIC has found
  during scanning, so you're allowed to pass 0 as the list length.
  This should cause the driver to return an 'insufficient resources'
  error and set the length to indicate how many bytes are actually
  needed. However for some reason, the Intel driver does not honor
  this convention: if you give it a length of 0, it returns some
  other error and doesn't tell you how much space is really needed.
  To get around this, if using a length of 0 yields anything besides
  the expected error case, we arbitrarily assume a length of 64K.
  This is similar to the hack that wpa_supplicant uses when doing
  a BSSID list query.

18 years agoCopy out the number of iovecs in freebsd32_recvmsg, not the length
ps [Sun, 6 Nov 2005 18:12:43 +0000 (18:12 +0000)]
Copy out the number of iovecs in freebsd32_recvmsg, not the length
of a single iovec.

18 years agoDetach k_rem_pio2f.c from the build since it is now unused. It is a libm
bde [Sun, 6 Nov 2005 17:59:40 +0000 (17:59 +0000)]
Detach k_rem_pio2f.c from the build since it is now unused.  It is a libm
internal so this shouldn't cause version problems.

18 years agoUse a 53-bit approximation to pi/2 instead of a 33+53 bit one for the
bde [Sun, 6 Nov 2005 17:48:02 +0000 (17:48 +0000)]
Use a 53-bit approximation to pi/2 instead of a 33+53 bit one for the
special case pi/4 <= |x| < 3*pi/4.  This gives a tiny optimization (it
saves 2 subtractions, which are scheduled well so they take a whole 1
cycle extra on an AthlonXP), and simplifies the code so that the
following optimization is not so ugly.

Optimize for the range 3*pi/4 < |x| < 9*Pi/2 in the same way.  On
Athlon{XP,64} systems, this gives a 25-40% optimization (depending a
lot on CFLAGS) for the cosf() and sinf() consumers on this range.
Relative to i387 hardware fcos and fsin, it makes the software versions
faster in most cases instead of slower in most cases.  The relative
optimization is smaller for tanf() the inefficient part is elsewhere.

The 53-bit approximation to pi/2 is good enough for pi/4 <= |x| <
3*pi/4 because after losing up to 24 bits to subtraction, we still
have 29 bits of precision and only need 25 bits.  Even with only 5
extra bits, it is possible to get perfectly rounded results starting
with the reduced x, since if x is nearly a multiple of pi/2 then x is
not near a half-way case and if x is not nearly a multiple of pi/2
then we don't lose many bits.  With our intentionally imperfect rounding
we get the same results for cosf(), sinf() and tanf() as without this
optimization.

18 years agoFix two minor typos that caused schedgraph to exit with an exception
rwatson [Sun, 6 Nov 2005 17:43:25 +0000 (17:43 +0000)]
Fix two minor typos that caused schedgraph to exit with an exception
when running on traces referencing >2 CPUs.

18 years agoFix panic string in last revision.
glebius [Sun, 6 Nov 2005 16:47:59 +0000 (16:47 +0000)]
Fix panic string in last revision.

18 years agoMFi386 rev 1.536 (sort of)
cognet [Sun, 6 Nov 2005 16:10:28 +0000 (16:10 +0000)]
MFi386 rev 1.536 (sort of)
Move what can be moved (UMA zones creation, pv_entry_* initialization) from
pmap_init2() to pmap_init().
Create a new function, pmap_postinit(), called from cpu_startup(), to do the
L1 tables allocation.
pmap_init2() is now empty for arm as well.

18 years agoAvoid trouble with PUC_FASTINTR if it is already defined.
phk [Sun, 6 Nov 2005 15:55:45 +0000 (15:55 +0000)]
Avoid trouble with PUC_FASTINTR if it is already defined.

18 years agoFix the path to aac_ioctl.h in the comment and style includes.
maxim [Sun, 6 Nov 2005 15:47:06 +0000 (15:47 +0000)]
Fix the path to aac_ioctl.h in the comment and style includes.

MFC after: 1 week

18 years agoFix include: aac_ioctl.h was moved from sys/dev/aac/ to sys/sys.
maxim [Sun, 6 Nov 2005 15:40:59 +0000 (15:40 +0000)]
Fix include: aac_ioctl.h was moved from sys/dev/aac/ to sys/sys.

PR: misc/88549
Submitted by: Sokolov Alexey
MFC after: 1 week

18 years agoRemove spl markers from AMR.
scottl [Sun, 6 Nov 2005 15:13:42 +0000 (15:13 +0000)]
Remove spl markers from AMR.

MFC After: 3 days

18 years agoThe logb() functions are not just ieee754 "test" functions, but are
bde [Sun, 6 Nov 2005 12:18:27 +0000 (12:18 +0000)]
The logb() functions are not just ieee754 "test" functions, but are
standard in C99 and POSIX.1-2001+.  They are also not deprecated, since
apart from being standard they can handle special args slightly better
than the ilogb() functions.

Move their documentation to ilogb.3.  Try to use consistent and improved
wording for both sets of functions.  All of ieee854, C99 and POSIX
have better wording and more details for special args.

Add history for the logb() functions and ilogbl().  Fix history for
ilogb().

18 years agoChange author's email address.
philip [Sun, 6 Nov 2005 00:41:41 +0000 (00:41 +0000)]
Change author's email address.

Submitted by: Sean Bullington shegget -at- gmail.com

18 years agoUn-break processing of device major/minor values with fstat -n. We do
csjp [Sat, 5 Nov 2005 23:38:08 +0000 (23:38 +0000)]
Un-break processing of device major/minor values with fstat -n. We do
this by accessing the cdev_priv element of the cdev structure. Looking
forward we need a better way to handle this, as this structure shouldn't
be frobbed by userspace.

Submitted by: Doug Steinwand
PR: bin/88203
MFC after: 1 week
Discussed with: phk

18 years agoNow that fast interrupts can be shared we can use them in puc.
phk [Sat, 5 Nov 2005 21:04:53 +0000 (21:04 +0000)]
Now that fast interrupts can be shared we can use them in puc.

18 years agoAdd yet another entry to the list.
phk [Sat, 5 Nov 2005 21:04:26 +0000 (21:04 +0000)]
Add yet another entry to the list.

18 years agoAdd uart(4). When both sio(4) and uart(4) can handle a serial port,
marcel [Sat, 5 Nov 2005 19:48:53 +0000 (19:48 +0000)]
Add uart(4). When both sio(4) and uart(4) can handle a serial port,
sio(4) will claim it. This change therefore only affects how ports
are handled when they are not claimed by sio(4), and in principle
will improve hardware support.

MFC after: 2 months

18 years agoFree only those mbuf+clusters back to the packet zone that were allocated
andre [Sat, 5 Nov 2005 19:43:55 +0000 (19:43 +0000)]
Free only those mbuf+clusters back to the packet zone that were allocated
from there.  All others get broken up and free'd individually to the mbuf
and cluster zones.

The packet zone is a secondary zone to the mbuf zone.  There is currently
a limitation in UMA which prevents decreasing the packet zone stock when
the mbuf and cluster zone are drained and all their members are part of
packets.  When this is fixed this change may be reverted.

18 years agoRemove spl.
ticso [Sat, 5 Nov 2005 17:17:57 +0000 (17:17 +0000)]
Remove spl.
Restart request on USBD_IOERROR.

MFC after: 2 weeks

18 years agoUnbreak !SMP kernels
phk [Sat, 5 Nov 2005 10:42:40 +0000 (10:42 +0000)]
Unbreak !SMP kernels

18 years agoDefine M_IOAPIC the same as i386
peter [Fri, 4 Nov 2005 23:02:28 +0000 (23:02 +0000)]
Define M_IOAPIC the same as i386

18 years agoMFamd64: indent with tabs instead of spaces.
peter [Fri, 4 Nov 2005 22:53:44 +0000 (22:53 +0000)]
MFamd64: indent with tabs instead of spaces.

18 years agoThis commit was generated by cvs2svn to compensate for changes in r152069,
jkim [Fri, 4 Nov 2005 21:29:41 +0000 (21:29 +0000)]
This commit was generated by cvs2svn to compensate for changes in r152069,
which included commits to RCS files with non-trunk default branches.

18 years ago- Fix more resource parsing problems. The previous commit was imcomplete.
jkim [Fri, 4 Nov 2005 21:29:41 +0000 (21:29 +0000)]
- Fix more resource parsing problems.  The previous commit was imcomplete.
- Fix a typo in rsmisc.c and a style change for consistency.

This patch will also appear in future ACPI-CA release.

Submitted by: Robert Moore <robert dot moore at intel dot com>
Tested by: ru

18 years agoCatch up with the recent <sys/signal.h> change and make this compile.
ru [Fri, 4 Nov 2005 20:32:26 +0000 (20:32 +0000)]
Catch up with the recent <sys/signal.h> change and make this compile.

18 years agoAccount for the minimum resource size when parsing the end tag resource
njl [Fri, 4 Nov 2005 20:15:09 +0000 (20:15 +0000)]
Account for the minimum resource size when parsing the end tag resource
descriptor.  This should fix the "memory modified after free" panics.  This
patch will appear in a future acpi-ca distribution.

Submitted by: Robert Moore <robert.moore / intel.com>
Tested by: Peter Holm

18 years agoThis commit was generated by cvs2svn to compensate for changes in r152058,
njl [Fri, 4 Nov 2005 20:15:09 +0000 (20:15 +0000)]
This commit was generated by cvs2svn to compensate for changes in r152058,
which included commits to RCS files with non-trunk default branches.

18 years agoBegin and end the initialization of pvzone in pmap_init().
alc [Fri, 4 Nov 2005 18:03:24 +0000 (18:03 +0000)]
Begin and end the initialization of pvzone in pmap_init().
Previously, pvzone's initialization was split between pmap_init() and
pmap_init2().  This split initialization was the underlying cause of
some UMA panics during initialization.  Specifically, if the UMA boot
pages was exhausted before the pvzone was fully initialized, then UMA,
through no fault of its own, would use an inappropriate back-end
allocator leading to a panic.  (Previously, as a workaround, we have
increased the UMA boot pages.)  Fortunately, there is no longer any
reason that pvzone's initialization cannot be completed in
pmap_init().

Eliminate a check for whether pv_entry_high_water has been initialized
or not from get_pv_entry().  Since pvzone's initialization is
completed in pmap_init(), this check is no longer needed.

Use cnt.v_page_count, the actual count of available physical pages,
instead of vm_page_array_size to compute the maximum number of pv
entries.

Introduce the vm.pmap.pv_entries tunable on alpha and ia64.

Eliminate some unnecessary white space.

Discussed with: tegge (item #1)
Tested by: marcel (ia64)

18 years agoFix a logic error introduced with mandatory mbuf cluster refcounting and
andre [Fri, 4 Nov 2005 17:20:53 +0000 (17:20 +0000)]
Fix a logic error introduced with mandatory mbuf cluster refcounting and
freeing of mbufs+clusters back to the packet zone.

18 years agoUse if_setlladdr() to reprogram the link-level addresses; it causes
ru [Fri, 4 Nov 2005 16:29:51 +0000 (16:29 +0000)]
Use if_setlladdr() to reprogram the link-level addresses; it causes
a synchronous reprogramming of hardware MAC filters if the physical
interface are up and running.  Previously, MAC filters would be
reconfigured only when the fec interface was brought up.

18 years agoBring some level of stability to this driver:
ru [Fri, 4 Nov 2005 15:42:01 +0000 (15:42 +0000)]
Bring some level of stability to this driver:

- Disallow bundle reconfiguration when virtual
  interface is running; otherwise, removing a
  port from a running configuration will cause
  a panic in the start() method on the next packet
  on an assumption that a bundle has an even
  number of ports (2 or 4).

- Disallow bringing of virtual interface to a
  running state when a bundle size is 0; otherwise,
  adding and then removing the port will similarly
  cause a panic.

- Add missing initialization of fec_ifstat when
  adding a new port and fix media status reporting
  when virtual interface isn't yet up (check for
  fec_status of 1 rather than != 0).

18 years ago- Fix another fallout from the if_alloc() conversion:
ru [Fri, 4 Nov 2005 13:50:38 +0000 (13:50 +0000)]
- Fix another fallout from the if_alloc() conversion:
  previously, ifp->if_type was set to IFT_ETHER by
  ether_ifattach(), now it's done by if_alloc() so
  an assignment of if_type to IFT_PROPVIRTUAL after
  if_alloc() but before ether_ifattach() broke it.
  This makes arp(8) and friends happy about the fec
  interfaces, and will allow us to use if_setlladdr()
  on the fec interface.

- Set/reset IFF_DRV_RUNNING/IFF_DRV_OACTIVE in init()
  and stop() methods rather than in ioctl(), like the
  rest of the drivers do.  This fixes a bug when an
  "ifconfig fec0 ipv4_address" would not have made
  the interface running, didn't launch the ticker
  function to track media status of bundled ports,
  etc.

18 years agoFix name compatible problem with POSIX standard. the sigval_ptr and
davidxu [Fri, 4 Nov 2005 09:41:00 +0000 (09:41 +0000)]
Fix name compatible problem with POSIX standard. the sigval_ptr and
sigval_int really should be sival_ptr and sival_int.
Also sigev_notify_function accepts a union sigval value but not a
pointer.

18 years agosince nocpu isn't used in the kernel config base, we don't need to
imp [Fri, 4 Nov 2005 04:16:44 +0000 (04:16 +0000)]
since nocpu isn't used in the kernel config base, we don't need to
bump the version.  Peter Wemm, John Baldwin and I hammered this out
after the last time I needlessly incremented the version.

18 years agoWe don't bump the config version for additions to config that aren't
imp [Fri, 4 Nov 2005 04:14:49 +0000 (04:14 +0000)]
We don't bump the config version for additions to config that aren't
used in the base system.  This has been much discussed in the past
(typically people giving me a hard time for it).  Since all that was
added to config was nocpu, and since we don't use it, we don't need to
bump the version.

18 years agoUse the eq() macro for comparing strings (style), and remove a "break"
ru [Thu, 3 Nov 2005 21:27:02 +0000 (21:27 +0000)]
Use the eq() macro for comparing strings (style), and remove a "break"
statement to null the effect of several identical "cpu" directives.

18 years agoBy a popular demand, add "nomakeoptions" as an alias to "nomakeoption".
ru [Thu, 3 Nov 2005 21:09:59 +0000 (21:09 +0000)]
By a popular demand, add "nomakeoptions" as an alias to "nomakeoption".

18 years agoAdd stoppcbs[] arrays on Alpha and sparc64 and have each CPU save its
jhb [Thu, 3 Nov 2005 21:08:20 +0000 (21:08 +0000)]
Add stoppcbs[] arrays on Alpha and sparc64 and have each CPU save its
current context in the IPI_STOP handler so that we can get accurate stack
traces of threads on other CPUs on these two archs like we do now on i386
and amd64.

Tested on: alpha, sparc64

18 years agoFix 'show allpcpu' ddb command on non-x86. CPU IDs are in the range 0 ..
jhb [Thu, 3 Nov 2005 21:06:29 +0000 (21:06 +0000)]
Fix 'show allpcpu' ddb command on non-x86.  CPU IDs are in the range 0 ..
mp_maxid, not 0 .. mp_maxid - 1.  The result was that the highest numbered
CPU was skipped on Alpha and sparc64.

MFC after: 1 week

18 years agoFix build breakage on tinderbox.
jkim [Thu, 3 Nov 2005 20:27:38 +0000 (20:27 +0000)]
Fix build breakage on tinderbox.

18 years agoFix for a crash (from nfs_lookup() in an error case).
ps [Thu, 3 Nov 2005 19:24:54 +0000 (19:24 +0000)]
Fix for a crash (from nfs_lookup() in an error case).

Submitted by: Mohan Srinivasan

18 years agoImplement the "nocpu" directive.
ru [Thu, 3 Nov 2005 14:01:22 +0000 (14:01 +0000)]
Implement the "nocpu" directive.

Requested by: rwatson

18 years agoDetect memory leaks when memory type is being destroyed.
pjd [Thu, 3 Nov 2005 13:48:59 +0000 (13:48 +0000)]
Detect memory leaks when memory type is being destroyed.
This is very helpful for detecting kernel modules memory leaks on unload.

Discussed and reviewed by: rwatson

18 years agoThere is no need to explicitly add "status" to $extra_commands in
rse [Thu, 3 Nov 2005 13:17:49 +0000 (13:17 +0000)]
There is no need to explicitly add "status" to $extra_commands in
the /etc/rc.d/pf script as it is implicitly added by /etc/rc.subr's
run_rc_command() because of the existing $pf_program.

Submitted by: Christoph Schug <chris@schug.net>
MFC after: 1 week

18 years agoUpdate list of controllers ciss(4) driver
rse [Thu, 3 Nov 2005 13:02:35 +0000 (13:02 +0000)]
Update list of controllers ciss(4) driver
actually supports according to implementation.

Submitted by: Christoph Schug <chris@schug.net>
MFC after: 1 week

18 years agoSerialize access to the info/dir file; needed for parallel installs.
ru [Thu, 3 Nov 2005 08:56:39 +0000 (08:56 +0000)]
Serialize access to the info/dir file; needed for parallel installs.

Reported by: scottl

I'm not very fond of using the non-standard lockf(1) here, but I
have no better idea at the moment.  NetBSD uses ln(1) to create a
lock file, but this approach can result in a deadlock if make is
interrupted, leaving an orphaned lock file.

18 years agoAppropriate NULL pointer checking to avoid mysterious panic during
ariff [Thu, 3 Nov 2005 08:19:04 +0000 (08:19 +0000)]
Appropriate NULL pointer checking to avoid mysterious panic during
device cloning.

Approved by: netchild (mentor)

18 years agoo NetBSD 2.0.3 and NetBSD 2.1 added.
maxim [Thu, 3 Nov 2005 08:06:06 +0000 (08:06 +0000)]
o NetBSD 2.0.3 and NetBSD 2.1 added.

Obtained from: NetBSD
MFC after: 3 days

18 years agoMerge from RELENG_6: FreeBSD 6.0. Not sure the release date is correct
maxim [Thu, 3 Nov 2005 07:59:58 +0000 (07:59 +0000)]
Merge from RELENG_6: FreeBSD 6.0.  Not sure the release date is correct
because no release announce yet.

18 years agoRemove the remaining spl*() calls. Add some assertions. Eliminate some
alc [Thu, 3 Nov 2005 07:51:02 +0000 (07:51 +0000)]
Remove the remaining spl*() calls.  Add some assertions.  Eliminate some
excessive white space.

18 years agoRestore part of the code dropped in rev. 1.25 that makes sure ether_demux()
ru [Thu, 3 Nov 2005 07:46:04 +0000 (07:46 +0000)]
Restore part of the code dropped in rev. 1.25 that makes sure ether_demux()
will receive an mbuf chain with Ethernet header in the data portion of the
first mbuf.

18 years agoIn nfs_flush(), clear the NMODIFIED bit only if there are no dirty
ps [Thu, 3 Nov 2005 07:42:15 +0000 (07:42 +0000)]
In nfs_flush(), clear the NMODIFIED bit only if there are no dirty
buffers *and* there are no buffers queued up for writing.  The bug
was that NMODIFIED was being cleared even while there were buffers
scheduled to be written out, which leads to all sorts of interesting
bugs - one where the file could shrink (because of a post-op getattr
load, say) causing data in buffer(s) queued for write to be tossed,
resulting in data corruption.

Submitted by: Mohan Srinivasan

18 years agoConsistently use OPT_* macros to test/set boot options.
ru [Thu, 3 Nov 2005 07:35:36 +0000 (07:35 +0000)]
Consistently use OPT_* macros to test/set boot options.

18 years agoFix for a race between the thread transmitting the request and the
ps [Thu, 3 Nov 2005 07:31:06 +0000 (07:31 +0000)]
Fix for a race between the thread transmitting the request and the
thread processing the reply.

Submitted by: Mohan Srinivasan

18 years agoThe default fill byte is 0xf6, not 0xf5.
ru [Thu, 3 Nov 2005 07:28:46 +0000 (07:28 +0000)]
The default fill byte is 0xf6, not 0xf5.

18 years agoBe cross-arch friendly.
ru [Thu, 3 Nov 2005 07:27:50 +0000 (07:27 +0000)]
Be cross-arch friendly.

18 years agoFix .Dd argument.
ru [Thu, 3 Nov 2005 07:26:54 +0000 (07:26 +0000)]
Fix .Dd argument.

18 years agoSupport sending realtime signal information via signal queue, realtime
davidxu [Thu, 3 Nov 2005 05:25:26 +0000 (05:25 +0000)]
Support sending realtime signal information via signal queue, realtime
signal memory is pre-allocated, so kernel can always notify user code.

18 years agoCleanup some signal interfaces. Now the tdsignal function accepts
davidxu [Thu, 3 Nov 2005 04:49:16 +0000 (04:49 +0000)]
Cleanup some signal interfaces. Now the tdsignal function accepts
both proc pointer and thread pointer, if thread pointer is NULL,
tdsignal automatically finds a thread, otherwise it sends signal
to given thread.
Add utility function psignal_event to send a realtime sigevent
to a process according to the delivery requirement specified in
struct sigevent.

18 years agoSuggest the user to use 'diff -urN' instead of 'diff -crN'.
delphij [Thu, 3 Nov 2005 03:49:57 +0000 (03:49 +0000)]
Suggest the user to use 'diff -urN' instead of 'diff -crN'.

Submitted by: Jimmie James  <jimmiejaz@gmail.com>
PR: docs/88427

18 years agoOops, don't change tdsignal call.
davidxu [Thu, 3 Nov 2005 01:38:49 +0000 (01:38 +0000)]
Oops, don't change tdsignal call.

18 years agoAdd thread_find() function to search a thread by lwpid.
davidxu [Thu, 3 Nov 2005 01:34:08 +0000 (01:34 +0000)]
Add thread_find() function to search a thread by lwpid.

18 years agoList IFT_BRIDGE as a valid type so that arp entries can be properly deleted.
thompsa [Thu, 3 Nov 2005 00:56:43 +0000 (00:56 +0000)]
List IFT_BRIDGE as a valid type so that arp entries can be properly deleted.

Submitted by: Michal Mertl <mime^traveller.cz>

18 years agoIt had been noticed disc2 was overflowing earlier but committing the
kensmith [Thu, 3 Nov 2005 00:23:13 +0000 (00:23 +0000)]
It had been noticed disc2 was overflowing earlier but committing the
fix slipped through a crack.  Remove the apache and php packages under
the assumption someone installing a Web server has network access and
doesn't *need* the packages on disc2.

This will be insta-MFCed...

18 years agoAdd `local' and `return' to the list of built-ins.
jcamou [Thu, 3 Nov 2005 00:15:19 +0000 (00:15 +0000)]
Add `local' and `return' to the list of built-ins.

Submitted by: garys
Approved by: trhodes (mentor)

18 years agoSmall changes in the AlphaStation 200 and PC14 area. PC164 SRM does
wilko [Wed, 2 Nov 2005 22:18:47 +0000 (22:18 +0000)]
Small changes in the AlphaStation 200 and PC14 area.  PC164 SRM does
not work with 53C896 SCSI chips.

Submitted by: Owen Mann <owen@mann.org>

18 years agoCalling setrlimit from 32bit apps could potentially increase certain
ps [Wed, 2 Nov 2005 21:18:07 +0000 (21:18 +0000)]
Calling setrlimit from 32bit apps could potentially increase certain
limits beyond what should be capiable in a 32bit process, so we
must fixup the limits.

Reviewed by: jhb

18 years agoChange the x86 code to allocate IDT vectors on-demand when an interrupt
jhb [Wed, 2 Nov 2005 20:11:47 +0000 (20:11 +0000)]
Change the x86 code to allocate IDT vectors on-demand when an interrupt
source is first enabled similar to how intr_event's now allocate ithreads
on-demand.  Previously, we would map IDT vectors 1:1 to IRQs.  Since we
only have 191 available IDT vectors for I/O interrupts, this limited us
to only supporting IRQs 0-190 corresponding to the first 190 I/O APIC
intpins.  On many machines, however, each PCI-X bus has its own APIC even
though it only has 1 or 2 devices, thus, we were reserving between 24 and
32 IRQs just for 1 or 2 devices and thus 24 or 32 IDT vectors.  With this
change, a machine with 100 IRQs but only 5 in use will only use up 5 IDT
vectors.  Also, this change provides an API (apic_alloc_vector() and
apic_free_vector()) that will allow a future MSI interrupt source driver to
request IDT vectors for use by MSI interrupts on x86 machines.

Tested on: amd64, i386

18 years agoTests with my dual Opteron system have shown that it's possible
wpaul [Wed, 2 Nov 2005 18:01:04 +0000 (18:01 +0000)]
Tests with my dual Opteron system have shown that it's possible
for code to start out on one CPU when thunking into Windows
mode in ctxsw_utow(), and then be pre-empted and migrated to another
CPU before thunking back to UNIX mode in ctxsw_wtou(). This is
bad, because then we can end up looking at the wrong 'thread environment
block' when trying to come back to UNIX mode. To avoid this, we now
pin ourselves to the current CPU when thunking into Windows code.

Few other cleanups, since I'm here:

- Get rid of the ndis_isr(), ndis_enable_interrupt() and
  ndis_disable_interrupt() wrappers from kern_ndis.c and just invoke
  the miniport's methods directly in the interrupt handling routines
  in subr_ndis.c. We may as well lose the function call overhead,
  since we don't need to export these things outside of ndis.ko
  now anyway.

- Remove call to ndis_enable_interrupt() from ndis_init() in if_ndis.c.
  We don't need to do it there anyway (the miniport init routine handles
  it, if needed).

- Fix the logic in NdisWriteErrorLogEntry() a little.

- Change some NDIS_STATUS_xxx codes in subr_ntoskrnl.c into STATUS_xxx
  codes.

- Handle kthread_create() failure correctly in PsCreateSystemThread().

18 years agoMandatory mbuf cluster reference counting and groundwork for UMA
andre [Wed, 2 Nov 2005 16:20:36 +0000 (16:20 +0000)]
Mandatory mbuf cluster reference counting and groundwork for UMA
based jumbo 9k and jumbo 16k cluster support.

All mbuf's with external storage attached are mandatory reference
counted.  For clusters and jumbo clusters UMA provides the refcnt
storage directly.  It does not have to be separatly allocated.  Any
other type of external storage gets its own refcnt allocated from
an UMA mbuf refcnt zone instead of normal kernel malloc.

The refcount API MEXT_ADD_REF() and MEXT_REM_REF() is no longer
publically accessible.  The proper m_* functions have to be used.

mb_ctor_clust() and mb_dtor_clust() both handle normal 2K as well
as 9k and 16k clusters.

Clusters and jumbo clusters may be obtained without attaching it
immideatly to an mbuf.  This is for high performance cluster
allocation in network drivers where mbufs are attached after the
cluster has been filled.

Tested by: rwatson
Sponsored by: TCP/IP Optimizations Fundraise 2005

18 years agoFix several races between socket closure and node/hook
glebius [Wed, 2 Nov 2005 15:34:42 +0000 (15:34 +0000)]
Fix several races between socket closure and node/hook
destruction:
  - Backout 1.62, since it doesn't fix all possible
    problems.
  - Upon node creation, put an additional reference on node.
  - Add a mutex and refcounter to struct ngsock. Netgraph node,
    control socket and data socket all count as references.
  - Introduce ng_socket_free_priv() which removes one reference
    from ngsock, and frees it when all references has gone.
  - No direct pointers between pcbs and node, all pointing
    is done via struct ngsock and protected with mutex.

18 years agoFix two races which happen when netgraph is restructuring:
glebius [Wed, 2 Nov 2005 15:23:47 +0000 (15:23 +0000)]
Fix two races which happen when netgraph is restructuring:
  - Introduce ng_topo_mtx, a mutex to protect topology changes.
  - In ng_destroy_node() protect with ng_topo_mtx the process
    of checking and pointing at ng_deadnode. [1]
  - In ng_con_part2() check that our peer is not a ng_deadnode,
    and protect the check with ng_topo_mtx.
  - Add KASSERTs to ng_acquire_read/write, to make more
    understandible synopsis in case if called on ng_deadnode.

Reported by: Roselyn Lee [1]

18 years agoRework the ng_item queueing on nodes:
glebius [Wed, 2 Nov 2005 14:27:24 +0000 (14:27 +0000)]
Rework the ng_item queueing on nodes:
  - Introduce a new flags NGQF_QREADER and NGQF_QWRITER,
    which tell how the item should be actually applied,
    overriding NGQF_READER/NGQF_WRITER flags.
  - Do not differ between pending reader or writer. Use only
    one flag that is raised, when there are pending items.
  - Schedule netgraph ISR in ng_queue_rw(), so that callers
    do not need to do this job.
  - Fix several comments.

Submitted by: julian

18 years agoRemove a redundant _get_curthread() call.
davidxu [Wed, 2 Nov 2005 14:06:29 +0000 (14:06 +0000)]
Remove a redundant _get_curthread() call.

18 years agoThis commit was generated by cvs2svn to compensate for changes in r151970,
harti [Wed, 2 Nov 2005 14:05:49 +0000 (14:05 +0000)]
This commit was generated by cvs2svn to compensate for changes in r151970,
which included commits to RCS files with non-trunk default branches.

18 years agoVendor patch: fix the reporting of ifOperStatus. We now consider an
harti [Wed, 2 Nov 2005 14:05:49 +0000 (14:05 +0000)]
Vendor patch: fix the reporting of ifOperStatus. We now consider an
interface up when it is running AND the link is not down (that is, it is
up or unknown). If the interface is running but the link is down, we return
state 'dormant', because we're waiting for an external event. Otherwise
the interface is 'down'.

Submitted by: csjp
Reviewed by: glebius

18 years agoMoved the optimization for tiny x from __kernel_tan[f](x) to tan[f](x)
bde [Wed, 2 Nov 2005 14:01:45 +0000 (14:01 +0000)]
Moved the optimization for tiny x from __kernel_tan[f](x) to tan[f](x)
so that it can be faster for tiny x and avoided for reduced x.

This improves things a little differently than for cosine and sine.
We still need to reclassify x in the "kernel" functions, but we get
an extra optimization for tiny x, and an overall optimization since
tiny reduced x rarely happens.  We also get optimizations for space
and style.  A large block of poorly duplicated code to fix a special
case is no longer needed.  This supersedes the fixes in k_sin.c revs
1.9 and 1.11 and k_sinf.c 1.8 and 1.10.

Fixed wrong constant for the cutoff for "tiny" in tanf().  It was
2**-28, but should be almost the same as the cutoff in sinf() (2**-12).
The incorrect cutoff protected us from the bugs fixed in k_sinf.c 1.8
and 1.10, except 4 cases of reduced args passed the cutoff and needed
special handling in theory although not in practice.  Now we essentially
use a cutoff of 0 for the case of reduced args, so we now have 0 special
args instead of 4.

This change makes no difference to the results for sinf() (since it
only changes the algorithm for the 4 special args and the results for
those happen not to change), but it changes lots of results for sin().
Exhaustive testing is impossible for sin(), but exhaustive testing
for sinf() (relative to a version with the old algorithm and a fixed
cutoff) shows that the changes in the error are either reductions or
from 0.5-epsilon ulps to 0.5+epsilon ulps.  The new method just uses
some extra terms in approximations so it tends to give more accurate
results, and there are apparently no problems from having extra
accuracy.  On amd64 with -O1, on all float args the error range in ulps
is reduced from (0.500, 0.665] to [0.335, 0.500) in 24168 cases and
increased from 0.500-epsilon to 0.500+epsilon in 24 cases.  Non-
exhaustive testing by ucbtest shows no differences.

18 years agoIn raise(), use a shortcut to directly send signal to current thread.
davidxu [Wed, 2 Nov 2005 13:52:48 +0000 (13:52 +0000)]
In raise(), use a shortcut to directly send signal to current thread.

18 years agoRetire MT_HEADER mbuf type and change its users to use MT_DATA.
andre [Wed, 2 Nov 2005 13:46:32 +0000 (13:46 +0000)]
Retire MT_HEADER mbuf type and change its users to use MT_DATA.

Having an additional MT_HEADER mbuf type is superfluous and redundant
as nothing depends on it.  It only adds a layer of confusion.  The
distinction between header mbuf's and data mbuf's is solely done
through the m->m_flags M_PKTHDR flag.

Non-native code is not changed in this commit.  For compatibility
MT_HEADER is mapped to MT_DATA.

Sponsored by: TCP/IP Optimization Fundraise 2005

18 years agoUpdated the comment about the optimization for tiny x (the previous
bde [Wed, 2 Nov 2005 13:06:49 +0000 (13:06 +0000)]
Updated the comment about the optimization for tiny x (the previous
commit moved it).  This includes a comment that the "kernel" sine no
longer works on arg -0, so callers must now handle this case.  The kernel
sine still works on all other tiny args; without the optimization it is
just a little slower on these args.  I intended it to keep working on
all tiny args, but that seems to be impossible without losing efficiency
or accuracy.  (sin(x) ~ x * (1 + S1*x**2 + ...) would preserve -0, but
the approximation must be written as x + S1*x**3 + ... for accuracy.)

18 years agoo Update list of holidays in Russia.
maxim [Wed, 2 Nov 2005 09:22:28 +0000 (09:22 +0000)]
o Update list of holidays in Russia.

Submitted by: osa
MFC after: 1 week

18 years agoInstead of a panic()ing in pmap_insert_entry() if get_pv_entry() fails,
alc [Wed, 2 Nov 2005 08:23:28 +0000 (08:23 +0000)]
Instead of a panic()ing in pmap_insert_entry() if get_pv_entry() fails,
reclaim a pv entry by destroying a mapping to an inactive page.

18 years agoRemoved dead code for handling tan[f]() on odd multiples of pi/2. This
bde [Wed, 2 Nov 2005 06:45:21 +0000 (06:45 +0000)]
Removed dead code for handling tan[f]() on odd multiples of pi/2.  This
case never occurs since pi/2 is irrational so no multiple of it can
be represented as a float and we have precise arg reduction so we never
end up with a remainder of 0 in the "kernel" function unless the
original arg is 0.

If this case occurs, then we would now fall through to general code
that returns +-Inf (depending on the sign of the reduced arg) instead
of forcing +Inf.  The correct handling would be to return NaN since
we would have lost so much precision that the correct result can be
anything _except_ +-Inf.

Don't reindent the else clause left over from this, although it was already
bogusly indented ("if (foo) return; else ..." just marches the indentation
to the right), since it will be removed too.

Index: k_tan.c
===================================================================
RCS file: /home/ncvs/src/lib/msun/src/k_tan.c,v
retrieving revision 1.10
diff -r1.10 k_tan.c
88,90c88
<  if (((ix | low) | (iy + 1)) == 0)
<  return one / fabs(x);
<  else {
---
>  {

18 years agoFix an erroneous description of the file descriptor assignments for
jdp [Wed, 2 Nov 2005 05:47:49 +0000 (05:47 +0000)]
Fix an erroneous description of the file descriptor assignments for
the "~C" command.

MFC After: 1 week

18 years agoFixed some of the silliness related to rev.1.8. In 1.8, "double" in
bde [Wed, 2 Nov 2005 05:37:31 +0000 (05:37 +0000)]
Fixed some of the silliness related to rev.1.8.  In 1.8, "double" in
a declaration was not translated to "float" although bit fiddling on
double variables was translated.  This resulted in garbage being put
into the low word of one of the doubles instead of non-garbage being
put into the only word of the intended float.  This had no effect on
any result because:
- with doubles, the algorithm for calculating -1/(x+y) is unnecessarily
  complicated.  Just returning -1/((double)x+y) would work, and the
  misdeclaration gave something like that except for messing up some
  low bits with the bit fiddling.
- doubles have plenty of bits to spare so messing up some of the low
  bits is unlikely to matter.
- due to other bugs, the buggy code is reached for a whole 4 args out
  of all 2**32 float args.  The bug fixed by 1.8 only affects a small
  percentage of cases and a small percentage of 4 is 0.  The 4 args
  happen to cause no problems without 1.8, so they are even less likely
  to be affected by the bug in 1.8 than average args; in fact, neither
  1.8 nor this commit makes any difference to the result for these 4
  args (and thus for all args).

Corrections to the log message in 1.8: the bug only applies to tan()
and not tanf(), not because the float type can't represent numbers
large enough to trigger the problem (e.g., the example in the fdlibm-5.3
readme which is > 1.0e269), but because:
- the float type can't represent small enough numbers.  For there to be
  a possible problem, the original arg for tanf() must lie very near an
  odd multiple of pi/2.  Doubles can get nearer in absolute units.  In
  ulps there should be little difference, but ...
- ... the cutoff for "small" numbers is bogus in k_tanf.c.  It is still
  the double value (2**-28).  Since this is 32 times smaller than
  FLT_EPSILON and large float values are not very uniformly distributed,
  only 6 args other than ones that are initially below the cutoff give
  a reduced arg that passes the cutoff (the 4 problem cases mentioned
  above and 2 non-problem cases).

Fixing the cutoff makes the bug affect tanf() and much easier to detect
than for tan().  With a cutoff of 2**-12 on amd64 with -O1, 670102
args pass the cutoff; of these, there are 337604 cases where there
might be an error of >= 1 ulp and 5826 cases where there is such an
error; the maximum error is 1.5382 ulps.

The fix in 1.8 works with the reduced cutoff in all cases despite the
bug in it.  It changes the result in 84492 cases altogether to fix the
5826 broken cases.  Fixing the fix by translating "double" to "float"
changes the result in 42 cases relative to 1.8.  In 24 cases the
(absolute) error is increased and in 18 cases it is reduced, but it
remains less than 1 ulp in all cases.

18 years agoRate limit vnode_pager_putpages printfs to once a second.
ps [Tue, 1 Nov 2005 23:00:24 +0000 (23:00 +0000)]
Rate limit vnode_pager_putpages printfs to once a second.

18 years agoThrow the switch and turn on STOP_NMI on in GENERIC for amd64 and i386.
jhb [Tue, 1 Nov 2005 22:59:03 +0000 (22:59 +0000)]
Throw the switch and turn on STOP_NMI on in GENERIC for amd64 and i386.

Requested by: kris
Ok'd by: scottl

18 years agoCatch up with ACPI-CA 20051021 import
jkim [Tue, 1 Nov 2005 22:44:08 +0000 (22:44 +0000)]
Catch up with ACPI-CA 20051021 import

18 years agoUpdate to reflect import of ACPI-CA 20051021 with includes fixups
jkim [Tue, 1 Nov 2005 22:38:50 +0000 (22:38 +0000)]
Update to reflect import of ACPI-CA 20051021 with includes fixups

18 years agoLocal change: remove unnecessary __cdecl
jkim [Tue, 1 Nov 2005 22:33:32 +0000 (22:33 +0000)]
Local change: remove unnecessary __cdecl

18 years agoLocal change: remove compilation warnings
jkim [Tue, 1 Nov 2005 22:30:52 +0000 (22:30 +0000)]
Local change: remove compilation warnings

18 years agoFix conflicts from import of Intel ACPI-CA 20051021
jkim [Tue, 1 Nov 2005 22:28:49 +0000 (22:28 +0000)]
Fix conflicts from import of Intel ACPI-CA 20051021

18 years agoUnchanged files that are off the vendor branch
jkim [Tue, 1 Nov 2005 22:23:25 +0000 (22:23 +0000)]
Unchanged files that are off the vendor branch