Sat Mar 6 08:34:58 2021 UTC ()
For ibm4xx and booke, restore saved PSL_EE bit as done for oea,
instead of forcibly enabling interrupts.


(rin)
diff -r1.64 -r1.65 src/sys/arch/powerpc/powerpc/locore_subr.S

cvs diff -r1.64 -r1.65 src/sys/arch/powerpc/powerpc/locore_subr.S (expand / switch to unified diff)

--- src/sys/arch/powerpc/powerpc/locore_subr.S 2021/03/06 08:08:19 1.64
+++ src/sys/arch/powerpc/powerpc/locore_subr.S 2021/03/06 08:34:58 1.65
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: locore_subr.S,v 1.64 2021/03/06 08:08:19 rin Exp $ */ 1/* $NetBSD: locore_subr.S,v 1.65 2021/03/06 08:34:58 rin Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001 Wasabi Systems, Inc. 4 * Copyright (c) 2001 Wasabi Systems, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Written by Eduardo Horvath and Simon Burge for Wasabi Systems, Inc. 7 * Written by Eduardo Horvath and Simon Burge for Wasabi Systems, Inc.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -391,27 +391,27 @@ _ENTRY(softint_fast_dispatch) @@ -391,27 +391,27 @@ _ENTRY(softint_fast_dispatch)
391 391
392 stptr %r3, CI_CURLWP(%r7) 392 stptr %r3, CI_CURLWP(%r7)
393 mr %r13, %r3 393 mr %r13, %r3
394#ifdef PPC_BOOKE 394#ifdef PPC_BOOKE
395 mtsprg2 %r3 395 mtsprg2 %r3
396#endif 396#endif
397 ldptr %r5, L_PCB(%r3) 397 ldptr %r5, L_PCB(%r3)
398 stptr %r5, CI_CURPCB(%r7) 398 stptr %r5, CI_CURPCB(%r7)
399 ldptr %r0, PCB_PM(%r5) 399 ldptr %r0, PCB_PM(%r5)
400 stptr %r0, CI_CURPM(%r7) /* and maybe a new pmap */ 400 stptr %r0, CI_CURPM(%r7) /* and maybe a new pmap */
401 addi %r1, %r5, USPACE - FRAMELEN - CALLFRAMELEN 401 addi %r1, %r5, USPACE - FRAMELEN - CALLFRAMELEN
402 402
403#if defined(PPC_IBM4XX) || defined(PPC_BOOKE) 403#if defined(PPC_IBM4XX) || defined(PPC_BOOKE)
404 wrteei 1 /* interrupts are okay again */ 404 wrtee %r29 /* interrupts are okay again */
405#else /* PPC_OEA */ 405#else /* PPC_OEA */
406 mtmsr %r29 406 mtmsr %r29
407#endif 407#endif
408 408
409 /* 409 /*
410 * %r3 = softint thread 410 * %r3 = softint thread
411 * %r4 = ipl 411 * %r4 = ipl
412 */ 412 */
413 mr %r3, %r30 /* pass former curlwp */ 413 mr %r3, %r30 /* pass former curlwp */
414 bl _C_LABEL(softint_dispatch) 414 bl _C_LABEL(softint_dispatch)
415 415
416#if defined(PPC_IBM4XX) || defined(PPC_BOOKE) 416#if defined(PPC_IBM4XX) || defined(PPC_BOOKE)
417 wrteei 0 /* disable interrupts while 417 wrteei 0 /* disable interrupts while