Marcel Moolenaar [Sat, 12 Oct 2002 22:42:48 +0000 (22:42 +0000)]
Plug two holes where we returned to userland without restoring
the predicate registers. Even though the ITLB and DTLB interrupts
happen often enough, this bug didn't do much harm. The reason
is that the interrupt handlers only modify p1 and since this is
a preserved (callee-saved) register it is hardly used in code
generated by the compiler. Compilers use scratch registers by
default. Changing the interrupt handlers to use p6 (ie a scratch
register) proved that the bug was in fact fatal.
Marcel Moolenaar [Sat, 12 Oct 2002 22:24:41 +0000 (22:24 +0000)]
Have the linker collect and combine all unwind_info and unwind
sections so that the resulting load module has a single unwind
table. This matches the behaviour in userland.
Marcel Moolenaar [Sat, 12 Oct 2002 21:04:01 +0000 (21:04 +0000)]
Polish previous commit:
o Replace KSTACK_PAGES with pages on panic() in pmap_new_thread(),
o Fix style bugs in adjacent code,
o Use NULL instead of 0 for pointers,
o Save the virtual kstack address if we create an alternate
kstack because 1) we can derive the physical (RR7) address
from it and 2) we need the virtual address for contigfree()
in pmap_dispose_thread(). Thus td_altkstack saves
td_md.md_kstackvirt.
Marcel Moolenaar [Sat, 12 Oct 2002 20:40:36 +0000 (20:40 +0000)]
Make this compile on 64-bit architectures (e.g. ia64) by not assuming
pointers (but more precisely vm_offset_t) can be printed with %x. Use
%p instead and cast the argument to caddr_t.
Marcel Moolenaar [Sat, 12 Oct 2002 20:35:56 +0000 (20:35 +0000)]
Remove the dependency on ia64_cpu.h by not defining pmap_kextract()
as a trivial function that only calls ia64_tpa() and hence requires
the prototype of ia64_tpa(), but by defining pmap_kextract as
ia64_tpa. This solves the inclusion ordering issue in ddb/db_watch.c
Mike Barcroft [Sat, 12 Oct 2002 11:39:19 +0000 (11:39 +0000)]
o Add typedefs for size_t and ssize_t.
o Add typedefs for gid_t, off_t, pid_t, and uid_t in the non-standards
case.
o Add struct iovec (also defined in <sys/uio.h>).
o Add visibility conditionals to avoid defining non-standard
extentions in the standards case.
o Change spelling of some types so they work without including
<sys/types.h> (u_char -> unsigned char, u_short -> unsigned short,
int64 -> __int64, caddr_t -> char *)
o Add comments about missing restrict type-qualifiers and missing
function.
Fix style bugs:
* Space -> tabs conversion.
* Removed blanks before semicolon in "if ... ; then".
* Proper indentation of misindented lines.
* Put a full stop after some comments.
* Removed whitespace at end of line.
Dima Dorfman [Sat, 12 Oct 2002 07:23:43 +0000 (07:23 +0000)]
Aesthetics: Output a prefix before sourcing rc.local as the old rc
script did. Stuff in rc.local frequently has lines like
"echo -n ' service_name'" which look ugly without a prefix and a
trailing period. Likewise for rc.shutdown.local for consistency.
Jeff Roberson [Sat, 12 Oct 2002 05:32:24 +0000 (05:32 +0000)]
- Create a new scheduler api that is defined in sys/sched.h
- Begin moving scheduler specific functionality into sched_4bsd.c
- Replace direct manipulation of scheduler data with hooks provided by the
new api.
- Remove KSE specific state modifications and single runq assumptions from
kern_switch.c
Tim J. Robbins [Sat, 12 Oct 2002 04:38:35 +0000 (04:38 +0000)]
Fix a typo causing incorrect formatting for negative values in some locales
(at least the French ones), a memory leak upon successful termination, a
pointer arithmetic error causing heap corruption, and an off-by-one bug
causing incorrect amounts of padding at the right of the value.
David E. O'Brien [Sat, 12 Oct 2002 03:55:09 +0000 (03:55 +0000)]
Talk about punting and not going to any trouble to DTRT:
contrib/binutils/include/getopt.h
/* Many other libraries have conflicting prototypes for getopt, with
differences in the consts, in stdlib.h. To avoid compilation
errors, only prototype getopt for the GNU C library. */
so manually define HAVE_DECL_GETOPT since configure doesn't offer any way
to set it... and its unistd.h not stdlib.h dang it.
Jeff Roberson [Sat, 12 Oct 2002 02:56:46 +0000 (02:56 +0000)]
- Move the description of KTR_CPUMASK into the "Event Masking" section.
- Remove the "Extensions" section since it is no longer relavent.
- Create a new section for KTR_VERBOSE and put it's description there.
Jeff Roberson [Sat, 12 Oct 2002 02:45:21 +0000 (02:45 +0000)]
- Remove the bogus reference to the removed KTR_EXTEND option.
- Add ktrdump(8) to the SEE ALSO section.
- Remove the BUGS section that complains about not having a userland utility
for viewing ktr data.
Peter Wemm [Fri, 11 Oct 2002 22:38:17 +0000 (22:38 +0000)]
Zap the early-adopter transition aid before we get into serious
5.0-R territory, as threatened. This only affects antique 5.0
systems that have not had a 'make world' done for well over a year.
David E. O'Brien [Fri, 11 Oct 2002 22:30:09 +0000 (22:30 +0000)]
* Negative #if's are harder to read as they don't tell exactly what arch
something applies to. So change #ifndef to an explicit list of defines.
* Treate sparc64 and ia64 as 64-bit platforms, which means larger roots.
* sparc64 should halt back to the firmware, not reset.
* sparc64 doesn't need to play MS-DOS/BIOS partition crap games.
John Baldwin [Fri, 11 Oct 2002 21:04:01 +0000 (21:04 +0000)]
- Move the 'done1' label down below the unlock of the proc lock and move
the locking of the proc lock after the goto to done1 to avoid locking
the lock in an error case just so we can turn around and unlock it.
- Move the exec_setregs() stuff out from under the proc lock and after
the p_args stuff. This allows exec_setregs() to be able to sleep or
write things out to userland, etc. which ia64 does.
The CAM system has it's own ideas of what locks are to be held by whom.
So do GEOM. Not a pretty sight.
Take all the interesting stuff out of GEOM::disk_create(), and leave just
the creation of the fake dev_t. Schedule the topology munging to happen
in the g_event thread with g_call_me().
This makes disk_create() pretty lock-agnostic, almost lock-atheist.
Tripped over by: peter
Sponsored by: DARPA & NAI Labs
Mike Barcroft [Fri, 11 Oct 2002 18:21:50 +0000 (18:21 +0000)]
Add typedefs for size_t and ssize_t, allow struct iovec to be defined
in other headers, add a visibility conditional to avoid namespace
pollution in the standards case.
Matt Jacob [Fri, 11 Oct 2002 17:28:01 +0000 (17:28 +0000)]
This should enable 10160 support. As best as I can tell, the same
f/w as 12160 is used, and otherwise, this is just a single channel
variant of the 10160.
Matt Jacob [Fri, 11 Oct 2002 17:18:54 +0000 (17:18 +0000)]
Fix the code so that it no longer on alpha refers to the now nonexistent
pci_cvt_to_bwx.
This doesn't necessarily make bge(4) now actually *work* on an alpha.
It loads, configures, and then about 30 seconds later, my XP1000 hard
freezes. But, hey, it's a start.
Mike Barcroft [Fri, 11 Oct 2002 14:58:34 +0000 (14:58 +0000)]
Change iov_base's type from `char *' to the standard `void *'. All
uses of iov_base which assume its type is `char *' (in order to do
pointer arithmetic) have been updated to cast iov_base to `char *'.
Ruslan Ermilov [Fri, 11 Oct 2002 14:17:09 +0000 (14:17 +0000)]
Build kerberized versions of the PAM library, and install them
into corresponding distributions during "make release". (This
also cleans the "slib" distribution up from the .o files.)
Ruslan Ermilov [Fri, 11 Oct 2002 14:05:19 +0000 (14:05 +0000)]
Pass -o option to crunchgen(1) to ensure object files end up
in seperate directories. This mostly affects RELENG_4 where
not doing so results in ${CHROOTDIR}/usr/src/release being
filled with object files, and "srelease" distribution having
them in.
One bug fixed: Use getmicrouptime() to trigger reseeds so that we
cannot be tricked by a clock being stepped backwards.
Express parameters in natural units and with natural names.
Don't use struct timeval more than we need to.
Various stylistic and readability polishing.
Introduce arc4rand(void *ptr, u_int len, int reseed) function which
returns a stream of pseudo-random bytes, observing the automatic
reseed criteria as well as allowing forced reseeds.
Maxim Sobolev [Fri, 11 Oct 2002 11:43:09 +0000 (11:43 +0000)]
- Add support for IPC_64 extensions into shmctl(2), semctl(2) and msgctl(2);
- add wrappers for mmap2(2) and ftruncate64(2) system calls;
- don't spam console with printf's when VFAT_READDIR_BOTH ioctl(2) is invoked;
- add support for SOUND_MIXER_READ_STEREODEVS ioctl(2);
- make msgctl(IPC_STAT) and IPC_SET actually working by converting from
BSD msqid_ds to Linux and vice versa;
- properly return EINVAL if semget(2) is called with nsems being negative.
David E. O'Brien [Fri, 11 Oct 2002 10:07:46 +0000 (10:07 +0000)]
Sync with 2.13. Reduce forking by using multiple sed expressions rather
than piping thru tr(1). Also prefer case over for+test, as case will
handle regex's nicely.
Note we can't exactly follow the real 2.13 genscripts.sh as we wind up with
multiple "'s in search paths. It is too late tonight to track down why.