On Mon, Aug 26, 2013 at 08:44:40PM +0000, Christoph Lameter wrote: > __get_cpu_var() is used for multiple purposes in the kernel source. One of them is > address calculation via the form &__get_cpu_var(x). This calculates the address for > the instance of the percpu variable of the current processor based on an offset. > 4. Retrieve the content of a percpu struct > > DEFINE_PER_CPU(struct mystruct, y); > struct mystruct x = __get_cpu_var(y); > > Converts to > > memcpy(this_cpu_ptr(&y), x, sizeof(x)); That's wrong (destination and source should be exchanged). However your patch looks good. Acked-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html