]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
21 years agoRetire the B_KEEPGIANT flag, we are nowhere near ready.
Poul-Henning Kamp [Wed, 6 Aug 2003 06:53:54 +0000 (06:53 +0000)]
Retire the B_KEEPGIANT flag, we are nowhere near ready.

21 years agoRip out the totally bogos vnode swapdev_vp with extreeme prejudice.
Poul-Henning Kamp [Wed, 6 Aug 2003 06:53:31 +0000 (06:53 +0000)]
Rip out the totally bogos vnode swapdev_vp with extreeme prejudice.

Don't mark buffers with B_KEEPGIANT, we don't drop giant in strategy
at this point in time.

21 years agoDon't drop giant around ->d_strategy(), too much code explodes.
Poul-Henning Kamp [Wed, 6 Aug 2003 06:49:18 +0000 (06:49 +0000)]
Don't drop giant around ->d_strategy(), too much code explodes.

21 years agoFix a typo. s/Line/Like/
Daniel Eischen [Wed, 6 Aug 2003 06:12:54 +0000 (06:12 +0000)]
Fix a typo.  s/Line/Like/

21 years agoAvoid a level of indirection to get from the thread pointer to the
Marcel Moolenaar [Wed, 6 Aug 2003 04:17:42 +0000 (04:17 +0000)]
Avoid a level of indirection to get from the thread pointer to the
TCB. We know that the thread pointer points to &tcb->tcb_tp, so all
we have to do is subtract offsetof(struct tcb, tcb_tp) from the
thread pointer to get to the TCB. Any reasonably smart compiler will
translate accesses to fields in the TCB as negative offsets from TP.

In _tcb_set() make sure the fake TCB gets a pointer to the current
KCB, just like any other TCB. This fixes a NULL-pointer dereference
in _thr_ref_add() when it tried to get the current KSE.

21 years agoAdd Jonathan Postel's year of birth.
Greg Lehey [Wed, 6 Aug 2003 03:38:12 +0000 (03:38 +0000)]
Add Jonathan Postel's year of birth.

21 years agoDon't call kse_set_curthread() when scheduling a new bound
Daniel Eischen [Wed, 6 Aug 2003 00:43:28 +0000 (00:43 +0000)]
Don't call kse_set_curthread() when scheduling a new bound
thread.  It should only be called by the current kse and
never by a KSE on behalf of another.

Submitted by: davidxu

21 years agoRename localdaemons to localpkg.
Mike Makonnen [Wed, 6 Aug 2003 00:35:13 +0000 (00:35 +0000)]
Rename localdaemons to localpkg.
The original name was really a mistake since
/usr/local/etc/rc.d scripts can (and usually do) start
more than just daemons. Even the output in the script
uses 'local packages.' Also, the term 'local daemons' is
used by rc.d/local, which was etc/rc.local of rcOG fame.
No repo-copy because there isn't much history to save.
I will remove localdaemons shortly with all the other
files that don't belong in rc.d anymore.

Discussed with: dougb, freebsd-rc@yahoogroups.com

21 years agoFix an off by one error in the number of arguments passed to
Marcel Moolenaar [Wed, 6 Aug 2003 00:23:40 +0000 (00:23 +0000)]
Fix an off by one error in the number of arguments passed to
makecontext(). We only supply 3, not 4. This is mostly harmless,
except that on ia64 the garbage can include NaT bits, resulting
in NaT consumption faults.

