diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-11-21 17:42:47 +0300 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-11-21 17:42:47 +0300 |
commit | c0ba10b512eb2e2a3888b6e6cc0e089f5e7a191b (patch) | |
tree | a5e2ebdb4147df5653ce481a78465d28aa5b15c2 /arch/arm/include/asm/pgtable.h | |
parent | 589136bfa784a4558b397f017ca2f06f0ca9080e (diff) | |
download | linux-c0ba10b512eb2e2a3888b6e6cc0e089f5e7a191b.tar.xz |
ARM: improve compiler's ability to optimize page tables
Allow the compiler to better optimize the page table walking code
by avoiding over-complex pmd_addr_end() calculations. These
calculations prevent the compiler spotting that we'll never iterate
over the PMD table, causing it to create double nested loops where
a single loop will do.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/pgtable.h')
-rw-r--r-- | arch/arm/include/asm/pgtable.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index b155414192da..53d1d5deb111 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h @@ -374,6 +374,9 @@ static inline pte_t *pmd_page_vaddr(pmd_t pmd) #define pmd_page(pmd) pfn_to_page(__phys_to_pfn(pmd_val(pmd))) +/* we don't need complex calculations here as the pmd is folded into the pgd */ +#define pmd_addr_end(addr,end) (end) + /* * Conversion functions: convert a page and protection to a page entry, * and a page entry and page directory to the page they refer to. |