dragonfly.git
17 years agoDo some fairly major include file cleanups to further separate kernelland
Matthew Dillon [Fri, 21 Nov 2003 22:46:15 +0000 (22:46 +0000)]
Do some fairly major include file cleanups to further separate kernelland
from userland.

    * Do not allow userland to include sys/proc.h directly, it must use
      sys/user.h instead.   This is because sys/proc.h has a huge number
      of kernel header file dependancies.

    * Do cleanups and work in lwkt_thread.c and lwkt_msgport.c to allow
      these files to be directly compiled in an upcoming userland thread
      support library.

    * sys/lock.h is inappropriately included by a number of third party
      programs so we can't disallow its inclusion, but do not include
      any kernel structures unless _KERNEL or _KERNEL_STRUCTURES are
      defined.

    * <ufs/ufs/inode.h> is often included by userland to get at the
      on-disk inode structure.  Only include the on-disk components and do
      not include kernel structural components unless _KERNEL or
      _KERNEL_STRUCTURES is defined

    * Various usr.bin programs include sys/proc.h unnecessarily.

    * The slab allocator has no concept of malloc buckets.  Remove malloc
      buckets structures and VMSTAT support from the system.

    * Make adjustments to sys/thread.h and sys/msgport.h such that the
      upcoming userland thread support library can include these files
      directly rather then copy them.

    * Use low level __int types in sys/globaldata.h, sys/msgport.h,
      sys/slaballoc.h, sys/thread.h, and sys/malloc.h, instead of
      high level sys/types.h types, reducing include dependancies.

17 years ago'Building databases' has 10 seconds worth of sleeps that it doesn't need.
Matthew Dillon [Fri, 21 Nov 2003 18:44:53 +0000 (18:44 +0000)]
'Building databases' has 10 seconds worth of sleeps that it doesn't need.
Remove them.

17 years agoTweak the context data a bit and do some code cleanup. Save %edx as well
Matthew Dillon [Fri, 21 Nov 2003 08:32:49 +0000 (08:32 +0000)]
Tweak the context data a bit and do some code cleanup.  Save %edx as well
as %eax and %ecx so we can throw the upcall pointer into %edx, which makes
it possible to create self-contained context assembly code.  This also
improves performance by giving the context assembly (see
src/test/sysperf/upcall.S) easier access to the upcall structure.

It's also safer (though not critical) to have the kernel save all the
call-used registers when setting up for an upcall.

17 years agoAdd some comments to the upcall test code.
Matthew Dillon [Fri, 21 Nov 2003 07:04:20 +0000 (07:04 +0000)]
Add some comments to the upcall test code.

17 years agoAdd an upcall performance test program + example context function
Matthew Dillon [Fri, 21 Nov 2003 06:58:28 +0000 (06:58 +0000)]
Add an upcall performance test program + example context function
assembly code.

17 years agoAdd UPC_CRITADD, the value that crit_count must be increased or decreased
Matthew Dillon [Fri, 21 Nov 2003 06:41:58 +0000 (06:41 +0000)]
Add UPC_CRITADD, the value that crit_count must be increased or decreased
by.

17 years agoAdd a big whopping manual page for the upcall syscalls, upc_register and
Matthew Dillon [Fri, 21 Nov 2003 06:41:02 +0000 (06:41 +0000)]
Add a big whopping manual page for the upcall syscalls, upc_register and
friends.

17 years agoImplement an upcall mechanism to support userland LWKT. This mechanism will
Matthew Dillon [Fri, 21 Nov 2003 05:29:08 +0000 (05:29 +0000)]
Implement an upcall mechanism to support userland LWKT.  This mechanism will
allow multiple processes sharing the same VM space (aka clone/threading)
to send each other what are basically IPIs.

Two new system calls have been added, upc_register() and upc_control().
Documentation is forthcoming.  The upcalls are nicely abstracted and a
program can register as many as it wants up to the kernel limit (which
is 32 at the moment).

The upcalls will be used for passing asynch data from kernel to userland,
such as asynch syscall message replies, for thread preemption timing,
software interrupts, IPIs between virtual cpus (e.g. between the processes
that are sharing the single VM space).

17 years agoAdd a DECLARE_DUMMY_MODULE for snd_cmi to detect kld/static-kernel conflicts.
Matthew Dillon [Thu, 20 Nov 2003 22:14:27 +0000 (22:14 +0000)]
Add a DECLARE_DUMMY_MODULE for snd_cmi to detect kld/static-kernel conflicts.

