Skip to content

Commit

Permalink
Merge branch 'master' into drm-next
Browse files Browse the repository at this point in the history
Conflicts:
	sys/compat/linuxkpi/common/include/linux/kernel.h
  • Loading branch information
hselasky committed Mar 27, 2017
2 parents d2cf19b + d666846 commit 390597e
Show file tree
Hide file tree
Showing 744 changed files with 61,050 additions and 109,461 deletions.
1 change: 1 addition & 0 deletions bin/csh/Makefile
Expand Up @@ -33,6 +33,7 @@ SRCS+= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \
tc.func.c tc.nls.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \
tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h tc.vers.c tc.wait.h \
tc.who.c tc.h
SRCS+= dotlock.c dotlock.h
GENHDRS= ed.defns.h sh.err.h tc.const.h tc.defs.c
SRCS+= ${GENHDRS}

Expand Down
25 changes: 21 additions & 4 deletions cddl/contrib/opensolaris/cmd/zdb/zdb.c
Expand Up @@ -2589,10 +2589,21 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb)

if (!dump_opt['L']) {
vdev_t *rvd = spa->spa_root_vdev;

/*
* We are going to be changing the meaning of the metaslab's
* ms_tree. Ensure that the allocator doesn't try to
* use the tree.
*/
spa->spa_normal_class->mc_ops = &zdb_metaslab_ops;
spa->spa_log_class->mc_ops = &zdb_metaslab_ops;

for (uint64_t c = 0; c < rvd->vdev_children; c++) {
vdev_t *vd = rvd->vdev_child[c];
metaslab_group_t *mg = vd->vdev_mg;
for (uint64_t m = 0; m < vd->vdev_ms_count; m++) {
metaslab_t *msp = vd->vdev_ms[m];
ASSERT3P(msp->ms_group, ==, mg);
mutex_enter(&msp->ms_lock);
metaslab_unload(msp);

Expand All @@ -2613,8 +2624,6 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb)
(longlong_t)m,
(longlong_t)vd->vdev_ms_count);

msp->ms_ops = &zdb_metaslab_ops;

/*
* We don't want to spend the CPU
* manipulating the size-ordered
Expand All @@ -2624,7 +2633,10 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb)
msp->ms_tree->rt_ops = NULL;
VERIFY0(space_map_load(msp->ms_sm,
msp->ms_tree, SM_ALLOC));
msp->ms_loaded = B_TRUE;

if (!msp->ms_loaded) {
msp->ms_loaded = B_TRUE;
}
}
mutex_exit(&msp->ms_lock);
}
Expand All @@ -2646,8 +2658,10 @@ zdb_leak_fini(spa_t *spa)
vdev_t *rvd = spa->spa_root_vdev;
for (int c = 0; c < rvd->vdev_children; c++) {
vdev_t *vd = rvd->vdev_child[c];
metaslab_group_t *mg = vd->vdev_mg;
for (int m = 0; m < vd->vdev_ms_count; m++) {
metaslab_t *msp = vd->vdev_ms[m];
ASSERT3P(mg, ==, msp->ms_group);
mutex_enter(&msp->ms_lock);

/*
Expand All @@ -2661,7 +2675,10 @@ zdb_leak_fini(spa_t *spa)
* from the ms_tree.
*/
range_tree_vacate(msp->ms_tree, zdb_leak, vd);
msp->ms_loaded = B_FALSE;

if (msp->ms_loaded) {
msp->ms_loaded = B_FALSE;
}

mutex_exit(&msp->ms_lock);
}
Expand Down
2 changes: 1 addition & 1 deletion cddl/contrib/opensolaris/cmd/ztest/ztest.c
Expand Up @@ -173,7 +173,7 @@ static const ztest_shared_opts_t ztest_opts_defaults = {
.zo_mirrors = 2,
.zo_raidz = 4,
.zo_raidz_parity = 1,
.zo_vdev_size = SPA_MINDEVSIZE * 2,
.zo_vdev_size = SPA_MINDEVSIZE * 4, /* 256m default size */
.zo_datasets = 7,
.zo_threads = 23,
.zo_passtime = 60, /* 60 seconds */
Expand Down
5 changes: 5 additions & 0 deletions cddl/contrib/opensolaris/lib/libzpool/common/kernel.c
Expand Up @@ -95,6 +95,11 @@ kstat_create(char *module, int instance, char *name, char *class,
return (NULL);
}

/*ARGSUSED*/
void
kstat_named_init(kstat_named_t *knp, const char *name, uchar_t type)
{}

/*ARGSUSED*/
void
kstat_install(kstat_t *ksp)
Expand Down
15 changes: 12 additions & 3 deletions contrib/compiler-rt/lib/builtins/arm/aeabi_idivmod.S
Expand Up @@ -20,16 +20,25 @@
#endif

.syntax unified
.syntax unified
.text
#if defined(USE_THUMB_PROLOGUE)
.thumb
#endif
.p2align 2
#if defined(USE_THUMB_PROLOGUE)
DEFINE_COMPILERRT_THUMB_FUNCTION(__aeabi_idivmod)
#else
DEFINE_COMPILERRT_FUNCTION(__aeabi_idivmod)
#if __ARM_ARCH_ISA_THUMB == 1
#endif
#if defined(USE_THUMB_1)
push {r0, r1, lr}
bl SYMBOL_NAME(__divsi3)
pop {r1, r2, r3} // now r0 = quot, r1 = num, r2 = denom
muls r2, r2, r0 // r2 = quot * denom
subs r1, r1, r2
JMP (r3)
#else
#else // defined(USE_THUMB_1)
push { lr }
sub sp, sp, #4
mov r2, sp
Expand All @@ -42,7 +51,7 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_idivmod)
ldr r1, [sp]
add sp, sp, #4
pop { pc }
#endif // __ARM_ARCH_ISA_THUMB == 1
#endif // defined(USE_THUMB_1)
END_COMPILERRT_FUNCTION(__aeabi_idivmod)

