dragonfly.git
5 years agovkernel - Dummy pci device vkernel-pci gitea/vkernel-pci
Antonio Huete Jimenez [Sun, 9 Mar 2014 23:33:12 +0000 (16:33 -0700)]
vkernel - Dummy pci device

5 years agovkernel64 - Add bus_dma_tag_getmaxsize.
Antonio Huete Jimenez [Sun, 2 Mar 2014 14:05:50 +0000 (06:05 -0800)]
vkernel64 - Add bus_dma_tag_getmaxsize.

- Needed for the AHCI driver.

5 years agovkernel - Add a dummy nexus device
Antonio Huete Jimenez [Sun, 2 Mar 2014 13:45:15 +0000 (05:45 -0800)]
vkernel - Add a dummy nexus device

- Mostly copied from the x86_64 nexus.
- nexus0 attaches correctly to root_bus.
- Experimental.

5 years agovkernel - Fix build for 'device pci'
Antonio Huete Jimenez [Sun, 2 Mar 2014 13:42:52 +0000 (05:42 -0800)]
vkernel - Fix build for 'device pci'

- Experimental and it does nothing currently.
- Only available for vkernel64 yet.

5 years agokern: fix integer underflow in exec_shell_imgact.
minux [Sat, 1 Mar 2014 08:41:25 +0000 (00:41 -0800)]
kern: fix integer underflow in exec_shell_imgact.

was returning E2BIG whenever argv[0] is longer interp+path.
see also FreeBSD PR 155321.

5 years agovkernel - Use 'vcd0' by default.
Antonio Huete Jimenez [Sat, 1 Mar 2014 11:54:54 +0000 (03:54 -0800)]
vkernel - Use 'vcd0' by default.

- This allow booting our ISO images directly.

5 years agovirtual/vcd - Adapt for DEVFS.
Antonio Huete Jimenez [Sat, 1 Mar 2014 11:46:16 +0000 (03:46 -0800)]
virtual/vcd - Adapt for DEVFS.

- disk_setdiskinfo() call to completely configure the device.
- This allows vcd(4) to work properly on vkernels.

5 years agokernel/ixgbe: Fix building kernels with IX_RSS_DEBUG in the config.
Sascha Wildner [Sat, 1 Mar 2014 11:10:33 +0000 (12:10 +0100)]
kernel/ixgbe: Fix building kernels with IX_RSS_DEBUG in the config.

5 years agotest again
Antonio Huete Jimenez [Sat, 1 Mar 2014 00:03:12 +0000 (01:03 +0100)]
test again

5 years agotest
Sascha Wildner [Fri, 28 Feb 2014 23:45:28 +0000 (00:45 +0100)]
test

5 years agotest - Testing 1 2 3
Antonio Huete Jimenez [Fri, 28 Feb 2014 23:25:10 +0000 (00:25 +0100)]
test - Testing 1 2 3

5 years agokernel/natapci - Fix a NULL pointer dereference.
Antonio Huete Jimenez [Fri, 28 Feb 2014 13:16:02 +0000 (14:16 +0100)]
kernel/natapci - Fix a NULL pointer dereference.

- ata_devclass is NULL when no unit 0/1 is available or no
  legacy support has been detected.
- device_add_child() populates ata_devclass via make_device()
  so do not try to get information out of it when NULL.

Submitted-by: @dillon
5 years agokernel/nata - Fix a memory leak in ata-dma.
Antonio Huete Jimenez [Fri, 28 Feb 2014 13:04:50 +0000 (14:04 +0100)]
kernel/nata - Fix a memory leak in ata-dma.

5 years agox86_64/mwait: Fix sysctl node OID settings
Sepherosa Ziehau [Fri, 28 Feb 2014 11:40:11 +0000 (19:40 +0800)]
x86_64/mwait: Fix sysctl node OID settings

5 years agoix: Implement MSI-X support and enable multiple TX rings
Sepherosa Ziehau [Wed, 19 Feb 2014 12:01:35 +0000 (20:01 +0800)]
ix: Implement MSI-X support and enable multiple TX rings

Two modes are supported, if there are enough MSI-X vector:
- TX ring and RX ring processing uses independent MSI-X vector.  It
  could be useful for some most TX applocation.  It could be enabled
  by setting hw.ix.msix.agg_rxtx or hw.ixY.msix.agg_rxtx to 0.
