dragonfly.git
18 years agoFix wrong '/etc/rmt' and '/etc/termcap' symlinks created by
Sascha Wildner [Wed, 19 Oct 2005 05:18:36 +0000 (05:18 +0000)]
Fix wrong '/etc/rmt' and '/etc/termcap' symlinks created by
'make upgrade'.

18 years agoAdjust comment on DEVICE_POLLING option.
Sepherosa Ziehau [Tue, 18 Oct 2005 15:31:10 +0000 (15:31 +0000)]
Adjust comment on DEVICE_POLLING option.

Reminded-by: Justin C. Sherrill <justin at shiningsilence.com>
18 years agoAdd brief comment on DEVICE_POLLING option. This comment is taken from LINT
Sepherosa Ziehau [Tue, 18 Oct 2005 15:19:03 +0000 (15:19 +0000)]
Add brief comment on DEVICE_POLLING option.  This comment is taken from LINT

Requested-by: Justin C. Sherrill <justin at shiningsilence.com>
18 years agoadd DEVICE_POLLING option
Sepherosa Ziehau [Mon, 17 Oct 2005 06:31:23 +0000 (06:31 +0000)]
add DEVICE_POLLING option

Approved-by: dillon
18 years agoSync with FreeBSD dev/em
Sepherosa Ziehau [Mon, 17 Oct 2005 06:18:36 +0000 (06:18 +0000)]
Sync with FreeBSD dev/em

if_em.c rev 1.2.2.{20,21,22} 1.47 1.63
if_em.h rev 1.1.2.17
if_em_hw.c rev 1.1.2.12
if_em_hw.h rev 1.1.2.12

- Add support for Intel PRO/1000 GT Desktop Adapter
- Add support for Intel 82546GB dual port PCIE adapter
- Add fix for 82547 which corrects an issue with Jumbo frames larger than 10k
- Add fix for vlan tagged frames not being properly bridged
- Correct TBI workaround
- Correct LED operation issues
- Do not count RNBC (internal buffer full) towards the RX error count,
  since it's not really an error
- Correct a workaround that should only be applied to one adapter.  Workaround
  was causing device hangs when incorrectly applied to other adapters (*)
- Run em_local_timer() once per second instead of running it once per 2 seconds.
  This makes gathering of stats more precise

(*) Detailed problem description is in FreeBSD's PR kern/66634

18 years agoDo a run through of the fragment allocation and freeing code, documenting
Matthew Dillon [Sun, 16 Oct 2005 18:48:36 +0000 (18:48 +0000)]
Do a run through of the fragment allocation and freeing code, documenting
as I go.  Add a KKASSERT() for one test that I wasn't sure about but
otherwise make no operational changes.

18 years agoOnly resynchronize the RTC on shutdown if we had previously loaded it and
Matthew Dillon [Sat, 15 Oct 2005 21:03:24 +0000 (21:03 +0000)]
Only resynchronize the RTC on shutdown if we had previously loaded it and
we are not in a panic.  This prevents early failures and panics from
writing a bad time back into the RTC.

18 years agoMPTable fixup for Shuttle XPC with an AMD Athlon X2 - there is no entry
Matthew Dillon [Sat, 15 Oct 2005 19:55:16 +0000 (19:55 +0000)]
MPTable fixup for Shuttle XPC with an AMD Athlon X2 - there is no entry
for IRQ 15, preventing ata1 (typically the CD) from operating properly.
Note that the ACPI table has an ISA entry for both IRQ 14 and IRQ 15.

18 years agoUse nlink_t for number of links.
Sascha Wildner [Sat, 15 Oct 2005 19:09:17 +0000 (19:09 +0000)]
Use nlink_t for number of links.

18 years agoDisplay all IOAPIC pin assignments when bootverbose is specified, not
Matthew Dillon [Sat, 15 Oct 2005 18:50:08 +0000 (18:50 +0000)]
Display all IOAPIC pin assignments when bootverbose is specified, not
just the PCI assignments.

18 years agoImplement an emergency interrupt polling feature. When enabled, most
Matthew Dillon [Sat, 15 Oct 2005 03:23:01 +0000 (03:23 +0000)]
Implement an emergency interrupt polling feature.  When enabled, most
interrupt handlers installed on the system will be polled at the specified
frequency.  The exceptions are the 8254 clock and ATA interrupts (ATA can
blow up if it gets a fake interrupt, and the 8254 needs to work for systimers
to work which the poller is based on).  These variables may be specified
in /boot/loader.conf and/or adjusted on a live system with sysctl.

kern.emergency_intr_enable (default 0 = off)
kern.emergency_intr_freq (default 10 = 10 hz)

THIS FEATURE IS NOT DESIGNED TO BE USED ON PRODUCTION SYSTEMS.  It should be
used only for kernel development, debugging, and testing, to get devices to
work that would otherwise not work due to messed up interrupt routing, or if
you have no other choice.  This feature has VERY HIGH OVERHEAD, as a dozen or
more service routines may be called on each tick.  The feature can be
life-safer e.g. on machines that would otherwise not work at all with
DragonFly, to get them working well enough that they can communicate with
the outside world.  As mentioned already, the primary use of this feature
is to aid in kernel development.

