dragonfly.git
10 years agodrm/ttm: Reduce differences with Linux 3.9
François Tigeot [Sun, 23 Feb 2014 07:13:00 +0000 (08:13 +0100)]
drm/ttm: Reduce differences with Linux 3.9

The FreeBSD port of the ttm code was based on some Linux commit which happened
between the 3.8 and 3.9 releases.

For all intents and purposes, it might as well have been based on Linux 3.9.

10 years agokernel: Build and install nata(4) modules too.
Sascha Wildner [Sat, 22 Feb 2014 21:09:52 +0000 (22:09 +0100)]
kernel: Build and install nata(4) modules too.

Reported-by: tuxillo
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2642>

10 years agoiscontrol(8): Use offsetof().
Sascha Wildner [Sat, 22 Feb 2014 17:34:04 +0000 (18:34 +0100)]
iscontrol(8): Use offsetof().

10 years agoRemove some casts of NULL to pointer types which had accumulated.
Sascha Wildner [Sat, 22 Feb 2014 17:22:27 +0000 (18:22 +0100)]
Remove some casts of NULL to pointer types which had accumulated.

They were brought back from FreeBSD with various updates.

10 years agodrm: Implement kref_get_unless_zero()
François Tigeot [Sat, 22 Feb 2014 15:09:12 +0000 (16:09 +0100)]
drm: Implement kref_get_unless_zero()

Fortunately the existing atomic_add_unless() function is able to manage
all the complexity of this algorithm by itself.

10 years agodrm/ttm: Move headers to <include/drm/ttm>
François Tigeot [Sat, 22 Feb 2014 12:41:18 +0000 (13:41 +0100)]
drm/ttm: Move headers to <include/drm/ttm>

Reduce differences with Linux

10 years agodrm/i915: Reduce differences with Linux 3.8
François Tigeot [Sat, 22 Feb 2014 12:19:56 +0000 (13:19 +0100)]
drm/i915: Reduce differences with Linux 3.8

10 years agottm: fix porting typo
Joris Giovannangeli [Sat, 22 Feb 2014 00:30:12 +0000 (01:30 +0100)]
ttm: fix porting typo

Bug: 2635
Submitted-by: vadaszi
10 years agolibc/rand(3) & random(3): Throw out USE_WEAK_SEEDING, which we don't use.
Sascha Wildner [Fri, 21 Feb 2014 19:49:48 +0000 (20:49 +0100)]
libc/rand(3) & random(3): Throw out USE_WEAK_SEEDING, which we don't use.

10 years agolibc/rpc: Fix a reference of an uninitialized variable.
Sascha Wildner [Fri, 21 Feb 2014 19:09:21 +0000 (20:09 +0100)]
libc/rpc: Fix a reference of an uninitialized variable.

In the XDR_DECODE case, pnext was not initialized and it was obscured
by the confusing indentation which I adjusted in the last commit.

In fact, get rid of pnext at all and simply use &objp->next directly,
which is like Illumos has it too.

10 years agodma(8): Add a fixed version number instead of running git every time.
Sascha Wildner [Fri, 21 Feb 2014 18:41:44 +0000 (19:41 +0100)]
dma(8): Add a fixed version number instead of running git every time.

Use 0.9+. It's what FreeBSD took and that's a good idea.

Remove unused get-version.sh script again.

10 years agodma(8): Fix i386 build.
Sascha Wildner [Fri, 21 Feb 2014 17:25:25 +0000 (18:25 +0100)]
dma(8): Fix i386 build.

10 years agodma(8) : update to version 0.9
Joris Giovannangeli [Fri, 21 Feb 2014 17:17:22 +0000 (18:17 +0100)]
dma(8) : update to version 0.9

 * Sources from upstream commit 89702b7f148445240a308a5be65f79891e865a4b

 * (minor) local changes are kept.

10 years agolibc/rpc: Fix some confusing indentation.
Sascha Wildner [Fri, 21 Feb 2014 17:06:59 +0000 (18:06 +0100)]
libc/rpc: Fix some confusing indentation.

xdr_rpcbs_rmtcalllist() had nested if()s on the same level, which made
the code rather hard to follow.

No other differences.