- TX ring and RX ring processing uses same MSI-X vector.  This is the
  default.  TX ring is processed when the header write back pointer
  is moved; this avoids unecessary TX ring serialization if there is
  no TX descriptor to recollect at all.

For 82598, MSI-X is not enabled by default, due to hardware errata.  It
could be enabled by setting per-device tunable hw.ixY.msix.enable.

Multiple TX rings are enable as of this commit.  Under MSI-X mode, 32 TX
rings could be used for 82599 and X540; 16 TX rings could be used for
82598.  Once polling(4) is implemented, more TX rings could be used.

Multiple RX rings have already been enabled, however, under MSI-X mode,
16 RX rings could be used for all devices supported by this driver.

Unlike the original Intel's ixgbe, number of RX rings and number of TX
rings could be configured independently.

Remove the original Intel's ixgbe MSI-X related code, which is not used
at all.

5 years agortadvt(8): Bump WARNS to 2.
Sascha Wildner [Fri, 28 Feb 2014 08:39:35 +0000 (09:39 +0100)]
rtadvt(8): Bump WARNS to 2.

5 years agolibsmb: Bump WARNS to 2 and fix a warning.
Sascha Wildner [Fri, 28 Feb 2014 08:35:56 +0000 (09:35 +0100)]
libsmb: Bump WARNS to 2 and fix a warning.

5 years agokernel/ntfs - Remove a forgotten #if defined
Antonio Huete Jimenez [Thu, 27 Feb 2014 20:45:56 +0000 (21:45 +0100)]
kernel/ntfs - Remove a forgotten #if defined

5 years agokernel/ntfs - Fix buffer overlapping problems.
Antonio Huete Jimenez [Thu, 27 Feb 2014 20:26:49 +0000 (21:26 +0100)]
kernel/ntfs - Fix buffer overlapping problems.

- Read only one cluster at a time.
- Do not cache boot block.

Taken-from:    FreeBSD's r118035
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2388>

