diff options
author | Thomas Gleixner | 2019-07-28 22:22:40 +0200 |
---|---|---|
committer | Thomas Gleixner | 2019-07-28 22:22:40 +0200 |
commit | 7a30bdd99f37352b188575b27924c407c6ddff9e (patch) | |
tree | 10ea40ab1b5211e75c33eaddb3a6b393ad6ee7ad /arch/powerpc/kernel/eeh.c | |
parent | x86/speculation/swapgs: Exclude ATOMs from speculation through SWAPGS (diff) | |
parent | Linux 5.3-rc2 (diff) | |
download | kernel-qcow2-linux-7a30bdd99f37352b188575b27924c407c6ddff9e.tar.gz kernel-qcow2-linux-7a30bdd99f37352b188575b27924c407c6ddff9e.tar.xz kernel-qcow2-linux-7a30bdd99f37352b188575b27924c407c6ddff9e.zip |
Merge branch master from git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Pick up the spectre documentation so the Grand Schemozzle can be added.
Diffstat (limited to 'arch/powerpc/kernel/eeh.c')
-rw-r--r-- | arch/powerpc/kernel/eeh.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c index f192d57db47d..c0e4b73191f3 100644 --- a/arch/powerpc/kernel/eeh.c +++ b/arch/powerpc/kernel/eeh.c @@ -354,10 +354,19 @@ static inline unsigned long eeh_token_to_phys(unsigned long token) ptep = find_init_mm_pte(token, &hugepage_shift); if (!ptep) return token; - WARN_ON(hugepage_shift); - pa = pte_pfn(*ptep) << PAGE_SHIFT; - return pa | (token & (PAGE_SIZE-1)); + pa = pte_pfn(*ptep); + + /* On radix we can do hugepage mappings for io, so handle that */ + if (hugepage_shift) { + pa <<= hugepage_shift; + pa |= token & ((1ul << hugepage_shift) - 1); + } else { + pa <<= PAGE_SHIFT; + pa |= token & (PAGE_SIZE - 1); + } + + return pa; } /* |