]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
21 years ago#ifdef INET6 the if_loop packet defrag; since only the ipv6 stack (might)
Mike Silbersack [Sat, 9 Aug 2003 02:55:11 +0000 (02:55 +0000)]
#ifdef INET6 the if_loop packet defrag; since only the ipv6 stack (might)
require this to be done, there's no reason to waste time doing it if
ipv6 isn't compiled in.

MFC after: 1 week

21 years agoFix sign-extension bug for 32 and 64-bit values. For 64-bit values
Marcel Moolenaar [Sat, 9 Aug 2003 01:55:37 +0000 (01:55 +0000)]
Fix sign-extension bug for 32 and 64-bit values. For 64-bit values
this involves the sign-extension of the high and low "word". Both
of which are 32-bit. The bug is especially harmful on ia64, where
0x9fffffffe0000000 is a common address (base of register stack).
This was invariably displayed as 0xffffffffe0000000.

The sign-extension is fixed by using {b|l}e{16|32|64}dec() where
applicable. Since elfdump(1) is not a bootstrap tool, dependency
on these functions is not a problem.

21 years agoAdd the PCI Id of the Intersil prism3 (mini-PCI) WLAN chip. The Vaio
Marcel Moolenaar [Fri, 8 Aug 2003 23:33:42 +0000 (23:33 +0000)]
Add the PCI Id of the Intersil prism3 (mini-PCI) WLAN chip. The Vaio
PCG-505BX (for example) has one of those:

wi0: <Intersil Prism3> mem 0xf8000000-0xf8000fff at device 2.0 on pci2
wi0: 802.11 address: 00:02:8a:94:d8:73
wi0: using RF:PRISM3(Mini-PCI)
wi0: Intersil Firmware: Primary (1.1.1), Station (1.5.6)
wi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps

21 years agoInitialize bp->bio_driver1 in idad_strategy().
Matthew N. Dodd [Fri, 8 Aug 2003 23:01:12 +0000 (23:01 +0000)]
Initialize bp->bio_driver1 in idad_strategy().
Removed by accident in 1.38.

This fixes the trap 12 everyone was seeing in ida_construct_qcb().

PR:  kern/53245

21 years ago - Remove GIANT_REQUIRED from pipespace().
Alan Cox [Fri, 8 Aug 2003 22:38:15 +0000 (22:38 +0000)]
 - Remove GIANT_REQUIRED from pipespace().
 - Remove a duplicate initialization from pipe_create().

21 years agoo Add code to GC freed KSEs and KSE groups
David Xu [Fri, 8 Aug 2003 22:20:59 +0000 (22:20 +0000)]
o Add code to GC freed KSEs and KSE groups
o Fix a bug in kse_free_unlocked(), kcb_dtor shouldn't be called because
  the KSE is cached and will be resued in _kse_alloc().

Reviewed by: deischen

21 years agoSince it builds and seems to work OK, add libpthread to the amd64 build.
Daniel Eischen [Fri, 8 Aug 2003 21:16:06 +0000 (21:16 +0000)]
Since it builds and seems to work OK, add libpthread to the amd64 build.

21 years agoAdded the new knob MINIROOT that, when set, causes the creation
Ruslan Ermilov [Fri, 8 Aug 2003 21:00:57 +0000 (21:00 +0000)]
Added the new knob MINIROOT that, when set, causes the creation
of the bootable UFS image, miniroot.ufs, fully identical to the
contents of the "bootonly" CD-ROM.  The image is made available
on FTP as miniroot/miniroot.ufs.gz, for resemblance with NetBSD.

This replaces the boot.flp image for sparc64, making the latter
as coming with NO_FLOPPIES.

Reviewed by: jhb
Tested by: hrs

21 years agoCopyin the thread mailbox flags from the correct location
Daniel Eischen [Fri, 8 Aug 2003 20:23:10 +0000 (20:23 +0000)]
Copyin the thread mailbox flags from the correct location
in the mailbox.

21 years agoDrop MIP6 code. We don't support MIP6 yet.
Hajimu UMEMOTO [Fri, 8 Aug 2003 20:14:28 +0000 (20:14 +0000)]
Drop MIP6 code.  We don't support MIP6 yet.

MFC after: 1 week

21 years agoMake this WARNS=6 clean by prototyping 'usage'.
Johan Karlsson [Fri, 8 Aug 2003 19:51:01 +0000 (19:51 +0000)]
Make this WARNS=6 clean by prototyping 'usage'.

Tested by: make universe

