[PATCH 10/41] staging/zsmalloc: Replace instances of using __get_cpu_var for address calculation

From: Christoph Lameter
Date: Tue Dec 03 2013 - 18:48:54 EST


Replace the use of __get_cpu_var for address calculation with
this_cpu_ptr().

Signed-off-by: Christoph Lameter <cl@xxxxxxxxx>

Index: linux/drivers/staging/zsmalloc/zsmalloc-main.c
===================================================================
--- linux.orig/drivers/staging/zsmalloc/zsmalloc-main.c 2013-12-02 16:07:49.564639939 -0600
+++ linux/drivers/staging/zsmalloc/zsmalloc-main.c 2013-12-02 16:07:49.554640215 -0600
@@ -1003,7 +1003,7 @@ void *zs_map_object(struct zs_pool *pool
class = &pool->size_class[class_idx];
off = obj_idx_to_offset(page, obj_idx, class->size);

- area = &get_cpu_var(zs_map_area);
+ area = this_cpu_ptr(&zs_map_area);
area->vm_mm = mm;
if (off + class->size <= PAGE_SIZE) {
/* this object is contained entirely within a page */
@@ -1037,7 +1037,7 @@ void zs_unmap_object(struct zs_pool *poo
class = &pool->size_class[class_idx];
off = obj_idx_to_offset(page, obj_idx, class->size);

- area = &__get_cpu_var(zs_map_area);
+ area = this_cpu_ptr(&zs_map_area);
if (off + class->size <= PAGE_SIZE)
kunmap_atomic(area->vm_addr);
else {

--
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/