File tree Expand file tree Collapse file tree 1 file changed +14
-14
lines changed
Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -44,23 +44,15 @@ ocf_ctx_t cas_ctx;
4444struct cas_module cas_module ;
4545
4646static inline uint32_t involuntary_preemption_enabled (void )
47- {
48- bool config_dynamic = IS_ENABLED (CONFIG_PREEMPT_DYNAMIC );
47+ {
4948 bool config_rt = IS_ENABLED (CONFIG_PREEMPT_RT );
5049 bool config_preempt = IS_ENABLED (CONFIG_PREEMPT );
5150 bool config_lazy = IS_ENABLED (CONFIG_PREEMPT_LAZY );
52- bool config_none = IS_ENABLED (CONFIG_PREEMPT_NONE );
53-
54- if (!config_dynamic && !config_rt && !config_preempt && !config_lazy )
55- return false;
5651
57- if (config_none )
58- return false;
59-
60- if (config_rt || config_preempt || config_lazy ) {
52+ if (config_rt ) {
6153 printk (KERN_ERR OCF_PREFIX_SHORT
62- "The kernel has been built with involuntary preemption "
63- "enabled.\nFailed to load Open CAS kernel module.\n " );
54+ "The kernel has been compiled with real-time preemption enabled (PREEMPT_RT).\n "
55+ "Failed to load Open CAS kernel module" );
6456 return true;
6557 }
6658
@@ -78,11 +70,19 @@ static inline uint32_t involuntary_preemption_enabled(void)
7870 "preemption enabled.\nFailed to load Open CAS kernel "
7971 "module.\n" );
8072 return true;
81- } else {
82- return false;
8373 }
74+ return false;
75+
8476#endif
8577
78+ if (config_preempt || config_lazy ) {
79+ printk (KERN_ERR OCF_PREFIX_SHORT
80+ "The kernel has been built with involuntary preemption "
81+ "enabled.\nFailed to load Open CAS kernel module.\n" );
82+ return true;
83+ }
84+
85+
8686 return false;
8787}
8888
You can’t perform that action at this time.
0 commit comments