18 years agoBring another softupdates fix in from FreeBSD, FreeBSD commit message:
Matthew Dillon [Fri, 14 Oct 2005 23:45:59 +0000 (23:45 +0000)]
Bring another softupdates fix in from FreeBSD, FreeBSD commit message:
 Retain generation count when writing zeroes instead of an inode to disk.

 Don't free a struct inodedep if another process is allocating saved inode
 memory for the same struct inodedep in initiate_write_inodeblock_ufs[12]().

 Handle disappearing dependencies in softdep_disk_io_initiation().

Taken-from: FreeBSD/1.184
Author: tegge

18 years agoFreeBSD commit message:
Matthew Dillon [Fri, 14 Oct 2005 21:04:13 +0000 (21:04 +0000)]
FreeBSD commit message:
 After a rmdir()ed directory has been truncated, force an update of
 the directory's inode after queuing the dirrem that will decrement
 the parent directory's link count.  This will force the update of
 the parent directory's actual link to actually be scheduled.  Without
 this change the parent directory's actual link count would not be
 updated until ufs_inactive() cleared the inode of the newly removed
 directory, which might be deferred indefinitely.  ufs_inactive()
 will not be called as long as any process holds a reference to the
 removed directory, and ufs_inactive() will not clear the inode if
 the link count is non-zero, which could be the result of an earlier
 system crash.

 This change has the fortunate side effect of more quickly cleaning
 up the large number dirrem structures that linger for an extended
 time after the removal of a large directory tree.  It also fixes a
 potential problem with the shutdown of the syncer thread timing out
 if the system is rebooted immediately after removing a large directory
 tree.

Taken-from: FreeBSD/1.185
Submitted-by: tegge
18 years ago* Remove the old hardclock documentation and add information about
Sascha Wildner [Thu, 13 Oct 2005 11:05:10 +0000 (11:05 +0000)]
* Remove the old hardclock documentation and add information about
  the kern.polling.pollhz sysctl variable.

* Add nv(4) and wi(4) to the list of devices that support polling.

Submitted-by: sephe
18 years agoDocument the "polling" and "-polling" parameters.
Sascha Wildner [Thu, 13 Oct 2005 10:57:50 +0000 (10:57 +0000)]
Document the "polling" and "-polling" parameters.

Submitted-by: sephe
18 years agoANSIfy
Sepherosa Ziehau [Thu, 13 Oct 2005 10:22:07 +0000 (10:22 +0000)]
ANSIfy

Submitted-by: Matthias Schmidt <schmidtm at mathematik.uni-marburg.de>
18 years agounbreak LINT building
Sepherosa Ziehau [Thu, 13 Oct 2005 08:50:33 +0000 (08:50 +0000)]
unbreak LINT building

18 years agounbreak GENERIC building
Sepherosa Ziehau [Thu, 13 Oct 2005 08:10:18 +0000 (08:10 +0000)]
unbreak GENERIC building

18 years agoFix a bad panic check from the last commit in register_randintr().
Matthew Dillon [Thu, 13 Oct 2005 06:13:24 +0000 (06:13 +0000)]
Fix a bad panic check from the last commit in register_randintr().

Reported-by: Peter Avalos <pavalos@theshell.com>
18 years agoMove the polling systimer initialization code out of kern_clock.c and into
Matthew Dillon [Thu, 13 Oct 2005 00:45:36 +0000 (00:45 +0000)]
Move the polling systimer initialization code out of kern_clock.c and into
kern_poll.c.

Program the polling systimer to 1hz while polling is disabled, to reduce
cpu waste.  Change the default polling frequency to 2000hz.

18 years agoFix a bug where fsetfd() was not returning an error when it failed,
Matthew Dillon [Thu, 13 Oct 2005 00:06:28 +0000 (00:06 +0000)]
Fix a bug where fsetfd() was not returning an error when it failed,
resulting in a panic.

Reported-by: Peter Avalos <pavalos@theshell.com>
18 years agoUse sysctl's instead of KVM to access the interrupt name and count list.
Matthew Dillon [Thu, 13 Oct 2005 00:04:48 +0000 (00:04 +0000)]
Use sysctl's instead of KVM to access the interrupt name and count list.

18 years agoMajor cleanup of the interrupt registration subsystem.
Matthew Dillon [Thu, 13 Oct 2005 00:02:48 +0000 (00:02 +0000)]
Major cleanup of the interrupt registration subsystem.

* Collapse the separate registrations in the kernel interrupt thread and
  i386 layers into a single machine-independant kernel interrupt thread layer
  in kern/kern_intr.c.  Get rid of the i386 layer's 'MUX' code entirely.