21 years agoDefine the static TLS as an array of long double. This will guarantee
Marcel Moolenaar [Wed, 6 Aug 2003 00:17:15 +0000 (00:17 +0000)]
Define the static TLS as an array of long double. This will guarantee
that the TLS is 16-byte aligned, as well as guarantee that the thread
pointer is 16-byte aligned as it points to struct ia64_tp. Likewise,
struct tcb and struct ksd are also guaranteed to be 16-byte aligned
(if they weren't already).

21 years agoUse auto LDT allocation for i386.
Daniel Eischen [Tue, 5 Aug 2003 23:09:22 +0000 (23:09 +0000)]
Use auto LDT allocation for i386.

21 years agoBump __FreeBSD_version for 3ware API
Paul Saab [Tue, 5 Aug 2003 22:59:01 +0000 (22:59 +0000)]
Bump __FreeBSD_version for 3ware API

21 years agoRethink the MD interfaces for libpthread to account for
Daniel Eischen [Tue, 5 Aug 2003 22:46:00 +0000 (22:46 +0000)]
Rethink the MD interfaces for libpthread to account for
archs that can (or are required to) have per-thread registers.

Tested on i386, amd64; marcel is testing on ia64 and will
have some follow-up commits.

Reviewed by: davidxu

21 years agoDon't use pessimal (u_short) types for i/o ports. This is mainly for
Bruce Evans [Tue, 5 Aug 2003 20:11:50 +0000 (20:11 +0000)]
Don't use pessimal (u_short) types for i/o ports.  This is mainly for
completenss.  The pessimization is tiny compared with i/o port slowness
except on very old machines, but code that used signed short types for
i/o ports was unpessimized long ago, and the macro that detected it
recently started working for u_short types too.  Use of bus space
should have made this moot long ago.

Not tested at runtime by:  bde

21 years agoProperly support the 3ware generic API.
Paul Saab [Tue, 5 Aug 2003 19:55:21 +0000 (19:55 +0000)]
Properly support the 3ware generic API.

- Build SGL's for ATA_PASSTHROUGH commands
- Fallback to using the sgl_offset when the opcode is unknown for building
  SGL's/
- Add ioctl calls for adding and removing units.
- Define previously undefined AEN's
- Allocate memory for the ioctl payload in multiples of 512bytes.

MFC after:      1 week

21 years agoDefine THR_GETCONTEXT and THR_SETCONTEXT in terms of the userland
Marcel Moolenaar [Tue, 5 Aug 2003 19:37:20 +0000 (19:37 +0000)]
Define THR_GETCONTEXT and THR_SETCONTEXT in terms of the userland
context functions. We don't need to enter the kernel anymore. The
contexts are compatible (ie a context created by getcontext() can
be restored by _ia64_restore_context()).

While here, make the use of THR_ALIGNBYTES and THR_ALIGN a no-op.
They are going to be removed anyway.

21 years agoAdd a comment about hcomp.
Dag-Erling Smørgrav [Tue, 5 Aug 2003 19:35:41 +0000 (19:35 +0000)]
Add a comment about hcomp.

21 years agosend() and recv() are just wrappers, not actual syscalls.
Dag-Erling Smørgrav [Tue, 5 Aug 2003 19:34:36 +0000 (19:34 +0000)]
send() and recv() are just wrappers, not actual syscalls.

21 years agoo In _ia64_save_context() clear the return registers except for r8.
Marcel Moolenaar [Tue, 5 Aug 2003 19:33:01 +0000 (19:33 +0000)]
o  In _ia64_save_context() clear the return registers except for r8.
   We write 1 for r8 in the context so that _ia64_restore_context()
   will return with a non-zero value. _ia64_save_context() always
   return 0.
o  In _ia64_restore_context(), don't restore the thread pointer. It
   is not normally part of the context. Also, restore the return
   registers. We get called for contexts created by getcontext(),
   which means we have to restore all the syscall return values.

21 years agoo Put the syscall return registers in the context. Not only do we
Marcel Moolenaar [Tue, 5 Aug 2003 18:52:02 +0000 (18:52 +0000)]
o  Put the syscall return registers in the context. Not only do we
   need this for swapcontext(), KSE upcalls initiated from ast()
   also need to save them so that we properly return the syscall
   results after having had a context switch. Note that we don't
   use r11 in the kernel. However, the runtime specification has
   defined r8-r11 as return registers, so we put r11 in the context
   as well. I think deischen@ was trying to tell me that we should
   save the return registers before. I just wasn't ready for it :-)

o  The EPC syscall code has 2 return registers and 2 frame markers
   to save. The first (rp/pfs) belongs to the syscall stub itself.
   The second (iip/cfm) belongs to the caller of the syscall stub.
   We want to put the second in the context (note that iip and cfm
   relate to interrupts. They are only being misused by the syscall
   code, but are not part of a regular context).
   This way, when the context is switched to again, we return to
   the caller of setcontext(2) as one would expect.

o  Deal with dirty registers on the kernel stack. The getcontext()
   syscall will flush the RSE, so we don't expect any dirty registers
   in that case. However, in thread_userret() we also need to save
   the context in certain cases. When that happens, we are sure that
   there are dirty registers on the kernel stack.
   This implementation simply copies the registers, one at a time,
   from the kernel stack to the user stack. NAT collections are not
   dealt with. Hence we don't preserve NaT bits. A better solution
   needs to be found at some later time.
   We also don't deal with this in all cases in set_mcontext. No
   temporay solution is implemented because it's not a showstopper.
   The problem is that we need to ignore the dirty registers and we
   automaticly do that for at most 62 registers. When there are more
   than 62 dirty registers we have a memory "leak".

This commit is fundamental for KSE support.

21 years ago* Use sysctlbyname(3) to print statistics about the MFC and
Jeffrey Hsu [Tue, 5 Aug 2003 17:07:04 +0000 (17:07 +0000)]
* Use sysctlbyname(3) to print statistics about the MFC and
  multicast VIF tables.
  This change is needed for consistency with the rest of the
  netstat/mroute.c implementation, and because in some
  cases "netstat -g" may fail to report the multicast forwarding
  information (e.g., if we run a multicast router on PicoBSD).

* Remove "DVMRP" from the head comment of file netstat/mroute.c,
  because the printed multicast-related statistics are not
  DVMRP-specific anymore.

Submitted by: Pavlin Radoslavov <pavlin@icir.org>

21 years ago* makes mfc[MFCTBLSIZ] and vif[MAXVIFS] tables accessible via
Jeffrey Hsu [Tue, 5 Aug 2003 17:01:33 +0000 (17:01 +0000)]
* makes mfc[MFCTBLSIZ] and vif[MAXVIFS] tables accessible via
  sysctl:
  - sysctlbyname("net.inet.ip.mfctable", ...)
  - sysctlbyname("net.inet.ip.viftable", ...)

  This change is needed so netstat can use sysctlbyname() to read
  the data from those tables.
  Otherwise, in some cases "netstat -g" may fail to report the
  multicast forwarding information (e.g., if we run a multicast
  router on PicoBSD).

* Bug fix: when sending IGMPMSG_WRONGVIF upcall to the multicast
  routing daemon, set properly "im->im_vif" to the receiving
  incoming interface of the packet that triggered that upcall
  rather than to the expected incoming interface of that packet.

* Bug fix: add missing increment of counter "mrtstat.mrts_upcalls"

* Few formatting nits (e.g., replace extra spaces with TABs)

Submitted by: Pavlin Radoslavov <pavlin@icir.org>

21 years agoDon't reinvent the wheel: Use setmode(3) to interpret
Yaroslav Tykhiy [Tue, 5 Aug 2003 15:04:39 +0000 (15:04 +0000)]
Don't reinvent the wheel:  Use setmode(3) to interpret
a file mode specification from the command line.  This
approach is more flexible and less error-prone than using
a mere strtoul(3).

21 years agoWhen adding a channel for INET failed at the device level (ioctl) the
Hartmut Brandt [Tue, 5 Aug 2003 14:59:06 +0000 (14:59 +0000)]
When adding a channel for INET failed at the device level (ioctl) the
code used to call rtrequest(RTM_DELETE, ...). This is a problem, because
the function that just has called us (route_output)
is not really happy with the route it just is creating beeing ripped out
from under it. Unfortunately we also cannot return an error from
ifa_rtrequest. Therefore mark the route just as RTF_REJECT.

21 years agointroduced a flag bit "ND6_IFF_ACCEPT_RTADV" in the nd_ifinfo structure to
Hajimu UMEMOTO [Tue, 5 Aug 2003 14:57:11 +0000 (14:57 +0000)]
introduced a flag bit "ND6_IFF_ACCEPT_RTADV" in the nd_ifinfo structure to
control whether to accept RAs per-interface basis.
the new stuff ensures the backward compatibility;
- the kernel does not accept RAs on any interfaces by default.
- since the default value of the flag bit is on, the kernel accepts RAs
  on all interfaces when net.inet6.ip6.accept_rtadv is 1.

Obtained from: KAME
MFC after: 1 week

21 years agoMake this file to conform more to style(9) before really touching it.
Hartmut Brandt [Tue, 5 Aug 2003 13:58:04 +0000 (13:58 +0000)]
Make this file to conform more to style(9) before really touching it.

21 years agoDefine a flag for asynchronuous VC open/close operations as used
Hartmut Brandt [Tue, 5 Aug 2003 13:48:01 +0000 (13:48 +0000)]
Define a flag for asynchronuous VC open/close operations as used
by the NATM stuff.

21 years agoImplement per-VC statistics.
Hartmut Brandt [Tue, 5 Aug 2003 13:45:54 +0000 (13:45 +0000)]
Implement per-VC statistics.

21 years agoImplement the ATMIOCOPENVCC and ATMIOCCLOSEVCC ioctls(). This was the
Hartmut Brandt [Tue, 5 Aug 2003 13:39:36 +0000 (13:39 +0000)]
Implement the ATMIOCOPENVCC and ATMIOCCLOSEVCC ioctls(). This was the
last driver that did not know about those.

21 years agoExit with a non-zero status upon a block allocation failure.
Yaroslav Tykhiy [Tue, 5 Aug 2003 13:35:17 +0000 (13:35 +0000)]
Exit with a non-zero status upon a block allocation failure.
The old way of just returning could result in a file system
extremely likely to panic the kernel.  The warning printed
wouldn't help much since tools invoking newfs(8), e.g., mdmfs(8),
couldn't detect the error.

PR: bin/55078
MFC after: 1 week

21 years agoUse the generic getvccs function from net/if_atmsubr.c and remove
Hartmut Brandt [Tue, 5 Aug 2003 12:26:26 +0000 (12:26 +0000)]
Use the generic getvccs function from net/if_atmsubr.c and remove
the home-grown version.

21 years agoArrghhh. Remove debugging printf's that slipped in in the pre-previous
Hartmut Brandt [Tue, 5 Aug 2003 12:20:19 +0000 (12:20 +0000)]
Arrghhh. Remove debugging printf's that slipped in in the pre-previous
commit.

21 years agoUse __FBSDID() as per style(9).
Hartmut Brandt [Tue, 5 Aug 2003 12:19:05 +0000 (12:19 +0000)]
Use __FBSDID() as per style(9).

21 years agokse.h is not needed for these files.
David Xu [Tue, 5 Aug 2003 12:08:49 +0000 (12:08 +0000)]
kse.h is not needed for these files.

21 years agoMake the en(4) driver more like the other ATM drivers. This is the
Hartmut Brandt [Tue, 5 Aug 2003 12:02:25 +0000 (12:02 +0000)]
Make the en(4) driver more like the other ATM drivers. This is the
preparation for supporting the OPENVCC and CLOSEVCC ioctls which
are needed for ng_atm. This required some re-organisation of the code
(mostly converting array indexes to pointers). This also gives us
an array of open vccs that will help in using the generic GETVCCS handler.

21 years agoIntroduce a thread mailbox flag TMF_NOUPCALL. On some architectures other
David Xu [Tue, 5 Aug 2003 12:00:55 +0000 (12:00 +0000)]
Introduce a thread mailbox flag TMF_NOUPCALL. On some architectures other
than i386 or AMD64, TP register points to thread mailbox, and they can not
atomically clear km_curthread in kse mailbox, in this case, thread retrieves
its thread pointer from TP register and sets flag TMF_NOUPCALL in its thread
mailbox to indicate a critical region.

21 years agoFix asm string newlines to keep gcc3.3 happy. Use register prefixes
Peter Grehan [Tue, 5 Aug 2003 11:30:18 +0000 (11:30 +0000)]
Fix asm string newlines to keep gcc3.3 happy. Use register prefixes
to make the asm a bit more readable.

21 years agoMove the clearing of the IFF_RUNNING flag into the reset routine.
Hartmut Brandt [Tue, 5 Aug 2003 10:51:33 +0000 (10:51 +0000)]
Move the clearing of the IFF_RUNNING flag into the reset routine.
Otherwise the interface will report RUNNING to ifconfig after doing
'ifconfig down' although it isn't running anymore.

21 years agoAdd recv(2), recvfrom(2), send(2) and sendfrom(2).
Dag-Erling Smørgrav [Tue, 5 Aug 2003 10:45:06 +0000 (10:45 +0000)]
Add recv(2), recvfrom(2), send(2) and sendfrom(2).

21 years agoClarify that the 'state' information consists of characters, not
Christian Brueffer [Tue, 5 Aug 2003 10:31:28 +0000 (10:31 +0000)]
Clarify that the 'state' information consists of characters, not
only letters (e.g. IWs+)

PR: 55221
Submitted by: Rich Morin <rdm@cfcl.com>
MFC after: 3 days

21 years agoAdded description for the libufs(3) library.
Ruslan Ermilov [Tue, 5 Aug 2003 10:29:50 +0000 (10:29 +0000)]
Added description for the libufs(3) library.

PR: 55238
Reviewed by: jmallett

21 years agoMake this WARNS=6 clean by:
Johan Karlsson [Tue, 5 Aug 2003 09:19:07 +0000 (09:19 +0000)]
Make this WARNS=6 clean by:
 1: add 'const' to char * where needed;
 2: mark unused variables with __unused;
 3: remove double prototypes for mode_edit and mode_list.
 4: moves the global variables 'bus', 'target', and 'lun' into
        the main function and protect them with #ifndef MINIMALISTIC,
 5: renames 3 variable in order not to shadow other things
        index -> indx -- in modepage_dump since index is a function
from <strings.h.>
        arglist -> arglst -- in the function parse_btl since arglist
                is also a global variable
        convertend -> convertend2 -- in the function editentry_set
                since that name is used two times within the function.
 6: cast 0xffffffff in the macro RESOLUTION_MAX(size) to (int)
        since it is unsigned otherwise.

Tested by: make universe
Approved by: ken

21 years agoUpdate screen(1)-related entries with more recent variants
Andrey A. Chernov [Tue, 5 Aug 2003 08:06:38 +0000 (08:06 +0000)]
Update screen(1)-related entries with more recent variants

PR:             55146
Submitted by:   Juha-Matti Tilli <juhis@nallukka.net>

21 years agoBack out [:upper:] and [:lower:] classes sorting, it is not required
Andrey A. Chernov [Tue, 5 Aug 2003 07:59:46 +0000 (07:59 +0000)]
Back out [:upper:] and [:lower:] classes sorting, it is not required
by POSIX and gains nothing with current code.

21 years agoClarify upper/lower conversion description more.
Andrey A. Chernov [Tue, 5 Aug 2003 07:53:28 +0000 (07:53 +0000)]
Clarify upper/lower conversion description more.

21 years agoChange gcc-specific aggregate initialization member specifiers
Diomidis Spinellis [Tue, 5 Aug 2003 07:23:35 +0000 (07:23 +0000)]
Change gcc-specific aggregate initialization member specifiers
into C9X initializer designators.

Reviewed by: schweikh (mentor)
MFC after: 4 weeks

21 years agoRemove extraneous semicolons. They are already provided by
Diomidis Spinellis [Tue, 5 Aug 2003 07:22:12 +0000 (07:22 +0000)]
Remove extraneous semicolons.  They are already provided by
the macro definition, and cause the generation of syntactically
incorrect code that gcc happens to accept.

Reviewed by: schweikh (mentor)
MFC after: 4 weeks

21 years agoadd support for using kqueue to watch bpf sockets.
John-Mark Gurney [Tue, 5 Aug 2003 07:12:49 +0000 (07:12 +0000)]
add support for using kqueue to watch bpf sockets.

Submitted by: Brian Buchanan of nCircle, Inc.
Tested on: i386 and sparc64

21 years agoUse sparse struct initialization for struct pagerops.
Poul-Henning Kamp [Tue, 5 Aug 2003 06:54:56 +0000 (06:54 +0000)]
Use sparse struct initialization for struct pagerops.

Mark our buffers B_KEEPGIANT before sending them downstream.

Remove swap_pager_strategy implementation.

21 years agoChange the implementation of swap backing to use the VM system in normal
Poul-Henning Kamp [Tue, 5 Aug 2003 06:54:44 +0000 (06:54 +0000)]
Change the implementation of swap backing to use the VM system in normal
ways, and drop the need for vm_pager_strategy().

21 years agoUse sparse struct initializations for struct pagerops.
Poul-Henning Kamp [Tue, 5 Aug 2003 06:51:26 +0000 (06:51 +0000)]
Use sparse struct initializations for struct pagerops.

This makes grepping for which pagers implement which methods easier.

21 years agoRemove redundant declarations.
David Schultz [Tue, 5 Aug 2003 06:50:28 +0000 (06:50 +0000)]
Remove redundant declarations.

21 years agoDon't overflow the block quota calculations for NFS mounts.
David Schultz [Tue, 5 Aug 2003 06:47:49 +0000 (06:47 +0000)]
Don't overflow the block quota calculations for NFS mounts.

PR: 47607
Submitted by: Eric van Gyzen <vangyzen@stat.duke.edu>

21 years agoOnly drop Giant around the drivers ->d_strategy() if the buffer is not
Poul-Henning Kamp [Tue, 5 Aug 2003 06:43:56 +0000 (06:43 +0000)]
Only drop Giant around the drivers ->d_strategy() if the buffer is not
marked to prevent this.

21 years agoAdd a B_KEEPGIANT flag so non-SMPng code can get preferential treatment.
Poul-Henning Kamp [Tue, 5 Aug 2003 06:43:12 +0000 (06:43 +0000)]
Add a B_KEEPGIANT flag so non-SMPng code can get preferential treatment.

21 years agoDIGIT can be only 0-9 according to POSIX
Andrey A. Chernov [Tue, 5 Aug 2003 06:34:16 +0000 (06:34 +0000)]
DIGIT can be only 0-9 according to POSIX

21 years agoExplain better what happens when [:lower:] <-> [:upper:]
Andrey A. Chernov [Tue, 5 Aug 2003 06:00:00 +0000 (06:00 +0000)]
Explain better what happens when [:lower:] <-> [:upper:]

21 years agoSupport for the Amharic locale.
Mike Makonnen [Tue, 5 Aug 2003 05:42:08 +0000 (05:42 +0000)]
Support for the Amharic locale.

21 years agoBack out LC_ALL=C since tr here supposed to run under clean env -i
Andrey A. Chernov [Tue, 5 Aug 2003 05:35:56 +0000 (05:35 +0000)]
Back out LC_ALL=C since tr here supposed to run under clean env -i
environment always.

Pointed by:     ru

21 years ago- Use /dev/fwX.Y rather than /dev/fwX.
Hidetoshi Shimokawa [Tue, 5 Aug 2003 03:26:14 +0000 (03:26 +0000)]
- Use /dev/fwX.Y rather than /dev/fwX.
- Add option -u to specify bus number.
- Try to open the device only if it's necessary.

21 years agoChange device name.
Hidetoshi Shimokawa [Tue, 5 Aug 2003 03:13:14 +0000 (03:13 +0000)]
Change device name.

21 years agoChange device name notation.
Hidetoshi Shimokawa [Tue, 5 Aug 2003 03:11:39 +0000 (03:11 +0000)]
Change device name notation.
- /dev/fw{,mem}X.Y represents the Y'th unit on the X'th bus.
- /dev/fw{,mem}X is an alias of fw{,mem}X.0 for compatibility.
- Clone devices.

21 years agoEnable IFCAP_VLAN_MTU and increase MTU for it.
Hidetoshi Shimokawa [Tue, 5 Aug 2003 02:34:35 +0000 (02:34 +0000)]
Enable IFCAP_VLAN_MTU and increase MTU for it.

Reviewed by: wpaul

21 years agoMake the second argument to sooptcopyout() constant in order to
Jeffrey Hsu [Tue, 5 Aug 2003 00:27:54 +0000 (00:27 +0000)]
Make the second argument to sooptcopyout() constant in order to
simplify the upcoming PIM patches.

Submitted by:   Pavlin Radoslavov <pavlin@icir.org>

21 years agoIn the mknod(), mkfifo(), link(), symlink() and undelete() syscalls,
Ian Dowse [Tue, 5 Aug 2003 00:26:51 +0000 (00:26 +0000)]
In the mknod(), mkfifo(), link(), symlink() and undelete() syscalls,
use vrele() instead of vput() on the parent directory vnode returned
by namei() in the case where it is equal to the target vnode. This
handles namei()'s somewhat strange (but documented) behaviour of
not locking either vnode when the two vnodes are equal and LOCKPARENT
but not LOCKLEAF is specified.

Note that since a vnode double-unlock is not currently fatal, these
coding errors were effectively harmless.

Spotted by: Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de>
Reviewed by: mckusick

21 years agoIn _bus_dmamap_load_buffer(), only count the number of bounce pages needed if
Scott Long [Mon, 4 Aug 2003 23:40:35 +0000 (23:40 +0000)]
In _bus_dmamap_load_buffer(), only count the number of bounce pages needed if
they haven't been counted before.  This test was ommitted when bus_dmamap_load()
was merged into this function, and results in the pagesneeded field growing
without bounds when multiple deferrals happen.

Thanks to Paul Saab for beating his head against this for a few hours =-)