21 years agoRemove stale DCE 1.1 pointers to the IBM site. The URLs aren't valid
Marcel Moolenaar [Fri, 8 Aug 2003 19:18:43 +0000 (19:18 +0000)]
Remove stale DCE 1.1 pointers to the IBM site. The URLs aren't valid
anymore. This also fixes long line bugs caused by the lengthy URLs :-)

21 years agoFix markup for uuid_equal()
Marcel Moolenaar [Fri, 8 Aug 2003 19:12:28 +0000 (19:12 +0000)]
Fix markup for uuid_equal()

21 years agoFix two (2) bugs in one (1) statement:
Marcel Moolenaar [Fri, 8 Aug 2003 19:03:37 +0000 (19:03 +0000)]
Fix two (2) bugs in one (1) statement:
o  fix the len argument of memcmp(3) to be the size of the node field
   of the uuid structure, not the size of the uuid structure itself.
   We're comparing the node fields...
o  uuid_compare(3) is specified to return -1, 0 or 1, depending on
   the outcome of the comparison. memcmp(3) returns the difference
   between the first differing bytes. Hence, we cannot ever return
   the return value of memcmp(3) as-is.

PR: standards/55370
Submitted by: Konstantin Oznobihin <bork@rsu.ru>

21 years agoAdd support for automatically computing the required file system
Ruslan Ermilov [Fri, 8 Aug 2003 18:23:00 +0000 (18:23 +0000)]
Add support for automatically computing the required file system
size and average inode size.

Reviewed by: jhb

21 years agoadd rtsol_flags.
Hajimu UMEMOTO [Fri, 8 Aug 2003 17:43:58 +0000 (17:43 +0000)]
add rtsol_flags.

MFC after: 1 week

21 years agoNote in STANDARDS that -gno are not (yet?) POSIX conformant.
Jens Schweikhardt [Fri, 8 Aug 2003 17:04:17 +0000 (17:04 +0000)]
Note in STANDARDS that -gno are not (yet?) POSIX conformant.

Spotted by: harti
MFC after: 3 days

21 years agoKNF, correct typos and cleanup spaces.
Hajimu UMEMOTO [Fri, 8 Aug 2003 16:56:01 +0000 (16:56 +0000)]
KNF, correct typos and cleanup spaces.

Obtained from: KAME
MFC after: 1 week

21 years agodrop the code for the environment where getifaddrs(3) is not
Hajimu UMEMOTO [Fri, 8 Aug 2003 16:52:31 +0000 (16:52 +0000)]
drop the code for the environment where getifaddrs(3) is not
supported.

Obtained from: KAME
MFC after: 1 week

21 years agostop use of register.
Hajimu UMEMOTO [Fri, 8 Aug 2003 16:47:06 +0000 (16:47 +0000)]
stop use of register.

Obtained from: KAME
MFC after: 1 week

21 years agoProcess the "O bit."
Hajimu UMEMOTO [Fri, 8 Aug 2003 16:42:37 +0000 (16:42 +0000)]
Process the "O bit."
If the value of OtherConfigFlag changes from FALSE to TRUE, the
host should invoke the stateful autoconfiguration protocol,
requesting information.
[RFC 2462 Section 5.5.3]

Obtained from: KAME
MFC after: 1 week

21 years ago__FUNCTION__ --> __func__
Hajimu UMEMOTO [Fri, 8 Aug 2003 16:38:23 +0000 (16:38 +0000)]
__FUNCTION__ --> __func__

Obtained from: KAME
MFC after: 1 week

21 years agoNew release notes: rl(4) supports RealTek 8139C+ and 8169, ccd(4)
Bruce A. Mah [Fri, 8 Aug 2003 15:59:34 +0000 (15:59 +0000)]
New release notes:  rl(4) supports RealTek 8139C+ and 8169, ccd(4)
support for raw disks, acpidb(8), iasl(8).

21 years agoFix a bug that caused i386 to produce broken binaries for big-endian
Ruslan Ermilov [Fri, 8 Aug 2003 15:44:17 +0000 (15:44 +0000)]
Fix a bug that caused i386 to produce broken binaries for big-endian
64-bit platforms.  (size_t is 32bit on i386, but Elf_Shdr.sh_size is
64bit on SPARC64.)

21 years agoImplement signalcontext.
Jake Burkholder [Fri, 8 Aug 2003 15:40:28 +0000 (15:40 +0000)]
Implement signalcontext.

21 years agoccd(4) can now operate on raw disks and other GEOM providers.
David Schultz [Fri, 8 Aug 2003 15:17:15 +0000 (15:17 +0000)]
ccd(4) can now operate on raw disks and other GEOM providers.
Remove the paragraph that says it can't.

Discussed with: phk

21 years agoFix comment
Andrey A. Chernov [Fri, 8 Aug 2003 14:02:20 +0000 (14:02 +0000)]
Fix comment