17 years agoAdd a DECLARE_DUMMY_MODULE() so we can get linker_set module names
Matthew Dillon [Thu, 20 Nov 2003 22:07:34 +0000 (22:07 +0000)]
Add a DECLARE_DUMMY_MODULE() so we can get linker_set module names
for modules that normally use DRIVER_MODULE().  The problem is that
DRIVER_MODULE() will define names that do not match the module name,
so a DECLARE_DUMMY_MODULE() is needed for the kernel to be able to
figure out that a module has been statitically compiled in.

17 years ago * Make pkg_add fetch the packages from /packages-4-stable instead of
Eirik Nygaard [Thu, 20 Nov 2003 17:40:06 +0000 (17:40 +0000)]
 * Make pkg_add fetch the packages from /packages-4-stable instead of
   /packages-current so -r works again.

Reported by: Adam K Kirchhoff <adamk@voicenet.com>

17 years agoFix a bug which causes wrong filename being written into the syslog
Eirik Nygaard [Thu, 20 Nov 2003 14:32:17 +0000 (14:32 +0000)]
Fix a bug which causes wrong filename being written into the syslog
in the case when client sends request with RFC2347 options.

Obtained from: FreeBSD

17 years agoThis is a major cleanup of the LWKT message port code. The messaging code
Matthew Dillon [Thu, 20 Nov 2003 06:05:31 +0000 (06:05 +0000)]
This is a major cleanup of the LWKT message port code.  The messaging code
is getting closer to being directly useable by userland.  With these changes
message/port operations are now far better abstracted then they were before.

    * Stale fields have been removed from struct lwkt_msg.
    * lwkt_abortmsg() has been revamped to make it easier to support.
    * lwkt_waitmsg has been converted to a port function.
    * mp_*port() function fields have been renamed for better readability.
    * ms_cleanupmsg has been removed from struct lwkt_msg.
    * Union sysmsg is now struct sysmsg.
    * A copyout function has been added to struct sysmsg.
    * The system calls have been regenerated.

17 years agoAdjust nfs module loading to use nfs.ko (4.x style) rather then the
Matthew Dillon [Wed, 19 Nov 2003 20:11:58 +0000 (20:11 +0000)]
Adjust nfs module loading to use nfs.ko (4.x style) rather then the
separate client/server ko's that 5.x has.

Submitted-by: YONETANI Tomokazu <qhwt@myrealbox.com>
17 years agoAdd pkgwrap.c, which was missed in my last commit.
Hiten Pandya [Wed, 19 Nov 2003 15:19:45 +0000 (15:19 +0000)]
Add pkgwrap.c, which was missed in my last commit.

Obtained from: FreeBSD (RELENG_4)

17 years agoSupport for conflict (pkg_add -C) checking and pkg_tools (pkg_add -P).
Hiten Pandya [Wed, 19 Nov 2003 15:17:29 +0000 (15:17 +0000)]
Support for conflict (pkg_add -C) checking and pkg_tools (pkg_add -P).

While I am here, cleanup some local variables.  This commit unbreaks
installation of the docproj-{no}jadetex package, since ghostscript-gnu
makes use of the @cconflicts functionality.

Merged from: FreeBSD (RELENG_4)

17 years ago * Add DragonFly as an possibility to a case statement.
Eirik Nygaard [Wed, 19 Nov 2003 12:49:07 +0000 (12:49 +0000)]
 * Add DragonFly as an possibility to a case statement.

17 years ago * Added tabs instead of spaces for readability and consistency with NetBSD
Eirik Nygaard [Wed, 19 Nov 2003 10:32:45 +0000 (10:32 +0000)]
 * Added tabs instead of spaces for readability and consistency with NetBSD
   and FreeBSD.

17 years agoChange the system name from 'FreeBSD' to 'DragonFly'.
Matthew Dillon [Wed, 19 Nov 2003 01:53:16 +0000 (01:53 +0000)]
Change the system name from 'FreeBSD' to 'DragonFly'.

More missing freebsd->dragonfly glue for csu and libobjc

17 years agoChange the system name from 'FreeBSD' to 'DragonFly'.
Matthew Dillon [Wed, 19 Nov 2003 01:37:27 +0000 (01:37 +0000)]
Change the system name from 'FreeBSD' to 'DragonFly'.

Final cpp glue to define __DragonFly__ and __DragonFly_cc_version.  Note
that __FreeBSD__ and __FreeBSD_cc_version are being left intact.

17 years agoRedo the 'upgrade' target. Get rid of the old elf stuff and change the
Matthew Dillon [Wed, 19 Nov 2003 01:05:32 +0000 (01:05 +0000)]
Redo the 'upgrade' target.  Get rid of the old elf stuff and change the
definition of 'upgrade'.  Upgrade will not update all files that are
supposed to be 'static' (i.e. not modified by the user).  For example,
most /etc/rc* and most files in /etc/rc.d.