21 years agoFix logic bug in the previous commit. Any region less than 5 is a
Marcel Moolenaar [Mon, 4 Aug 2003 22:00:48 +0000 (22:00 +0000)]
Fix logic bug in the previous commit. Any region less than 5 is a
user space region. Hence, we need to test if 5 is greater than the
region; not greater equal.
This bug caused us to call ast() while interrupting kernel mode.

21 years agoLANG->LC_ALL
Andrey A. Chernov [Mon, 4 Aug 2003 21:31:53 +0000 (21:31 +0000)]
LANG->LC_ALL

Pointed by:     ru

21 years agoDo some minor Giant pushdown made possible by copyin, fget, fdrop,
David Malone [Mon, 4 Aug 2003 21:28:57 +0000 (21:28 +0000)]
Do some minor Giant pushdown made possible by copyin, fget, fdrop,
malloc and mbuf allocation all not requiring Giant.

1) ostat, fstat and nfstat don't need Giant until they call fo_stat.
2) accept can copyin the address length without grabbing Giant.
3) sendit doesn't need Giant, so don't bother grabbing it until kern_sendit.
4) move Giant grabbing from each indivitual recv* syscall to recvit.

21 years agogif -> png
Dag-Erling Smørgrav [Mon, 4 Aug 2003 21:11:33 +0000 (21:11 +0000)]
gif -> png

