include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[safe/jmp/linux-2.6] / arch / ia64 / sn / kernel / bte.c
index b362d6d..cad775a 100644 (file)
@@ -3,7 +3,7 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (c) 2000-2006 Silicon Graphics, Inc.  All Rights Reserved.
+ * Copyright (c) 2000-2007 Silicon Graphics, Inc.  All Rights Reserved.
  */
 
 #include <linux/module.h>
@@ -19,6 +19,7 @@
 #include <linux/bootmem.h>
 #include <linux/string.h>
 #include <linux/sched.h>
+#include <linux/slab.h>
 
 #include <asm/sn/bte.h>
 
@@ -97,9 +98,10 @@ bte_result_t bte_copy(u64 src, u64 dest, u64 len, u64 mode, void *notification)
                return BTE_SUCCESS;
        }
 
-       BUG_ON((len & L1_CACHE_MASK) ||
-                (src & L1_CACHE_MASK) || (dest & L1_CACHE_MASK));
-       BUG_ON(!(len < ((BTE_LEN_MASK + 1) << L1_CACHE_SHIFT)));
+       BUG_ON(len & L1_CACHE_MASK);
+       BUG_ON(src & L1_CACHE_MASK);
+       BUG_ON(dest & L1_CACHE_MASK);
+       BUG_ON(len > BTE_MAX_XFER);
 
        /*
         * Start with interface corresponding to cpu number
@@ -227,7 +229,7 @@ retry_bteop:
                     BTE_LNSTAT_LOAD(bte), *bte->most_rcnt_na));
 
        if (transfer_stat & IBLS_ERROR) {
-               bte_status = transfer_stat & ~IBLS_ERROR;
+               bte_status = BTE_GET_ERROR_STATUS(transfer_stat);
        } else {
                bte_status = BTE_SUCCESS;
        }