Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc Fix some fallout from building the macppc G...
details: https://anonhg.NetBSD.org/src/rev/9cc735318ec0
branches: trunk
changeset: 760984:9cc735318ec0
user: matt <matt%NetBSD.org@localhost>
date: Tue Jan 18 02:25:42 2011 +0000
description:
Fix some fallout from building the macppc GENERIC.MP.
diffstat:
sys/arch/powerpc/oea/altivec.c | 6 +++---
sys/arch/powerpc/oea/cpu_subr.c | 26 ++++----------------------
sys/arch/powerpc/oea/oea_machdep.c | 5 +++--
sys/arch/powerpc/pic/ipi.c | 8 ++++----
sys/arch/powerpc/powerpc/fpu.c | 21 ++++++++++-----------
5 files changed, 24 insertions(+), 42 deletions(-)
diffs (208 lines):
diff -r 904a61def03c -r 9cc735318ec0 sys/arch/powerpc/oea/altivec.c
--- a/sys/arch/powerpc/oea/altivec.c Tue Jan 18 01:28:19 2011 +0000
+++ b/sys/arch/powerpc/oea/altivec.c Tue Jan 18 02:25:42 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: altivec.c,v 1.18 2011/01/18 01:02:55 matt Exp $ */
+/* $NetBSD: altivec.c,v 1.19 2011/01/18 02:25:42 matt Exp $ */
/*
* Copyright (C) 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altivec.c,v 1.18 2011/01/18 01:02:55 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altivec.c,v 1.19 2011/01/18 02:25:42 matt Exp $");
#include "opt_multiprocessor.h"
@@ -183,7 +183,7 @@
panic("%s/%d timed out: pid = %d.%d, veccpu->ci_cpuid = %d\n",
__func__, cpu_number(), l->l_proc->p_pid, l->l_lid,
- veccpu->ci_cpuid);
+ l->l_md.md_veccpu->ci_cpuid);
}
#endif /*MULTIPROCESSOR*/
diff -r 904a61def03c -r 9cc735318ec0 sys/arch/powerpc/oea/cpu_subr.c
--- a/sys/arch/powerpc/oea/cpu_subr.c Tue Jan 18 01:28:19 2011 +0000
+++ b/sys/arch/powerpc/oea/cpu_subr.c Tue Jan 18 02:25:42 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_subr.c,v 1.60 2011/01/18 01:02:55 matt Exp $ */
+/* $NetBSD: cpu_subr.c,v 1.61 2011/01/18 02:25:42 matt Exp $ */
/*-
* Copyright (c) 2001 Matt Thomas.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.60 2011/01/18 01:02:55 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.61 2011/01/18 02:25:42 matt Exp $");
#include "opt_ppcparam.h"
#include "opt_multiprocessor.h"
@@ -51,6 +51,7 @@
#include <uvm/uvm.h>
+#include <powerpc/pcb.h>
#include <powerpc/spr.h>
#include <powerpc/oea/hid.h>
#include <powerpc/oea/hid_601.h>
@@ -1183,31 +1184,12 @@
volatile struct cpu_hatch_data hatch_data, *h = &hatch_data;
struct pglist mlist;
int i, error, pvr, vers;
- char *cp, *hp;
+ char *hp;
pvr = mfpvr();
vers = pvr >> 16;
KASSERT(ci != curcpu());
- /*
- * Allocate some contiguous pages for the intteup PCB and stack
- * from the lowest 256MB (because bat0 always maps it va == pa).
- * Must be 16 byte aligned.
- */
- error = uvm_pglistalloc(INTSTK, 0x10000, 0x10000000, 16, 0,
- &mlist, 1, 1);
- if (error) {
- aprint_error(": unable to allocate idle stack\n");
- return -1;
- }
-
- KASSERT(ci != &cpu_info[0]);
-
- cp = (void *)VM_PAGE_TO_PHYS(TAILQ_FIRST(&mlist));
- memset(cp, 0, INTSTK);
-
- ci->ci_intstk = cp;
-
/* Now allocate a hatch stack */
error = uvm_pglistalloc(0x1000, 0x10000, 0x10000000, 16, 0,
&mlist, 1, 1);
diff -r 904a61def03c -r 9cc735318ec0 sys/arch/powerpc/oea/oea_machdep.c
--- a/sys/arch/powerpc/oea/oea_machdep.c Tue Jan 18 01:28:19 2011 +0000
+++ b/sys/arch/powerpc/oea/oea_machdep.c Tue Jan 18 02:25:42 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: oea_machdep.c,v 1.55 2011/01/18 01:02:55 matt Exp $ */
+/* $NetBSD: oea_machdep.c,v 1.56 2011/01/18 02:25:42 matt Exp $ */
/*
* Copyright (C) 2002 Matt Thomas
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.55 2011/01/18 01:02:55 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.56 2011/01/18 02:25:42 matt Exp $");
#include "opt_ppcarch.h"
#include "opt_compat_netbsd.h"
@@ -150,6 +150,7 @@
/*
* Initialize proc0 and current pcb and pmap pointers.
*/
+ (void) ci;
KASSERT(ci != NULL);
KASSERT(curcpu() == ci);
KASSERT(lwp0.l_cpu == ci);
diff -r 904a61def03c -r 9cc735318ec0 sys/arch/powerpc/pic/ipi.c
--- a/sys/arch/powerpc/pic/ipi.c Tue Jan 18 01:28:19 2011 +0000
+++ b/sys/arch/powerpc/pic/ipi.c Tue Jan 18 02:25:42 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipi.c,v 1.6 2010/06/25 19:00:05 rmind Exp $ */
+/* $NetBSD: ipi.c,v 1.7 2011/01/18 02:25:42 matt Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipi.c,v 1.6 2010/06/25 19:00:05 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipi.c,v 1.7 2011/01/18 02:25:42 matt Exp $");
#include "opt_multiprocessor.h"
#include "opt_pic.h"
@@ -69,11 +69,11 @@
return 1;
if (ipi & PPC_IPI_FLUSH_FPU)
- save_fpu_cpu();
+ fpu_save_cpu(FPU_SAVE_AND_RELEASE);
#ifdef ALTIVEC
if (ipi & PPC_IPI_FLUSH_VEC)
- save_vec_cpu();
+ vec_save_cpu(VEC_SAVE_AND_RELEASE);
#endif
if (ipi & PPC_IPI_XCALL)
diff -r 904a61def03c -r 9cc735318ec0 sys/arch/powerpc/powerpc/fpu.c
--- a/sys/arch/powerpc/powerpc/fpu.c Tue Jan 18 01:28:19 2011 +0000
+++ b/sys/arch/powerpc/powerpc/fpu.c Tue Jan 18 02:25:42 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu.c,v 1.25 2011/01/18 01:02:55 matt Exp $ */
+/* $NetBSD: fpu.c,v 1.26 2011/01/18 02:25:43 matt Exp $ */
/*
* Copyright (C) 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.25 2011/01/18 01:02:55 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.26 2011/01/18 02:25:43 matt Exp $");
#include "opt_multiprocessor.h"
@@ -123,7 +123,7 @@
* (though by the time our IPI is processed, it may have been flushed already).
*/
static void
-mp_save_fpu_lwp(struct lwp *l)
+fpu_mp_save_lwp(struct lwp *l)
{
/*
* Send an IPI to the other CPU with the data and wait for that CP * to flush the data. Note that the other CPU might have switched
@@ -140,11 +140,11 @@
/* Wait for flush. */
for (u_int i = 0; i < 0x3fffffff; i++) {
- if (l->l_md.md_flags & MDLWP_OWNFPU) == 0)
+ if ((l->l_md.md_flags & MDLWP_OWNFPU) == 0)
return;
}
- aprint_error("mp_save_fpu_proc{%d} pid = %d.%d, fpucpu->ci_cpuid = %d\n",
+ aprint_error("%s/%d pid = %d.%d, fpucpu->ci_cpuid = %d\n", __func__,
cpu_number(), l->l_proc->p_pid, l->l_lid, fpucpu->ci_cpuid);
panic("mp_save_fpu_proc: timed out");
}
@@ -246,17 +246,16 @@
#ifdef DIAGNOSTIC
struct cpu_info * const ci = curcpu();
#endif
- struct pcb *pcb = curpcb;
- lwp_t *l = curlwp;
+ struct pcb * const pcb = curpcb;
register_t msr;
uint64_t tmp, fpscr64;
uint32_t fpscr, ofpscr;
int code;
- KASSERT(l->l_md.md_fpucpu == ci);
- KASSERT(l->l_md.md_flags & MDLWP_USEDFPU);
- KASSERT(l->l_md.md_flags & MDLWP_OWNFPU);
- KASSERT(ci->ci_fpulwp == l);
+ KASSERT(curlwp->l_md.md_fpucpu == ci);
+ KASSERT(curlwp->l_md.md_flags & MDLWP_USEDFPU);
+ KASSERT(curlwp->l_md.md_flags & MDLWP_OWNFPU);
+ KASSERT(ci->ci_fpulwp == curlwp);
msr = mfmsr();
mtmsr((msr & ~PSL_EE) | PSL_FP);
__asm volatile ("isync");
Home |
Main Index |
Thread Index |
Old Index