21 years agoAdd ko_KR.CP949 locale
Andrey A. Chernov [Fri, 8 Aug 2003 13:48:15 +0000 (13:48 +0000)]
Add ko_KR.CP949 locale

PR:             55341
Submitted by:   Hye-Shik Chang <perky@freebsd.org>

21 years agoAdd ko_KR.CP949 locale
Andrey A. Chernov [Fri, 8 Aug 2003 13:43:49 +0000 (13:43 +0000)]
Add ko_KR.CP949 locale

PR:             55341
submitted by:   Hye-Shik Chang <perky@freebsd.org>

21 years agoMFi386: revision 1.201.
Yoshihiro Takahashi [Fri, 8 Aug 2003 12:45:42 +0000 (12:45 +0000)]
MFi386: revision 1.201.

21 years agoAdd /rescue/ and a reference to its manual page rescue(8).
Simon L. B. Nielsen [Fri, 8 Aug 2003 11:15:57 +0000 (11:15 +0000)]
Add /rescue/ and a reference to its manual page rescue(8).

Approved by: ceri (mentor)

21 years agoAllow gcc driver to process -r option iself, do not use -Wl,-r to
Alexander Kabaev [Fri, 8 Aug 2003 03:41:13 +0000 (03:41 +0000)]
Allow gcc driver to process -r option iself, do not use -Wl,-r to
bypass it. Doing otherwise did not allow compiler to detect and disable
conflicting options generated from specs.

Reported by: jake

21 years agoHook acpidb(8) and iasl(8) up to the build and unhook amldb(8). It will
Nate Lawson [Fri, 8 Aug 2003 03:20:59 +0000 (03:20 +0000)]
Hook acpidb(8) and iasl(8) up to the build and unhook amldb(8).  It will
be going away after a short while but still available in ports.

21 years agoDefault to 5 seconds before sleeping to give some machines time to stabilize.
Nate Lawson [Fri, 8 Aug 2003 03:19:22 +0000 (03:19 +0000)]
Default to 5 seconds before sleeping to give some machines time to stabilize.
This doesn't break anything on my laptop and some claim it helps them.

21 years agoMFi386 1.422 & 1.423: lock page queues in pmap_insert_entry().
Alan Cox [Fri, 8 Aug 2003 01:52:03 +0000 (01:52 +0000)]
MFi386 1.422 & 1.423: lock page queues in pmap_insert_entry().

21 years agoMFi386 1.422 & 1.423: lock page queues in pmap_insert_entry().
Marcel Moolenaar [Fri, 8 Aug 2003 00:30:26 +0000 (00:30 +0000)]
MFi386 1.422 & 1.423: lock page queues in pmap_insert_entry().

21 years ago0) preallocate per-interface context structures without the ifnet lock held
Bill Fumerola [Thu, 7 Aug 2003 21:27:17 +0000 (21:27 +0000)]
0) preallocate per-interface context structures without the ifnet lock held
1) avoid immediately calling bzero() after malloc() by passing M_ZERO
2) do not initialize individual members of the global context to zero
3) remove an unused assignment of ifctx in bootpc_init()

Reviewed by: tegge

21 years agoCorrect typo in Matt's name.
Max Khon [Thu, 7 Aug 2003 21:06:32 +0000 (21:06 +0000)]
Correct typo in Matt's name.

21 years agoFix typo in comments:
Max Khon [Thu, 7 Aug 2003 21:04:40 +0000 (21:04 +0000)]
Fix typo in comments:
/etc/syslogd.conf -> /etc/syslog.conf

MFC after: 3 days

21 years agoAdd MELCO LPC3_CTX. This is the same as Buffalo card of the same name
Warner Losh [Thu, 7 Aug 2003 19:40:05 +0000 (19:40 +0000)]
Add MELCO LPC3_CTX.  This is the same as Buffalo card of the same name
with different vendor id.

Submitted by: Shizuka Kudo-san

21 years agoSync to 1.62 of pccarddevs
Warner Losh [Thu, 7 Aug 2003 19:36:06 +0000 (19:36 +0000)]
Sync to 1.62 of pccarddevs

21 years agoMELCO has a similar product to Buffalo LPC3-CLX: named the same and
Warner Losh [Thu, 7 Aug 2003 19:33:11 +0000 (19:33 +0000)]
MELCO has a similar product to Buffalo LPC3-CLX: named the same and
has the same product id, but different vendor id.  It also appears
that the MELCO's id should be 0x18a instead of 0x8a01.  Fix this.

Submitted by: Shizuka Kudo-san

