dragonfly.git
18 months agorcorder(8): Whitespace fix.
Sascha Wildner [Tue, 16 Oct 2012 04:36:35 +0000 (06:36 +0200)]
rcorder(8): Whitespace fix.

18 months agomonitor(1): Check kevent().
Sascha Wildner [Tue, 16 Oct 2012 04:36:09 +0000 (06:36 +0200)]
monitor(1): Check kevent().

Found-by: gcc47
18 months agodfregress(8): Check prop_dictionary_get_uint32()'s return value.
Sascha Wildner [Tue, 16 Oct 2012 02:59:08 +0000 (04:59 +0200)]
dfregress(8): Check prop_dictionary_get_uint32()'s return value.

Consistent with the rest of the file.

Found-by: gcc47
18 months agobrandelf(1): Make -v a no-op.
Sascha Wildner [Tue, 16 Oct 2012 02:51:22 +0000 (04:51 +0200)]
brandelf(1): Make -v a no-op.

-v never did anything, so remove the verbose variable and comment it out
in the manpage, but leave the option for compatibility.

Found-by: gcc47
18 months agoifpoll: Adjust default parameters for 1000Mbps network
Sepherosa Ziehau [Mon, 15 Oct 2012 13:30:13 +0000 (21:30 +0800)]
ifpoll: Adjust default parameters for 1000Mbps network

18 months agoigb: Per-device TX/RX descriptor count tunables
Sepherosa Ziehau [Mon, 15 Oct 2012 13:05:37 +0000 (21:05 +0800)]
igb: Per-device TX/RX descriptor count tunables

18 months agoigb: Cache align software TX/RX descriptors
Sepherosa Ziehau [Mon, 15 Oct 2012 09:27:03 +0000 (17:27 +0800)]
igb: Cache align software TX/RX descriptors

18 months agoigb: Move uncommonly accessed fields to the end of the struct
Sepherosa Ziehau [Mon, 15 Oct 2012 09:19:57 +0000 (17:19 +0800)]
igb: Move uncommonly accessed fields to the end of the struct

18 months agoAdd dragonfly.vim, for changing vim indentation rules to match style(9).
Sascha Wildner [Mon, 15 Oct 2012 07:16:38 +0000 (09:16 +0200)]
Add dragonfly.vim, for changing vim indentation rules to match style(9).

Assuming it works, haven't personally used it.

Taken-from: FreeBSD

18 months agoUpdate the pciconf(8) database.
Sascha Wildner [Mon, 15 Oct 2012 06:58:31 +0000 (08:58 +0200)]
Update the pciconf(8) database.

October 14, 2012 snapshot from http://pciids.sourceforge.net/

18 months agousb4bsd: Regenerate usbdevs.h and usbdevs_data.h.
Sascha Wildner [Sun, 14 Oct 2012 21:41:33 +0000 (23:41 +0200)]
usb4bsd: Regenerate usbdevs.h and usbdevs_data.h.

18 months agousb4bsd: Sync usbdevs with FreeBSD.
Sascha Wildner [Sun, 14 Oct 2012 21:38:08 +0000 (23:38 +0200)]
usb4bsd: Sync usbdevs with FreeBSD.

18 months agousb4bsd: Add usb_quirk module.
Sascha Wildner [Sun, 14 Oct 2012 20:10:30 +0000 (22:10 +0200)]
usb4bsd: Add usb_quirk module.

18 months agousb4bsd: Makefile cleanup.
Sascha Wildner [Sun, 14 Oct 2012 19:40:29 +0000 (21:40 +0200)]
usb4bsd: Makefile cleanup.

18 months agousb4bsd: Sort files a bit better in 'files' (from FreeBSD).
Sascha Wildner [Sun, 14 Oct 2012 19:13:28 +0000 (21:13 +0200)]
usb4bsd: Sort files a bit better in 'files' (from FreeBSD).

18 months agoemx: Cache align software TX/RX descriptors
Sepherosa Ziehau [Sun, 14 Oct 2012 13:34:28 +0000 (21:34 +0800)]
emx: Cache align software TX/RX descriptors

