]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-sparc64/vio.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
[linux-2.6-omap-h63xx.git] / include / asm-sparc64 / vio.h
index 83c96422e9d61deba94a0cb9ee446b81d1b7a266..d4de32f0f8afdb849495f29aff26f3c0f004f7d3 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/spinlock.h>
 #include <linux/completion.h>
 #include <linux/list.h>
+#include <linux/log2.h>
 
 #include <asm/ldc.h>
 #include <asm/mdesc.h>
@@ -257,14 +258,13 @@ static inline void *vio_dring_entry(struct vio_dring_state *dr,
 static inline u32 vio_dring_avail(struct vio_dring_state *dr,
                                  unsigned int ring_size)
 {
-       /* Ensure build-time power-of-2.  */
-       BUILD_BUG_ON(ring_size & (ring_size - 1));
+       BUILD_BUG_ON(!is_power_of_2(ring_size));
 
        return (dr->pending -
                ((dr->prod - dr->cons) & (ring_size - 1)));
 }
 
-#define VIO_MAX_TYPE_LEN       64
+#define VIO_MAX_TYPE_LEN       32
 #define VIO_MAX_COMPAT_LEN     64
 
 struct vio_dev {
@@ -275,6 +275,8 @@ struct vio_dev {
        char                    compat[VIO_MAX_COMPAT_LEN];
        int                     compat_len;
 
+       u64                     dev_no;
+
        unsigned long           channel_id;
 
        unsigned int            tx_irq;