dragonfly.git
14 years agoMerge branch 'vendor/TCPDUMP'
Peter Avalos [Sat, 4 Jul 2009 21:45:21 +0000 (11:45 -1000)]
Merge branch 'vendor/TCPDUMP'

14 years agoMerge branch 'vendor/TCPDUMP' (early part)
Peter Avalos [Sat, 4 Jul 2009 21:44:53 +0000 (11:44 -1000)]
Merge branch 'vendor/TCPDUMP' (early part)

14 years agoMove tcpdump-3.9/ to tcpdump/. No need for a versioned dir.
Peter Avalos [Sat, 4 Jul 2009 21:36:18 +0000 (11:36 -1000)]
Move tcpdump-3.9/ to tcpdump/.  No need for a versioned dir.

14 years agoRemove old versions of tcpdump.
Peter Avalos [Sat, 4 Jul 2009 21:35:49 +0000 (11:35 -1000)]
Remove old versions of tcpdump.

14 years agoMerge branch 'vendor/LIBPCAP'
Peter Avalos [Sat, 4 Jul 2009 21:26:17 +0000 (11:26 -1000)]
Merge branch 'vendor/LIBPCAP'

14 years agoMerge branch 'vendor/LIBPCAP' (early part)
Peter Avalos [Sat, 4 Jul 2009 21:05:10 +0000 (11:05 -1000)]
Merge branch 'vendor/LIBPCAP' (early part)

14 years agoMove libpcap-0.9/ to libpcap. No need to version the directory.
Peter Avalos [Sat, 4 Jul 2009 20:18:39 +0000 (10:18 -1000)]
Move libpcap-0.9/ to libpcap.  No need to version the directory.

14 years agoRemove old versions of libpcap.
Peter Avalos [Sat, 4 Jul 2009 20:17:05 +0000 (10:17 -1000)]
Remove old versions of libpcap.

14 years agofrevoke - More fixes to fdfree()
Matthew Dillon [Fri, 3 Jul 2009 17:48:26 +0000 (10:48 -0700)]
frevoke - More fixes to fdfree()

* Don't replace p->p_fd until after all closef()'s have been called.  Fixed
  panic in kqueue's close function.