18 months agoemx: Group TX related fields into emx_txdata; use it in TX related functions
Sepherosa Ziehau [Sun, 14 Oct 2012 13:19:29 +0000 (21:19 +0800)]
emx: Group TX related fields into emx_txdata; use it in TX related functions

18 months agousb4bsd/controller: Use device_delete_children().
Sascha Wildner [Sun, 14 Oct 2012 13:12:08 +0000 (15:12 +0200)]
usb4bsd/controller: Use device_delete_children().

18 months agokernel: add device_delete_children()
Fran├žois Tigeot [Thu, 5 Jul 2012 07:05:18 +0000 (09:05 +0200)]
kernel: add device_delete_children()

Obtained-from: FreeBSD

18 months agomake upgrade: Remove more new USB stuff if it is not requested.
Sascha Wildner [Sun, 14 Oct 2012 12:35:43 +0000 (14:35 +0200)]
make upgrade: Remove more new USB stuff if it is not requested.

To reduce confusion when switching.

18 months agousb4bsd: Pull up libusb and usbcontrol to FreeBSD current's.
Sascha Wildner [Sun, 14 Oct 2012 12:18:21 +0000 (14:18 +0200)]
usb4bsd: Pull up libusb and usbcontrol to FreeBSD current's.

I stopped before their recent streams commit.

18 months agoBring in USB4BSD userspace libraries and utilities.
Markus Pfeiffer [Sun, 14 Oct 2012 11:00:18 +0000 (11:00 +0000)]
Bring in USB4BSD userspace libraries and utilities.

The following will now be built and installed if WANT_USB4BSD is defined.

* libusb
* usbconfig

18 months agocompilers.conf.5: Some more cleanup.
Sascha Wildner [Sun, 14 Oct 2012 08:34:36 +0000 (10:34 +0200)]
compilers.conf.5: Some more cleanup.

* Remove a reference to an old patch I did for building world with clang.
  The changes which are currently needed remain to be determined.

* Make the examples more generic and indicate that buildworld/kernel
  do not necessarily survive with the compilers listed. Also, stuff them
  into an EXAMPLES section.

* Add a comma.

Reported-by: Carsten Mattner <carstenmattner@gmail.com>
18 months agovkernel - Adjust parameters for vkernel test build
Matthew Dillon [Sat, 13 Oct 2012 17:22:02 +0000 (10:22 -0700)]
vkernel - Adjust parameters for vkernel test build

* Increase root partition from 512M to 2G to accomodate DEBUG_FLAGS=-g
  kernels.

* Increase default memory from 128M to 256M

* Create the /var/vkernel directory if necessary.

18 months agokernel - set machdep.pmap_mmu_optimize to 1 by default in master
Matthew Dillon [Sat, 13 Oct 2012 17:16:04 +0000 (10:16 -0700)]
kernel - set machdep.pmap_mmu_optimize to 1 by default in master

* Set machdep.pmap_mmu_optimize to 1 by default in master.

* Note that the sysctl will be left defaulted to 0 in the 3.2 release
  because it is too new a feature.  However, we believe it to be stable.

18 months agokernel - Fix sysclock_t comparison in usched code
Matthew Dillon [Sat, 13 Oct 2012 17:11:43 +0000 (10:11 -0700)]
kernel - Fix sysclock_t comparison in usched code

* Fix a sysclock_t comparison that was attempting to detect an overflow
  by checking if an unsigned field was negative.  The field has
  to be cast to signed for the test to work as expected.

Reported-by: enjolras
18 months agoHAMMER VFS - Use full-block undos for B-Tree nodes
Matthew Dillon [Sat, 13 Oct 2012 17:03:03 +0000 (10:03 -0700)]
HAMMER VFS - Use full-block undos for B-Tree nodes

* Use a full-block undos instead of small byte-range undos for
  B-Tree nodes.

  There is no bug here per-say, but we are trying to improve
  HAMMER's ability to recover after a power failure where a disk
  drive is writing to the platter at the time of the failure.
  While we have no control over any unrelated sectors that might
  get smashed by such an event, the concern is that sectors being
  specifically written might get corrupted beyond the ability for
  the byte-range undo to fix.

  The reason is that if, say, only 50 bytes in a B-Tree node need
  updating, HAMMER must still do a 16K physical write to disk, so
  really any portion of that 16K can wind up corrupt on a power
  failure, not just the 50 bytes being changed.

  So instead of writing a byte-ranged 50-byte UNDO we now write
  a 16K undo for B-Tree elements.