21 years agoFix logic in Makefile.i386,v 1.249: only back up ${DESTDIR}${KODIR}
Ruslan Ermilov [Thu, 7 Aug 2003 19:12:06 +0000 (19:12 +0000)]
Fix logic in Makefile.i386,v 1.249: only back up ${DESTDIR}${KODIR}
to ${DESTDIR}${KODIR}.old if we have booted from ${DESTDIR}${KODIR},
and always keep kern.bootfile in a good shape.

21 years agoMake this WARNS=6 clean by renaming the variable 'err' to 'error'
Johan Karlsson [Thu, 7 Aug 2003 19:10:35 +0000 (19:10 +0000)]
Make this WARNS=6 clean by renaming the variable 'err' to 'error'
in order not to shadow err(3).

Tested by: make universe

21 years agoMFI386: Acquire the page queues lock in pmap_insert_entry(), from
Andrew Gallatin [Thu, 7 Aug 2003 18:35:16 +0000 (18:35 +0000)]
MFI386: Acquire the page queues lock in pmap_insert_entry(), from
i386/i386/pmap.c 1.423

21 years ago- Eliminate the "rm" command that was causing us trouble in rev. 1.799.
Ruslan Ermilov [Thu, 7 Aug 2003 18:22:34 +0000 (18:22 +0000)]
- Eliminate the "rm" command that was causing us trouble in rev. 1.799.

- Normalize doRELEASE to avoid seeing "`ftp.1' is up to date." warning
  when doing "make rerelease", and ftp.1 was already built.

Reviewed by: jhb

21 years ago1. Add support for printing PIM-related statistics with
Jeffrey Hsu [Thu, 7 Aug 2003 18:21:21 +0000 (18:21 +0000)]
1. Add support for printing PIM-related statistics with
netstat -s -p pim

2. Print information about the bandwidth meters installed in the kernel with
netstat -g

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

21 years agoAdd support for "options PIM" in the kernel configuration file.
Jeffrey Hsu [Thu, 7 Aug 2003 18:19:28 +0000 (18:19 +0000)]
Add support for "options PIM" in the kernel configuration file.

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

21 years agoThis commit was generated by cvs2svn to compensate for changes in r118624,
Nate Lawson [Thu, 7 Aug 2003 18:19:12 +0000 (18:19 +0000)]
This commit was generated by cvs2svn to compensate for changes in r118624,
which included commits to RCS files with non-trunk default branches.

21 years agoFix a bug that would result in a very long sleep. Change has been
Nate Lawson [Thu, 7 Aug 2003 18:19:12 +0000 (18:19 +0000)]
Fix a bug that would result in a very long sleep.  Change has been
submitted to the vendor.

Obtained from: iwasaki

21 years agoNew PIM header files.
Jeffrey Hsu [Thu, 7 Aug 2003 18:17:43 +0000 (18:17 +0000)]
New PIM header files.

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

21 years ago1. Basic PIM kernel support
Jeffrey Hsu [Thu, 7 Aug 2003 18:16:59 +0000 (18:16 +0000)]
1. Basic PIM kernel support
Disabled by default. To enable it, the new "options PIM" must be
added to the kernel configuration file (in addition to MROUTING):

options MROUTING # Multicast routing
options PIM # Protocol Independent Multicast

2. Add support for advanced multicast API setup/configuration and
extensibility.

3. Add support for kernel-level PIM Register encapsulation.
Disabled by default.  Can be enabled by the advanced multicast API.

4. Implement a mechanism for "multicast bandwidth monitoring and upcalls".

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

21 years agoAdd man pages for acpidb and iasl
Nate Lawson [Thu, 7 Aug 2003 18:09:17 +0000 (18:09 +0000)]
Add man pages for acpidb and iasl

21 years agotd_dupfd just needs to be less than 0, it does not have to hold the
John Baldwin [Thu, 7 Aug 2003 17:08:26 +0000 (17:08 +0000)]
td_dupfd just needs to be less than 0, it does not have to hold the
negative value of the index of the new file, so just use -1.

21 years agoImport the userland interface from acpica 0619
Nate Lawson [Thu, 7 Aug 2003 16:59:44 +0000 (16:59 +0000)]
Import the userland interface from acpica 0619

21 years agoThis commit was generated by cvs2svn to compensate for changes in r118617,
Nate Lawson [Thu, 7 Aug 2003 16:59:44 +0000 (16:59 +0000)]
This commit was generated by cvs2svn to compensate for changes in r118617,
which included commits to RCS files with non-trunk default branches.

21 years agoAdd the acpidb and iasl utilities. This is not yet hooked up to the build.
Nate Lawson [Thu, 7 Aug 2003 16:51:50 +0000 (16:51 +0000)]
Add the acpidb and iasl utilities.  This is not yet hooked up to the build.

