lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F34C1B6.80201@vmware.com>
Date:	Fri, 10 Feb 2012 08:05:26 +0100
From:	Thomas Hellstrom <thellstrom@...are.com>
To:	Cong Wang <amwang@...hat.com>
CC:	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	David Airlie <airlied@...ux.ie>,
	Jerome Glisse <jglisse@...hat.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	Dave Airlie <airlied@...hat.com>,
	Paul Gortmaker <paul.gortmaker@...driver.com>,
	Jakob Bornecantz <jakob@...are.com>,
	dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH 14/60] drm: remove the second argument of k[un]map_atomic()

Looks good to me.

Reviewed-by: Thomas Hellstrom <thellstrom@...are.com>


On 02/10/2012 06:39 AM, Cong Wang wrote:
> Signed-off-by: Cong Wang<amwang@...hat.com>
> ---
>   drivers/gpu/drm/drm_cache.c         |    8 ++++----
>   drivers/gpu/drm/ttm/ttm_tt.c        |   16 ++++++++--------
>   drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c |    6 +++---
>   3 files changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_cache.c b/drivers/gpu/drm/drm_cache.c
> index 5928653..4b8653b 100644
> --- a/drivers/gpu/drm/drm_cache.c
> +++ b/drivers/gpu/drm/drm_cache.c
> @@ -41,10 +41,10 @@ drm_clflush_page(struct page *page)
>   	if (unlikely(page == NULL))
>   		return;
>
> -	page_virtual = kmap_atomic(page, KM_USER0);
> +	page_virtual = kmap_atomic(page);
>   	for (i = 0; i<  PAGE_SIZE; i += boot_cpu_data.x86_clflush_size)
>   		clflush(page_virtual + i);
> -	kunmap_atomic(page_virtual, KM_USER0);
> +	kunmap_atomic(page_virtual);
>   }
>
>   static void drm_cache_flush_clflush(struct page *pages[],
> @@ -87,10 +87,10 @@ drm_clflush_pages(struct page *pages[], unsigned long num_pages)
>   		if (unlikely(page == NULL))
>   			continue;
>
> -		page_virtual = kmap_atomic(page, KM_USER0);
> +		page_virtual = kmap_atomic(page);
>   		flush_dcache_range((unsigned long)page_virtual,
>   				   (unsigned long)page_virtual + PAGE_SIZE);
> -		kunmap_atomic(page_virtual, KM_USER0);
> +		kunmap_atomic(page_virtual);
>   	}
>   #else
>   	printk(KERN_ERR "Architecture has no drm_cache.c support\n");
> diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
> index 2f75d20..c10cf5e 100644
> --- a/drivers/gpu/drm/ttm/ttm_tt.c
> +++ b/drivers/gpu/drm/ttm/ttm_tt.c
> @@ -309,11 +309,11 @@ int ttm_tt_swapin(struct ttm_tt *ttm)
>   			goto out_err;
>
>   		preempt_disable();
> -		from_virtual = kmap_atomic(from_page, KM_USER0);
> -		to_virtual = kmap_atomic(to_page, KM_USER1);
> +		from_virtual = kmap_atomic(from_page);
> +		to_virtual = kmap_atomic(to_page);
>   		memcpy(to_virtual, from_virtual, PAGE_SIZE);
> -		kunmap_atomic(to_virtual, KM_USER1);
> -		kunmap_atomic(from_virtual, KM_USER0);
> +		kunmap_atomic(to_virtual);
> +		kunmap_atomic(from_virtual);
>   		preempt_enable();
>   		page_cache_release(from_page);
>   	}
> @@ -365,11 +365,11 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage)
>   			goto out_err;
>   		}
>   		preempt_disable();
> -		from_virtual = kmap_atomic(from_page, KM_USER0);
> -		to_virtual = kmap_atomic(to_page, KM_USER1);
> +		from_virtual = kmap_atomic(from_page);
> +		to_virtual = kmap_atomic(to_page);
>   		memcpy(to_virtual, from_virtual, PAGE_SIZE);
> -		kunmap_atomic(to_virtual, KM_USER1);
> -		kunmap_atomic(from_virtual, KM_USER0);
> +		kunmap_atomic(to_virtual);
> +		kunmap_atomic(from_virtual);
>   		preempt_enable();
>   		set_page_dirty(to_page);
>   		mark_page_accessed(to_page);
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c b/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
> index f4e7763..51c9ba5 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
> @@ -136,10 +136,10 @@ static int vmw_gmr_build_descriptors(struct list_head *desc_pages,
>
>   		if (likely(page_virtual != NULL)) {
>   			desc_virtual->ppn = page_to_pfn(page);
> -			kunmap_atomic(page_virtual, KM_USER0);
> +			kunmap_atomic(page_virtual);
>   		}
>
> -		page_virtual = kmap_atomic(page, KM_USER0);
> +		page_virtual = kmap_atomic(page);
>   		desc_virtual = page_virtual - 1;
>   		prev_pfn = ~(0UL);
>
> @@ -169,7 +169,7 @@ static int vmw_gmr_build_descriptors(struct list_head *desc_pages,
>   	}
>
>   	if (likely(page_virtual != NULL))
> -		kunmap_atomic(page_virtual, KM_USER0);
> +		kunmap_atomic(page_virtual);
>
>   	return 0;
>   out_err:

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