10 years agorpc.lockd(8): Fix some references of the wrong lock.
Sascha Wildner [Fri, 21 Feb 2014 16:44:36 +0000 (17:44 +0100)]
rpc.lockd(8): Fix some references of the wrong lock.

fl is used later on to iterate through the lock list but here, rfl
is meant.

While here, fix a spell-o in a comment.

10 years agolibc/getaddrinfo: Fix bugs in two early error paths of _dns_getaddrinfo().
Sascha Wildner [Fri, 21 Feb 2014 16:30:39 +0000 (17:30 +0100)]
libc/getaddrinfo: Fix bugs in two early error paths of _dns_getaddrinfo().

We cannot use RES_SET_H_ERRNO() here upon malloc() failure because res is
not yet initialized at this point and RES_SET_H_ERRNO() (aka __h_errno())
would reference it.

10 years agokernel/nataraid: Fix an issue with the devstat support I added recently.
Sascha Wildner [Thu, 20 Feb 2014 22:22:27 +0000 (23:22 +0100)]
kernel/nataraid: Fix an issue with the devstat support I added recently.

This fixes the "devstat_end_transaction: HELP!! busy_count for ar0 is < 0"
we were seeing.

Tested-by: Aaron Bieber <deftly@gmail.com>
10 years agolibcalendar: Use our own definition of NULL, instead of rolling an own.
Sascha Wildner [Thu, 20 Feb 2014 21:35:50 +0000 (22:35 +0100)]
libcalendar: Use our own definition of NULL, instead of rolling an own.

10 years agokernel/nataraid: Fix a panic upon booting with a degraded Intel RAID.
Sascha Wildner [Thu, 20 Feb 2014 20:44:03 +0000 (21:44 +0100)]
kernel/nataraid: Fix a panic upon booting with a degraded Intel RAID.

disk_idx has upper bits set in this case which we need to mask.

Taken-from:             FreeBSD's r205074
Reported-and-tested-by: Aaron Bieber <deftly@gmail.com>
10 years agokern/dsched_bfq: Remove local NULL, and some whitespace/comment cleanup.
Sascha Wildner [Thu, 20 Feb 2014 14:14:38 +0000 (15:14 +0100)]
kern/dsched_bfq: Remove local NULL, and some whitespace/comment cleanup.

10 years agoRaise WARNS for a few things in usr.sbin and fix warnings.
Sascha Wildner [Thu, 20 Feb 2014 13:06:49 +0000 (14:06 +0100)]
Raise WARNS for a few things in usr.sbin and fix warnings.

10 years agokm(4): Update from OpenBSD.
Imre Vadasz [Wed, 19 Feb 2014 07:52:53 +0000 (08:52 +0100)]
km(4): Update from OpenBSD.

Adds support for AMD Family 14h and 15h CPUs.

10 years agohammer.5: Remove CAVEATS saying that dedup is experimental.
Sascha Wildner [Thu, 20 Feb 2014 08:30:09 +0000 (09:30 +0100)]
hammer.5: Remove CAVEATS saying that dedup is experimental.

People are using it for some time now and there are no known issues
with it (afaict).

Reported-by: Andreas Loong <reflect@acggbg.org>
10 years ago<rpc/types.h>: Use our standard definition for NULL, instead of 0.
Sascha Wildner [Thu, 20 Feb 2014 07:47:46 +0000 (08:47 +0100)]
<rpc/types.h>: Use our standard definition for NULL, instead of 0.

Also fix a warning in spray(8) that was triggered by this change.

10 years agodrm/i915: Rename drm_i915_private.rings to .ring
François Tigeot [Wed, 19 Feb 2014 21:23:20 +0000 (22:23 +0100)]
drm/i915: Rename drm_i915_private.rings to .ring

Like in Linux.

10 years agopfi - support for authorized_keys
Alex Hornung [Wed, 19 Feb 2014 06:32:46 +0000 (06:32 +0000)]
pfi - support for authorized_keys

10 years ago{clockmod,perfbias}.4: Remove unneeded .Ed
Sascha Wildner [Wed, 19 Feb 2014 17:40:28 +0000 (18:40 +0100)]
{clockmod,perfbias}.4: Remove unneeded .Ed

10 years agokernel/acpi: Fix comment.
Sascha Wildner [Wed, 19 Feb 2014 13:08:27 +0000 (14:08 +0100)]
kernel/acpi: Fix comment.

