linux/arch/powerpc/mm
Nicholas Piggin 5e46e29e6a powerpc/64s/hash: convert SLB miss handlers to C
This patch moves SLB miss handlers completely to C, using the standard
exception handler macros to set up the stack and branch to C.

This can be done because the segment containing the kernel stack is
always bolted, so accessing it with relocation on will not cause an
SLB exception.

Arbitrary kernel memory may not be accessed when handling kernel space
SLB misses, so care should be taken there. However user SLB misses can
access any kernel memory, which can be used to move some fields out of
the paca (in later patches).

User SLB misses could quite easily reconcile IRQs and set up a first
class kernel environment and exit via ret_from_except, however that
doesn't seem to be necessary at the moment, so we only do that if a
bad fault is encountered.

[ Credit to Aneesh for bug fixes, error checks, and improvements to bad
  address handling, etc ]

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>

Since RFC:
- Added MSR[RI] handling
- Fixed up a register loss bug exposed by irq tracing (Aneesh)
- Reject misses outside the defined kernel regions (Aneesh)
- Added several more sanity checks and error handling (Aneesh), we may
  look at consolidating these tests and tightenig up the code but for
  a first pass we decided it's better to check carefully.

Since v1:
- Fixed SLB cache corruption (Aneesh)
- Fixed untidy SLBE allocation "leak" in get_vsid error case
- Now survives some stress testing on real hardware

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-09-19 21:59:41 +10:00
..
8xx_mmu.c powerpc/mm/slice: Fix hugepage allocation at hint address on 8xx 2018-03-06 09:21:23 +11:00
40x_mmu.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
44x_mmu.c powerpc/44x: Mark mmu_init_secondary() as __init 2018-07-30 22:48:22 +10:00
copro_fault.c mm: convert return type of handle_mm_fault() caller to vm_fault_t 2018-08-17 16:20:28 -07:00
dma-noncoherent.c powerpc/mm: Rename map_page() to map_kernel_page() on 32-bit 2017-06-05 19:59:03 +10:00
drmem.c powerpc/mm/drmem: Fix unexpected flag value in ibm,dynamic-memory-v2 2018-02-23 16:45:51 +11:00
dump_hashpagetable.c powerpc: remove superflous inclusions of asm/fixmap.h 2018-07-30 22:48:18 +10:00
dump_linuxpagetables.c powerpc/mm: Introduce _PAGE_NA 2018-01-16 23:47:14 +11:00
fault.c Merge branch 'akpm' (patches from Andrew) 2018-08-17 16:49:31 -07:00
fsl_booke_mmu.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
hash64_4k.c powerpc/mm/hash: Remove the superfluous bitwise operation when find hpte group 2018-07-24 22:03:17 +10:00
hash64_64k.c powerpc/mm/hash: Remove the superfluous bitwise operation when find hpte group 2018-07-24 22:03:17 +10:00
hash_low_32.S powerpc: clean inclusions of asm/feature-fixups.h 2018-07-30 22:48:17 +10:00
hash_native_64.c powerpc: remove unnecessary inclusion of asm/tlbflush.h 2018-07-30 22:48:20 +10:00
hash_utils_64.c powerpc: remove unnecessary inclusion of asm/tlbflush.h 2018-07-30 22:48:20 +10:00
highmem.c powerpc/mm: remove warning about ‘type’ being set 2018-08-10 22:12:38 +10:00
hugepage-hash64.c powerpc/mm/hash: Remove the superfluous bitwise operation when find hpte group 2018-07-24 22:03:17 +10:00
hugetlbpage-book3e.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hugetlbpage-hash64.c powerpc/mm/hash64: Store the slot information at the right offset for hugetlb 2018-02-13 22:37:48 +11:00
hugetlbpage-radix.c powerpc updates for 4.15 2017-11-16 12:47:46 -08:00
hugetlbpage.c powerpc/hugetlbpage: Rmove unhelpful HUGEPD_*_SHIFT macros 2018-07-19 14:38:46 +10:00
init_32.c powerpc/mm/32: Remove the reserved memory hack 2018-04-01 00:47:44 +11:00
init_64.c powerpc/mm/radix: Parse disable_radix commandline correctly. 2018-04-04 16:59:36 +10:00
init-common.c powerpc/mm: Fix crashes with 16G huge pages 2018-02-13 22:37:47 +11:00
Makefile powerpc/64s/hash: convert SLB miss handlers to C 2018-09-19 21:59:41 +10:00
mem.c treewide: use PHYS_ADDR_MAX to avoid type casting ULLONG_MAX 2018-06-15 07:55:25 +09:00
mmap.c exec: pass stack rlimit into mm layout functions 2018-04-11 10:28:37 -07:00
mmu_context_book3s64.c Merge branch 'ida-4.19' of git://git.infradead.org/users/willy/linux-dax 2018-08-26 11:48:42 -07:00
mmu_context_hash32.c powerpc: remove unnecessary inclusion of asm/tlbflush.h 2018-07-30 22:48:20 +10:00
mmu_context_iommu.c KVM: PPC: Book3S: Fix guest DMA when guest partially backed by THP pages 2018-08-23 23:40:10 +10:00
mmu_context_nohash.c powerpc/mm: Remove stale_map[] handling on non SMP processors 2018-06-04 00:39:16 +10:00
mmu_context.c powerpc/64s/radix: optimise pte_update 2018-06-03 20:40:36 +10:00
mmu_decl.h powerpc: remove unnecessary inclusion of asm/tlbflush.h 2018-07-30 22:48:20 +10:00
numa.c powerpc/topology: Get topology for shared processors at boot 2018-08-21 16:01:59 +10:00
pgtable_32.c powerpc/mm/32: Remove the reserved memory hack 2018-04-01 00:47:44 +11:00
pgtable_64.c powerpc/mm: Use page fragments for allocation page table at PMD level 2018-05-15 22:29:12 +10:00
pgtable-book3e.c powerpc/mm: Make page table size a variable 2016-05-01 18:32:48 +10:00
pgtable-book3s64.c powerpc/mm/book3s/radix: Add mapping statistics 2018-08-13 16:35:05 +10:00
pgtable-hash64.c powerpc/mm: Use pmd_lockptr instead of opencoding it 2018-05-15 22:29:09 +10:00
pgtable-radix.c powerpc/mm/radix: Only need the Nest MMU workaround for R -> RW transition 2018-08-23 21:56:48 +10:00
pgtable.c powerpc/mm/hugetlb: Update hugetlb related locks 2018-06-03 20:40:37 +10:00
pkeys.c powerpc/pkeys: make protection key 0 less special 2018-07-24 21:43:24 +10:00
ppc_mmu_32.c powerpc/sparse: Fix plain integer as NULL pointer warning 2018-05-25 12:04:38 +10:00
slb.c powerpc/64s/hash: convert SLB miss handlers to C 2018-09-19 21:59:41 +10:00
slice.c powerpc/8xx: Fix build with hugetlbfs enabled 2018-04-11 12:00:23 +10:00
subpage-prot.c powerpc: remove unnecessary inclusion of asm/tlbflush.h 2018-07-30 22:48:20 +10:00
tlb_hash32.c powerpc/sparse: Fix plain integer as NULL pointer warning 2018-05-25 12:04:38 +10:00
tlb_hash64.c powerpc/mm: Add support for handling > 512TB address in SLB miss 2018-03-31 00:10:38 +11:00
tlb_low_64e.S powerpc: clean inclusions of asm/feature-fixups.h 2018-07-30 22:48:17 +10:00
tlb_nohash_low.S powerpc: clean inclusions of asm/feature-fixups.h 2018-07-30 22:48:17 +10:00
tlb_nohash.c powerpc/mm/nohash: do not flush the entire mm when range is a single page 2018-01-27 20:24:44 +11:00
tlb-radix.c Merge branch 'topic/ppc-kvm' into next 2018-07-19 14:37:57 +10:00
vphn.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vphn.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00