Module Name:    src
Committed By:   skrll
Date:           Sun May  7 12:22:22 UTC 2017

Modified Files:
        src/sys/arch/hpcmips/hpcmips: machdep.c

Log Message:
When compiled with DEBUG/DIAGNOSTIC memset uses the stack so don't ask
it to overwrite it.  64 bytes is enough stack for any memset.


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/sys/arch/hpcmips/hpcmips/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hpcmips/hpcmips/machdep.c
diff -u src/sys/arch/hpcmips/hpcmips/machdep.c:1.122 src/sys/arch/hpcmips/hpcmips/machdep.c:1.123
--- src/sys/arch/hpcmips/hpcmips/machdep.c:1.122	Sun May  7 12:20:50 2017
+++ src/sys/arch/hpcmips/hpcmips/machdep.c	Sun May  7 12:22:22 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.122 2017/05/07 12:20:50 skrll Exp $	*/
+/*	$NetBSD: machdep.c,v 1.123 2017/05/07 12:22:22 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1999 Shin Takemura, All rights reserved.
@@ -69,7 +69,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.122 2017/05/07 12:20:50 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.123 2017/05/07 12:22:22 skrll Exp $");
 
 #include "opt_vr41xx.h"
 #include "opt_tx39xx.h"
@@ -427,7 +427,7 @@ mach_init(int argc, char *argv[], struct
 		u_int32_t sp;
 		__asm volatile("move %0, $29" : "=r"(sp));
 		KDASSERT(sp > KERNBASE + 0x400);
-		memset((void *)(KERNBASE + 0x400), 0, sp - (KERNBASE + 0x400));
+		memset((void *)(KERNBASE + 0x400), 0, sp - (KERNBASE + 0x400) - 64);
 	}
 
 	printf("mem_cluster_cnt = %d\n", mem_cluster_cnt);

Reply via email to