* Have the interrupt vector assembly code (icu_vector.s and apic_vector.s)
  call a machine-independant function in the kernel interrupt thread
  layer to figure out how to process an interrupt.

* Move a lot of assembly into the new C interrupt processing function.

* Add support for INTR_MPSAFE.  If a device driver registers an interrupt
  as being MPSAFE, the Big Giant Lock will not be obtained or required.

* Temporarily just schedule the ithread if a FAST interrupt cannot be executed
  due to its serializer being locked.

* Add LWKT serialization support for a non-blocking 'try' function.

* Get rid of ointhand2_t and adjust all old ISA code to use inthand2_t.

* Supply a frame pointer as a pointer rather then embedding it on th stack.

* Allow FAST and SLOW interrupts to be mixed on the same IRQ, though this
  will not necessarily result in optimal operation.

* Remove direct APIC/ICU vector calls from the apic/icu vector assembly code.
  Everything goes through the new routine in kern/kern_intr.c now.

* Add a new flag, INTR_NOPOLL.  Interrupts registered with the flag will
  not be polled by the upcoming emergency general interrupt polling
  sysctl (e.g. ATA cannot be safely polled due to the way ATA register
  access interferes with ATA DMA).

* Remove most of the distinction in the i386 assembly layers between FAST
  and SLOW interrupts (part 1/2).

* Revamp the interrupt name array returned to userland to list multiple
  drivers associated with the same IRQ.

18 years agoput pthread_timedjoin_np in right order.
David Xu [Wed, 12 Oct 2005 23:53:52 +0000 (23:53 +0000)]
put pthread_timedjoin_np in right order.

18 years agoMove a bunch of per-interrupt-thread variables from static storage to
Matthew Dillon [Wed, 12 Oct 2005 17:39:49 +0000 (17:39 +0000)]
Move a bunch of per-interrupt-thread variables from static storage to
stack storage.

18 years agoRemove the INTR_TYPE_* flags. The interrupt type is no longer used to
Matthew Dillon [Wed, 12 Oct 2005 17:35:56 +0000 (17:35 +0000)]
Remove the INTR_TYPE_* flags.  The interrupt type is no longer used to
figure out which spl*() set an interrupt belongs to, because, well, spl's
no longer exist.

18 years agoSince intr has been setup in the last step of vr_attach(), mii_phy_probe()
Sepherosa Ziehau [Wed, 12 Oct 2005 10:28:02 +0000 (10:28 +0000)]
Since intr has been setup in the last step of vr_attach(), mii_phy_probe()
does not need any protection.

18 years ago- Make device polling use seperate SYSTIMER instead of hardclock
Sepherosa Ziehau [Wed, 12 Oct 2005 05:17:38 +0000 (05:17 +0000)]
- Make device polling use seperate SYSTIMER instead of hardclock
- Add "kern.polling.pollhz" sysctl-node/tunable-variable, which can be used to
  set device polling frequency(1 ~ 20000) on a *running* system

Idea-and-Hint-from: dillon
Review-by: dillon, kernel@, submmit@
Test-with: fxp(4)

18 years agoProperly serialize access in the NV ethernet driver and attempt to fix
Matthew Dillon [Wed, 12 Oct 2005 01:09:31 +0000 (01:09 +0000)]
Properly serialize access in the NV ethernet driver and attempt to fix
another watchdog-on-reinit issue.  I still see occassional watchdog timeouts,
however.

Add polling support, but there is currently no way to disable the interrupt
without also causing the NVidia interrupt callback functions to stop operating
(i.e. it stops doing work when called), so this feature is only really useful
to make the device work in cases where the kernel is unable to properly route
the interrupt.

It might be possible to do an end-run around the problem with a PCI bus
call to mask the interrupt there.

Call pfnClearTxDesc() prior to uninitializing an interface in the hopes
that it cleans out transmit descriptors and makes the callback so we can
deallocate the mbufs (not tested for that yet, but it atleast does not make
things any worse).

GigE NV interfaces should now negotiate for GigE speeds with the changes
made in the generic MII code.

18 years agoAttempt to add generic GigE support to MII. If this creates issues we will
Matthew Dillon [Wed, 12 Oct 2005 00:57:41 +0000 (00:57 +0000)]
Attempt to add generic GigE support to MII.  If this creates issues we will
have to move the GigE nvidia support to its own mii module.

18 years agoAdd forgotten temporary bandaid until ps knows about lwps.
Simon Schubert [Tue, 11 Oct 2005 22:10:22 +0000 (22:10 +0000)]
Add forgotten temporary bandaid until ps knows about lwps.

Noticed-by: John Leimon
18 years agoAdd missing crit_exit(). If VR fails to attach the system will assert
Matthew Dillon [Tue, 11 Oct 2005 18:23:17 +0000 (18:23 +0000)]
Add missing crit_exit().  If VR fails to attach the system will assert
that the critical section count is incorrect at the end of the boot sequence.