17 years agoAdd syscall4 (/tmp/sc4) perf test. This tests stat() overhead instead of
Matthew Dillon [Wed, 19 Nov 2003 00:59:19 +0000 (00:59 +0000)]
Add syscall4 (/tmp/sc4) perf test.  This tests stat() overhead instead of
getuid() syscall overhead.

17 years agoChange the system name from 'FreeBSD' to 'DragonFly'. Additional commits
Matthew Dillon [Wed, 19 Nov 2003 00:54:23 +0000 (00:54 +0000)]
Change the system name from 'FreeBSD' to 'DragonFly'.  Additional commits
to deal with gnuisms.

17 years agoChange the system name from 'FreeBSD' to 'DragonFly'. We are now officially
Matthew Dillon [Wed, 19 Nov 2003 00:51:38 +0000 (00:51 +0000)]
Change the system name from 'FreeBSD' to 'DragonFly'.  We are now officially
DragonFly 1.0-CURRENT.  The change is fairly straight forward but involves
adding support for the 'DragonFly' OS type in various gnu contributed pieces
(typically configure based), as well as compiler and BFD support for building
GCC and friends (basically just copied the FreeBSD files for DragonFly).

Additionally, hack the ports makefiles with UNAME_xxx environment variables
so ports builds think its still a FreeBSD-4.8 system.  Otherwise most of the
ports will fail.