* Move softrefs check to after the closef point, but before we actually
  start kfree()ing the structures.  Lock the closef's normally since
  p->p_fd is still valid.

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Fri, 3 Jul 2009 16:44:28 +0000 (09:44 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoHAMMER - Formalize the maximum number of volumes (256).
Matthew Dillon [Fri, 3 Jul 2009 16:43:11 +0000 (09:43 -0700)]
HAMMER - Formalize the maximum number of volumes (256).

Formalize the maximum number of volumes (256) by adding a define in
hammer_disk.h and then using it.

Submitted-by: Antonio Huete Jimenez <ahuete.devel@gmail.com>
14 years agoAdd a wrapper script to allow "foreign" compilers into our build system.
Sascha Wildner [Fri, 3 Jul 2009 12:03:54 +0000 (14:03 +0200)]
Add a wrapper script to allow "foreign" compilers into our build system.

With this commit, all CCVER values not associated with a compiler in
base will be relegated to the wrapper script which then (in conjunction
with the compilers.conf file) determines which non-base compiler to
use.

So far, defaults for clang (built from SVN) and pkgsrc/wip/gcc44 are
provided.

For more info see the compilers.conf(5) manual page and my mail on
kernel@:

http://leaf.dragonflybsd.org/mailarchive/kernel/2009-06/msg00013.html

14 years agohammer.sh: Sync with some of the recent installer changes.
Sascha Wildner [Fri, 3 Jul 2009 00:22:44 +0000 (02:22 +0200)]
hammer.sh: Sync with some of the recent installer changes.

* Use disklabel64(8).

* Do the 'chflags nohistory ...' after the cpdups to not have cpdup
  overwrite the flags again.

14 years agoinstaller: Use disklabel64 for the UFS only install, too.
Sascha Wildner [Thu, 2 Jul 2009 23:45:16 +0000 (01:45 +0200)]
installer: Use disklabel64 for the UFS only install, too.

Discussed-with: dillon, corecode

14 years agoinstaller: Move the 'chflags nohistory ...' commands behind the cpdups.
Sascha Wildner [Thu, 2 Jul 2009 21:52:49 +0000 (23:52 +0200)]
installer: Move the 'chflags nohistory ...' commands behind the cpdups.

This works around the issue that cpdup resets the flags if changed
before.

Reported-by: corecode
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1259>

14 years agofile descriptor enumeration - Fix races
Matthew Dillon [Thu, 2 Jul 2009 19:02:17 +0000 (12:02 -0700)]
file descriptor enumeration - Fix races

Add a soft refrence count, fd_softrefs, to struct filedesc.  This is
used to prevent the filedesc from being ripped out from under a file
descriptor scan via the allproc scan, which is used to enumerate
file descriptors and also used by the revoke code.

Reported-by: hasso
14 years agoSILI - Fix embarassing bug for non-NCQ disk accesses > 128G
Matthew Dillon [Thu, 2 Jul 2009 02:48:22 +0000 (19:48 -0700)]
SILI - Fix embarassing bug for non-NCQ disk accesses > 128G

Fix an embarassing bug for non-NCQ disk accesses > 128G.  This only
applied to non-NCQ accesses for disks and typically will not happen
with the SILI part since it can use NCQ for everything.  Non-NCQ
accesses for seek positions from 128G to 2TB were wrapping the LBA.

14 years agoAHCI - Fix embarassing bug for non-NCQ disk accesses > 128G
Matthew Dillon [Thu, 2 Jul 2009 02:46:50 +0000 (19:46 -0700)]
AHCI - Fix embarassing bug for non-NCQ disk accesses > 128G

Fix an embarassing bug for non-NCQ disk accesses > 128G.  This only
applied to non-NCQ accesses for disks which effectively means disks
behind a PM, since NCQ is generally used everywhere else.  Accesses
for seek positions from 128G to 2TB were wrapping the LBA.

14 years agosem_init.3: Some little mdoc cleanup.
Sascha Wildner [Wed, 1 Jul 2009 22:09:30 +0000 (00:09 +0200)]
sem_init.3: Some little mdoc cleanup.

14 years agoinstaller: Fix debugging function call.
Sascha Wildner [Wed, 1 Jul 2009 21:59:35 +0000 (23:59 +0200)]
installer: Fix debugging function call.

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Wed, 1 Jul 2009 17:46:06 +0000 (10:46 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoSILI - ATAPI adjustments.
Matthew Dillon [Wed, 1 Jul 2009 17:45:23 +0000 (10:45 -0700)]
SILI - ATAPI adjustments.

Restrict the sense length to what ATAPI expects and add more legacy
initialization to the packet FIS.

This was an attempt to fix some reported issues with ATAPI, but it didn't
fix anything.  However, it didn't hurt either and the adjustments are at
least as good as the old ones.

14 years agoAHCI - ATAPI adjustments.
Matthew Dillon [Wed, 1 Jul 2009 17:43:15 +0000 (10:43 -0700)]
AHCI - ATAPI adjustments.

Restrict the sense length to what ATAPI expects and add more legacy
initialization to the packet FIS.

This was an attempt to fix some reported issues with ATAPI, but it didn't
fix anything.  However, it didn't hurt either and the adjustments are at
least as good as the old ones.

14 years agoAHCI - Move some intel-specific magic writes to intel-specific code.
Matthew Dillon [Wed, 1 Jul 2009 17:36:05 +0000 (10:36 -0700)]
AHCI - Move some intel-specific magic writes to intel-specific code.

It is unclear if these are needed at all but in any case they only apply
to certain Intel chipsets anyway.

14 years agopcidevs - Add entries for Intel ICH6 and ICH7 series chipsets.
Matthew Dillon [Wed, 1 Jul 2009 17:34:05 +0000 (10:34 -0700)]
pcidevs - Add entries for Intel ICH6 and ICH7 series chipsets.

14 years agoRegenerate the pciconf(8) database
Sascha Wildner [Wed, 1 Jul 2009 10:51:44 +0000 (12:51 +0200)]
Regenerate the pciconf(8) database

...from the following files:

Hart:    Jan 22, 2008 (version 671)
Boemler: Jul  1, 2009
Mares:   Jun  2, 2009

14 years agoHAMMER VFS - Make the same changes to statfs() that were made to statvfs().
Matthew Dillon [Tue, 30 Jun 2009 22:04:34 +0000 (15:04 -0700)]
HAMMER VFS - Make the same changes to statfs() that were made to statvfs().

14 years agoUpdate the sem_init(3) manpage - with additional info on the pshared impl.
Matthew Dillon [Tue, 30 Jun 2009 19:04:40 +0000 (12:04 -0700)]
Update the sem_init(3) manpage - with additional info on the pshared impl.

Suggested-by: Hasso Tepper <hasso@crater.dragonflybsd.org>
14 years agoUpdate the sem_init(3) manpage - shared semaphores are supported now.
Hasso Tepper [Tue, 30 Jun 2009 06:43:03 +0000 (09:43 +0300)]
Update the sem_init(3) manpage - shared semaphores are supported now.

It might need some more info about how shared semaphores are implemented
etc though.

14 years agolibthread_xu - implement pshared for sem_init
Matthew Dillon [Mon, 29 Jun 2009 22:38:53 +0000 (15:38 -0700)]
libthread_xu - implement pshared for sem_init

Implement the pshared flag, creating a semaphore in shared memory
that works across fork().  No additional kernel support is needed,
our umtx* system calls work on the underlying physical memory and
thus work just fine with shared memory.

sem_alloc() uses mmap() to allocate a page of shared memory.
Currently sem_destroy() does not recover the allocated memory for
shared semaphores as it is unclear how one is supposed to do so
in a fork()ed environment.

Requested-by: Hasso Tepper <hasso@estpak.ee>
14 years agoAHCI/SILI - Do manual chipid check to PMs with fake ports
Matthew Dillon [Mon, 29 Jun 2009 15:07:58 +0000 (08:07 -0700)]
AHCI/SILI - Do manual chipid check to PMs with fake ports

* Add a switch() on the chipid for PMs which add a fake port at the
  end and avoid probing the fake port.  Probing the port is harmless and
  typically fails in the softreset sequence, but takes time.

14 years agoinstaller: Add UFS /boot & HAMMER ROOT support.
Sascha Wildner [Sun, 28 Jun 2009 20:09:58 +0000 (22:09 +0200)]
installer: Add UFS /boot & HAMMER ROOT support.

The installer's HAMMER install option does now recommend (and require)
a UFS /boot partition.

Also, check more explicitly for the user specifying /usr, /var, etc.
and refuse to continue if he did because these will be automatically
created as pseudo fs's.

Finally, while here, do some miscellaneous cleanup.

In-discussion-with: dillon

14 years agoinstaller: Raise the absolute minimum disk size to 2GB.
Sascha Wildner [Sat, 27 Jun 2009 17:31:54 +0000 (19:31 +0200)]
installer: Raise the absolute minimum disk size to 2GB.

Also adjust some minimum partition sizes and size suggestions.

While here, eliminate some dead code.

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sun, 28 Jun 2009 18:56:01 +0000 (11:56 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoHAMMER VFS - Export highest supported production version with sysctl.
Matthew Dillon [Sun, 28 Jun 2009 18:55:25 +0000 (11:55 -0700)]
HAMMER VFS - Export highest supported production version with sysctl.

* Implement vfs.hammer.support_version to return the highest supported
  HAMMER FS version to userland.  Used by newfs_hammer.

14 years agoHAMMER - newfs_hammer - format with highest production version available
Matthew Dillon [Sun, 28 Jun 2009 18:53:45 +0000 (11:53 -0700)]
HAMMER - newfs_hammer - format with highest production version available

* newfs_hammer now probes the HAMMER VFS and uses the highest production
  version supported to format the HAMMER filesystem.

14 years agoHAMMER UTIL - show command now includes inode capability field.
Matthew Dillon [Sun, 28 Jun 2009 18:49:54 +0000 (11:49 -0700)]
HAMMER UTIL - show command now includes inode capability field.

14 years agoHAMMER VFS - Fix umount panic on buffer flush race
Matthew Dillon [Sun, 28 Jun 2009 18:21:27 +0000 (11:21 -0700)]
HAMMER VFS - Fix umount panic on buffer flush race

* Set io.waitdep on buffers during umount to ensure that the buffer
  unload code waits for running buffers to complete their operation.

  This fixes occassional assertion panics on umount.

14 years agoHAMMER VFS - version 2 work - move directory entries to inode localization
Matthew Dillon [Sun, 28 Jun 2009 17:23:23 +0000 (10:23 -0700)]
HAMMER VFS - version 2 work - move directory entries to inode localization

* Set version 2 features.  Directories created in a version 2 HAMMER
  filesystem place their directory entries in the B-Tree's inode localization
  space instead of the general space.  Pre-existing directories continue
  to use the old scheme.

* Amost doubles directory lookup / find / ls performance in effected
  directories.  However, at the moment the B-Tree must be reblocked before
  the gains are seen.

14 years agopthread_attr.3: Document pthread_attr_{get,set}_guardsize().
Stathis Kamperis [Sun, 28 Jun 2009 12:04:53 +0000 (15:04 +0300)]
pthread_attr.3: Document pthread_attr_{get,set}_guardsize().

Adapted-from: FreeBSD

14 years agoMerge branch 'vendor/LIBARCHIVE'
Peter Avalos [Sat, 27 Jun 2009 21:34:06 +0000 (11:34 -1000)]
Merge branch 'vendor/LIBARCHIVE'

14 years agoUpgrade to libarchive-2.7.0. vendor/LIBARCHIVE
Peter Avalos [Wed, 24 Jun 2009 21:29:09 +0000 (11:29 -1000)]
Upgrade to libarchive-2.7.0.

14 years agoMP table: Test 0xe0000 when searching MP float pointer structure
Sepherosa Ziehau [Sat, 27 Jun 2009 13:36:37 +0000 (21:36 +0800)]
MP table: Test 0xe0000 when searching MP float pointer structure

MultiProcessor Specification version 1.4 never mentions this location,
however, some brain-dead BIOSes put MP table there ...  "Extened BIOS"
location is taken from mptable(8) in the base system.

Reported-and-Tested-by: ruse39 on EFnet #dragonflybsd
14 years agoIO APIC: Mask the interrupt signal before trying to clear IRR by switching
Sepherosa Ziehau [Sat, 27 Jun 2009 10:09:51 +0000 (18:09 +0800)]
IO APIC: Mask the interrupt signal before trying to clear IRR by switching
trigger mode.

14 years agoudp6 - Fix multicast and other issues
Matthew Dillon [Sat, 27 Jun 2009 05:07:45 +0000 (22:07 -0700)]
udp6 - Fix multicast and other issues

* The placemarker flag was being tested inverse to what it was supposed
  to be tested with.

Submitted-by: Kyle Butt <kylebutt@gmail.com>
14 years agoACPI MADT: Don't use the "Initial APIC ID" in cpu_procinfo(cpuid.1)
Sepherosa Ziehau [Sat, 27 Jun 2009 03:05:19 +0000 (11:05 +0800)]
ACPI MADT: Don't use the "Initial APIC ID" in cpu_procinfo(cpuid.1)

Some BIOSes seem to reprogram LAPIC ID to a value different from
what's in cpu_procinfo.

14 years agoIntroduce lapic enumerators, which is used to probe and config lapics
Sepherosa Ziehau [Sat, 27 Jun 2009 01:36:42 +0000 (09:36 +0800)]
Introduce lapic enumerators, which is used to probe and config lapics

lapic enumerator implementation should provide two method:
lapic_probe()     -- make sure that if this enumerator is selected, later
                     lapic enumeration could work.  Return error code upon
                     failure.
lapic_enumerate() -- enumerate lapic and properly configure lapic (currently
                     only mapping lapic is needed).

lapic enumerator implementation could be registered by calling:
lapic_enumerator_register()
with lapic_enumerator struct.  The higher the priority field, the earlier
the lapic enumerator's lapic_probe method will be invoked.

Currently two lapic enumerators are implemented and registered:
- lapic enumerator using MP table
- lapic enumerator using ACPI MADT
ACPI MADT lapic enumerator has higher priority.  For testing purpose, ACPI
MADT lapic enumerator's priority could be overridden by setting tunable
hw.madt_lapic_prio to a smaller value (less than 20 currently)

Idea-from: FreeBSD

14 years agoMove lapic_init() into apic/mpapic.c
Sepherosa Ziehau [Mon, 22 Jun 2009 12:18:59 +0000 (20:18 +0800)]
Move lapic_init() into apic/mpapic.c

14 years agoMP probe: Get rid of cpu_apic_address
Sepherosa Ziehau [Mon, 22 Jun 2009 12:05:44 +0000 (20:05 +0800)]
MP probe: Get rid of cpu_apic_address

14 years agonrelease: Sync the LiveDVD kernels with some recent changes.
Sascha Wildner [Fri, 26 Jun 2009 23:48:34 +0000 (01:48 +0200)]
nrelease: Sync the LiveDVD kernels with some recent changes.

14 years agoMake sili(4) compilable into the kernel and add it to GENERIC & LINT.
Sascha Wildner [Fri, 26 Jun 2009 23:41:51 +0000 (01:41 +0200)]
Make sili(4) compilable into the kernel and add it to GENERIC & LINT.

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Fri, 26 Jun 2009 23:19:38 +0000 (16:19 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoAHCI/SILI - Remove unused ScsiTypeArray array
Matthew Dillon [Fri, 26 Jun 2009 23:19:14 +0000 (16:19 -0700)]
AHCI/SILI - Remove unused ScsiTypeArray array

14 years agoSILI - Increase hard -> soft PM target delay to 5 seconds
Matthew Dillon [Fri, 26 Jun 2009 23:16:58 +0000 (16:16 -0700)]
SILI - Increase hard -> soft PM target delay to 5 seconds

* Unfortunately it looks like we have to seriously increase the delay
  between doing a hard reset via the PM to a target and initiating
  the softreset.

  The Silicon Image chip appears to brick the port if its softreset
  collides with the target device.  There is no way to fix it other
  then hard-resetting the port (which causes the PM to reset as well).

14 years agoSILI - Fix assertion panic during error handling.
Matthew Dillon [Fri, 26 Jun 2009 22:31:55 +0000 (15:31 -0700)]
SILI - Fix assertion panic during error handling.

* The error handling code could not distinguish between the use of the
  error ccb as part of a softreset sequence and the use of the error
  ccb as part of a error recovery sequence and asserted in the former
  case.

* Ensure that no commands are active on the port prior to initiating
  a hard reset through the port multiplier.

14 years agoAdd Colemak keyboard layout.
Sascha Wildner [Fri, 26 Jun 2009 21:58:25 +0000 (23:58 +0200)]
Add Colemak keyboard layout.

Submitted-by: Geert Hendrickx <ghen@telenet.be>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1409>

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Fri, 26 Jun 2009 16:48:11 +0000 (09:48 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoSILI - Add the SILI driver to the general module build
Matthew Dillon [Fri, 26 Jun 2009 16:47:56 +0000 (09:47 -0700)]
SILI - Add the SILI driver to the general module build

14 years agoSILI - Add serial number support, strip whitespace.
Matthew Dillon [Fri, 26 Jun 2009 16:47:25 +0000 (09:47 -0700)]
SILI - Add serial number support, strip whitespace.

* Add page inquiry emulation for DISK devices so CAM can probe the
  serial number.

* Strip whitespace when reporting the mode, firmware, and serial number
  from the inquiry data.

14 years agoAHCI - Add serial number support, strip whitespace.
Matthew Dillon [Fri, 26 Jun 2009 16:45:54 +0000 (09:45 -0700)]
AHCI - Add serial number support, strip whitespace.

* Add page inquiry emulation for DISK devices so CAM can probe the
  serial number.

* Strip whitespace when reporting the mode, firmware, and serial number
  from the inquiry data.

14 years agoCAM - Unconditionally print out the serial number
Matthew Dillon [Fri, 26 Jun 2009 16:26:33 +0000 (09:26 -0700)]
CAM - Unconditionally print out the serial number

Do not conditionalize the printing of the serial number on bootverbose any
more.  The serial number is fast becoming an important piece of information.

14 years agoutf2.5: Terminate quotation.
Sascha Wildner [Fri, 26 Jun 2009 06:46:01 +0000 (08:46 +0200)]
utf2.5: Terminate quotation.

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Fri, 26 Jun 2009 03:56:52 +0000 (20:56 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoSILI - Cleanup, remove broken KKASSERT and remove DIAGNOSTICs
Matthew Dillon [Fri, 26 Jun 2009 03:55:50 +0000 (20:55 -0700)]
SILI - Cleanup, remove broken KKASSERT and remove DIAGNOSTICs

Reported-by: Sascha Wildner <swildner@crater.dragonflybsd.org>
14 years agoAHCI - Reduce console spew
Matthew Dillon [Fri, 26 Jun 2009 03:55:07 +0000 (20:55 -0700)]
AHCI - Reduce console spew

14 years agonrelease - img file - use boot0cfg to set packet mode
Matthew Dillon [Fri, 26 Jun 2009 03:53:50 +0000 (20:53 -0700)]
nrelease - img file - use boot0cfg to set packet mode

* Use packet mode by default in the usb key image file's boot blocks.

14 years agoProperly terminate some quotations in several manual pages.
Sascha Wildner [Fri, 26 Jun 2009 01:18:18 +0000 (03:18 +0200)]
Properly terminate some quotations in several manual pages.

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Fri, 26 Jun 2009 01:05:53 +0000 (18:05 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agonrelease - img build - A usb stick will now probe starting at da8
Matthew Dillon [Fri, 26 Jun 2009 01:05:30 +0000 (18:05 -0700)]
nrelease - img build - A usb stick will now probe starting at da8

14 years agorc.conf.5: Document 'fixbootfile'.
Sascha Wildner [Thu, 25 Jun 2009 23:36:47 +0000 (01:36 +0200)]
rc.conf.5: Document 'fixbootfile'.

14 years agolastcomm(1): Sync with FreeBSD's RELENG_6.
Sascha Wildner [Sun, 14 Jun 2009 22:40:51 +0000 (00:40 +0200)]
lastcomm(1): Sync with FreeBSD's RELENG_6.

14 years agosubr_diskmbr.c: Fix some warning fixes.
Sascha Wildner [Thu, 25 Jun 2009 22:27:32 +0000 (00:27 +0200)]
subr_diskmbr.c: Fix some warning fixes.

* No need to cast dp_size at all, just fix the format.

* Add cast for size.

14 years agoAdjust hammer.sh for the new "fixbootfile" rc script.
Sascha Wildner [Thu, 25 Jun 2009 16:00:35 +0000 (18:00 +0200)]
Adjust hammer.sh for the new "fixbootfile" rc script.

Now that this cares about fixing kern.bootfile, there's no need to
mess in the user's /etc from outside.

14 years agoWe shouldn't need to drop and reaquire the lock here.
Hasso Tepper [Thu, 25 Jun 2009 21:04:23 +0000 (00:04 +0300)]
We shouldn't need to drop and reaquire the lock here.

Obtained-from: FreeBSD

14 years agoSome more cleanups for vblank code on Intel.
Hasso Tepper [Thu, 25 Jun 2009 21:00:18 +0000 (00:00 +0300)]
Some more cleanups for vblank code on Intel.

The Intel 2d driver calls modeset before reinstalling the handler on
a vt switch.  This means that vblank status ends up getting cleared
after it has been setup.  Restore saved values for the pipestat registers
rather than just wiping them out.

Obtained-from: FreeBSD

14 years agoInitialize max_vblank_count earlier.
Hasso Tepper [Thu, 25 Jun 2009 18:44:41 +0000 (21:44 +0300)]
Initialize max_vblank_count earlier.

Small cleanup of the error paths while I'm here.

Obtained-from: FreeBSD

14 years agoKeep track of the hardware counter more aggressively
Hasso Tepper [Thu, 25 Jun 2009 18:37:52 +0000 (21:37 +0300)]
Keep track of the hardware counter more aggressively

... while interrupts are enabled.  This should help to reduce cases
where the hardware counter reference jumps by large amounts.

Obtained-from: FreeBSD

14 years agoFix one use of atomic for refcount missed in last commit.
Hasso Tepper [Thu, 25 Jun 2009 18:34:58 +0000 (21:34 +0300)]
Fix one use of atomic for refcount missed in last commit.

Obtained-from: FreeBSD

14 years agoAdditional vblank cleanups.
Hasso Tepper [Thu, 25 Jun 2009 18:28:47 +0000 (21:28 +0300)]
Additional vblank cleanups.

Use the vbl_lock when manipulating the refcount.  Eventually I want to
convert this to use our internal refcount code.  Continue to use atomic
ops for manipulating vblank count since we access it often just for
reading.

Obtained-from: FreeBSD

14 years agoEnsure that we always hold the lock when executing vblank_disable_fn().
Hasso Tepper [Thu, 25 Jun 2009 18:21:43 +0000 (21:21 +0300)]
Ensure that we always hold the lock when executing vblank_disable_fn().

The original code in FreeBSD uses callout_init_mtx() we don't have,
therefore we lock/unlock in vblank_disable_fn itself.

14 years agopriv: Reduce some uses of PRISON_ROOT
Michael Neumann [Thu, 25 Jun 2009 20:24:25 +0000 (22:24 +0200)]
priv: Reduce some uses of PRISON_ROOT

Move decision whether the privilege is allowed or not into function
prison_priv_check().

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Thu, 25 Jun 2009 19:52:30 +0000 (12:52 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoHAMMER VFS - Take reserved space into account when reporting statvfs data
Matthew Dillon [Thu, 25 Jun 2009 19:50:50 +0000 (12:50 -0700)]
HAMMER VFS - Take reserved space into account when reporting statvfs data

Adjust statvfs data so reserved space is taken into account, so the
filesystem starts failing modifying operations closer to when 'df' would
otherwise say that 0 free space remains.

Submitted-by: Antonio Huete Jimenez <tuxillo@quantumachine.net> (with modification)
14 years agoHAMMER UTILS - Add to the newfs_hammer documentation.
Matthew Dillon [Thu, 25 Jun 2009 19:50:02 +0000 (12:50 -0700)]
HAMMER UTILS - Add to the newfs_hammer documentation.

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Michael Neumann [Thu, 25 Jun 2009 19:36:33 +0000 (21:36 +0200)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoCAM - Auto unit number start based on device
Matthew Dillon [Thu, 25 Jun 2009 19:35:14 +0000 (12:35 -0700)]
CAM - Auto unit number start based on device

If no SCSI devices are wired CAM now automatically starts any umass sim
attachments at unit #8 instead of unit #0.  This reduces interference
between usb mass storage attachments and ahci/sili attachments.  Otherwise
the usb mass storage can steal "da0" away from ahci/sili.

14 years agopriv: Introduce prison_priv_check()
Michael Neumann [Thu, 25 Jun 2009 19:29:52 +0000 (21:29 +0200)]
priv: Introduce prison_priv_check()

One day the PRISON_ROOT flag, which when passed to priv_check_cred()
allows the privilege in a jail, will be gone and all privileges allowed
in a jail are centrally maintained in the prison_priv_check() function
instead of spreading it over all the calls.

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Thu, 25 Jun 2009 18:59:03 +0000 (11:59 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoCAM/UMASS - use xpt_action_async() to ensure asynchronous scsi bus scan.
Matthew Dillon [Thu, 25 Jun 2009 18:57:14 +0000 (11:57 -0700)]
CAM/UMASS - use xpt_action_async() to ensure asynchronous scsi bus scan.

Use the new xpt_action_async() function to ensure that the scsi bus is
rescanned asynchronously.  XPT_SCAN_BUS already sets XPT_FC_QUEUED but
it doesn't apply to command initiation.  The new function does it properly.

14 years agonice(3): Return new nice value.
Stathis Kamperis [Wed, 24 Jun 2009 18:41:44 +0000 (21:41 +0300)]
nice(3): Return new nice value.

The nice(1) utility isn't affected by this change,
since it uses {get,set}priority() directly.

Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1408>

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Michael Neumann [Thu, 25 Jun 2009 14:22:25 +0000 (16:22 +0200)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agorcng - add fixbootfile to Makefile for install
Matthew Dillon [Thu, 25 Jun 2009 14:13:08 +0000 (07:13 -0700)]
rcng - add fixbootfile to Makefile for install

14 years agopriv: Refactor kern_mknod and narrow privileges
Michael Neumann [Thu, 25 Jun 2009 13:42:09 +0000 (15:42 +0200)]
priv: Refactor kern_mknod and narrow privileges

14 years agopriv: Narrow privileges
Michael Neumann [Thu, 25 Jun 2009 13:15:30 +0000 (15:15 +0200)]
priv: Narrow privileges

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Michael Neumann [Thu, 25 Jun 2009 12:42:01 +0000 (14:42 +0200)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agorcng - add rcng script to fixup kern.bootfile
Matthew Dillon [Thu, 25 Jun 2009 06:09:49 +0000 (23:09 -0700)]
rcng - add rcng script to fixup kern.bootfile

In BOOT+ROOT setups the boot loader does not realize that the boot partition
will be mounted as /boot under the root partition.  This RCNG script fixes
up the kern.bootfile sysctl.

14 years agolibstand - remove iaddr_t, do not assume long double is a power of 2, clean up
Matthew Dillon [Thu, 25 Jun 2009 00:14:45 +0000 (17:14 -0700)]
libstand - remove iaddr_t, do not assume long double is a power of 2, clean up

* Remove iaddr_t.  Use uintptr_t instead.

* Remove use of long double to determine alignment.  Use a fixed 16 byte
  alignment instead.

* General cleanup

14 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Wed, 24 Jun 2009 23:46:26 +0000 (16:46 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

14 years agoAMD64 - Support -m32 by conditionalizing 32 and 64 bit typedefs.
Matthew Dillon [Wed, 24 Jun 2009 23:43:30 +0000 (16:43 -0700)]
AMD64 - Support -m32 by conditionalizing 32 and 64 bit typedefs.

Conditionalize the typedefs in amd64-specific headers to support -m32
compilation.  This fixes the compilation of the boot loader from the
amd64 build.

14 years agoAdd some sysctl info so that we can see what is going on with vblanks.
Hasso Tepper [Tue, 23 Jun 2009 22:12:05 +0000 (01:12 +0300)]
Add some sysctl info so that we can see what is going on with vblanks.

Obtained-from: FreeBSD