Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/include Use (CI_SAVEMAX*CPUSAVE_LEN) as CPU...



details:   https://anonhg.NetBSD.org/src/rev/3d28e74e7ba1
branches:  trunk
changeset: 935602:3d28e74e7ba1
user:      rin <rin%NetBSD.org@localhost>
date:      Mon Jul 06 13:20:55 2020 +0000

description:
Use (CI_SAVEMAX*CPUSAVE_LEN) as CPUSAVE_SIZE for MODULAR || _MODULE,
since it exceeds 128 (256 for now).

XXX
We should use CTASSERT here, but it conflicts with genassym...

diffstat:

 sys/arch/powerpc/include/cpu.h |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (24 lines):

diff -r 71675f5a88b5 -r 3d28e74e7ba1 sys/arch/powerpc/include/cpu.h
--- a/sys/arch/powerpc/include/cpu.h    Mon Jul 06 13:10:19 2020 +0000
+++ b/sys/arch/powerpc/include/cpu.h    Mon Jul 06 13:20:55 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.112 2020/07/06 10:50:32 rin Exp $    */
+/*     $NetBSD: cpu.h,v 1.113 2020/07/06 13:20:55 rin Exp $    */
 
 /*
  * Copyright (C) 1999 Wolfgang Solfrank.
@@ -98,10 +98,11 @@
 #define        CI_SAVEMMU      (3*CPUSAVE_LEN)
 #define        CI_SAVEMAX      (4*CPUSAVE_LEN)
 #define        CPUSAVE_LEN     8
-#if !defined(PPC_BOOKE) && !defined(MODULAR) && !defined(_MODULE)
+#if defined(PPC_BOOKE) && !defined(MODULAR) && !defined(_MODULE)
+#define        CPUSAVE_SIZE    128
+#else
 #define        CPUSAVE_SIZE    (CI_SAVEMAX*CPUSAVE_LEN)
-#else
-#define        CPUSAVE_SIZE    128
+// XXX CTASSERT(CPUSAVE_SIZE >= 128);
 #endif
 #define        CPUSAVE_R28     0               /* where r28 gets saved */
 #define        CPUSAVE_R29     1               /* where r29 gets saved */



Home | Main Index | Thread Index | Old Index