9 years agoMerge branch 'master' into amd64
Jordan Gordeev [Fri, 5 Jun 2009 20:48:56 +0000 (23:48 +0300)]
Merge branch 'master' into amd64

9 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Fri, 5 Jun 2009 20:45:16 +0000 (13:45 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

9 years agoFix amd64 build and UP build issues with recent commit.
Matthew Dillon [Fri, 5 Jun 2009 20:44:30 +0000 (13:44 -0700)]
Fix amd64 build and UP build issues with recent commit.

Fix some build issues and sync amd64 with i386.

Reported-by: Jordan Gordeev <jgordeev@dir.bg>
9 years agokdump(1): Fix add hoc translation for setpriority.
Stathis Kamperis [Fri, 5 Jun 2009 20:25:07 +0000 (23:25 +0300)]
kdump(1): Fix add hoc translation for setpriority.

kdump was translating the wrong argument (third instead of first).

Before patch:  CALL  setpriority(0,0x2bc3,<invalid=10>)
After  patch:  CALL  setpriority(PRIO_PROCESS,0x2bc3,0xa)

9 years agoamd64: Fix booting on machines with large ammounts of RAM.
Jordan Gordeev [Fri, 5 Jun 2009 18:43:14 +0000 (21:43 +0300)]
amd64: Fix booting on machines with large ammounts of RAM.

9 years agoamd64: Fix saving and restoring of FPU state.
Jordan Gordeev [Thu, 4 Jun 2009 19:23:52 +0000 (22:23 +0300)]
amd64: Fix saving and restoring of FPU state.

9 years agoamd64: Remove unneeded asserts. Fixes a bug.
Jordan Gordeev [Wed, 3 Jun 2009 19:07:19 +0000 (22:07 +0300)]
amd64: Remove unneeded asserts. Fixes a bug.

9 years agoamd64: Remove flag 'PCB_FULLCTX' now that it is unused.
Jordan Gordeev [Wed, 3 Jun 2009 16:49:00 +0000 (19:49 +0300)]
amd64: Remove flag 'PCB_FULLCTX' now that it is unused.

9 years agoamd64: Print more information when applications segfault.
Jordan Gordeev [Wed, 3 Jun 2009 16:14:24 +0000 (19:14 +0300)]
amd64: Print more information when applications segfault.

9 years agoamd64: Implement cpu_prepare_lwp().
Jordan Gordeev [Wed, 3 Jun 2009 16:11:46 +0000 (19:11 +0300)]
amd64: Implement cpu_prepare_lwp().
Adapted from i386.

9 years agoamd64: Use 'doreti' to return from syscalls.
Jordan Gordeev [Wed, 3 Jun 2009 15:52:45 +0000 (18:52 +0300)]
amd64: Use 'doreti' to return from syscalls.
This is what old DragonFly and new FreeBSD/amd64 code does.

9 years agoamd64: Fix 'hw.availpages' sysctl.
Jordan Gordeev [Wed, 3 Jun 2009 15:36:37 +0000 (18:36 +0300)]
amd64: Fix 'hw.availpages' sysctl.
Always returning -1 was the worst possible choice - it got us into an infinite loop.

9 years agoamd64: Take red zone into account when handling signals.
Jordan Gordeev [Tue, 2 Jun 2009 15:39:05 +0000 (18:39 +0300)]
amd64: Take red zone into account when handling signals.
Red zone is a feature of the amd64 ABI.

9 years agoMerge branch 'master' into amd64
Jordan Gordeev [Fri, 5 Jun 2009 18:48:59 +0000 (21:48 +0300)]
Merge branch 'master' into amd64

9 years agoscsi_read_capacity_data_long -> scsi_read_capacity_data_16
Matthew Dillon [Fri, 5 Jun 2009 16:29:01 +0000 (09:29 -0700)]
scsi_read_capacity_data_long -> scsi_read_capacity_data_16

Reported-by: "Simon 'corecode' Schubert" <corecode@fs.ei.tum.de>
9 years agoAHCI Driver - add initial ATAPI support, suppy fake SENSE for DISK support.
Matthew Dillon [Fri, 5 Jun 2009 05:37:24 +0000 (22:37 -0700)]
AHCI Driver - add initial ATAPI support, suppy fake SENSE for DISK support.

Implement basic ATAPI probe and SCSI pass-through.  ATAPI differs from DISK
in that all commands are packetized and follow the SCSI standard for the most

ATAPI does not follow the SCSI standard precisely.  Many ATAPI implementations
just can't handle READ_6, WRITE_6, or modern INQUIRY commands.  To deal with
this the following conversions are done by the layer:

READ_6 -> READ_10


INQUIRY -> truncate length field to SHORT_INQUIRY_LENGTH and
   clear the SI_EVPD bit in the byte2 field if the
   page_code being requested is 0 (basic inquiry).

Continue to work on the DISK support.  If an error occurs fake AUTOSENSE
data is constructed (is there a way to obtain real sense data?).

9 years agoAHCI Driver port from OpenBSD to DragonFly - Initial commit
Matthew Dillon [Thu, 4 Jun 2009 18:21:05 +0000 (11:21 -0700)]
AHCI Driver port from OpenBSD to DragonFly - Initial commit

This is the initial work synchronization commit for the AHCI driver port.
About 85% of the logic is now working.

This also includes initial wiring of interrupt bits and status tests for
hot-plug support.

9 years agoAdd prototype for bus_dma_tag_getmaxsize().
Matthew Dillon [Thu, 4 Jun 2009 18:13:09 +0000 (11:13 -0700)]
Add prototype for bus_dma_tag_getmaxsize().

9 years agoAdd definition for ATAPI_READ_CAPACITY_16 (same as ATAPI_SERVICE_ACTION_IN)
Matthew Dillon [Thu, 4 Jun 2009 18:12:48 +0000 (11:12 -0700)]

9 years agobus_dma_tag fixes and enhancements.
Matthew Dillon [Thu, 4 Jun 2009 18:10:20 +0000 (11:10 -0700)]
bus_dma_tag fixes and enhancements.

* Protect the cached segment list in the bus_dma_tag structure
  with a spinlock.

* Cache up to 8 segments on the stack when applicable (needs more work).

* Add function call bus_dma_tag_getmaxsize() to access the maxsize field
  in the tag.

* Fix a bug in bus_dmamap_load_uio() which did not properly append segments
  when the uio has more then one iov.  (untested).

9 years agoMinor string description changes to match READ_CAPACITY_16
Matthew Dillon [Thu, 4 Jun 2009 18:08:51 +0000 (11:08 -0700)]
Minor string description changes to match READ_CAPACITY_16

9 years agoAdd typedefs for pci register integral types, taken from OpenBSD.
Matthew Dillon [Thu, 4 Jun 2009 18:08:02 +0000 (11:08 -0700)]
Add typedefs for pci register integral types, taken from OpenBSD.

9 years agoAdd entries to pcidevs for AHCI products and regenerate.
Matthew Dillon [Thu, 4 Jun 2009 18:07:38 +0000 (11:07 -0700)]
Add entries to pcidevs for AHCI products and regenerate.

9 years agoCAM Enhancements for AHCI driver work, import some structures from OpenBSD.
Matthew Dillon [Thu, 4 Jun 2009 18:02:52 +0000 (11:02 -0700)]
CAM Enhancements for AHCI driver work, import some structures from OpenBSD.

Add a CAM bit in the ccb to indicate that a polled operation is being
requested.  This is easier for the driver to find then putting it in
the periph structure.

Rename the scsi_read_capacity_data_long structure to
scsi_read_capacity_data_16 to match OpenBSD, and add a
command code for READ_CAPACITY_16 to match OpenBSD and reduce
confusion.  Also add missing fields to scsi_read_capacity_data_16.

Add SCSI_REV_SPC3.  Taken from OpenBSD.

Add a page description structure for UNIT_DEVID (page 0x83), taken from

Add unions for SCSI CDB command structures and response fields to improve
code readability.

9 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Thu, 4 Jun 2009 17:58:56 +0000 (10:58 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

9 years agoACPI P-State support step 1.5/2: Add CPU driver for AMD 10h family processors
Sepherosa Ziehau [Wed, 3 Jun 2009 12:54:48 +0000 (20:54 +0800)]
ACPI P-State support step 1.5/2: Add CPU driver for AMD 10h family processors

9 years agoCAM fixes - queue empty tests, sim refcount, add XPORT_AHCI enum.
Matthew Dillon [Wed, 3 Jun 2009 03:36:27 +0000 (20:36 -0700)]
CAM fixes - queue empty tests, sim refcount, add XPORT_AHCI enum.

* CAMQ_GET_HEAD assumes the head entry in the devq array is NULL to
  indicate an empty queue.  Fix allocations and removal code to ensure
  that no bogus pointers are left in the array, cleaning it up and fixing
  a bug where CAMQ_GET_HEAD() could return non-NULL even when the queue
  was empty.

  This fixes numerous reports on detachment of non-empty device queues
  that are, in fact, empty, and also fixes a memory leak.

* xpt_bus_register() bumps the sim's refcount, but xpt_bus_deregister()
  did not properly release it.  This fixes a memory leak.

* Add XPORT_AHCI to the cam_xport enum for AHCI attachments.

9 years agoRemove remaining host.conf(5) traces.
Sascha Wildner [Mon, 1 Jun 2009 22:00:33 +0000 (00:00 +0200)]
Remove remaining host.conf(5) traces.

9 years agougensa(4): Fix handling of Huawei modems.
Sascha Wildner [Sun, 31 May 2009 10:07:36 +0000 (12:07 +0200)]
ugensa(4): Fix handling of Huawei modems.

Basically move the calling of the reattach code to get the Huawei
modem out of mass storage mode into the _match() routine and
simplify the logic behind when calling it and when not.

Now it is called for any Huawei modem if it has only one interface,
probably only a mass storage interface. Normally this mass-storage
interface is used under windows as it carries the windows-drivers
for the device. As we don't need it, we just tell the box that we
want the modem interface and not mass storage.

Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1324>
Submitted-by: Alex Hornung <ahornung@gmail.com>
Tested-by: Brendan Kosowski <bmk@bmk.com.au>
Approved-by: hasso
9 years agoRemove symbols not in libpthread (libc_r).
Hasso Tepper [Sat, 30 May 2009 17:56:26 +0000 (20:56 +0300)]
Remove symbols not in libpthread (libc_r).

Pthread stubs must not have symbols which are not in the libpthread.
Unbreaks a hell of lot things in the pkgsrc.

9 years agoath(4): Really unbreak MODULES_WITH_WORLD building.
Sascha Wildner [Sat, 30 May 2009 15:01:20 +0000 (17:01 +0200)]
ath(4): Really unbreak MODULES_WITH_WORLD building.

9 years agoACPI P-State support step 1/2: Extract information from ACPI objects
Sepherosa Ziehau [Sat, 30 May 2009 11:31:00 +0000 (19:31 +0800)]
ACPI P-State support step 1/2: Extract information from ACPI objects

9 years agoacpi_cpu: Let cpu driver install ACPI-CA notify handler; C-State driver
Sepherosa Ziehau [Fri, 29 May 2009 09:35:59 +0000 (17:35 +0800)]
acpi_cpu: Let cpu driver install ACPI-CA notify handler; C-State driver
registers its handler to cpu driver (its parent)

9 years agoacpi_cpu: Override resource alloc/release methods.
Sepherosa Ziehau [Fri, 29 May 2009 08:32:31 +0000 (16:32 +0800)]
acpi_cpu: Override resource alloc/release methods.

Tested-by: hasso@
9 years agoacpi_cpu: Split C-State support out of cpu driver.
Sepherosa Ziehau [Fri, 29 May 2009 05:10:58 +0000 (13:10 +0800)]
acpi_cpu: Split C-State support out of cpu driver.

New cpu driver only contains minimum code to detect processor object,
and create necessary cpu sysctl nodes; this paves the way for the
P-State support.

Noticable changes to the userland:
- hw.cpuX sysctl trees are move to hw.acpi.cpuX
- C-State support could be disabled individually by "cpu_cst"
- The device tree is now acpi0.cpuX.cpu_cstX, instead of acpi0.cpuX

9 years agoifpoll: Let callers of {st,io}poll_clock() hold critical section.
Sepherosa Ziehau [Thu, 28 May 2009 09:19:33 +0000 (17:19 +0800)]
ifpoll: Let callers of {st,io}poll_clock() hold critical section.

9 years agoifpoll: Adjust status polling's cached pollhz iff we are on CPU0
Sepherosa Ziehau [Thu, 28 May 2009 08:51:40 +0000 (16:51 +0800)]
ifpoll: Adjust status polling's cached pollhz iff we are on CPU0

9 years agodrm: add support for Intel G41
Simon Schubert [Thu, 28 May 2009 07:59:50 +0000 (09:59 +0200)]
drm: add support for Intel G41

Submitted-by: hasso@
9 years agodrm: adapt and use drm_close
Simon Schubert [Thu, 28 May 2009 07:52:42 +0000 (09:52 +0200)]
drm: adapt and use drm_close

While importing the last drm code, drm_close was not properly ported and
integrated.  Thus, opens only incremented the reference count, but code
for closes and decrementing the reference count never was executed.

As a result, Xorg drivers, which during probing drm open and close the
device several times, would not be able to perform certain operations
due to a wrong reference count.

9 years agoifpoll: Add sysctl nodes for TX and status polling fraction.
Sepherosa Ziehau [Thu, 28 May 2009 06:36:53 +0000 (14:36 +0800)]
ifpoll: Add sysctl nodes for TX and status polling fraction.

9 years agoifpoll: Move status sysctl tree to net.ifpoll.0
Sepherosa Ziehau [Thu, 28 May 2009 05:57:04 +0000 (13:57 +0800)]
ifpoll: Move status sysctl tree to net.ifpoll.0

9 years agoifpoll: Rework systimer related bits after lapic timer could be used.
Sepherosa Ziehau [Thu, 28 May 2009 05:38:37 +0000 (13:38 +0800)]
ifpoll: Rework systimer related bits after lapic timer could be used.

Percpu systimers were commented out before lapic timer code was ready,
mainly to avoid high frequency timers staggering cross CPUs, which
may double the timer frequency and timer ipi rate.  After the lapic
timer is ready, we no longer need to worry cross CPUs timer frequency
staggering and timer ipi boardcasting, so percpu systimer could be
safely enabled at almost no cost.

However, care must be taken to avoid CPU-local lapic timer frequency
staggering, since TX, RX and status polling could use different
frequency; the current implementation let RX systimer give TX and status
polling a piggyback to avoid this kind of timer frequency staggering.

9 years agoamd64: Fixes for pmap_release() and related functions + other stuff
Jordan Gordeev [Tue, 26 May 2009 06:32:57 +0000 (09:32 +0300)]
amd64: Fixes for pmap_release() and related functions + other stuff
pmap_release() is mostly working now.
Handling of the 'hold_count' field of 'struct vm_page' for page table pages was much improved.
Some debugging statements were added.

9 years agoamd64: Check that pages freed to the zeroed-pages queue are really zeroed.
Jordan Gordeev [Tue, 26 May 2009 05:51:14 +0000 (08:51 +0300)]
amd64: Check that pages freed to the zeroed-pages queue are really zeroed.

9 years agoamd64: pmap: Fix sizes and indices related to the pm_pteobj vm_object.
Jordan Gordeev [Sat, 23 May 2009 19:55:25 +0000 (22:55 +0300)]
amd64: pmap: Fix sizes and indices related to the pm_pteobj vm_object.

9 years agoamd64: pmap: Improve comments.
Jordan Gordeev [Wed, 27 May 2009 11:23:24 +0000 (14:23 +0300)]
amd64: pmap: Improve comments.

9 years agoamd64: pmap: Use consistent names in comments.
Jordan Gordeev [Sat, 23 May 2009 16:08:25 +0000 (19:08 +0300)]
amd64: pmap: Use consistent names in comments.

9 years agoMerge branch 'master' into amd64
Jordan Gordeev [Wed, 27 May 2009 11:20:27 +0000 (14:20 +0300)]
Merge branch 'master' into amd64

9 years agolibc: consolidate pthread stub functions
Simon Schubert [Tue, 26 May 2009 20:15:47 +0000 (22:15 +0200)]
libc: consolidate pthread stub functions

To Hasso's and my surprise we are maintaining two sets of stub functions
for pthread.  These stubs are present so that consumers that are thread
aware, but don't require pthreads, will successfully link even without

pthread_fake.c was introduced for external consumers, I believe Xorg.
It provided externally visible weak symbols for pthread_* functions that
all returned an error.

_pthread_stubs.c was introduced later so that libc could be made pthread
aware.  It provided only stub functions that are used by libc itself,
provided by weak symbols for _pthread_* (notice leading underscore).
These functions returned always success, so that libc could operate

This consolidation now provides weak symbols for both pthread_* and
_pthread_* for all functions defined by libpthread, except for
pthread_create.  These functions return success and/or behave properly.

9 years agoundo: don't double free path
Simon Schubert [Tue, 26 May 2009 20:12:30 +0000 (22:12 +0200)]
undo: don't double free path

9 years agogcc34: fix spello in comment
Simon Schubert [Mon, 25 May 2009 12:30:56 +0000 (14:30 +0200)]
gcc34: fix spello in comment

9 years agoSync zoneinfo database with tzdata2009h from elsie.
Sascha Wildner [Tue, 26 May 2009 23:07:04 +0000 (01:07 +0200)]
Sync zoneinfo database with tzdata2009h from elsie.

README:         8.2  -> 8.3
Theory:         8.2  -> 8.3
africa:         8.19 -> 8.21
antarctica:     8.4  -> 8.5
asia:           8.30 -> 8.32
australasia:    8.9  -> 8.11
backward:       8.7  -> 8.8
etcetera:       8.1  -> 8.2
europe:         8.20 -> 8.21
factory:        8.1  -> 8.2
iso3166.tab:    8.5  -> 8.6
leapseconds:    8.7  -> 8.8
northamerica:   8.27 -> 8.28
southamerica:   8.34 -> 8.36
systemv:        8.1  -> 8.2
zone.tab:       8.26 -> 8.28

From Arthur David Olson's comments:

* "Public domain" statements are added to a number of files.

* Instances of "=3D" are changed to "=" in the "africa"
  and "southamerica" files.

* The start of DST in Jordan from 2002 forward is changed from
  0:00 on the last Friday of the month to 24:00 on the last Thursday.

* Four sets of latitute/longitude are corrected in the "zone.tab" file
  (with thanks to Marc Wick).

* Commentary is added to the "australasia" file regarding DST in
  South Australia (no changes to the rules).

9 years agolibthread_xu: disable use of version script
Simon Schubert [Wed, 27 May 2009 09:32:24 +0000 (11:32 +0200)]
libthread_xu: disable use of version script

Due to a bug(?) in the gcc driver, the version script has not been used
previously.  Since we pass it directly to the linker, threaded
applications have been crashing erratically.  Correctly disable the
version script until this issue is resolved.

Tracked-down-by: hasso@
9 years agostdint.h: rearrange declarations into separate files
Simon Schubert [Wed, 27 May 2009 09:32:06 +0000 (11:32 +0200)]
stdint.h: rearrange declarations into separate files

The current machine/stdint.h situation is a mess.  It declares only the
__versions of stdint integers, but also defines limit and constant
macros.  Furthermore it also declares non-integer types.

Break out integer limit and constant macros into their own machine/
headers and include all of these headers from <stdint.h>, but not from
machine/stdint.h.  The declaration of integer_t types still happens in
main stdint.h.

This is slightly based on NetBSD's way of doing it.

9 years agonlookup.9: Remove references to namei() which we don't have.
Stathis Kamperis [Tue, 26 May 2009 21:14:21 +0000 (00:14 +0300)]
nlookup.9: Remove references to namei() which we don't have.

Reported-by: Jordan Gordeev <jgordeev@dir.bg>
Reviewed-by: Sascha Wildner <swildner@dragonflybsd.org>
9 years agosystat(1): vmmeter -> pvmmeter
Sepherosa Ziehau [Mon, 25 May 2009 11:04:48 +0000 (19:04 +0800)]
systat(1): vmmeter -> pvmmeter

Complained-by: many
9 years agotap(4): More fixes to tapuponopen.
Sepherosa Ziehau [Mon, 18 May 2009 14:17:42 +0000 (22:17 +0800)]
tap(4): More fixes to tapuponopen.

If tap(4) is cloned, we bring down the interface during closing only
if the interface was brought up during opening.

9 years agotap(4): Correct reversed logic
Sepherosa Ziehau [Mon, 18 May 2009 13:13:19 +0000 (21:13 +0800)]
tap(4): Correct reversed logic

9 years agotap(4): Add ifclone support
Sepherosa Ziehau [Mon, 18 May 2009 13:17:08 +0000 (21:17 +0800)]
tap(4): Add ifclone support

Submitted-by: Naoya Sugioka <naoya.sugioka@gmail.com> w/ following changes:
- Moniro style changes
- Comment out destroy upon closing, mainly to keep old tap(4) behaviour
- Poll interface should return 0 instead of nevent
- Use SLITS_FOREACH_MUTABLE() when destroying tap interfaces
- Pass tap_softc to tapdestroy()
- tap_entries -> tap_link
- Cloners handle their own attach/detach events
- Correct tapuponopen support

9 years agoAdd syscall.9 adapted from OpenBSD.
Stathis Kamperis [Sun, 17 May 2009 13:28:05 +0000 (16:28 +0300)]
Add syscall.9 adapted from OpenBSD.

Reviewed-by: swildner@
9 years agovkernel - more crit section work to avoid pthread reentrancy.
Matthew Dillon [Sun, 24 May 2009 03:02:50 +0000 (20:02 -0700)]
vkernel - more crit section work to avoid pthread reentrancy.

9 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sat, 23 May 2009 23:25:25 +0000 (16:25 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

9 years agoMiscellanious protection around pthread calls to avoid signal reentrancy.
Matthew Dillon [Sat, 23 May 2009 23:21:53 +0000 (16:21 -0700)]
Miscellanious protection around pthread calls to avoid signal reentrancy.

Use pread/pwrite instead of read/write in a few cases.  Cases that still
use read/write now protect the calls with a crit_enter()/crit_exit().

Protect usleep() calls with a critical section.

Protect pthread_*() calls with a critical section where applicable.  Note
that calls made from cothreads do not need to be protected because the
cothreads do not take signals and are not operated as virtual cpus so they
can't preempt themselves either.

Reported-by: Trevor Kendall
9 years agoamd64 - Fix compiler warning.
Matthew Dillon [Sat, 23 May 2009 23:20:08 +0000 (16:20 -0700)]
amd64 - Fix compiler warning.

9 years agohammer.8: Fix typo.
Sascha Wildner [Sat, 23 May 2009 12:02:24 +0000 (14:02 +0200)]
hammer.8: Fix typo.

9 years agolibthread_xu: Use -Wl,... for passing linker options.
Sascha Wildner [Sat, 23 May 2009 11:47:09 +0000 (13:47 +0200)]
libthread_xu: Use -Wl,... for passing linker options.

Fixes building with clang which doesn't support --version-script.

Submitted-by: Alex Hornung <ahornung@gmail.com>
9 years agotcp timer: Don't try stopping timers if timer message is not created.
Sepherosa Ziehau [Sat, 23 May 2009 11:01:15 +0000 (19:01 +0800)]
tcp timer: Don't try stopping timers if timer message is not created.

DragonFly-bug: <http://bugs.dragonflybsd.org/issue1380>

9 years agolibkvm: Raise WARNS to 2 and fix warnings.
Sascha Wildner [Sat, 23 May 2009 11:05:57 +0000 (13:05 +0200)]
libkvm: Raise WARNS to 2 and fix warnings.

Includes adding a prototype for dev2udev() to kern_kinfo.c if compiled
for userland.

9 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sat, 23 May 2009 04:33:00 +0000 (21:33 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

9 years agoSupporting amd64 /dev/kmem requires allowing apparently negative lseek offsets.
Matthew Dillon [Sat, 23 May 2009 04:32:03 +0000 (21:32 -0700)]
Supporting amd64 /dev/kmem requires allowing apparently negative lseek offsets.

9 years agolibkvm - use the proper format %lx for kva, which is an unsigned long.
Matthew Dillon [Sat, 23 May 2009 04:29:07 +0000 (21:29 -0700)]
libkvm - use the proper format %lx for kva, which is an unsigned long.

9 years agoobjformat(1): Fix comment typo and trailing newline.
Sascha Wildner [Sat, 23 May 2009 01:59:58 +0000 (03:59 +0200)]
objformat(1): Fix comment typo and trailing newline.

9 years agoAdjust objformat.1 and getobjformat.3 to the current state of affairs.
Sascha Wildner [Sat, 23 May 2009 01:59:12 +0000 (03:59 +0200)]
Adjust objformat.1 and getobjformat.3 to the current state of affairs.

9 years agoDocument hw.irq.X.dest in loader(8) manpage
Sepherosa Ziehau [Fri, 22 May 2009 11:16:06 +0000 (19:16 +0800)]
Document hw.irq.X.dest in loader(8) manpage

Reminded-by: dillon@
9 years agolibc_r: map initial stack red zone with MAP_TRYFIXED
Simon Schubert [Thu, 21 May 2009 20:43:56 +0000 (22:43 +0200)]
libc_r: map initial stack red zone with MAP_TRYFIXED

This is analogous to 9b505694017eeaf48fff9273f503160064583c14 and

With-help-from: smtms, dillon

9 years agoRemove .sh suffix from the last 3 rc scripts that had it.
Sascha Wildner [Thu, 21 May 2009 17:24:42 +0000 (19:24 +0200)]
Remove .sh suffix from the last 3 rc scripts that had it.

9 years agoMerge branch 'master' into amd64
Jordan Gordeev [Thu, 21 May 2009 16:24:49 +0000 (19:24 +0300)]
Merge branch 'master' into amd64

9 years agoioapic: Allow user to specify irq's destination CPU
Sepherosa Ziehau [Thu, 21 May 2009 13:38:45 +0000 (21:38 +0800)]
ioapic: Allow user to specify irq's destination CPU

hw.irq.X.dest is checked when programming ioapic and the corresponding
ithread will be created on the same CPU as the irq's destination CPU.

9 years agoioapic: Fix destination setting.
Sepherosa Ziehau [Thu, 21 May 2009 10:59:24 +0000 (18:59 +0800)]
ioapic: Fix destination setting.

Since the "destination mode" is physical, the "destination" should be
APIC ID instead of mask (set of processors).  Currently all interrupts
are delivered to CPU0 (BSP).

9 years agovknet.8: Fix typo.
Sascha Wildner [Thu, 21 May 2009 09:17:01 +0000 (11:17 +0200)]
vknet.8: Fix typo.

9 years agovknetd.8: Document Matt's recent changes to vknetd(8).
Sascha Wildner [Thu, 21 May 2009 09:10:43 +0000 (11:10 +0200)]
vknetd.8: Document Matt's recent changes to vknetd(8).

9 years agovknetd.8: Start sentences on new lines.
Sascha Wildner [Thu, 21 May 2009 09:04:32 +0000 (11:04 +0200)]
vknetd.8: Start sentences on new lines.

9 years agoath_hal.4: Update a bit for the recent HAL update (taken from FreeBSD).
Sascha Wildner [Thu, 21 May 2009 08:51:59 +0000 (10:51 +0200)]
ath_hal.4: Update a bit for the recent HAL update (taken from FreeBSD).

9 years agoetc/rc.d/sendmail: Actually execute sendmail_precmd().
Sascha Wildner [Wed, 20 May 2009 20:03:35 +0000 (22:03 +0200)]
etc/rc.d/sendmail: Actually execute sendmail_precmd().

This will cause the sendmail rc script to care about running
newaliases(1) itself if necessary (database doesn't exist or
/etc/mail/aliases is newer than /etc/mail/aliases.db).

Also add a new rc.conf variable 'sendmail_rebuild_aliases' to
turn off this behavior which is on by default.

This means we don't need to run newaliases(1) ourselves in a
couple of places (such as when building the LiveCD), so remove

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

9 years agoundo: free temporary filename
Simon Schubert [Wed, 20 May 2009 15:39:59 +0000 (17:39 +0200)]
undo: free temporary filename

9 years agoundo: always collect history of the file
Simon Schubert [Wed, 20 May 2009 15:39:37 +0000 (17:39 +0200)]
undo: always collect history of the file

Commit b9a33d3fb1235626615b96b4b586ce7a7b8386fd added file histories based
on the history of the parent directory, in order to list history fragments
even when the inode changed.  However it failed to collect the history for
the most recent version of the file.  As a result, if all versions of the
parent directory happened to preceed the oldest version of the file, undo
would not collect any history for the file and fail with error 0.

Unconditionally include the history of the file to fix this problem.

9 years agoaac(4): Functions called on the interrupt processing code path is not MPSAFE
Sepherosa Ziehau [Wed, 20 May 2009 13:18:17 +0000 (21:18 +0800)]
aac(4): Functions called on the interrupt processing code path is not MPSAFE
yet, so don't mark its interrupt handler MPSAFE.

Reported-and-tested-by: Archimedes Gaviola <archimedes.gaviola@gmail.com>
9 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Wed, 20 May 2009 02:48:38 +0000 (19:48 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

9 years agoSave creds on nfs_open() for later read/write/etc.
Matthew Dillon [Wed, 20 May 2009 02:44:00 +0000 (19:44 -0700)]
Save creds on nfs_open() for later read/write/etc.

Recent commits removed an unnecessary access() call in the open path.
However, this broke NFS's saving of creds for future use.  Replicate
the cred code in nfs_open().

Reported-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>
9 years agonewvers.sh: Take the src/ dir as an argument instead of hard coding it.
Sascha Wildner [Tue, 19 May 2009 14:04:12 +0000 (16:04 +0200)]
newvers.sh: Take the src/ dir as an argument instead of hard coding it.

This fixes the issue where the last number in our version was included
only if /usr/src was present at build time, which resulted in different
output of uname -r, sysctl kern.{osrelease,version}, etc. across
different systems (e.g. "2.3.1-DEVELOPMENT" vs. "2.3-DEVELOPMENT").

This commit also removes the passing of ${KERN_IDENT} and ${IDENT} to
newvers.sh (both of which are not used by it) and performs some
additional cleanup.

Brought-to-my-attention-by: Antonio Huete Jimenez <ahuete.devel@gmail.com>
Reviewed-by: dillon
9 years agoath(4) HAL: Set AH_SUPPORT_AR5416 to 1 for now (unbreaks buildkernel).
Sascha Wildner [Tue, 19 May 2009 13:52:19 +0000 (15:52 +0200)]
ath(4) HAL: Set AH_SUPPORT_AR5416 to 1 for now (unbreaks buildkernel).

9 years ago- Staticize cpu_initclocks()
Sepherosa Ziehau [Tue, 19 May 2009 13:11:46 +0000 (21:11 +0800)]
- Staticize cpu_initclocks()
- Correct vktimer_intr_initclock() prototype

9 years agoamd64: Sync isa/clock.c with i386's
Sepherosa Ziehau [Tue, 19 May 2009 13:01:06 +0000 (21:01 +0800)]
amd64: Sync isa/clock.c with i386's

9 years agoRevert "More clock cleanup:"
Sepherosa Ziehau [Tue, 19 May 2009 12:56:17 +0000 (20:56 +0800)]
Revert "More clock cleanup:"

This reverts commit 50b53814fb840b70162a846420b75c5bb9432931.

Reordering RTC and i8254 initialization does not work on some boxes

Reported-by: Johannes Hofmann <johannes.hofmann@gmx.de>
9 years agoath(4) HAL: Adjust/fix a few build related things.
Sascha Wildner [Tue, 19 May 2009 11:59:54 +0000 (13:59 +0200)]
ath(4) HAL: Adjust/fix a few build related things.

* Fix building with MODULES_WITH_WORLD.

* Add AH_SUPPORT_AR5416 option to the options file.

* Remove unneeded opt_ah.h file which gets generated.

9 years agosystat(1): Display external interrupts (non-ipi, non-lapic timer interrupt)
Sepherosa Ziehau [Tue, 19 May 2009 10:50:50 +0000 (18:50 +0800)]
systat(1): Display external interrupts (non-ipi, non-lapic timer interrupt)

9 years agoaac(4): Break out of the loop, if the command could not be sent.
Sepherosa Ziehau [Tue, 19 May 2009 10:40:06 +0000 (18:40 +0800)]
aac(4): Break out of the loop, if the command could not be sent.

9 years agovkernel, not qemu
Sepherosa Ziehau [Tue, 19 May 2009 10:37:58 +0000 (18:37 +0800)]
vkernel, not qemu

9 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Mon, 18 May 2009 20:15:07 +0000 (13:15 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

9 years agoaacvar.h: Fix typo in AAC_ON_AACQ_MASK.
Sascha Wildner [Mon, 18 May 2009 20:03:57 +0000 (22:03 +0200)]
aacvar.h: Fix typo in AAC_ON_AACQ_MASK.