NO_EXEC_STACK_DIRECTIVE
Expand Down
8 changes: 8 additions & 0 deletions contrib/compiler-rt/lib/builtins/arm/aeabi_uidivmod.S
Expand Up @@ -21,8 +21,16 @@
#endif

.syntax unified
.text
#if defined(USE_THUMB_PROLOGUE)
.thumb
#endif
.p2align 2
#if defined(USE_THUMB_PROLOGUE)
DEFINE_COMPILERRT_THUMB_FUNCTION(__aeabi_uidivmod)
#else
DEFINE_COMPILERRT_FUNCTION(__aeabi_uidivmod)
#endif
#if __ARM_ARCH_ISA_THUMB == 1
cmp r0, r1
bcc LOCAL_LABEL(case_denom_larger)
Expand Down
4 changes: 2 additions & 2 deletions contrib/compiler-rt/lib/builtins/arm/bswapdi2.S
Expand Up @@ -11,7 +11,7 @@

.syntax unified
.text
#if __ARM_ARCH_ISA_THUMB == 2
#if defined(USE_THUMB_PROLOGUE)
.thumb
#endif

Expand All @@ -21,7 +21,7 @@
// Reverse all the bytes in a 64-bit integer.
//
.p2align 2
#if __ARM_ARCH_ISA_THUMB == 2
#if defined(USE_THUMB_PROLOGUE)
DEFINE_COMPILERRT_THUMB_FUNCTION(__bswapdi2)
#else
DEFINE_COMPILERRT_FUNCTION(__bswapdi2)
Expand Down
4 changes: 2 additions & 2 deletions contrib/compiler-rt/lib/builtins/arm/bswapsi2.S
Expand Up @@ -11,7 +11,7 @@

.syntax unified
.text
#if __ARM_ARCH_ISA_THUMB == 2
#if defined(USE_THUMB_PROLOGUE)
.thumb
#endif

Expand All @@ -21,7 +21,7 @@
// Reverse all the bytes in a 32-bit integer.
//
.p2align 2
#if __ARM_ARCH_ISA_THUMB == 2
#if defined(USE_THUMB_PROLOGUE)
DEFINE_COMPILERRT_THUMB_FUNCTION(__bswapsi2)
#else
DEFINE_COMPILERRT_FUNCTION(__bswapsi2)
Expand Down
4 changes: 2 additions & 2 deletions contrib/compiler-rt/lib/builtins/arm/clzdi2.S
Expand Up @@ -15,13 +15,13 @@

.syntax unified
.text
#if __ARM_ARCH_ISA_THUMB == 2
#if defined(USE_THUMB_PROLOGUE)
.thumb
#endif