21 years agoMoved the WORLDDIR variable description to the Optional Variables section.
Ruslan Ermilov [Mon, 4 Aug 2003 21:00:35 +0000 (21:00 +0000)]
Moved the WORLDDIR variable description to the Optional Variables section.

21 years agoAdjust a comment to remove staleness and take slightly less implementation
John Baldwin [Mon, 4 Aug 2003 20:35:13 +0000 (20:35 +0000)]
Adjust a comment to remove staleness and take slightly less implementation
specific perspective.

21 years ago- GC unused cpu_thread_link().
John Baldwin [Mon, 4 Aug 2003 20:34:25 +0000 (20:34 +0000)]
- GC unused cpu_thread_link().
- Move the enabling of interrupts out of assembly and into C a few
  instructions later at cpu_critical_fork_exit().  This puts more of the
  MD critical section implementation under the MD critical section API
  making it easier to test and develop alternative implementations.

21 years ago- Since td_critnest is now initialized in MI code, it doesn't have to be
John Baldwin [Mon, 4 Aug 2003 20:32:45 +0000 (20:32 +0000)]
- Since td_critnest is now initialized in MI code, it doesn't have to be
  set in cpu_critical_fork_exit() anymore.
- As far as I can tell, cpu_thread_link() has never been used, not even
  when it was originally added, so remove it.

