Compare commits

...

24 Commits

Author SHA1 Message Date
andvar 7b6cdeb9a1 s/abou/about/ in comment. 2024-05-18 19:04:45 +00:00
andvar 9d70975e70 s/Aborb/Absorb/ in comment. 2024-05-18 19:03:31 +00:00
christos 3c6141f6f3 include all extra flavors of the kernel and use the proper variable for
the machine dependent installation directory.
2024-05-18 02:03:17 +00:00
thorpej e4214c824f If <sys/mcontext.h> does not define __UCONTEXT_SIZE, define it as
sizeof(ucontext_t).
2024-05-18 01:21:42 +00:00
thorpej d8a1d80a31 Define the _UC_* flag bits before including <sys/mcontext.h>. 2024-05-18 01:16:21 +00:00
thorpej 1853c81a61 Clean up the <sys/ucontext.h> <-> <machine/mcontext.h> interface up
a little:
- Define _UC_MD_BIT* constants for the available machine-dependent bits,
  and use those constants to define the machine-dependent bits as well
  as the machine-independent bits that have machine-dependent values.
- Explicitly generate an error if _UC_TLSBASE, _UC_SETSTACK, or
  _UC_CLRSTACK are not defined by <machine/mcontext.h>.
2024-05-18 00:37:40 +00:00
thorpej 286a759751 Remove unnecessary include of <sys/malloc.h>. 2024-05-18 00:05:50 +00:00
thorpej c79d399c24 Remove unecessary include of <sys/malloc.h>. 2024-05-18 00:05:18 +00:00
thorpej 0ad7109896 Remove unnecessary include of <sys/malloc.h>. 2024-05-18 00:04:46 +00:00
thorpej 002d97bff0 Move the include of <sys/malloc.h> to where it's truly needed. 2024-05-18 00:04:01 +00:00
thorpej 4ea2e44bb6 Remove unnecessary include of <sys/malloc.h>. 2024-05-17 23:57:46 +00:00
thorpej 64a52938bd <sys/mallocvar.h> -> <sys/malloc.h> 2024-05-17 23:56:24 +00:00
uwe a9c500b2e8 curses: constify newterm() and setterm() arguments
newterm() argument is const in the spec, so this fixes our
conformance.

setterm() is not in the spec, but it's natural and in ncurses its
argument is const too, so follow suit.

Doesn't change the ABI, so no bump required.

ok blymn@
2024-05-17 23:32:50 +00:00
thorpej a7aa342f5e G/C MDP_AST -- it's not referenced anywhere. 2024-05-17 22:21:17 +00:00
thorpej e71269a14e Implement _UC_SETSTACK / _UC_CLRSTACK. 2024-05-17 21:37:07 +00:00
christos 9a57126d1c use IMAGESPECEXTRA to include libdata and don't include IMAGERUNTIME 2024-05-17 21:31:10 +00:00
christos 1f259ef1e5 Add /dev/pipe to the spec list using IMAGESPECEXTRA 2024-05-17 20:27:09 +00:00
christos fa65999dca use IMAGERUNTIME to copy extra data instead of random pax commands 2024-05-17 20:26:48 +00:00
christos d308a2f4e0 Add IMAGERUNTIME and IMAGESPECEXTRA variables 2024-05-17 19:54:28 +00:00
nia 48b353f191 eap(4): Restore the full set of supported hardware encodings from netbsd-7
Tested in QEMU.
2024-05-17 12:20:02 +00:00
nia d833e8b264 Add some "simpler" PCI audio devices to aarch64's GENERIC64
These serve as alternatives to hdaudio.  Tested in QEMU.
2024-05-17 10:25:43 +00:00
christos 5336283700 When calling el_line make sure that we call the resizing function
callback because el_line updates the legacy LineInfo structure and
we need to notify that the cached copy of the the buffer has changed.
Of course the resizing function can call el_line itself to update
the buffer, so prevent recursion. Bug found by Peter Rufer at Arista.
2024-05-17 02:59:08 +00:00
riastradh 70dffce551 riscv: Make feraiseexcept actually raise the given exceptions.
Doing

	fexcept_t ex = 0;
	fesetexceptflag(&ex, excepts);

has the effect of _clearing_ all the exceptions in excepts.  Using
fesetexceptflag doesn't make this easier, because we would have to
record which exceptions were already raised.  So just set the fflags
bits in the fcsr register directly.
2024-05-17 02:11:07 +00:00
manu af39a49700 iWorkaround panic: fpudna from userland
i386 Xen PV domU get spurious fpudna traps from userland. Older eager FPU
contact switching code took care of ignoring them. When transitioning
from eager switching to awlays switching, this special handling was
removed, causing "fpudna from userland" panics.

