]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - arch/x86/kernel/sys_x86_64.c
mm: fix cache coloring on x86_64 architecture
[~shefty/rdma-dev.git] / arch / x86 / kernel / sys_x86_64.c
index f00d006d60fd2836212c7fe588e1355a53a27258..97ef74b88e0f8f6213308c6168303779302adec0 100644 (file)
@@ -136,7 +136,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
        info.low_limit = begin;
        info.high_limit = end;
        info.align_mask = filp ? get_align_mask() : 0;
-       info.align_offset = 0;
+       info.align_offset = pgoff << PAGE_SHIFT;
        return vm_unmapped_area(&info);
 }
 
@@ -175,7 +175,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
        info.low_limit = PAGE_SIZE;
        info.high_limit = mm->mmap_base;
        info.align_mask = filp ? get_align_mask() : 0;
-       info.align_offset = 0;
+       info.align_offset = pgoff << PAGE_SHIFT;
        addr = vm_unmapped_area(&info);
        if (!(addr & ~PAGE_MASK))
                return addr;