From: Andrew Morton Date: Tue, 14 Aug 2012 03:22:34 +0000 (+1000) Subject: x86-pat-separate-the-pfn-attribute-tracking-for-remap_pfn_range-and-vm_insert_pfn-fix X-Git-Tag: next-20120904~2^2~35 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9b4689ae630866be9adf146bdbea03c028ff5a06;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);