@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_subr.c,v 1.48 2008/09/23 13:58:59 macallan Exp $ */
+/* $NetBSD: cpu_subr.c,v 1.49 2008/10/04 17:20:06 chs Exp $ */
/*-
* Copyright (c) 2001 Matt Thomas.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.48 2008/09/23 13:58:59 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.49 2008/10/04 17:20:06 chs Exp $");
#include "opt_ppcparam.h"
#include "opt_multiprocessor.h"
@@ -1184,13 +1184,12 @@
/*
* Set PIR (Processor Identification Register). i.e. whoami
- * Note that PIR is read-only on some CPU's. Try to work around
- * that as best as possible. Assume that if it is 0, it is meant
- * to be setup by us.
+ * Note that PIR is read-only on some CPU versions, so we write to it
+ * only if it has a different value than we need.
*/
msr = mfspr(SPR_PIR);
- if (msr == 0)
+ if (msr != h->pir)
mtspr(SPR_PIR, h->pir);
__asm volatile ("mtsprg 0,%0" :: "r"(ci));