From: Dmitry Kovalenko Date: Sun, 12 Jul 2015 13:44:30 +0000 (-0700) Subject: Revert "[FIX] workaround of hangs on multicores" X-Git-Tag: submit/tizen/20151123.110932~36 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F25%2F43625%2F1;p=kernel%2Fswap-modules.git Revert "[FIX] workaround of hangs on multicores" This reverts commit 3418b805b202610c534960112fac4edd6e6acaa0. Change-Id: I3eccb15a59fc5794324a010e98079b0f310418b8 --- diff --git a/parser/swap_msg_parser.c b/parser/swap_msg_parser.c index a60d1ad..bed50d0 100644 --- a/parser/swap_msg_parser.c +++ b/parser/swap_msg_parser.c @@ -110,10 +110,17 @@ static int msg_handler(void __user *msg) print_parse_debug("MSG_START. size=%d\n", size); ret = msg_start(&mb); break; - case MSG_STOP: + case MSG_STOP: { + struct cpumask mask; + print_parse_debug("MSG_STOP. size=%d\n", size); + + swap_disable_nonboot_cpus_lock(&mask); ret = msg_stop(&mb); + swap_enable_nonboot_cpus_unlock(&mask); + break; + } case MSG_CONFIG: print_parse_debug("MSG_CONFIG. size=%d\n", size); ret = msg_config(&mb); @@ -149,22 +156,16 @@ uninit: return ret; } - -static struct cpumask cpumask; - -static int parset_init(void) +static int reg_msg_handler(void) { - swap_disable_nonboot_cpus_lock(&cpumask); - set_msg_handler(msg_handler); return 0; } -static void parser_exit(void) +static void unreg_msg_handler(void) { set_msg_handler(NULL); pfg_put_all(); - swap_enable_nonboot_cpus_unlock(&cpumask); } static int once(void) @@ -184,6 +185,6 @@ static int once(void) return ret; } -SWAP_LIGHT_INIT_MODULE(once, parset_init, parser_exit, NULL, NULL); +SWAP_LIGHT_INIT_MODULE(once, reg_msg_handler, unreg_msg_handler, NULL, NULL); MODULE_LICENSE("GPL");