.p2align 2
#if __ARM_ARCH_ISA_THUMB == 2
#if defined(USE_THUMB_PROLOGUE)
DEFINE_COMPILERRT_THUMB_FUNCTION(__clzdi2)
#else
DEFINE_COMPILERRT_FUNCTION(__clzdi2)
Expand Down
4 changes: 2 additions & 2 deletions contrib/compiler-rt/lib/builtins/arm/clzsi2.S
Expand Up @@ -15,12 +15,12 @@

.syntax unified
.text
#if __ARM_ARCH_ISA_THUMB == 2
#if defined(USE_THUMB_PROLOGUE)
.thumb
#endif

.p2align 2
#if __ARM_ARCH_ISA_THUMB == 2
#if defined(USE_THUMB_PROLOGUE)
DEFINE_COMPILERRT_THUMB_FUNCTION(__clzsi2)
#else
DEFINE_COMPILERRT_FUNCTION(__clzsi2)
Expand Down
38 changes: 26 additions & 12 deletions contrib/compiler-rt/lib/builtins/arm/comparesf2.S
Expand Up @@ -38,15 +38,20 @@
//===----------------------------------------------------------------------===//

#include "../assembly.h"
.syntax unified
#if __ARM_ARCH_ISA_THUMB == 2
.thumb
.syntax unified
.text
#if defined(USE_THUMB_PROLOGUE)
.thumb
#endif

@ int __eqsf2(float a, float b)

.p2align 2
#if defined(USE_THUMB_PROLOGUE)
DEFINE_COMPILERRT_THUMB_FUNCTION(__eqsf2)
#else
DEFINE_COMPILERRT_FUNCTION(__eqsf2)
#endif
#if defined(COMPILER_RT_ARMHF_TARGET)
vmov r0, s0
vmov r1, s1
Expand All @@ -67,15 +72,15 @@ DEFINE_COMPILERRT_FUNCTION(__eqsf2)
// flag if both a and b are zero (of either sign). The shift of r3 doesn't
// effect this at all, but it *does* make sure that the C flag is clear for
// the subsequent operations.
#if __ARM_ARCH_ISA_THUMB == 1
#if defined(USE_THUMB_1)
lsrs r6, r3, #1
orrs r6, r2, r6
#else
orrs r12, r2, r3, lsr #1
#endif
// Next, we check if a and b have the same or different signs. If they have
// opposite signs, this eor will set the N flag.
#if __ARM_ARCH_ISA_THUMB == 1
#if defined(USE_THUMB_1)
beq 1f
movs r6, r0
eors r6, r1
Expand All @@ -89,7 +94,7 @@ DEFINE_COMPILERRT_FUNCTION(__eqsf2)
// ignoring NaNs for now), this subtract will zero out r0. If they have the
// same sign, the flags are updated as they would be for a comparison of the
// absolute values of a and b.
#if __ARM_ARCH_ISA_THUMB == 1
#if defined(USE_THUMB_1)
bmi 1f
subs r0, r2, r3
1:
Expand All @@ -108,7 +113,7 @@ DEFINE_COMPILERRT_FUNCTION(__eqsf2)
// still clear from the shift argument in orrs; if a is positive and b
// negative, this places 0 in r0; if a is negative and b positive, -1 is
// placed in r0.
#if __ARM_ARCH_ISA_THUMB == 1
#if defined(USE_THUMB_1)
bhs 1f
// Here if a and b have the same sign and absA < absB, the result is thus
// b < 0 ? 1 : -1. Same if a and b have the opposite sign (ignoring Nan).
Expand All @@ -127,7 +132,7 @@ DEFINE_COMPILERRT_FUNCTION(__eqsf2)
// the sign of b in r0. Thus, if both are negative and a < b, -1 is placed
// in r0, which is the desired result. Conversely, if both are positive
// and a > b, zero is placed in r0.
#if __ARM_ARCH_ISA_THUMB == 1
#if defined(USE_THUMB_1)
bls 1f
// Here both have the same sign and absA > absB.
movs r0, #1
Expand All @@ -145,14 +150,14 @@ DEFINE_COMPILERRT_FUNCTION(__eqsf2)
// If a == b, then the Z flag is set, so we can get the correct final value
// into r0 by simply or'ing with 1 if Z is clear.
// For Thumb-1, r0 contains -1 if a < b, 0 if a > b and 0 if a == b.
#if __ARM_ARCH_ISA_THUMB != 1
#if defined(USE_THUMB_1)
it ne
orrne r0, r0, #1
#endif

