| @@ -22,27 +22,27 @@ | | | @@ -22,27 +22,27 @@ |
22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | | 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
27 | * POSSIBILITY OF SUCH DAMAGE. | | 27 | * POSSIBILITY OF SUCH DAMAGE. |
28 | */ | | 28 | */ |
29 | | | 29 | |
30 | #include <sys/cdefs.h> | | 30 | #include <sys/cdefs.h> |
31 | | | 31 | |
32 | #define __PMAP_PRIVATE | | 32 | #define __PMAP_PRIVATE |
33 | #define __UFETCHSTORE_PRIVATE | | 33 | #define __UFETCHSTORE_PRIVATE |
34 | | | 34 | |
35 | __RCSID("$NetBSD: trap.c,v 1.8 2020/11/01 20:56:24 skrll Exp $"); | | 35 | __RCSID("$NetBSD: trap.c,v 1.9 2020/11/01 21:06:22 skrll Exp $"); |
36 | | | 36 | |
37 | #include <sys/param.h> | | 37 | #include <sys/param.h> |
38 | #include <sys/systm.h> | | 38 | #include <sys/systm.h> |
39 | #include <sys/atomic.h> | | 39 | #include <sys/atomic.h> |
40 | | | 40 | |
41 | #include <sys/signal.h> | | 41 | #include <sys/signal.h> |
42 | #include <sys/signalvar.h> | | 42 | #include <sys/signalvar.h> |
43 | #include <sys/siginfo.h> | | 43 | #include <sys/siginfo.h> |
44 | | | 44 | |
45 | #include <uvm/uvm.h> | | 45 | #include <uvm/uvm.h> |
46 | | | 46 | |
47 | #include <riscv/locore.h> | | 47 | #include <riscv/locore.h> |
48 | | | 48 | |
| @@ -412,27 +412,26 @@ cpu_trap(struct trapframe *tf, register_ | | | @@ -412,27 +412,26 @@ cpu_trap(struct trapframe *tf, register_ |
412 | if (usertrap_p) { | | 412 | if (usertrap_p) { |
413 | if (!ok) | | 413 | if (!ok) |
414 | cpu_trapsignal(tf, &ksi); | | 414 | cpu_trapsignal(tf, &ksi); |
415 | userret(curlwp); | | 415 | userret(curlwp); |
416 | } else if (!ok) { | | 416 | } else if (!ok) { |
417 | dump_trapframe(tf, printf); | | 417 | dump_trapframe(tf, printf); |
418 | panic("%s: fatal kernel trap", __func__); | | 418 | panic("%s: fatal kernel trap", __func__); |
419 | } | | 419 | } |
420 | } | | 420 | } |
421 | | | 421 | |
422 | void | | 422 | void |
423 | cpu_ast(struct trapframe *tf) | | 423 | cpu_ast(struct trapframe *tf) |
424 | { | | 424 | { |
425 | struct cpu_info * const ci = curcpu(); | | | |
426 | | | 425 | |
427 | atomic_swap_uint(&curlwp->l_md.md_astpending, 0); | | 426 | atomic_swap_uint(&curlwp->l_md.md_astpending, 0); |
428 | | | 427 | |
429 | if (curlwp->l_pflag & LP_OWEUPC) { | | 428 | if (curlwp->l_pflag & LP_OWEUPC) { |
430 | curlwp->l_pflag &= ~LP_OWEUPC; | | 429 | curlwp->l_pflag &= ~LP_OWEUPC; |
431 | ADDUPROF(curlwp); | | 430 | ADDUPROF(curlwp); |
432 | } | | 431 | } |
433 | } | | 432 | } |
434 | | | 433 | |
435 | void | | 434 | void |
436 | cpu_intr(struct trapframe *tf, register_t epc, register_t status, | | 435 | cpu_intr(struct trapframe *tf, register_t epc, register_t status, |
437 | register_t cause) | | 436 | register_t cause) |
438 | { | | 437 | { |