Obtained from: acpicatools port by Iwasaki-san

21 years agoUpdate some argument-documenting comments to match reality.
Jacques Vidrine [Thu, 7 Aug 2003 16:42:27 +0000 (16:42 +0000)]
Update some argument-documenting comments to match reality.

Add an explicit range check to those same arguments to reduce risk of
cardiac arrest in future code readers.

21 years agoImport common/ files from acpica 0619
Nate Lawson [Thu, 7 Aug 2003 16:38:54 +0000 (16:38 +0000)]
Import common/ files from acpica 0619

21 years agoThis commit was generated by cvs2svn to compensate for changes in r118613,
Nate Lawson [Thu, 7 Aug 2003 16:38:54 +0000 (16:38 +0000)]
This commit was generated by cvs2svn to compensate for changes in r118613,
which included commits to RCS files with non-trunk default branches.

21 years agoImport compiler/ files from acpica 0619
Nate Lawson [Thu, 7 Aug 2003 16:38:31 +0000 (16:38 +0000)]
Import compiler/ files from acpica 0619

21 years agoThis commit was generated by cvs2svn to compensate for changes in r118611,
Nate Lawson [Thu, 7 Aug 2003 16:38:31 +0000 (16:38 +0000)]
This commit was generated by cvs2svn to compensate for changes in r118611,
which included commits to RCS files with non-trunk default branches.

21 years agoRemove the user include of ctype.h and instead include it for each utility
Nate Lawson [Thu, 7 Aug 2003 15:52:42 +0000 (15:52 +0000)]
Remove the user include of ctype.h and instead include it for each utility
that uses strupr().

21 years agoRemove nowerror from some files that no longer generate warnings.
Nate Lawson [Thu, 7 Aug 2003 15:51:35 +0000 (15:51 +0000)]
Remove nowerror from some files that no longer generate warnings.

21 years agoConsistently use the BSD u_int and u_short instead of the SYSV uint and
John Baldwin [Thu, 7 Aug 2003 15:04:27 +0000 (15:04 +0000)]
Consistently use the BSD u_int and u_short instead of the SYSV uint and
ushort.  In most of these files, there was a mixture of both styles and
this change just makes them self-consistent.

Requested by: bde (kern_ktrace.c)

21 years agoAdd all interface polling patches.
Martin Blapp [Thu, 7 Aug 2003 15:00:55 +0000 (15:00 +0000)]
Add all interface polling patches.

21 years agoDo not poll during discover. Add a polling tunable to the interface
Martin Blapp [Thu, 7 Aug 2003 14:58:46 +0000 (14:58 +0000)]
Do not poll during discover. Add a polling tunable to the interface
struct to be able to turn polling on/off.

Tested by: Larry Rosenman <ler@lerctr.org>

21 years agoNull terminate the OEM hint. This rids my laptop of the smiley face that
Nate Lawson [Thu, 7 Aug 2003 14:53:14 +0000 (14:53 +0000)]
Null terminate the OEM hint.  This rids my laptop of the smiley face that
would follow the 6 valid chars of the table entry.

21 years agoAdd additional documentation to setfacl(1) regarding the behavior of
Robert Watson [Thu, 7 Aug 2003 14:52:17 +0000 (14:52 +0000)]
Add additional documentation to setfacl(1) regarding the behavior of
tools such as chmod(1) and ls(1) when it comes to acting on objects
that have POSIX.1e extended ACLs.  Specifically, discuss the
substitution of the mask entry for the group entry in the mode
representation of the ACL.  Differently worded from the submission,
and could probably use further refinement.

PR: 55319
Submitted by: Grzegorz Czaplinski <G.Czaplinski@prioris.mini.pw.edu.pl>

21 years ago-v no longer a valid argument to setfacl(1) -- remove from usage().
Robert Watson [Thu, 7 Aug 2003 14:43:43 +0000 (14:43 +0000)]
-v no longer a valid argument to setfacl(1) -- remove from usage().

PR: 55318
Submitted by: Grzegorz Czaplinski <G.Czaplinski@prioris.mini.pw.edu.pl>

21 years agoMake open channels persist across ifconfig down and up. All channels
Hartmut Brandt [Thu, 7 Aug 2003 14:30:58 +0000 (14:30 +0000)]
Make open channels persist across ifconfig down and up. All channels
that are not currently closing when the interface is configured down
will be brough up as soon as the interface is configured up.

21 years agoComment out ctype.h. It's not ok to always include in the !_KERNEL case
Nate Lawson [Thu, 7 Aug 2003 14:17:23 +0000 (14:17 +0000)]
Comment out ctype.h.  It's not ok to always include in the !_KERNEL case
since the bootblocks have their own local includes.  Sorry for breaking
world.