Reported-by: John Leimon
18 years agoFix brain-o.
Simon Schubert [Tue, 11 Oct 2005 13:31:05 +0000 (13:31 +0000)]
Fix brain-o.

Noticed-by: Alexey Slynko, swildner
18 years ago1:1 Userland threading stage 2.8/4:
Simon Schubert [Tue, 11 Oct 2005 09:59:56 +0000 (09:59 +0000)]
1:1 Userland threading stage 2.8/4:

Switch the userland scheduler to use lwps instead of procs.

18 years agoIntroduce pthread_timedjoin_np.
David Xu [Mon, 10 Oct 2005 13:53:57 +0000 (13:53 +0000)]
Introduce pthread_timedjoin_np.

18 years agoIntroduce pthread_timedjoin_np().
David Xu [Mon, 10 Oct 2005 13:46:53 +0000 (13:46 +0000)]
Introduce pthread_timedjoin_np().

18 years agoReplace THR_FLAGS_SUSPENDED with THR_FLAGS_NEED_SUSPEND, this
David Xu [Mon, 10 Oct 2005 13:45:57 +0000 (13:45 +0000)]
Replace THR_FLAGS_SUSPENDED with THR_FLAGS_NEED_SUSPEND, this
fixes the brokeness of pthread_attr_setcreatedsuspend_np.

18 years ago1:1 Userland threading stage 2.7/4:
Simon Schubert [Sun, 9 Oct 2005 21:38:04 +0000 (21:38 +0000)]
1:1 Userland threading stage 2.7/4:

- Retire p_sysmsgq and p_num_sysmsg and use the equivalents in lwp
- convert trap entry and exit points to use lwps

18 years ago1:1 Userland threading stage 2.6/4:
Simon Schubert [Sun, 9 Oct 2005 20:12:34 +0000 (20:12 +0000)]
1:1 Userland threading stage 2.6/4:

Retire p_upcall compat and use lwp_upcall instead.

18 years agoBump subversion in param.h
Matthew Dillon [Sun, 9 Oct 2005 19:02:09 +0000 (19:02 +0000)]
Bump subversion in param.h

Reminded-by: Sepherosa Ziehau <sepherosa@gmail.com>
18 years ago1:1 Userland threading stage 2.5/4:
Simon Schubert [Sun, 9 Oct 2005 18:07:55 +0000 (18:07 +0000)]
1:1 Userland threading stage 2.5/4:

Remove compatibility p_dupfd and use the per-lwp one.

18 years ago- Check for execvp returning ENOTDIR
Liam J. Foy [Sun, 9 Oct 2005 15:09:02 +0000 (15:09 +0000)]
- Check for execvp returning ENOTDIR

18 years agoCorrectly initialize n_threads.
Simon Schubert [Sun, 9 Oct 2005 14:50:21 +0000 (14:50 +0000)]
Correctly initialize n_threads.

18 years agoGet sources right so that we don't make depend if not needed.
Simon Schubert [Sun, 9 Oct 2005 14:44:04 +0000 (14:44 +0000)]
Get sources right so that we don't make depend if not needed.

18 years agoAdd rue(4) man page.
Sascha Wildner [Sun, 9 Oct 2005 13:29:50 +0000 (13:29 +0000)]
Add rue(4) man page.

Obtained-from: FreeBSD
Requested-by: sephe
18 years agoSync with FreeBSD's rev. 1.12. This works around an mdoc(7) bug which
Sascha Wildner [Sun, 9 Oct 2005 13:18:40 +0000 (13:18 +0000)]
Sync with FreeBSD's rev. 1.12. This works around an mdoc(7) bug which
was recently discussed on bugs@:

http://leaf.dragonflybsd.org/mailarchive/bugs/2005-09/msg00021.html

18 years ago1:1 Userland threading stage 2.4/4:
Simon Schubert [Sat, 8 Oct 2005 19:46:51 +0000 (19:46 +0000)]
1:1 Userland threading stage 2.4/4:

Introduce p_start and use it.  At the moment td_start is zero
for all kernel threads (no change) and processes (changed).  This
field will be filled in a later commit again.

18 years ago1:1 Userland threading stage 2.3/4:
Simon Schubert [Sat, 8 Oct 2005 14:31:26 +0000 (14:31 +0000)]
1:1 Userland threading stage 2.3/4:

Use p_comm instead of p_thread->td_comm.

18 years ago1:1 Userland threading stage 2.2/4:
Simon Schubert [Sat, 8 Oct 2005 12:24:26 +0000 (12:24 +0000)]
1:1 Userland threading stage 2.2/4:

Move profiling and intervall timer data to struct proc.

18 years agoWhitespace cleanup.
Simon Schubert [Sat, 8 Oct 2005 11:43:02 +0000 (11:43 +0000)]
Whitespace cleanup.

18 years agoRegen.
Simon Schubert [Sat, 8 Oct 2005 11:41:44 +0000 (11:41 +0000)]
Regen.