* The hope is that this will improve cases where HAMMER has become
  unmountable due to CRC errors in the B-Tree closer to the root of
  the B-Tree (which are usually updated to update only the mirror_tid)

Reported-by: sgeorge, marino
18 months agomake device_probe_child() public
Tim [Tue, 25 Jan 2011 05:29:55 +0000 (21:29 -0800)]
make device_probe_child() public

18 months agomxge(4): Fix "always_inline function might not be inlinable" warning.
Sascha Wildner [Sat, 13 Oct 2012 13:36:58 +0000 (15:36 +0200)]
mxge(4): Fix "always_inline function might not be inlinable" warning.

The '__attribute__((always_inline))' does not strictly imply 'inline'.
Newer versions of gcc detect this misuse and issue the warning.
Including the missing 'inline' resolves the build warning.

18 months agocompilers.conf.5: Remove docs about *_VERSION, it no longer exists.
Sascha Wildner [Sat, 13 Oct 2012 05:53:04 +0000 (07:53 +0200)]
compilers.conf.5: Remove docs about *_VERSION, it no longer exists.

18 months agosleep.9: Really write PINTERLOCKED in the example.
Sascha Wildner [Fri, 12 Oct 2012 19:38:50 +0000 (21:38 +0200)]
sleep.9: Really write PINTERLOCKED in the example.

Reported-by: vsrinivas
18 months agousb4bsd/ehci: Fix EHCI resetting (and thus, intialization & attach).
Sascha Wildner [Fri, 12 Oct 2012 19:29:22 +0000 (21:29 +0200)]
usb4bsd/ehci: Fix EHCI resetting (and thus, intialization & attach).

No need for PINTERLOCKED here.

Reported-by: ftigeot, tuxillo
In-discussion-with: vsrinivas

18 months agosleep.9: s/PINTERLOCK/PINTERLOCKED/
Sascha Wildner [Fri, 12 Oct 2012 19:27:22 +0000 (21:27 +0200)]
sleep.9: s/PINTERLOCK/PINTERLOCKED/

18 months agousb4bsd/ehci: Ouch, fix a bug in the Makefile.
Sascha Wildner [Fri, 12 Oct 2012 17:56:15 +0000 (19:56 +0200)]
usb4bsd/ehci: Ouch, fix a bug in the Makefile.

It was taking a wrong file and this caused ehci to not properly initialize
when loaded as a module (like it is our default).

Note that this is my fault, not Markus Pfeiffer's. I had messed with the
Makefiles and it was a copy/paste error.

Reported-by: ftigeot, tuxillo
18 months agousb4bsd: Use NULL for pointers.
Sascha Wildner [Fri, 12 Oct 2012 16:59:04 +0000 (18:59 +0200)]
usb4bsd: Use NULL for pointers.

18 months agousb4bsd/controller: Remove some unused module declarations.
Sascha Wildner [Fri, 12 Oct 2012 16:52:41 +0000 (18:52 +0200)]
usb4bsd/controller: Remove some unused module declarations.

18 months agousb4bsd: Remove more unused files.
Sascha Wildner [Fri, 12 Oct 2012 16:46:01 +0000 (18:46 +0200)]
usb4bsd: Remove more unused files.

18 months agousb4bsd: Remove unused ARM related files.
Sascha Wildner [Fri, 12 Oct 2012 16:32:29 +0000 (18:32 +0200)]
usb4bsd: Remove unused ARM related files.

18 months agoFix 'make upgrade', it was broken.
Sascha Wildner [Fri, 12 Oct 2012 15:15:44 +0000 (17:15 +0200)]
Fix 'make upgrade', it was broken.

18 months agoemx: Pass emx_rxdata to RX related functions
Sepherosa Ziehau [Fri, 12 Oct 2012 10:00:46 +0000 (18:00 +0800)]
emx: Pass emx_rxdata to RX related functions

