]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iommu/amd: Move aperture_range.offset to another cache-line
authorJoerg Roedel <jroedel@suse.de>
Mon, 21 Dec 2015 15:28:45 +0000 (16:28 +0100)
committerJoerg Roedel <jroedel@suse.de>
Mon, 28 Dec 2015 16:18:51 +0000 (17:18 +0100)
Moving it before the pte_pages array puts in into the same
cache-line as the spin-lock and the bitmap array pointer.
This should safe a cache-miss.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd_iommu.c

index be0e81aff3bcf5a0fd887612817c7e13cda45f17..2a22515f5a8bf1371a2925846347e6c4a9950013 100644 (file)
@@ -124,6 +124,7 @@ struct aperture_range {
 
        /* address allocation bitmap */
        unsigned long *bitmap;
+       unsigned long offset;
 
        /*
         * Array of PTE pages for the aperture. In this array we save all the
@@ -132,8 +133,6 @@ struct aperture_range {
         * just calculate its address in constant time.
         */
        u64 *pte_pages[64];
-
-       unsigned long offset;
 };
 
 /*