From 635996c45b6607d4bcc71b6985d605c04b6b4253 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 10 Sep 2010 06:45:22 +0000 Subject: [PATCH] Added Kconfig entry for scst_user. Excluded scst_user from the kernel build when HIGHMEM4G or HIGHMEM64G is enabled. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2080 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/kernel/in-tree/Kconfig.scst | 10 ++++++++++ scst/src/dev_handlers/scst_user.c | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/scst/kernel/in-tree/Kconfig.scst b/scst/kernel/in-tree/Kconfig.scst index eec60baef..f92297885 100644 --- a/scst/kernel/in-tree/Kconfig.scst +++ b/scst/kernel/in-tree/Kconfig.scst @@ -65,6 +65,16 @@ config SCST_VDISK help SCST device handler for virtual disk and/or CDROM device. +config SCST_USER + tristate "User-space SCSI target driver support" + default SCST + depends on SCSI && SCST && !HIGHMEM4G && !HIGHMEM64G + help + The SCST device handler scst_user allows to implement full-feature + SCSI target devices in user space. + + If unsure, say "N". + config SCST_STRICT_SERIALIZING bool "Strict serialization" depends on SCST diff --git a/scst/src/dev_handlers/scst_user.c b/scst/src/dev_handlers/scst_user.c index 2b281d95c..f898b4221 100644 --- a/scst/src/dev_handlers/scst_user.c +++ b/scst/src/dev_handlers/scst_user.c @@ -34,12 +34,14 @@ #endif #include "scst_dev_handler.h" +#ifndef INSIDE_KERNEL_TREE #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 changing\ VMSPLIT option or use a 64-bit configuration instead. See README file\ for details." #endif +#endif #define DEV_USER_CMD_HASH_ORDER 6 #define DEV_USER_ATTACH_TIMEOUT (5*HZ) @@ -3721,12 +3723,14 @@ static int __init init_scst_user(void) TRACE_ENTRY(); +#ifndef INSIDE_KERNEL_TREE #if defined(CONFIG_HIGHMEM4G) || defined(CONFIG_HIGHMEM64G) PRINT_ERROR("%s", "HIGHMEM kernel configurations are not supported. " "Consider changing VMSPLIT option or use a 64-bit " "configuration instead. See README file for details."); res = -EINVAL; goto out; +#endif #endif user_cmd_cachep = KMEM_CACHE(scst_user_cmd, SCST_SLAB_FLAGS);