21 years agoSet td_critnest to 1 when setting up a thread since it is a MI field with
John Baldwin [Mon, 4 Aug 2003 20:28:20 +0000 (20:28 +0000)]
Set td_critnest to 1 when setting up a thread since it is a MI field with
MI values.  This ensures that td_critnest for a newly fork'd thread is
always valid.

Requested by: bde (a long time ago)

21 years agoInsert cosmetic spaces.
John Baldwin [Mon, 4 Aug 2003 19:24:25 +0000 (19:24 +0000)]
Insert cosmetic spaces.

Reported by: kris

21 years agoAllow foot shooting as Linux emulation needs it.
Julian Elischer [Mon, 4 Aug 2003 19:11:56 +0000 (19:11 +0000)]
Allow foot shooting as Linux emulation needs it.
Also change "Auto mode" to use a "special" value
instead of 0, and define and document it.
I had thought libpthread had already been switched to use auto mode but
it appears that patch hasn't been committed yet.

Discussed with:  Davidxu

21 years agoNote which machine consoles support booting from KZPEA aka Adaptec 39160
Wilko Bulte [Mon, 4 Aug 2003 18:05:36 +0000 (18:05 +0000)]
Note which machine consoles support booting from KZPEA aka Adaptec 39160
U160 adapters.