// Finally, we need to deal with NaNs. If either argument is NaN, replace
// the value in r0 with 1.
#if __ARM_ARCH_ISA_THUMB == 1
#if defined(USE_THUMB_1)
LOCAL_LABEL(CHECK_NAN):
movs r6, #0xff
lsls r6, #24
Expand Down Expand Up @@ -180,7 +185,11 @@ DEFINE_COMPILERRT_FUNCTION_ALIAS(__nesf2, __eqsf2)
@ int __gtsf2(float a, float b)

.p2align 2
#if defined(USE_THUMB)
DEFINE_COMPILERRT_THUMB_FUNCTION(__gtsf2)
#else
DEFINE_COMPILERRT_FUNCTION(__gtsf2)
#endif
// Identical to the preceding except in that we return -1 for NaN values.
// Given that the two paths share so much code, one might be tempted to
// unify them; however, the extra code needed to do so makes the code size
Expand All @@ -189,7 +198,7 @@ DEFINE_COMPILERRT_FUNCTION(__gtsf2)
vmov r0, s0
vmov r1, s1
#endif
#if __ARM_ARCH_ISA_THUMB == 1
#if defined(USE_THUMB_1)
push {r6, lr}
lsls r2, r0, #1
lsls r3, r1, #1
Expand Down Expand Up @@ -254,7 +263,12 @@ DEFINE_COMPILERRT_FUNCTION_ALIAS(__gesf2, __gtsf2)
@ int __unordsf2(float a, float b)

.p2align 2
#if defined(USE_THUMB)
DEFINE_COMPILERRT_THUMB_FUNCTION(__unordsf2)
#else
DEFINE_COMPILERRT_FUNCTION(__unordsf2)
#endif

#if defined(COMPILER_RT_ARMHF_TARGET)
vmov r0, s0
vmov r1, s1
Expand All @@ -263,7 +277,7 @@ DEFINE_COMPILERRT_FUNCTION(__unordsf2)
lsls r2, r0, #1
lsls r3, r1, #1
movs r0, #0
#if __ARM_ARCH_ISA_THUMB == 1
#if defined(USE_THUMB_1)
movs r1, #0xff
lsls r1, #24
cmp r2, r1
Expand Down
4 changes: 2 additions & 2 deletions contrib/compiler-rt/lib/builtins/arm/divmodsi4.S
Expand Up @@ -23,7 +23,7 @@

.syntax unified
.text
#if __ARM_ARCH_ISA_THUMB == 2
#if defined(USE_THUMB_PROLOGUE)
.thumb
#endif

Expand All @@ -32,7 +32,7 @@
@ value is the quotient, the remainder is placed in the variable.

.p2align 3
#if __ARM_ARCH_ISA_THUMB == 2
#if defined(USE_THUMB_PROLOGUE)
DEFINE_COMPILERRT_THUMB_FUNCTION(__divmodsi4)
#else
DEFINE_COMPILERRT_FUNCTION(__divmodsi4)
Expand Down
12 changes: 6 additions & 6 deletions contrib/compiler-rt/lib/builtins/arm/divsi3.S
Expand Up @@ -20,10 +20,10 @@
#define CLEAR_FRAME_AND_RETURN \
pop {r4, r7, pc}

.syntax unified
.text
#if __ARM_ARCH_ISA_THUMB == 2
.thumb
.syntax unified
.text
#if defined(USE_THUMB_PROLOGUE)
.thumb
#endif

.p2align 3
Expand All @@ -33,7 +33,7 @@ DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_idiv, __divsi3)
@ int __divsi3(int divident, int divisor)
@ Calculate and return the quotient of the (signed) division.

#if __ARM_ARCH_ISA_THUMB == 2
#if defined(USE_THUMB_PROLOGUE)
DEFINE_COMPILERRT_THUMB_FUNCTION(__divsi3)
#else
DEFINE_COMPILERRT_FUNCTION(__divsi3)
Expand Down Expand Up @@ -72,7 +72,7 @@ ESTABLISH_FRAME
// abs(a) / abs(b)
bl SYMBOL_NAME(__udivsi3)
// Apply sign of quotient to result and return.
# if __ARM_ARCH_ISA_THUMB == 1
# if defined(USE_THUMB_1)
asrs r4, #31
eors r0, r4
subs r0, r0, r4
Expand Down

0 comments on commit 390597e

Please sign in to comment.