18 years agoAdd linux_nosys which handles non-existing syscalls like linux does:
Simon Schubert [Sat, 8 Oct 2005 11:41:11 +0000 (11:41 +0000)]
Add linux_nosys which handles non-existing syscalls like linux does:
just return ENOSYS instead of sending a signal.

Taken-from: FreeBSD

18 years agoBring in FreeBSD rev 1.123:
Simon Schubert [Sat, 8 Oct 2005 11:34:25 +0000 (11:34 +0000)]
Bring in FreeBSD rev 1.123:
  revision 1.123
  date: 2005-07-19 07:18:23 +0200;  author: delphij;  state: Exp;  lines: +5 -0;
  PLAY_MSF, PLAY_TRACK, PLAY_TRACK_REL, PAUSE, PLAY_12 commands to pass
  through umass(4), in order to make cdcontrol(1) to issue commands to
  a USB CD driver.

  The command IDs were obtained from the CAM subsystem.  This was tested
  on half dozen of USB CD drivers from different vendors.

  Suggested by: "intron" <intron at intron dot ac>
  PR: usb/83439
  Reviewed by: sanpei
  MFC After: 1 week

Submitted-by: Xin Li <delphij@freebsd.org>
18 years agoPrint what we are doing when running make cleandir.
Simon Schubert [Sat, 8 Oct 2005 11:31:29 +0000 (11:31 +0000)]
Print what we are doing when running make cleandir.

18 years agoAdd sources to generated files.
Simon Schubert [Sat, 8 Oct 2005 11:30:45 +0000 (11:30 +0000)]
Add sources to generated files.

18 years agoRemove erroneous MLINKS. These are handled elsewhere (better even).
Simon Schubert [Sat, 8 Oct 2005 11:29:20 +0000 (11:29 +0000)]
Remove erroneous MLINKS.  These are handled elsewhere (better even).

18 years agoAdd -O option: Ignore non-files when recursing.
Simon Schubert [Sat, 8 Oct 2005 11:28:23 +0000 (11:28 +0000)]
Add -O option: Ignore non-files when recursing.

18 years agoEnable emacs line editing by default.
Simon Schubert [Sat, 8 Oct 2005 11:24:43 +0000 (11:24 +0000)]
Enable emacs line editing by default.

18 years agoClean up old yacc syntax
Simon Schubert [Sat, 8 Oct 2005 11:23:28 +0000 (11:23 +0000)]
Clean up old yacc syntax

18 years agoAlias NO_CLEAN with NOCLEAN. I just get bitten by this every second build.
Simon Schubert [Sat, 8 Oct 2005 10:50:53 +0000 (10:50 +0000)]
Alias NO_CLEAN with NOCLEAN.  I just get bitten by this every second build.

18 years ago- Don't build PIC in btools
Simon Schubert [Sat, 8 Oct 2005 10:47:36 +0000 (10:47 +0000)]
- Don't build PIC in btools
- Build statically linked crosstools
- Remove sysinstall

18 years ago* Fix width in begin list (.Bl) macro.
Sascha Wildner [Sat, 8 Oct 2005 10:00:10 +0000 (10:00 +0000)]
* Fix width in begin list (.Bl) macro.

* Correct buildworld description.

* Add documentation for the quickworld, realquickworld, crossworld,
  nativekernel, quickkernel, kernel, preupgrade and upgrade targets.

* Remove obsolete documentation for the aout-to-elf, aout-to-elf-build,
  aout-to-elf-install and move-aout-libs targets.

* Remove cross-compiling examples for PC98 and Alpha. Comment out
  two sentences that can go back in when we support different
  architectures.

* Refer to /etc/defaults/make.conf instead of
  /usr/share/examples/etc/defaults/make.conf.

* Remove reference to mergemaster(8).

* Bump date.

Add some changes from FreeBSD's build.7:

* Add reference to config(8).

* Miscellaneous mdoc cleanup.

18 years ago1:1 Userland threading stage 2.1/4:
Simon Schubert [Fri, 7 Oct 2005 21:55:15 +0000 (21:55 +0000)]
1:1 Userland threading stage 2.1/4:

Convert functions to use struct lwp instead struct proc.

18 years agoRemove MAKE_EBONES, convert MAKE_KERBEROS to WANT_KERBEROS.
Simon Schubert [Thu, 6 Oct 2005 22:40:16 +0000 (22:40 +0000)]
Remove MAKE_EBONES, convert MAKE_KERBEROS to WANT_KERBEROS.

18 years agoDisable lwp_flag and lwp_stat for now so that it doesn't get
Simon Schubert [Thu, 6 Oct 2005 20:01:29 +0000 (20:01 +0000)]
Disable lwp_flag and lwp_stat for now so that it doesn't get
used erroneously.  We need to split flags and stats between proc and lwp
at a later stage.

18 years agoSet up correct lpw->proc linkage
Simon Schubert [Thu, 6 Oct 2005 11:04:37 +0000 (11:04 +0000)]
Set up correct lpw->proc linkage

