[raw v1 3/4] Use raw_cpu_write for initialization of per cpu refcount.

From: Christoph Lameter
Date: Mon Oct 07 2013 - 14:46:16 EST


The initialization of a structure is not subject to synchronization.
So simply disable the check.

Cc: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Signed-off-by: Christoph Lameter <cl@xxxxxxxxx>

Index: linux/kernel/module.c
===================================================================
--- linux.orig/kernel/module.c 2013-09-05 13:43:30.557687773 -0500
+++ linux/kernel/module.c 2013-10-07 12:33:43.732059759 -0500
@@ -643,7 +643,7 @@ static int module_unload_init(struct mod
INIT_LIST_HEAD(&mod->target_list);

/* Hold reference count during initialization. */
- __this_cpu_write(mod->refptr->incs, 1);
+ raw_cpu_write(mod->refptr->incs, 1);
/* Backwards compatibility macros put refcount during init. */
mod->waiter = current;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/