From: Andrew Morton Date: Fri, 28 Sep 2012 00:19:04 +0000 (+1000) Subject: x86-pat-separate-the-pfn-attribute-tracking-for-remap_pfn_range-and-vm_insert_pfn-fix X-Git-Tag: next-20120928~1^2~367 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=495e57d0f3bb0ccaa4b9edab636ccbd581ebec2c;p=karo-tx-linux.git x86-pat-separate-the-pfn-attribute-tracking-for-remap_pfn_range-and-vm_insert_pfn-fix tweak a few comments Cc: Konstantin Khlebnikov Signed-off-by: Andrew Morton --- diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c index 4ad8316dbace..74a702674e86 100644 --- a/arch/x86/mm/pat.c +++ b/arch/x86/mm/pat.c @@ -712,14 +712,12 @@ int track_pfn_remap(struct vm_area_struct *vma, pgprot_t *prot, return 0; /* - * for anything smaller than the vma size, - * we set prot based on the lookup. + * For anything smaller than the vma size we set prot based on the + * lookup. */ flags = lookup_memtype(paddr); - /* - * Check memtype for the rest pages - */ + /* Check memtype for the remaining pages */ while (size > PAGE_SIZE) { size -= PAGE_SIZE; paddr += PAGE_SIZE; @@ -741,7 +739,7 @@ int track_pfn_insert(struct vm_area_struct *vma, pgprot_t *prot, if (!pat_enabled) return 0; - /* we set prot based on lookup */ + /* Set prot based on lookup */ flags = lookup_memtype((resource_size_t)pfn << PAGE_SHIFT); *prot = __pgprot((pgprot_val(vma->vm_page_prot) & (~_PAGE_CACHE_MASK)) | flags);