17 years agoThis file needs sys/cdefs.h for __ extensions and such (similar to what
Matthew Dillon [Wed, 19 Nov 2003 00:42:30 +0000 (00:42 +0000)]
This file needs sys/cdefs.h for __ extensions and such (similar to what
FreeBSD-5.x does).  This will help the ports builds.

17 years agoAdd a .makeenv directive to make, which allows variables to be exported to
Matthew Dillon [Tue, 18 Nov 2003 23:49:54 +0000 (23:49 +0000)]
Add a .makeenv directive to make, which allows variables to be exported to
the environment.  This will be used to support certain ports hacks but it
will also be generally useful in the future.

17 years agoRC cleanups and minor bug fixes to support the uname change to DragonFly
Matthew Dillon [Tue, 18 Nov 2003 23:46:01 +0000 (23:46 +0000)]
RC cleanups and minor bug fixes to support the uname change to DragonFly

17 years agoTurn off CHECK_POINTS in mpboot.s. It was accidently left on which resulted
Matthew Dillon [Tue, 18 Nov 2003 05:52:26 +0000 (05:52 +0000)]
Turn off CHECK_POINTS in mpboot.s.  It was accidently left on which resulted
in ceratin SMP machine's BIOSes complaining about bad CMOS checksums.

Pointy hat with spikes to: Matt Dillon.

17 years agoSync TAILQ_FOREACH work from 5.x. The closer we can get this file to 5.x
Matthew Dillon [Tue, 18 Nov 2003 05:10:31 +0000 (05:10 +0000)]
Sync TAILQ_FOREACH work from 5.x.  The closer we can get this file to 5.x
the better.

17 years agoUse M_ZERO instead of manually bzero()ing memory allocated with malloc().
Matthew Dillon [Tue, 18 Nov 2003 05:02:40 +0000 (05:02 +0000)]
Use M_ZERO instead of manually bzero()ing memory allocated with malloc().

17 years agoCorrect several bugs. If we fail to add a device be sure to delete its kobj.
Matthew Dillon [Tue, 18 Nov 2003 04:58:19 +0000 (04:58 +0000)]
Correct several bugs.  If we fail to add a device be sure to delete its kobj.
Remove a double kobj_init() call in make_device().  Replace a manual
free() with a kobj_delete() call, and delete a kobj before reinitializing
it.

17 years agoBackout part of 1.16. It is not necessary to align the stack at this
Matthew Dillon [Tue, 18 Nov 2003 01:15:42 +0000 (01:15 +0000)]
Backout part of 1.16.  It is not necessary to align the stack at this
point.  A hack to align the stack already exists in lib/csu/i386-elf/crt1.c.

After-Discussions-With: Bruce Evans <bde@zeta.org.au>

17 years agoclarify the solution for typical build snafus in UPDATING.
Matthew Dillon [Tue, 18 Nov 2003 00:34:20 +0000 (00:34 +0000)]
clarify the solution for typical build snafus in UPDATING.

17 years agoFix misplacement of code. Due to additional DF code everything got
Jeroen Ruigrok/asmodai [Mon, 17 Nov 2003 21:24:15 +0000 (21:24 +0000)]
Fix misplacement of code.  Due to additional DF code everything got
shifted one position, including the main condition, which was wrong.

17 years agoFix linux_getrlimit() and linux_old_getrlimit() which weren't copyout()'ing
David P. Reese, Jr. [Mon, 17 Nov 2003 05:11:11 +0000 (05:11 +0000)]
Fix linux_getrlimit() and linux_old_getrlimit() which weren't copyout()'ing
the right length.  This fixes the reported hang when running `java -version`
with linux-sun-jdk1.4.2.

Problem reported by: Keneth Culver <culverk@sweetdreamsracing.biz>

17 years agoFactor out the object system from new-bus so that it can be used by
Jeroen Ruigrok/asmodai [Mon, 17 Nov 2003 00:54:40 +0000 (00:54 +0000)]
Factor out the object system from new-bus so that it can be used by
non-device code.

Re-implement the method dispatch to improve efficiency. The new system
takes about 40ns for a method dispatch on a 300Mhz PII which is only 10ns
slower than a direct function call on the same hardware.

This is all based on Doug Rabson's work in April and May of 2000.

17 years agoAdd forgotten semi-colon.
Jeroen Ruigrok/asmodai [Sun, 16 Nov 2003 22:30:49 +0000 (22:30 +0000)]
Add forgotten semi-colon.

17 years agoFix a missing backslashed in the 1.9 commit.
Matthew Dillon [Sun, 16 Nov 2003 22:27:49 +0000 (22:27 +0000)]
Fix a missing backslashed in the 1.9 commit.

17 years agoCleanup aux args and 32-byte align the initial user stack pointer. Note that
Matthew Dillon [Sun, 16 Nov 2003 19:32:31 +0000 (19:32 +0000)]
Cleanup aux args and 32-byte align the initial user stack pointer.  Note that
newer GCCs use masking ops on the stack pointer and do not need an aligned
stack pointer, but older GCCs will benefit and, besides, it doesn't hurt.

Submitted-by: Alexander Leidinger
17 years agoEnable Conrad parallel port radio clock support in ntp by default. No reason
Matthew Dillon [Sun, 16 Nov 2003 19:20:31 +0000 (19:20 +0000)]
Enable Conrad parallel port radio clock support in ntp by default.  No reason
not to!

Submitted-by: Alexander Leidinger <reject@Leidinger.net>
17 years agoCleanup the linux exec code to match other recent fixes to the exec code.
Matthew Dillon [Sun, 16 Nov 2003 19:08:27 +0000 (19:08 +0000)]
Cleanup the linux exec code to match other recent fixes to the exec code.

17 years ago * K&R function cleanup
Eirik Nygaard [Sun, 16 Nov 2003 15:17:36 +0000 (15:17 +0000)]
 * K&R function cleanup

17 years ago * K&R function cleanup
Eirik Nygaard [Sun, 16 Nov 2003 14:10:46 +0000 (14:10 +0000)]
 * K&R function cleanup

17 years ago * K&R function cleanup
Eirik Nygaard [Sun, 16 Nov 2003 11:51:15 +0000 (11:51 +0000)]
 * K&R function cleanup

17 years agoRework the logic in the kernel config files.
Jeroen Ruigrok/asmodai [Sun, 16 Nov 2003 10:32:46 +0000 (10:32 +0000)]
Rework the logic in the kernel config files.
Remove all build magic for the module interface methods from the 'files'
file and move it to the Makefile where it belongs.

Based on: Makefile.i386 1.181 and files 1.348
Tested with: LINT

17 years agoAdd FreeBSD's makeobjops.awk.
Jeroen Ruigrok/asmodai [Sun, 16 Nov 2003 10:30:06 +0000 (10:30 +0000)]
Add FreeBSD's makeobjops.awk.

17 years agoFix a bug in the last fix to a prior locking issue. A vdrop() was
Matthew Dillon [Sun, 16 Nov 2003 04:14:45 +0000 (04:14 +0000)]
Fix a bug in the last fix to a prior locking issue.  A vdrop() was
missing.

17 years agopanic() normally tries to sync. Add a sysctl to control the behavior in
Matthew Dillon [Sun, 16 Nov 2003 02:41:46 +0000 (02:41 +0000)]
panic() normally tries to sync.  Add a sysctl to control the behavior in
order to facilitate debugging.

Submitted-by: YONETANI Tomokazu <qhwt@myrealbox.com>
17 years agoCorrect bugs introduced in the last syscall separation commit. The
Matthew Dillon [Sun, 16 Nov 2003 02:37:39 +0000 (02:37 +0000)]
Correct bugs introduced in the last syscall separation commit.  The
argument list for shell scripts was not being properly rewritten, corrupting
the argv list and environment.

17 years agoFix a bug in signal translation introduced in last revision. This effects
David P. Reese, Jr. [Sun, 16 Nov 2003 01:50:54 +0000 (01:50 +0000)]
Fix a bug in signal translation introduced in last revision.  This effects
linux_signal() and linux_rt_sigaction().

17 years ago * K&R function cleanup
Eirik Nygaard [Sat, 15 Nov 2003 23:33:35 +0000 (23:33 +0000)]
 * K&R function cleanup

17 years agoConvert files from DOS to Unix.
Jeroen Ruigrok/asmodai [Sat, 15 Nov 2003 21:12:53 +0000 (21:12 +0000)]
Convert files from DOS to Unix.

Found by: makeobjops.awk and vim

17 years agoMisc cleanups to take care of GCC3.x warnings. Missing 'U' and 'LL'
Matthew Dillon [Sat, 15 Nov 2003 21:05:44 +0000 (21:05 +0000)]
Misc cleanups to take care of GCC3.x warnings.  Missing 'U' and 'LL'
postfixes on large unsigned or 64 bit constants, non-storage structural
declarations embedded in structures, deprecated use of __FUNCTION__,
missing 'break' statements in the last switch case, goto label ops where
the label occurs just before an end-brace (many of which appear to be
fixable with 'break' or 'continue' instead and existed simply due to
programmer-paranoia), garbage data in #endif lines that was not commented
out.  GCC3 also caught some argument count issues in kernel printfs.

Many of these (obvious) fixes are similar to or copied from 5.x.

Also fix a few other minor issues such as certain drivers declaring a
proc pointer instead of a thread pointer.

Move -ffreestanding from CWARNFLAGS to CFLAGS.  It doesn't belong in
CWARNFLAGS.

17 years ago * K&R function cleanup
Eirik Nygaard [Sat, 15 Nov 2003 20:33:43 +0000 (20:33 +0000)]
 * K&R function cleanup

17 years agoChange wrapping definition from ending in DECLARED_ to DECLARED.
Jeroen Ruigrok/asmodai [Sat, 15 Nov 2003 19:28:42 +0000 (19:28 +0000)]
Change wrapping definition from ending in DECLARED_ to DECLARED.
This makes it consistent with other definitions and has as added bonus that
rpm compiles again.
Furthermore it keeps us synchronised to FreeBSD 5.x.

17 years agoMove bsd.kern.mk from /usr/src/share/mk to /usr/src/sys/conf and
Matthew Dillon [Sat, 15 Nov 2003 19:01:35 +0000 (19:01 +0000)]
Move bsd.kern.mk from /usr/src/share/mk to /usr/src/sys/conf and
unconditionally include it in the various Makefile's that reference it.
This ensures that the proper bsd.kern.mk is used.

17 years agoAdd __DragonFly_version, set to 100000, which basically means:
Jeroen Ruigrok/asmodai [Sat, 15 Nov 2003 11:46:26 +0000 (11:46 +0000)]
Add __DragonFly_version, set to 100000, which basically means:

DragonFly version 1.0.0, allowing for 999 updates before we are forced
to update the last revision number.

Do note that it hasn't replaced the current naming or numbering in the
DragonFly system.

17 years agoImplement linux_mmap2().
David P. Reese, Jr. [Sat, 15 Nov 2003 03:52:33 +0000 (03:52 +0000)]
Implement linux_mmap2().

FreeBSD PR: kern/45785

17 years agoImplement linux_truncate64() and linux_ftruncate64().
David P. Reese, Jr. [Sat, 15 Nov 2003 03:23:34 +0000 (03:23 +0000)]
Implement linux_truncate64() and linux_ftruncate64().

17 years agoImplement linux_truncate64() and linux_ftruncate64().
David P. Reese, Jr. [Sat, 15 Nov 2003 00:40:06 +0000 (00:40 +0000)]
Implement linux_truncate64() and linux_ftruncate64().

FreeBSD PR: kern/45785

17 years agoPrep for GCC 3.x kernel compiles, stage 2/2: Remove bad __asm embedded-newline
Matthew Dillon [Fri, 14 Nov 2003 22:58:33 +0000 (22:58 +0000)]
Prep for GCC 3.x kernel compiles, stage 2/2: Remove bad __asm embedded-newline
syntax, add -ffreestanding (which is GCC 2.95.x compatible), modify the
-I path slightly in sys/dev/disk/aic7xxx/aicasm/Makefile, and remove improper
combination of __asm("ax") and a later __asm instruction.

Submitted-by: Craig Dooley <craig@xlnx-x.net>
17 years agoSync with FreeBSD-5.x MODULE_DEPEND() and DECLARE_MODULE() broke viapm.
David P. Reese, Jr. [Fri, 14 Nov 2003 21:46:18 +0000 (21:46 +0000)]
Sync with FreeBSD-5.x MODULE_DEPEND() and DECLARE_MODULE() broke viapm.
Sync iiconf.h and smbconf.h with FreeBSD-5.1 to remedy the situation.

17 years agoRemove an unused variable from last commit.
David P. Reese, Jr. [Fri, 14 Nov 2003 21:18:41 +0000 (21:18 +0000)]
Remove an unused variable from last commit.

17 years agoSplit mmap().
David P. Reese, Jr. [Fri, 14 Nov 2003 20:54:07 +0000 (20:54 +0000)]
Split mmap().

Move ovadvise(), ogetpagesize() and ommap() to new file 43bsd/43bsd_vm.c.

http://gomerbud.com/daver/patches/dragonfly/syscall-separation-15.diff

17 years agoAdd a make variable listing obsolete header files that need to be removed
Matthew Dillon [Fri, 14 Nov 2003 20:12:53 +0000 (20:12 +0000)]
Add a make variable listing obsolete header files that need to be removed
from the target directory.  Set it to machine/ansi.h and sys/inttypes.h.
machine/ansi.h's functionality has been taken over by machine/stdint.h.

17 years agoFix bug in last syscall separation commit, an extra semicolon was causing
Matthew Dillon [Fri, 14 Nov 2003 19:31:22 +0000 (19:31 +0000)]
Fix bug in last syscall separation commit, an extra semicolon was causing
mkfifo to return early and leave vnodes locked.

17 years agoFix long interface name handling.
Hiten Pandya [Fri, 14 Nov 2003 09:56:03 +0000 (09:56 +0000)]
Fix long interface name handling.

I found this when I was creating a test VLAN setup, where I had interface
named as vlan50 and vlan100.  These were truncated to vlan5 or vlan1. While
I am here, also fix the NetIf column in ``netstat -r'' output.

17 years agoAdd a prototype for if_indextoname().
Hiten Pandya [Fri, 14 Nov 2003 09:53:46 +0000 (09:53 +0000)]
Add a prototype for if_indextoname().

For some odd reason, the function was used without a prototype
in netstat(8).

17 years ago__P removal.
Matthew Dillon [Fri, 14 Nov 2003 03:54:33 +0000 (03:54 +0000)]
__P removal.

Submitted-by: Craig Dooley <craig@xlnx-x.net>
17 years agoMove ogetkerninfo() to the compat tree without any changes.
David P. Reese, Jr. [Fri, 14 Nov 2003 02:54:52 +0000 (02:54 +0000)]
Move ogetkerninfo() to the compat tree without any changes.

17 years ago* How did these get here.
David Rhodus [Fri, 14 Nov 2003 02:43:24 +0000 (02:43 +0000)]
* How did these get here.
Remove some __P() macros because their not cool anymore.

17 years agoMove ogethostname(), osethostname(), ogethostid(), osethostid(), and
David P. Reese, Jr. [Fri, 14 Nov 2003 01:53:55 +0000 (01:53 +0000)]
Move ogethostname(), osethostname(), ogethostid(), osethostid(), and
oquota() to the 43bsd emulation subtree.

Change o{get,set}hostname() to use kernel_sysctl() instead of
userland_sysctl().

17 years agoKill two more stackgap allocations. One is in linux_sysctl(). The other
David P. Reese, Jr. [Fri, 14 Nov 2003 01:32:45 +0000 (01:32 +0000)]
Kill two more stackgap allocations.  One is in linux_sysctl().  The other
is in linux_rt_sigreturn().

17 years agoRemove __P() macros from include/
Matthew Dillon [Fri, 14 Nov 2003 01:01:51 +0000 (01:01 +0000)]
Remove __P() macros from include/

Submitted-by: Craig Dooley <cd5697@albany.edu>
17 years agoMT_TAG mbufs are terrible hacks and cannot be freed. Skip any MT_TAGs
Matthew Dillon [Fri, 14 Nov 2003 00:45:20 +0000 (00:45 +0000)]
MT_TAG mbufs are terrible hacks and cannot be freed.  Skip any MT_TAGs
before freeing mbufs sent to a netisr without a handler.

17 years agoBring in the MODULE_DEPEND() and DECLARE_MODULE() macros from FreeBSD-5.x.
Matthew Dillon [Fri, 14 Nov 2003 00:37:24 +0000 (00:37 +0000)]
Bring in the MODULE_DEPEND() and DECLARE_MODULE() macros from FreeBSD-5.x.
Instead of trying to bring in the 5.x kern/kern_loader.c and related code,
which is a huge complex mess, instead properly declare the miibus module
and check preload files against static in-kernel modules and ignore any
preloaded modules that arleady exist in-kernel based on DECLARE_MODULE()
matching up.

This solves a problem where the bootloader attempts to load module
dependancies along with their modules (e.g. if if_fxp is loaded then miibus
is also loaded).  If the kernel already had a miibus module built in this
resulted in two miibus modules which resulted in a crash.

17 years agoRefuse to load dependancies from the root filesystem during early boot when
Matthew Dillon [Thu, 13 Nov 2003 22:02:42 +0000 (22:02 +0000)]
Refuse to load dependancies from the root filesystem during early boot when
the root filesystem hasn't been mounted yet.  This prevents a panic when
the boot loader does not properly load module dependancies.

17 years ago* Fix a locking issue inside the inode hashing code which
David Rhodus [Thu, 13 Nov 2003 16:26:42 +0000 (16:26 +0000)]
*       Fix a locking issue inside the inode hashing code which
        results in a panic situation.

Fix written by: Matt Dillon
Extensive testing by: David Rhodus
~

17 years agoThe MBWTest program (/tmp/mbw1) attempts to figure out the L1 and L2
Matthew Dillon [Thu, 13 Nov 2003 07:10:36 +0000 (07:10 +0000)]
The MBWTest program (/tmp/mbw1) attempts to figure out the L1 and L2
cache sizes and measures L1, L2, and non-cached linear memory bandwidth.

17 years agoSplit mkfifo().
David P. Reese, Jr. [Thu, 13 Nov 2003 04:04:42 +0000 (04:04 +0000)]
Split mkfifo().

Trash the CHECKALT{CREAT,EXIST} macros and friends.  Implement
linux_copyin_path() and linux_free_path() for path translation without
using the stackgap.

Use the above and recently split syscalls to remove stackgap allocations
from linux_creat(), linux_open(), linux_lseek(), linux_llseek(),
linux_access(), linux_unlink(), linux_chdir(), linux_chmod(),
linux_mkdir(), linux_rmdir(), linux_rename(), linux_symlink(),
linux_readlink(), linux_truncate(), linux_link(), linux_chown(),
linux_lchown(), linux_uselib(), linux_utime(), linux_mknod(),
linux_newstat(), linux_newlstat(), linux_statfs(), linux_stat64(),
linux_lstat64(), linux_chown16(), linux_lchown16(), linux_execve().

Split use split syscalls to reimplement linux_fstatfs().

Implement linux_translate_path() for use in exec_linux_imgact_try().

17 years ago* Fix some __P() mess up.
David Rhodus [Thu, 13 Nov 2003 02:39:42 +0000 (02:39 +0000)]
* Fix some __P() mess up.

17 years agocleanup extra )'s missed by the __P commit.
Matthew Dillon [Thu, 13 Nov 2003 00:14:52 +0000 (00:14 +0000)]
cleanup extra )'s missed by the __P commit.

