diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2013-06-20 05:00:18 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-06-21 02:01:54 -0400 |
commit | 12bc9f6fc1d6582b4529ac522d2231bd2584a5f1 (patch) | |
tree | 40be8749c9b19e0e9dfddeee54436271dce2bb2f /arch/powerpc/kernel/eeh.c | |
parent | ac52ae4721233150a3c30e9732a1c1f4f68e7db7 (diff) |
powerpc: Replace find_linux_pte with find_linux_pte_or_hugepte
Replace find_linux_pte with find_linux_pte_or_hugepte and explicitly
document why we don't need to handle transparent hugepages at callsites.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/eeh.c')
-rw-r--r-- | arch/powerpc/kernel/eeh.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c index 7c567be3dd03..af2b9ae07df5 100644 --- a/arch/powerpc/kernel/eeh.c +++ b/arch/powerpc/kernel/eeh.c | |||
@@ -260,10 +260,15 @@ static inline unsigned long eeh_token_to_phys(unsigned long token) | |||
260 | { | 260 | { |
261 | pte_t *ptep; | 261 | pte_t *ptep; |
262 | unsigned long pa; | 262 | unsigned long pa; |
263 | int hugepage_shift; | ||
263 | 264 | ||
264 | ptep = find_linux_pte(init_mm.pgd, token); | 265 | /* |
266 | * We won't find hugepages here, iomem | ||
267 | */ | ||
268 | ptep = find_linux_pte_or_hugepte(init_mm.pgd, token, &hugepage_shift); | ||
265 | if (!ptep) | 269 | if (!ptep) |
266 | return token; | 270 | return token; |
271 | WARN_ON(hugepage_shift); | ||
267 | pa = pte_pfn(*ptep) << PAGE_SHIFT; | 272 | pa = pte_pfn(*ptep) << PAGE_SHIFT; |
268 | 273 | ||
269 | return pa | (token & (PAGE_SIZE-1)); | 274 | return pa | (token & (PAGE_SIZE-1)); |