]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoIt turns out that set_charset() invokes build_iovec() which modifies
Tai-hwa Liang [Fri, 25 Nov 2005 19:48:53 +0000 (19:48 +0000)]
It turns out that set_charset() invokes build_iovec() which modifies
iov address internally through realloc(3).  However, since the function
parameter wasn't designed to allow the modified iov being passed back to
the caller, we end up feeding iov with several corrupted entries(depends on
how many arguments were pushed into iovec before set_charset()) to nmount(2).

This commit fixes this regression introduced in rev1.31 such that
mount_cd9660(8) with code page conversion option(-C) enabled works again.

Reviewed by: rodrigc

18 years agoFix AMRR initialization.
Damien Bergamini [Fri, 25 Nov 2005 19:32:29 +0000 (19:32 +0000)]
Fix AMRR initialization.

MFC after: 6 days

18 years agoReorder the variable lists on this page alphabetically by make variable
Joseph Koshy [Fri, 25 Nov 2005 14:31:34 +0000 (14:31 +0000)]
Reorder the variable lists on this page alphabetically by make variable
name.

Discussed with: ru

18 years agoFix panic when we cannot find self-id of probing nodes.
Hidetoshi Shimokawa [Fri, 25 Nov 2005 14:29:24 +0000 (14:29 +0000)]
Fix panic when we cannot find self-id of probing nodes.
This shouldn't happen as far as the self-id buffer is vaild but
some people have this problem.

PR: kern/83999
Submitted by: Markus Wild <fbsd-lists@dudes.ch>
MFC after: 3 days

18 years agoRevert revision 1.416 and don't create a hierarchy before installing
Ruslan Ermilov [Fri, 25 Nov 2005 10:12:58 +0000 (10:12 +0000)]
Revert revision 1.416 and don't create a hierarchy before installing
a kernel.  It's slower and is generally only applicable to RELENG_4.

18 years agoAdd sysctl descriptions.
Lukas Ertl [Fri, 25 Nov 2005 10:09:30 +0000 (10:09 +0000)]
Add sysctl descriptions.

18 years agoWhen IOCATAGPARM is called, update the capabilities page that is stored
Søren Schmidt [Fri, 25 Nov 2005 09:00:56 +0000 (09:00 +0000)]
When IOCATAGPARM is called, update the capabilities page that is stored
in the kernel and return the new values.

18 years agoUse the correct file name for the ldscript.
Olivier Houchard [Fri, 25 Nov 2005 03:30:45 +0000 (03:30 +0000)]
Use the correct file name for the ldscript.

18 years agoSend the packet to BPF after setting the duration field of the frame.
Damien Bergamini [Thu, 24 Nov 2005 21:40:24 +0000 (21:40 +0000)]
Send the packet to BPF after setting the duration field of the frame.

MFC after: 1 week

18 years agoo Force the sending of an extra URB if there is less than 2 bytes left
Damien Bergamini [Thu, 24 Nov 2005 21:31:39 +0000 (21:31 +0000)]
o Force the sending of an extra URB if there is less than 2 bytes left
  at the end of the last URB (URB = USB Request Block = 64 bytes).
o Free the AMRR reserved xfer in detach.
o Minor tweaks.

MFC after: 1 week

18 years agoFix the following bugs:
Ruslan Ermilov [Thu, 24 Nov 2005 18:56:14 +0000 (18:56 +0000)]
Fix the following bugs:

- In ifc_name2unit(), disallow leading zeroes in a unit.

  Exploit: ifconfig lo01 create

- In ifc_name2unit(), properly handle overflows.  Otherwise,
  either of two local panic()'s can occur, either because
  no interface with such a name could be found after it was
  successfully created, or because the code will bogusly
  assume that it's a wildcard (unit < 0 due to overflow).

  Exploit: ifconfig lo<overflowed_integer> create

- Previous revision made the following sequence trigger
  a KASSERT() failure in queue(3):

  Exploit: ifconfig lo0 destroy; ifconfig lo0 destroy

  This is because IFC_IFLIST_REMOVE() is always called
  before ifc->ifc_destroy() has been run, not accounting
  for the fact that the latter can fail and leave the
  interface operating (like is the case for "lo0").
  So we ended up calling LIST_REMOVE() twice.  We cannot
  defer IFC_IFLIST_REMOVE() until after a call to
  ifc->ifc_destroy() because the ifnet may have been
  removed and its memory has been freed, so recover from
  this by re-inserting the ifnet in the cloned interfaces
  list if ifc->ifc_destroy() indicates a failure.

18 years agoFixing a regression introduced in rev1.72 by connecting cd9660 to the
Tai-hwa Liang [Thu, 24 Nov 2005 17:35:05 +0000 (17:35 +0000)]
Fixing a regression introduced in rev1.72 by connecting cd9660 to the
external mounting program list as well; otherwise, entry like the following
in /etc/fstab wouldn't work:

