Module Name: src Committed By: hannken Date: Tue Jul 23 07:46:22 UTC 2019
Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: spa.c src/external/cddl/osnet/dist/uts/common/sys: bitmap.h callb.h src/external/cddl/osnet/sys/sys: cyclic.h Removed Files: src/external/cddl/osnet/sys/sys: bitmap.h callb.h cpupart.h Log Message: Move local changes to files below "external/cddl/osnet/dist/" and remove now unneeded files from "external/cddl/osnet/sys/sys/". - sys/sys/bitmap.h -> dist/uts/common/sys/bitmap.h - sys/sys/callb.h -> dist/uts/common/sys/callb.h Stop including "cpupart.h", not needed for build. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/cddl/osnet/dist/uts/common/sys/bitmap.h cvs rdiff -u -r1.1.1.3 -r1.2 \ src/external/cddl/osnet/dist/uts/common/sys/callb.h cvs rdiff -u -r1.3 -r0 src/external/cddl/osnet/sys/sys/bitmap.h \ src/external/cddl/osnet/sys/sys/cpupart.h cvs rdiff -u -r1.2 -r0 src/external/cddl/osnet/sys/sys/callb.h cvs rdiff -u -r1.5 -r1.6 src/external/cddl/osnet/sys/sys/cyclic.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c:1.9 src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c:1.10 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c:1.9 Wed May 22 08:45:32 2019 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/spa.c Tue Jul 23 07:46:22 2019 @@ -77,7 +77,9 @@ #ifdef _KERNEL #include <sys/callb.h> +#ifndef __NetBSD__ #include <sys/cpupart.h> +#endif #include <sys/zone.h> #endif /* _KERNEL */ Index: src/external/cddl/osnet/dist/uts/common/sys/bitmap.h diff -u src/external/cddl/osnet/dist/uts/common/sys/bitmap.h:1.1.1.2 src/external/cddl/osnet/dist/uts/common/sys/bitmap.h:1.2 --- src/external/cddl/osnet/dist/uts/common/sys/bitmap.h:1.1.1.2 Mon May 28 20:53:01 2018 +++ src/external/cddl/osnet/dist/uts/common/sys/bitmap.h Tue Jul 23 07:46:22 2019 @@ -126,6 +126,12 @@ extern "C" { #endif /* _LP64 */ +#ifdef __NetBSD__ + +#include <sys/atomic.h> + +#else /*__NetBSD__ */ + /* * BIT_ONLYONESET is a private macro not designed for bitmaps of * arbitrary size. u must be an unsigned integer/long. It returns @@ -190,6 +196,9 @@ extern int odd_parity(ulong_t); #endif /* _KERNEL && !_ASM */ +#endif /*__NetBSD__ */ + + #ifdef __cplusplus } #endif Index: src/external/cddl/osnet/dist/uts/common/sys/callb.h diff -u src/external/cddl/osnet/dist/uts/common/sys/callb.h:1.1.1.3 src/external/cddl/osnet/dist/uts/common/sys/callb.h:1.2 --- src/external/cddl/osnet/dist/uts/common/sys/callb.h:1.1.1.3 Mon May 28 20:53:01 2018 +++ src/external/cddl/osnet/dist/uts/common/sys/callb.h Tue Jul 23 07:46:22 2019 @@ -130,6 +130,17 @@ typedef struct callb_cpr { * Note: lockp is the lock to protect the callb_cpr_t (cp) structure * later on. No lock held is needed for this initialization. */ +#ifdef __NetBSD__ +#define CALLB_CPR_INIT(cp, lockp, func, name) { \ + /* XXXNETBSD set thread name */ \ + bzero((caddr_t)(cp), sizeof (callb_cpr_t)); \ + (cp)->cc_lockp = lockp; \ + (cp)->cc_id = callb_add(func, (void *)(cp), \ + CB_CL_CPR_DAEMON, name); \ + cv_init(&(cp)->cc_callb_cv, NULL, CV_DEFAULT, NULL); \ + cv_init(&(cp)->cc_stop_cv, NULL, CV_DEFAULT, NULL); \ + } +#else #define CALLB_CPR_INIT(cp, lockp, func, name) { \ strlcpy(curthread->td_name, (name), \ sizeof(curthread->td_name)); \ @@ -140,6 +151,7 @@ typedef struct callb_cpr { cv_init(&(cp)->cc_callb_cv, NULL, CV_DEFAULT, NULL); \ cv_init(&(cp)->cc_stop_cv, NULL, CV_DEFAULT, NULL); \ } +#endif #ifndef __lock_lint #define CALLB_CPR_ASSERT(cp) ASSERT(MUTEX_HELD((cp)->cc_lockp)); @@ -206,6 +218,10 @@ extern boolean_t callb_generic_cpr_safe( extern boolean_t callb_is_stopped(kthread_id_t, caddr_t *); extern void callb_lock_table(void); extern void callb_unlock_table(void); +#ifdef __NetBSD__ +extern void callb_init(void *); +extern void callb_fini(void *); +#endif #endif #ifdef __cplusplus Index: src/external/cddl/osnet/sys/sys/cyclic.h diff -u src/external/cddl/osnet/sys/sys/cyclic.h:1.5 src/external/cddl/osnet/sys/sys/cyclic.h:1.6 --- src/external/cddl/osnet/sys/sys/cyclic.h:1.5 Mon May 28 21:05:10 2018 +++ src/external/cddl/osnet/sys/sys/cyclic.h Tue Jul 23 07:46:22 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cyclic.h,v 1.5 2018/05/28 21:05:10 chs Exp $ */ +/* $NetBSD: cyclic.h,v 1.6 2019/07/23 07:46:22 hannken Exp $ */ /* * CDDL HEADER START @@ -40,7 +40,9 @@ typedef void cpu_t; #ifndef _ASM #include <sys/time.h> #include <sys/cpuvar.h> +#ifndef __NetBSD__ #include <sys/cpupart.h> +#endif #endif /* !_ASM */ #define CY_LOW_LEVEL 0