17 years agoAdd Marvell chipset support. Adding the PCI ID is all that was needed.
Matthew Dillon [Wed, 12 Nov 2003 22:43:07 +0000 (22:43 +0000)]
Add Marvell chipset support.  Adding the PCI ID is all that was needed.

Submitted-by: Jung-uk Kim <jkim@niksun.com>
17 years agoPrep for GCC 3.x kernel compiles, stage 1/2: Remove bad C syntax including
Matthew Dillon [Wed, 12 Nov 2003 22:08:09 +0000 (22:08 +0000)]
Prep for GCC 3.x kernel compiles, stage 1/2: Remove bad C syntax including
use ofthe HIDENAME macro with '.', embedded newlines in quoted strings, '#'
comments in .S files, bogus trailing ## concactenation in C macros,
improper ## concactenations, and some minor mismatched types in switch
statements.

Submitted-by: Craig Dooley <craig@xlnx-x.net>
17 years ago * Removed the __P macros from lib/
Eirik Nygaard [Wed, 12 Nov 2003 20:21:31 +0000 (20:21 +0000)]
 * Removed the __P macros from lib/

 * Small fixups by me in lib/libcr, there was some stale ')' after the __P( was
   removed from the line above.

Submitted-by: Craig Dooley <craig@xlnx-x.net>
17 years ago * Add missing $DragonFly$ keywords.
Eirik Nygaard [Wed, 12 Nov 2003 18:07:03 +0000 (18:07 +0000)]
 * Add missing $DragonFly$ keywords.

17 years ago * Get rid of of the _BSD_XXX type usage.
Eirik Nygaard [Wed, 12 Nov 2003 17:31:17 +0000 (17:31 +0000)]
 * Get rid of of the _BSD_XXX type usage.
 * Correct small typo __ct_rune_T -> __ct_rune_t

17 years ago * __P removal from games/
Eirik Nygaard [Wed, 12 Nov 2003 14:53:54 +0000 (14:53 +0000)]
 * __P removal from games/

Submitted-by: Craig Dooley <craig@xlnx-x.net>
17 years agoRemind myself and others that kern_readlink() isn't properly split yet.
David P. Reese, Jr. [Wed, 12 Nov 2003 10:11:09 +0000 (10:11 +0000)]
Remind myself and others that kern_readlink() isn't properly split yet.
There are copyin() calls burried in VOP_READLINK().

17 years agoSplit execve(). This required some interesting changes to the shell
David P. Reese, Jr. [Wed, 12 Nov 2003 01:00:33 +0000 (01:00 +0000)]
Split execve().  This required some interesting changes to the shell
image activation code and the image_params structure.

Userland pointers are no longer passed in the image_params structure.
The exec_copyin_args() function now pulls the arguments, environment
and filename of the target being execve()'d into a kernel space buffer
before calling kern_execve().

The exec_shell_imgact() function does some magic to prepend the
interpreter arguments.

17 years agoThe big syscall split commit broke utimes(), lutimes() and futimes() when
David P. Reese, Jr. [Tue, 11 Nov 2003 14:33:23 +0000 (14:33 +0000)]
The big syscall split commit broke utimes(), lutimes() and futimes() when
passed a NULL timeval structure.

17 years agoThe recent lseek() fix didn't touch olseek(). I don't see why, as olseek()
David P. Reese, Jr. [Tue, 11 Nov 2003 09:28:15 +0000 (09:28 +0000)]
The recent lseek() fix didn't touch olseek().  I don't see why, as olseek()
isn't even used in the currently utilized emulation code.

Return the result in the sysmsg_offset field.  Silences a compiler warning.

17 years agoMost code that calls vm_object_allocate() assumes that the allocation will
Matthew Dillon [Tue, 11 Nov 2003 01:35:36 +0000 (01:35 +0000)]
Most code that calls vm_object_allocate() assumes that the allocation will
succeed.  Set the flag to cause the VM object zone to panic if it is unable
to allocate a VM object (so we don't get incomprehensible fatal null pointer
traps in the kernel).

17 years agoAdd the varsym_list() system call and add listing support to the varsym
Matthew Dillon [Tue, 11 Nov 2003 00:04:17 +0000 (00:04 +0000)]
Add the varsym_list() system call and add listing support to the varsym
utility.

Work done by:  Eirik Nygaard <eirikn@kerneled.com> and Matt Dillon

17 years agoAdd the varsym_list() system call and add listing support to the varsym
Matthew Dillon [Mon, 10 Nov 2003 23:58:59 +0000 (23:58 +0000)]
Add the varsym_list() system call and add listing support to the varsym
utility.

Work done by:  Eirik Nygaard <eirikn@kerneled.com> and Matt Dillon

17 years agoThe last major syscall separation commit completely broke our lseek() as well
Matthew Dillon [Mon, 10 Nov 2003 20:57:18 +0000 (20:57 +0000)]
The last major syscall separation commit completely broke our lseek() as well
as the linux emulated lseek().  It's sheer luck that the system works at
all :-).  Fix lseek's 64 bit return value.

