Merge ^/head r358239 through r358262.

This commit is contained in:
Dimitry Andric 2020-02-23 21:48:48 +00:00
commit 5d25f943ea
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/clang1000-import/; revision=358263
33 changed files with 132 additions and 73 deletions

View File

@ -388,11 +388,11 @@ FreeBSD 5.2 | | | |
| | | | | | | DragonFly 5.2.2
| FreeBSD | | | *--NetBSD | |
| 11.2 | | | 7.2 | |
| | macOS | | | | |
| | 10.14 | | | OpenBSD 6.4 |
| | | | | | | |
| | | | | | | DragonFly 5.4.0
*--FreeBSD | | | | v | |
| | macOS | | | |
| | 10.14 | | OpenBSD 6.4 |
| | | | | | |
| | | | | | DragonFly 5.4.0
*--FreeBSD | | | | | |
| 12.0 | | | | | DragonFly 5.4.1
| | | | | | OpenBSD 6.5 |
| | | | | | | |
@ -405,7 +405,8 @@ FreeBSD 5.2 | | | |
| FreeBSD | | OpenBSD 6.6 |
| 12.1 macOS | | |
| | 10.15.1 | | DragonFly 5.6.2
| v | | | |
| | | *--NetBSD | |
| v | | 9.0 | |
| | | | |
FreeBSD 13 -current | NetBSD -current OpenBSD -current DragonFly -current
| | | | |
@ -798,6 +799,7 @@ OpenBSD 6.6 2019-10-17 [OBD]
macOS 10.15 2019-10-07 [APL]
macOS 10.15.1 2019-10-29 [APL] (security/critical release)
FreeBSD 12.1 2019-11-04 [FBD]
NetBSD 9.0 2020-02-15 [NBD]
Bibliography
------------------------

View File

@ -238,6 +238,7 @@ rodrigo [label="Rodrigo Osorio\nrodrigo@FreeBSD.org\n2014/01/15"]
romain [label="Romain Tartiere\nromain@FreeBSD.org\n2010/01/24"]
rpaulo [label="Rui Paulo\nrpaulo@FreeBSD.org\n2014/07/15"]
sahil [label="Sahil Tandon\nsahil@FreeBSD.org\n2010/04/11"]
salvadore [label="Lorenzo Salvadore\nsalvadore@FreeBSD.org\n2020/02/21"]
samm [label="Alex Samorukov\nsamm@FreeBSD.org\n2019/10/09"]
sat [label="Andrew Pantyukhin\nsat@FreeBSD.org\n2006/05/06"]
sbruno [label="Sean Bruno\nsbruno@FreeBSD.org\n2014/09/14"]
@ -460,6 +461,8 @@ garga -> vd
garga -> wxs
garga -> xride
gerald -> salvadore
glarkin -> avl
glarkin -> cs
glarkin -> rm

View File