10 years agokernel: Sync ACPICA with Intel's version 20140214.
Sascha Wildner [Sat, 15 Feb 2014 09:44:21 +0000 (10:44 +0100)]
kernel: Sync ACPICA with Intel's version 20140214.

Module changes:

* Implemented a new mechanism to proactively prevent problems with
  ill-behaved reentrant control methods that create named ACPI objects.
  It should allow serialization of methods without leading to
  AE_ALREADY_EXISTS exceptions if the method was actually entered by
  more than one thread.

* Added the "Windows 2013" string to the _OSI support.

* Hardened/updated the _PRT return value auto-repair code.

* Added support to avoid the possibility of infinite loops when
  traversing object linked lists.

* Add #pragma pack({push,pop}) to ensure that ACPICA headers are
  independent of compiler settings or host headers.

Utilities changes:

* iasl(8): Fix a problem with support for the SPMI table. The first
    reserved field was incorrectly forced to have a value of zero
    instead of one.

* iasl(8): Removed the obsolete -g option.

* acpiexec(8): Added missing support for "Extra" and "Data" subobjects
    and for diplaying entire object linked lists.

For a more detailed list, see sys/contrib/dev/acpica/changes.txt.

As of this commit, the hw.acpi.serialize_methods tunable (0 by default)
is replaced with hw.acpi.auto_serialize_methods (1 by default). Users
with the former tunable set to 1 in their loader.conf should therefore
not experience any differences.

10 years agokernel/usb4bsd: Use the standard __func__ for function names.
Sascha Wildner [Wed, 19 Feb 2014 08:34:19 +0000 (09:34 +0100)]
kernel/usb4bsd: Use the standard __func__ for function names.

10 years agokernel/ichsmb: We don't define __CC_SUPPORTS___FUNC__.
Sascha Wildner [Wed, 19 Feb 2014 08:15:20 +0000 (09:15 +0100)]
kernel/ichsmb: We don't define __CC_SUPPORTS___FUNC__.

In fact, we're using the standard __func__ here.

10 years agoMark malloc() and various similar functions with __heedresult.
Sascha Wildner [Tue, 18 Feb 2014 22:40:13 +0000 (23:40 +0100)]
Mark malloc() and various similar functions with __heedresult.

calloc(), malloc(), realloc(), reallocf(), aligned_alloc(),
contigmalloc(), kmalloc_debug(), krealloc_debug(), kstrdup_debug(),
kmalloc(), krealloc(), kstrdup(), kmalloc_cachealign().

This will generate a warnings/errors when their return value is ignored.

10 years agocolldef(1)/mklocale(1): Define __heedresult when BOOTSTRAPPING.
Sascha Wildner [Tue, 18 Feb 2014 22:40:04 +0000 (23:40 +0100)]
colldef(1)/mklocale(1): Define __heedresult when BOOTSTRAPPING.

These two utilities are bootstrap tools, and due to already existing
surgery take part of their includes from the src/, so as a consequence
we have to define __heedresult too in the BOOTSTRAPPING case.

