Mon Jul 6 08:18:57 2020 UTC ()
LKM was gone. _KERNEL is always defined for module.


(rin)
diff -r1.27 -r1.28 src/sys/arch/powerpc/include/frame.h

cvs diff -r1.27 -r1.28 src/sys/arch/powerpc/include/frame.h (expand / switch to unified diff)

--- src/sys/arch/powerpc/include/frame.h 2016/01/24 19:49:35 1.27
+++ src/sys/arch/powerpc/include/frame.h 2020/07/06 08:18:57 1.28
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: frame.h,v 1.27 2016/01/24 19:49:35 christos Exp $ */ 1/* $NetBSD: frame.h,v 1.28 2020/07/06 08:18:57 rin Exp $ */
2 2
3/* 3/*
4 * Copyright (C) 1995, 1996 Wolfgang Solfrank. 4 * Copyright (C) 1995, 1996 Wolfgang Solfrank.
5 * Copyright (C) 1995, 1996 TooLs GmbH. 5 * Copyright (C) 1995, 1996 TooLs GmbH.
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -149,42 +149,42 @@ struct trapframe32 { @@ -149,42 +149,42 @@ struct trapframe32 {
149#define tf_xer tf_ureg.r_xer 149#define tf_xer tf_ureg.r_xer
150#define tf_ctr tf_ureg.r_ctr 150#define tf_ctr tf_ureg.r_ctr
151#define tf_srr0 tf_cf.cf_srr0 151#define tf_srr0 tf_cf.cf_srr0
152#define tf_srr1 tf_cf.cf_srr1 152#define tf_srr1 tf_cf.cf_srr1
153#define tf_idepth tf_cf.cf_idepth 153#define tf_idepth tf_cf.cf_idepth
154 154
155struct ktrapframe { 155struct ktrapframe {
156 __register_t ktf_sp; 156 __register_t ktf_sp;
157 __register_t ktf_lr; 157 __register_t ktf_lr;
158 struct trapframe ktf_tf; 158 struct trapframe ktf_tf;
159 __register_t ktf_cframe_lr; /* for DDB */ 159 __register_t ktf_cframe_lr; /* for DDB */
160}; 160};
161 161
162#if defined(_KERNEL) || defined(_LKM) 162#if defined(_KERNEL)
163#ifdef _LP64 163#ifdef _LP64
164struct utrapframe32 { 164struct utrapframe32 {
165 __register32_t fixreg[32]; 165 __register32_t fixreg[32];
166 __register32_t lr; 166 __register32_t lr;
167 int cr; 167 int cr;
168 int xer; 168 int xer;
169 __register32_t ctr; 169 __register32_t ctr;
170 __register32_t srr0; 170 __register32_t srr0;
171 __register32_t srr1; 171 __register32_t srr1;
172 int vrsave; 172 int vrsave;
173 int mq; 173 int mq;
174 int spare; 174 int spare;
175}; 175};
176#endif 176#endif
177#endif /* _KERNEL || _LKM */ 177#endif /* _KERNEL */
178 178
179/* 179/*
180 * This is to ensure alignment of the stackpointer 180 * This is to ensure alignment of the stackpointer
181 */ 181 */
182#define FRAMELEN roundup(sizeof(struct ktrapframe), CALLFRAMELEN) 182#define FRAMELEN roundup(sizeof(struct ktrapframe), CALLFRAMELEN)
183#define ktrapframe(l) ((struct ktrapframe *)(uvm_lwp_getuarea(l) + USPACE - CALLFRAMELEN - FRAMELEN)) 183#define ktrapframe(l) ((struct ktrapframe *)(uvm_lwp_getuarea(l) + USPACE - CALLFRAMELEN - FRAMELEN))
184#define trapframe(l) (&(ktrapframe(l)->ktf_tf)) 184#define trapframe(l) (&(ktrapframe(l)->ktf_tf))
185 185
186#define SFRAMELEN roundup(sizeof(struct switchframe), CALLFRAMELEN) 186#define SFRAMELEN roundup(sizeof(struct switchframe), CALLFRAMELEN)
187struct switchframe { 187struct switchframe {
188 __register_t sf_sp; 188 __register_t sf_sp;
189 __register_t sf_lr; 189 __register_t sf_lr;
190 __register_t sf_user_sr; /* VSID on IBM4XX */ 190 __register_t sf_user_sr; /* VSID on IBM4XX */