18 months agoemx: Add comment and add assertion about serializer initialization
Sepherosa Ziehau [Fri, 12 Oct 2012 03:34:55 +0000 (11:34 +0800)]
emx: Add comment and add assertion about serializer initialization

18 months agousb4bsd/audio: Some porting work in uaudio_pcm.c.
Sascha Wildner [Fri, 12 Oct 2012 09:05:13 +0000 (11:05 +0200)]
usb4bsd/audio: Some porting work in uaudio_pcm.c.

* Locking fixes (by ftigeot).

* Comment out unknown methods for now.

* Adjust include path.

With this it only whines on mixer_get_lock() which we don't have.

18 months agokernel/sound: Add PCMTRIG_COMMON (from FreeBSD).
Sascha Wildner [Fri, 12 Oct 2012 09:03:36 +0000 (11:03 +0200)]
kernel/sound: Add PCMTRIG_COMMON (from FreeBSD).

18 months agokernel: Comment out the new uaudio_pcm.c for now, it doesn't build yet.
Sascha Wildner [Fri, 12 Oct 2012 09:03:06 +0000 (11:03 +0200)]
kernel: Comment out the new uaudio_pcm.c for now, it doesn't build yet.

18 months agocustomcc/compilers.conf: Some adjustments and simplifications.
Sascha Wildner [Fri, 12 Oct 2012 08:57:12 +0000 (10:57 +0200)]
customcc/compilers.conf: Some adjustments and simplifications.

* pkgsrc's clang no longer needs special handling for C++ compilation.

* Use gcc44's cpp, gcc41 is gone.

* -dumpversion is now understool by both pkgsrc's and SVN trunk's
  clang, so no special handling needed for that either.

Based on an older patch I did with Juan Francisco a year ago.

Reported-by: Juan Francisco Cantero Hurtado <iam@juanfra.info>
               Joris Giovannangeli <joris@giovannangeli.fr>
Tested-by: Joris Giovannangeli <joris@giovannangeli.fr>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2205>

18 months agokernel: Some adjustments for the GCC 4.1 removal in Makefiles.
Sascha Wildner [Fri, 12 Oct 2012 08:16:20 +0000 (10:16 +0200)]
kernel: Some adjustments for the GCC 4.1 removal in Makefiles.

18 months agoUPDATING: Some words about GCC 4.7.
Sascha Wildner [Fri, 12 Oct 2012 08:12:57 +0000 (10:12 +0200)]
UPDATING: Some words about GCC 4.7.

18 months agocompilers.conf.5: We only describe non-base compilers here.
Sascha Wildner [Fri, 12 Oct 2012 07:53:20 +0000 (09:53 +0200)]
compilers.conf.5: We only describe non-base compilers here.

"gcc47" is no longer handled via compilers.conf.

18 months agokernel: Add KOBJMETHOD_END and use it.
Sascha Wildner [Fri, 12 Oct 2012 07:34:00 +0000 (09:34 +0200)]
kernel: Add KOBJMETHOD_END and use it.

18 months agousb4bsd/uether: Missing argument in usb_ether_method's ue_ioctl() member.
Sascha Wildner [Fri, 12 Oct 2012 06:25:36 +0000 (08:25 +0200)]
usb4bsd/uether: Missing argument in usb_ether_method's ue_ioctl() member.

18 months agousb4bsd/if_udav: Comment out a variable (usage is not yet enabled).
Sascha Wildner [Fri, 12 Oct 2012 06:24:06 +0000 (08:24 +0200)]
usb4bsd/if_udav: Comment out a variable (usage is not yet enabled).

18 months agousb4bsd/audio: 'static' has to be at the beginning of the declaration.
Sascha Wildner [Fri, 12 Oct 2012 06:23:02 +0000 (08:23 +0200)]
usb4bsd/audio: 'static' has to be at the beginning of the declaration.

18 months agoRemove old USB stuff when the new stack is requested.
Sascha Wildner [Fri, 12 Oct 2012 05:44:34 +0000 (07:44 +0200)]
Remove old USB stuff when the new stack is requested.