/dev/acd0 /mnt/cdrom cd9660 ro,-C=big5 0 0

Reviewed by: rodrigc

18 years agoAdd entry for 6.1.
Joel Dahl [Thu, 24 Nov 2005 17:28:43 +0000 (17:28 +0000)]
Add entry for 6.1.

18 years ago- Stop talking about non-FreeBSD stuff (mostly because it's hard
Ruslan Ermilov [Thu, 24 Nov 2005 16:03:09 +0000 (16:03 +0000)]
- Stop talking about non-FreeBSD stuff (mostly because it's hard
  to keep this info up-to-date as time goes by).
- Revise the markup.

18 years agoFix typo.
Lukas Ertl [Thu, 24 Nov 2005 15:28:32 +0000 (15:28 +0000)]
Fix typo.

18 years agoRemember the bus_dmamap_t where we loaded the mbuf, and sync this map instead
Olivier Houchard [Thu, 24 Nov 2005 15:13:47 +0000 (15:13 +0000)]
Remember the bus_dmamap_t where we loaded the mbuf, and sync this map instead
of tx_buffer->map, or we could end up syncing the wrong map.

18 years agoSince we want a vinum geom created anytime the module loads, move
Lukas Ertl [Thu, 24 Nov 2005 15:11:41 +0000 (15:11 +0000)]
Since we want a vinum geom created anytime the module loads, move
the geom creation to a seperate init function and ignore the tasting.

The config is now parsed only in the vinumdrive geom, which hopefully
fixes the problem, that the drive class tasted before the vinum class
had a chance, for good.

Also restore the behaviour that the module can be loaded at boot time
and on a running system.

18 years agoFix prototype.
Ruslan Ermilov [Thu, 24 Nov 2005 15:10:38 +0000 (15:10 +0000)]
Fix prototype.

18 years agoFix parsing of atime, clusterr, clusterw, exec, suid, symfollow
Craig Rodrigues [Thu, 24 Nov 2005 15:06:40 +0000 (15:06 +0000)]
Fix parsing of atime, clusterr, clusterw, exec, suid, symfollow
mount options.

Noticed by: Amir Shalem < amir at boom dot org dot il>

18 years agoAdd a -f configfile option to devd(8), based on a patch submitted by
Joseph Koshy [Thu, 24 Nov 2005 14:39:41 +0000 (14:39 +0000)]
Add a -f configfile option to devd(8), based on a patch submitted by
Wojciech A. Koszek.

Submitted by: Wojciech A. Koszek <dunstan@freebsd.czest.pl>

18 years agoFix prototype.
Ruslan Ermilov [Thu, 24 Nov 2005 14:27:53 +0000 (14:27 +0000)]
Fix prototype.

18 years agoFix prototypes.
Ruslan Ermilov [Thu, 24 Nov 2005 14:23:16 +0000 (14:23 +0000)]
Fix prototypes.

18 years agoFix prototype.
Ruslan Ermilov [Thu, 24 Nov 2005 14:17:35 +0000 (14:17 +0000)]
Fix prototype.

18 years agoMinor cleanups and optimizations:
Bruce Evans [Thu, 24 Nov 2005 13:48:40 +0000 (13:48 +0000)]
Minor cleanups and optimizations:

- Remove dead code that I forgot to remove in the previous commit.

- Calculate the sum of the lower terms of the polynomial (divided by
  x**5) in a single expression (sum of odd terms) + (sum of even terms)
  with parentheses to control grouping.  This is clearer and happens to
  give better instruction scheduling for a tiny optimization (an
  average of about ~0.5 cycles/call on Athlons).

- Calculate the final sum in a single expression with parentheses to
  control grouping too.  Change the grouping from
  first_term + (second_term + sum_of_lower_terms) to
  (first_term + second_term) + sum_of_lower_terms.  Normally the first
  grouping must be used for accuracy, but extra precision makes any
  grouping give a correct result so we can group for efficiency.  This
  is a larger optimization (average 3-4 cycles/call or 5%).

- Use parentheses to indicate that the C order of left to right evaluation
  is what is wanted (for efficiency) in a multiplication too.

The old fdlibm code has several optimizations related to these.  2
involve doing an extra operation that can be done almost in parallel
on some superscalar machines but are pessimizations on sequential
machines.  Others involve statement ordering or expression grouping.
All of these except the ordering for the combining the sums of the odd
and even terms seem to be ideal for Athlons, but parallelism is still
limited so all of these optimizations combined together with the ones
in this commit save only ~6-8 cycles (~10%).

On an AXP, tanf() on uniformly distributed args in [-2pi, 2pi] now
takes 39-59 cycles.  I don't know of any more optimizations for tanf()
short of writing it all in asm with very MD instruction scheduling.
Hardware fsin takes 122-138 cycles.  Most of the optimizations for
tanf() don't work very well for tan[l]().  fdlibm tan() now takes
145-365 cycles.

18 years agoImprove the documentation of "proxyall" knob, somewhat: we do not
Ruslan Ermilov [Thu, 24 Nov 2005 13:44:42 +0000 (13:44 +0000)]
Improve the documentation of "proxyall" knob, somewhat: we do not
proxy for hosts that are reachable through the same interface the
request came in from.  This feature is mainly for hosts reachable
through some P2P link, e.g. the gif(4) tunnel.

18 years agoFix prototype.
Ruslan Ermilov [Thu, 24 Nov 2005 11:29:11 +0000 (11:29 +0000)]
Fix prototype.

18 years agoFix prototypes.
Ruslan Ermilov [Thu, 24 Nov 2005 11:26:36 +0000 (11:26 +0000)]
Fix prototypes.

18 years agoFix prototypes.
Ruslan Ermilov [Thu, 24 Nov 2005 11:14:06 +0000 (11:14 +0000)]
Fix prototypes.

18 years agoFix prototypes.
Ruslan Ermilov [Thu, 24 Nov 2005 10:54:47 +0000 (10:54 +0000)]
Fix prototypes.

18 years agoFix prototype.
Ruslan Ermilov [Thu, 24 Nov 2005 10:43:35 +0000 (10:43 +0000)]
Fix prototype.

18 years agoFix prototype.
Ruslan Ermilov [Thu, 24 Nov 2005 10:32:39 +0000 (10:32 +0000)]
Fix prototype.

18 years agoFix prototypes.
Ruslan Ermilov [Thu, 24 Nov 2005 10:30:44 +0000 (10:30 +0000)]
Fix prototypes.

18 years agoFix prototypes.
Ruslan Ermilov [Thu, 24 Nov 2005 10:06:05 +0000 (10:06 +0000)]
Fix prototypes.

18 years agoFix prototype to match the code and documentation.
Ruslan Ermilov [Thu, 24 Nov 2005 09:51:59 +0000 (09:51 +0000)]
Fix prototype to match the code and documentation.

18 years agos/5.5/6.0/ in HISTORY section.
Joel Dahl [Thu, 24 Nov 2005 09:25:10 +0000 (09:25 +0000)]
s/5.5/6.0/ in HISTORY section.

Discussed with: ru

18 years agoRevert last revision, strmode() should be moved to <unistd.h> to be
Ruslan Ermilov [Thu, 24 Nov 2005 08:30:44 +0000 (08:30 +0000)]
Revert last revision, strmode() should be moved to <unistd.h> to be
properly fixed.

18 years agoAdd missing "struct" in i386/i386/machdep.c,v 1.497 by deischen@.
Ruslan Ermilov [Thu, 24 Nov 2005 08:16:18 +0000 (08:16 +0000)]
Add missing "struct" in i386/i386/machdep.c,v 1.497 by deischen@.

18 years agoMake SYNOPSIS compile.
Ruslan Ermilov [Thu, 24 Nov 2005 07:48:19 +0000 (07:48 +0000)]
Make SYNOPSIS compile.

Attn peter@: this manpage wasn't synced with your code changes.

18 years agoFix prototypes.
Ruslan Ermilov [Thu, 24 Nov 2005 07:33:35 +0000 (07:33 +0000)]
Fix prototypes.

Attn davidxu@: most likely, the description should also be tweaked
after your undocumented changes that changed these prototypes.

18 years agoFix prototype to match the code and documentation.
Ruslan Ermilov [Thu, 24 Nov 2005 07:20:26 +0000 (07:20 +0000)]
Fix prototype to match the code and documentation.

18 years agoFix prototypes.
Ruslan Ermilov [Thu, 24 Nov 2005 07:12:01 +0000 (07:12 +0000)]
Fix prototypes.

18 years agoKeep up with const poisoning in uuid.h,v 1.3.
Ruslan Ermilov [Thu, 24 Nov 2005 07:04:20 +0000 (07:04 +0000)]
Keep up with const poisoning in uuid.h,v 1.3.

18 years agoFix prototype of strmode() to match the code and documentation.
Ruslan Ermilov [Thu, 24 Nov 2005 06:59:35 +0000 (06:59 +0000)]
Fix prototype of strmode() to match the code and documentation.

18 years agoFix prototype.
Ruslan Ermilov [Thu, 24 Nov 2005 06:56:21 +0000 (06:56 +0000)]
Fix prototype.

18 years agoOnly copy out the battery status/info if there was no error.
Nate Lawson [Thu, 24 Nov 2005 05:23:56 +0000 (05:23 +0000)]
Only copy out the battery status/info if there was no error.

18 years agoUse a magic number to know we were started from the elf wrapper.
Olivier Houchard [Thu, 24 Nov 2005 02:27:55 +0000 (02:27 +0000)]
Use a magic number to know we were started from the elf wrapper.
Add a dummy _start function to make the non-elf version of the wrapper work.

18 years agoCreate a non-elf pure binary version of the kernel as well.
Olivier Houchard [Thu, 24 Nov 2005 02:25:49 +0000 (02:25 +0000)]
Create a non-elf pure binary version of the kernel as well.

18 years agoOptimized by eliminating the special case for 0.67434 <= |x| < pi/4.
Bruce Evans [Thu, 24 Nov 2005 02:04:26 +0000 (02:04 +0000)]
Optimized by eliminating the special case for 0.67434 <= |x| < pi/4.

A single polynomial approximation for tan(x) works in infinite precision
up to |x| < pi/2, but in finite precision, to restrict the accumulated
roundoff error to < 1 ulp, |x| must be restricted to less than about
sqrt(0.5/((1.5+1.5)/3)) ~= 0.707.  We restricted it a bit more to
give a safety margin including some slop for optimizations.  Now that
we use double precision for the calculations, the accumulated roundoff
error is in double-precision ulps so it can easily be made almost 2**29
times smaller than a single-precision ulp.  Near x = pi/4 its maximum
is about 0.5+(1.5+1.5)*x**2/3 ~= 1.117 double-precision ulps.

The minimax polynomial needs to be different to work for the larger
interval.  I didn't increase its degree the old degree is just large
enough to keep the final error less than 1 ulp and increasing the
degree would be a pessimization.  The maximum error is now ~0.80
ulps instead of ~0.53 ulps.

The speedup from this optimization for uniformly distributed args in
[-2pi, 2pi] is 28-43% on athlons, depending on how badly gcc selected
and scheduled the instructions in the old version.  The old version
has some int-to-float conversions that are apparently difficult to schedule
well, but gcc-3.3 somehow did everything ~10 cycles or ~10% faster than
gcc-3.4, with the difference especially large on AXPs.  On A64s, the
problem seems to be related to documented penalties for moving single
precision data to undead xmm registers.  With this version, the speed
is cycles is almost independent of the athlon and gcc version despite
the large differences in instruction selection to use the FPU on AXPs
and SSE on A64s.

18 years agoMerge in new driver version from Intel - 3.2.18.
Gleb Smirnoff [Thu, 24 Nov 2005 01:44:49 +0000 (01:44 +0000)]
Merge in new driver version from Intel - 3.2.18.

The most important change is support for adapters based on
82571 and 82572 chips.

Tested on: 82547EI on i386
Tested on: 82540EM on sparc64

18 years agoCorrect division by zero error in comment.
Kris Kennaway [Thu, 24 Nov 2005 00:53:14 +0000 (00:53 +0000)]
Correct division by zero error in comment.

18 years agoRemove UFS-specific parts from mount(8).
Craig Rodrigues [Wed, 23 Nov 2005 23:22:56 +0000 (23:22 +0000)]
Remove UFS-specific parts from mount(8).
For mounting UFS, all mount options are passed directly to nmount(),
without any UFS-specific logic.

18 years agoThese files were never hooked into the build, and were the start
Craig Rodrigues [Wed, 23 Nov 2005 23:06:33 +0000 (23:06 +0000)]
These files were never hooked into the build, and were the start
of an nmount()-based mount program for UFS.
Now that mount(8) calls nmount() directly for mounting UFS filesystems,
they are unnecessary.

18 years agoIn nmount() and vfs_donmount(), do not strcmp() the options in the iovec
Craig Rodrigues [Wed, 23 Nov 2005 20:51:15 +0000 (20:51 +0000)]
In nmount() and vfs_donmount(), do not strcmp() the options in the iovec
directly.  We need to copyin() the strings in the iovec before
we can strcmp() them.  Also, when we want to send the errmsg back
to userspace, we need to copyout()/copystr() the string.

Add a small helper function vfs_getopt_pos() which takes in the
name of an option, and returns the array index of the name in the iovec,
or -1 if not found.  This allows us to locate an option in
the iovec without actually manipulating the iovec members. directly via
strcmp().

Noticed by: kris on sparc64

18 years agoFix prototype.
Ruslan Ermilov [Wed, 23 Nov 2005 20:34:37 +0000 (20:34 +0000)]
Fix prototype.

18 years agoFix prototype.
Ruslan Ermilov [Wed, 23 Nov 2005 20:26:58 +0000 (20:26 +0000)]
Fix prototype.

18 years agoDo not pass userquota and groupquota mount options to nmount().
Craig Rodrigues [Wed, 23 Nov 2005 20:17:27 +0000 (20:17 +0000)]
Do not pass userquota and groupquota mount options to nmount().
These options are read from fstab by quotacheck(8), but are not
valid mount options that need to be passed down the the filesystem.

Noticed by: maxim

18 years ago- Adding the missing 'W' option back which was accidentally removed
Tai-hwa Liang [Wed, 23 Nov 2005 19:52:14 +0000 (19:52 +0000)]
- Adding the missing 'W' option back which was accidentally removed
  in rev1.37.
- Fixing a core dump inside build_iovec_argf by providing a !NULL format
  string to vsnprintf(3).

Reviewed by: rodrigc

18 years agoAdd locking and mark MPSAFE:
John Baldwin [Wed, 23 Nov 2005 18:51:34 +0000 (18:51 +0000)]
Add locking and mark MPSAFE:
- Add locked variants of start, init, and ifmedia_upd.
- Add a mutex to the softc and remove spl calls.
- Use callout(9) rather than timeout(9).
- Setup interrupt handler last in attach.
- Use M_ZERO rather than bzero.

MFC after: 1 week
Tested by: wpaul

18 years agoMFi386: Sort and add COUNT_{IPIS,XINVLTLB_HITS}.
John Baldwin [Wed, 23 Nov 2005 18:12:05 +0000 (18:12 +0000)]
MFi386: Sort and add COUNT_{IPIS,XINVLTLB_HITS}.

Pointy hat to: jhb (2)

18 years agoSort.
John Baldwin [Wed, 23 Nov 2005 18:11:24 +0000 (18:11 +0000)]
Sort.

18 years agoMFP4: Bring in arm9 cache-related functions
Olivier Houchard [Wed, 23 Nov 2005 18:02:40 +0000 (18:02 +0000)]
MFP4: Bring in arm9 cache-related functions

Obtained from: NetBSD

18 years agoOptimize PLCP length field computation for 802.11b rates.
Damien Bergamini [Wed, 23 Nov 2005 17:32:57 +0000 (17:32 +0000)]
Optimize PLCP length field computation for 802.11b rates.

18 years agoSomehow memmove() got mapped to memset() in the patch table. Create a
Bill Paul [Wed, 23 Nov 2005 17:10:46 +0000 (17:10 +0000)]
Somehow memmove() got mapped to memset() in the patch table. Create a
real memmove() implementation and use that instead.

18 years agoFix prototypes.
Ruslan Ermilov [Wed, 23 Nov 2005 16:44:23 +0000 (16:44 +0000)]
Fix prototypes.

18 years ago- Quiet the pci_link(4) devices so that they don't show up in dmesg now.
John Baldwin [Wed, 23 Nov 2005 16:36:13 +0000 (16:36 +0000)]
- Quiet the pci_link(4) devices so that they don't show up in dmesg now.
- Improve panic message if we fail to read the PCI bus number from a bridge
  device.
- Don't try to lookup a BIOS IRQ for a link unless the link is routed via
  an ISA IRQ since BIOSen currently only route PCI link devices via ISA
  IRQs.

Tested by: Mathieu Prevot bsdhack at club-internet dot fr
MFC after: 1 week

18 years agoThere's no longer^Wyet <sys/capability.h>.
Ruslan Ermilov [Wed, 23 Nov 2005 16:24:39 +0000 (16:24 +0000)]
There's no longer^Wyet <sys/capability.h>.

18 years agoFix inet6_opt_get_val() prototype.
Ruslan Ermilov [Wed, 23 Nov 2005 16:07:54 +0000 (16:07 +0000)]
Fix inet6_opt_get_val() prototype.

18 years agoMake SYNOPSIS compile.
Ruslan Ermilov [Wed, 23 Nov 2005 15:55:38 +0000 (15:55 +0000)]
Make SYNOPSIS compile.

18 years agoMake SYNOPSIS compile after imp@'s changes.
Ruslan Ermilov [Wed, 23 Nov 2005 15:44:42 +0000 (15:44 +0000)]
Make SYNOPSIS compile after imp@'s changes.

18 years agoMake SYNOPSIS compile.
Ruslan Ermilov [Wed, 23 Nov 2005 15:41:36 +0000 (15:41 +0000)]
Make SYNOPSIS compile.

18 years agoUse only double precision for "kernel" tanf (except for returning float).
Bruce Evans [Wed, 23 Nov 2005 14:27:56 +0000 (14:27 +0000)]
Use only double precision for "kernel" tanf (except for returning float).
This is a minor interface change.  The function is renamed from
__kernel_tanf() to __kernel_tandf() so that misues of it will cause
link errors and not crashes.

This version is a routine translation with no special optimizations
for accuracy or efficiency.  It gives an unimportant increase in
accuracy, from ~0.9 ulps to 0.5285 ulps.  Almost all of the error is
from the minimax polynomial (~0.03 ulps and the final rounding step
(< 0.5 ulps).  It gives strange differences in efficiency in the -5
to +10% range, with -O1 fairly consistently becoming faster and -O2
slower on AXP and A64 with gcc-3.3 and gcc-3.4.

18 years agoAdd missing includes.
Ruslan Ermilov [Wed, 23 Nov 2005 10:49:07 +0000 (10:49 +0000)]
Add missing includes.

18 years agoDocument PKG_PATH enviroment variable.
Kirill Ponomarev [Wed, 23 Nov 2005 10:31:59 +0000 (10:31 +0000)]
Document PKG_PATH enviroment variable.

Prodded by: Mark Andrews <Mark_Andrews AT isc DOT org>
MFC after: 2 days

18 years agocorrect typo
Wilko Bulte [Wed, 23 Nov 2005 09:00:35 +0000 (09:00 +0000)]
correct typo

18 years agoUserland applications may include queue.h and define INVARIANTS
Ed Maste [Wed, 23 Nov 2005 04:02:27 +0000 (04:02 +0000)]
Userland applications may include queue.h and define INVARIANTS
but not provide a panic(9) implementation.  Thus, enable the sanity
checks under INVARIANTS only if _KERNEL is also defined.

Submitted by: jmallett
Approved by: rwatson (mentor)

18 years agoSimplified setiing up args for __kernel_rem_pio2(). We already have x
Bruce Evans [Wed, 23 Nov 2005 03:03:09 +0000 (03:03 +0000)]
Simplified setiing up args for __kernel_rem_pio2().  We already have x
with a 24-bit fraction, so we don't need a loop to split it into up to
3 terms with 24-bit fractions.

18 years agoQuick fix for stack buffer overrun in rev.1.13. Oops. The prec == 1
Bruce Evans [Wed, 23 Nov 2005 02:06:06 +0000 (02:06 +0000)]
Quick fix for stack buffer overrun in rev.1.13.  Oops.  The prec == 1
arg to __kernel_rem_pio2() gives 53-bit (double) precision, not single
precision and/or the array dimension like I thought.  prec == 2 is
used in e_rem_pio2.c for double precision although it is documented
to be for 64-bit (extended) precision, and I just reduced it by 1
thinking that this would give the value suitable for 24-bit (float)
precision.  Reducing it 1 more to the documented value for float
precision doesn't actually work (it gives errors of ~0.75 ulps in the
reduced arg, but errors of much less than 0.5 ulps are needed; the bug
seems to be in kernel_rem_pio2.c).  Keep using a value 1 larger than
the documented value but supply an array large enough hold the extra
unused result from this.

The bug can also be fixed quickly by increasing init_jk[0] in
k_rem_pio2.c from 2 to 3.  This gives behaviour identical to using
prec == 1 except it doesn't create the extra result.  It isn't clear
how the precision bug affects higher precisions.  113-bit (quad) is
the largest precision, so there is no way to use a large precision
to fix it.

18 years agoTry to fix problems with periodic hangs by never directly calling _BIF.
Nate Lawson [Wed, 23 Nov 2005 00:57:51 +0000 (00:57 +0000)]
Try to fix problems with periodic hangs by never directly calling _BIF.
Instead, re-evaluate _BIF only when we get a notify and use the cached
results.  We also still evaluate _BIF once on boot.  Also, optimize the
init loop a little by only querying for a particular info if it's not valid.

MFC after: 2 days

18 years agoTeach rfcomm_sppd(1) about service names, so it is possible to specify
Maksim Yevmenkin [Wed, 23 Nov 2005 00:56:18 +0000 (00:56 +0000)]
Teach rfcomm_sppd(1) about service names, so it is possible to specify
service name instead of channel number with -c command option. Supported
service names are: DUN (Dial-Up Networking), FAX (Fax) and SP (Serial Port).

MFC after: 1 week

18 years agoSimplify checks for valid battery info via DeMorgan's Rule. No
Nate Lawson [Wed, 23 Nov 2005 00:53:01 +0000 (00:53 +0000)]
Simplify checks for valid battery info via DeMorgan's Rule. No
functional change.

18 years agoGarbage collect machine/smptests.h now that it is empty and no longer used.
John Baldwin [Tue, 22 Nov 2005 22:55:48 +0000 (22:55 +0000)]
Garbage collect machine/smptests.h now that it is empty and no longer used.

18 years agoMake COUNT_IPIS and COUNT_XINVLTLB_HITS real kernel options and take
John Baldwin [Tue, 22 Nov 2005 22:54:42 +0000 (22:54 +0000)]
Make COUNT_IPIS and COUNT_XINVLTLB_HITS real kernel options and take
them out of machine/smptests.h.

18 years agoGarbage collect unused {VERBOSE_,}CPUSTOP_ON_DDBBREAK macros.
John Baldwin [Tue, 22 Nov 2005 22:37:13 +0000 (22:37 +0000)]
Garbage collect unused {VERBOSE_,}CPUSTOP_ON_DDBBREAK macros.

18 years agoGarbage collect the code to store diagnostics codes in a CMOS register
John Baldwin [Tue, 22 Nov 2005 22:34:14 +0000 (22:34 +0000)]
Garbage collect the code to store diagnostics codes in a CMOS register
during SMP startup.  We haven't had any issues with starting up the APs
on i386 in quite a while now which is all this code is really useful for.
If someone ever does really need it they can always dig it up out of the
attic.

18 years ago- Add a workaround (change the interrupt map mask to compare the full
Marius Strobl [Tue, 22 Nov 2005 22:32:50 +0000 (22:32 +0000)]
- Add a workaround (change the interrupt map mask to compare the full
  INO) for incorrect interrupt map entries on E250 machines. These
  incorrect entries caused the INO of the on-board HME to be also
  assigned to the second on-board NS16550 and to the on-board printer
  port controller. Further down the road caused hme(4) to fail to attach
  to the on-board HME in FreeBSD 5 and 6 as INTR_FAST and non-INTR_FAST
  handlers can't share the same IRQ there (it's unknown what whould
  happen in -CURRENT now that INTR_FAST and non-INTR_FAST handlers can
  share an IRQ but I'd expect funny problems with uart(4)).
- Make sure there are exactly 4 PCI ranges instead of just checking
  that the bridge has a 'ranges' property in the OFW device tree at all.
  Besides the fact that currently the 64bit memory range isn't used by
  this driver it we can't really work with less than 4 ranges and don't
  have memory for more than 4 bus handles for the ranges in the softc.
- Remove sc_range and sc_nrange from softc; for the bridges supported
  by this driver we no longer need to know the ranges besides the bus
  handles obtained from them once this driver is attached. That way we
  also can free the memory allocated for sc_range during attach again.
- Remove sc_dvmabase from the softc and pass it to psycho_iommu_init()
  via an additional argument as we no longer need to know the DVMA base
  in this driver once the IOMMU is initialized.
- Remove sc_dmatag from the softc, there isn't much sense in keeping
  the nexus dma tag around locally.

PR: 88279 [1]
Info from: OpenSolaris [1]
Tested by: kensmith [1]
MFC after: 1 month

18 years agoUpdate the test for failed zone transfers to reflect BIND 9.3.1 semantics
Doug Barton [Tue, 22 Nov 2005 22:24:27 +0000 (22:24 +0000)]
Update the test for failed zone transfers to reflect BIND 9.3.1 semantics
Simplify the shell scripting a bit, and remove a useless grep | sed

The problem was pointed out by the PR, and I used part of the solution
suggested there, but the semantics changed again for 9.2.x -> 9.3.x.

PR: conf/74228
Submitted by: Jeremy Chadwick <freebsd@jdc.parodius.com>

18 years agoSome clean-up, style changes and changes that will reduce differences
Marius Strobl [Tue, 22 Nov 2005 21:34:26 +0000 (21:34 +0000)]
Some clean-up, style changes and changes that will reduce differences
between this driver and other Host-PCI bridge drivers based on this one:

- Make the code fit into 80 columns.
- Make the code adhere style(9) (don't use function calls in initializers,
  use uintXX_t instead of u_intXX_t, add missing prototypes, ...).
- Remove unused and superfluous struct declaration, softc member, casts,
  includes, etc.
- Use FBSDID.
- Sprinkle const.
- Try to make comments and messages consistent in style throughout the
  driver.
- Use convenience macros for the number of interrupts and ranges of the
  bridge.
- Use __func__ instead of hardcoded function names in panic strings and
  error messages. Some of the hardcoded function names actually were
  outdated through moving code around. [1]
- Rename softc members related to the PCI side of the bridge to sc_pci_*
  in order to make it clear which side of the bridge they refer to (so
  stuff like sc_bushandle vs. sc_bh is less confusing while reading the
  code).

PR: 76052 [1]

18 years agoUnbreak installworld.
Ruslan Ermilov [Tue, 22 Nov 2005 20:47:43 +0000 (20:47 +0000)]
Unbreak installworld.

18 years agoRemove not needed redirection of kldstat -q output to /dev/null.
Maksim Yevmenkin [Tue, 22 Nov 2005 19:17:41 +0000 (19:17 +0000)]
Remove not needed redirection of kldstat -q output to /dev/null.

Noticed by: pjd
MFC after: 3 days

18 years agoRevise hcsecd(8) and sdpd(8) rc.d scripts one more time
Maksim Yevmenkin [Tue, 22 Nov 2005 18:51:43 +0000 (18:51 +0000)]
Revise hcsecd(8) and sdpd(8) rc.d scripts one more time

- Use _prestart rc.d method to automatically kldload ng_btsocket(4) if needed;

- Rename "sdpd_user" to "sdpd_username" and "sdpd_group" to "sdpd_groupname"
  to avoid collision with "magic" variables;

Inspired by: yar
MFC after: 3 days

18 years ago- Add ofw_bus_if.h to SRCS on sparc64 as envctrl.c and pcf_ebus.c depend
Marius Strobl [Tue, 22 Nov 2005 17:32:51 +0000 (17:32 +0000)]
- Add ofw_bus_if.h to SRCS on sparc64 as envctrl.c and pcf_ebus.c depend
  on it.
- Sync with sys/conf/files* and build pcf_isa.c only on i386 for now.
- Try to adhere to style.Makefile(5) (sorting, whitespace).

18 years agoConditionalize the compilation of the envctrl.c front-end of pcf(4)
Marius Strobl [Tue, 22 Nov 2005 17:25:10 +0000 (17:25 +0000)]
Conditionalize the compilation of the envctrl.c front-end of pcf(4)
additionally on ebus(4) as the 'SUNW,envctrl' devices (as well as
'SUNW,envctrltwo' and 'SUNW,rasctrl', which we might want to also
support in envctrl.c in the future) are only found on EBus.

18 years agoMove zs.c from files to files.powerpc as zs(4) by now is only supported
Marius Strobl [Tue, 22 Nov 2005 17:12:49 +0000 (17:12 +0000)]
Move zs.c from files to files.powerpc as zs(4) by now is only supported
on powerpc (more or less...). That way people updating from FreeBSD 5 to
FreeBSD 6 and beyond on sparc64 will get an error from config(8) rather
than a mysterious compile error when they have a stale 'device zs' in
their kernel config file.

MFC after: 2 weeks

18 years ago- Convert these bus drivers to make use of the newly introduced set of
Marius Strobl [Tue, 22 Nov 2005 16:39:44 +0000 (16:39 +0000)]
- Convert these bus drivers to make use of the newly introduced set of
  ofw_bus_gen_get_*() for providing the ofw_bus KOBJ interface in order
  to reduce code duplication.
- While here sync the various sparc64 bus drivers a bit (handle failure
  to attach a child gracefully instead of panicing, move the printing
  of child resources common to bus_print_child() and bus_probe_nomatch()
  implementations of a bus into a <bus>_print_res() function, ...) and
  fix some minor bugs and nits (plug memory leaks present when attaching
  a bus or child device fails, remove unused struct members, ...).

Additional testing by: kris (central(4) and fhc(4))

18 years ago- Add a new method ofw_bus_default_get_devinfo() that allows to retrieve
Marius Strobl [Tue, 22 Nov 2005 16:37:45 +0000 (16:37 +0000)]
- Add a new method ofw_bus_default_get_devinfo() that allows to retrieve
  a newly introduced struct ofw_bus_devinfo which can hold the OFW info
  of a device recallable via the ofw_bus KOBJ interface. Introduce a set
  of functions ofw_bus_gen_get_*() which use ofw_bus_default_get_devinfo()
  to provide generic subroutines for implementing the rest of the ofw_bus
  KOBJ interface in a bus driver.
  This is inspired by bus_get_resource_list() and bus_generic_rl_*_resource()
  and allows to reduce code duplication in bus drivers as they only have
  to provide an ofw_bus_default_get_devinfo() implementation in order to
  provide the ofw_bus KOBJ interface via ofw_bus_gen_get_*().
- While here add a comment to ofw_bus_if.m describing the intention of
  the ofw_bus KOBJ interface.

Reviewed by: marcel

18 years agoRemove unused function and variables.
Marius Strobl [Tue, 22 Nov 2005 14:21:03 +0000 (14:21 +0000)]
Remove unused function and variables.

18 years agoCheck IFF_DRV_RUNNING in the re_intr() loop. It can disappear,
Gleb Smirnoff [Tue, 22 Nov 2005 12:46:15 +0000 (12:46 +0000)]
Check IFF_DRV_RUNNING in the re_intr() loop. It can disappear,
since re_rxeof() drops the lock for some time.

Reported & tested by: XueFeng Deng <dsnofe yahoo.com.cn>

18 years agoGet rid of SPECIAL_INSTALLCHECKS variable that isn't settable
Ruslan Ermilov [Tue, 22 Nov 2005 12:02:41 +0000 (12:02 +0000)]
Get rid of SPECIAL_INSTALLCHECKS variable that isn't settable
by a user.  Instead, add individual checks as dependencies to
the main "installcheck" target.  Make sure that installkernel
etc. depend on it (including the UID/GID checks).

18 years agoFold some common stuff into a macro ${KMAKE}.
Ruslan Ermilov [Tue, 22 Nov 2005 11:31:03 +0000 (11:31 +0000)]
Fold some common stuff into a macro ${KMAKE}.

18 years agoFix interaction with Windows 2000/XP based servers:
Boris Popov [Tue, 22 Nov 2005 07:13:00 +0000 (07:13 +0000)]
Fix interaction with Windows 2000/XP based servers:

If the complete reply on the TRANS2_FIND_FIRST2 request fits exactly
into one responce packet, then next call to TRANS2_FIND_NEXT2 will return
zero entries and server will close current transaction.  To avoid
subsequent errors we should not perform FIND_CLOSE2 request.

PR: kern/78953
Submitted by: Jim Carroll