(Commit refs #2388 and fixes #1853)

5 years agokernel/ntfs - Fix a possible problem in bufcache.
Antonio Huete Jimenez [Thu, 27 Feb 2014 00:08:26 +0000 (01:08 +0100)]
kernel/ntfs - Fix a possible problem in bufcache.

- Avoid different block size bread() calls for the
  same blkno.
- Fix a bug in the code handling holes which could
  cause infinite loops.

Taken-from:    FreeBSD's r116620

5 years agokernel: Remove {msg,sem,shm}sys() syscalls.
Sascha Wildner [Thu, 27 Feb 2014 07:02:40 +0000 (08:02 +0100)]
kernel: Remove {msg,sem,shm}sys() syscalls.

They have become obsolete with the recent sysvipc userland work
and are not implemented in userspace either.

Thanks to marino for helping to verify that no packages were
affected by this commit.

Pointed-out-by: Mihai Carabas
5 years agokernel - Try to catch possible bug in getnewbuf()
Matthew Dillon [Thu, 27 Feb 2014 01:16:19 +0000 (17:16 -0800)]
kernel - Try to catch possible bug in getnewbuf()

* Add a debugging kprintf() and cleanup code to attempt to catch a possible
  bug in getnewbuf() where a buffer is somehow left on a vnode's clean or
  dirty list before being reused.

5 years agokernel - Fix SMP race in VMM/VMX vmclear() call
Matthew Dillon [Thu, 27 Feb 2014 01:14:39 +0000 (17:14 -0800)]
kernel - Fix SMP race in VMM/VMX vmclear() call

* Fix an SMP race.  The pcpu vti field is used to trigger cpusync's from
  other cpus and cannot be cleared by the owning cpu until after it has
  vmclear'd and stopped using the structure.

Reported-by: tuxillo
5 years agodebug - Fix build for ncptrace.c
Antonio Huete Jimenez [Wed, 26 Feb 2014 10:58:46 +0000 (11:58 +0100)]
debug - Fix build for ncptrace.c

5 years agokernel - Fix bug in last rdrand commit
Matthew Dillon [Wed, 26 Feb 2014 07:15:54 +0000 (23:15 -0800)]
kernel - Fix bug in last rdrand commit

* Fix incorrect sizeof() that I introduced.

Reported-by: alexh
5 years agokernel/usb4bsd: Add usbdevs.h to a few Makefile which need it.
Sascha Wildner [Wed, 26 Feb 2014 05:43:23 +0000 (06:43 +0100)]
kernel/usb4bsd: Add usbdevs.h to a few Makefile which need it.

5 years agokernel/usb4bsd: Remove usbdevs.h again. We generate it upon building.
Sascha Wildner [Wed, 26 Feb 2014 05:42:57 +0000 (06:42 +0100)]
kernel/usb4bsd: Remove usbdevs.h again. We generate it upon building.

5 years agokernel/ntfs - Cleanup.
Antonio Huete Jimenez [Tue, 25 Feb 2014 22:57:37 +0000 (23:57 +0100)]
kernel/ntfs - Cleanup.

- Remove NetBSD specific code.
- Removed few whitespaces.

5 years agokernel/ntfs - Fix warnings when compiling with NTFS_DEBUG
Antonio Huete Jimenez [Tue, 25 Feb 2014 22:35:29 +0000 (23:35 +0100)]
kernel/ntfs - Fix warnings when compiling with NTFS_DEBUG

5 years agoStop suppressing -Wuninitialized in userland for WARNS >= 2 and <= 4.
Sascha Wildner [Tue, 25 Feb 2014 23:03:57 +0000 (00:03 +0100)]
Stop suppressing -Wuninitialized in userland for WARNS >= 2 and <= 4.

This is from 2001 (via FreeBSD, who still have it). Since a lot of
important stuff is in that WARNS range (libc, most prominently) and
since the option has found some good bugs for us (just see the MFCs
of recent days), we definitely want it to be enabled. None of the
issues it reported turned out to be a false positive.

Do, however, turn off -Wmaybe-uninitialized in that WARNS range for
now.

Also, while here, turn on -Winit-self too.

5 years agoee(1): Temporarily lower WARNS to 1 until spell check support is fixed.
Sascha Wildner [Tue, 25 Feb 2014 22:52:17 +0000 (23:52 +0100)]
ee(1): Temporarily lower WARNS to 1 until spell check support is fixed.

I hope I can sort it out with FreeBSD soon.

5 years agorand(3): Fix up sranddev(3) a bit better.
Sascha Wildner [Tue, 25 Feb 2014 22:50:13 +0000 (23:50 +0100)]
rand(3): Fix up sranddev(3) a bit better.

In case we can't read /dev/random for the seed, try kern.random. If that
fails, use the getpid()/gettimeofday() xor. For the latter, remove the
usage of an uninitialized variable.

We should probably just abort() when kern.random can't be read.

Discussed-with: dillon

5 years agortld(1): Comment out max_stack_flags and the setting of it for now.
Sascha Wildner [Tue, 25 Feb 2014 22:44:12 +0000 (23:44 +0100)]
rtld(1): Comment out max_stack_flags and the setting of it for now.

It is only used in code that's already commented out.

5 years agoldns: Fix -Winit-self.
Sascha Wildner [Tue, 25 Feb 2014 22:42:33 +0000 (23:42 +0100)]
ldns: Fix -Winit-self.

5 years agoAdd -Winit-self to the kernel warning flags.
Sascha Wildner [Tue, 25 Feb 2014 22:41:39 +0000 (23:41 +0100)]
Add -Winit-self to the kernel warning flags.

5 years agokernel/drm: Fix -Winit-self.
Sascha Wildner [Tue, 25 Feb 2014 22:41:28 +0000 (23:41 +0100)]
kernel/drm: Fix -Winit-self.

While here, define __must_check to __heedresult, the equivalent in
DragonFly, and fix one warning which fell out.

5 years agokernel - Use add_buffer_randomness()
Matthew Dillon [Tue, 25 Feb 2014 23:07:40 +0000 (15:07 -0800)]
kernel - Use add_buffer_randomness()

* Use add_buffer_randomness() instead of add_true_randomness().  It will
  do a better job on the char array and also does a quick IBAA mix when it
  is through adding the buffer.

5 years agokernel - Fix similar register call-used bug in the padlock assembly
Matthew Dillon [Tue, 25 Feb 2014 22:55:59 +0000 (14:55 -0800)]
kernel - Fix similar register call-used bug in the padlock assembly

* Fix a bug similar to the rdrand bug in the padlock assembly

5 years agokernel - Fix bugs in rdrand, change sampling frequency
Matthew Dillon [Tue, 25 Feb 2014 22:46:02 +0000 (14:46 -0800)]
kernel - Fix bugs in rdrand, change sampling frequency

* Fix bugs in the rdrand assembly.  %ebx/%rbx is a call-saved register and
  cannot be destroyed.  For 64-bit use %r11 which is a temporary register.

* Increase the rdrand.c frequency from 1Hz to 10Hz

* add the debug.rdrand sysctl

* Use add_buffer_randomness() instead of add_true_randomness().

5 years agokernel - Change add_buffer_randomness() a little
Matthew Dillon [Tue, 25 Feb 2014 22:44:49 +0000 (14:44 -0800)]
kernel - Change add_buffer_randomness() a little

* Move the securelevel and seedenable stuff to the /dev/random code,
  remove it from add_buffer_randomness().

* Adjust GENERIC and X86_64_GENERIC to include the chip RNGs by default.

5 years agohammer2 - Refactor flush mechanics
Matthew Dillon [Wed, 19 Feb 2014 07:20:34 +0000 (23:20 -0800)]
hammer2 - Refactor flush mechanics

* Greatly simplify and reduce special cases in the flush code

* Remove the multi-layer rbtree and replace with two discrete rbtree's
  (rbtree and dbtree) representing the live state and one linked list (dbq)
  representing set-aside deleted chains that are not part of the live state.

* Cleanup some debugging junk, add more debugging junk.

* Separate flushing state flags and TIDs into their own fields instead of
  trying to use the live state flags and bref TIDs.

* Simplify transaction TID tracking.

5 years agoaibs.4: Use .Lk for the URL.
Sascha Wildner [Tue, 25 Feb 2014 21:49:29 +0000 (22:49 +0100)]
aibs.4: Use .Lk for the URL.

5 years agokm(4): Revert some email address changes at the request of Constantine.
Sascha Wildner [Tue, 25 Feb 2014 21:49:05 +0000 (22:49 +0100)]
km(4): Revert some email address changes at the request of Constantine.

Use .Lk for the URL in the manpage, too.

5 years agokernel/usb4bsd: Small -Wunused-variable fix from FreeBSD.
Sascha Wildner [Tue, 25 Feb 2014 17:46:33 +0000 (18:46 +0100)]
kernel/usb4bsd: Small -Wunused-variable fix from FreeBSD.

5 years agoarcmsr(4): Sync with FreeBSD (1.20.00.25 -> 1.20.00.29).
Sascha Wildner [Tue, 25 Feb 2014 09:27:13 +0000 (10:27 +0100)]
arcmsr(4): Sync with FreeBSD (1.20.00.25 -> 1.20.00.29).

Adds support for ARC1214, ARC1224, ARC1264, ARC1284, and ARC1883, mainly.

Unfortunately, lots of style fixes, whitespace adjustment, etc. are mixed up
in it too, so it's a rather large commit.

Also, this upgrade has so far only been tested with my ARC-1210.

5 years agommap : check the return code of dev_dmmap_single
Joris Giovannangeli [Mon, 24 Feb 2014 20:39:39 +0000 (21:39 +0100)]
mmap : check the return code of dev_dmmap_single

drm might return other codes than ENODEV. We want to fail in this
case too. This fix a path where object might be left uninitialized.

5 years agogetifaddrs.3: Point out that ifa_broadaddr isn't really a struct field.
Sascha Wildner [Mon, 24 Feb 2014 13:31:20 +0000 (14:31 +0100)]
getifaddrs.3: Point out that ifa_broadaddr isn't really a struct field.

It's another name for the ifa_dstaddr field to use for the non-P2P case.
Remove it from the struct, though, to not give wrong ideas about the
struct size for example.

Pointed-out-by: marino
5 years agogetifaddrs.3: Improve markup (.Vt for types and .Fa for struct fields).
Sascha Wildner [Mon, 24 Feb 2014 13:23:38 +0000 (14:23 +0100)]
getifaddrs.3: Improve markup (.Vt for types and .Fa for struct fields).

5 years agokernel/i386: Apply 94514bea15a0328e256cda414594fe6e631705a5 in i386 too.
Sascha Wildner [Mon, 24 Feb 2014 09:25:25 +0000 (10:25 +0100)]
kernel/i386: Apply 94514bea15a0328e256cda414594fe6e631705a5 in i386 too.

5 years agoAvoiding an infinite loop during P-state adjustment on the HP6715s notebook.
Imre Vadasz [Sun, 23 Feb 2014 00:08:12 +0000 (01:08 +0100)]
Avoiding an infinite loop during P-state adjustment on the HP6715s notebook.

The code is taken from the OpenBSD counterpart to amd0f_set_fidvid.
The infinite loop probably occurs on my HP6715s because the rvo adjustment
doesn't get applied by the hardware when entering the highest P-state
(maybe because of some kind of overvolting protection).

5 years agokernel/drm: Add missing braces.
Sascha Wildner [Mon, 24 Feb 2014 08:08:32 +0000 (09:08 +0100)]
kernel/drm: Add missing braces.

5 years agosyslogd: Fix indent.
Sascha Wildner [Sun, 23 Feb 2014 23:20:50 +0000 (00:20 +0100)]
syslogd: Fix indent.

5 years agortld: Fix indent.
Sascha Wildner [Sun, 23 Feb 2014 21:39:29 +0000 (22:39 +0100)]
rtld: Fix indent.

5 years agolibm: Fix indent.
Sascha Wildner [Sun, 23 Feb 2014 21:34:50 +0000 (22:34 +0100)]
libm: Fix indent.

5 years agolibutil: Fix indent.
Sascha Wildner [Sun, 23 Feb 2014 21:33:38 +0000 (22:33 +0100)]
libutil: Fix indent.

5 years agobsd-family-tree: Sync with FreeBSD (for DragonFly 3.6.1).
Sascha Wildner [Sun, 23 Feb 2014 19:28:24 +0000 (20:28 +0100)]
bsd-family-tree: Sync with FreeBSD (for DragonFly 3.6.1).

5 years agokernel/i386: Remove an unused ACPI prototype.
Sascha Wildner [Sun, 23 Feb 2014 15:15:16 +0000 (16:15 +0100)]
kernel/i386: Remove an unused ACPI prototype.

5 years agokernel/i386: Remove two unused math helper functions in ACPI.
Sascha Wildner [Sun, 23 Feb 2014 14:49:16 +0000 (15:49 +0100)]
kernel/i386: Remove two unused math helper functions in ACPI.

We can divide and shift 64 bit integers just fine.

These would only be needed if ACPI_USE_NATIVE_DIVIDE (see ACPI
Programmer Reference, 7.5.4) wasn't set.

5 years agohammer(8): Fix fallout from recent RB-tree change
François Tigeot [Sun, 23 Feb 2014 13:54:10 +0000 (14:54 +0100)]
hammer(8): Fix fallout from recent RB-tree change

Noticed-by: tuxillo
5 years agodrm: Use the Linux Red-Black Trees API
François Tigeot [Sun, 23 Feb 2014 07:55:21 +0000 (08:55 +0100)]
drm: Use the Linux Red-Black Trees API

linux/rbtree.h implementation obtained from the FreeBSD OFED framework.

5 years agokernel: Stop marking RB _COLOR functions as static
François Tigeot [Sun, 23 Feb 2014 07:44:27 +0000 (08:44 +0100)]
kernel: Stop marking RB _COLOR functions as static

5 years agottm: Use Linux kref API
François Tigeot [Sun, 23 Feb 2014 07:24:00 +0000 (08:24 +0100)]
ttm: Use Linux kref API

Replace custom code from FreeBSD, reduce differences with Linux 3.9

5 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.

5 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>

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

5 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.

5 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.

5 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

5 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

5 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
5 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.

5 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.

5 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.

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

5 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.

5 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.

5 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.

5 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.

5 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>
5 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.

5 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>
5 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.

5 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.

5 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.

5 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>
5 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.

5 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.

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

5 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

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

5 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.

5 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.

5 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.

5 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.

5 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. :-(

5 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.

5 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

5 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

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

5 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.