Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/oea Fix broken cpu_hatch_stack.
details: https://anonhg.NetBSD.org/src/rev/e025d3555dd4
branches: trunk
changeset: 782201:e025d3555dd4
user: kiyohara <kiyohara%NetBSD.org@localhost>
date: Sat Oct 20 13:18:45 2012 +0000
description:
Fix broken cpu_hatch_stack.
And define macro HATCH_STACK_SIZE.
diffstat:
sys/arch/powerpc/oea/cpu_subr.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (53 lines):
diff -r c741cde85acb -r e025d3555dd4 sys/arch/powerpc/oea/cpu_subr.c
--- a/sys/arch/powerpc/oea/cpu_subr.c Sat Oct 20 13:10:44 2012 +0000
+++ b/sys/arch/powerpc/oea/cpu_subr.c Sat Oct 20 13:18:45 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_subr.c,v 1.74 2012/10/20 13:10:44 kiyohara Exp $ */
+/* $NetBSD: cpu_subr.c,v 1.75 2012/10/20 13:18:45 kiyohara Exp $ */
/*-
* Copyright (c) 2001 Matt Thomas.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.74 2012/10/20 13:10:44 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.75 2012/10/20 13:18:45 kiyohara Exp $");
#include "opt_ppcparam.h"
#include "opt_multiprocessor.h"
@@ -236,6 +236,7 @@
};
volatile struct cpu_hatch_data *cpu_hatch_data;
volatile int cpu_hatch_stack;
+#define HATCH_STACK_SIZE 0x1000
extern int ticks_per_intr;
#include <powerpc/oea/bat.h>
#include <powerpc/pic/picvar.h>
@@ -1203,7 +1204,7 @@
KASSERT(ci != curcpu());
/* Now allocate a hatch stack */
- error = uvm_pglistalloc(0x1000, 0x10000, 0x10000000, 16, 0,
+ error = uvm_pglistalloc(HATCH_STACK_SIZE, 0x10000, 0x10000000, 16, 0,
&mlist, 1, 1);
if (error) {
aprint_error(": unable to allocate hatch stack\n");
@@ -1211,7 +1212,7 @@
}
hp = (void *)VM_PAGE_TO_PHYS(TAILQ_FIRST(&mlist));
- memset(hp, 0, 0x1000);
+ memset(hp, 0, HATCH_STACK_SIZE);
/* Initialize secondary cpu's initial lwp to its idlelwp. */
ci->ci_curlwp = ci->ci_data.cpu_idlelwp;
@@ -1224,7 +1225,7 @@
h->hatch_ci = ci;
h->hatch_pir = ci->ci_cpuid;
- cpu_hatch_stack = (uint32_t)hp;
+ cpu_hatch_stack = (uint32_t)hp + HATCH_STACK_SIZE - CALLFRAMELEN;
ci->ci_lasttb = cpu_info[0].ci_lasttb;
/* copy special registers */
Home |
Main Index |
Thread Index |
Old Index