21 years agoUse LANG=C before egrep A-Z and tr A-Z
Andrey A. Chernov [Mon, 4 Aug 2003 15:57:01 +0000 (15:57 +0000)]
Use LANG=C before egrep A-Z and tr A-Z
Note: this is POSIX requirement, c-c ranges are portable only in POSIX locale
Strip [] for tr ranges

21 years agoPrepend LANG=C to all tr 'a-z' 'A-Z' and vice versa.
Andrey A. Chernov [Mon, 4 Aug 2003 15:47:43 +0000 (15:47 +0000)]
Prepend LANG=C to all tr 'a-z' 'A-Z' and vice versa.
Note: this is POSIX requirement, c-c ranges are portable only in POSIX locale

21 years agoUse LANG=C before tr to be sure that ranges are correct
Andrey A. Chernov [Mon, 4 Aug 2003 15:34:38 +0000 (15:34 +0000)]
Use LANG=C before tr to be sure that ranges are correct
Strip [] from ranges

21 years agoUse LANG=C before tr to be shure that ranges are correct
Andrey A. Chernov [Mon, 4 Aug 2003 15:31:57 +0000 (15:31 +0000)]
Use LANG=C before tr to be shure that ranges are correct

21 years agoFix problem differently, use
Andrey A. Chernov [Mon, 4 Aug 2003 15:29:09 +0000 (15:29 +0000)]
Fix problem differently, use
LANG=C tr 'a-z' 'A-Z'
for hypotetical case that script may generate non-ascii characters