21 years agoThe ktrace mutex does not need to be locked around the post of the ktrace
John Baldwin [Thu, 7 Aug 2003 13:58:13 +0000 (13:58 +0000)]
The ktrace mutex does not need to be locked around the post of the ktrace
semaphore and doing so can lead to a possible reversal.  WITNESS would have
caught this if semaphores were used more often in the kernel.

Submitted by: Ted Unangst <tedu@stanford.edu>, Dawson Engler

21 years agoMake the driver preserve open connections accross ifconfig down
Hartmut Brandt [Thu, 7 Aug 2003 13:42:31 +0000 (13:42 +0000)]
Make the driver preserve open connections accross ifconfig down
and up commands. When configuring the interface down only the
connections that are currently closing are deleted from the connection
table. When the interface is configured up, all connections that
are in the table are re-opened.

21 years agoWhen configuring the interface down and up again try to re-open all
Hartmut Brandt [Thu, 7 Aug 2003 10:40:24 +0000 (10:40 +0000)]
When configuring the interface down and up again try to re-open all
connections that have been open (and were not closing) when
the interface was stopped. This makes the behaviour of fatm(4) more like
the behaviour of en(4).

21 years agoImplement mblen(s, n) as mbtowc(NULL, s, n) to avoid calling sgetrune()
Tim J. Robbins [Thu, 7 Aug 2003 09:34:51 +0000 (09:34 +0000)]
Implement mblen(s, n) as mbtowc(NULL, s, n) to avoid calling sgetrune()
and to simplify things. This is only valid until we start supporting
state-dependent encodings.

21 years agoWe donot need `\n' for panic().
Noriaki Mitsunaga [Thu, 7 Aug 2003 08:13:37 +0000 (08:13 +0000)]
We donot need `\n' for panic().

21 years agoImplement mbstowcs() as a wrapper around mbsrtowcs(), and wcstombs()
Tim J. Robbins [Thu, 7 Aug 2003 08:04:01 +0000 (08:04 +0000)]
Implement mbstowcs() as a wrapper around mbsrtowcs(), and wcstombs()
as a wrapper around wcsrtombs().

21 years agoGrok async contexts. When a thread is interrupted and an upcall
Marcel Moolenaar [Thu, 7 Aug 2003 08:03:05 +0000 (08:03 +0000)]
Grok async contexts. When a thread is interrupted and an upcall
happens, the context of the interrupted thread is exported to
userland. Unlike most contexts, it will be an async context and
we cannot easily use our existing functions to set such a
context.
To avoid a lot of complexity that may possibly interfere with
the common case, we simply let the kernel deal with it. However,
we don't use the EPC based syscall path to invoke setcontext(2).
No, we use the break-based syscall path. That way the trapframe
will be compatible with the context we're trying to restore and
we save the kernel a lot of trouble. The kind of trouble we did
not want to go though ourselves...

However, we also need to set the threads mailbox and there's no
syscall to help us out. To avoid creating a new syscall, we use
the context itself to pass the information to the kernel so that
the kernel can update the mailbox. This involves setting a flag
(_MC_FLAGS_KSE_SET_MBOX) and setting ifa (the address) and isr
(the value).

21 years agoImplement mbtowc() in terms of mbrtowc(), and wctomb() in terms of wcrtomb().
Tim J. Robbins [Thu, 7 Aug 2003 07:59:36 +0000 (07:59 +0000)]
Implement mbtowc() in terms of mbrtowc(), and wctomb() in terms of wcrtomb().

21 years agoBetter define the flags in the mcontext_t and properly set the flags
Marcel Moolenaar [Thu, 7 Aug 2003 07:52:39 +0000 (07:52 +0000)]
Better define the flags in the mcontext_t and properly set the flags
when we create contexts. The meaning of the flags are documented in
<machine/ucontext.h>. I only list them here to help browsing the
commit logs:
_MC_FLAGS_ASYNC_CONTEXT
_MC_FLAGS_HIGHFP_VALID
_MC_FLAGS_KSE_SET_MBOX
_MC_FLAGS_RETURN_VALID
_MC_FLAGS_SCRATCH_VALID

Yes, _MC_FLAGS_KSE_SET_MBOX is a hack and I'm proud of it :-)

21 years agoImplement btowc() in terms of mbrtowc() instead of sgetrune(), and
Tim J. Robbins [Thu, 7 Aug 2003 07:45:35 +0000 (07:45 +0000)]
Implement btowc() in terms of mbrtowc() instead of sgetrune(), and
wctob() in terms of wcrtomb() instead of sputrune(). There should be
no functional differences, but there may be a small performance hit
because we make an extra function call.

