From caa419d49d80ff219f7d95a2f3483a863c4cac77 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Thu, 13 Nov 2008 16:14:06 +0000 Subject: [PATCH] Cleanup git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@570 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 12 ++++++++++-- scst_local/scst_local.c | 7 +++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index d257e50c9..4b21bf5ea 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -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 { diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index b6ee7324c..ed4f32542 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -43,6 +43,13 @@ #include +#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 | \