21 years agoModified release note: Clarify SA-03:08 note.
Bruce A. Mah [Mon, 4 Aug 2003 15:26:40 +0000 (15:26 +0000)]
Modified release note:  Clarify SA-03:08 note.

21 years agoFix problem differently, use \81
Andrey A. Chernov [Mon, 4 Aug 2003 15:25:39 +0000 (15:25 +0000)]
Fix problem differently, use                                                  \81
LANG=C tr 'a-z' 'A-Z'                                                         \81
for hypotetical case that script may generate non-ascii characters

21 years agoFix problem differently, use
Andrey A. Chernov [Mon, 4 Aug 2003 15:24:06 +0000 (15:24 +0000)]
Fix problem differently, use
LANG=C tr 'a-z' 'A-Z'
for hypotetical case that script may generate non-ascii characters

21 years agoMinor wordsmithing on previous commit.
Bruce A. Mah [Mon, 4 Aug 2003 15:23:20 +0000 (15:23 +0000)]
Minor wordsmithing on previous commit.

21 years agoUse tr '[:lower:]' '[:upper:]' to work with any locale
Andrey A. Chernov [Mon, 4 Aug 2003 14:32:56 +0000 (14:32 +0000)]
Use tr '[:lower:]' '[:upper:]' to work with any locale

21 years agoFix double-wrong tr usage: tr '[a-z]' '[A-Z]'
Andrey A. Chernov [Mon, 4 Aug 2003 14:10:33 +0000 (14:10 +0000)]
Fix double-wrong tr usage: tr '[a-z]' '[A-Z]'

First of all, it should be written as: tr 'a-z' 'A-Z'
ranges not encolosed in [] according to POSIX, so [] just included
in the replacement.
Second, it should be written: tr '[:lower:]' '[:upper:]'
since a-z and A-Z may have different length in some locales.

21 years agoSA-03:08 does not affect FreeBSD 5.1-RELEASE.
Hideyuki KURASHINA [Mon, 4 Aug 2003 13:53:58 +0000 (13:53 +0000)]
SA-03:08 does not affect FreeBSD 5.1-RELEASE.

21 years agoA Perl script which tries to "compress" headers by removing comments and
Dag-Erling Smørgrav [Mon, 4 Aug 2003 13:10:01 +0000 (13:10 +0000)]
A Perl script which tries to "compress" headers by removing comments and
superfluous whitespace.