18 months agoMakefile_upgrade.inc: Adjust modules path.
Sascha Wildner [Fri, 12 Oct 2012 05:00:48 +0000 (07:00 +0200)]
Makefile_upgrade.inc: Adjust modules path.

This can be helpful in cases where old modules for some reason
had not been cleaned when the location was still /boot/modules
and have ended up getting objcopy'd to /boot/kernel after the
location was changed.

18 months agoemx: Remove unused statistics
Sepherosa Ziehau [Fri, 12 Oct 2012 03:04:04 +0000 (11:04 +0800)]
emx: Remove unused statistics

18 months agoifpoll: Don't bark, if status poll handler does not exist
Sepherosa Ziehau [Fri, 12 Oct 2012 02:52:37 +0000 (10:52 +0800)]
ifpoll: Don't bark, if status poll handler does not exist

Since no status poll handler is allowed, don't do meaningless error logging

18 months agoifpoll: Don't pass pollhz to status poll handler
Sepherosa Ziehau [Fri, 12 Oct 2012 02:46:27 +0000 (10:46 +0800)]
ifpoll: Don't pass pollhz to status poll handler

It is not useful at all.

18 months agojme: Let callout run on CPU0, this is where main serializer is held
Sepherosa Ziehau [Fri, 12 Oct 2012 01:21:18 +0000 (09:21 +0800)]
jme: Let callout run on CPU0, this is where main serializer is held

18 months agokernel - Fix i386 pmap bug
Matthew Dillon [Thu, 11 Oct 2012 21:34:09 +0000 (14:34 -0700)]
kernel - Fix i386 pmap bug

* mpte will be NULL for KVM page table pages, there is no need to track
  the wire count.  Conditionalize-out the unwiring call.

* This is believed to be (this time for sure to the third power!) the
  PG_BUSY crash that vsrinivas was getting on i386 related to paging
  in a swapped kernel pipe buffer.

18 months agokernel - Make pcb_onfault more robust.
Matthew Dillon [Thu, 11 Oct 2012 19:12:25 +0000 (12:12 -0700)]
kernel - Make pcb_onfault more robust.

* Record the expected kernel stack pointer along with the pcb_onfault
  action.  Adjust the trap code to only take the action if the frame's
  stack pointer matches the recorded expected stack pointer.

  Otherwise this might be a recursive trap and we definitely do NOT want
  to execute the on-fault stuff in that situation.

* Prior to these changes recursive traps during uiomove()s could result
  in a kernel stack so corrupt that finding the actual cause of the panic
  becomes impossible.  This is believed to be making life difficult for us
  trying to track down a particular i386 panic.

* On x86-64 we had to increase the size of the pcb structure.  kgdb on
  kernel cores and live kernels will be effected (needs recompile).

18 months agotop - Use RES by default instead of PRES
Matthew Dillon [Thu, 11 Oct 2012 15:36:45 +0000 (08:36 -0700)]
top - Use RES by default instead of PRES

* The kernel support for PRES was removed during the SMP fine-grained
  locking work on the VM system last year so top was reporting 0K for
  everything.  Change top to go back to RES.

18 months agousb4bsd: Add uether dependency for compiling udav into the kernel.
Sascha Wildner [Thu, 11 Oct 2012 13:40:41 +0000 (15:40 +0200)]
usb4bsd: Add uether dependency for compiling udav into the kernel.

18 months agousb4bsd: Fix the compilation of the remaining drivers into the kernel.
Sascha Wildner [Thu, 11 Oct 2012 13:35:38 +0000 (15:35 +0200)]
usb4bsd: Fix the compilation of the remaining drivers into the kernel.

18 months agousb4bsd: Fix some compilation warnings.
Sascha Wildner [Thu, 11 Oct 2012 13:35:22 +0000 (15:35 +0200)]
usb4bsd: Fix some compilation warnings.

18 months agousb4bsd: Allow some parts to be built into the kernel.
Sascha Wildner [Thu, 11 Oct 2012 09:24:08 +0000 (11:24 +0200)]
usb4bsd: Allow some parts to be built into the kernel.

This is for the core support, and for uhci, ohci, ehci and xhci.

To do this, replace:

  device usb

with

  device "usb4bsd"

