diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2017-02-15 06:30:20 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-02-15 06:30:20 -0500 |
commit | ee10689117c0186fd4fe7feca8d48c7316f65d70 (patch) | |
tree | fb2f7f75efa3f7ab5f1814fa1a4b4b3d67f884db | |
parent | 8ef81a9a453f9048c1683e40b540a4221986a2d1 (diff) | |
parent | 5982f0849e08fe4e4e7df5e345c4539ce9780b1b (diff) |
Merge branch 'kvm-ppc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD
This brings in two fixes for potential host crashes, from Ben
Herrenschmidt and Nick Piggin.
-rw-r--r-- | arch/powerpc/include/asm/exception-64s.h | 8 | ||||
-rw-r--r-- | arch/powerpc/include/asm/opal.h | 7 | ||||
-rw-r--r-- | arch/powerpc/kernel/exceptions-64s.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/idle_book3s.S | 6 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s_64_vio.c | 1 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s_hv_builtin.c | 34 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s_hv_rm_xics.c | 10 | ||||
-rw-r--r-- | arch/powerpc/platforms/powernv/opal-wrappers.S | 70 | ||||
-rw-r--r-- | arch/powerpc/platforms/powernv/pci-ioda.c | 5 |
9 files changed, 56 insertions, 87 deletions
diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerpc/include/asm/exception-64s.h index 8fa09fa500f0..14752eee3d0c 100644 --- a/arch/powerpc/include/asm/exception-64s.h +++ b/arch/powerpc/include/asm/exception-64s.h | |||
@@ -236,6 +236,11 @@ END_FTR_SECTION_NESTED(ftr,ftr,943) | |||
236 | mtctr reg; \ | 236 | mtctr reg; \ |
237 | bctr | 237 | bctr |
238 | 238 | ||
239 | #define BRANCH_LINK_TO_FAR(reg, label) \ | ||
240 | __LOAD_FAR_HANDLER(reg, label); \ | ||
241 | mtctr reg; \ | ||
242 | bctrl | ||
243 | |||
239 | /* | 244 | /* |
240 | * KVM requires __LOAD_FAR_HANDLER. | 245 | * KVM requires __LOAD_FAR_HANDLER. |
241 | * | 246 | * |
@@ -260,6 +265,9 @@ END_FTR_SECTION_NESTED(ftr,ftr,943) | |||
260 | #define BRANCH_TO_COMMON(reg, label) \ | 265 | #define BRANCH_TO_COMMON(reg, label) \ |
261 | b label | 266 | b label |
262 | 267 | ||
268 | #define BRANCH_LINK_TO_FAR(reg, label) \ | ||
269 | bl label | ||
270 | |||
263 | #define BRANCH_TO_KVM(reg, label) \ | 271 | #define BRANCH_TO_KVM(reg, label) \ |
264 | b label | 272 | b label |
265 | 273 | ||
diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h index 5c7db0f1a708..16efe7406776 100644 --- a/arch/powerpc/include/asm/opal.h +++ b/arch/powerpc/include/asm/opal.h | |||
@@ -67,7 +67,6 @@ int64_t opal_pci_config_write_half_word(uint64_t phb_id, uint64_t bus_dev_func, | |||
67 | int64_t opal_pci_config_write_word(uint64_t phb_id, uint64_t bus_dev_func, | 67 | int64_t opal_pci_config_write_word(uint64_t phb_id, uint64_t bus_dev_func, |
68 | uint64_t offset, uint32_t data); | 68 | uint64_t offset, uint32_t data); |
69 | int64_t opal_set_xive(uint32_t isn, uint16_t server, uint8_t priority); | 69 | int64_t opal_set_xive(uint32_t isn, uint16_t server, uint8_t priority); |
70 | int64_t opal_rm_set_xive(uint32_t isn, uint16_t server, uint8_t priority); | ||
71 | int64_t opal_get_xive(uint32_t isn, __be16 *server, uint8_t *priority); | 70 | int64_t opal_get_xive(uint32_t isn, __be16 *server, uint8_t *priority); |
72 | int64_t opal_register_exception_handler(uint64_t opal_exception, | 71 | int64_t opal_register_exception_handler(uint64_t opal_exception, |
73 | uint64_t handler_address, | 72 | uint64_t handler_address, |
@@ -220,18 +219,12 @@ int64_t opal_pci_set_power_state(uint64_t async_token, uint64_t id, | |||
220 | int64_t opal_pci_poll2(uint64_t id, uint64_t data); | 219 | int64_t opal_pci_poll2(uint64_t id, uint64_t data); |
221 | 220 | ||
222 | int64_t opal_int_get_xirr(uint32_t *out_xirr, bool just_poll); | 221 | int64_t opal_int_get_xirr(uint32_t *out_xirr, bool just_poll); |
223 | int64_t opal_rm_int_get_xirr(__be32 *out_xirr, bool just_poll); | ||
224 | int64_t opal_int_set_cppr(uint8_t cppr); | 222 | int64_t opal_int_set_cppr(uint8_t cppr); |
225 | int64_t opal_int_eoi(uint32_t xirr); | 223 | int64_t opal_int_eoi(uint32_t xirr); |
226 | int64_t opal_rm_int_eoi(uint32_t xirr); | ||
227 | int64_t opal_int_set_mfrr(uint32_t cpu, uint8_t mfrr); | 224 | int64_t opal_int_set_mfrr(uint32_t cpu, uint8_t mfrr); |
228 | int64_t opal_rm_int_set_mfrr(uint32_t cpu, uint8_t mfrr); | ||
229 | int64_t opal_pci_tce_kill(uint64_t phb_id, uint32_t kill_type, | 225 | int64_t opal_pci_tce_kill(uint64_t phb_id, uint32_t kill_type, |
230 | uint32_t pe_num, uint32_t tce_size, | 226 | uint32_t pe_num, uint32_t tce_size, |
231 | uint64_t dma_addr, uint32_t npages); | 227 | uint64_t dma_addr, uint32_t npages); |
232 | int64_t opal_rm_pci_tce_kill(uint64_t phb_id, uint32_t kill_type, | ||
233 | uint32_t pe_num, uint32_t tce_size, | ||
234 | uint64_t dma_addr, uint32_t npages); | ||
235 | 228 | ||
236 | /* Internal functions */ | 229 | /* Internal functions */ |
237 | extern int early_init_dt_scan_opal(unsigned long node, const char *uname, | 230 | extern int early_init_dt_scan_opal(unsigned long node, const char *uname, |
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index 34a04a5fa468..76dd7738c122 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S | |||
@@ -982,7 +982,7 @@ TRAMP_REAL_BEGIN(hmi_exception_early) | |||
982 | EXCEPTION_PROLOG_COMMON_2(PACA_EXGEN) | 982 | EXCEPTION_PROLOG_COMMON_2(PACA_EXGEN) |
983 | EXCEPTION_PROLOG_COMMON_3(0xe60) | 983 | EXCEPTION_PROLOG_COMMON_3(0xe60) |
984 | addi r3,r1,STACK_FRAME_OVERHEAD | 984 | addi r3,r1,STACK_FRAME_OVERHEAD |
985 | bl hmi_exception_realmode | 985 | BRANCH_LINK_TO_FAR(r4, hmi_exception_realmode) |
986 | /* Windup the stack. */ | 986 | /* Windup the stack. */ |
987 | /* Move original HSRR0 and HSRR1 into the respective regs */ | 987 | /* Move original HSRR0 and HSRR1 into the respective regs */ |
988 | ld r9,_MSR(r1) | 988 | ld r9,_MSR(r1) |
diff --git a/arch/powerpc/kernel/idle_book3s.S b/arch/powerpc/kernel/idle_book3s.S index 72dac0b58061..5302e1ad82c2 100644 --- a/arch/powerpc/kernel/idle_book3s.S +++ b/arch/powerpc/kernel/idle_book3s.S | |||
@@ -250,7 +250,7 @@ fastsleep_workaround_at_entry: | |||
250 | /* Fast sleep workaround */ | 250 | /* Fast sleep workaround */ |
251 | li r3,1 | 251 | li r3,1 |
252 | li r4,1 | 252 | li r4,1 |
253 | bl opal_rm_config_cpu_idle_state | 253 | bl opal_config_cpu_idle_state |
254 | 254 | ||
255 | /* Clear Lock bit */ | 255 | /* Clear Lock bit */ |
256 | li r0,0 | 256 | li r0,0 |
@@ -544,7 +544,7 @@ timebase_resync: | |||
544 | */ | 544 | */ |
545 | ble cr3,clear_lock | 545 | ble cr3,clear_lock |
546 | /* Time base re-sync */ | 546 | /* Time base re-sync */ |
547 | bl opal_rm_resync_timebase; | 547 | bl opal_resync_timebase; |
548 | /* | 548 | /* |
549 | * If waking up from sleep, per core state is not lost, skip to | 549 | * If waking up from sleep, per core state is not lost, skip to |
550 | * clear_lock. | 550 | * clear_lock. |
@@ -633,7 +633,7 @@ hypervisor_state_restored: | |||
633 | fastsleep_workaround_at_exit: | 633 | fastsleep_workaround_at_exit: |
634 | li r3,1 | 634 | li r3,1 |
635 | li r4,0 | 635 | li r4,0 |
636 | bl opal_rm_config_cpu_idle_state | 636 | bl opal_config_cpu_idle_state |
637 | b timebase_resync | 637 | b timebase_resync |
638 | 638 | ||
639 | /* | 639 | /* |
diff --git a/arch/powerpc/kvm/book3s_64_vio.c b/arch/powerpc/kvm/book3s_64_vio.c index c379ff5a4438..491c5d8120f7 100644 --- a/arch/powerpc/kvm/book3s_64_vio.c +++ b/arch/powerpc/kvm/book3s_64_vio.c | |||
@@ -171,6 +171,7 @@ long kvm_vm_ioctl_create_spapr_tce(struct kvm *kvm, | |||
171 | goto fail; | 171 | goto fail; |
172 | } | 172 | } |
173 | 173 | ||
174 | ret = -ENOMEM; | ||
174 | stt = kzalloc(sizeof(*stt) + npages * sizeof(struct page *), | 175 | stt = kzalloc(sizeof(*stt) + npages * sizeof(struct page *), |
175 | GFP_KERNEL); | 176 | GFP_KERNEL); |
176 | if (!stt) | 177 | if (!stt) |
diff --git a/arch/powerpc/kvm/book3s_hv_builtin.c b/arch/powerpc/kvm/book3s_hv_builtin.c index 96e7e609f621..c42a7e63b39e 100644 --- a/arch/powerpc/kvm/book3s_hv_builtin.c +++ b/arch/powerpc/kvm/book3s_hv_builtin.c | |||
@@ -29,11 +29,6 @@ | |||
29 | #include <asm/opal.h> | 29 | #include <asm/opal.h> |
30 | #include <asm/smp.h> | 30 | #include <asm/smp.h> |
31 | 31 | ||
32 | static bool in_realmode(void) | ||
33 | { | ||
34 | return !(mfmsr() & MSR_IR); | ||
35 | } | ||
36 | |||
37 | #define KVM_CMA_CHUNK_ORDER 18 | 32 | #define KVM_CMA_CHUNK_ORDER 18 |
38 | 33 | ||
39 | /* | 34 | /* |
@@ -230,13 +225,10 @@ void kvmhv_rm_send_ipi(int cpu) | |||
230 | 225 | ||
231 | /* Else poke the target with an IPI */ | 226 | /* Else poke the target with an IPI */ |
232 | xics_phys = paca[cpu].kvm_hstate.xics_phys; | 227 | xics_phys = paca[cpu].kvm_hstate.xics_phys; |
233 | if (!in_realmode()) | 228 | if (xics_phys) |
234 | opal_int_set_mfrr(get_hard_smp_processor_id(cpu), IPI_PRIORITY); | ||
235 | else if (xics_phys) | ||
236 | rm_writeb(xics_phys + XICS_MFRR, IPI_PRIORITY); | 229 | rm_writeb(xics_phys + XICS_MFRR, IPI_PRIORITY); |
237 | else | 230 | else |
238 | opal_rm_int_set_mfrr(get_hard_smp_processor_id(cpu), | 231 | opal_int_set_mfrr(get_hard_smp_processor_id(cpu), IPI_PRIORITY); |
239 | IPI_PRIORITY); | ||
240 | } | 232 | } |
241 | 233 | ||
242 | /* | 234 | /* |
@@ -419,10 +411,8 @@ static long kvmppc_read_one_intr(bool *again) | |||
419 | /* Now read the interrupt from the ICP */ | 411 | /* Now read the interrupt from the ICP */ |
420 | xics_phys = local_paca->kvm_hstate.xics_phys; | 412 | xics_phys = local_paca->kvm_hstate.xics_phys; |
421 | rc = 0; | 413 | rc = 0; |
422 | if (!in_realmode()) | 414 | if (!xics_phys) |
423 | rc = opal_int_get_xirr(&xirr, false); | 415 | rc = opal_int_get_xirr(&xirr, false); |
424 | else if (!xics_phys) | ||
425 | rc = opal_rm_int_get_xirr(&xirr, false); | ||
426 | else | 416 | else |
427 | xirr = _lwzcix(xics_phys + XICS_XIRR); | 417 | xirr = _lwzcix(xics_phys + XICS_XIRR); |
428 | if (rc < 0) | 418 | if (rc < 0) |
@@ -453,15 +443,12 @@ static long kvmppc_read_one_intr(bool *again) | |||
453 | */ | 443 | */ |
454 | if (xisr == XICS_IPI) { | 444 | if (xisr == XICS_IPI) { |
455 | rc = 0; | 445 | rc = 0; |
456 | if (!in_realmode()) { | 446 | if (xics_phys) { |
457 | opal_int_set_mfrr(hard_smp_processor_id(), 0xff); | ||
458 | rc = opal_int_eoi(h_xirr); | ||
459 | } else if (xics_phys) { | ||
460 | _stbcix(xics_phys + XICS_MFRR, 0xff); | 447 | _stbcix(xics_phys + XICS_MFRR, 0xff); |
461 | _stwcix(xics_phys + XICS_XIRR, xirr); | 448 | _stwcix(xics_phys + XICS_XIRR, xirr); |
462 | } else { | 449 | } else { |
463 | opal_rm_int_set_mfrr(hard_smp_processor_id(), 0xff); | 450 | opal_int_set_mfrr(hard_smp_processor_id(), 0xff); |
464 | rc = opal_rm_int_eoi(h_xirr); | 451 | rc = opal_int_eoi(h_xirr); |
465 | } | 452 | } |
466 | /* If rc > 0, there is another interrupt pending */ | 453 | /* If rc > 0, there is another interrupt pending */ |
467 | *again = rc > 0; | 454 | *again = rc > 0; |
@@ -482,14 +469,11 @@ static long kvmppc_read_one_intr(bool *again) | |||
482 | /* We raced with the host, | 469 | /* We raced with the host, |
483 | * we need to resend that IPI, bummer | 470 | * we need to resend that IPI, bummer |
484 | */ | 471 | */ |
485 | if (!in_realmode()) | 472 | if (xics_phys) |
486 | opal_int_set_mfrr(hard_smp_processor_id(), | ||
487 | IPI_PRIORITY); | ||
488 | else if (xics_phys) | ||
489 | _stbcix(xics_phys + XICS_MFRR, IPI_PRIORITY); | 473 | _stbcix(xics_phys + XICS_MFRR, IPI_PRIORITY); |
490 | else | 474 | else |
491 | opal_rm_int_set_mfrr(hard_smp_processor_id(), | 475 | opal_int_set_mfrr(hard_smp_processor_id(), |
492 | IPI_PRIORITY); | 476 | IPI_PRIORITY); |
493 | /* Let side effects complete */ | 477 | /* Let side effects complete */ |
494 | smp_mb(); | 478 | smp_mb(); |
495 | return 1; | 479 | return 1; |
diff --git a/arch/powerpc/kvm/book3s_hv_rm_xics.c b/arch/powerpc/kvm/book3s_hv_rm_xics.c index 0b2e388f4cdf..e78542d99cd6 100644 --- a/arch/powerpc/kvm/book3s_hv_rm_xics.c +++ b/arch/powerpc/kvm/book3s_hv_rm_xics.c | |||
@@ -36,7 +36,7 @@ EXPORT_SYMBOL(kvm_irq_bypass); | |||
36 | 36 | ||
37 | static void icp_rm_deliver_irq(struct kvmppc_xics *xics, struct kvmppc_icp *icp, | 37 | static void icp_rm_deliver_irq(struct kvmppc_xics *xics, struct kvmppc_icp *icp, |
38 | u32 new_irq, bool check_resend); | 38 | u32 new_irq, bool check_resend); |
39 | static int xics_opal_rm_set_server(unsigned int hw_irq, int server_cpu); | 39 | static int xics_opal_set_server(unsigned int hw_irq, int server_cpu); |
40 | 40 | ||
41 | /* -- ICS routines -- */ | 41 | /* -- ICS routines -- */ |
42 | static void ics_rm_check_resend(struct kvmppc_xics *xics, | 42 | static void ics_rm_check_resend(struct kvmppc_xics *xics, |
@@ -720,7 +720,7 @@ static int ics_rm_eoi(struct kvm_vcpu *vcpu, u32 irq) | |||
720 | ++vcpu->stat.pthru_host; | 720 | ++vcpu->stat.pthru_host; |
721 | if (state->intr_cpu != pcpu) { | 721 | if (state->intr_cpu != pcpu) { |
722 | ++vcpu->stat.pthru_bad_aff; | 722 | ++vcpu->stat.pthru_bad_aff; |
723 | xics_opal_rm_set_server(state->host_irq, pcpu); | 723 | xics_opal_set_server(state->host_irq, pcpu); |
724 | } | 724 | } |
725 | state->intr_cpu = -1; | 725 | state->intr_cpu = -1; |
726 | } | 726 | } |
@@ -781,16 +781,16 @@ static void icp_eoi(struct irq_chip *c, u32 hwirq, __be32 xirr, bool *again) | |||
781 | if (xics_phys) { | 781 | if (xics_phys) { |
782 | _stwcix(xics_phys + XICS_XIRR, xirr); | 782 | _stwcix(xics_phys + XICS_XIRR, xirr); |
783 | } else { | 783 | } else { |
784 | rc = opal_rm_int_eoi(be32_to_cpu(xirr)); | 784 | rc = opal_int_eoi(be32_to_cpu(xirr)); |
785 | *again = rc > 0; | 785 | *again = rc > 0; |
786 | } | 786 | } |
787 | } | 787 | } |
788 | 788 | ||
789 | static int xics_opal_rm_set_server(unsigned int hw_irq, int server_cpu) | 789 | static int xics_opal_set_server(unsigned int hw_irq, int server_cpu) |
790 | { | 790 | { |
791 | unsigned int mangle_cpu = get_hard_smp_processor_id(server_cpu) << 2; | 791 | unsigned int mangle_cpu = get_hard_smp_processor_id(server_cpu) << 2; |
792 | 792 | ||
793 | return opal_rm_set_xive(hw_irq, mangle_cpu, DEFAULT_PRIORITY); | 793 | return opal_set_xive(hw_irq, mangle_cpu, DEFAULT_PRIORITY); |
794 | } | 794 | } |
795 | 795 | ||
796 | /* | 796 | /* |
diff --git a/arch/powerpc/platforms/powernv/opal-wrappers.S b/arch/powerpc/platforms/powernv/opal-wrappers.S index 3aa40f1b20f5..28799e557348 100644 --- a/arch/powerpc/platforms/powernv/opal-wrappers.S +++ b/arch/powerpc/platforms/powernv/opal-wrappers.S | |||
@@ -58,14 +58,16 @@ END_FTR_SECTION(0, 1); \ | |||
58 | 58 | ||
59 | #define OPAL_CALL(name, token) \ | 59 | #define OPAL_CALL(name, token) \ |
60 | _GLOBAL_TOC(name); \ | 60 | _GLOBAL_TOC(name); \ |
61 | mfmsr r12; \ | ||
61 | mflr r0; \ | 62 | mflr r0; \ |
63 | andi. r11,r12,MSR_IR|MSR_DR; \ | ||
62 | std r0,PPC_LR_STKOFF(r1); \ | 64 | std r0,PPC_LR_STKOFF(r1); \ |
63 | li r0,token; \ | 65 | li r0,token; \ |
66 | beq opal_real_call; \ | ||
64 | OPAL_BRANCH(opal_tracepoint_entry) \ | 67 | OPAL_BRANCH(opal_tracepoint_entry) \ |
65 | mfcr r12; \ | 68 | mfcr r11; \ |
66 | stw r12,8(r1); \ | 69 | stw r11,8(r1); \ |
67 | li r11,0; \ | 70 | li r11,0; \ |
68 | mfmsr r12; \ | ||
69 | ori r11,r11,MSR_EE; \ | 71 | ori r11,r11,MSR_EE; \ |
70 | std r12,PACASAVEDMSR(r13); \ | 72 | std r12,PACASAVEDMSR(r13); \ |
71 | andc r12,r12,r11; \ | 73 | andc r12,r12,r11; \ |
@@ -98,6 +100,30 @@ opal_return: | |||
98 | mtcr r4; | 100 | mtcr r4; |
99 | rfid | 101 | rfid |
100 | 102 | ||
103 | opal_real_call: | ||
104 | mfcr r11 | ||
105 | stw r11,8(r1) | ||
106 | /* Set opal return address */ | ||
107 | LOAD_REG_ADDR(r11, opal_return_realmode) | ||
108 | mtlr r11 | ||
109 | li r11,MSR_LE | ||
110 | andc r12,r12,r11 | ||
111 | mtspr SPRN_HSRR1,r12 | ||
112 | LOAD_REG_ADDR(r11,opal) | ||
113 | ld r12,8(r11) | ||
114 | ld r2,0(r11) | ||
115 | mtspr SPRN_HSRR0,r12 | ||
116 | hrfid | ||
117 | |||
118 | opal_return_realmode: | ||
119 | FIXUP_ENDIAN | ||
120 | ld r2,PACATOC(r13); | ||
121 | lwz r11,8(r1); | ||
122 | ld r12,PPC_LR_STKOFF(r1) | ||
123 | mtcr r11; | ||
124 | mtlr r12 | ||
125 | blr | ||
126 | |||
101 | #ifdef CONFIG_TRACEPOINTS | 127 | #ifdef CONFIG_TRACEPOINTS |
102 | opal_tracepoint_entry: | 128 | opal_tracepoint_entry: |
103 | stdu r1,-STACKFRAMESIZE(r1) | 129 | stdu r1,-STACKFRAMESIZE(r1) |
@@ -155,36 +181,6 @@ opal_tracepoint_return: | |||
155 | blr | 181 | blr |
156 | #endif | 182 | #endif |
157 | 183 | ||
158 | #define OPAL_CALL_REAL(name, token) \ | ||
159 | _GLOBAL_TOC(name); \ | ||
160 | mflr r0; \ | ||
161 | std r0,PPC_LR_STKOFF(r1); \ | ||
162 | li r0,token; \ | ||
163 | mfcr r12; \ | ||
164 | stw r12,8(r1); \ | ||
165 | \ | ||
166 | /* Set opal return address */ \ | ||
167 | LOAD_REG_ADDR(r11, opal_return_realmode); \ | ||
168 | mtlr r11; \ | ||
169 | mfmsr r12; \ | ||
170 | li r11,MSR_LE; \ | ||
171 | andc r12,r12,r11; \ | ||
172 | mtspr SPRN_HSRR1,r12; \ | ||
173 | LOAD_REG_ADDR(r11,opal); \ | ||
174 | ld r12,8(r11); \ | ||
175 | ld r2,0(r11); \ | ||
176 | mtspr SPRN_HSRR0,r12; \ | ||
177 | hrfid | ||
178 | |||
179 | opal_return_realmode: | ||
180 | FIXUP_ENDIAN | ||
181 | ld r2,PACATOC(r13); | ||
182 | lwz r11,8(r1); | ||
183 | ld r12,PPC_LR_STKOFF(r1) | ||
184 | mtcr r11; | ||
185 | mtlr r12 | ||
186 | blr | ||
187 | |||
188 | 184 | ||
189 | OPAL_CALL(opal_invalid_call, OPAL_INVALID_CALL); | 185 | OPAL_CALL(opal_invalid_call, OPAL_INVALID_CALL); |
190 | OPAL_CALL(opal_console_write, OPAL_CONSOLE_WRITE); | 186 | OPAL_CALL(opal_console_write, OPAL_CONSOLE_WRITE); |
@@ -208,7 +204,6 @@ OPAL_CALL(opal_pci_config_write_byte, OPAL_PCI_CONFIG_WRITE_BYTE); | |||
208 | OPAL_CALL(opal_pci_config_write_half_word, OPAL_PCI_CONFIG_WRITE_HALF_WORD); | 204 | OPAL_CALL(opal_pci_config_write_half_word, OPAL_PCI_CONFIG_WRITE_HALF_WORD); |
209 | OPAL_CALL(opal_pci_config_write_word, OPAL_PCI_CONFIG_WRITE_WORD); | 205 | OPAL_CALL(opal_pci_config_write_word, OPAL_PCI_CONFIG_WRITE_WORD); |
210 | OPAL_CALL(opal_set_xive, OPAL_SET_XIVE); | 206 | OPAL_CALL(opal_set_xive, OPAL_SET_XIVE); |
211 | OPAL_CALL_REAL(opal_rm_set_xive, OPAL_SET_XIVE); | ||
212 | OPAL_CALL(opal_get_xive, OPAL_GET_XIVE); | 207 | OPAL_CALL(opal_get_xive, OPAL_GET_XIVE); |
213 | OPAL_CALL(opal_register_exception_handler, OPAL_REGISTER_OPAL_EXCEPTION_HANDLER); | 208 | OPAL_CALL(opal_register_exception_handler, OPAL_REGISTER_OPAL_EXCEPTION_HANDLER); |
214 | OPAL_CALL(opal_pci_eeh_freeze_status, OPAL_PCI_EEH_FREEZE_STATUS); | 209 | OPAL_CALL(opal_pci_eeh_freeze_status, OPAL_PCI_EEH_FREEZE_STATUS); |
@@ -264,7 +259,6 @@ OPAL_CALL(opal_validate_flash, OPAL_FLASH_VALIDATE); | |||
264 | OPAL_CALL(opal_manage_flash, OPAL_FLASH_MANAGE); | 259 | OPAL_CALL(opal_manage_flash, OPAL_FLASH_MANAGE); |
265 | OPAL_CALL(opal_update_flash, OPAL_FLASH_UPDATE); | 260 | OPAL_CALL(opal_update_flash, OPAL_FLASH_UPDATE); |
266 | OPAL_CALL(opal_resync_timebase, OPAL_RESYNC_TIMEBASE); | 261 | OPAL_CALL(opal_resync_timebase, OPAL_RESYNC_TIMEBASE); |
267 | OPAL_CALL_REAL(opal_rm_resync_timebase, OPAL_RESYNC_TIMEBASE); | ||
268 | OPAL_CALL(opal_check_token, OPAL_CHECK_TOKEN); | 262 | OPAL_CALL(opal_check_token, OPAL_CHECK_TOKEN); |
269 | OPAL_CALL(opal_dump_init, OPAL_DUMP_INIT); | 263 | OPAL_CALL(opal_dump_init, OPAL_DUMP_INIT); |
270 | OPAL_CALL(opal_dump_info, OPAL_DUMP_INFO); | 264 | OPAL_CALL(opal_dump_info, OPAL_DUMP_INFO); |
@@ -280,9 +274,7 @@ OPAL_CALL(opal_sensor_read, OPAL_SENSOR_READ); | |||
280 | OPAL_CALL(opal_get_param, OPAL_GET_PARAM); | 274 | OPAL_CALL(opal_get_param, OPAL_GET_PARAM); |
281 | OPAL_CALL(opal_set_param, OPAL_SET_PARAM); | 275 | OPAL_CALL(opal_set_param, OPAL_SET_PARAM); |
282 | OPAL_CALL(opal_handle_hmi, OPAL_HANDLE_HMI); | 276 | OPAL_CALL(opal_handle_hmi, OPAL_HANDLE_HMI); |
283 | OPAL_CALL_REAL(opal_rm_handle_hmi, OPAL_HANDLE_HMI); | ||
284 | OPAL_CALL(opal_config_cpu_idle_state, OPAL_CONFIG_CPU_IDLE_STATE); | 277 | OPAL_CALL(opal_config_cpu_idle_state, OPAL_CONFIG_CPU_IDLE_STATE); |
285 | OPAL_CALL_REAL(opal_rm_config_cpu_idle_state, OPAL_CONFIG_CPU_IDLE_STATE); | ||
286 | OPAL_CALL(opal_slw_set_reg, OPAL_SLW_SET_REG); | 278 | OPAL_CALL(opal_slw_set_reg, OPAL_SLW_SET_REG); |
287 | OPAL_CALL(opal_register_dump_region, OPAL_REGISTER_DUMP_REGION); | 279 | OPAL_CALL(opal_register_dump_region, OPAL_REGISTER_DUMP_REGION); |
288 | OPAL_CALL(opal_unregister_dump_region, OPAL_UNREGISTER_DUMP_REGION); | 280 | OPAL_CALL(opal_unregister_dump_region, OPAL_UNREGISTER_DUMP_REGION); |
@@ -304,11 +296,7 @@ OPAL_CALL(opal_pci_get_presence_state, OPAL_PCI_GET_PRESENCE_STATE); | |||
304 | OPAL_CALL(opal_pci_get_power_state, OPAL_PCI_GET_POWER_STATE); | 296 | OPAL_CALL(opal_pci_get_power_state, OPAL_PCI_GET_POWER_STATE); |
305 | OPAL_CALL(opal_pci_set_power_state, OPAL_PCI_SET_POWER_STATE); | 297 | OPAL_CALL(opal_pci_set_power_state, OPAL_PCI_SET_POWER_STATE); |
306 | OPAL_CALL(opal_int_get_xirr, OPAL_INT_GET_XIRR); | 298 | OPAL_CALL(opal_int_get_xirr, OPAL_INT_GET_XIRR); |
307 | OPAL_CALL_REAL(opal_rm_int_get_xirr, OPAL_INT_GET_XIRR); | ||
308 | OPAL_CALL(opal_int_set_cppr, OPAL_INT_SET_CPPR); | 299 | OPAL_CALL(opal_int_set_cppr, OPAL_INT_SET_CPPR); |
309 | OPAL_CALL(opal_int_eoi, OPAL_INT_EOI); | 300 | OPAL_CALL(opal_int_eoi, OPAL_INT_EOI); |
310 | OPAL_CALL_REAL(opal_rm_int_eoi, OPAL_INT_EOI); | ||
311 | OPAL_CALL(opal_int_set_mfrr, OPAL_INT_SET_MFRR); | 301 | OPAL_CALL(opal_int_set_mfrr, OPAL_INT_SET_MFRR); |
312 | OPAL_CALL_REAL(opal_rm_int_set_mfrr, OPAL_INT_SET_MFRR); | ||
313 | OPAL_CALL(opal_pci_tce_kill, OPAL_PCI_TCE_KILL); | 302 | OPAL_CALL(opal_pci_tce_kill, OPAL_PCI_TCE_KILL); |
314 | OPAL_CALL_REAL(opal_rm_pci_tce_kill, OPAL_PCI_TCE_KILL); | ||
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index b07680cd2518..a897958edb88 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c | |||
@@ -1962,11 +1962,6 @@ static void pnv_pci_ioda2_tce_invalidate(struct iommu_table *tbl, | |||
1962 | if (phb->model == PNV_PHB_MODEL_PHB3 && phb->regs) | 1962 | if (phb->model == PNV_PHB_MODEL_PHB3 && phb->regs) |
1963 | pnv_pci_phb3_tce_invalidate(pe, rm, shift, | 1963 | pnv_pci_phb3_tce_invalidate(pe, rm, shift, |
1964 | index, npages); | 1964 | index, npages); |
1965 | else if (rm) | ||
1966 | opal_rm_pci_tce_kill(phb->opal_id, | ||
1967 | OPAL_PCI_TCE_KILL_PAGES, | ||
1968 | pe->pe_number, 1u << shift, | ||
1969 | index << shift, npages); | ||
1970 | else | 1965 | else |
1971 | opal_pci_tce_kill(phb->opal_id, | 1966 | opal_pci_tce_kill(phb->opal_id, |
1972 | OPAL_PCI_TCE_KILL_PAGES, | 1967 | OPAL_PCI_TCE_KILL_PAGES, |