Skip to content

Commit 390597e

Browse files
committed
Merge branch 'master' into drm-next
Conflicts: sys/compat/linuxkpi/common/include/linux/kernel.h
2 parents d2cf19b + d666846 commit 390597e

File tree

744 files changed

+61050
-109461
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

744 files changed

+61050
-109461
lines changed

bin/csh/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ SRCS+= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \
3333
tc.func.c tc.nls.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \
3434
tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h tc.vers.c tc.wait.h \
3535
tc.who.c tc.h
36+
SRCS+= dotlock.c dotlock.h
3637
GENHDRS= ed.defns.h sh.err.h tc.const.h tc.defs.c
3738
SRCS+= ${GENHDRS}
3839

cddl/contrib/opensolaris/cmd/zdb/zdb.c

+21-4
Original file line numberDiff line numberDiff line change
@@ -2589,10 +2589,21 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb)
25892589

25902590
if (!dump_opt['L']) {
25912591
vdev_t *rvd = spa->spa_root_vdev;
2592+
2593+
/*
2594+
* We are going to be changing the meaning of the metaslab's
2595+
* ms_tree. Ensure that the allocator doesn't try to
2596+
* use the tree.
2597+
*/
2598+
spa->spa_normal_class->mc_ops = &zdb_metaslab_ops;
2599+
spa->spa_log_class->mc_ops = &zdb_metaslab_ops;
2600+
25922601
for (uint64_t c = 0; c < rvd->vdev_children; c++) {
25932602
vdev_t *vd = rvd->vdev_child[c];
2603+
metaslab_group_t *mg = vd->vdev_mg;
25942604
for (uint64_t m = 0; m < vd->vdev_ms_count; m++) {
25952605
metaslab_t *msp = vd->vdev_ms[m];
2606+
ASSERT3P(msp->ms_group, ==, mg);
25962607
mutex_enter(&msp->ms_lock);
25972608
metaslab_unload(msp);
25982609

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

2616-
msp->ms_ops = &zdb_metaslab_ops;
2617-
26182627
/*
26192628
* We don't want to spend the CPU
26202629
* manipulating the size-ordered
@@ -2624,7 +2633,10 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb)
26242633
msp->ms_tree->rt_ops = NULL;
26252634
VERIFY0(space_map_load(msp->ms_sm,
26262635
msp->ms_tree, SM_ALLOC));
2627-
msp->ms_loaded = B_TRUE;
2636+
2637+
if (!msp->ms_loaded) {
2638+
msp->ms_loaded = B_TRUE;
2639+
}
26282640
}
26292641
mutex_exit(&msp->ms_lock);
26302642
}
@@ -2646,8 +2658,10 @@ zdb_leak_fini(spa_t *spa)
26462658
vdev_t *rvd = spa->spa_root_vdev;
26472659
for (int c = 0; c < rvd->vdev_children; c++) {
26482660
vdev_t *vd = rvd->vdev_child[c];
2661+
metaslab_group_t *mg = vd->vdev_mg;
26492662
for (int m = 0; m < vd->vdev_ms_count; m++) {
26502663
metaslab_t *msp = vd->vdev_ms[m];
2664+
ASSERT3P(mg, ==, msp->ms_group);
26512665
mutex_enter(&msp->ms_lock);
26522666

26532667
/*
@@ -2661,7 +2675,10 @@ zdb_leak_fini(spa_t *spa)
26612675
* from the ms_tree.
26622676
*/
26632677
range_tree_vacate(msp->ms_tree, zdb_leak, vd);
2664-
msp->ms_loaded = B_FALSE;
2678+
2679+
if (msp->ms_loaded) {
2680+
msp->ms_loaded = B_FALSE;
2681+
}
26652682

26662683
mutex_exit(&msp->ms_lock);
26672684
}

cddl/contrib/opensolaris/cmd/ztest/ztest.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ static const ztest_shared_opts_t ztest_opts_defaults = {
173173
.zo_mirrors = 2,
174174
.zo_raidz = 4,
175175
.zo_raidz_parity = 1,
176-
.zo_vdev_size = SPA_MINDEVSIZE * 2,
176+
.zo_vdev_size = SPA_MINDEVSIZE * 4, /* 256m default size */
177177
.zo_datasets = 7,
178178
.zo_threads = 23,
179179
.zo_passtime = 60, /* 60 seconds */

cddl/contrib/opensolaris/lib/libzpool/common/kernel.c

+5
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ kstat_create(char *module, int instance, char *name, char *class,
9595
return (NULL);
9696
}
9797

98+
/*ARGSUSED*/
99+
void
100+
kstat_named_init(kstat_named_t *knp, const char *name, uchar_t type)
101+
{}
102+
98103
/*ARGSUSED*/
99104
void
100105
kstat_install(kstat_t *ksp)

contrib/compiler-rt/lib/builtins/arm/aeabi_idivmod.S

+12-3
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,25 @@
2020
#endif
2121

2222
.syntax unified
23+
.syntax unified
24+
.text
25+
#if defined(USE_THUMB_PROLOGUE)
26+
.thumb
27+
#endif
2328
.p2align 2
29+
#if defined(USE_THUMB_PROLOGUE)
30+
DEFINE_COMPILERRT_THUMB_FUNCTION(__aeabi_idivmod)
31+
#else
2432
DEFINE_COMPILERRT_FUNCTION(__aeabi_idivmod)
25-
#if __ARM_ARCH_ISA_THUMB == 1
33+
#endif
34+
#if defined(USE_THUMB_1)
2635
push {r0, r1, lr}
2736
bl SYMBOL_NAME(__divsi3)
2837
pop {r1, r2, r3} // now r0 = quot, r1 = num, r2 = denom
2938
muls r2, r2, r0 // r2 = quot * denom
3039
subs r1, r1, r2
3140
JMP (r3)
32-
#else
41+
#else // defined(USE_THUMB_1)
3342
push { lr }
3443
sub sp, sp, #4
3544
mov r2, sp
@@ -42,7 +51,7 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_idivmod)
4251
ldr r1, [sp]
4352
add sp, sp, #4
4453
pop { pc }
45-
#endif // __ARM_ARCH_ISA_THUMB == 1
54+
#endif // defined(USE_THUMB_1)
4655
END_COMPILERRT_FUNCTION(__aeabi_idivmod)
4756

4857
NO_EXEC_STACK_DIRECTIVE

contrib/compiler-rt/lib/builtins/arm/aeabi_uidivmod.S

+8
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,16 @@
2121
#endif
2222

2323
.syntax unified
24+
.text
25+
#if defined(USE_THUMB_PROLOGUE)
26+
.thumb
27+
#endif
2428
.p2align 2
29+
#if defined(USE_THUMB_PROLOGUE)
30+
DEFINE_COMPILERRT_THUMB_FUNCTION(__aeabi_uidivmod)
31+
#else
2532
DEFINE_COMPILERRT_FUNCTION(__aeabi_uidivmod)
33+
#endif
2634
#if __ARM_ARCH_ISA_THUMB == 1
2735
cmp r0, r1
2836
bcc LOCAL_LABEL(case_denom_larger)

contrib/compiler-rt/lib/builtins/arm/bswapdi2.S

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
.syntax unified
1313
.text
14-
#if __ARM_ARCH_ISA_THUMB == 2
14+
#if defined(USE_THUMB_PROLOGUE)
1515
.thumb
1616
#endif
1717

@@ -21,7 +21,7 @@
2121
// Reverse all the bytes in a 64-bit integer.
2222
//
2323
.p2align 2
24-
#if __ARM_ARCH_ISA_THUMB == 2
24+
#if defined(USE_THUMB_PROLOGUE)
2525
DEFINE_COMPILERRT_THUMB_FUNCTION(__bswapdi2)
2626
#else
2727
DEFINE_COMPILERRT_FUNCTION(__bswapdi2)

contrib/compiler-rt/lib/builtins/arm/bswapsi2.S

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
.syntax unified
1313
.text
14-
#if __ARM_ARCH_ISA_THUMB == 2
14+
#if defined(USE_THUMB_PROLOGUE)
1515
.thumb
1616
#endif
1717

@@ -21,7 +21,7 @@
2121
// Reverse all the bytes in a 32-bit integer.
2222
//
2323
.p2align 2
24-
#if __ARM_ARCH_ISA_THUMB == 2
24+
#if defined(USE_THUMB_PROLOGUE)
2525
DEFINE_COMPILERRT_THUMB_FUNCTION(__bswapsi2)
2626
#else
2727
DEFINE_COMPILERRT_FUNCTION(__bswapsi2)

contrib/compiler-rt/lib/builtins/arm/clzdi2.S

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515

1616
.syntax unified
1717
.text
18-
#if __ARM_ARCH_ISA_THUMB == 2
18+
#if defined(USE_THUMB_PROLOGUE)
1919
.thumb
2020
#endif
2121

2222

2323
.p2align 2
24-
#if __ARM_ARCH_ISA_THUMB == 2
24+
#if defined(USE_THUMB_PROLOGUE)
2525
DEFINE_COMPILERRT_THUMB_FUNCTION(__clzdi2)
2626
#else
2727
DEFINE_COMPILERRT_FUNCTION(__clzdi2)

contrib/compiler-rt/lib/builtins/arm/clzsi2.S

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515

1616
.syntax unified
1717
.text
18-
#if __ARM_ARCH_ISA_THUMB == 2
18+
#if defined(USE_THUMB_PROLOGUE)
1919
.thumb
2020
#endif
2121

2222
.p2align 2
23-
#if __ARM_ARCH_ISA_THUMB == 2
23+
#if defined(USE_THUMB_PROLOGUE)
2424
DEFINE_COMPILERRT_THUMB_FUNCTION(__clzsi2)
2525
#else
2626
DEFINE_COMPILERRT_FUNCTION(__clzsi2)

contrib/compiler-rt/lib/builtins/arm/comparesf2.S

+26-12
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,20 @@
3838
//===----------------------------------------------------------------------===//
3939

4040
#include "../assembly.h"
41-
.syntax unified
42-
#if __ARM_ARCH_ISA_THUMB == 2
43-
.thumb
41+
.syntax unified
42+
.text
43+
#if defined(USE_THUMB_PROLOGUE)
44+
.thumb
4445
#endif
4546

4647
@ int __eqsf2(float a, float b)
4748

4849
.p2align 2
50+
#if defined(USE_THUMB_PROLOGUE)
51+
DEFINE_COMPILERRT_THUMB_FUNCTION(__eqsf2)
52+
#else
4953
DEFINE_COMPILERRT_FUNCTION(__eqsf2)
54+
#endif
5055
#if defined(COMPILER_RT_ARMHF_TARGET)
5156
vmov r0, s0
5257
vmov r1, s1
@@ -67,15 +72,15 @@ DEFINE_COMPILERRT_FUNCTION(__eqsf2)
6772
// flag if both a and b are zero (of either sign). The shift of r3 doesn't
6873
// effect this at all, but it *does* make sure that the C flag is clear for
6974
// the subsequent operations.
70-
#if __ARM_ARCH_ISA_THUMB == 1
75+
#if defined(USE_THUMB_1)
7176
lsrs r6, r3, #1
7277
orrs r6, r2, r6
7378
#else
7479
orrs r12, r2, r3, lsr #1
7580
#endif
7681
// Next, we check if a and b have the same or different signs. If they have
7782
// opposite signs, this eor will set the N flag.
78-
#if __ARM_ARCH_ISA_THUMB == 1
83+
#if defined(USE_THUMB_1)
7984
beq 1f
8085
movs r6, r0
8186
eors r6, r1
@@ -89,7 +94,7 @@ DEFINE_COMPILERRT_FUNCTION(__eqsf2)
8994
// ignoring NaNs for now), this subtract will zero out r0. If they have the
9095
// same sign, the flags are updated as they would be for a comparison of the
9196
// absolute values of a and b.
92-
#if __ARM_ARCH_ISA_THUMB == 1
97+
#if defined(USE_THUMB_1)
9398
bmi 1f
9499
subs r0, r2, r3
95100
1:
@@ -108,7 +113,7 @@ DEFINE_COMPILERRT_FUNCTION(__eqsf2)
108113
// still clear from the shift argument in orrs; if a is positive and b
109114
// negative, this places 0 in r0; if a is negative and b positive, -1 is
110115
// placed in r0.
111-
#if __ARM_ARCH_ISA_THUMB == 1
116+
#if defined(USE_THUMB_1)
112117
bhs 1f
113118
// Here if a and b have the same sign and absA < absB, the result is thus
114119
// b < 0 ? 1 : -1. Same if a and b have the opposite sign (ignoring Nan).
@@ -127,7 +132,7 @@ DEFINE_COMPILERRT_FUNCTION(__eqsf2)
127132
// the sign of b in r0. Thus, if both are negative and a < b, -1 is placed
128133
// in r0, which is the desired result. Conversely, if both are positive
129134
// and a > b, zero is placed in r0.
130-
#if __ARM_ARCH_ISA_THUMB == 1
135+
#if defined(USE_THUMB_1)
131136
bls 1f
132137
// Here both have the same sign and absA > absB.
133138
movs r0, #1
@@ -145,14 +150,14 @@ DEFINE_COMPILERRT_FUNCTION(__eqsf2)
145150
// If a == b, then the Z flag is set, so we can get the correct final value
146151
// into r0 by simply or'ing with 1 if Z is clear.
147152
// For Thumb-1, r0 contains -1 if a < b, 0 if a > b and 0 if a == b.
148-
#if __ARM_ARCH_ISA_THUMB != 1
153+
#if defined(USE_THUMB_1)
149154
it ne
150155
orrne r0, r0, #1
151156
#endif
152157

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

182187
.p2align 2
188+
#if defined(USE_THUMB)
189+
DEFINE_COMPILERRT_THUMB_FUNCTION(__gtsf2)
190+
#else
183191
DEFINE_COMPILERRT_FUNCTION(__gtsf2)
192+
#endif
184193
// Identical to the preceding except in that we return -1 for NaN values.
185194
// Given that the two paths share so much code, one might be tempted to
186195
// unify them; however, the extra code needed to do so makes the code size
@@ -189,7 +198,7 @@ DEFINE_COMPILERRT_FUNCTION(__gtsf2)
189198
vmov r0, s0
190199
vmov r1, s1
191200
#endif
192-
#if __ARM_ARCH_ISA_THUMB == 1
201+
#if defined(USE_THUMB_1)
193202
push {r6, lr}
194203
lsls r2, r0, #1
195204
lsls r3, r1, #1
@@ -254,7 +263,12 @@ DEFINE_COMPILERRT_FUNCTION_ALIAS(__gesf2, __gtsf2)
254263
@ int __unordsf2(float a, float b)
255264

256265
.p2align 2
266+
#if defined(USE_THUMB)
267+
DEFINE_COMPILERRT_THUMB_FUNCTION(__unordsf2)
268+
#else
257269
DEFINE_COMPILERRT_FUNCTION(__unordsf2)
270+
#endif
271+
258272
#if defined(COMPILER_RT_ARMHF_TARGET)
259273
vmov r0, s0
260274
vmov r1, s1
@@ -263,7 +277,7 @@ DEFINE_COMPILERRT_FUNCTION(__unordsf2)
263277
lsls r2, r0, #1
264278
lsls r3, r1, #1
265279
movs r0, #0
266-
#if __ARM_ARCH_ISA_THUMB == 1
280+
#if defined(USE_THUMB_1)
267281
movs r1, #0xff
268282
lsls r1, #24
269283
cmp r2, r1

contrib/compiler-rt/lib/builtins/arm/divmodsi4.S

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
.syntax unified
2525
.text
26-
#if __ARM_ARCH_ISA_THUMB == 2
26+
#if defined(USE_THUMB_PROLOGUE)
2727
.thumb
2828
#endif
2929

@@ -32,7 +32,7 @@
3232
@ value is the quotient, the remainder is placed in the variable.
3333

3434
.p2align 3
35-
#if __ARM_ARCH_ISA_THUMB == 2
35+
#if defined(USE_THUMB_PROLOGUE)
3636
DEFINE_COMPILERRT_THUMB_FUNCTION(__divmodsi4)
3737
#else
3838
DEFINE_COMPILERRT_FUNCTION(__divmodsi4)

contrib/compiler-rt/lib/builtins/arm/divsi3.S

+6-6
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
#define CLEAR_FRAME_AND_RETURN \
2121
pop {r4, r7, pc}
2222

23-
.syntax unified
24-
.text
25-
#if __ARM_ARCH_ISA_THUMB == 2
26-
.thumb
23+
.syntax unified
24+
.text
25+
#if defined(USE_THUMB_PROLOGUE)
26+
.thumb
2727
#endif
2828

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

36-
#if __ARM_ARCH_ISA_THUMB == 2
36+
#if defined(USE_THUMB_PROLOGUE)
3737
DEFINE_COMPILERRT_THUMB_FUNCTION(__divsi3)
3838
#else
3939
DEFINE_COMPILERRT_FUNCTION(__divsi3)
@@ -72,7 +72,7 @@ ESTABLISH_FRAME
7272
// abs(a) / abs(b)
7373
bl SYMBOL_NAME(__udivsi3)
7474
// Apply sign of quotient to result and return.
75-
# if __ARM_ARCH_ISA_THUMB == 1
75+
# if defined(USE_THUMB_1)
7676
asrs r4, #31
7777
eors r0, r4
7878
subs r0, r0, r4

0 commit comments

Comments
 (0)