17 years agoProperly document getenv()'s return values using a slightly altered patch.
Jeroen Ruigrok/asmodai [Mon, 10 Nov 2003 19:48:53 +0000 (19:48 +0000)]
Properly document getenv()'s return values using a slightly altered patch.

Submitted by: ?
FreeBSD PR: docs/58033

17 years agoMake sure to skip the PC98 architecture on the OPTi detection, since it
Jeroen Ruigrok/asmodai [Mon, 10 Nov 2003 19:29:42 +0000 (19:29 +0000)]
Make sure to skip the PC98 architecture on the OPTi detection, since it
obscures a CS sound card.

Submitted by: Watanabe Kazuhiro <CQG00620@nifty.ne.jp>
FreeBSD PR: kern/45673

17 years agoWhat happens when you mod a negative number? Mask off the hash value before
Matthew Dillon [Mon, 10 Nov 2003 18:32:59 +0000 (18:32 +0000)]
What happens when you mod a negative number?  Mask off the hash value before
modding so the returned value doesn't overflow the thread array when hashing
packets.

Also disable the multi-threaded networking by default.  Setting
net.inet.ip.mthread_enable to 1 will enable it.

17 years agoDocument the edx assignment to fds[1]
Matthew Dillon [Mon, 10 Nov 2003 18:29:33 +0000 (18:29 +0000)]
Document the edx assignment to fds[1]