The aim here is to have as few functions as possible calling
s{get,put}rune() to make it easier to remove them in the future.

21 years agoo Fix cut-n-paste whitespace corruption in previous commit
Marcel Moolenaar [Thu, 7 Aug 2003 07:40:19 +0000 (07:40 +0000)]
o  Fix cut-n-paste whitespace corruption in previous commit
o  For trap-based upcalls the argument (the kse_mailbox) to
   the UTS must be written onto the kernel stack, not the
   user stack. While here, deal with the fact that we may
   be at a NaT collection point.

21 years ago- Fix the polling code to work with media settings in dhclient.conf.
Martin Blapp [Thu, 7 Aug 2003 07:27:14 +0000 (07:27 +0000)]
- Fix the polling code to work with media settings in dhclient.conf.

- Rename linkstatus to linkstate which is more correct.

- Sort any leases each time we loose and regain link. With the first
  version we spammed the dhclient.leases file.

- When there was no link on a interface, polling has been done twice.
  This has been fixed with a bigger sleep interval.

- interface_active() now returns only a assumed state of the link.
  If we are using media settings, we cannot be sure that the link
  actually works. That means we assume that the link is working and
  continue to send requests as usual on the interface and loop over
  all possible media options. Polling is still done. If your interface
  gets suddenly link, dhclient will send a dhcp discover request.

After all media settings have been tried a few times, dhclient will
sleep. If one does change networks very often, it can help to set the
"retry timeout" to a low value like 100 seconds. The default is over
six minutes.

Tested by: Larry Rosenman <ler@lerctr.org>, imp

21 years agoAdd preliminary support for the RealTek 8169 gigE chip. Changes:
Bill Paul [Thu, 7 Aug 2003 07:00:30 +0000 (07:00 +0000)]
Add preliminary support for the RealTek 8169 gigE chip. Changes:

- Fix a bug in rl_dma_map_desc(): set the 'end of ring' bit in the
  right descriptor (DESC_CNT - 1, not DESC_CNT). The 8139C+ is limited
  to 64 descriptors and automatically wraps at 64 descriptors even
  if the EOR bit isn't set, but the 8169 NIC can have up to 1024
  descriptors per ring, so we must set the wrap point in the right
  place.

- RealTek moved the RL_TIMERINT register from offset 0x54 to 0x58 in
  the 8169 -- account for this.

- Added rl_gmii_readreg() and rl_gmii_writereg() routines.

- Fix rl_probe() to deal with the case where the base type is
  not RL_8139.

The next step is to add jumbo buffer support.

Tested with the Xterasys XN-152 NIC (hard to beat $29 for a gigE NIC).

21 years agoNo need to define externs for getopt interface.
Warner Losh [Thu, 7 Aug 2003 05:47:49 +0000 (05:47 +0000)]
No need to define externs for getopt interface.

21 years agoPrefer PATH_MAX to MAXPATHLEN. Both contain the trailing NUL, so
Warner Losh [Thu, 7 Aug 2003 05:38:56 +0000 (05:38 +0000)]
Prefer PATH_MAX to MAXPATHLEN.  Both contain the trailing NUL, so
remove the unneeded +1.

21 years agoNo need to define optind as an extern. stdlib.h does that for us.
Warner Losh [Thu, 7 Aug 2003 04:53:48 +0000 (04:53 +0000)]
No need to define optind as an extern.  stdlib.h does that for us.

21 years agoPrefer PATH_MAX to MAXPATHLEN. PATH_MAX has the trailing NUL.
Warner Losh [Thu, 7 Aug 2003 04:51:41 +0000 (04:51 +0000)]
Prefer PATH_MAX to MAXPATHLEN.  PATH_MAX has the trailing NUL.

21 years agoMAXPATHLEN includes the trailing NUL, so no need to add 1 here.
Warner Losh [Thu, 7 Aug 2003 04:50:29 +0000 (04:50 +0000)]
MAXPATHLEN includes the trailing NUL, so no need to add 1 here.

21 years agoDocument hw.acpi.os_name. Also update the credits section.
Nate Lawson [Thu, 7 Aug 2003 04:46:53 +0000 (04:46 +0000)]
Document hw.acpi.os_name.  Also update the credits section.

21 years agoAdd includes to fix user-compilation of acpica. Also clarify a comment
Nate Lawson [Thu, 7 Aug 2003 04:46:17 +0000 (04:46 +0000)]
Add includes to fix user-compilation of acpica.  Also clarify a comment
about overriding the OS name.