in the config. The quotes are needed at the moment to cope with a
weakness in our config(8) that needs fixing.

Based-on-patch-submitted-by: Markus Pfeiffer <markus.pfeiffer@morphism.de>
18 months agokernel/mii_layer: Little indentation fix.
Sascha Wildner [Thu, 11 Oct 2012 09:18:50 +0000 (11:18 +0200)]
kernel/mii_layer: Little indentation fix.

18 months agousb4bsd: Port network devices (uether, udav, axe) and hook into build.
Sascha Wildner [Thu, 11 Oct 2012 09:18:06 +0000 (11:18 +0200)]
usb4bsd: Port network devices (uether, udav, axe) and hook into build.

Submitted-by: Markus Pfeiffer <markus.pfeiffer@morphism.de>
18 months agousb4bsd: Port input devices (uep, uhid, ukbd, ums) and hook into build.
Sascha Wildner [Wed, 10 Oct 2012 22:55:15 +0000 (00:55 +0200)]
usb4bsd: Port input devices (uep, uhid, ukbd, ums) and hook into build.

Submitted-by: Markus Pfeiffer <markus.pfeiffer@morphism.de>
18 months agousb4bsd: Fixes, fixes, fixes.
Sascha Wildner [Wed, 10 Oct 2012 22:06:44 +0000 (00:06 +0200)]
usb4bsd: Fixes, fixes, fixes.

* Fix a panic when trying to free null pointer in usb_free_device.

* Fix a panic due to wrong assignment of locks.

* Fix kqueue handling.

* Add debug helpers.

Submitted-by: Markus Pfeiffer <markus.pfeiffer@morphism.de>
18 months agousb4bsd: Implement umass scsi probing on attach.
Sascha Wildner [Wed, 10 Oct 2012 21:46:53 +0000 (23:46 +0200)]
usb4bsd: Implement umass scsi probing on attach.

Submitted-by: Markus Pfeiffer <markus.pfeiffer@morphism.de>
18 months agousb4bsd: Bring in FreeBSD's uaudio driver.
Sascha Wildner [Sun, 7 Oct 2012 15:25:03 +0000 (17:25 +0200)]
usb4bsd: Bring in FreeBSD's uaudio driver.

This is based on FreeBSD SVN r231881.

Submitted-by: Markus Pfeiffer <markus.pfeiffer@morphism.de>
18 months agousb4bsd: Separate building of the old USB modules.
Sascha Wildner [Tue, 2 Oct 2012 04:21:24 +0000 (06:21 +0200)]
usb4bsd: Separate building of the old USB modules.

Don't build the old USB driver modules when WANT_USB4BSD is set.

Also, do some cleanup in some of the Makefiles, while I'm here.

18 months agousb4bsd: Cleanup pass.
Sascha Wildner [Mon, 1 Oct 2012 04:04:09 +0000 (06:04 +0200)]
usb4bsd: Cleanup pass.

* Adjust indentation, whitespace and typos.

* Uniformly use #if 0 to deactivate code instead of C comments.

18 months agousb4bsd: Hook usb, ehci, ohci, uhci, xhci, umass, and usfs into the build.
Sascha Wildner [Thu, 27 Sep 2012 07:51:55 +0000 (09:51 +0200)]
usb4bsd: Hook usb, ehci, ohci, uhci, xhci, umass, and usfs into the build.

Adds some missing Makefiles and adjusts others.

With this commit, the corresponding modules all build when WANT_USB4BSD
is set, but they are not guaranteed to work. More bugs will be fixed in
subsequent commits.

The new USB code can't yet be built into the kernel.

Submitted-by: Markus Pfeiffer <markus.pfeiffer@morphism.de>
18 months agousb4bsd: Perform the usual porting on the controller, storage and core code.
Sascha Wildner [Wed, 26 Sep 2012 17:31:51 +0000 (19:31 +0200)]
usb4bsd: Perform the usual porting on the controller, storage and core code.

malloc -> kmalloc, printf -> kprintf, locking, and so forth.

Submitted-by: Markus Pfeiffer <markus.pfeiffer@morphism.de>
18 months agousb4bsd: Generate usbdevs.h and usbdevs_data.h.
Sascha Wildner [Wed, 26 Sep 2012 16:00:13 +0000 (18:00 +0200)]
usb4bsd: Generate usbdevs.h and usbdevs_data.h.

