Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/arm32 Fix the stacks used by the other CPU to n...



details:   https://anonhg.NetBSD.org/src/rev/82cd52d88200
branches:  trunk
changeset: 333451:82cd52d88200
user:      matt <matt%NetBSD.org@localhost>
date:      Tue Nov 04 22:37:09 2014 +0000

description:
Fix the stacks used by the other CPU to not overlap with the boot cpu's stacks.

diffstat:

 sys/arch/arm/arm32/arm32_boot.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (36 lines):

diff -r 92cbdf61f33d -r 82cd52d88200 sys/arch/arm/arm32/arm32_boot.c
--- a/sys/arch/arm/arm32/arm32_boot.c   Tue Nov 04 21:08:12 2014 +0000
+++ b/sys/arch/arm/arm32/arm32_boot.c   Tue Nov 04 22:37:09 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arm32_boot.c,v 1.9 2014/10/29 14:14:14 skrll Exp $     */
+/*     $NetBSD: arm32_boot.c,v 1.10 2014/11/04 22:37:09 matt Exp $     */
 
 /*
  * Copyright (c) 2002, 2003, 2005  Genetec Corporation.  All rights reserved.
@@ -123,7 +123,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: arm32_boot.c,v 1.9 2014/10/29 14:14:14 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: arm32_boot.c,v 1.10 2014/11/04 22:37:09 matt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -352,13 +352,13 @@
        printf(" stacks");
 #endif
        set_stackptr(PSR_FIQ32_MODE,
-           fiqstack.pv_va + cpu_index(ci) * FIQ_STACK_SIZE * PAGE_SIZE);
+           fiqstack.pv_va + (cpu_index(ci) + 1) * FIQ_STACK_SIZE * PAGE_SIZE);
        set_stackptr(PSR_IRQ32_MODE,
-           irqstack.pv_va + cpu_index(ci) * IRQ_STACK_SIZE * PAGE_SIZE);
+           irqstack.pv_va + (cpu_index(ci) + 1) * IRQ_STACK_SIZE * PAGE_SIZE);
        set_stackptr(PSR_ABT32_MODE,
-           abtstack.pv_va + cpu_index(ci) * ABT_STACK_SIZE * PAGE_SIZE);
+           abtstack.pv_va + (cpu_index(ci) + 1) * ABT_STACK_SIZE * PAGE_SIZE);
        set_stackptr(PSR_UND32_MODE,
-           undstack.pv_va + cpu_index(ci) * UND_STACK_SIZE * PAGE_SIZE);
+           undstack.pv_va + (cpu_index(ci) + 1) * UND_STACK_SIZE * PAGE_SIZE);
 
        ci->ci_lastlwp = NULL;
        ci->ci_pmap_lastuser = NULL;



Home | Main Index | Thread Index | Old Index