This is actually the sort of issues which the bootstrap-tools concept
is meant to protect us against. :-(

10 years ago<sys/cdefs.h>: Add a __heedresult macro to warn of discarded return values.
Sascha Wildner [Tue, 18 Feb 2014 22:24:46 +0000 (23:24 +0100)]
<sys/cdefs.h>: Add a __heedresult macro to warn of discarded return values.

It's an alias for __attribute__((__warn_unused_result__)) and can be used
to mark functions whose return value must never be ignored by the calling
code.

10 years agousb4bsd: make u4b compile with USB_DEBUG
Johannes Hofmann [Tue, 18 Feb 2014 20:50:23 +0000 (21:50 +0100)]
usb4bsd: make u4b compile with USB_DEBUG

10 years agodrm/i915: Use Linux atomic types and functions
François Tigeot [Tue, 18 Feb 2014 19:58:12 +0000 (20:58 +0100)]
drm/i915: Use Linux atomic types and functions

10 years agoudevd - fix realloc usage
Alex Hornung [Tue, 18 Feb 2014 19:30:41 +0000 (19:30 +0000)]
udevd - fix realloc usage

10 years agovnconfig - don't make it harder to script vnconfig
Alex Hornung [Tue, 18 Feb 2014 19:25:01 +0000 (19:25 +0000)]
vnconfig - don't make it harder to script vnconfig

 * There's no real need to be printing the "Using" in front of what
   anyone *really* cares about.

10 years agokernel: Mark some contigfree()/kfree() arguments as "never NULL".
Sascha Wildner [Tue, 18 Feb 2014 17:43:18 +0000 (18:43 +0100)]
kernel: Mark some contigfree()/kfree() arguments as "never NULL".

Those are contigfree()'s addr and kfree()'s addr and type.
contigfree()'s type isn't actually used by the function.

10 years agosu(1)/passwd(1): Silence -Winit-self.
Sascha Wildner [Tue, 18 Feb 2014 10:25:25 +0000 (11:25 +0100)]
su(1)/passwd(1): Silence -Winit-self.

10 years agokernel/nataraid: Fix a bug for array sizes >2TB.
Sascha Wildner [Sun, 16 Feb 2014 22:51:16 +0000 (23:51 +0100)]
kernel/nataraid: Fix a bug for array sizes >2TB.

The overall array size (total_sectors) in the softc was already 64 bit
wide but due to a missing cast when multiplying the 32 bit disk size
by the number of disks, it never became larger than 32 bits.

Also, the disk size was signed when it should have been unsigned.

Note that these fixes apply to RAIDs created using natacontrol(8), but
not necessarily to those created with BIOS utilities.

Reported-by: Aaron Bieber <deftly@gmail.com>
10 years agokernel/nataraid: Add devstat support.
Sascha Wildner [Sun, 16 Feb 2014 22:57:55 +0000 (23:57 +0100)]
kernel/nataraid: Add devstat support.

10 years agohammer - Really fix VFS_STATFS() when operating volumes.
Antonio Huete Jimenez [Mon, 17 Feb 2014 15:47:49 +0000 (07:47 -0800)]
hammer - Really fix VFS_STATFS() when operating volumes.

- Correct a mistake in the previous "fix". Compute the
  total number of blocks based on the bigblock count which
  was already updated.
- Take care of stats also on volume deletion.

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

10 years agoclockmod: Add more errata checks for old CPUs
Sepherosa Ziehau [Mon, 17 Feb 2014 11:50:30 +0000 (19:50 +0800)]
clockmod: Add more errata checks for old CPUs

Obtained-from: FreeBSD p4tcc.c

10 years agoman: Add perfbias.4 and clockmod.4
Sepherosa Ziehau [Mon, 17 Feb 2014 11:44:54 +0000 (19:44 +0800)]
man: Add perfbias.4 and clockmod.4

10 years agoperfbias.4: Add man page
Sepherosa Ziehau [Mon, 17 Feb 2014 11:44:41 +0000 (19:44 +0800)]
perfbias.4: Add man page

10 years agoclockmod.4: Add man page
Sepherosa Ziehau [Mon, 17 Feb 2014 11:44:18 +0000 (19:44 +0800)]
clockmod.4: Add man page

10 years agokernel/nataraid: Fix nVidia MediaShield metadata kprintfs for unsigned.
Sascha Wildner [Sun, 16 Feb 2014 19:50:35 +0000 (20:50 +0100)]
kernel/nataraid: Fix nVidia MediaShield metadata kprintfs for unsigned.

10 years agodrm/i915: Partially sync headers with Linux 3.8
François Tigeot [Sun, 16 Feb 2014 18:19:28 +0000 (19:19 +0100)]
drm/i915: Partially sync headers with Linux 3.8

10 years agodrm: Reduce differences with Linux 3.8
François Tigeot [Sun, 16 Feb 2014 10:43:25 +0000 (11:43 +0100)]
drm: Reduce differences with Linux 3.8

* Support the DRM_CAP_TIMESTAMP_MONOTONIC IOCTL

* Improvements in CRTC, connectors and EDID/modes handling

10 years agocoretemp: Add to i386 and x86_64 GENERIC
Sepherosa Ziehau [Sun, 16 Feb 2014 08:57:24 +0000 (16:57 +0800)]
coretemp: Add to i386 and x86_64 GENERIC

It works after recent fixes to acpica.

10 years agop4tcc: Nuke; replaced by clockmod(4)
Sepherosa Ziehau [Sun, 16 Feb 2014 08:40:37 +0000 (16:40 +0800)]
p4tcc: Nuke; replaced by clockmod(4)

10 years agoclockmod: Properly implement Intel software controlled clock modulation
Sepherosa Ziehau [Wed, 12 Feb 2014 14:15:29 +0000 (22:15 +0800)]
clockmod: Properly implement Intel software controlled clock modulation

Compared w/ the out dated p4tcc code in i386:

- Write the MSR on the correct CPU.
- Fix errata detection.
- Enable 6.25% granularity.
- Fix logical CPU setting by introducing clock modulation domain.  Each
  domain contains logical CPUs in the same core.  When changing duty
  cycle we change all logical CPUs' duty cycle in the same domain; mainly
  to avoid model specific reaction to logical CPU duty cycle change.

It is controlled through machdep.clockmod_domX.select.  Members of the
domain are listed by machdep.clockmod_domX.members.  And the available
duty cycles are listed by machdep.clockmod_domX.available.

It is enabled in i386 and x86_64 GENERIC.

* We may want to make powerd(8) aware of clockmod(4)

10 years agorc: Fix a typo in a comment.
Sascha Wildner [Sat, 15 Feb 2014 22:12:50 +0000 (23:12 +0100)]
rc: Fix a typo in a comment.

10 years agodrm: Manage struct drm_file with Linux list APIs
François Tigeot [Sat, 15 Feb 2014 17:00:26 +0000 (18:00 +0100)]
drm: Manage struct drm_file with Linux list APIs

10 years agoacpica: Start task thread after all children of acpi are attached
Sepherosa Ziehau [Sat, 15 Feb 2014 13:37:44 +0000 (21:37 +0800)]
acpica: Start task thread after all children of acpi are attached

So driver's post attach callback will run only after all devices of the
driver are properly attached.  Even when some devices' attach path is
blocked or moved to other CPU.

10 years agoperfbias: Set to highest performance on detach path
Sepherosa Ziehau [Sat, 15 Feb 2014 12:20:27 +0000 (20:20 +0800)]
perfbias: Set to highest performance on detach path

10 years agoUpdate the pciconf(8) database.
Sascha Wildner [Sat, 15 Feb 2014 09:02:46 +0000 (10:02 +0100)]
Update the pciconf(8) database.

February 14, 2014 snapshot from http://pciids.sourceforge.net/

10 years agorcrun(8): Properly handle scripts that provide more than one keyword.
Sascha Wildner [Fri, 14 Feb 2014 21:15:14 +0000 (22:15 +0100)]
rcrun(8): Properly handle scripts that provide more than one keyword.

The loop that checks if all dependencies of the target are running
didn't take into account that there could be more than one PROVIDE
keyword in one script. It treated all PROVIDEs which were not named
like the target as not yet running dependencies and failed.

To fix, loop through the PROVIDEs twice, the first time to skip all
the PROVIDEs of the script if the target is one of them.

All this is due to the output of "rcorder -o ..." having the script
that provides the target which we want to run as its last element,
so document that with a comment.

Reported-by: joris
10 years agommap - honour hint address (properly) even if randomization is on
Alex Hornung [Fri, 14 Feb 2014 20:57:16 +0000 (20:57 +0000)]
mmap - honour hint address (properly) even if randomization is on

10 years agorc.conf.5: Fix SEE ALSO order.
Sascha Wildner [Thu, 13 Feb 2014 21:42:13 +0000 (22:42 +0100)]
rc.conf.5: Fix SEE ALSO order.

10 years agokernel: Fix topology fallout for vkernel and i386.
Sascha Wildner [Thu, 13 Feb 2014 10:08:00 +0000 (11:08 +0100)]
kernel: Fix topology fallout for vkernel and i386.

* No need to fix AMD topology in vkernel.

* Expose compute_unit_id in i386 too. It stays -1 always.

Reported-by: tuxillo
10 years agolibutil/pw_util.3: Fix two prototypes.
Sascha Wildner [Wed, 12 Feb 2014 22:43:12 +0000 (23:43 +0100)]
libutil/pw_util.3: Fix two prototypes.

10 years agologin.conf.5: Add a missing space.
Sascha Wildner [Wed, 12 Feb 2014 20:02:23 +0000 (21:02 +0100)]
login.conf.5: Add a missing space.

10 years agoacpi: Move osdragonflytbl.c where it belongs in the contrib dir.
Sascha Wildner [Wed, 12 Feb 2014 17:46:17 +0000 (18:46 +0100)]
acpi: Move osdragonflytbl.c where it belongs in the contrib dir.

10 years agoCPU Topology: add support for Compute Units on AMD processors
Mihai Carabas [Wed, 12 Feb 2014 11:10:38 +0000 (13:10 +0200)]
CPU Topology: add support for Compute Units on AMD processors

Detect shared compute units between cores on AMD processors and downgrade
them to THREAD_LEVEL in the logical CPU topology used by the
scheduler.

10 years agoacpi: Move acdragonfly.h to where all host config files reside.
Sascha Wildner [Tue, 11 Feb 2014 20:54:14 +0000 (21:54 +0100)]
acpi: Move acdragonfly.h to where all host config files reside.

I will submit the file and the acenv.h adjustment to Intel.

10 years agouuidgen(1): Move sources to src/bin
François Tigeot [Tue, 11 Feb 2014 20:17:19 +0000 (21:17 +0100)]
uuidgen(1): Move sources to src/bin

The binary was installed into /bin ; keeping its sources into src/usr.bin
was confusing.

10 years agoacpi: Clean up acdragonfly.h a bit.
Sascha Wildner [Tue, 11 Feb 2014 17:24:12 +0000 (18:24 +0100)]
acpi: Clean up acdragonfly.h a bit.

* Add ACPI_USE_DO_WHILE_0 to enclose (debug) macros in a do {} while (0)
  loop per our style(9).

* Remove unused __cli() and __sti().

* Shuffle things around a bit to reduce #ifdef _KERNEL ... sections.

10 years agox86_64: Add machdep.cpu.mwait.bm_sts to bypass BM_STS check
Sepherosa Ziehau [Tue, 11 Feb 2014 12:21:00 +0000 (20:21 +0800)]
x86_64: Add machdep.cpu.mwait.bm_sts to bypass BM_STS check

Default still applies BM_STS check.  Useful for some broken BIOS.

10 years agokernel/drm: Fix some warnings due to our vm_paddr_t being 64 bits on i386.
Sascha Wildner [Mon, 10 Feb 2014 19:42:05 +0000 (20:42 +0100)]
kernel/drm: Fix some warnings due to our vm_paddr_t being 64 bits on i386.

10 years agokernel/i915: Add missing prototype.
Sascha Wildner [Mon, 10 Feb 2014 19:37:08 +0000 (20:37 +0100)]
kernel/i915: Add missing prototype.

10 years agolibutil: Fix a bunch of manual page issues.
Sascha Wildner [Tue, 11 Feb 2014 10:43:51 +0000 (11:43 +0100)]
libutil: Fix a bunch of manual page issues.

10 years agoswapcache - Fix token leak
Matthew Dillon [Tue, 11 Feb 2014 02:20:30 +0000 (18:20 -0800)]
swapcache - Fix token leak

* vmobjlst tokens can build up in the swapcache thread due to a label
  in the wrong place.  This eventually panics the box.

Reported-by: ftigeot
10 years agokernel: Sync ACPICA with Intel's version 20140114.
Sascha Wildner [Sun, 9 Feb 2014 20:42:03 +0000 (21:42 +0100)]
kernel: Sync ACPICA with Intel's version 20140114.

Module changes:

* Improved validation for AcpiInstallGpeBlock.

* Support "references" in ACPI_OBJECT (mainly for testing purposes).

* Improve support for 32/64 bit physical addresses in printf()-like
  output.

Utilities changes:

* iasl(8): Fix a fault when using Connection().

* acpiexec(8): Loading local test tables is now optional.

* acpiexec(8): Support for overlapping operation regions.

* acpiexec(8): Add region handler support for PCI_Config and
    EC spaces.

* acpiexec(8): New "test" command.

* Update the copyrights for 2014.

For a more detailed list, see sys/contrib/dev/acpica/changes.txt.

10 years agolibutil: Remove expand_number(3)
John Marino [Sun, 9 Feb 2014 20:10:05 +0000 (21:10 +0100)]
libutil: Remove expand_number(3)

This new function is functionally identical to dehumanize_number(3).
There is no apparently benefit to have two implementations so I am
removing the new one which is not used anywhere.  The manpage was never
hooked into the build (a mistake) so removing it leaves no leftovers.

At the same time, restore the humanize_number man page which had seen
the dehumanize_number function description removed accidently during
the recent libutil sync.

Discussed-with: swildner and dillon

10 years agodaemon(8): Add -P, -r, -u options from FreeBSD
John Marino [Sun, 9 Feb 2014 17:47:52 +0000 (18:47 +0100)]
daemon(8): Add -P, -r, -u options from FreeBSD

This is a full sync with FreeBSD.  The DragonFly daemon hasn't been
significantly updated in years.  The sync brings in:

option -P supervisor pidfile
  This writes the pid of the daemon process in the specified file.
  It gets removed automatically similarly to the child pidfile

option -u user
  It executes the command using the credentials the the specified
  user, and it requires the superuser to invoke it.

option -r restart
  This acts like a watchdog and restarts a program that terminates

The update requires an update to libutil in order to use the same
pidfile handling that FreeBSD uses.

10 years agolibutil: Various updates from FreeBSD, esp. pid_* functions
John Marino [Sun, 9 Feb 2014 14:21:13 +0000 (15:21 +0100)]
libutil: Various updates from FreeBSD, esp. pid_* functions

It appears that libutil.so is another Frankenstein monster where half
of it came from FreeBSD and later it was updated with NetBSD functions.
Like libm, this causes problems with syncing later.

In order to update the daemon program, the set of pidfile_* functions
had to be brought in from FreeBSD.  While doing that, I synced with
FreeBSD as much as possible.  The expand number function was added
as well as a dedicated pw_util man page.

Specifically ignored were FreeBSD functionality involving kinfo and kld.
The login functions are essentially incompatible as the FreeBSD ones
require syscntls, so I left the NetBSD versions alone.  The various
humanize functions that only exist on DragonFly were also left untouched.

Collateral damage included:
  sbin/devd/devd.[ch][ch]       (partial sync)
  usr.sbin/authpf/authpf.c      (partial sync)
  usr.sbin/apmd/apmd.c
  usr.sbin/battd/battd.c
  usr.sbin/bthcid/bthcid.c
  usr.sbin/pflogd/pflogd.c
  usr.sbin/rwhod/rwhod.c
  usr.sbin/syslogd/             (full sync)
  usr.sbin/sysvipcd/sysvipcd.c

10 years agotools/mwait_mon: Monitor mwait C-state hint usage
Sepherosa Ziehau [Sun, 9 Feb 2014 12:19:26 +0000 (20:19 +0800)]
tools/mwait_mon: Monitor mwait C-state hint usage

10 years agotools/toeplitz: Install to /usr/local/bin
Sepherosa Ziehau [Sun, 9 Feb 2014 12:18:11 +0000 (20:18 +0800)]
tools/toeplitz: Install to /usr/local/bin

10 years agox86_64/mwait: Ramp up faster, if all C1 states are iterated
Sepherosa Ziehau [Sun, 9 Feb 2014 12:12:19 +0000 (20:12 +0800)]
x86_64/mwait: Ramp up faster, if all C1 states are iterated

10 years agodrm/i915: Move more code to intel_pm.c
François Tigeot [Sun, 9 Feb 2014 08:24:55 +0000 (09:24 +0100)]
drm/i915: Move more code to intel_pm.c

Taken from i915_dma.c this time

10 years agodrm/i915: Add intel_pm.c
François Tigeot [Sun, 9 Feb 2014 07:59:38 +0000 (08:59 +0100)]
drm/i915: Add intel_pm.c

Move various functions and structures from intel_display.c to this file,
putting them in the same place as they are in Linux.

10 years agotools/diag: Remove FreeBSD specific 'ac' script.
Sascha Wildner [Sun, 9 Feb 2014 05:44:09 +0000 (06:44 +0100)]
tools/diag: Remove FreeBSD specific 'ac' script.

10 years agoee(1): Switch over to ee 1.5.2
Sascha Wildner [Sun, 9 Feb 2014 05:27:41 +0000 (06:27 +0100)]
ee(1): Switch over to ee 1.5.2

Taken-from: FreeBSD

10 years agoMerge branch 'vendor/EE'
Sascha Wildner [Sun, 9 Feb 2014 05:09:01 +0000 (06:09 +0100)]
Merge branch 'vendor/EE'

10 years agoImport ee 1.5.2 gitea/vendor/EE origin/vendor/EE
Sascha Wildner [Sun, 9 Feb 2014 05:08:42 +0000 (06:08 +0100)]
Import ee 1.5.2

10 years agoAdd missing newlines at EOF in a couple of files.
Sascha Wildner [Sat, 8 Feb 2014 16:38:54 +0000 (17:38 +0100)]
Add missing newlines at EOF in a couple of files.

10 years agofetch.1: Use .Mt for email address.
Sascha Wildner [Sat, 8 Feb 2014 15:56:24 +0000 (16:56 +0100)]
fetch.1: Use .Mt for email address.

10 years agodrm: Implement and use drm_send_vblank_event()
François Tigeot [Sat, 8 Feb 2014 10:37:10 +0000 (11:37 +0100)]
drm: Implement and use drm_send_vblank_event()

10 years agodrm: Implement mutex_is_locked()
François Tigeot [Sat, 8 Feb 2014 09:06:54 +0000 (10:06 +0100)]
drm: Implement mutex_is_locked()

10 years agodrm: Move drm_open() and drm_firstopen() to drm_fops.c
François Tigeot [Fri, 7 Feb 2014 18:15:33 +0000 (19:15 +0100)]
drm: Move drm_open() and drm_firstopen() to drm_fops.c

* That's where they are located on Linux

* Also rename drm_firstopen() to drm_setup() to further reduce
  differences

10 years agodrm/drm_bufs.c: Reduce differences with Linux
François Tigeot [Fri, 7 Feb 2014 09:56:02 +0000 (10:56 +0100)]
drm/drm_bufs.c: Reduce differences with Linux

Make sure functions have the same prototypes and top of body comments as their
corresponding versions in Linux 3.9

10 years agoacpi/cstate: Remove unnecessary bus_generic_{attach,probe}()
Sepherosa Ziehau [Sat, 8 Feb 2014 11:47:00 +0000 (19:47 +0800)]
acpi/cstate: Remove unnecessary bus_generic_{attach,probe}()

They were inheritted when acpi_cpu_cstate.c was splitted from acpi_cpu.c.
C-state is a leaf device, nothing will be its children.

10 years agoacpica/cpu: Add missing bus_generic_probe
Sepherosa Ziehau [Sat, 8 Feb 2014 11:42:14 +0000 (19:42 +0800)]
acpica/cpu: Add missing bus_generic_probe

Used by coretemp(4) and perfbias(4).  Maybe many others

10 years agoperfbias: Implement Intel performance-energy hint support
Sepherosa Ziehau [Fri, 7 Feb 2014 13:16:59 +0000 (21:16 +0800)]
perfbias: Implement Intel performance-energy hint support

This hint is set on per-logical CPU.  0 delivers highest performance;
15 maximizes energy saving.  It could be set through sysctl nodes
machdep.perfbiasX (X is the CPU id).

It is linked into i386 and x86_64 GENERIC kernel.

* We may want to make powerd(8) to aware of these sysctls.

10 years agokernel: Revert the callout_stop_sync() changes in the wlan stack.
Sascha Wildner [Sat, 8 Feb 2014 08:32:24 +0000 (09:32 +0100)]
kernel: Revert the callout_stop_sync() changes in the wlan stack.

Our locking is quite different here and it could cause a deadlock with
ieee80211_newstate_task().

Pointed-out-by: sephe
10 years agokernel: Use callout_stop_sync() in a number of drivers.
Sascha Wildner [Sat, 8 Feb 2014 07:49:17 +0000 (08:49 +0100)]
kernel: Use callout_stop_sync() in a number of drivers.

10 years agocallout.9: Mention callout_stop_sync().
Sascha Wildner [Sat, 8 Feb 2014 07:37:04 +0000 (08:37 +0100)]
callout.9: Mention callout_stop_sync().

10 years agolibc: Create MLINKS for hesiod(3) too when it is requested.
Sascha Wildner [Wed, 5 Feb 2014 17:17:37 +0000 (18:17 +0100)]
libc: Create MLINKS for hesiod(3) too when it is requested.