21 years agogetopt returns -1 not EOF at the end of args. Compare against that.
Warner Losh [Thu, 7 Aug 2003 04:40:54 +0000 (04:40 +0000)]
getopt returns -1 not EOF at the end of args.  Compare against that.

21 years agoAdd entries for NETGEAR MA401RA, IO DATA PCET10CL and Panasonic KXL-CB10AN.
Warner Losh [Thu, 7 Aug 2003 04:38:01 +0000 (04:38 +0000)]
Add entries for NETGEAR MA401RA, IO DATA PCET10CL and Panasonic KXL-CB10AN.

Appologies to: those that submitted these to me.

21 years agoRemove trailing newlines (from the right branch this time)
Warner Losh [Thu, 7 Aug 2003 04:33:47 +0000 (04:33 +0000)]
Remove trailing newlines (from the right branch this time)

21 years ago - Remove GIANT_REQUIRED from pipe_free_kmem().
Alan Cox [Thu, 7 Aug 2003 04:32:40 +0000 (04:32 +0000)]
 - Remove GIANT_REQUIRED from pipe_free_kmem().
 - Remove the acquisition and release of Giant around pipe_kmem_free() and
   uma_zfree() in pipeclose().

21 years agoIncrease SMALL_PIPE_SIZE from 4096 to PAGE_SIZE.
Mike Silbersack [Thu, 7 Aug 2003 00:03:29 +0000 (00:03 +0000)]
Increase SMALL_PIPE_SIZE from 4096 to PAGE_SIZE.

Sorry people with 8K pages, this could be have been causing some of the
resent panics under heavy pipe load.

21 years agoIn cpu_set_upcall_kse(), create the upcall according to the entry
Marcel Moolenaar [Wed, 6 Aug 2003 23:28:19 +0000 (23:28 +0000)]
In cpu_set_upcall_kse(), create the upcall according to the entry
path into the kernel. Normally it's due to a syscall, but one can
also be created as the result of a clock interrupt (for example).
This now even more looks like exec_setregs().

While here, add an assert that we don't expect more than 8KB of
dirty registers on the kernel stack.

21 years agoAdd a reference to config(5) in the SEE ALSO section.
Simon L. B. Nielsen [Wed, 6 Aug 2003 21:41:35 +0000 (21:41 +0000)]
Add a reference to config(5) in the SEE ALSO section.

Suggested by: dcs
Approved by: ceri (mentor)

21 years agoo In revision 1.45 of exception.S we changed exception_restore to
Marcel Moolenaar [Wed, 6 Aug 2003 21:32:38 +0000 (21:32 +0000)]
o  In revision 1.45 of exception.S we changed exception_restore to
   unconditionally restore ar.k7 (kernel memory stack) and ar.k6
   (kernel register stack). I don't know what I was smoking then,
   but if you unconditionally restore ar.k6, you also want to
   compute its value unconditionally. By having the computation
   predicated and dependent on whether we return to user mode, we
   would end up writing junk (= invalid value for ar.bspstore) if
   we would return to kernel mode. But the whole point of the
   unconditional restoration was that there is a grey area where
   we still need to have ar.k6 restored. If we restore with a junk
   value, we would end up wedging the machine on the next interrupt.
   So, unconditionally calculate the value we unconditionally write
   to ar.k6.

o  The previous braino was found while making the following change:
   We used to clear the lower 9 bits of the value we write to ar.k6.
   The meaning being that we know that the kernel register stack is
   at least 512 byte aligned and simply clearing the lower 9 bits
   allows us to return to a context of which we don't have dirty
   registers on the kernel stack, even though the context that
   entered the kernel does have dirty registers on the kernel stack.
   By masking-off the lower bits, we correctly obtain the base of
   the register stack without having to worry that we didn't actually
   reached the base while unwinding it.
   The change is to mask off the lower 13 bits, knowing that the
   kernel register stack is always 8KB aligned. The advantage is that
   we don't have to worry anymore if there's more than 512 bytes of
   dirty registers on the kernel stack. A situation that frequently
   occurs. In exec_setregs() in machdep.c:1.147 or older, we had to
   deal with that situation by copying the active portion of the
   register stack down in multiples of 512 bytes. Now that we mask off
   the lower 13 bits we don't have to do that at all. Contemporary
   IPF processors have a register file that can hold up to 96 stacked
   registers (=784 bytes [incl. 2 NaT collections]). With no indication
   that register files grow beyond a couple of hundred registers, we
   should not have to worry about it anymore... and yes, 640KB is
   enough for everybody :-)
   This change helps setcontext(2) and cpu_set_upcall_kse() in that
   they can return to completely different contexts without having to
   mess with the kernel stack. Of course exec_setregs() doesn't need
   to do that anymore as well.