Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys G/C some old code that was for acorn26
details: https://anonhg.NetBSD.org/src/rev/d792518d6e83
branches: trunk
changeset: 980352:d792518d6e83
user: skrll <skrll%NetBSD.org@localhost>
date: Mon Feb 01 19:31:34 2021 +0000
description:
G/C some old code that was for acorn26
diffstat:
sys/arch/arm/arm/ast.c | 9 ++++-----
sys/arch/arm/arm/compat_13_machdep.c | 6 +++---
sys/arch/arm/arm/compat_16_machdep.c | 6 +++---
sys/arch/arm/arm/process_machdep.c | 8 ++++----
sys/arch/arm/arm/sig_machdep.c | 9 ++++-----
sys/arch/arm/arm/syscall.c | 6 +++---
sys/arch/arm/arm32/fault.c | 12 ++++++------
sys/arch/arm/include/locore.h | 10 +++++-----
sys/compat/linux/arch/arm/linux_machdep.c | 6 +++---
9 files changed, 35 insertions(+), 37 deletions(-)
diffs (297 lines):
diff -r 710e44ef83a5 -r d792518d6e83 sys/arch/arm/arm/ast.c
--- a/sys/arch/arm/arm/ast.c Mon Feb 01 19:02:27 2021 +0000
+++ b/sys/arch/arm/arm/ast.c Mon Feb 01 19:31:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ast.c,v 1.31 2019/11/21 19:23:59 ad Exp $ */
+/* $NetBSD: ast.c,v 1.32 2021/02/01 19:31:34 skrll Exp $ */
/*
* Copyright (c) 1994,1995 Mark Brinicombe
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ast.c,v 1.31 2019/11/21 19:23:59 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ast.c,v 1.32 2021/02/01 19:31:34 skrll Exp $");
#include "opt_ddb.h"
@@ -91,8 +91,7 @@
/* Invoke MI userret code */
mi_userret(l);
- KASSERT(VALID_R15_PSR(lwp_trapframe(l)->tf_pc,
- lwp_trapframe(l)->tf_spsr));
+ KASSERT(VALID_PSR(lwp_trapframe(l)->tf_spsr));
}
@@ -109,7 +108,7 @@
/* Interrupts were restored by exception_exit. */
- KASSERT(VALID_R15_PSR(tf->tf_pc, tf->tf_spsr));
+ KASSERT(VALID_PSR(tf->tf_spsr));
#ifdef __HAVE_PREEMPTION
kpreempt_disable();
diff -r 710e44ef83a5 -r d792518d6e83 sys/arch/arm/arm/compat_13_machdep.c
--- a/sys/arch/arm/arm/compat_13_machdep.c Mon Feb 01 19:02:27 2021 +0000
+++ b/sys/arch/arm/arm/compat_13_machdep.c Mon Feb 01 19:31:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_13_machdep.c,v 1.18 2013/08/18 06:50:31 matt Exp $ */
+/* $NetBSD: compat_13_machdep.c,v 1.19 2021/02/01 19:31:34 skrll Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@@ -38,7 +38,7 @@
#include <sys/param.h>
-__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.18 2013/08/18 06:50:31 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.19 2021/02/01 19:31:34 skrll Exp $");
#include <sys/systm.h>
#include <sys/signalvar.h>
@@ -76,7 +76,7 @@
* Make sure the processor mode has not been tampered with and
* interrupts have not been disabled.
*/
- if (!VALID_R15_PSR(context.sc_pc, context.sc_spsr))
+ if (!VALID_PSR(context.sc_spsr))
return EINVAL;
/* Restore register context. */
diff -r 710e44ef83a5 -r d792518d6e83 sys/arch/arm/arm/compat_16_machdep.c
--- a/sys/arch/arm/arm/compat_16_machdep.c Mon Feb 01 19:02:27 2021 +0000
+++ b/sys/arch/arm/arm/compat_16_machdep.c Mon Feb 01 19:31:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_16_machdep.c,v 1.18 2018/01/24 09:04:44 skrll Exp $ */
+/* $NetBSD: compat_16_machdep.c,v 1.19 2021/02/01 19:31:34 skrll Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@@ -42,7 +42,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.18 2018/01/24 09:04:44 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.19 2021/02/01 19:31:34 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -233,7 +233,7 @@
* Make sure the processor mode has not been tampered with and
* interrupts have not been disabled.
*/
- if (!VALID_R15_PSR(context.sc_pc, context.sc_spsr))
+ if (!VALID_PSR(context.sc_spsr))
return EINVAL;
/* Restore register context. */
diff -r 710e44ef83a5 -r d792518d6e83 sys/arch/arm/arm/process_machdep.c
--- a/sys/arch/arm/arm/process_machdep.c Mon Feb 01 19:02:27 2021 +0000
+++ b/sys/arch/arm/arm/process_machdep.c Mon Feb 01 19:31:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: process_machdep.c,v 1.34 2020/10/19 17:47:37 christos Exp $ */
+/* $NetBSD: process_machdep.c,v 1.35 2021/02/01 19:31:34 skrll Exp $ */
/*
* Copyright (c) 1993 The Regents of the University of California.
@@ -135,7 +135,7 @@
#include <sys/param.h>
-__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.34 2020/10/19 17:47:37 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.35 2021/02/01 19:31:34 skrll Exp $");
#include <sys/proc.h>
#include <sys/ptrace.h>
@@ -160,7 +160,7 @@
regs->r_pc = tf->tf_pc;
regs->r_cpsr = tf->tf_spsr;
- KASSERT(VALID_R15_PSR(tf->tf_pc, tf->tf_spsr));
+ KASSERT(VALID_PSR(tf->tf_spsr));
#ifdef THUMB_CODE
if (tf->tf_spsr & PSR_T_bit)
@@ -202,7 +202,7 @@
if ((regs->r_pc & 1) || (regs->r_cpsr & PSR_T_bit))
tf->tf_spsr |= PSR_T_bit;
#endif
- KASSERT(VALID_R15_PSR(tf->tf_pc, tf->tf_spsr));
+ KASSERT(VALID_PSR(tf->tf_spsr));
return 0;
}
diff -r 710e44ef83a5 -r d792518d6e83 sys/arch/arm/arm/sig_machdep.c
--- a/sys/arch/arm/arm/sig_machdep.c Mon Feb 01 19:02:27 2021 +0000
+++ b/sys/arch/arm/arm/sig_machdep.c Mon Feb 01 19:31:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sig_machdep.c,v 1.51 2018/11/27 14:09:53 maxv Exp $ */
+/* $NetBSD: sig_machdep.c,v 1.52 2021/02/01 19:31:34 skrll Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@@ -44,7 +44,7 @@
#include <sys/param.h>
-__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.51 2018/11/27 14:09:53 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.52 2021/02/01 19:31:34 skrll Exp $");
#include <sys/mount.h> /* XXX only needed by syscallargs.h */
#include <sys/cpu.h>
@@ -182,8 +182,7 @@
gr[_REG_PC] = tf->tf_pc;
gr[_REG_CPSR] = tf->tf_spsr;
- KASSERTMSG(VALID_R15_PSR(gr[_REG_PC], gr[_REG_CPSR]), "%#x %#x",
- gr[_REG_PC], gr[_REG_CPSR]);
+ KASSERTMSG(VALID_PSR(gr[_REG_CPSR]), "%#x", gr[_REG_CPSR]);
if ((ras_pc = (__greg_t)ras_lookup(l->l_proc,
(void *) gr[_REG_PC])) != -1)
@@ -208,7 +207,7 @@
const __greg_t * const gr = mcp->__gregs;
/* Make sure the processor mode has not been tampered with. */
- if (!VALID_R15_PSR(gr[_REG_PC], gr[_REG_CPSR]))
+ if (!VALID_PSR(gr[_REG_CPSR]))
return EINVAL;
return 0;
}
diff -r 710e44ef83a5 -r d792518d6e83 sys/arch/arm/arm/syscall.c
--- a/sys/arch/arm/arm/syscall.c Mon Feb 01 19:02:27 2021 +0000
+++ b/sys/arch/arm/arm/syscall.c Mon Feb 01 19:31:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: syscall.c,v 1.67 2019/04/06 11:54:20 kamil Exp $ */
+/* $NetBSD: syscall.c,v 1.68 2021/02/01 19:31:34 skrll Exp $ */
/*-
* Copyright (c) 2000, 2003 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
#include <sys/param.h>
-__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.67 2019/04/06 11:54:20 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.68 2021/02/01 19:31:34 skrll Exp $");
#include <sys/cpu.h>
#include <sys/device.h>
@@ -101,7 +101,7 @@
* Since all syscalls *should* come from user mode it will always
* be safe to enable them, but check anyway.
*/
- KASSERT(VALID_R15_PSR(tf->tf_pc, tf->tf_spsr));
+ KASSERT(VALID_PSR(tf->tf_spsr));
restore_interrupts(tf->tf_spsr & IF32_bits);
#ifndef THUMB_CODE
diff -r 710e44ef83a5 -r d792518d6e83 sys/arch/arm/arm32/fault.c
--- a/sys/arch/arm/arm32/fault.c Mon Feb 01 19:02:27 2021 +0000
+++ b/sys/arch/arm/arm32/fault.c Mon Feb 01 19:31:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fault.c,v 1.115 2021/01/29 07:58:57 skrll Exp $ */
+/* $NetBSD: fault.c,v 1.116 2021/02/01 19:31:34 skrll Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
#include "opt_multiprocessor.h"
#include <sys/types.h>
-__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.115 2021/01/29 07:58:57 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.116 2021/02/01 19:31:34 skrll Exp $");
#include <sys/param.h>
@@ -250,7 +250,7 @@
ci->ci_data.cpu_ntrap++;
/* Re-enable interrupts if they were enabled previously */
- KASSERT(!TRAP_USERMODE(tf) || VALID_R15_PSR(tf->tf_pc, tf->tf_spsr));
+ KASSERT(!TRAP_USERMODE(tf) || VALID_PSR(tf->tf_spsr));
#ifdef __NO_FIQ
if (__predict_true((tf->tf_spsr & I32_bit) != I32_bit))
restore_interrupts(tf->tf_spsr & IF32_bits);
@@ -830,7 +830,7 @@
* from user mode so we know interrupts were not disabled.
* But we check anyway.
*/
- KASSERT(!TRAP_USERMODE(tf) || VALID_R15_PSR(tf->tf_pc, tf->tf_spsr));
+ KASSERT(!TRAP_USERMODE(tf) || VALID_PSR(tf->tf_spsr));
#ifdef __NO_FIQ
if (__predict_true((tf->tf_spsr & I32_bit) != I32_bit))
restore_interrupts(tf->tf_spsr & IF32_bits);
@@ -842,7 +842,7 @@
/* See if the CPU state needs to be fixed up */
switch (prefetch_abort_fixup(tf)) {
case ABORT_FIXUP_RETURN:
- KASSERT(!TRAP_USERMODE(tf) || VALID_R15_PSR(tf->tf_pc, tf->tf_spsr));
+ KASSERT(!TRAP_USERMODE(tf) || VALID_PSR(tf->tf_spsr));
return;
case ABORT_FIXUP_FAILED:
/* Deliver a SIGILL to the process */
@@ -941,7 +941,7 @@
}
#endif /* THUMB_CODE */
- KASSERT(!TRAP_USERMODE(tf) || VALID_R15_PSR(tf->tf_pc, tf->tf_spsr));
+ KASSERT(!TRAP_USERMODE(tf) || VALID_PSR(tf->tf_spsr));
userret(l);
}
diff -r 710e44ef83a5 -r d792518d6e83 sys/arch/arm/include/locore.h
--- a/sys/arch/arm/include/locore.h Mon Feb 01 19:02:27 2021 +0000
+++ b/sys/arch/arm/include/locore.h Mon Feb 01 19:31:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.h,v 1.35 2020/12/01 02:48:29 rin Exp $ */
+/* $NetBSD: locore.h,v 1.36 2021/02/01 19:31:34 skrll Exp $ */
/*
* Copyright (c) 1994-1996 Mark Brinicombe.
@@ -120,11 +120,11 @@
*/
#ifdef __NO_FIQ
-#define VALID_R15_PSR(r15,psr) \
- (((psr) & PSR_MODE) == PSR_USR32_MODE && ((psr) & I32_bit) == 0)
+#define VALID_PSR(psr) \
+ (((psr) & PSR_MODE) == PSR_USR32_MODE && ((psr) & I32_bit) == 0)
#else
-#define VALID_R15_PSR(r15,psr) \
- (((psr) & PSR_MODE) == PSR_USR32_MODE && ((psr) & IF32_bits) == 0)
+#define VALID_PSR(psr) \
+ (((psr) & PSR_MODE) == PSR_USR32_MODE && ((psr) & IF32_bits) == 0)
#endif
/*
diff -r 710e44ef83a5 -r d792518d6e83 sys/compat/linux/arch/arm/linux_machdep.c
--- a/sys/compat/linux/arch/arm/linux_machdep.c Mon Feb 01 19:02:27 2021 +0000
+++ b/sys/compat/linux/arch/arm/linux_machdep.c Mon Feb 01 19:31:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_machdep.c,v 1.32 2014/11/09 17:48:07 maxv Exp $ */
+/* $NetBSD: linux_machdep.c,v 1.33 2021/02/01 19:31:34 skrll Exp $ */
/*-
* Copyright (c) 1995, 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.32 2014/11/09 17:48:07 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.33 2021/02/01 19:31:34 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -214,7 +214,7 @@
* Make sure the processor mode has not been tampered with and
* interrupts have not been disabled.
*/
- if (!VALID_R15_PSR(frame.sf_sc.sc_pc, frame.sf_sc.sc_cpsr))
+ if (!VALID_PSR(frame.sf_sc.sc_cpsr))
return EINVAL;
/* Restore register context. */
Home |
Main Index |
Thread Index |
Old Index