21 years agoChase the doc ports.
John Hay [Mon, 4 Aug 2003 12:12:36 +0000 (12:12 +0000)]
Chase the doc ports.

21 years agoMerge the following from the English version:
Hideyuki KURASHINA [Mon, 4 Aug 2003 11:04:18 +0000 (11:04 +0000)]
Merge the following from the English version:

1.43  -> 1.44 errata/article.sgml

21 years agoAdd support for multiple CPUs to cpuinfo.
Dag-Erling Smørgrav [Mon, 4 Aug 2003 10:55:22 +0000 (10:55 +0000)]
Add support for multiple CPUs to cpuinfo.

21 years agoUse the actual build target (all), since relying on the build as a
Doug Barton [Mon, 4 Aug 2003 10:23:45 +0000 (10:23 +0000)]
Use the actual build target (all), since relying on the build as a
side effect of the distribution target was apparently just good luck
all these years.

Submitted by: ru

21 years agoPut an uncovered page between the swap devices, that way we can be sure
Poul-Henning Kamp [Mon, 4 Aug 2003 08:22:49 +0000 (08:22 +0000)]
Put an uncovered page between the swap devices, that way we can be sure
to not get any cross-device I/O requests.  (The unallocated first page
protecting BSD labels already gave us this, but that hack may go away
at some point in time).

Remove the check for cross-device I/O requests in swap_pager_strategy.

Move the repeated statistics updating into flushchainbuf().

21 years agoSet the BGE_RX_MTU register correctly so that we can receive slightly
Bill Paul [Mon, 4 Aug 2003 05:50:53 +0000 (05:50 +0000)]
Set the BGE_RX_MTU register correctly so that we can receive slightly
larger than normal frames, to account for the case where a bge(4) NIC
is used with VLANs. Since we set the IFCAP_VLAN_MTU flag, we must allow
reception of frames up to 1522 bytes in size rather than 1518.

Note that it is possible to work around this bug by doing:

# ifconfig bge0 mtu 1504

prior to configuring any VLAN interfaces.

21 years ago- Don't mess with TX queue in fwohci_stop() if we failed to attach the device.
Hidetoshi Shimokawa [Mon, 4 Aug 2003 05:43:02 +0000 (05:43 +0000)]
- Don't mess with TX queue in fwohci_stop() if we failed to attach the device.

Tested by: wilko

- Detect memory mapping failure of registers by checking OHCI version.

Tested by: KONDOU, Kazuhiro <kazuhiro@alib.jp>

21 years agoNo functional changes, just code reorganization from prev. commit, it
Andrey A. Chernov [Mon, 4 Aug 2003 05:22:06 +0000 (05:22 +0000)]
No functional changes, just code reorganization from prev. commit, it
makes one malloc unneeded, removes two bzero's and makes code more readable.

"Bright ideas comes only _after_ commits."

21 years agoCleanup the clock code. This includes:
Marcel Moolenaar [Mon, 4 Aug 2003 05:13:18 +0000 (05:13 +0000)]
Cleanup the clock code. This includes:
o  Remove alpha specific timer code (mc146818A) and compiled-out
   calibration of said timer.
o  Remove i386 inherited timer code (i8253) and related acquire and
   release functions.
o  Move sysbeep() from clock.c to machdep.c and have it return
   ENODEV. Console beeps should be implemented using ACPI or if no
   such device is described, using the sound driver.
o  Move the sysctls related to adjkerntz, disable_rtc_set and
   wall_cmos_clock from machdep.c to clock.c, where the variables
   are.
o  Don't hardcode a hz value of 1024 in cpu_initclocks() and don't
   bother faking a stathz that's 1/8 of that. Keep it simple: hz
   defaults to HZ and stathz equals hz. This is also how it's done
   for sparc64.
o  Keep a per-CPU ITC counter (pc_clock) and adjustment (pc_clockadj)
   to calculate ITC skew and corrections. On average, we adjust the
   ITC match register once every ~1500 interrupts for a duration of
   2 consequtive interruprs. This is to correct the non-deterministic
   behaviour of the ITC interrupt (there's a delay between the match
   and the raising of the interrupt).
o  Add 4 debugging sysctls to monitor clock behaviour. Those are
   debug.clock_adjust_edges, debug.clock_adjust_excess,
   debug.clock_adjust_lost and debug.clock_adjust_ticks. The first
   counts the individual adjustment cycles (when the skew first
   crosses the threshold), the second counts the number of times the
   adjustment was excessive (any non-zero value is to be considered
   a bug), the third counts lost clock interrupts and the last counts
   the number of interrupts for which we applied an adjustment
   (debug.clock_adjust_ticks / debug.clock_adjust_edges gives the
   avarage duration of an individual adjustment -- should be ~2).

While here, remove some nearby (trivial) left-overs from alpha and
other cleanups.