Also, rename devlist2h.awk to usbdevs2h.awk and remove our CVS ID in
Makefile.usbdevs.

Submitted-by: Markus Pfeiffer <markus.pfeiffer@morphism.de>
18 months ago<bus/pci/pcireg.h>: Add a definition for XHCI programming interface.
Sascha Wildner [Wed, 26 Sep 2012 07:27:25 +0000 (09:27 +0200)]
<bus/pci/pcireg.h>: Add a definition for XHCI programming interface.

Submitted-by: Markus Pfeiffer <markus.pfeiffer@morphism.de>
18 months agousb4bsd: Hook the userland part into the build.
Sascha Wildner [Wed, 26 Sep 2012 00:00:09 +0000 (02:00 +0200)]
usb4bsd: Hook the userland part into the build.

Define a new make.conf(5) variable, WANT_USB4BSD, which (if set) causes
the new USB's userland to be built (similar to WANT_NETGRAPH7).

18 months agousb4bsd: Adjust header paths in libusbhid, usbhidctl, and public headers.
Sascha Wildner [Tue, 25 Sep 2012 21:15:43 +0000 (23:15 +0200)]
usb4bsd: Adjust header paths in libusbhid, usbhidctl, and public headers.

Also remove some __FBSDID's.

Submitted-by: Markus Pfeiffer <markus.pfeiffer@morphism.de>
18 months agousb4bsd: Bring in FreeBSD's libusbhid, usbhidctl and USB kernel code.
Sascha Wildner [Tue, 25 Sep 2012 21:11:40 +0000 (23:11 +0200)]
usb4bsd: Bring in FreeBSD's libusbhid, usbhidctl and USB kernel code.

In order to make it live peacefully along with our old USB code, name
all directories with new USB code *u4b* instead of *usb*.

This is FreeBSD SVN r231881.

Submitted-by: Markus Pfeiffer <markus.pfeiffer@morphism.de>
18 months agoacpi/pstate: Be lenient about wrong # of processors in the power domain
Sepherosa Ziehau [Thu, 11 Oct 2012 06:54:52 +0000 (14:54 +0800)]
acpi/pstate: Be lenient about wrong # of processors in the power domain

Some stupid BIOSes seem to consider two logic CPUs (hyperthreading) as
one CPU.  Don't bail out; just print some error messages.

Reported-by: dillon@
18 months agokernel - Use atomic op for usched_global_cpumask
Matthew Dillon [Thu, 11 Oct 2012 06:43:03 +0000 (23:43 -0700)]
kernel - Use atomic op for usched_global_cpumask

* Use atomic op for usched_global_cpumask in the cpu init code.  This
  code is serialized anyway, I think, but it is best to be safe.

* Add cpu_ccfence() to ensure that the compiler does not reorder the
  clearing of the mask in the cpusync code.

18 months agojme: Cache align software TX/RX descriptor data
Sepherosa Ziehau [Thu, 11 Oct 2012 05:55:28 +0000 (13:55 +0800)]
jme: Cache align software TX/RX descriptor data

18 months agocachealign: Fix __VM_CACHELINE_ALIGN
Sepherosa Ziehau [Thu, 11 Oct 2012 05:54:08 +0000 (13:54 +0800)]
cachealign: Fix __VM_CACHELINE_ALIGN

With-Input-from: dillon@

18 months agoktr: Use __cachealign to align ktr_cpu
Sepherosa Ziehau [Thu, 11 Oct 2012 05:52:55 +0000 (13:52 +0800)]
ktr: Use __cachealign to align ktr_cpu

The version of __VM_CACHELINE_ALIGN will not properly pad struct to
the cache line size.

Reviewed-by: dillon@
18 months agoaesni: Utilize kmalloc M_POWEROF2
Sepherosa Ziehau [Thu, 11 Oct 2012 01:53:19 +0000 (09:53 +0800)]
aesni: Utilize kmalloc M_POWEROF2

