diff options
author | imp <imp@FreeBSD.org> | 2013-05-17 20:53:15 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2013-05-17 20:53:15 +0000 |
commit | f2e601b1f609fdd36ada06e3b99676da01b60102 (patch) | |
tree | ce7d8e31c374e9476ff45eda871cd5e41ec6ad21 /sys/dev | |
parent | bd997a13e8ccfe0b095528614ce2ca0271efbc9f (diff) | |
download | FreeBSD-src-f2e601b1f609fdd36ada06e3b99676da01b60102.zip FreeBSD-src-f2e601b1f609fdd36ada06e3b99676da01b60102.tar.gz |
For ARM, MIPS, and PowerPC, default to 32-byte alignment, but allow it
to be as small as 8.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/usb_freebsd.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/usb/usb_freebsd.h b/sys/dev/usb/usb_freebsd.h index 870e869..0ae4533 100644 --- a/sys/dev/usb/usb_freebsd.h +++ b/sys/dev/usb/usb_freebsd.h @@ -56,8 +56,12 @@ #if (!defined(USB_HOST_ALIGN)) || (USB_HOST_ALIGN <= 0) /* Use default value. */ #undef USB_HOST_ALIGN +#if defined(__arm__) || defined(__mips__) || defined(__powerpc__) +#define USB_HOST_ALIGN 32 /* Arm and MIPS need at least this much, if not more */ +#else #define USB_HOST_ALIGN 8 /* bytes, must be power of two */ #endif +#endif /* Sanity check for USB_HOST_ALIGN: Verify power of two. */ #if ((-USB_HOST_ALIGN) & USB_HOST_ALIGN) != USB_HOST_ALIGN #error "USB_HOST_ALIGN is not power of two." |