From 55d5280da214ec639887e914ea3b08c61250f91f Mon Sep 17 00:00:00 2001 From: matt Date: Thu, 10 Apr 2008 23:29:01 +0000 Subject: [PATCH] On MP systems, make sure to update l->l_cpu with the cpu_info of the current processor (in case it was running on a different processor before). --- sys/arch/powerpc/powerpc/locore_subr.S | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/arch/powerpc/powerpc/locore_subr.S b/sys/arch/powerpc/powerpc/locore_subr.S index d0a494c7f09a..783584deedfc 100644 --- a/sys/arch/powerpc/powerpc/locore_subr.S +++ b/sys/arch/powerpc/powerpc/locore_subr.S @@ -1,4 +1,4 @@ -/* $NetBSD: locore_subr.S,v 1.36 2008/04/08 02:33:03 garbled Exp $ */ +/* $NetBSD: locore_subr.S,v 1.37 2008/04/10 23:29:01 matt Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -204,6 +204,9 @@ switchto_restore: GET_CPUINFO(%r7) stptr %r31,CI_CURLWP(%r7) +#ifdef MULTIPROCESSOR + stptr %r7,L_CPU(%r31) /* update cpu pointer */ +#endif ldptr %r4,L_ADDR(%r31) /* put PCB addr in r4 */ stptr %r4,CI_CURPCB(%r7) /* using a new pcb */ ldptr %r3,PCB_PM(%r4)