18 years agoUserland 1:1 threading changes step 1/4+:
Simon Schubert [Wed, 5 Oct 2005 21:53:41 +0000 (21:53 +0000)]
Userland 1:1 threading changes step 1/4+:

o Move thread-local members from struct proc into new struct lwp.

o Add a LIST_HEAD(lwp) p_lwps to struct proc.  This links a proc
  with its lwps.

o Add a td_lwp member to struct thread which links a thread to its lwp,
  if it exists.  This won't replace td_proc completely to save indirections.

o For now embed one struct lwp into struct proc and set up preprocessor
  linkage so that semantics don't change for the rest of the kernel.
  Once all consumers are converted to take a struct lwp instead of a struct
  proc, this will go away.

Reviewed-by: dillon, davidxu
18 years agoUpdate subvers to 7 so we can sync up the Preview tag prior to Simon
Matthew Dillon [Wed, 5 Oct 2005 19:42:02 +0000 (19:42 +0000)]
Update subvers to 7 so we can sync up the Preview tag prior to Simon
starting to work on and commit LWPs (light weight processes), which
will be used to separate the proc structure from per-(user)-thread data
and to implement much better native threading support within the
kernel, which in turn will allow us to continue developing David Xu's
threading library and get proper threading support into DragonFly.

18 years agoEnsure that FP registers are not used for integer code.
Matthew Dillon [Wed, 5 Oct 2005 15:39:46 +0000 (15:39 +0000)]
Ensure that FP registers are not used for integer code.

Submitted-by: "Thomas E. Spanjaard" <tgen@netphreax.net>
Taken-from: FreeBSD

18 years agoAllow the target safety check to be overridden. May be necessary in certain
Matthew Dillon [Wed, 5 Oct 2005 15:38:41 +0000 (15:38 +0000)]
Allow the target safety check to be overridden.  May be necessary in certain
situations.

18 years agoChange cvsup collection names. It has been more than 8 months now
Simon Schubert [Tue, 4 Oct 2005 11:12:20 +0000 (11:12 +0000)]
Change cvsup collection names.  It has been more than 8 months now
since we changed to the "dragonfly-" prefix.

18 years agoadd missing bus_dmamap_sync()
Sepherosa Ziehau [Tue, 4 Oct 2005 02:06:46 +0000 (02:06 +0000)]
add missing bus_dmamap_sync()

Obtained-from: FreeBSD dev/em/if_em.c rev1.50

18 years ago- In em_encap(), call seralized version of em_82547_move_tail(), since
Sepherosa Ziehau [Sun, 2 Oct 2005 13:19:55 +0000 (13:19 +0000)]
- In em_encap(), call seralized version of em_82547_move_tail(), since
  "serialize" is non-recursive and lwkt_serialize_enter() has been called
  before em_encap() (in em_start_serialized())
- minor style change

18 years agoIf m_defrag() succeeds, the original mbuf has already been freed, so don't
Sepherosa Ziehau [Sun, 2 Oct 2005 10:01:05 +0000 (10:01 +0000)]
If m_defrag() succeeds, the original mbuf has already been freed, so don't
free it again.

Reviewed-by: joerg, dillon
18 years agoMerge from vendor branch GDB:
Simon Schubert [Sat, 1 Oct 2005 12:40:32 +0000 (12:40 +0000)]
Merge from vendor branch GDB:
Bring cross-compiling to amd64 into shape, i.e. make the infrastructure
work as desired.

Parts-taken-from: FreeBSD

18 years agoBring cross-compiling to amd64 into shape, i.e. make the infrastructure
Simon Schubert [Sat, 1 Oct 2005 12:40:33 +0000 (12:40 +0000)]
Bring cross-compiling to amd64 into shape, i.e. make the infrastructure
work as desired.

Parts-taken-from: FreeBSD

18 years agoBring cross-compiling to amd64 into shape, i.e. make the infrastructure
Simon Schubert [Sat, 1 Oct 2005 12:40:32 +0000 (12:40 +0000)]
Bring cross-compiling to amd64 into shape, i.e. make the infrastructure
work as desired.

Parts-taken-from: FreeBSD

18 years ago- make declaration of ed_get_packet(), ed_ring_copy(), ed_hpp_readmem() and
Sepherosa Ziehau [Sat, 1 Oct 2005 06:36:11 +0000 (06:36 +0000)]
- make declaration of ed_get_packet(), ed_ring_copy(), ed_hpp_readmem() and
  ed_hpp_writemem() consistent with their definition