This change restores the previosu behavior where fpudna traps from
userland are ignored on Xen PV domU.
2024-05-17 00:37:14 +00:00
46 changed files with 269 additions and 199 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.image,v 1.42 2024/05/16 15:46:42 christos Exp $
# $NetBSD: Makefile.image,v 1.44 2024/05/17 21:31:10 christos Exp $
#
# Makefile snippet to build a tree from the provided lists,
# and make an ffs file system image from that tree
@ -16,6 +16,8 @@
# IMAGEPREBUILD additional operations to run pre image creation
# IMAGEPOSTBUILD operation to run on ${IMAGE} ${.TARGET} after its built
# (if this returns non zero, ${.TARGET} is removed)
# IMAGERUNTIME files/directories to copy from $DESTDIR onto the image
# IMAGESPECEXTRA files/directories to add to the spec
# CRUNCHBIN name of crunchgen(1)ed binary
# DESTDIR destination directory
# MAKEFS_FLAGS extra options to ${TOOL_MAKEFS}
@ -34,6 +36,7 @@ _MAKEFILE_IMAGE_=1
WORKDIR?= work
WORKSPEC?= work.spec
WORKBUILT?= work.built
CUROBJDIR!= cd ${.CURDIR} && ${PRINTOBJDIR}
.include "${DISTRIBDIR}/common/Makefile.parselist"
@ -44,6 +47,14 @@ MAKEFS_TIMESTAMP=-T "${MKREPRO_TIMESTAMP}"
PAX_TIMESTAMP=--timestamp "${MKREPRO_TIMESTAMP}"
GZIP_N_FLAG=-n
.endif
MAKESPEC= ${HOST_SH} ${NETBSDSRCDIR}/etc/makespec
.if ${MAKEVERBOSE} >= 2
PAX_v?= -v
.else
PAX_v?=
.endif
GZIP_FLAGS= -9 ${GZIP_N_FLAG}
@ -95,6 +106,21 @@ ${IMAGE}: ${WORKBUILT}
.if defined(IMAGEPREBUILD)
${IMAGEPREBUILD}
.endif
if [ "X${IMAGERUNTIME}" != "X" ]; then \
release_destdir=${CUROBJDIR}/${WORKDIR}; \
cd ${DESTDIR}; \
for imge in ${IMAGERUNTIME}; \
do \
${TOOL_PAX} ${PAX_TIMESTAMP} -rw -pp ${PAX_v} \
$${imge} $$release_destdir; \
done; \
cd "${CUROBJDIR}"; \
fi
for i in ${IMAGESPECEXTRA}; do \
if [ -n "$$i" ] && [ -e ${WORKDIR}/$$i ]; then \
${MAKESPEC} -d ${WORKDIR} $$i >> ${WORKSPEC}; \
fi; \
done
[ "${.OODATE}" = ${WORKBUILT} -a -f ${IMAGE} -a ! ${IMAGE} -ot ${WORKBUILT} ] || { \
${_MKSHMSG_CREATE} ${.CURDIR:T}/${.TARGET}; \
rm -f ${.TARGET} ${.TARGET}.tmp; \

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.bootimage,v 1.36 2024/05/16 15:46:42 christos Exp $
# $NetBSD: Makefile.bootimage,v 1.37 2024/05/18 02:03:17 christos Exp $
#
# Copyright (c) 2009, 2010, 2011 Izumi Tsutsui. All rights reserved.
#
@ -433,12 +433,13 @@ ${TARGETFS}: prepare_md_post ${WORKFSTAB}
.if defined(SPEC_EXTRA)
cat ${SPEC_EXTRA} >> ${WORKSPEC}
.endif
if [ -f ${WORKDIR}/netbsd.gdb ]; then \
echo "./netbsd.gdb type=file uname=root gname=wheel mode=0444" \
>> ${WORKSPEC}; \
fi
if [ -d ${WORKDIR}/${MACHINE} ]; then \
${MAKESPEC} -d ${WORKDIR} ${MACHINE} >> ${WORKSPEC}; \
for i in ${WORKDIR}/netbsd.*; do \
if [ -e $$i ]; then \
echo "./$$(basename $$i) type=file uname=root gname=wheel mode=0444" >> ${WORKSPEC}; \
fi; \
done
if [ -d ${WORKDIR}/${RELEASEMACHINEDIR} ]; then \
${MAKESPEC} -d ${WORKDIR} ${RELEASEMACHINEDIR} >> ${WORKSPEC}; \
fi
@echo Creating rootfs...
# XXX /var/spool/ftp/hidden is unreadable

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.26 2024/03/15 02:20:58 riastradh Exp $
# $NetBSD: Makefile,v 1.28 2024/05/17 21:31:10 christos Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@ -29,9 +29,8 @@ IMAGEDEPENDS= ${CRUNCHBIN} \
${NETBSDSRCDIR}/etc/group \
${NETBSDSRCDIR}/etc/netconfig ${DISTRIBDIR}/common/protocols \
${DISTRIBDIR}/common/services
IMAGEPREBUILD= \
(cd ${DESTDIR} && ${TOOL_PAX} ${PAX_TIMESTAMP} -w libdata/firmware) \
| (cd ${WORKDIR} && ${TOOL_PAX} -r -pp)
IMAGERUNTIME= libdata/firmware
IMAGESPECEXTRA= libdata
# Use stubs to eliminate some large stuff from libc
HACKSRC= ${DISTRIBDIR}/utils/libhack

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.27 2021/06/18 20:30:58 mrg Exp $
# $NetBSD: Makefile,v 1.28 2024/05/17 20:27:09 christos Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@ -33,6 +33,7 @@ CRUNCHBIN= rd_bin
LISTS= ${.CURDIR}/list
MTREECONF= ${.CURDIR}/mtree.conf
IMAGEENDIAN= be
IMAGESPECEXTRA= dev/pipe
MAKEDEVTARGETS= std md0 cd0 st0 st1 sd0 sd1 sd2 xd0 xy0
IMAGEDEPENDS= ${CRUNCHBIN} \
fstab passwd protocols ${DISTRIBDIR}/common/services \

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.41 2019/02/07 04:33:58 mrg Exp $
# $NetBSD: Makefile,v 1.42 2024/05/17 20:27:09 christos Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@ -6,6 +6,7 @@
IMAGE= ramdisk.fs
IMAGESIZE= 660k
IMAGESPECEXTRA= dev/pipe
MAKEFS_FLAGS+= -f 6 -o density=3500
WARNS= 1

View File

@ -1,4 +1,4 @@
/* $NetBSD: curses.h,v 1.131 2024/05/14 10:22:48 uwe Exp $ */
/* $NetBSD: curses.h,v 1.132 2024/05/17 23:32:50 uwe Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@ -719,7 +719,7 @@ int mvwprintw(WINDOW *, int, int, const char *, ...) __printflike(4, 5);
int mvwscanw(WINDOW *, int, int, const char *, ...) __scanflike(4, 5);
int napms(int);
WINDOW *newpad(int, int);
SCREEN *newterm(char *, FILE *, FILE *);
SCREEN *newterm(const char *, FILE *, FILE *);
WINDOW *newwin(int, int, int, int);
int nl(void);
attr_t no_color_attributes(void);
@ -751,7 +751,7 @@ int savetty(void);
int scanw(const char *, ...) __scanflike(1, 2);
int scroll(WINDOW *);
int scrollok(WINDOW *, bool);
int setterm(char *);
int setterm(const char *);
int set_escdelay(int);
int set_tabsize(int);
SCREEN *set_term(SCREEN *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: curses_private.h,v 1.80 2022/05/03 07:25:34 blymn Exp $ */
/* $NetBSD: curses_private.h,v 1.81 2024/05/17 23:32:50 uwe Exp $ */
/*-
* Copyright (c) 1998-2000 Brett Lymn
@ -355,7 +355,7 @@ int _cursesi_waddbytes(WINDOW *, const char *, int, attr_t, int);
void _cursesi_reset_wacs(SCREEN *);
#endif /* HAVE_WCHAR */
void _cursesi_resetterm(SCREEN *);
int _cursesi_setterm(char *, SCREEN *);
int _cursesi_setterm(const char *, SCREEN *);
int __delay(void);
unsigned int __hash_more(const void *, size_t, unsigned int);
unsigned int __hash_line(const __LDATA *, int);

View File

@ -1,4 +1,4 @@
.\" $NetBSD: curses_screen.3,v 1.28 2021/02/07 23:00:57 rillig Exp $
.\" $NetBSD: curses_screen.3,v 1.29 2024/05/17 23:32:50 uwe Exp $
.\"
.\" Copyright (c) 2002
.\" Brett Lymn (blymn@NetBSD.org, brett_lymn@yahoo.com.au)
@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\"
.Dd March 12, 2020
.Dd May 16, 2024
.Dt CURSES_SCREEN 3
.Os
.Sh NAME
@ -61,7 +61,7 @@
.Ft void
.Fn use_env "bool value"
.Ft SCREEN *
.Fn newterm "char *type" "FILE *outfd" "FILE *infd"
.Fn newterm "const char *type" "FILE *outfd" "FILE *infd"
.Ft SCREEN *
.Fn set_term "SCREEN *screen"
.Ft void
@ -79,7 +79,7 @@
.Ft int
.Fn resizeterm "int lines" "int cols"
.Ft int
.Fn setterm "char *name"
.Fn setterm "const char *name"
.Ft int
.Fn set_tabsize "int value"
.Pp
@ -99,7 +99,9 @@ argument points to a
.Xr terminfo 5
entry, or it may be
.Dv NULL
in which case the TERM environment variable is used.
in which case the
.Ev TERM
environment variable is used.
The
.Fa outfd
and

View File

@ -1,4 +1,4 @@
/* $NetBSD: screen.c,v 1.37 2022/04/08 10:17:52 andvar Exp $ */
/* $NetBSD: screen.c,v 1.38 2024/05/17 23:32:50 uwe Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)screen.c 8.2 (blymn) 11/27/2001";
#else
__RCSID("$NetBSD: screen.c,v 1.37 2022/04/08 10:17:52 andvar Exp $");
__RCSID("$NetBSD: screen.c,v 1.38 2024/05/17 23:32:50 uwe Exp $");
#endif
#endif /* not lint */
@ -124,10 +124,10 @@ set_term(SCREEN *new)
*
*/
SCREEN *
newterm(char *type, FILE *outfd, FILE *infd)
newterm(const char *type, FILE *outfd, FILE *infd)
{
SCREEN *new_screen;
char *sp;
const char *sp;
sp = type;
if (type == NULL && (sp = getenv("TERM")) == NULL)
@ -176,7 +176,7 @@ newterm(char *type, FILE *outfd, FILE *infd)
if (_cursesi_gettmode(new_screen) == ERR)
goto error_exit;
if (_cursesi_setterm((char *)sp, new_screen) == ERR)
if (_cursesi_setterm(sp, new_screen) == ERR)
goto error_exit;
/* Need either homing or cursor motion for refreshes */

View File

@ -1,4 +1,4 @@
/* $NetBSD: setterm.c,v 1.71 2021/09/06 07:45:48 rin Exp $ */
/* $NetBSD: setterm.c,v 1.72 2024/05/17 23:32:50 uwe Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)setterm.c 8.8 (Berkeley) 10/25/94";
#else
__RCSID("$NetBSD: setterm.c,v 1.71 2021/09/06 07:45:48 rin Exp $");
__RCSID("$NetBSD: setterm.c,v 1.72 2024/05/17 23:32:50 uwe Exp $");
#endif
#endif /* not lint */
@ -52,14 +52,14 @@ static int does_ctrl_o(const char *exit_cap, const char *acs_cap);
attr_t __mask_op, __mask_me, __mask_ue, __mask_se;
int
setterm(char *type)
setterm(const char *type)
{
return _cursesi_setterm(type, _cursesi_screen);
}
int
_cursesi_setterm(char *type, SCREEN *screen)
_cursesi_setterm(const char *type, SCREEN *screen)
{
int unknown, r;
char *p;

View File

@ -1,4 +1,4 @@
/* $NetBSD: el.h,v 1.46 2021/08/15 10:08:41 christos Exp $ */
/* $NetBSD: el.h,v 1.47 2024/05/17 02:59:08 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@ -58,6 +58,7 @@
#define NARROW_HISTORY 0x040
#define NO_RESET 0x080
#define FIXIO 0x100
#define FROM_ELLINE 0x200
typedef unsigned char el_action_t; /* Index to command array */

View File

@ -1,4 +1,4 @@
/* $NetBSD: eln.c,v 1.37 2022/01/11 18:30:15 christos Exp $ */
/* $NetBSD: eln.c,v 1.38 2024/05/17 02:59:08 christos Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@ -27,7 +27,7 @@
*/
#include "config.h"
#if !defined(lint) && !defined(SCCSID)
__RCSID("$NetBSD: eln.c,v 1.37 2022/01/11 18:30:15 christos Exp $");
__RCSID("$NetBSD: eln.c,v 1.38 2024/05/17 02:59:08 christos Exp $");
#endif /* not lint && not SCCSID */
#include <errno.h>
@ -365,6 +365,10 @@ el_line(EditLine *el)
size_t offset;
const wchar_t *p;
if (el->el_flags & FROM_ELLINE)
return info;
el->el_flags |= FROM_ELLINE;
info->buffer = ct_encode_string(winfo->buffer, &el->el_lgcyconv);
offset = 0;
@ -377,6 +381,10 @@ el_line(EditLine *el)
offset += ct_enc_width(*p);
info->lastchar = info->buffer + offset;
if (el->el_chared.c_resizefun)
(*el->el_chared.c_resizefun)(el, el->el_chared.c_resizearg);
el->el_flags &= ~FROM_ELLINE;
return info;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: fenv.c,v 1.4 2023/05/07 12:41:47 skrll Exp $ */
/* $NetBSD: fenv.c,v 1.5 2024/05/17 02:11:07 riastradh Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: fenv.c,v 1.4 2023/05/07 12:41:47 skrll Exp $");
__RCSID("$NetBSD: fenv.c,v 1.5 2024/05/17 02:11:07 riastradh Exp $");
#include "namespace.h"
@ -114,19 +114,15 @@ fegetexceptflag(fexcept_t *flagp, int excepts)
* The standard explicitly allows us to execute an instruction that has the
* exception as a side effect, but we choose to manipulate the status register
* directly.
*
* The validation of input is being deferred to fesetexceptflag().
*/
int
feraiseexcept(int excepts)
{
fexcept_t ex = 0;
_DIAGASSERT((excepts & ~FE_ALL_EXCEPT) == 0);
excepts &= FE_ALL_EXCEPT;
fesetexceptflag(&ex, excepts);
/* XXX exception magic XXX */
fcsr_fflags_write(fcsr_fflags_read() | excepts);
/* Success */
return 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mcontext.h,v 1.11 2021/05/24 21:00:12 thorpej Exp $ */
/* $NetBSD: mcontext.h,v 1.12 2024/05/18 00:37:40 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -93,9 +93,9 @@ typedef struct {
} mcontext_t;
/* Machine-dependent uc_flags */
#define _UC_TLSBASE 0x20 /* valid process-unique value in _REG_UNIQUE */
#define _UC_SETSTACK 0x00010000
#define _UC_CLRSTACK 0x00020000
#define _UC_TLSBASE _UC_MD_BIT5 /* valid value in _REG_UNIQUE */
#define _UC_SETSTACK _UC_MD_BIT16
#define _UC_CLRSTACK _UC_MD_BIT17
#define _UC_MACHINE_SP(uc) ((uc)->uc_mcontext.__gregs[_REG_SP])
#define _UC_MACHINE_FP(uc) ((uc)->uc_mcontext.__gregs[_REG_S6])

View File

@ -1,4 +1,4 @@
/* $NetBSD: mcontext.h,v 1.20 2019/12/27 00:32:16 kamil Exp $ */
/* $NetBSD: mcontext.h,v 1.21 2024/05/18 00:37:40 thorpej Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -74,13 +74,13 @@ typedef struct {
#define _UC_MACHINE_SET_PC(uc, pc) _UC_MACHINE_PC(uc) = (pc)
#define _UC_TLSBASE 0x00080000
#define _UC_TLSBASE _UC_MD_BIT19
/*
* mcontext extensions to handle signal delivery.
*/
#define _UC_SETSTACK 0x00010000
#define _UC_CLRSTACK 0x00020000
#define _UC_SETSTACK _UC_MD_BIT16
#define _UC_CLRSTACK _UC_MD_BIT17
#define __UCONTEXT_SIZE 784
@ -155,7 +155,7 @@ typedef struct {
uint32_t _mc_tlsbase;
} mcontext32_t;
#define _UC_FXSAVE 0x20 /* FP state is in FXSAVE format in XMM space */
#define _UC_FXSAVE _UC_MD_BIT5 /* FP state is in FXSAVE format in XMM space */
#define _UC_MACHINE32_PAD 4
#define __UCONTEXT32_SIZE 776

View File

@ -1,4 +1,4 @@
/* $NetBSD: mcontext.h,v 1.23 2021/10/06 05:33:15 skrll Exp $ */
/* $NetBSD: mcontext.h,v 1.24 2024/05/18 00:37:40 thorpej Exp $ */
/*-
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@ -257,14 +257,14 @@ __END_DECLS
#endif /* _RTLD_SOURCE || _LIBC_SOURCE || __LIBPTHREAD_SOURCE__ */
/* Machine-dependent uc_flags */
#define _UC_TLSBASE 0x00080000 /* see <sys/ucontext.h> */
#define _UC_TLSBASE _UC_MD_BIT19 /* see <sys/ucontext.h> */
/* Machine-dependent uc_flags for arm */
#define _UC_ARM_VFP 0x00010000 /* FPU field is VFP */
#define _UC_ARM_VFP _UC_MD_BIT16 /* FPU field is VFP */
/* used by signal delivery to indicate status of signal stack */
#define _UC_SETSTACK 0x00020000
#define _UC_CLRSTACK 0x00040000
#define _UC_SETSTACK _UC_MD_BIT17
#define _UC_CLRSTACK _UC_MD_BIT18
#define _UC_MACHINE_SP(uc) ((uc)->uc_mcontext.__gregs[_REG_SP])
#define _UC_MACHINE_FP(uc) ((uc)->uc_mcontext.__gregs[_REG_FP])

View File

@ -1,4 +1,4 @@
/* $NetBSD: vidc20config.c,v 1.36 2022/05/24 06:28:00 andvar Exp $ */
/* $NetBSD: vidc20config.c,v 1.37 2024/05/18 19:04:45 andvar Exp $ */
/*
* Copyright (c) 2001 Reinoud Zandijk
@ -48,7 +48,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vidc20config.c,v 1.36 2022/05/24 06:28:00 andvar Exp $");
__KERNEL_RCSID(0, "$NetBSD: vidc20config.c,v 1.37 2024/05/18 19:04:45 andvar Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -206,7 +206,7 @@ vidcvideo_write(u_int reg, int value)
/*
* Undefine SAFER if you wish to speed things up (a little)
* although this means the function will assume things abou
* although this means the function will assume things about
* the structure of vidc_state. i.e. the first 256 words are
* the palette array
*/

View File

@ -1,5 +1,5 @@
#
# $NetBSD: GENERIC64,v 1.215 2024/05/09 12:09:59 pho Exp $
# $NetBSD: GENERIC64,v 1.216 2024/05/17 10:25:43 nia Exp $
#
# GENERIC ARM (aarch64) kernel
#
@ -448,6 +448,8 @@ vcaudio0 at vchiq?
# Audio support
hdaudio* at fdt? # Intel HDA
hdaudio* at pci? dev ? function ?
auich* at pci? dev ? function ? # Intel AC'97 Audio (QEMU)
eap* at pci? dev ? function ? # Ensoniq AudioPCI (QEMU)
hdafg* at hdaudiobus?
options HDAUDIOVERBOSE
ausoc* at fdt? # Simple SoC audio card

View File

@ -1,4 +1,4 @@
/* $NetBSD: mcontext.h,v 1.12 2022/06/26 14:37:13 skrll Exp $ */
/* $NetBSD: mcontext.h,v 1.13 2024/05/18 00:37:40 thorpej Exp $ */
#ifndef _HPPA_MCONTEXT_H_
#define _HPPA_MCONTEXT_H_
@ -111,8 +111,8 @@ __END_DECLS
#endif /* !__ASSEMBLER__ */
#define _UC_SETSTACK 0x00010000
#define _UC_CLRSTACK 0x00020000
#define _UC_TLSBASE 0x00040000
#define _UC_SETSTACK _UC_MD_BIT16
#define _UC_CLRSTACK _UC_MD_BIT17
#define _UC_TLSBASE _UC_MD_BIT18
#endif /* _HPPA_MCONTEXT_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: mcontext.h,v 1.15 2019/12/27 00:32:17 kamil Exp $ */
/* $NetBSD: mcontext.h,v 1.16 2024/05/18 00:37:40 thorpej Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -36,10 +36,10 @@
/*
* mcontext extensions to handle signal delivery.
*/
#define _UC_SETSTACK 0x00010000
#define _UC_CLRSTACK 0x00020000
#define _UC_VM 0x00040000
#define _UC_TLSBASE 0x00080000
#define _UC_SETSTACK _UC_MD_BIT16
#define _UC_CLRSTACK _UC_MD_BIT17
#define _UC_VM _UC_MD_BIT18
#define _UC_TLSBASE _UC_MD_BIT19
/*
* Layout of mcontext_t according to the System V Application Binary Interface,
@ -96,7 +96,7 @@ typedef struct {
__greg_t _mc_tlsbase;
} mcontext_t;
#define _UC_FXSAVE 0x20 /* FP state is in FXSAVE format in XMM space */
#define _UC_FXSAVE _UC_MD_BIT5 /* FP state is in FXSAVE format in XMM space */
#define _UC_MACHINE_PAD 4 /* Padding appended to ucontext_t */

View File

@ -1,4 +1,4 @@
/* $NetBSD: mcontext.h,v 1.12 2020/10/04 10:34:18 rin Exp $ */
/* $NetBSD: mcontext.h,v 1.13 2024/05/18 00:37:41 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -39,8 +39,8 @@
/*
* mcontext extensions to handle signal delivery.
*/
#define _UC_SETSTACK 0x00010000
#define _UC_CLRSTACK 0x00020000
#define _UC_SETSTACK _UC_MD_BIT16
#define _UC_CLRSTACK _UC_MD_BIT17
/*
* General register state
@ -98,8 +98,8 @@ typedef struct {
/* Note: no additional padding is to be performed in ucontext_t. */
/* Machine-specific uc_flags value */
#define _UC_M68K_UC_USER 0x40000000
#define _UC_TLSBASE 0x00080000
#define _UC_M68K_UC_USER _UC_MD_BIT30
#define _UC_TLSBASE _UC_MD_BIT19
#define _UC_MACHINE_SP(uc) ((uc)->uc_mcontext.__gregs[_REG_A7])
#define _UC_MACHINE_FP(uc) ((uc)->uc_mcontext.__gregs[_REG_A6])

View File

@ -1,4 +1,4 @@
/* $NetBSD: mcontext.h,v 1.22 2020/10/04 10:34:18 rin Exp $ */
/* $NetBSD: mcontext.h,v 1.23 2024/05/18 00:37:41 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -128,11 +128,11 @@ typedef struct {
#endif
/* Machine-dependent uc_flags */
#define _UC_POWERPC_VEC 0x00010000 /* Vector Register File valid */
#define _UC_POWERPC_SPE 0x00020000 /* Vector Register File valid */
#define _UC_TLSBASE 0x00080000 /* thread context valid in R2 */
#define _UC_SETSTACK 0x00100000
#define _UC_CLRSTACK 0x00200000
#define _UC_POWERPC_VEC _UC_MD_BIT16 /* Vector Register File valid */
#define _UC_POWERPC_SPE _UC_MD_BIT17 /* Vector Register File valid */
#define _UC_TLSBASE _UC_MD_BIT19 /* thread context valid in R2 */
#define _UC_SETSTACK _UC_MD_BIT20
#define _UC_CLRSTACK _UC_MD_BIT21
#define _UC_MACHINE_SP(uc) ((uc)->uc_mcontext.__gregs[_REG_R1])
#define _UC_MACHINE_FP(uc) ((uc)->uc_mcontext.__gregs[_REG_R31])

View File

@ -1,4 +1,4 @@
/* $NetBSD: mcontext.h,v 1.12 2019/12/27 00:32:17 kamil Exp $ */
/* $NetBSD: mcontext.h,v 1.13 2024/05/18 00:37:41 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -91,9 +91,9 @@ typedef struct {
/*
* Machine dependent uc_flags
*/
#define _UC_SETSTACK 0x10000
#define _UC_CLRSTACK 0x20000
#define _UC_TLSBASE 0x80000
#define _UC_SETSTACK _UC_MD_BIT16
#define _UC_CLRSTACK _UC_MD_BIT17
#define _UC_TLSBASE _UC_MD_BIT19
#if defined(_RTLD_SOURCE) || defined(_LIBC_SOURCE) || \
defined(__LIBPTHREAD_SOURCE__)

View File

@ -1,4 +1,4 @@
/* $NetBSD: mcontext.h,v 1.18 2019/12/27 00:32:17 kamil Exp $ */
/* $NetBSD: mcontext.h,v 1.19 2024/05/18 00:37:41 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -32,9 +32,9 @@
#ifndef _SPARC_MCONTEXT_H_
#define _SPARC_MCONTEXT_H_
#define _UC_SETSTACK 0x00010000
#define _UC_CLRSTACK 0x00020000
#define _UC_TLSBASE 0x00080000
#define _UC_SETSTACK _UC_MD_BIT16
#define _UC_CLRSTACK _UC_MD_BIT17
#define _UC_TLSBASE _UC_MD_BIT19
/*
* Layout of mcontext_t according the System V Application Binary Interface,

View File

@ -1,4 +1,4 @@
/* $NetBSD: mcontext.h,v 1.10 2018/02/19 08:31:13 mrg Exp $ */
/* $NetBSD: mcontext.h,v 1.11 2024/05/18 00:37:41 thorpej Exp $ */
#ifndef _SPARC64_MCONTEXT_H_
#define _SPARC64_MCONTEXT_H_
@ -72,9 +72,9 @@ typedef struct {
__xrs32_t __xrs; /* may indicate extra reg state */
} mcontext32_t;
#define _UC_SETSTACK 0x00010000
#define _UC_CLRSTACK 0x00020000
#define _UC_TLSBASE 0x00080000
#define _UC_SETSTACK _UC_MD_BIT16
#define _UC_CLRSTACK _UC_MD_BIT17
#define _UC_TLSBASE _UC_MD_BIT19
#define _UC_MACHINE32_PAD 43 /* compat_netbsd32 variant */
#define _UC_MACHINE32_SP(uc) ((uc)->uc_mcontext.__gregs[_REG_O6])

View File

@ -1,4 +1,4 @@
/* $NetBSD: mcontext.h,v 1.10 2019/12/27 00:32:17 kamil Exp $ */
/* $NetBSD: mcontext.h,v 1.12 2024/05/18 00:37:41 thorpej Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -65,7 +65,9 @@ typedef struct {
} mcontext_t;
/* Machine-dependent uc_flags */
#define _UC_TLSBASE 0x00080000
#define _UC_SETSTACK _UC_MD_BIT16
#define _UC_CLRSTACK _UC_MD_BIT17
#define _UC_TLSBASE _UC_MD_BIT19
#define _UC_MACHINE_SP(uc) ((uc)->uc_mcontext.__gregs[_REG_SP])
#define _UC_MACHINE_FP(uc) ((uc)->uc_mcontext.__gregs[_REG_FP])

View File

@ -1,4 +1,4 @@
/* $NetBSD: proc.h,v 1.15 2011/07/03 02:18:20 matt Exp $ */
/* $NetBSD: proc.h,v 1.16 2024/05/17 22:21:17 thorpej Exp $ */
/*
* Copyright (c) 1991 Regents of the University of California.
@ -51,9 +51,6 @@ struct mdproc {
};
/* md_flags */
#define MDP_AST 0x0001 /* async trap pending */
/* kernel stack params */
#define KSTACK_LOWEST_ADDR(l) \
((char *)(l)->l_addr + (REDZONEADDR + VAX_NBPG))

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.199 2024/03/05 14:15:36 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.200 2024/05/17 21:37:07 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@ -83,7 +83,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.199 2024/03/05 14:15:36 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.200 2024/05/17 21:37:07 thorpej Exp $");
#include "opt_ddb.h"
#include "opt_compat_netbsd.h"
@ -696,6 +696,14 @@ cpu_setmcontext(struct lwp *l, const mcontext_t *mcp, unsigned int flags)
lwp_setprivate(l, tlsbase);
tf->tf_sp += sizeof(tlsbase);
}
mutex_enter(l->l_proc->p_lock);
if (flags & _UC_SETSTACK)
l->l_sigstk.ss_flags |= SS_ONSTACK;
if (flags & _UC_CLRSTACK)
l->l_sigstk.ss_flags &= ~SS_ONSTACK;
mutex_exit(l->l_proc->p_lock);
return 0;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: sig_machdep.c,v 1.26 2021/11/01 05:07:16 thorpej Exp $ */
/* $NetBSD: sig_machdep.c,v 1.27 2024/05/17 21:37:07 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.26 2021/11/01 05:07:16 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.27 2024/05/17 21:37:07 thorpej Exp $");
#include "opt_ddb.h"
#include "opt_compat_netbsd.h"
@ -171,6 +171,8 @@ setupstack_siginfo3(const struct ksiginfo *ksi, const sigset_t *mask, int vers,
uc.uc_flags = _UC_SIGMASK;
uc.uc_sigmask = *mask;
uc.uc_link = l->l_ctxlink;
uc.uc_flags |= (l->l_sigstk.ss_flags & SS_ONSTACK)
? _UC_SETSTACK : _UC_CLRSTACK;
sendsig_reset(l, ksi->ksi_signo);
mutex_exit(p->p_lock);
cpu_getmcontext(l, &uc.uc_mcontext, &uc.uc_flags);

View File

@ -1,4 +1,4 @@
/* $NetBSD: fpu.c,v 1.87 2023/07/18 12:34:25 riastradh Exp $ */
/* $NetBSD: fpu.c,v 1.88 2024/05/17 00:37:14 manu Exp $ */
/*
* Copyright (c) 2008, 2019 The NetBSD Foundation, Inc. All
@ -96,7 +96,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.87 2023/07/18 12:34:25 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.88 2024/05/17 00:37:14 manu Exp $");
#include "opt_ddb.h"
#include "opt_multiprocessor.h"
@ -617,6 +617,15 @@ fputrap(struct trapframe *frame)
void
fpudna(struct trapframe *frame)
{
#ifdef XENPV
/*
* Xen produes spurious fpudna traps, just do nothing.
*/
if (USERMODE(frame->tf_cs)) {
clts();
return;
}
#endif
panic("fpudna from %s, ip %p, trapframe %p",
USERMODE(frame->tf_cs) ? "userland" : "kernel",
(void *)X86_TF_RIP(frame), frame);

View File

@ -1,4 +1,4 @@
/* $NetBSD: cnode.h,v 1.20 2014/12/13 15:59:30 hannken Exp $ */
/* $NetBSD: cnode.h,v 1.21 2024/05/17 23:56:24 thorpej Exp $ */
/*
*
@ -49,7 +49,7 @@
#include <sys/vnode.h>
#ifdef _KERNEL
#include <sys/mallocvar.h>
#include <sys/malloc.h>
MALLOC_DECLARE(M_CODA);
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: coda_namecache.c,v 1.29 2024/02/09 22:08:34 andvar Exp $ */
/* $NetBSD: coda_namecache.c,v 1.30 2024/05/17 23:57:46 thorpej Exp $ */
/*
*
@ -77,11 +77,10 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: coda_namecache.c,v 1.29 2024/02/09 22:08:34 andvar Exp $");
__KERNEL_RCSID(0, "$NetBSD: coda_namecache.c,v 1.30 2024/05/17 23:57:46 thorpej Exp $");
#include <sys/param.h>
#include <sys/errno.h>
#include <sys/malloc.h>
#include <sys/select.h>
#include <sys/kauth.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: coda_psdev.c,v 1.64 2024/02/13 21:39:02 andvar Exp $ */
/* $NetBSD: coda_psdev.c,v 1.65 2024/05/17 23:57:46 thorpej Exp $ */
/*
*
@ -54,14 +54,13 @@
/* These routines are the device entry points for Venus. */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: coda_psdev.c,v 1.64 2024/02/13 21:39:02 andvar Exp $");
__KERNEL_RCSID(0, "$NetBSD: coda_psdev.c,v 1.65 2024/05/17 23:57:46 thorpej Exp $");
extern int coda_nc_initialized; /* Set if cache has been initialized */
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/mount.h>
#include <sys/file.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: coda_subr.c,v 1.32 2020/04/13 19:23:17 ad Exp $ */
/* $NetBSD: coda_subr.c,v 1.33 2024/05/17 23:57:46 thorpej Exp $ */
/*
*
@ -55,11 +55,10 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: coda_subr.c,v 1.32 2020/04/13 19:23:17 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: coda_subr.c,v 1.33 2024/05/17 23:57:46 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/select.h>
#include <sys/mount.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: coda_venus.c,v 1.30 2013/10/17 20:56:02 christos Exp $ */
/* $NetBSD: coda_venus.c,v 1.31 2024/05/17 23:57:46 thorpej Exp $ */
/*
*
@ -32,11 +32,10 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: coda_venus.c,v 1.30 2013/10/17 20:56:02 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: coda_venus.c,v 1.31 2024/05/17 23:57:46 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/select.h>
#include <sys/ioctl.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: coda_vfsops.c,v 1.90 2022/03/28 12:37:46 riastradh Exp $ */
/* $NetBSD: coda_vfsops.c,v 1.91 2024/05/17 23:57:46 thorpej Exp $ */
/*
*
@ -45,12 +45,11 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: coda_vfsops.c,v 1.90 2022/03/28 12:37:46 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: coda_vfsops.c,v 1.91 2024/05/17 23:57:46 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysctl.h>
#include <sys/malloc.h>
#include <sys/conf.h>
#include <sys/namei.h>
#include <sys/dirent.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: dbcool.c,v 1.64 2022/03/30 00:06:50 pgoyette Exp $ */
/* $NetBSD: dbcool.c,v 1.65 2024/05/18 00:02:04 thorpej Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -50,13 +50,12 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: dbcool.c,v 1.64 2022/03/30 00:06:50 pgoyette Exp $");
__KERNEL_RCSID(0, "$NetBSD: dbcool.c,v 1.65 2024/05/18 00:02:04 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/device.h>
#include <sys/malloc.h>
#include <sys/sysctl.h>
#include <sys/module.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: sgsmix.c,v 1.10 2021/01/30 01:23:08 thorpej Exp $ */
/* $NetBSD: sgsmix.c,v 1.11 2024/05/18 00:02:04 thorpej Exp $ */
/*-
* Copyright (C) 2005 Michael Lorenz.
@ -31,13 +31,12 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sgsmix.c,v 1.10 2021/01/30 01:23:08 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: sgsmix.c,v 1.11 2024/05/18 00:02:04 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/device.h>
#include <sys/malloc.h>
#include <sys/sysctl.h>
#include <dev/i2c/i2cvar.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: eap.c,v 1.102 2019/07/25 15:06:07 msaitoh Exp $ */
/* $NetBSD: eap.c,v 1.103 2024/05/17 12:20:02 nia Exp $ */
/* $OpenBSD: eap.c,v 1.6 1999/10/05 19:24:42 csapuntz Exp $ */
/*
@ -56,7 +56,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: eap.c,v 1.102 2019/07/25 15:06:07 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: eap.c,v 1.103 2024/05/17 12:20:02 nia Exp $");
#include "midi.h"
#include "joy_eap.h"
@ -218,9 +218,39 @@ static const struct audio_format eap_formats[] = {
.precision = 16,
.channels = 2,
.channel_mask = AUFMT_STEREO,
.frequency_type = 2,
.frequency_type = 0,
.frequency = { 4000, 48000 },
},
{
.mode = AUMODE_PLAY | AUMODE_RECORD,
.encoding = AUDIO_ENCODING_SLINEAR_LE,
.validbits = 16,
.precision = 16,
.channels = 1,
.channel_mask = AUFMT_MONAURAL,
.frequency_type = 0,
.frequency = { 4000, 48000 },
},
{
.mode = AUMODE_PLAY | AUMODE_RECORD,
.encoding = AUDIO_ENCODING_ULINEAR_LE,
.validbits = 8,
.precision = 8,
.channels = 2,
.channel_mask = AUFMT_STEREO,
.frequency_type = 0,
.frequency = { 4000, 48000 },
},
{
.mode = AUMODE_PLAY | AUMODE_RECORD,
.encoding = AUDIO_ENCODING_ULINEAR_LE,
.validbits = 8,
.precision = 8,
.channels = 1,
.channel_mask = AUFMT_MONAURAL,
.frequency_type = 0,
.frequency = { 4000, 48000 },
}
};
#define EAP_NFORMATS __arraycount(eap_formats)

View File

@ -1,4 +1,4 @@
/* $NetBSD: udf.h,v 1.55 2023/06/27 09:58:50 reinoud Exp $ */
/* $NetBSD: udf.h,v 1.56 2024/05/18 00:04:01 thorpej Exp $ */
/*
* Copyright (c) 2006, 2008 Reinoud Zandijk
@ -40,6 +40,7 @@
#include <sys/bufq.h>
#include <sys/disk.h>
#include <sys/kthread.h>
#include <sys/malloc.h>
#include <miscfs/genfs/genfs_node.h>
/* debug section */

View File

@ -1,4 +1,4 @@
/* $NetBSD: udf_rename.c,v 1.15 2023/06/02 08:51:48 andvar Exp $ */
/* $NetBSD: udf_rename.c,v 1.16 2024/05/18 00:04:01 thorpej Exp $ */
/*
* Copyright (c) 2013 Reinoud Zandijk
@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: udf_rename.c,v 1.15 2023/06/02 08:51:48 andvar Exp $");
__KERNEL_RCSID(0, "$NetBSD: udf_rename.c,v 1.16 2024/05/18 00:04:01 thorpej Exp $");
#include <sys/param.h>
#include <sys/errno.h>
@ -36,7 +36,6 @@ __KERNEL_RCSID(0, "$NetBSD: udf_rename.c,v 1.15 2023/06/02 08:51:48 andvar Exp $
#include <sys/mount.h>
#include <sys/namei.h>
#include <sys/stat.h>
#include <sys/malloc.h>
#include <sys/dirent.h>
#include <sys/vnode.h>
#include <sys/vnode_if.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: union_vfsops.c,v 1.87 2023/02/13 08:39:40 hannken Exp $ */
/* $NetBSD: union_vfsops.c,v 1.88 2024/05/18 00:04:46 thorpej Exp $ */
/*
* Copyright (c) 1994 The Regents of the University of California.
@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: union_vfsops.c,v 1.87 2023/02/13 08:39:40 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: union_vfsops.c,v 1.88 2024/05/18 00:04:46 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -87,7 +87,6 @@ __KERNEL_RCSID(0, "$NetBSD: union_vfsops.c,v 1.87 2023/02/13 08:39:40 hannken Ex
#include <sys/vnode.h>
#include <sys/mount.h>
#include <sys/namei.h>
#include <sys/malloc.h>
#include <sys/filedesc.h>
#include <sys/queue.h>
#include <sys/stat.h>

View File

@ -40,7 +40,6 @@
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mount.h>
#include <sys/namei.h>
#include <sys/proc.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: procfs_cmdline.c,v 1.32 2019/09/27 14:36:18 christos Exp $ */
/* $NetBSD: procfs_cmdline.c,v 1.33 2024/05/18 00:05:50 thorpej Exp $ */
/*
* Copyright (c) 1999 Jaromir Dolecek <dolecek@ics.muni.cz>
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: procfs_cmdline.c,v 1.32 2019/09/27 14:36:18 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: procfs_cmdline.c,v 1.33 2024/05/18 00:05:50 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -39,7 +39,6 @@ __KERNEL_RCSID(0, "$NetBSD: procfs_cmdline.c,v 1.32 2019/09/27 14:36:18 christos
#include <sys/proc.h>
#include <sys/vnode.h>
#include <sys/exec.h>
#include <sys/malloc.h>
#include <sys/sysctl.h>
#include <miscfs/procfs/procfs.h>

View File

@ -1,7 +1,7 @@
/* $NetBSD: ucontext.h,v 1.19 2018/02/27 23:09:02 uwe Exp $ */
/* $NetBSD: ucontext.h,v 1.22 2024/05/18 01:21:42 thorpej Exp $ */
/*-
* Copyright (c) 1999, 2003 The NetBSD Foundation, Inc.
* Copyright (c) 1999, 2003, 2024 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
@ -33,6 +33,36 @@
#define _SYS_UCONTEXT_H_
#include <sys/sigtypes.h>
/* uc_flags */
#define _UC_SIGMASK 0x01 /* valid uc_sigmask */
#define _UC_STACK 0x02 /* valid uc_stack */
#define _UC_CPU 0x04 /* valid GPR context in uc_mcontext */
#define _UC_FPU 0x08 /* valid FPU context in uc_mcontext */
#define _UC_MD_BIT5 0x00000020 /* MD bits. see below */
#define _UC_MD_BIT16 0x00010000
#define _UC_MD_BIT17 0x00020000
#define _UC_MD_BIT18 0x00040000
#define _UC_MD_BIT19 0x00080000
#define _UC_MD_BIT20 0x00100000
#define _UC_MD_BIT21 0x00200000
#define _UC_MD_BIT30 0x40000000
/*
* if your port needs more MD bits, please choose bits from _UC_MD_BIT*
* rather than picking random unused bits.
*
* For historical reasons, some common flags have machine-dependent
* definitions. All platforms must define and handle those flags,
* which are:
*
* _UC_TLSBASE Context contains valid pthread private pointer
*
* _UC_SETSTACK Context uses signal stack
*
* _UC_CLRSTACK Context does not use signal stack
*/
#include <machine/mcontext.h>
typedef struct __ucontext ucontext_t;
@ -52,54 +82,23 @@ struct __ucontext {
#define _UC_UCONTEXT_ALIGN (~0)
#endif
/* uc_flags */
#define _UC_SIGMASK 0x01 /* valid uc_sigmask */
#define _UC_STACK 0x02 /* valid uc_stack */
#define _UC_CPU 0x04 /* valid GPR context in uc_mcontext */
#define _UC_FPU 0x08 /* valid FPU context in uc_mcontext */
#define _UC_MD 0x400f0020 /* MD bits. see below */
#ifdef __UCONTEXT_SIZE
__CTASSERT(sizeof(ucontext_t) == __UCONTEXT_SIZE);
#else
#define __UCONTEXT_SIZE sizeof(ucontext_t)
#endif
/*
* if your port needs more MD bits, please try to choose bits from _UC_MD
* first, rather than picking random unused bits.
*
* _UC_MD details
*
* _UC_TLSBASE Context contains valid pthread private pointer
* All ports must define this MD flag
* 0x00040000 hppa, mips
* 0x00000020 alpha
* 0x00080000 all other ports
*
* _UC_SETSTACK Context uses signal stack
* 0x00020000 arm
* [undefined] alpha, powerpc and vax
* 0x00010000 other ports
*
* _UC_CLRSTACK Context does not use signal stack
* 0x00040000 arm
* [undefined] alpha, powerpc and vax
* 0x00020000 other ports
*
* _UC_POWERPC_VEC Context contains valid AltiVec context
* 0x00010000 powerpc only
*
* _UC_POWERPC_SPE Context contains valid SPE context
* 0x00020000 powerpc only
*
* _UC_M68K_UC_USER Used by m68k machdep code, but undocumented
* 0x40000000 m68k only
*
* _UC_ARM_VFP Unused
* 0x00010000 arm only
*
* _UC_VM Context contains valid virtual 8086 context
* 0x00040000 i386, amd64 only
*
* _UC_FXSAVE Context contains FPU context in that
* is in FXSAVE format in XMM space
* 0x00000020 i386, amd64 only
*/
#ifndef _UC_TLSBASE
#error _UC_TLSBASE not defined.
#endif
#ifndef _UC_SETSTACK
#error _UC_SETSTACK not defined.
#endif
#ifndef _UC_CLRSTACK
#error _UC_CLRSTACK not defined.
#endif
#ifdef _KERNEL
struct lwp;
@ -109,10 +108,6 @@ int setucontext(struct lwp *, const ucontext_t *);
void cpu_getmcontext(struct lwp *, mcontext_t *, unsigned int *);
int cpu_setmcontext(struct lwp *, const mcontext_t *, unsigned int);
int cpu_mcontext_validate(struct lwp *, const mcontext_t *);
#ifdef __UCONTEXT_SIZE
__CTASSERT(sizeof(ucontext_t) == __UCONTEXT_SIZE);
#endif
#endif /* _KERNEL */
#endif /* !_SYS_UCONTEXT_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: local_passwd.c,v 1.36 2012/03/25 05:55:07 dholland Exp $ */
/* $NetBSD: local_passwd.c,v 1.37 2024/05/18 19:03:31 andvar Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "from: @(#)local_passwd.c 8.3 (Berkeley) 4/2/94";
#else
__RCSID("$NetBSD: local_passwd.c,v 1.36 2012/03/25 05:55:07 dholland Exp $");
__RCSID("$NetBSD: local_passwd.c,v 1.37 2024/05/18 19:03:31 andvar Exp $");
#endif
#endif /* not lint */
@ -146,7 +146,7 @@ pwlocal_process(const char *username, int argc, char **argv)
switch (ch) {
case 'l':
/*
* Aborb the -l that may have gotten us here.
* Absorb the -l that may have gotten us here.
*/
break;