lkml.org 
[lkml]   [2013]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 10/41] staging/zsmalloc: Replace instances of using __get_cpu_var for address calculation
    Replace the use of __get_cpu_var for address calculation with
    this_cpu_ptr().

    Signed-off-by: Christoph Lameter <cl@linux.com>

    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 {


    \
     
     \ /
      Last update: 2013-12-04 02:41    [W:2.567 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site