- remove unused stack variable `sc' in ed_isa_probe()
- ANSIfy

Submitted-by: Matthias Schmidt <schmidtm at mathematik.uni-marburg.de>
- use u_short and u_char instead of "unsigned {short, char}"

18 years agoImplement sysctls to restrict a user's ability to hardlink files owned by
Matthew Dillon [Thu, 29 Sep 2005 20:59:30 +0000 (20:59 +0000)]
Implement sysctls to restrict a user's ability to hardlink files owned by
other users or groups.  These sysctls are in addition to checks already made
(that the user must also be able to write to the file via user, group,
or world perms).

kern.hardlink_check_uid If set the user must own the file to
be able to create a hardlink, or be root.

kern.hardlink_check_gid If set the user must either own the file
or be a member of the same group as the
file, or be root.

Setting both flags is equivalent to just
setting the uid flag.

Taken from FreeBSD with slightly different semantics for hardlink_check_gid.
In DragonFly, if hardlink_check_gid is set, the file can still be hardlinked
if the user is not a member of the file's group if the user owns the file.
non-group membership is quite common due to group inheritance from the
parent directory when a file or directory is created by the user and
disallowing the case would make hardlink_check_gid non-useful.

Submitted-by: Matthias Schmidt <schmidtm@mathematik.uni-marburg.de>
18 years agoAdd a sysctl, kern.unprivileged_read_msgbuf (defaults to enabled) which if
Matthew Dillon [Thu, 29 Sep 2005 20:43:56 +0000 (20:43 +0000)]
Add a sysctl, kern.unprivileged_read_msgbuf (defaults to enabled) which if
set to 0 will only allow the root or wheel group to access the kernel message
log.

Submitted-by: Matthias Schmidt <schmidtm@mathematik.uni-marburg.de>
With-modifications-by: Matthew Dillon
Taken-from: FreeBSD/subr_prf.c/1.74

18 years agoDo not attempt to modify read-only-mounted filesystems in ufs_inactive().
Matthew Dillon [Thu, 29 Sep 2005 20:20:59 +0000 (20:20 +0000)]
Do not attempt to modify read-only-mounted filesystems in ufs_inactive().
Normally an i_nlink count <= 0 indicates that the inode should be truncated
and destroyed, but such cases can also occur on read-only mounts of corrupted
filesystems.

Submitted-by: Xin LI <delphij@frontfree.net>
18 years agoFor bge(4), dc(4), lge(4), ndis(4), nge(4), pcn(4), re(4), sis(4), sk(4), ti(4)
Sepherosa Ziehau [Thu, 29 Sep 2005 12:52:51 +0000 (12:52 +0000)]
For bge(4), dc(4), lge(4), ndis(4), nge(4), pcn(4), re(4), sis(4), sk(4), ti(4)
- Do not start tx engine or set if_timer, if there is nothing to be sent
- Let if_watchdog() kick if_start().  This may avoid a possible race (in the
  future) between testing/setting if_timer and calling if_watchdog().  Only
  bge(4), re(4), sk(4) and ti(4) require this change.  The rest drivers
  affected by this commit already have this in place.

Discussed-with: joerg
Reviewed-by: joerg
18 years agoFix breakage introduced: When bootstrapping from -RELEASE we don't
Simon Schubert [Tue, 27 Sep 2005 22:35:51 +0000 (22:35 +0000)]
Fix breakage introduced:  When bootstrapping from -RELEASE we don't
have widechar support available.

18 years agoBecause recalculate is only called once or twice for long sleeps,
Matthew Dillon [Tue, 27 Sep 2005 18:03:32 +0000 (18:03 +0000)]
Because recalculate is only called once or twice for long sleeps,
not every second forever while the process is sleeping, we have
to manually call it to resynchronize p_cpbase on wakeup or it
will wrap if the process was sleeping long enough (e.g. ~10 min
with the ACPI timer) and really mess up the nticks calculation.

The bug could very rarely result in an integer divide by 0 crash.

Reported-by: David Rhodus
18 years agoIn xl_list_tx_init_90xB()
Sepherosa Ziehau [Tue, 27 Sep 2005 03:12:55 +0000 (03:12 +0000)]
In xl_list_tx_init_90xB()
- Don't call bzero(), xl_stop() has done it
- Minor style changes

18 years ago- Factor out xl_dma_alloc() from xl_attach()
Sepherosa Ziehau [Tue, 27 Sep 2005 02:41:29 +0000 (02:41 +0000)]
- Factor out xl_dma_alloc() from xl_attach()
- Factor out xl_dma_free() from xl_detach()
- Allocate and deallocate RX/TX descriptor DMA map during device's attaching
  and detaching (i.e. in xl_dma_{alloc, free}()), instead of in xl_stop() and
  xl_list_{rx, tx}_init*().  This brings us:
  1) xl_init()'s failure chance is reduced
  2) In the original code, xl_stop() would destroy TX descriptor DMA map if
     xl_chain.xl_mbuf != NULL, but normally TX descriptor's xl_chain.xl_mbuf
     *is* NULL.  So "ifconfig xl0 down; ifconfig xl0 up" or xl_detach()
     promised TX descriptor DMA map leakage, which is fixed now
- After the above change, xl_list_tx_init*() will not fail, so do not return
  `int' from them.  Adjust their caller accordingly
- Add comment for xl_chain.xl_prev
- Minor style changes

