Marcel Moolenaar [Sun, 13 Oct 2002 07:07:51 +0000 (07:07 +0000)]
Build the kernel with -mconstant-gp. This means that function calls,
with the exception of indirect function calls, are assumed to be
intra load module and thus that GP will be the same. This avoids
saving, setting and restoring GP for each function call and
reduces the kernel with ~320KB. There's obviously a performance
benefit as well.
Note that since we generally don't know if calls will be intra or
inter load module when we're compiling kernel modules, -mconstant-gp
cannot be used for modules.
Jeff Roberson [Sun, 13 Oct 2002 04:19:44 +0000 (04:19 +0000)]
- Remove the do { } while(0) from the VOP lock assert macros. This was
not optimized away by the compiler in time for it to still leave the VOP
functions as inlines.
Marcel Moolenaar [Sun, 13 Oct 2002 02:52:22 +0000 (02:52 +0000)]
ia64 specific CFLAGS change:
Fix the "@gprel relocation against dynamic symbol xxx" linker error.
Variables defined in the link unit and small enough to be put in the
short data section will have a gp-relative access sequence (using the
@gprel relocation). It is invalid to have @gprel relocations in shared
libraries, because they are to be resolved by the static linker and
not the dynamic linker. The -fpic option will cause @ltoff relocations
for @gprel relocations, but the side-effects are untested (if any).
Instead, disable/eliminate the short data section to achieve the same.
Mike Barcroft [Sun, 13 Oct 2002 00:33:52 +0000 (00:33 +0000)]
o Fix a silly requirement for <machine/signal.h> to be included in the
middle of this header.
o Remove unneeded conditionals to hide SIG* in the POSIX case.
(C allows implementations to define additional SIG* constants.)
o Add comments about missing features.
o Move the location of the sigset_t typedef.
o Update standards visibility conditionals.
o Fix some assumptions about what pid_t and uid_t are defined as.
o Remove size_t typedef and use __size_t in struct sigaltstack
instead.
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 *'.