diff options
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r-- | arch/powerpc/mm/fault.c | 1 | ||||
-rw-r--r-- | arch/powerpc/mm/hash_native_64.c | 2 | ||||
-rw-r--r-- | arch/powerpc/mm/hash_utils_64.c | 3 | ||||
-rw-r--r-- | arch/powerpc/mm/init_64.c | 1 | ||||
-rw-r--r-- | arch/powerpc/mm/pgtable_64.c | 1 | ||||
-rw-r--r-- | arch/powerpc/mm/stab.c | 3 | ||||
-rw-r--r-- | arch/powerpc/mm/tlb_low_64e.S | 18 |
7 files changed, 17 insertions, 12 deletions
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index 08ffcf52a856..995f924e007f 100644 --- a/arch/powerpc/mm/fault.c +++ b/arch/powerpc/mm/fault.c | |||
@@ -133,6 +133,7 @@ static int do_sigbus(struct pt_regs *regs, unsigned long address) | |||
133 | up_read(¤t->mm->mmap_sem); | 133 | up_read(¤t->mm->mmap_sem); |
134 | 134 | ||
135 | if (user_mode(regs)) { | 135 | if (user_mode(regs)) { |
136 | current->thread.trap_nr = BUS_ADRERR; | ||
136 | info.si_signo = SIGBUS; | 137 | info.si_signo = SIGBUS; |
137 | info.si_errno = 0; | 138 | info.si_errno = 0; |
138 | info.si_code = BUS_ADRERR; | 139 | info.si_code = BUS_ADRERR; |
diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c index 90039bc64119..f21e8ce8db33 100644 --- a/arch/powerpc/mm/hash_native_64.c +++ b/arch/powerpc/mm/hash_native_64.c | |||
@@ -14,10 +14,10 @@ | |||
14 | 14 | ||
15 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
16 | #include <linux/bitops.h> | 16 | #include <linux/bitops.h> |
17 | #include <linux/of.h> | ||
17 | #include <linux/threads.h> | 18 | #include <linux/threads.h> |
18 | #include <linux/smp.h> | 19 | #include <linux/smp.h> |
19 | 20 | ||
20 | #include <asm/abs_addr.h> | ||
21 | #include <asm/machdep.h> | 21 | #include <asm/machdep.h> |
22 | #include <asm/mmu.h> | 22 | #include <asm/mmu.h> |
23 | #include <asm/mmu_context.h> | 23 | #include <asm/mmu_context.h> |
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 377e5cbedbbb..ba45739bdfe8 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -43,7 +43,6 @@ | |||
43 | #include <asm/uaccess.h> | 43 | #include <asm/uaccess.h> |
44 | #include <asm/machdep.h> | 44 | #include <asm/machdep.h> |
45 | #include <asm/prom.h> | 45 | #include <asm/prom.h> |
46 | #include <asm/abs_addr.h> | ||
47 | #include <asm/tlbflush.h> | 46 | #include <asm/tlbflush.h> |
48 | #include <asm/io.h> | 47 | #include <asm/io.h> |
49 | #include <asm/eeh.h> | 48 | #include <asm/eeh.h> |
@@ -651,7 +650,7 @@ static void __init htab_initialize(void) | |||
651 | DBG("Hash table allocated at %lx, size: %lx\n", table, | 650 | DBG("Hash table allocated at %lx, size: %lx\n", table, |
652 | htab_size_bytes); | 651 | htab_size_bytes); |
653 | 652 | ||
654 | htab_address = abs_to_virt(table); | 653 | htab_address = __va(table); |
655 | 654 | ||
656 | /* htab absolute addr + encoded htabsize */ | 655 | /* htab absolute addr + encoded htabsize */ |
657 | _SDR1 = table + __ilog2(pteg_count) - 11; | 656 | _SDR1 = table + __ilog2(pteg_count) - 11; |
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index 620b7acd2fdf..95a45293e5ac 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c | |||
@@ -62,7 +62,6 @@ | |||
62 | #include <asm/cputable.h> | 62 | #include <asm/cputable.h> |
63 | #include <asm/sections.h> | 63 | #include <asm/sections.h> |
64 | #include <asm/iommu.h> | 64 | #include <asm/iommu.h> |
65 | #include <asm/abs_addr.h> | ||
66 | #include <asm/vdso.h> | 65 | #include <asm/vdso.h> |
67 | 66 | ||
68 | #include "mmu_decl.h" | 67 | #include "mmu_decl.h" |
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c index 249a0631c4db..297d49547ea8 100644 --- a/arch/powerpc/mm/pgtable_64.c +++ b/arch/powerpc/mm/pgtable_64.c | |||
@@ -51,7 +51,6 @@ | |||
51 | #include <asm/processor.h> | 51 | #include <asm/processor.h> |
52 | #include <asm/cputable.h> | 52 | #include <asm/cputable.h> |
53 | #include <asm/sections.h> | 53 | #include <asm/sections.h> |
54 | #include <asm/abs_addr.h> | ||
55 | #include <asm/firmware.h> | 54 | #include <asm/firmware.h> |
56 | 55 | ||
57 | #include "mmu_decl.h" | 56 | #include "mmu_decl.h" |
diff --git a/arch/powerpc/mm/stab.c b/arch/powerpc/mm/stab.c index 9106ebb118f5..3f8efa6f2997 100644 --- a/arch/powerpc/mm/stab.c +++ b/arch/powerpc/mm/stab.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <asm/paca.h> | 20 | #include <asm/paca.h> |
21 | #include <asm/cputable.h> | 21 | #include <asm/cputable.h> |
22 | #include <asm/prom.h> | 22 | #include <asm/prom.h> |
23 | #include <asm/abs_addr.h> | ||
24 | 23 | ||
25 | struct stab_entry { | 24 | struct stab_entry { |
26 | unsigned long esid_data; | 25 | unsigned long esid_data; |
@@ -257,7 +256,7 @@ void __init stabs_alloc(void) | |||
257 | memset((void *)newstab, 0, HW_PAGE_SIZE); | 256 | memset((void *)newstab, 0, HW_PAGE_SIZE); |
258 | 257 | ||
259 | paca[cpu].stab_addr = newstab; | 258 | paca[cpu].stab_addr = newstab; |
260 | paca[cpu].stab_real = virt_to_abs(newstab); | 259 | paca[cpu].stab_real = __pa(newstab); |
261 | printk(KERN_INFO "Segment table for CPU %d at 0x%llx " | 260 | printk(KERN_INFO "Segment table for CPU %d at 0x%llx " |
262 | "virtual, 0x%llx absolute\n", | 261 | "virtual, 0x%llx absolute\n", |
263 | cpu, paca[cpu].stab_addr, paca[cpu].stab_real); | 262 | cpu, paca[cpu].stab_addr, paca[cpu].stab_real); |
diff --git a/arch/powerpc/mm/tlb_low_64e.S b/arch/powerpc/mm/tlb_low_64e.S index f09d48e3268d..b4113bf86353 100644 --- a/arch/powerpc/mm/tlb_low_64e.S +++ b/arch/powerpc/mm/tlb_low_64e.S | |||
@@ -20,6 +20,8 @@ | |||
20 | #include <asm/pgtable.h> | 20 | #include <asm/pgtable.h> |
21 | #include <asm/exception-64e.h> | 21 | #include <asm/exception-64e.h> |
22 | #include <asm/ppc-opcode.h> | 22 | #include <asm/ppc-opcode.h> |
23 | #include <asm/kvm_asm.h> | ||
24 | #include <asm/kvm_booke_hv_asm.h> | ||
23 | 25 | ||
24 | #ifdef CONFIG_PPC_64K_PAGES | 26 | #ifdef CONFIG_PPC_64K_PAGES |
25 | #define VPTE_PMD_SHIFT (PTE_INDEX_SIZE+1) | 27 | #define VPTE_PMD_SHIFT (PTE_INDEX_SIZE+1) |
@@ -37,12 +39,18 @@ | |||
37 | * * | 39 | * * |
38 | **********************************************************************/ | 40 | **********************************************************************/ |
39 | 41 | ||
40 | .macro tlb_prolog_bolted addr | 42 | .macro tlb_prolog_bolted intnum addr |
41 | mtspr SPRN_SPRG_TLB_SCRATCH,r13 | 43 | mtspr SPRN_SPRG_GEN_SCRATCH,r13 |
42 | mfspr r13,SPRN_SPRG_PACA | 44 | mfspr r13,SPRN_SPRG_PACA |
43 | std r10,PACA_EXTLB+EX_TLB_R10(r13) | 45 | std r10,PACA_EXTLB+EX_TLB_R10(r13) |
44 | mfcr r10 | 46 | mfcr r10 |
45 | std r11,PACA_EXTLB+EX_TLB_R11(r13) | 47 | std r11,PACA_EXTLB+EX_TLB_R11(r13) |
48 | #ifdef CONFIG_KVM_BOOKE_HV | ||
49 | BEGIN_FTR_SECTION | ||
50 | mfspr r11, SPRN_SRR1 | ||
51 | END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV) | ||
52 | #endif | ||
53 | DO_KVM \intnum, SPRN_SRR1 | ||
46 | std r16,PACA_EXTLB+EX_TLB_R16(r13) | 54 | std r16,PACA_EXTLB+EX_TLB_R16(r13) |
47 | mfspr r16,\addr /* get faulting address */ | 55 | mfspr r16,\addr /* get faulting address */ |
48 | std r14,PACA_EXTLB+EX_TLB_R14(r13) | 56 | std r14,PACA_EXTLB+EX_TLB_R14(r13) |
@@ -61,12 +69,12 @@ | |||
61 | ld r15,PACA_EXTLB+EX_TLB_R15(r13) | 69 | ld r15,PACA_EXTLB+EX_TLB_R15(r13) |
62 | TLB_MISS_RESTORE_STATS_BOLTED | 70 | TLB_MISS_RESTORE_STATS_BOLTED |
63 | ld r16,PACA_EXTLB+EX_TLB_R16(r13) | 71 | ld r16,PACA_EXTLB+EX_TLB_R16(r13) |
64 | mfspr r13,SPRN_SPRG_TLB_SCRATCH | 72 | mfspr r13,SPRN_SPRG_GEN_SCRATCH |
65 | .endm | 73 | .endm |
66 | 74 | ||
67 | /* Data TLB miss */ | 75 | /* Data TLB miss */ |
68 | START_EXCEPTION(data_tlb_miss_bolted) | 76 | START_EXCEPTION(data_tlb_miss_bolted) |
69 | tlb_prolog_bolted SPRN_DEAR | 77 | tlb_prolog_bolted BOOKE_INTERRUPT_DTLB_MISS SPRN_DEAR |
70 | 78 | ||
71 | /* We need _PAGE_PRESENT and _PAGE_ACCESSED set */ | 79 | /* We need _PAGE_PRESENT and _PAGE_ACCESSED set */ |
72 | 80 | ||
@@ -214,7 +222,7 @@ itlb_miss_fault_bolted: | |||
214 | 222 | ||
215 | /* Instruction TLB miss */ | 223 | /* Instruction TLB miss */ |
216 | START_EXCEPTION(instruction_tlb_miss_bolted) | 224 | START_EXCEPTION(instruction_tlb_miss_bolted) |
217 | tlb_prolog_bolted SPRN_SRR0 | 225 | tlb_prolog_bolted BOOKE_INTERRUPT_ITLB_MISS SPRN_SRR0 |
218 | 226 | ||
219 | rldicl. r10,r16,64-PGTABLE_EADDR_SIZE,PGTABLE_EADDR_SIZE+4 | 227 | rldicl. r10,r16,64-PGTABLE_EADDR_SIZE,PGTABLE_EADDR_SIZE+4 |
220 | srdi r15,r16,60 /* get region */ | 228 | srdi r15,r16,60 /* get region */ |