aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/exceptions-64s.S
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-11 20:48:14 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-11 20:48:14 -0500
commit140cd7fb04a4a2bc09a30980bc8104cc89e09330 (patch)
tree776d57c7508f946d592de4334d4d3cb50fd36220 /arch/powerpc/kernel/exceptions-64s.S
parent27afc5dbda52ee3dbcd0bda7375c917c6936b470 (diff)
parent56548fc0e86cb9156af7a7e1f15ba78f251dafaf (diff)
Merge tag 'powerpc-3.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux
Pull powerpc updates from Michael Ellerman: "Some nice cleanups like removing bootmem, and removal of __get_cpu_var(). There is one patch to mm/gup.c. This is the generic GUP implementation, but is only used by us and arm(64). We have an ack from Steve Capper, and although we didn't get an ack from Andrew he told us to take the patch through the powerpc tree. There's one cxl patch. This is in drivers/misc, but Greg said he was happy for us to manage fixes for it. There is an infrastructure patch to support an IPMI driver for OPAL. There is also an RTC driver for OPAL. We weren't able to get any response from the RTC maintainer, Alessandro Zummo, so in the end we just merged the driver. The usual batch of Freescale updates from Scott" * tag 'powerpc-3.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux: (101 commits) powerpc/powernv: Return to cpu offline loop when finished in KVM guest powerpc/book3s: Fix partial invalidation of TLBs in MCE code. powerpc/mm: don't do tlbie for updatepp request with NO HPTE fault powerpc/xmon: Cleanup the breakpoint flags powerpc/xmon: Enable HW instruction breakpoint on POWER8 powerpc/mm/thp: Use tlbiel if possible powerpc/mm/thp: Remove code duplication powerpc/mm/hugetlb: Sanity check gigantic hugepage count powerpc/oprofile: Disable pagefaults during user stack read powerpc/mm: Check for matching hpte without taking hpte lock powerpc: Drop useless warning in eeh_init() powerpc/powernv: Cleanup unused MCE definitions/declarations. powerpc/eeh: Dump PHB diag-data early powerpc/eeh: Recover EEH error on ownership change for BCM5719 powerpc/eeh: Set EEH_PE_RESET on PE reset powerpc/eeh: Refactor eeh_reset_pe() powerpc: Remove more traces of bootmem powerpc/pseries: Initialise nvram_pstore_info's buf_lock cxl: Name interrupts in /proc/interrupt cxl: Return error to PSL if IRQ demultiplexing fails & print clearer warning ...
Diffstat (limited to 'arch/powerpc/kernel/exceptions-64s.S')
-rw-r--r--arch/powerpc/kernel/exceptions-64s.S34
1 files changed, 16 insertions, 18 deletions
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index 72e783ea0681..db08382e19f1 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -131,6 +131,8 @@ BEGIN_FTR_SECTION
1311: 1311:
132#endif 132#endif
133 133
134 /* Return SRR1 from power7_nap() */
135 mfspr r3,SPRN_SRR1
134 beq cr1,2f 136 beq cr1,2f
135 b power7_wakeup_noloss 137 b power7_wakeup_noloss
1362: b power7_wakeup_loss 1382: b power7_wakeup_loss
@@ -292,15 +294,26 @@ decrementer_pSeries:
292 . = 0xc00 294 . = 0xc00
293 .globl system_call_pSeries 295 .globl system_call_pSeries
294system_call_pSeries: 296system_call_pSeries:
295 HMT_MEDIUM 297 /*
298 * If CONFIG_KVM_BOOK3S_64_HANDLER is set, save the PPR (on systems
299 * that support it) before changing to HMT_MEDIUM. That allows the KVM
300 * code to save that value into the guest state (it is the guest's PPR
301 * value). Otherwise just change to HMT_MEDIUM as userspace has
302 * already saved the PPR.
303 */
296#ifdef CONFIG_KVM_BOOK3S_64_HANDLER 304#ifdef CONFIG_KVM_BOOK3S_64_HANDLER
297 SET_SCRATCH0(r13) 305 SET_SCRATCH0(r13)
298 GET_PACA(r13) 306 GET_PACA(r13)
299 std r9,PACA_EXGEN+EX_R9(r13) 307 std r9,PACA_EXGEN+EX_R9(r13)
308 OPT_GET_SPR(r9, SPRN_PPR, CPU_FTR_HAS_PPR);
309 HMT_MEDIUM;
300 std r10,PACA_EXGEN+EX_R10(r13) 310 std r10,PACA_EXGEN+EX_R10(r13)
311 OPT_SAVE_REG_TO_PACA(PACA_EXGEN+EX_PPR, r9, CPU_FTR_HAS_PPR);
301 mfcr r9 312 mfcr r9
302 KVMTEST(0xc00) 313 KVMTEST(0xc00)
303 GET_SCRATCH0(r13) 314 GET_SCRATCH0(r13)
315#else
316 HMT_MEDIUM;
304#endif 317#endif
305 SYSCALL_PSERIES_1 318 SYSCALL_PSERIES_1
306 SYSCALL_PSERIES_2_RFID 319 SYSCALL_PSERIES_2_RFID
@@ -1301,23 +1314,6 @@ hmi_exception_after_realmode:
1301 EXCEPTION_PROLOG_0(PACA_EXGEN) 1314 EXCEPTION_PROLOG_0(PACA_EXGEN)
1302 b hmi_exception_hv 1315 b hmi_exception_hv
1303 1316
1304#ifdef CONFIG_PPC_POWERNV
1305_GLOBAL(opal_mc_secondary_handler)
1306 HMT_MEDIUM_PPR_DISCARD
1307 SET_SCRATCH0(r13)
1308 GET_PACA(r13)
1309 clrldi r3,r3,2
1310 tovirt(r3,r3)
1311 std r3,PACA_OPAL_MC_EVT(r13)
1312 ld r13,OPAL_MC_SRR0(r3)
1313 mtspr SPRN_SRR0,r13
1314 ld r13,OPAL_MC_SRR1(r3)
1315 mtspr SPRN_SRR1,r13
1316 ld r3,OPAL_MC_GPR3(r3)
1317 GET_SCRATCH0(r13)
1318 b machine_check_pSeries
1319#endif /* CONFIG_PPC_POWERNV */
1320
1321 1317
1322#define MACHINE_CHECK_HANDLER_WINDUP \ 1318#define MACHINE_CHECK_HANDLER_WINDUP \
1323 /* Clear MSR_RI before setting SRR0 and SRR1. */\ 1319 /* Clear MSR_RI before setting SRR0 and SRR1. */\
@@ -1571,9 +1567,11 @@ do_hash_page:
1571 * r3 contains the faulting address 1567 * r3 contains the faulting address
1572 * r4 contains the required access permissions 1568 * r4 contains the required access permissions
1573 * r5 contains the trap number 1569 * r5 contains the trap number
1570 * r6 contains dsisr
1574 * 1571 *
1575 * at return r3 = 0 for success, 1 for page fault, negative for error 1572 * at return r3 = 0 for success, 1 for page fault, negative for error
1576 */ 1573 */
1574 ld r6,_DSISR(r1)
1577 bl hash_page /* build HPTE if possible */ 1575 bl hash_page /* build HPTE if possible */
1578 cmpdi r3,0 /* see if hash_page succeeded */ 1576 cmpdi r3,0 /* see if hash_page succeeded */
1579 1577