18 months agokernel - Remove debugging from i386 pmap
Matthew Dillon [Wed, 10 Oct 2012 23:43:57 +0000 (16:43 -0700)]
kernel - Remove debugging from i386 pmap

* Remove i386 pmap debugging kprintf.

18 months agokernel - Add MODULE_VERSION for if_ale
Matthew Dillon [Wed, 10 Oct 2012 23:36:19 +0000 (16:36 -0700)]
kernel - Add MODULE_VERSION for if_ale

* Seems to solve boot-time lockup when if_ale is built into the kernel
  AND also specified in /boot/loader.conf

* Related issues now being reviewed by swildner

18 months agokernel - Probable fix to vm_fault: PG_BUSY panic on i386
Matthew Dillon [Wed, 10 Oct 2012 21:47:57 +0000 (14:47 -0700)]
kernel - Probable fix to vm_fault: PG_BUSY panic on i386

* The info structure for the pmap_inval*() API is only initialized
  conditionally as an optimization.

* There was a case where the info structure was being used without
  first being initialized which matches reported panics (essentially
  a pipe buffer page in kernel memory is swapped out and the faulted back
  in during a uiomove).

Reported-by: vsrinivas, marino, several others
18 months agokernel - Fix missing LWKT token init in linprocfs
Matthew Dillon [Wed, 10 Oct 2012 20:24:59 +0000 (13:24 -0700)]
kernel - Fix missing LWKT token init in linprocfs

* Fix missing LWKT token init in linprocfs.  linprocfs_init() was not
  being called.

Reported-by: marino
18 months agokernel - Adjust cache_fullpath() API
Matthew Dillon [Wed, 10 Oct 2012 19:13:35 +0000 (12:13 -0700)]
kernel - Adjust cache_fullpath() API

* Add another argument to explicitly specify the base directory that the
  path is to be relative to.

18 months agokmalloc: Streamline the code a little bit
Sepherosa Ziehau [Wed, 10 Oct 2012 12:49:59 +0000 (20:49 +0800)]
kmalloc: Streamline the code a little bit

18 months agokmalloc: Fix comment
Sepherosa Ziehau [Wed, 10 Oct 2012 12:44:54 +0000 (20:44 +0800)]
kmalloc: Fix comment

18 months agokmalloc: Use powerof2() to detect power-of-2 size
Sepherosa Ziehau [Wed, 10 Oct 2012 12:43:27 +0000 (20:43 +0800)]
kmalloc: Use powerof2() to detect power-of-2 size

18 months agokmalloc: No need to call fls if the size is already power-of-2 aligned
Sepherosa Ziehau [Wed, 10 Oct 2012 12:40:57 +0000 (20:40 +0800)]
kmalloc: No need to call fls if the size is already power-of-2 aligned

Reduce code complexity

18 months agokmalloc_cachealign: Utilize kmalloc() chunk size aligned property
Sepherosa Ziehau [Wed, 10 Oct 2012 12:10:20 +0000 (20:10 +0800)]
kmalloc_cachealign: Utilize kmalloc() chunk size aligned property

Avoid power-of-2 rounding up if the to-be-used zone is already
aligned properly.

Suggested-by: dillon@
18 months agokmalloc: Add comment about alignment property
Sepherosa Ziehau [Wed, 10 Oct 2012 09:38:41 +0000 (17:38 +0800)]
kmalloc: Add comment about alignment property

18 months agokmalloc: Make allocation zone's chunk size align
Sepherosa Ziehau [Wed, 10 Oct 2012 09:17:12 +0000 (17:17 +0800)]
kmalloc: Make allocation zone's chunk size align

Remove no longer used macros.

Discussed-with: dillon@
Submitted-by: dillon@
18 months agojme: Put TX related stuffs into struct jme_txdata
Sepherosa Ziehau [Tue, 9 Oct 2012 09:56:55 +0000 (17:56 +0800)]
jme: Put TX related stuffs into struct jme_txdata

While I'm here, add more comment

18 months agojme: Move uncommonly accessed fields to the end of the struct
Sepherosa Ziehau [Tue, 9 Oct 2012 08:46:31 +0000 (16:46 +0800)]
jme: Move uncommonly accessed fields to the end of the struct