ƒ·I115172 149 334 489 280 221 834 158 224 599 165 233 182 175 480 283 136 120 109 116 95 160 140 227 289 219 323 309 352 209 239 174 144 505 254 206 127 405 230 178 360 142 276 168 222 399 282 131 168 240 147 142 130 159 143 142 142 261 331 352 162 159 144 180 212 812 200 240 239 310 223 198 347 283 805 568 238 442 236 469 506 1265 445 335 307 271 318 172 229 169 287 284 246 112 185 241 787 230 115 173 1024 505 185 195 1517 257 1393 737 954 203 300 185 466 196 434 231 169 843 133 164 147 1401 1021 216 1071 924 1988 536 521 238 1316 540 178 399 673 1401 272 656 302 179 318 1548 213 261 383 304 246 246 136 225 293 K 10 svn:author V 5 peter K 8 svn:date V 27 2003-05-19T22:35:00.000000Z K 7 svn:log V 239 Deal with the possibility of negative available space from the file server to avoid Bad Things(TM) happening (eg: df crashing with a floating point exception). Submitted by: Harold Gutch Approved by: re (scottl) END K 10 svn:author V 8 deischen K 8 svn:date V 27 2003-05-19T23:04:50.000000Z K 7 svn:log V 391 Eek, staticize a couple of functions that shouldn't be external (initialize()!). Remove cancellation points from _pthread_cond_wait and _pthread_cond_timedwait (single underscore versions are libc private functions). Point the weak reference(!) for these functions to the versions with cancellation points. Approved by: re@(blanket till 5/19) Pointed out by: kan (cancellation point bug) END K 10 svn:author V 6 scottl K 8 svn:date V 27 2003-05-20T01:46:09.000000Z K 7 svn:log V 184 Move the isp driver back to the alpha BOOTMFS kernel, and trim the size of inodes for the alpha driver floppy. With this patch, alpha actually built a full release! Submitted by: ru END K 10 svn:author V 5 peter K 8 svn:date V 27 2003-05-20T01:46:16.000000Z K 7 svn:log V 126 s/x86[-_]64/amd64/ for MACHINE_ARCH and MACHINE_CPU .ifdefs. Noticed by: ru Approved by: re (amd64-specific low risk stuff) END K 10 svn:author V 6 marcel K 8 svn:date V 27 2003-05-20T02:52:41.000000Z K 7 svn:log V 738 Prevent corruption of the VHPT collision chain by protecting it with a mutex. The only volatile chain operations are insertion and deletion but since updating an existing PTE also updates the VHPT entry itself, and we have the VHPT mutex in both other cases, we also lock when we update an existing PTE even though no chain operation is involved. Note that we perform the insertion and deletion careful enough that we don't need to lock traversals. If we need to lock traversals, we also need to lock from the exception handler, which we can't without creating a trapframe. We're now able to withstand a -j8 buildworld. More work is needed to withstand Murphy fields. In other words: we still have a bogon... Approved by: re@ (blanket) END K 10 svn:author V 4 bmah K 8 svn:date V 27 2003-05-20T04:03:29.000000Z K 7 svn:log V 65 Modified release note: kde-3.1.2. Approved by: re (implicitly) END K 10 svn:author V 6 marcel K 8 svn:date V 27 2003-05-20T06:51:20.000000Z K 7 svn:log V 128 Rename the "IA64 ITC" counter to "ITC" counter. We don't call the "TSC" counter on i386 "I386 TSC". Approved by: re@ (blanket) END K 10 svn:author V 6 marcel K 8 svn:date V 27 2003-05-20T06:57:20.000000Z K 7 svn:log V 503 o Fix a definite bogon: the dirty bity fault, instruction access failt and data access fault install the PTE in question into the VHPT table. However, a post-increment was missing and we wrote the raw PTE data into the pagesize/access key field. This leaves a corrupt VHPT entry. o While here, remove the explicit cache purge. Insertion into the translation implicitly purges any overlapping entries. o Make sure there's a cycle break between the itc and the rfi. o Whitespace fixes. END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-20T07:07:48.000000Z K 7 svn:log V 74 Previous revision broke release building, unbreak it. Prodded by: scottl END K 10 svn:author V 8 gshapiro K 8 svn:date V 27 2003-05-20T17:13:53.000000Z K 7 svn:log V 135 MFC: Avoid a corrupt timestamp on the console Revision Changes Path 1.116 +6 -2 src/usr.sbin/syslogd/syslogd.c END K 10 svn:author V 3 njl K 8 svn:date V 27 2003-05-20T18:04:42.000000Z K 7 svn:log V 90 Remove a redundant quirk. Instead, we wildcard all Asahi Optical chips. Approved by: re END K 10 svn:author V 3 mtm K 8 svn:date V 27 2003-05-20T18:48:41.000000Z K 7 svn:log V 83 Move a misplaced comment. Approved by: markm/mentor (implicit), re/blanket libthr END K 10 svn:author V 3 jhb K 8 svn:date V 27 2003-05-20T20:50:33.000000Z K 7 svn:log V 387 The per-CPU spinlocks list is only maintained when WITNESS is enabled. Thus, treat all page faults while in a critical section as fatal rather than just those that occur with a non-empty spinlocks list. All such page faults are fatal anyways. Calling trap_fatal() earlier increases the chances of getting more useful panic messages and a possible DDB prompt. Approved by: re (scottl) END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-20T21:01:21.000000Z K 7 svn:log V 191 Reapply mdoc(7) fixes that got accidentally lost in the last Bluetooth update, and fix a few more issues. Submitted by: Maksim Yevmenkin , ru Approved by: re (blanket) END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-20T22:06:43.000000Z K 7 svn:log V 45 Use the -tag list to document agp(4) ioctls. END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-20T22:07:03.000000Z K 7 svn:log V 29 Removed hard sentence break. END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-20T22:07:30.000000Z K 7 svn:log V 18 Compact the list. END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-20T22:07:55.000000Z K 7 svn:log V 25 Add missing markup bits. END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-20T22:08:28.000000Z K 7 svn:log V 5 Nit. END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-20T22:08:51.000000Z K 7 svn:log V 69 For multi-line blocks of literal text, please use -literal displays. END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-20T22:09:18.000000Z K 7 svn:log V 49 Use -item lists instead of -tag lists. Grammar. END K 10 svn:author V 8 brueffer K 8 svn:date V 27 2003-05-20T23:25:44.000000Z K 7 svn:log V 129 Sort references by section PR: 52501 Submitted by: Simon L.Nielsen Approved by: re (scottl) MFC after: 3 days END K 10 svn:author V 3 njl K 8 svn:date V 27 2003-05-21T00:22:07.000000Z K 7 svn:log V 196 Quirk for Hitachi DVD USB drive. It returns "invalid field in cdb" for normal INQUIRY requests so enable the NO_INQUIRY quirk. Submitted by: Lars Eggert Approved by: re (scottl) END K 10 svn:author V 3 mtm K 8 svn:date V 27 2003-05-21T03:22:36.000000Z K 7 svn:log V 126 The thread id was being set *before* zeroing out the thread. Reverse the order. Approved by: markm/mentor, re/blanket libthr END K 10 svn:author V 3 mtm K 8 svn:date V 27 2003-05-21T03:29:18.000000Z K 7 svn:log V 230 When a thread exits it does not return from the kernel unless it is the *only* remaining thread in the application, in which case we should not core dump, and instead exit gracefully. Approved by: markm/mentor, re/blanket libthr END K 10 svn:author V 3 mtm K 8 svn:date V 27 2003-05-21T03:34:54.000000Z K 7 svn:log V 216 Re-enable the garbage collector thread in anticipation of further locking work. I can't see anything obviously wrong with it (other than the need to update the locking). Approved by: markm/mentor, re/blanket libthr END K 10 svn:author V 3 mtm K 8 svn:date V 27 2003-05-21T03:41:07.000000Z K 7 svn:log V 259 Insert a debugging aid: When in either the mutex or cond queue we notice that the thread is already on one of the queues, don't just simply abort(). Print out the thread's identifiers and what queue it was on. Approved by: markm/mentor, re/blanket libthr END K 10 svn:author V 3 cjc K 8 svn:date V 27 2003-05-21T04:46:41.000000Z K 7 svn:log V 116 MFC 1.188: Add the TCP flags to the log message when log_in_vain is 1, and not just when set to 2. PR: kern/43348 END K 10 svn:author V 2 ps K 8 svn:date V 27 2003-05-21T07:00:49.000000Z K 7 svn:log V 147 - Make this work with PAE. - atomically load and clear the status block so we dont miss an update. Submitted by: jdp Approved by: re (scottl) END K 10 svn:author V 8 brueffer K 8 svn:date V 27 2003-05-21T07:16:32.000000Z K 7 svn:log V 77 Add a reference to release(7) Requested by: murray Approved by: re (murray) END K 10 svn:author V 2 ps K 8 svn:date V 27 2003-05-21T07:17:06.000000Z K 7 svn:log V 53 Make ciss usable under PAE Approved by: re (scottl) END K 10 svn:author V 3 mtm K 8 svn:date V 27 2003-05-21T08:21:24.000000Z K 7 svn:log V 412 o Make the defenition of _set_curthread() match its declaration in thr_private.h o Lock down the ldt_entries array and ldt_free, which points to the next free slot. As noted in the comments, it's necessary to special case the initial_thread because %gs is not setup for it yet. This is ok because that early in the program there won't be any reentrancy issues anyways. Approved by: re/blanket libthr END K 10 svn:author V 6 thomas K 8 svn:date V 27 2003-05-21T09:24:55.000000Z K 7 svn:log V 158 MFC rev. 1.16: In atapi_cam_reinit_bus, guard against null pointer dereference (caused a panic in some configurations). PR: i386/51421 Reviewed by: roberto END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-21T12:58:28.000000Z K 7 svn:log V 114 Fixed typo in a comment. PR: misc/52486 Submitted by: "Simon L. Nielsen" Approved by: re (jhb) END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-21T13:00:46.000000Z K 7 svn:log V 36 MFC: 1.67: Fixed typo in a comment. END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-21T13:26:37.000000Z K 7 svn:log V 313 Fixed catman(1) so that if the source files are compressed, the preformatted files are compressed with the same program as the source, and if the source files are uncompressed, the preformatted files are also uncompressed. PR: bin/52213 Submitted by: Krister Joas , ru Approved by: re (jhb) END K 10 svn:author V 8 brueffer K 8 svn:date V 27 2003-05-21T15:00:47.000000Z K 7 svn:log V 132 Clarify the describtion of the -A switch PR: 51187 Submitted by: Jeff Ito Approved by: re (jhb) MFC after: 3 days END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-21T15:49:01.000000Z K 7 svn:log V 87 Assorted mdoc(7), grammar, spelling, and punctuation fixes. Approved by: re (blanket) END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-21T15:52:43.000000Z K 7 svn:log V 268 mdoc(7) fixes. This manpage should really have only one short description (.Nd); if anyone could come up with a wording suitable for both conversion and decoding/encoding functions, that would unbreak the whatis(1) output for this manpage. Approved by: re (blanket) END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-21T15:55:40.000000Z K 7 svn:log V 51 Kill whitespace at EOL. Approved by: re (blanket) END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-21T17:32:55.000000Z K 7 svn:log V 184 Fixed the whatis(1) entry for this manpage by using only one short description (.Nd). Submitted by: sheldonh Added bswap*() functions to the NAME section. Approved by: re (blanket) END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-21T17:37:22.000000Z K 7 svn:log V 77 Link {be,le}{16,32,64}{enc,dec}.9 to byteorder.9. Approved by: re (blanket) END K 10 svn:author V 3 phk K 8 svn:date V 27 2003-05-21T18:52:29.000000Z K 7 svn:log V 129 Return ENXIO if the softc pointer is NULL, in all likelyhood the disk is in the process of disappearing. Approved by: re/rwats* END K 10 svn:author V 6 julian K 8 svn:date V 27 2003-05-21T18:53:25.000000Z K 7 svn:log V 303 When we are spilling threads out of the run queue during panic, make sure we keep the thread state variable consistent with its real state. i.e. Don't say it's on the run queue when it isn't. Also clarify the associated comment. Turns a double panic back to a single panic :-/ Approved by: re@ (jhb) END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-21T20:52:57.000000Z K 7 svn:log V 190 Revert last delta. The -l option is deprecated (hence undocumented in usage() and SYNOPSIS), as was threatened in the commitlog accompanying rev. 1.10 of main.c. Approved by: re (blanket) END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-21T21:07:28.000000Z K 7 svn:log V 40 Markup bits. Approved by: re (blanket) END K 10 svn:author V 6 obrien K 8 svn:date V 27 2003-05-21T21:19:54.000000Z K 7 svn:log V 73 Remove alpha-specific floppy build target for now. Approved by: re(jhb) END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-21T21:47:20.000000Z K 7 svn:log V 148 Unbreak world build if NO_OPENSSL is defined but NO_KERBEROS is not. Submitted by: Marius Strobl Approved by: re (jhb) END K 10 svn:author V 8 sheldonh K 8 svn:date V 27 2003-05-22T09:26:57.000000Z K 7 svn:log V 50 MFC rev 1.9: treat sbsize as a size, not a number END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-22T11:52:23.000000Z K 7 svn:log V 51 Assorted mdoc(7) fixes. Approved by: re (blanket) END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-22T11:54:53.000000Z K 7 svn:log V 39 Nitpicking. Approved by: re (blanket) END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-22T11:55:26.000000Z K 7 svn:log V 68 Moved $FreeBSD$ tag to where it belongs. Approved by: re (blanket) END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-22T11:56:41.000000Z K 7 svn:log V 52 Erase whitespace at EOL. Approved by: re (blanket) END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-22T13:02:28.000000Z K 7 svn:log V 51 Assorted mdoc(7) fixes. Approved by: re (blanket) END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-22T13:10:32.000000Z K 7 svn:log V 51 Erase whitspace at EOL. Approved by: re (blanket) END K 10 svn:author V 4 bmah K 8 svn:date V 27 2003-05-22T15:42:50.000000Z K 7 svn:log V 167 Update the abstract to be somewhat more helpful. Based on a patch that was... Submitted by: Jim Brown Approved by: re (implicitly) END K 10 svn:author V 4 bmah K 8 svn:date V 27 2003-05-22T15:51:45.000000Z K 7 svn:log V 237 Add a link to the FreeBSD/ia64 project. Maybe should do this for other platforms that have their own project pages too? Based on a patch that was: Submitted by: Jim Brown Approved by: re (implicitly) END K 10 svn:author V 6 anholt K 8 svn:date V 27 2003-05-22T16:56:46.000000Z K 7 svn:log V 256 Change -march=pentium4 to -march=pentium3 when CPUTYPE==p4, because gcc 3.2 is known to produce broken code with -march=pentium4. Add a note explaining this. This should be removed when we update to gcc 3.3 or the bug is otherwise fixed. Approved by: re END K 10 svn:author V 4 mike K 8 svn:date V 27 2003-05-22T17:07:57.000000Z K 7 svn:log V 69 Fix two misuses of __BSD_VISIBLE. Submitted by: bde Approved by: re END K 10 svn:author V 4 fjoe K 8 svn:date V 27 2003-05-22T17:11:44.000000Z K 7 svn:log V 66 MFC: make realpath thread-safe. This commit also fixes PR 12244. END K 10 svn:author V 4 fjoe K 8 svn:date V 27 2003-05-22T17:12:01.000000Z K 7 svn:log V 51 bump __FreeBSD_version for thread-safe realpath(3) END K 10 svn:author V 4 bmah K 8 svn:date V 27 2003-05-22T17:25:24.000000Z K 7 svn:log V 87 Mark a couple of instances of onboard NICs as i386-only. Approved by: re (implicitly) END K 10 svn:author V 5 ticso K 8 svn:date V 27 2003-05-22T17:45:26.000000Z K 7 svn:log V 117 Calculate routed interrupts using the slot number from the device and not that of the bridge. Approved by: re (jhb) END K 10 svn:author V 5 dougb K 8 svn:date V 27 2003-05-22T18:38:54.000000Z K 7 svn:log V 717 When newfs'ing a partition with UFS2 that had previously been newfs'ed with UFS1, the UFS1 superblocks were not deleted. This allowed any RELENG_4 (or other non-UFS2-aware) fsck to think it knew how to "fix" the file system, resulting in severe data scrambling. This patch is a more advanced version than the one originally submitted. Lukas improved it based on feedback from Kirk, and testing by me. It blanks all UFS1 superblocks (if any) during a UFS2 newfs, thereby causing fsck's that are not UFS2 aware to generate the "SEARCH FOR ALTERNATE SUPER-BLOCK FAILED" message, and exit without damaging the fs. PR: bin/51619 Submitted by: Lukas Ertl Reviewed by: kirk Approved by: re (scottl) END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-22T18:41:16.000000Z K 7 svn:log V 108 The "krb5" distribution was merged with "crypto", record the death. Reviewed by: jhb Approved by: re (jhb) END K 10 svn:author V 5 peter K 8 svn:date V 27 2003-05-22T20:09:50.000000Z K 7 svn:log V 145 Merge from i386/trap.c rev 1.252. Use td_critnest instead of the spinlocks count for explicitly enabling interrupts. Approved by: re (blanket) END K 10 svn:author V 4 bmah K 8 svn:date V 27 2003-05-22T22:40:22.000000Z K 7 svn:log V 145 Enable some devices on ia64. Based on patch that was... Submitted by: Jim Brown Approved by: re (implicitly) END K 10 svn:author V 4 bmah K 8 svn:date V 27 2003-05-22T23:14:52.000000Z K 7 svn:log V 216 Add more ia64 device information, in a section similar to that for FreeBSD/alpha. Heavily hacked version of a diff that was... Submitted by: Jim Brown Approved by: re (implicitly) END K 10 svn:author V 4 bmah K 8 svn:date V 27 2003-05-22T23:19:01.000000Z K 7 svn:log V 129 Note a puc(4) device that works on ia64. Submitted by: Jim Brown Approved by: re (implicitly) END K 10 svn:author V 4 bmah K 8 svn:date V 27 2003-05-22T23:22:59.000000Z K 7 svn:log V 104 Correctly tag some on-board Ethernet devices with the right architecture. Approved by: re (implicitly) END K 10 svn:author V 3 imp K 8 svn:date V 27 2003-05-22T23:58:50.000000Z K 7 svn:log V 254 o Document the tunables that acpi allows. (mdoc gurus please comment on and fix if neceeary). o Note that acpi is available on i386-ia32, ia64 and amd64, not just 'intel' platforms. Intel has had nothing to do with amd64. Approved by: re (scottl@) END K 10 svn:author V 4 bmah K 8 svn:date V 27 2003-05-23T00:02:10.000000Z K 7 svn:log V 189 Modified release note: Note code generation problems with the base system GCC using -march=pentium4, and the local workaround in our Makefile infrastructure. Approved by: re (implicitly) END K 10 svn:author V 4 grog K 8 svn:date V 27 2003-05-23T01:13:10.000000Z K 7 svn:log V 711 Change many strcpys to strlcpys, etc. Submitted by: Ted Unangst Correct some inaccurate and badly formatted comments. config_subdisk: If our drive is down, ensure that the subdisk is crashed. Previously it was possible for the subdisk to be up when the drive was down. Change the way the plex lock mutexes work. Previously they were part of the struct plex, which tore apart the mutex linked lists when the plex table was expanded. Now we maintain a pool of mutexes (currently 32) to be shared by all plexes. This is still a lot better than the splhigh() method used in other architectures. update_volume_config: Remove redundant diskconfig parameter. Approved by: re (jhb) END K 10 svn:author V 4 grog K 8 svn:date V 27 2003-05-23T01:13:43.000000Z K 7 svn:log V 474 Change the way the plex lock mutexes work. Previously they were part of the struct plex, which tore apart the mutex linked lists when the plex table was expanded. Now we maintain a pool of mutexes (currently 32) to be shared by all plexes. This is still a lot better than the splhigh() method used in other architectures. update_volume_config: Remove redundant diskconfig parameter. expand_table: Add parameters file and line if we're debugging. Approved by: re (jhb) END K 10 svn:author V 4 grog K 8 svn:date V 27 2003-05-23T01:14:13.000000Z K 7 svn:log V 144 detachobject: Update volume config after detaching a plex. update_volume_config: Remove redundant diskconfig parameter. Approved by: re (jhb) END K 10 svn:author V 4 grog K 8 svn:date V 27 2003-05-23T01:14:35.000000Z K 7 svn:log V 348 Change the way the plex lock mutexes work. Previously they were part of the struct plex, which tore apart the mutex linked lists when the plex table was expanded. Now we maintain a pool of mutexes (currently 32) to be shared by all plexes. This is still a lot better than the splhigh() method used in other architectures. Approved by: re (jhb) END K 10 svn:author V 4 grog K 8 svn:date V 27 2003-05-23T01:15:01.000000Z K 7 svn:log V 142 expand_table: Add parameters file and line if we're debugging. MMalloc, vinum_meminfo: Use strlcpy to copy file name. Approved by: re (jhb) END K 10 svn:author V 4 grog K 8 svn:date V 27 2003-05-23T01:15:30.000000Z K 7 svn:log V 375 Change the way the plex lock mutexes work. Previously they were part of the struct plex, which tore apart the mutex linked lists when the plex table was expanded. Now we maintain a pool of mutexes (currently 32) to be shared by all plexes. This is still a lot better than the splhigh() method used in other architectures. Add and clarify comments. Approved by: re (jhb) END K 10 svn:author V 4 grog K 8 svn:date V 27 2003-05-23T01:15:55.000000Z K 7 svn:log V 412 Change the way the plex lock mutexes work. Previously they were part of the struct plex, which tore apart the mutex linked lists when the plex table was expanded. Now we maintain a pool of mutexes (currently 32) to be shared by all plexes. This is still a lot better than the splhigh() method used in other architectures. expand_table: Add parameters file and line if we're debugging. Approved by: re (jhb) END K 10 svn:author V 5 peter K 8 svn:date V 27 2003-05-23T05:04:54.000000Z K 7 svn:log V 1169 Major pmap rework to take advantage of the larger address space on amd64 systems. Of note: - Implement a direct mapped region using 2MB pages. This eliminates the need for temporary mappings when getting ptes. This supports up to 512GB of physical memory for now. This should be enough for a while. - Implement a 4-tier page table system. Most of the infrastructure is there for 128TB of userland virtual address space, but only 512GB is presently enabled due to a mystery bug somewhere. The design of this was heavily inspired by the alpha pmap.c. - The kernel is moved into the negative address space(!). - The kernel has 2GB of KVM available. - Provide a uma memory allocator to use the direct map region to take advantage of the 2MB TLBs. - Fixed some assumptions in the bus_space macros about the ability to fit virtual addresses in an 'int'. Notable missing things: - pmap_growkernel() should be able to grow to 512GB of KVM by expanding downwards below kernbase. The kernel must be at the top 2GB of the negative address space because of gcc code generation strategies. - need to fix the >512GB user vm code. Approved by: re (blanket) END K 10 svn:author V 5 peter K 8 svn:date V 27 2003-05-23T05:07:33.000000Z K 7 svn:log V 350 Deal with the user VM space expanding. 32 bit applications do not like having their stack at the 512GB mark. Give 4GB of user VM space for 32 bit apps. Note that this is significantly more than on i386 which gives only about 2.9GB of user VM to a process (1GB for kernel, plus page table pages which eat user VM space). Approved by: re (blanket) END K 10 svn:author V 5 peter K 8 svn:date V 27 2003-05-23T05:10:49.000000Z K 7 svn:log V 240 Low risk amd64 fix. Use a vm_offset_t for the virtual location of the buffer space instead of a u_int32_t. Otherwise the upper 32 bits of the address space get truncated and syscons blows up. Approved by: re (safe, low risk amd64 fixes) END K 10 svn:author V 5 peter K 8 svn:date V 27 2003-05-23T06:08:28.000000Z K 7 svn:log V 212 Add amd64 to the MACHINE_ARCH list of systems that link bsdlabel to disklabel. I just got burnt again by having an old disklabel binary kicking around. Discussed with: phk Approved by: re (safe amd64 stuff) END K 10 svn:author V 5 peter K 8 svn:date V 27 2003-05-23T06:31:56.000000Z K 7 svn:log V 176 As suggested by the gdb folks, pad the 'struct fpreg' to a full 512 bytes to match the native fxsave/fxrstor object size since thats apparently what the Linux/NetBSD folks do. END K 10 svn:author V 5 peter K 8 svn:date V 27 2003-05-23T06:35:45.000000Z K 7 svn:log V 223 Update comments. Note that the kernel is at -1GB, not -2GB as erroniously implied by the previous commit. KVM is still only 1GB until pmap_growkernel() learns about the extra page table level. Approved by: re (blanket) END K 10 svn:author V 5 peter K 8 svn:date V 27 2003-05-23T06:36:46.000000Z K 7 svn:log V 78 Typo fix. oops. Submitted by: jmallett Approved by: re (blanket amd64/*) END K 10 svn:author V 8 brueffer K 8 svn:date V 27 2003-05-23T07:48:35.000000Z K 7 svn:log V 131 MFC 1.5, 1.6 Sort references by section, add a reference to release(7) PR: 52501 Submitted by: Simon L.Nielsen END K 10 svn:author V 3 mtm K 8 svn:date V 27 2003-05-23T08:13:24.000000Z K 7 svn:log V 77 note to self: do not confuse void* with int. Approved by: re/blanket libthr END K 10 svn:author V 3 mtm K 8 svn:date V 27 2003-05-23T09:48:20.000000Z K 7 svn:log V 194 Make WARNS2 clean. The fixes mostly included: o removed unused variables o explicit inclusion of header files o prototypes for externally defined functions Approved by: re/blanket libthr END K 10 svn:author V 3 mtm K 8 svn:date V 27 2003-05-23T10:28:13.000000Z K 7 svn:log V 191 EDOOFUS Prevent one thread from messing up another thread's saved signal mask by saving it in struct pthread instead of leaving it as a global variable. D'oh! Approved by: re/blanket libthr END K 10 svn:author V 3 hrs K 8 svn:date V 27 2003-05-23T10:30:27.000000Z K 7 svn:log V 153 Move ($create-refentry-xref-link$) to the language-neutral place and add entities &release.manpath.*; for man.cgi's manpath=XXX. Approved by: re (bmah) END K 10 svn:author V 4 bmah K 8 svn:date V 27 2003-05-23T15:05:23.000000Z K 7 svn:log V 19 MFC: tzdata2003a. END K 10 svn:author V 4 bmah K 8 svn:date V 27 2003-05-23T16:37:23.000000Z K 7 svn:log V 92 Add some hopefully helpful notes about ACPI. Approved by: re (implicitly) Reviewed by: imp END K 10 svn:author V 4 bmah K 8 svn:date V 27 2003-05-23T17:27:32.000000Z K 7 svn:log V 147 I'm lost in a maze of twisty little tunables, all different. The ACPI-disabling hint goes into device.hints, not loader.conf. Pointed out by: njl END K 10 svn:author V 3 alc K 8 svn:date V 27 2003-05-23T19:54:02.000000Z K 7 svn:log V 694 Make the maximum number of vnodes a function of both the physical memory size and the kernel's heap size, specifically, vm_kmem_size. This function allows a maximum of 40% of the vm_kmem_size to be used for vnodes and vm objects. This is a conservative bound based upon recent problem reports. (In other words, a slight increase in this percentage may be safe.) Finally, machines with less than ~3GB of RAM should be unaffected by this change, i.e., the maximum number of vnodes should remain the same. If necessary, machines with 3GB or more of RAM can increase the maximum number of vnodes by increasing vm_kmem_size. Desired by: scottl Tested by: jake Approved by: re (rwatson,scottl) END K 10 svn:author V 4 bmah K 8 svn:date V 27 2003-05-23T20:10:46.000000Z K 7 svn:log V 136 Flesh out the libkse note a bit. Source material kindly provided by deischen, any inaccuracies are mine. Approved by: re (implicitly) END K 10 svn:author V 3 njl K 8 svn:date V 27 2003-05-23T21:40:07.000000Z K 7 svn:log V 23 Fix a typo in rev 1.10 END K 10 svn:author V 6 dwhite K 8 svn:date V 27 2003-05-23T22:20:24.000000Z K 7 svn:log V 78 Add man page for kernel.conf(5). Submitted by: Bruce M Simpson END K 10 svn:author V 6 marcel K 8 svn:date V 27 2003-05-23T23:16:43.000000Z K 7 svn:log V 928 In swapctx(), put the RSE in enforced lazy mode before we flush the register stack. There's nothing really wrong with flushing before putting the RSE in enforced lazy mode, provided you don't depend on ar.bspstore being equal to ar.bsp when the RSE has been put in enforced lazy more. The small window between the flush and setting the RSE may be sufficient to have the RSE eagerly increase the dirty region (and hence cause ar.bspstore != ar.bsp) or have an interrupt that may even get the laziest RSE to do something. Anyway: we don't depend on ar.bspstore being equal to ar.bsp, so nothing was and is broken. But the code was non-intuitive and easily confuses. This is a source of future bugs. Note: the advantage of not depending on ar.bspstore is that there's some recilience against an interrupted flushrs. Clobbering is limited to stacked register contents only, not to RSE address clobbering. Approved: re@ (blanket) END K 10 svn:author V 3 mtm K 8 svn:date V 27 2003-05-23T23:39:31.000000Z K 7 svn:log V 412 Add two functions: _spinlock_pthread() and _spinunlock_pthread() that take the address of a struct pthread as their first argument. _spin[un]lock() just become wrappers arround these two functions. These new functions are for use in situations where curthread can't be used. One example is _thread_retire(), where we invalidate the array index curthread uses to get its pointer.. Approved by: re/blanket libthr END K 10 svn:author V 8 keramida K 8 svn:date V 27 2003-05-23T23:44:27.000000Z K 7 svn:log V 88 Add MLINKS to the reentrant variants of: asctime(), ctime(), gmtime(), and localtime(). END K 10 svn:author V 8 keramida K 8 svn:date V 27 2003-05-23T23:53:40.000000Z K 7 svn:log V 98 MFC -- reduce diffs to current. 1.19: "The .Fn function". 1.20: Fixed a few .Fa abuses. END K 10 svn:author V 6 marcel K 8 svn:date V 27 2003-05-23T23:55:31.000000Z K 7 svn:log V 1420 Fix a (new) source of instability: When interrupting a kernel context, we don't need to switch stacks (memory nor register). As such, we were also not restoring the register stack pointer (ar.bspstore). This, however, fails to be valid in 1 situation: when we interrupt a register stack switch as is being done in restorectx(). The problem is that restorectx() needs to have ar.bsp == ar.bspstore before it can assign the new value to ar.bspstore. This is achieved by doing a loadrs prior to assigning to ar.bspstore. If we take an interrupt in between the loadrs and the assignment and we don't make sure we restore the ar.bspstore prior to returning from the interrupt, we switch stacks with possibly non-zero dirty registers, which means that the new frame pointer (ar.bsp) will be invalid. So, instead of jumping over the restoration of the register frame pointer and related registers, we conditionalize it based on whether we return to kernel context or user context. A future performance tweak is possible by only restoring ar.bspstore when returning to kernel mode *and* when the RSE is in enforced lazy mode. One cannot assume ar.bsp == ar.bspstore if the RSE is not in enforced lazy mode anyway. While here (well, not quite) don't unconditionally assign to ar.bspstore in exception_save. Only do that when we actually switch stacks. It can only harm us to do it unconditionally. Approved by: re@ (blanket) END K 10 svn:author V 8 keramida K 8 svn:date V 27 2003-05-24T00:01:31.000000Z K 7 svn:log V 159 MFC - Reduce diffs to current. strftime.3 -> 1.30 strptime.3 -> 1.20 Use one line for each function argument to keep the line width smaller than 80 columns. END K 10 svn:author V 6 marcel K 8 svn:date V 27 2003-05-24T00:17:34.000000Z K 7 svn:log V 1296 Fix an alpha inheritance bug: On alpha, PAL is involved in context management and after wiring the CPU (in alpha_init()) a context switch was performed to tell PAL about the context. This was bogusly brought over to ia64 where it introduced bugs, because we restored the context from a mostly uninitialized PCB. The cleanup constitutes: o Remove the unused arguments from ia64_init(). o Don't return from ia64_init(), but instead call mi_startup() directly. This reduces the amount of muckery in assembly and also allows for the next bullet: o Save our currect context prior to calling mi_startup(). The reason for this is that many threads are created from thread0 by cloning the PCB. By saving our context in the PCB, we have something sane to clone. It also ensures that a cloned thread that does not alter the context in any way will return to the saved context, where we're ready for the eventuality with a nice, user unfriendly panic(). The cleanup fixes at least the following bugs: o Entering mi_startup() with the RSE in enforced lazy mode. o Re-execution of ia64_init() in certain "lab" conditions. While here, add proper unwind directives to __start() so that the unwind knows it has reached the bottom of the (call) stack. Approved by: re@ (blanket) END K 10 svn:author V 3 mtm K 8 svn:date V 27 2003-05-24T01:02:16.000000Z K 7 svn:log V 644 Lock the cond queue (condition variables): Access to the thread's flags and state is protected by _thread_critical_enter/exit(). When a thread is signaled with a condition its state must be protected by locking it and disabling signals before it is taken of the waiters' queue. Move the implementation of pthread_cond_signal() and pthread_cond_broadcast() into one function, cond_signal(). Its behaviour is determined by the last argument, int broadcast. If this is set to 1 it will remove all waiters, otherwise it will wake up only the first waiter thread. Remove an extraneous call to pthread_testcancel(). Approved by: re/blanket libthr END K 10 svn:author V 8 deischen K 8 svn:date V 27 2003-05-24T02:29:25.000000Z K 7 svn:log V 856 Change low-level locking a bit so that we can tell if a lock is being waitied on. Fix a races in join and cancellation. When trying to wait on a CV and the library is not yet threaded, make it threaded so that waiting actually works. When trying to nanosleep() and we're not threaded, just call the system call nanosleep instead of adding the thread to the wait queue. Clean up adding/removing new threads to the "all threads queue", assigning them unique ids, and tracking how many active threads there are. Do it all when the thread is added to the scheduling queue instead of making pthread_create() know how to do it. Fix a race where a thread could be marked for signal delivery but it could be exited before we actually add the signal to it. Other minor cleanups and bug fixes. Submitted by: davidxu Approved by: re@ (blanket for libpthread) END K 10 svn:author V 5 peter K 8 svn:date V 27 2003-05-24T17:35:23.000000Z K 7 svn:log V 108 Repair PIC mode. It seems I was a bit too excited about the implications of native PC relative addressing. END K 10 svn:author V 5 peter K 8 svn:date V 27 2003-05-24T17:37:51.000000Z K 7 svn:log V 205 Initial pass at supporting shared libraries on amd64. There are still a few missing relocation types in amd64/reloc.c, but I have not found any of them in use yet. :-) Approved by: re (amd64/* blanket) END K 10 svn:author V 5 peter K 8 svn:date V 27 2003-05-24T17:38:45.000000Z K 7 svn:log V 91 Do not exclude amd64 from rtld-elf builds. Approved by: re (safe amd64 support commits) END K 10 svn:author V 3 hmp K 8 svn:date V 27 2003-05-24T18:19:11.000000Z K 7 svn:log V 373 Bring vnode(9) man page to its senses: - remove '-*- nroff -*-' - bump the date - nuke outdated ``struct vnode'' (it is just better to lookup the struct in the header) - nuke ``enum vtype'' and related junk - add a one line about ``struct vnode'' - use .Va instead of .Dv for vnode struct fields Approved by: des (mentor), re (bmah) Reviewed by: arch@, mentor END K 10 svn:author V 5 peter K 8 svn:date V 27 2003-05-24T18:24:03.000000Z K 7 svn:log V 101 Stop profiled libc from exploding, matching gcc's generated code. Approved by: re (amd64/* blanket) END K 10 svn:author V 3 hmp K 8 svn:date V 27 2003-05-24T18:28:18.000000Z K 7 svn:log V 341 Get usb(4) manual page closer to reality: - update ``struct usb_device_info'' - add information about new fields in about struct - document USB_EVENT_IS_ATTACH() and USB_EVENT_IS_DETACH() - update URL of the USB.ORG developer documentation PR: docs/41580 (original patch) Reviewed by: n_hibma Approved by: des (mentor), re (bmah) END K 10 svn:author V 3 hrs K 8 svn:date V 27 2003-05-24T18:50:20.000000Z K 7 svn:log V 138 Merge some entries from maho's USB device compatibility list. Approved by: re (bmah) Obtained from: http://people.FreeBSD.org/~maho/USB/ END K 10 svn:author V 5 peter K 8 svn:date V 27 2003-05-24T19:23:05.000000Z K 7 svn:log V 75 no libc_r on amd64 yet -> no pppctl. Approved by: re (safe amd64 changes) END K 10 svn:author V 5 peter K 8 svn:date V 27 2003-05-24T19:38:18.000000Z K 7 svn:log V 748 libstdc++.so breaks on amd64 due to bogons in our build, so prevent the shared library being built for amd64. The problem is that libstdc++.so is produced with 'cc -shared'. This has an internal -lgcc, which is not PIC. libstdc++.so uses exceptions and the dwarf2 unwinder, which are in libgcc.a. As a result, non-PIC code gets pulled into libstdc++.so. This is fatal on amd64 when certain relocation types cannot be used in PIC mode. The official FSF solution to this is to have libgcc.so with internal ELF symbol versioning to solve the ABI problem, but I dont want to fight that battle yet. I tried making libgcc_pic.a (which worked fine), but thats not something for the 11th hour before a release. Approved by: re (amd64 "safe" stuff) END K 10 svn:author V 2 ru K 8 svn:date V 27 2003-05-24T19:53:08.000000Z K 7 svn:log V 42 mdoc(7) fixes. Approved by: re (blanket) END K 10 svn:author V 7 cvs2svn K 8 svn:date V 27 2003-05-24T19:53:09.000000Z K 7 svn:log V 68 This commit was manufactured by cvs2svn to create branch 'RELENG_4'. END K 10 svn:author V 3 hmp K 8 svn:date V 27 2003-05-24T20:45:28.000000Z K 7 svn:log V 55 mdoc(7) and spelling fixes. Approved by: des (mentor) END K 10 svn:author V 6 marcel K 8 svn:date V 27 2003-05-24T20:51:55.000000Z K 7 svn:log V 1304 Unconditionally restore ar.k7 (memory stack) and ar.k6 (register stack) when returning from an interrupt. Both registers are used on interrupt to switch to the right kernel stack, but other than that they are not used. This means we only have to make sure they contain proper values while in user mode. As such, we conditionally restored these registers based on whether we returned to userland or not. A nice property of conditionally restoring ar.k6 and ar.k7 is that it introduces two invariants: ar.k6 always points to the bottom of the kernel stack and ar.k7 always points to the top of the kernel stack (immediately below the PCB we have there). However, the EPC syscall path introduces an irregularity: there's no "thin red line" between user and kernel. There's a grey area that's a couple of instructions wide. Any interruption in that grey area is bound to see an inconsistent state. One such state is that we're in kernel space for all practical purposes, but we still need to have ar.k6 and ar.k7 restored as if we're in userland. Thus: restore ar.k6 and ar.k7 unconditionally at the cost of losing a valuable invariant. Both registers now hold the extend of the usable portion of the kernel stack at any interrupt nesting, which when in userland mean the bottom and the top of the kstack. END K 10 svn:author V 5 peter K 8 svn:date V 27 2003-05-24T20:58:47.000000Z K 7 svn:log V 926 Add a temporary indirect patch for gcc when targeting amd64. This is to give the cvs tree a surviving a 'make world'. One of the two diff chunks is already in gcc-3.3, the other has been committed to gcc's HEAD and is in the pipeline for gcc-3.3.1 (but has not been committed yet). The first chunk simplifies an excessively complex assembler statement when generating switch jump tables. The use of '.' causes as(1) to choke on big files. Use a simpler form instead. This is only an issue for TARGET_64BIT mode. The second chunk fixes an internal compiler error when compiling libc/stdio/vfprinf.c. While this is supposedly only an issue for 64 bit mode, it does touch the 32 bit i386 code paths, so this patch is only applied for TARGET_ARCH == amd64 to keep the risks down. Breaking gcc at the 11th hour would suck. This will be removed when it is time to import gcc-3.3. Discussed with: kan Approved by: re (jhb) END K 10 svn:author V 5 peter K 8 svn:date V 27 2003-05-24T21:12:14.000000Z K 7 svn:log V 121 Add __amd64__ ifdefs to enable the bootblock handling code, slices, etc. Approved by: re (murray) Obtained from: obrien END K 10 svn:author V 6 marcel K 8 svn:date V 27 2003-05-24T21:16:19.000000Z K 7 svn:log V 975 Consistently us the same metric to differentiate between kernel mode and user mode. We need to take into account that the EPC syscall path introduces a grey area in which one can argue either way, including a third: neither. We now use the region in which the IP address lies. Regions 5, 6 and 7 are kernel VA regions and if the IP lies any any of those regions we assume we're in kernel mode. Hence, we can be in kernel mode even if we're not on the kernel stack and/or have user privileges. There're gremlins living in the twilight zone :-) For the EPC syscall path this particularly means that the process leaves user mode the moment it calls into the gateway page. This makes the most sense because from a process' point of view the call represents a request to the kernel for some service and that service has been performed if the call returns. With the metric we picked, this also means that we're back in user mode IFF the call returns. Approved by: re@ (blanket) END K 10 svn:author V 6 marcel K 8 svn:date V 27 2003-05-24T21:44:24.000000Z K 7 svn:log V 828 Be more careful how we restore interrupts. Don't rewrite most of the PSR only to achieve setting PSR.i back to it's previous value. It makes it impossible to change any of the 30+ other unrelated bits when done between intr_disable() and intr_restore(). That's bad. Instead have intr_disable() return 1 when interrupts were previously enabled and 0 otherwise and only enable interrupts in intr_restore() when given a non-0 value. This change specifically disallows using intr_restore() to disable interrupts. The reason is simple: interrupts only need to be restored after they are being disabled, which means that intr_restore() is called with interrupts disabled and we only need to enable them if they were previously enabled. This change does not fix any bugs, other than that it bugged me... Approved by: re@ (blanket) END K 10 svn:author V 6 marcel K 8 svn:date V 27 2003-05-24T22:53:10.000000Z K 7 svn:log V 1891 Fix a source of instability specific to an EPC userland. We return to userland with interrupts disabled until we restore PSR. However, it has been observed that interrupts do actually happen before they are enabled again. This is a bit surprising and I don't know yet what's going on exactly. Nevertheless, the code was not crafted carefully enough to allow interrupts to happen and we could clobber the kernel stack of another thread when interrupts did happen. This is what happens: we restore the (memory) stack pointer (sp) and the register stack base prior to restoring ar.k6 and ar.k7. This is not a problem if interrupts don't happen between setting sp/ar.bspstore and ar.k6/ar.k7. Alas, interrupts can happen. Since sp/ar.bspstore already point to the userland stacks, we need to switch to the kernel stack in interrupt. However, ar.k6 and ar.k7 have not been set, which means that we were switching to some unrelated kstack and happily clobbered the trapframe present there if the thread to which the kstack belonged was in kernel mode or otherwise we could have our trapframe clobbered if that other thread enters the kernel. Nasty either way. We now carefully restore ar.k6 prior to restoring ar.bspstore and likewise for ar.k7 and sp. All we need is the guarantee that an interrupt does not clobber ar.k6 or ar.k7 before we're back in userland. That has been achieved by restoring ar.k6/ar.k7 unconditionally (see exception.s) While here, remove the disabling of interrupts on EPC entry. It was added as a way to "resolve" the crashes until it was understood what was going on. I think I achieved the latter, so we can remove the patch. Note that setting up a trapframe with interrupts enabled has it's own share of corner cases, but it's better to properly fixed those than to keep a mostly wrong patch around because we're afraid to remove it... Approved by: re@ (blanket) END K 10 svn:author V 3 imp K 8 svn:date V 27 2003-05-24T23:23:41.000000Z K 7 svn:log V 443 Ignore the 'must allocate below 1MB' flag for the TPL_BAR_REG. It is set on realtek cards, but they work without it (and don't work with it). The standard seems to imply that this is just a hint anyway, so this should be harmless. It doesn't appear to be set on any other cardbus cards that I have (or have seen). This should make the rl based CardBus cards work again. I've been running it for about a month now. Approved by: re@ (jhb) END K 10 svn:author V 6 marcel K 8 svn:date V 27 2003-05-25T01:01:28.000000Z K 7 svn:log V 425 Now that we define user mode as any IP address that isn't in the kernel's VA regions, we cannot limit the use of break-based syscalls to user mode only. The signal trampolines are in the gateway page, which is mapped into the process address space in region 5 and thus is kernel space. We don't special case the gateway page here. Allow break-based syscalls from anywhere in the kernel VA space. Approved by: re@ (blanket) END K 10 svn:author V 8 kuriyama K 8 svn:date V 27 2003-05-25T03:41:41.000000Z K 7 svn:log V 140 Add textproc/opensp into $MINIMALDOCPORTS when openjade is used. Reported by: scottl (by alpha building breakage) Approved by: re (scottl) END K 10 svn:author V 8 truckman K 8 svn:date V 27 2003-05-25T05:04:26.000000Z K 7 svn:log V 1217 Always set the hardware parse bit in the IPCB structure when this structure, which is new to the 82550 and 82551, is used to transmit a packet. This appears to fix the packet truncation problem that was observed when using 82550-based fxp cards to transmit ICMP or fragmented UDP packets of certain lengths which only had one to three bytes in the second and final mbuf of the packet. This matches a note in the "Intel 8255x 10/100 Mbps Ethernet Controller Family Open Source Software Developer Manual", which says that the hardware parse bit should be set when sending these types of packets. There have also been unconfirmed reports of similar problems when transmitting TCP packets, which should not be affected by the above mentioned change because the hardware parse bit was already being set if the stack requested hardware checksumming of the packet. If the problem remains, the use of the IPCB structure can be disabled to cause the driver to fall back to using the older 82559 interface with 82550-based cards by setting hint.fxp.UNIT_NUMBER.ipcbxmit_disable to a non-zero value at boot time, or using kenv to set this variable before using kldload to load the fxp driver. Approved by: re (jhb) END K 10 svn:author V 8 truckman K 8 svn:date V 27 2003-05-25T06:17:33.000000Z K 7 svn:log V 442 Beat vnode locking in the NFS server code into submission. This change is not pretty, but it fixes the code so that it no longer violates the vnode locking rules in the VFS API and doesn't trip any of the locking assertions enabled by the DEBUG_VFS_LOCKS kernel configuration option. There is one report that this patch fixed a "locking against myself" panic on an NFS server that was tripped by a diskless client. Approved by: re (scottl) END K 10 svn:author V 6 marcel K 8 svn:date V 27 2003-05-25T06:49:19.000000Z K 7 svn:log V 83 The struct mcontext has changed. It's using the register sets. Bring this in line. END K 10 svn:author V 5 peter K 8 svn:date V 27 2003-05-25T07:39:06.000000Z K 7 svn:log V 304 Add a pretty cheesy hack to avoid a gcc-3.2.2 ICE (internal compiler error) on amd64 when doing pointer subtraction. This bug is already fixed in gcc-3.3 (waiting for after the branch), and the hack will be backed out at the first opportunity. This is in the ipv6 code path. Approved by: re (scottl) END K 10 svn:author V 3 mtm K 8 svn:date V 27 2003-05-25T07:58:22.000000Z K 7 svn:log V 580 The libthr code makes use of higher-level primitives (pthread_mutex_t and pthread_cond_t) internaly in addition to the low-level spinlock_t. The garbage collector mutex and condition variable are two such examples. This might lead to critical sections nested within critical sections. Implement a reference counting mechanism so that signals are masked only on the first entry and unmasked on the last exit. I'm not sure I like the idea of nested critical sections, but if the library is going to use the pthread primitives it might be necessary. Approved by: re/blanket libthr END K 10 svn:author V 3 mtm K 8 svn:date V 27 2003-05-25T08:31:33.000000Z K 7 svn:log V 1307 Start locking up the active and dead threads lists. The active threads list is protected by a spinlock_t, but the dead list uses a pthread_mutex because it is necessary to synchronize other threads with the garbage collector thread. Lock/Unlock macros are used so it's easier to make changes to the locks in the future. The 'dead thread list' lock is intended to replace the gc mutex. This doesn't have any practical ramifications. It simply makes it clearer what the purpose of the lock is. The gc will use this lock, instead of the gc mutex, to synchronize access to the dead list with other threads. Modify _pthread_exit() to use these two new locks instead of GIANT_LOCK, and also to properly lock and protect thread state changes, especially with respect to a joining thread. The gc thread was also re-arranged to be more organized and less nested. _pthread_join() was also modified to use the thread list locks. However, locking and unlocking here needs special care because a thread could find itself in a position where it's joining an exiting thread that is waiting on the dead list lock, which this thread (joiner) holds. If the joiner doesn't take care to lock *and* unlock in the same order they (the joiner and the joinee) could deadlock against each other. Approved by: re/blanket libthr END K 10 svn:author V 3 mtm K 8 svn:date V 27 2003-05-25T08:35:37.000000Z K 7 svn:log V 179 Part of the last patch. Modify the thread creation and thread searching routine to lock the thread lists with the new locks instead of GIANT_LOCK. Approved by: re/blanket libthr END K 10 svn:author V 3 mtm K 8 svn:date V 27 2003-05-25T08:48:11.000000Z K 7 svn:log V 563 _pthread_cancel() breaks the normal lock order of first locking the joined and then the joiner thread. There isn't an easy (sane?) way to make it use the correct order without introducing races involving the target thread and finding which (active or dead) list it is on. So, after locking the canceled thread it will try to lock the joined thread and if it fails release the first lock and try again from the top. Introduce a new function, _spintrylock, which is simply a wrapper arround umtx_trylock(), to help accomplish this. Approved by: re/blanket libthr END K 10 svn:author V 4 jeff K 8 svn:date V 27 2003-05-25T08:48:42.000000Z K 7 svn:log V 208 - Reset the free ent to NULL if we have consumed the last free entry. This fixes a problem where we would overwrite old data if we ran out of free entries. Submitted by: sam Approved by: re (scottl) END K 10 svn:author V 3 phk K 8 svn:date V 27 2003-05-25T16:57:10.000000Z K 7 svn:log V 87 Don't do silly thing if the disk_create() event gets canceled. Approved by: re/scottl END K 10 svn:author V 4 jeff K 8 svn:date V 27 2003-05-25T18:18:32.000000Z K 7 svn:log V 224 - Create a new lock, umtx_lock, for use instead of the proc lock for protecting the umtx queues. We can't use the proc lock because we need to hold the lock across calls to casuptr, which can fault. Approved by: re END K 10 svn:author V 5 peter K 8 svn:date V 27 2003-05-25T19:03:08.000000Z K 7 svn:log V 1452 Copy the va_list in sbuf_vprintf() before passing it to vsnprintf(), because we could fail due to a small buffer and loop and rerun. If this happens, then the vsnprintf() will have already taken the arguments off the va_list. For i386 and others, this doesn't matter because the va_list type is a passed as a copy. But on powerpc and amd64, this is fatal because the va_list is a reference to an external structure that keeps the vararg state due to the more complicated argument passing system. On amd64, arguments can be passed as follows: First 6 int/pointer type arguments go in registers, the rest go on the memory stack. Float and double are similar, except using SSE registers. long double (80 bit precision) are similar except using the x87 stack. Where the 'next argument' comes from depends on how many have been processed so far and what type it is. For amd64, gcc keeps this state somewhere that is referenced by the va_list. I found a description that showed the va_copy was required here: http://mirrors.ccs.neu.edu/cgi-bin/unixhelp/man-cgi?va_end+9 The single unix spec doesn't mention va_copy() at all. Anyway, the problem was that the sysctl kern.geom.conf* nodes would panic due to walking off the end of the va_arg lists in vsnprintf. A better fix would be to have sbuf_vprintf() use a single pass and call kvprintf() with a callback function that stored the results and grew the buffer as needed. Approved by: re (scottl) END K 10 svn:author V 8 brueffer K 8 svn:date V 27 2003-05-25T20:06:57.000000Z K 7 svn:log V 115 MFC 1.14 Clarify the describtion of the -A switch PR: 51187 Submitted by: Jeff Ito END K 10 svn:author V 3 mtm K 8 svn:date V 27 2003-05-25T22:40:57.000000Z K 7 svn:log V 168 Return gracefully, rather than aborting, when the maximum concurrent threads per process has been reached. Return EAGAIN, as per spec. Approved by: re/blanket libthr END K 10 svn:author V 3 mtm K 8 svn:date V 27 2003-05-26T00:28:49.000000Z K 7 svn:log V 290 Revise the unlock order in _pthread_join(). Also, if the joined thread is not dead, the join loop is guaranteed to execute at least once, so there is no need to pick up the thread list lock after we return from suspenstion only to release it after the loop. Approved by: re/blanket libthr END K 10 svn:author V 3 mtm K 8 svn:date V 27 2003-05-26T00:37:07.000000Z K 7 svn:log V 211 Decouple the thread stack [de]allocating functions from the 'dead threads list' lock. It's not really necessary and we don't need the added complexity or potential for deadlocks. Approved by: re/blanket libthr END K 10 svn:author V 6 scottl K 8 svn:date V 27 2003-05-26T04:00:52.000000Z K 7 svn:log V 150 De-orbit bus_dmamem_alloc_size(). It's a hack and was never used anyways. No need for it to pollute the 5.x API any further. Approved by: re (bmah) END K 10 svn:author V 5 mdodd K 8 svn:date V 27 2003-05-26T04:58:26.000000Z K 7 svn:log V 151 Remove uninitialized local variable in favor of global. PR: bin/52685 Submitted by: Alexander Nedotsukov Approved by: re (scottl) END K 10 svn:author V 3 des K 8 svn:date V 27 2003-05-26T12:12:45.000000Z K 7 svn:log V 44 Remember to close the read end of the pipe. END K 10 svn:author V 3 hmp K 8 svn:date V 27 2003-05-26T12:35:35.000000Z K 7 svn:log V 132 MFC rev. 1.23: Duplication "from" PR: docs/51724 Submitted by: Christopher Nehren Approved by: des (mentor) END K 10 svn:author V 3 hmp K 8 svn:date V 27 2003-05-26T12:41:05.000000Z K 7 svn:log V 200 MFC rev. 1.16: Update amr(4) to note that LSILogic MegaRAID 320-[1/2] cards work with this driver. PR: docs/50139 Submitted by: Jeroen Ruigrok van der Werven (asmodai) Approved by: des (mentor) END