@ -149,6 +149,7 @@ alloc_pread(int fd, off_t off, size_t len)
#ifdef DEBUG
printf("\nmalloc(%d) failed\n", (int)len);
#endif
errno = ENOMEM;
return (NULL);
}
if (lseek(fd, off, SEEK_SET) == -1) {

View File

@ -46,6 +46,10 @@ SYSTEM_LD= @${LD} -N -m ${LD_EMULATION} -Bdynamic -T ${LDSCRIPT} ${_LDFLAGS} \
CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
.endif
# Currently, the compile flags don't let the kernel know if this is a hard-float
# ABI build or a soft-float ABI build. We need to pass in this information.
CFLAGS += -DMACHINE_ARCH=\"${MACHINE_ARCH}\"
# hack because genassym.c includes sys/bus.h which includes these.
genassym.o: bus_if.h device_if.h

View File

@ -425,14 +425,11 @@ int
ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred)
{
struct nfsnode *np = VTONFS(vp);
int biosize, i;
struct buf *bp, *rabp;
struct thread *td;
struct nfsmount *nmp = VFSTONFS(vp->v_mount);
daddr_t lbn, rabn;
int bcount;
int seqcount;
int nra, error = 0, n = 0, on = 0;
int biosize, bcount, error, i, n, nra, on, save2, seqcount;
off_t tmp_off;
KASSERT(uio->uio_rw == UIO_READ, ("ncl_read mode"));
@ -464,6 +461,8 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred)
/* No caching/ no readaheads. Just read data into the user buffer */
return ncl_readrpc(vp, uio, cred);
n = 0;
on = 0;
biosize = vp->v_bufobj.bo_bsize;
seqcount = (int)((off_t)(ioflag >> IO_SEQSHIFT) * biosize / BKVASIZE);
@ -471,6 +470,7 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred)
if (error)
return error;
save2 = curthread_pflags2_set(TDP2_SBPAGES);
do {
u_quad_t nsize;
@ -495,7 +495,9 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred)
rabp = nfs_getcacheblk(vp, rabn, biosize, td);
if (!rabp) {
error = newnfs_sigintr(nmp, td);
return (error ? error : EINTR);
if (error == 0)
error = EINTR;
goto out;
}
if ((rabp->b_flags & (B_CACHE|B_DELWRI)) == 0) {
rabp->b_flags |= B_ASYNC;
@ -526,7 +528,9 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred)
if (!bp) {
error = newnfs_sigintr(nmp, td);
return (error ? error : EINTR);
if (error == 0)
error = EINTR;
goto out;
}
/*
@ -540,7 +544,7 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred)
error = ncl_doio(vp, bp, cred, td, 0);
if (error) {
brelse(bp);
return (error);
goto out;
}
}
@ -561,7 +565,9 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred)
bp = nfs_getcacheblk(vp, (daddr_t)0, NFS_MAXPATHLEN, td);
if (!bp) {
error = newnfs_sigintr(nmp, td);
return (error ? error : EINTR);
if (error == 0)
error = EINTR;
goto out;
}
if ((bp->b_flags & B_CACHE) == 0) {
bp->b_iocmd = BIO_READ;
@ -570,7 +576,7 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred)
if (error) {
bp->b_ioflags |= BIO_ERROR;
brelse(bp);
return (error);
goto out;
}
}
n = MIN(uio->uio_resid, NFS_MAXPATHLEN - bp->b_resid);
@ -580,14 +586,17 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred)
NFSINCRGLOBAL(nfsstatsv1.biocache_readdirs);
if (np->n_direofoffset
&& uio->uio_offset >= np->n_direofoffset) {
return (0);
error = 0;
goto out;
}
lbn = (uoff_t)uio->uio_offset / NFS_DIRBLKSIZ;
on = uio->uio_offset & (NFS_DIRBLKSIZ - 1);
bp = nfs_getcacheblk(vp, lbn, NFS_DIRBLKSIZ, td);
if (!bp) {
error = newnfs_sigintr(nmp, td);
return (error ? error : EINTR);
error = newnfs_sigintr(nmp, td);
if (error == 0)
error = EINTR;
goto out;
}
if ((bp->b_flags & B_CACHE) == 0) {
bp->b_iocmd = BIO_READ;
@ -612,12 +621,16 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred)
*/
for (i = 0; i <= lbn && !error; i++) {
if (np->n_direofoffset
&& (i * NFS_DIRBLKSIZ) >= np->n_direofoffset)
return (0);
&& (i * NFS_DIRBLKSIZ) >= np->n_direofoffset) {
error = 0;
goto out;
}
bp = nfs_getcacheblk(vp, i, NFS_DIRBLKSIZ, td);
if (!bp) {
error = newnfs_sigintr(nmp, td);
return (error ? error : EINTR);
if (error == 0)
error = EINTR;
goto out;
}
if ((bp->b_flags & B_CACHE) == 0) {
bp->b_iocmd = BIO_READ;
@ -646,7 +659,7 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred)
* we give up.
*/
if (error)
return (error);
goto out;
}
/*
@ -706,6 +719,12 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred)
if (bp != NULL)
brelse(bp);
} while (error == 0 && uio->uio_resid > 0 && n > 0);
out:
curthread_pflags2_restore(save2);
if ((curthread->td_pflags2 & TDP2_SBPAGES) == 0) {
NFSLOCKNODE(np);
ncl_pager_setsize(vp, NULL);
}
return (error);
}

View File

@ -597,7 +597,8 @@ ncl_pager_setsize(struct vnode *vp, u_quad_t *nsizep)
setnsize = false;
if (object != NULL && nsize != object->un_pager.vnp.vnp_size) {
if (VOP_ISLOCKED(vp) == LK_EXCLUSIVE)
if (VOP_ISLOCKED(vp) == LK_EXCLUSIVE &&
(curthread->td_pflags2 & TDP2_SBPAGES) == 0)
setnsize = true;
else
np->n_flag |= NVNSETSZSKIP;

View File

@ -98,7 +98,7 @@ static char *consbuf; /* buffer used by `consmsgbuf' */
static struct callout conscallout; /* callout for outputting to constty */
struct msgbuf consmsgbuf; /* message buffer for console tty */
static u_char console_pausing; /* pause after each line during probe */
static char *console_pausestr=
static const char console_pausestr[] =
"<pause; press any key to proceed to next line or '.' to end pause mode>";
struct tty *constty; /* pointer to console "window" tty */
static struct mtx cnputs_mtx; /* Mutex for cnputs(). */
@ -510,7 +510,7 @@ cnputc(int c)
{
struct cn_device *cnd;
struct consdev *cn;
char *cp;
const char *cp;
#ifdef EARLY_PRINTF
if (early_putc != NULL) {
@ -571,7 +571,7 @@ cnputsn(const char *p, size_t n)
}
void
cnputs(char *p)
cnputs(const char *p)
{
cnputsn(p, strlen(p));
}

View File

@ -1765,7 +1765,7 @@ SYSCTL_STRING(_kern, OID_AUTO, module_path, CTLFLAG_RWTUN, linker_path,
TUNABLE_STR("module_path", linker_path, sizeof(linker_path));
static char *linker_ext_list[] = {
static const char * const linker_ext_list[] = {
"",
".ko",
NULL
@ -1782,7 +1782,8 @@ linker_lookup_file(const char *path, int pathlen, const char *name,
{
struct nameidata nd;
struct thread *td = curthread; /* XXX */
char *result, **cpp, *sep;
const char * const *cpp, *sep;
char *result;
int error, len, extlen, reclen, flags;
enum vtype type;
@ -1838,8 +1839,9 @@ linker_hints_lookup(const char *path, int pathlen, const char *modname,
struct ucred *cred = td ? td->td_ucred : NULL;
struct nameidata nd;
struct vattr vattr, mattr;
const char *best, *sep;
u_char *hints = NULL;
u_char *cp, *recptr, *bufend, *result, *best, *pathbuf, *sep;
u_char *cp, *recptr, *bufend, *result, *pathbuf;
int error, ival, bestver, *intp, found, flags, clen, blen;
ssize_t reclen;

View File

@ -153,7 +153,7 @@ static int numzones = MALLOC_DEBUG_MAXZONES;
*/
struct {
int kz_size;
char *kz_name;
const char *kz_name;
uma_zone_t kz_zone[MALLOC_DEBUG_MAXZONES];
} kmemzones[] = {
{16, "16", },
@ -1091,7 +1091,7 @@ mallocinit(void *dummy)
UMA_ALIGN_PTR, UMA_ZONE_MALLOC);
for (i = 0, indx = 0; kmemzones[indx].kz_size != 0; indx++) {
int size = kmemzones[indx].kz_size;
char *name = kmemzones[indx].kz_name;
const char *name = kmemzones[indx].kz_name;
int subzone;
for (subzone = 0; subzone < numzones; subzone++) {

View File

@ -1714,7 +1714,7 @@ dump_finish(struct dumperinfo *di, struct kerneldumpheader *kdh)
void
dump_init_header(const struct dumperinfo *di, struct kerneldumpheader *kdh,
char *magic, uint32_t archver, uint64_t dumplen)
const char *magic, uint32_t archver, uint64_t dumplen)
{
size_t dstsize;

View File

@ -3181,7 +3181,7 @@ proc_wkilled(struct proc *p)
* Kill the current process for stated reason.
*/
void
killproc(struct proc *p, char *why)
killproc(struct proc *p, const char *why)
{
PROC_LOCK_ASSERT(p, MA_OWNED);

View File

@ -82,9 +82,9 @@ _Static_assert(offsetof(struct thread, td_flags) == 0xfc,
"struct thread KBI td_flags");
_Static_assert(offsetof(struct thread, td_pflags) == 0x104,
"struct thread KBI td_pflags");
_Static_assert(offsetof(struct thread, td_frame) == 0x490,
_Static_assert(offsetof(struct thread, td_frame) == 0x498,
"struct thread KBI td_frame");
_Static_assert(offsetof(struct thread, td_emuldata) == 0x6a0,
_Static_assert(offsetof(struct thread, td_emuldata) == 0x6b0,
"struct thread KBI td_emuldata");
_Static_assert(offsetof(struct proc, p_flag) == 0xb0,
"struct proc KBI p_flag");
@ -102,9 +102,9 @@ _Static_assert(offsetof(struct thread, td_flags) == 0x98,
"struct thread KBI td_flags");
_Static_assert(offsetof(struct thread, td_pflags) == 0xa0,
"struct thread KBI td_pflags");
_Static_assert(offsetof(struct thread, td_frame) == 0x2f8,
_Static_assert(offsetof(struct thread, td_frame) == 0x2fc,
"struct thread KBI td_frame");
_Static_assert(offsetof(struct thread, td_emuldata) == 0x340,
_Static_assert(offsetof(struct thread, td_emuldata) == 0x344,
"struct thread KBI td_emuldata");
_Static_assert(offsetof(struct proc, p_flag) == 0x68,
"struct proc KBI p_flag");

View File

@ -405,7 +405,7 @@ link_elf_init(void* arg)
Elf_Size *ctors_sizep;
caddr_t modptr, baseptr, sizeptr;
elf_file_t ef;
char *modname;
const char *modname;
linker_add_class(&link_elf_class);

View File

@ -4040,7 +4040,7 @@ vcount(struct vnode *vp)
/*
* Print out a description of a vnode.
*/
static char *typename[] =
static const char * const typename[] =
{"VNON", "VREG", "VDIR", "VBLK", "VCHR", "VLNK", "VSOCK", "VFIFO", "VBAD",
"VMARKER"};

View File

@ -1566,7 +1566,8 @@ vn_poll(struct file *fp, int events, struct ucred *active_cred,
* permits vn_lock to return doomed vnodes.
*/
static int __noinline
_vn_lock_fallback(struct vnode *vp, int flags, char *file, int line, int error)
_vn_lock_fallback(struct vnode *vp, int flags, const char *file, int line,
int error)
{
KASSERT((flags & LK_RETRY) == 0 || error == 0,
@ -1602,7 +1603,7 @@ _vn_lock_fallback(struct vnode *vp, int flags, char *file, int line, int error)
}
int
_vn_lock(struct vnode *vp, int flags, char *file, int line)
_vn_lock(struct vnode *vp, int flags, const char *file, int line)
{
int error;

View File

@ -380,7 +380,7 @@ vop_reclaim {
vop_lock1 {
IN struct vnode *vp;
IN int flags;
IN char *file;
IN const char *file;
IN int line;
};

View File

@ -46,8 +46,12 @@
#define MACHINE "riscv"
#endif
#ifndef MACHINE_ARCH
#ifdef __riscv_float_abi_soft
#define MACHINE_ARCH "riscv64sf"
#else
#define MACHINE_ARCH "riscv64"
#endif
#endif
#ifdef SMP
#ifndef MAXCPU

View File

@ -554,7 +554,7 @@ void bufdone(struct buf *);
void bd_speedup(void);
extern uma_zone_t pbuf_zone;
uma_zone_t pbuf_zsecond_create(char *name, int max);
uma_zone_t pbuf_zsecond_create(const char *name, int max);
int cluster_read(struct vnode *, u_quad_t, daddr_t, long,
struct ucred *, long, int, int, struct buf **);

View File

@ -78,7 +78,7 @@ typedef int b_sync_t(struct bufobj *, int waitfor);
typedef void b_bdflush_t(struct bufobj *, struct buf *);
struct buf_ops {
char *bop_name;
const char *bop_name;
b_write_t *bop_write;
b_strategy_t *bop_strategy;
b_sync_t *bop_sync;

View File

@ -374,7 +374,7 @@ int dump_append(struct dumperinfo *, void *, vm_offset_t, size_t);
int dump_write(struct dumperinfo *, void *, vm_offset_t, off_t, size_t);
int dump_finish(struct dumperinfo *di, struct kerneldumpheader *kdh);
void dump_init_header(const struct dumperinfo *di, struct kerneldumpheader *kdh,
char *magic, uint32_t archver, uint64_t dumplen);
const char *magic, uint32_t archver, uint64_t dumplen);
#endif /* _KERNEL */

View File

@ -136,7 +136,7 @@ int cncheckc(void);
int cngetc(void);
void cngets(char *, size_t, int);
void cnputc(int);
void cnputs(char *);
void cnputs(const char *);
void cnputsn(const char *, size_t);
int cnunavailable(void);
void constty_set(struct tty *tp);

View File

@ -250,6 +250,7 @@ struct thread {
int td_flags; /* (t) TDF_* flags. */
int td_inhibitors; /* (t) Why can not run. */
int td_pflags; /* (k) Private thread (TDP_*) flags. */
int td_pflags2; /* (k) Private thread (TDP2_*) flags. */
int td_dupfd; /* (k) Ret value from fdopen. XXX */
int td_sqqueue; /* (t) Sleepqueue queue blocked on. */
const void *td_wchan; /* (t) Sleep address. */
@ -514,6 +515,8 @@ do { \
#define TDP_EXECVMSPC 0x40000000 /* Execve destroyed old vmspace */
#define TDP_SIGFASTPENDING 0x80000000 /* Pending signal due to sigfastblock */
#define TDP2_SBPAGES 0x00000001 /* Owns sbusy on some pages */
/*
* Reasons that the current thread can not be run yet.
* More than one may apply.
@ -1197,6 +1200,25 @@ curthread_pflags_restore(int save)
curthread->td_pflags &= save;
}
static __inline int
curthread_pflags2_set(int flags)
{
struct thread *td;
int save;
td = curthread;
save = ~flags | (td->td_pflags2 & flags);
td->td_pflags2 |= flags;
return (save);
}
static __inline void
curthread_pflags2_restore(int save)
{
curthread->td_pflags2 &= save;
}
static __inline __pure2 struct td_sched *
td_get_sched(struct thread *td)
{

View File

@ -384,7 +384,7 @@ sigallowstop(int prev)
int cursig(struct thread *td);
void execsigs(struct proc *p);
void gsignal(int pgid, int sig, ksiginfo_t *ksi);
void killproc(struct proc *p, char *why);
void killproc(struct proc *p, const char *why);
ksiginfo_t * ksiginfo_alloc(int wait);
void ksiginfo_free(ksiginfo_t *ksi);
int pksignal(struct proc *p, int sig, ksiginfo_t *ksi);

View File

@ -689,7 +689,7 @@ int vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp,
struct thread *fsize_td);
int vn_need_pageq_flush(struct vnode *vp);
int vn_isdisk(struct vnode *vp, int *errp);
int _vn_lock(struct vnode *vp, int flags, char *file, int line);
int _vn_lock(struct vnode *vp, int flags, const char *file, int line);
#define vn_lock(vp, flags) _vn_lock(vp, flags, __FILE__, __LINE__)
int vn_open(struct nameidata *ndp, int *flagp, int cmode, struct file *fp);
int vn_open_cred(struct nameidata *ndp, int *flagp, int cmode,

View File

@ -1464,7 +1464,7 @@ swap_pager_putpages(vm_object_t object, vm_page_t *ma, int count,
/* Get a block of swap of size up to size n. */
VM_OBJECT_WLOCK(object);
blk = swp_pager_getswapspace(&n, 4);
blk = swp_pager_getswapspace(&n, 1);
if (blk == SWAPBLK_NONE) {
VM_OBJECT_WUNLOCK(object);
mtx_lock(&swbuf_mtx);

View File

@ -213,8 +213,8 @@ uma_zone_t uma_zcreate(const char *name, size_t size, uma_ctor ctor,
* A pointer to a structure which is intended to be opaque to users of
* the interface. The value may be null if the wait flag is not set.
*/
uma_zone_t uma_zsecond_create(char *name, uma_ctor ctor, uma_dtor dtor,
uma_init zinit, uma_fini zfini, uma_zone_t master);
uma_zone_t uma_zsecond_create(const char *name, uma_ctor ctor, uma_dtor dtor,
uma_init zinit, uma_fini zfini, uma_zone_t master);
/*
* Create cache-only zones.
@ -225,9 +225,9 @@ uma_zone_t uma_zsecond_create(char *name, uma_ctor ctor, uma_dtor dtor,
* zones. The 'arg' parameter is passed to import/release and is caller
* specific.
*/
uma_zone_t uma_zcache_create(char *name, int size, uma_ctor ctor, uma_dtor dtor,
uma_init zinit, uma_fini zfini, uma_import zimport,
uma_release zrelease, void *arg, int flags);
uma_zone_t uma_zcache_create(const char *name, int size, uma_ctor ctor,
uma_dtor dtor, uma_init zinit, uma_fini zfini, uma_import zimport,
uma_release zrelease, void *arg, int flags);
/*
* Definitions for uma_zcreate flags

View File

@ -223,7 +223,7 @@ struct uma_kctor_args {
struct uma_bucket_zone {
uma_zone_t ubz_zone;
char *ubz_name;
const char *ubz_name;
int ubz_entries; /* Number of items it can hold. */
int ubz_maxsize; /* Maximum allocation size per-item. */
};
@ -3014,8 +3014,8 @@ uma_zcreate(const char *name, size_t size, uma_ctor ctor, uma_dtor dtor,
/* See uma.h */
uma_zone_t
uma_zsecond_create(char *name, uma_ctor ctor, uma_dtor dtor,
uma_init zinit, uma_fini zfini, uma_zone_t master)
uma_zsecond_create(const char *name, uma_ctor ctor, uma_dtor dtor,
uma_init zinit, uma_fini zfini, uma_zone_t master)
{
struct uma_zctor_args args;
uma_keg_t keg;
@ -3042,9 +3042,9 @@ uma_zsecond_create(char *name, uma_ctor ctor, uma_dtor dtor,
/* See uma.h */
uma_zone_t
uma_zcache_create(char *name, int size, uma_ctor ctor, uma_dtor dtor,
uma_init zinit, uma_fini zfini, uma_import zimport,
uma_release zrelease, void *arg, int flags)
uma_zcache_create(const char *name, int size, uma_ctor ctor, uma_dtor dtor,
uma_init zinit, uma_fini zfini, uma_import zimport, uma_release zrelease,
void *arg, int flags)
{
struct uma_zctor_args args;

View File

@ -5108,7 +5108,7 @@ vm_map_print(vm_map_t map)
(void *)entry, (void *)entry->start, (void *)entry->end,
entry->eflags);
{
static char *inheritance_name[4] =
static const char * const inheritance_name[4] =
{"share", "copy", "none", "donate_copy"};
db_iprintf(" prot=%x/%x/%s",

View File

@ -386,7 +386,7 @@ vm_object_pip_wakeupn(vm_object_t object, short i)
* re-acquired on return.
*/
static void
vm_object_pip_sleep(vm_object_t object, char *waitid)
vm_object_pip_sleep(vm_object_t object, const char *waitid)
{
refcount_sleep_interlock(&object->paging_in_progress,
@ -394,7 +394,7 @@ vm_object_pip_sleep(vm_object_t object, char *waitid)
}
void
vm_object_pip_wait(vm_object_t object, char *waitid)
vm_object_pip_wait(vm_object_t object, const char *waitid)
{
VM_OBJECT_ASSERT_WLOCKED(object);
@ -406,7 +406,7 @@ vm_object_pip_wait(vm_object_t object, char *waitid)
}
void
vm_object_pip_wait_unlocked(vm_object_t object, char *waitid)
vm_object_pip_wait_unlocked(vm_object_t object, const char *waitid)
{
VM_OBJECT_ASSERT_UNLOCKED(object);

View File

@ -337,8 +337,8 @@ void vm_object_clear_flag(vm_object_t object, u_short bits);
void vm_object_pip_add(vm_object_t object, short i);
void vm_object_pip_wakeup(vm_object_t object);
void vm_object_pip_wakeupn(vm_object_t object, short i);
void vm_object_pip_wait(vm_object_t object, char *waitid);
void vm_object_pip_wait_unlocked(vm_object_t object, char *waitid);
void vm_object_pip_wait(vm_object_t object, const char *waitid);
void vm_object_pip_wait_unlocked(vm_object_t object, const char *waitid);
void vm_object_busy(vm_object_t object);
void vm_object_unbusy(vm_object_t object);

View File

@ -451,13 +451,14 @@ vm_page_domain_init(int domain)
vmd = VM_DOMAIN(domain);
bzero(vmd, sizeof(*vmd));
*__DECONST(char **, &vmd->vmd_pagequeues[PQ_INACTIVE].pq_name) =
*__DECONST(const char **, &vmd->vmd_pagequeues[PQ_INACTIVE].pq_name) =
"vm inactive pagequeue";
*__DECONST(char **, &vmd->vmd_pagequeues[PQ_ACTIVE].pq_name) =
*__DECONST(const char **, &vmd->vmd_pagequeues[PQ_ACTIVE].pq_name) =
"vm active pagequeue";
*__DECONST(char **, &vmd->vmd_pagequeues[PQ_LAUNDRY].pq_name) =
*__DECONST(const char **, &vmd->vmd_pagequeues[PQ_LAUNDRY].pq_name) =
"vm laundry pagequeue";
*__DECONST(char **, &vmd->vmd_pagequeues[PQ_UNSWAPPABLE].pq_name) =
*__DECONST(const char **,
&vmd->vmd_pagequeues[PQ_UNSWAPPABLE].pq_name) =
"vm unswappable pagequeue";
vmd->vmd_domain = domain;
vmd->vmd_page_count = 0;

View File

@ -191,7 +191,7 @@ vm_pager_bufferinit(void)
}
uma_zone_t
pbuf_zsecond_create(char *name, int max)
pbuf_zsecond_create(const char *name, int max)
{
uma_zone_t zone;

View File

@ -208,8 +208,7 @@ vm_radix_node_load(smrnode_t *p, enum vm_radix_access access)
case SMR:
return (smr_entered_load(p, vm_radix_smr));
}
/* This is unreachable, silence gcc. */
panic("vm_radix_node_get: Unknown access type");
__unreachable();
}
static __inline void