18 years agosetup UpPoll register before installing RX list pointer
Sepherosa Ziehau [Mon, 26 Sep 2005 06:25:10 +0000 (06:25 +0000)]
setup UpPoll register before installing RX list pointer

18 years agocppinternals.texi includes generated gcc-common.texi in .OBJDIR.
YONETANI Tomokazu [Mon, 26 Sep 2005 03:01:46 +0000 (03:01 +0000)]
cppinternals.texi includes generated gcc-common.texi in .OBJDIR.
Let make know it and fix occasional build failure for -jN(N > 1) case.

18 years agogetchar() is void in its prototype.
Jeroen Ruigrok/asmodai [Sun, 25 Sep 2005 20:49:55 +0000 (20:49 +0000)]
getchar() is void in its prototype.

18 years agoAdd iwi (fixes building of LINT).
Sascha Wildner [Sun, 25 Sep 2005 16:05:36 +0000 (16:05 +0000)]
Add iwi (fixes building of LINT).

18 years agoRework Makefile logic so that it actually does what it should.
Simon Schubert [Sun, 25 Sep 2005 15:30:26 +0000 (15:30 +0000)]
Rework Makefile logic so that it actually does what it should.

While here partially sync amd64 with i386.

18 years agoRemove bin/ls from the bootstrap-tools.
Jeroen Ruigrok/asmodai [Sun, 25 Sep 2005 13:07:24 +0000 (13:07 +0000)]
Remove bin/ls from the bootstrap-tools.

18 years agoGet rid of ls and use basic sh/echo constructs.
Jeroen Ruigrok/asmodai [Sun, 25 Sep 2005 13:06:49 +0000 (13:06 +0000)]
Get rid of ls and use basic sh/echo constructs.

18 years agoReplace use of ls with echo and tr.
Jeroen Ruigrok/asmodai [Sun, 25 Sep 2005 12:52:44 +0000 (12:52 +0000)]
Replace use of ls with echo and tr.

18 years agoUse echo instead of ls to test for files, change test logic slightly for
Jeroen Ruigrok/asmodai [Sun, 25 Sep 2005 12:48:46 +0000 (12:48 +0000)]
Use echo instead of ls to test for files, change test logic slightly for
this.

18 years agoAdd usr.bin/stat to bootstrap-tools:
Jeroen Ruigrok/asmodai [Sun, 25 Sep 2005 12:43:58 +0000 (12:43 +0000)]
Add usr.bin/stat to bootstrap-tools:
Make boot2 use stat for getting the filesize instead of ls.

18 years agoReplace FreeBSD mailing list aliases with appropriate ones for some
Sascha Wildner [Sun, 25 Sep 2005 06:09:07 +0000 (06:09 +0000)]
Replace FreeBSD mailing list aliases with appropriate ones for some
DragonFly lists.

18 years agoSync with FreeBSD. This enables 'set -o emacs' by default (for command
Sascha Wildner [Sun, 25 Sep 2005 06:04:52 +0000 (06:04 +0000)]
Sync with FreeBSD. This enables 'set -o emacs' by default (for command
line editing).

18 years ago- in xl_attach(), print xl card type ("90X"/"90XB"), if verbose booting is
Sepherosa Ziehau [Sun, 25 Sep 2005 05:33:32 +0000 (05:33 +0000)]
- in xl_attach(), print xl card type ("90X"/"90XB"), if verbose booting is
  enabled
- in xl_start() and xl_start_90xB(), do BUS_DMASYNC_PREWRITE after *all* of
  the CPU memory updating is finished
- use UpPoll feature for XL_TYPE_905B typed card.  this can eliminate device
  register accessing during xl_rxeof() thus improving recv performance(*) with
  less CPU overhead
Inspired-by: FreeBSD pci/if_xl.c rev1.58's commit log
(*)
benchmark setting:
1) sephe:xl0 (dev-1.3.6 Sep.24) <----> sephe-test:vr0 (dev-1.3.6 Sep.24)
2) except for the different xl driver, rest part of the kernel running on
   sephe is same
3) xl0 is a <3Com 3c905C-TX Fast Etherlink XL> card, XL_TYPE_905B typed
4) netperf is executed with only "-H <host> -p <port> -t <test type>"

benchmark result:
1) run netperf from sephe-test:vr0
   17.0% (41.30[new xl]/35.28[old xl]) performance boost is observed for
   "TCP STREAM TEST"
2) run netperf from sephe:xl0
   13.6% (7405.79[new xl]/6518.39[old xl]) performance boost is observed for
   "TCP REQUEST/RESPONSE TEST"
3) minor performance boosts are observed in the rest of netperf "TEST"s

# Thank Bill Paul for that detailed commit log

18 years ago* Document the {build,install}world targets instead of just world.
Sascha Wildner [Sun, 25 Sep 2005 04:49:39 +0000 (04:49 +0000)]
* Document the {build,install}world targets instead of just world.

* Add reference to build(7).

* Add references to the DragonFly handbook.