Cleanup
authorvlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Thu, 13 Nov 2008 16:14:06 +0000 (16:14 +0000)
committervlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Thu, 13 Nov 2008 16:14:06 +0000 (16:14 +0000)
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@570 d57e44dd-8a1f-0410-8b47-8ef2f437770f

scst/src/scst_lib.c
scst_local/scst_local.c

index d257e50..4b21bf5 100644 (file)
@@ -1758,14 +1758,22 @@ void scst_copy_sg(struct scst_cmd *cmd, enum scst_sg_copy_dir copy_dir)
                do {
                        unsigned int n;
 
+                       /*
+                        * Himem pages are not allowed here, see the
+                        * corresponding #warning in scst_main.c. Correct
+                        * your target driver or dev handler to not alloc
+                        * such pages!
+                        */
+                       EXTRACHECKS_BUG_ON(PageHighMem(dst) ||
+                                          PageHighMem(src));
+
                        TRACE_MEM("cmd %p, to_copy %d, src %p, src_len %d, "
                                "src_offs %d, dst %p, dst_len %d, dst_offs %d",
                                cmd, to_copy, src, src_len, src_offs, dst,
                                dst_len, dst_offs);
 
                        if ((src_offs == 0) && (dst_offs == 0) &&
-                           (src_len >= PAGE_SIZE) && (dst_len >= PAGE_SIZE) &&
-                           !PageHighMem(dst) && !PageHighMem(src)) {
+                           (src_len >= PAGE_SIZE) && (dst_len >= PAGE_SIZE)) {
                                copy_page(page_address(dst), page_address(src));
                                n = PAGE_SIZE;
                        } else {
index b6ee732..ed4f325 100644 (file)
 
 #include <scst_debug.h>
 
+#if defined(CONFIG_HIGHMEM4G) || defined(CONFIG_HIGHMEM64G)
+#warning "HIGHMEM kernel configurations are not supported by this module, \
+       because nowadays it doesn't worth the effort. Consider change \
+       VMSPLIT option or use 64-bit configuration instead. See SCST core \
+       README file for details."
+#endif
+
 #ifdef CONFIG_SCST_DEBUG
 #define SCST_LOCAL_DEFAULT_LOG_FLAGS (TRACE_FUNCTION | TRACE_PID | \
        TRACE_OUT_OF_MEM | TRACE_MGMT | TRACE_MGMT_MINOR | \