Skip to content

Commit 8c8a1f3

Browse files
author
Alex Shi
committed
Merge tag 'v4.4.85' into linux-linaro-lsk-v4.4
This is the 4.4.85 stable release
2 parents 2d24df0 + 717bd21 commit 8c8a1f3

75 files changed

Lines changed: 433 additions & 281 deletions

Some content is hidden

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

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION = 4
22
PATCHLEVEL = 4
3-
SUBLEVEL = 83
3+
SUBLEVEL = 85
44
EXTRAVERSION =
55
NAME = Blurry Fish Butt
66

arch/arc/include/asm/cache.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ extern int ioc_exists;
8888
#define ARC_REG_SLC_FLUSH 0x904
8989
#define ARC_REG_SLC_INVALIDATE 0x905
9090
#define ARC_REG_SLC_RGN_START 0x914
91+
#define ARC_REG_SLC_RGN_START1 0x915
9192
#define ARC_REG_SLC_RGN_END 0x916
93+
#define ARC_REG_SLC_RGN_END1 0x917
9294

9395
/* Bit val in SLC_CONTROL */
9496
#define SLC_CTRL_IM 0x040

arch/arc/mm/cache.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,7 @@ noinline void slc_op(phys_addr_t paddr, unsigned long sz, const int op)
543543
static DEFINE_SPINLOCK(lock);
544544
unsigned long flags;
545545
unsigned int ctrl;
546+
phys_addr_t end;
546547

547548
spin_lock_irqsave(&lock, flags);
548549

@@ -572,8 +573,16 @@ noinline void slc_op(phys_addr_t paddr, unsigned long sz, const int op)
572573
* END needs to be setup before START (latter triggers the operation)
573574
* END can't be same as START, so add (l2_line_sz - 1) to sz
574575
*/
575-
write_aux_reg(ARC_REG_SLC_RGN_END, (paddr + sz + l2_line_sz - 1));
576-
write_aux_reg(ARC_REG_SLC_RGN_START, paddr);
576+
end = paddr + sz + l2_line_sz - 1;
577+
if (is_pae40_enabled())
578+
write_aux_reg(ARC_REG_SLC_RGN_END1, upper_32_bits(end));
579+
580+
write_aux_reg(ARC_REG_SLC_RGN_END, lower_32_bits(end));
581+
582+
if (is_pae40_enabled())
583+
write_aux_reg(ARC_REG_SLC_RGN_START1, upper_32_bits(paddr));
584+
585+
write_aux_reg(ARC_REG_SLC_RGN_START, lower_32_bits(paddr));
577586

578587
while (read_aux_reg(ARC_REG_SLC_CTRL) & SLC_CTRL_BUSY);
579588

arch/arm64/include/asm/elf.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@
114114

115115
/*
116116
* This is the base location for PIE (ET_DYN with INTERP) loads. On
117-
* 64-bit, this is raised to 4GB to leave the entire 32-bit address
117+
* 64-bit, this is above 4GB to leave the entire 32-bit address
118118
* space open for things that want to use the area for 32-bit pointers.
119119
*/
120-
#define ELF_ET_DYN_BASE 0x100000000UL
120+
#define ELF_ET_DYN_BASE (2 * TASK_SIZE_64 / 3)
121121

122122
#ifndef __ASSEMBLY__
123123

arch/x86/crypto/sha1_avx2_x86_64_asm.S

Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,10 @@
117117
.set T1, REG_T1
118118
.endm
119119

120-
#define K_BASE %r8
121120
#define HASH_PTR %r9
121+
#define BLOCKS_CTR %r8
122122
#define BUFFER_PTR %r10
123123
#define BUFFER_PTR2 %r13
124-
#define BUFFER_END %r11
125124

126125
#define PRECALC_BUF %r14
127126
#define WK_BUF %r15
@@ -205,14 +204,14 @@
205204
* blended AVX2 and ALU instruction scheduling
206205
* 1 vector iteration per 8 rounds
207206
*/
208-
vmovdqu ((i * 2) + PRECALC_OFFSET)(BUFFER_PTR), W_TMP
207+
vmovdqu (i * 2)(BUFFER_PTR), W_TMP
209208
.elseif ((i & 7) == 1)
210-
vinsertf128 $1, (((i-1) * 2)+PRECALC_OFFSET)(BUFFER_PTR2),\
209+
vinsertf128 $1, ((i-1) * 2)(BUFFER_PTR2),\
211210
WY_TMP, WY_TMP
212211
.elseif ((i & 7) == 2)
213212
vpshufb YMM_SHUFB_BSWAP, WY_TMP, WY
214213
.elseif ((i & 7) == 4)
215-
vpaddd K_XMM(K_BASE), WY, WY_TMP
214+
vpaddd K_XMM + K_XMM_AR(%rip), WY, WY_TMP
216215
.elseif ((i & 7) == 7)
217216
vmovdqu WY_TMP, PRECALC_WK(i&~7)
218217

@@ -255,7 +254,7 @@
255254
vpxor WY, WY_TMP, WY_TMP
256255
.elseif ((i & 7) == 7)
257256
vpxor WY_TMP2, WY_TMP, WY
258-
vpaddd K_XMM(K_BASE), WY, WY_TMP
257+
vpaddd K_XMM + K_XMM_AR(%rip), WY, WY_TMP
259258
vmovdqu WY_TMP, PRECALC_WK(i&~7)
260259

261260
PRECALC_ROTATE_WY
@@ -291,7 +290,7 @@
291290
vpsrld $30, WY, WY
292291
vpor WY, WY_TMP, WY
293292
.elseif ((i & 7) == 7)
294-
vpaddd K_XMM(K_BASE), WY, WY_TMP
293+
vpaddd K_XMM + K_XMM_AR(%rip), WY, WY_TMP
295294
vmovdqu WY_TMP, PRECALC_WK(i&~7)
296295

297296
PRECALC_ROTATE_WY
@@ -446,6 +445,16 @@
446445

447446
.endm
448447

448+
/* Add constant only if (%2 > %3) condition met (uses RTA as temp)
449+
* %1 + %2 >= %3 ? %4 : 0
450+
*/
451+
.macro ADD_IF_GE a, b, c, d
452+
mov \a, RTA
453+
add $\d, RTA
454+
cmp $\c, \b
455+
cmovge RTA, \a
456+
.endm
457+
449458
/*
450459
* macro implements 80 rounds of SHA-1, for multiple blocks with s/w pipelining
451460
*/
@@ -463,13 +472,16 @@
463472
lea (2*4*80+32)(%rsp), WK_BUF
464473

465474
# Precalc WK for first 2 blocks
466-
PRECALC_OFFSET = 0
475+
ADD_IF_GE BUFFER_PTR2, BLOCKS_CTR, 2, 64
467476
.set i, 0
468477
.rept 160
469478
PRECALC i
470479
.set i, i + 1
471480
.endr
472-
PRECALC_OFFSET = 128
481+
482+
/* Go to next block if needed */
483+
ADD_IF_GE BUFFER_PTR, BLOCKS_CTR, 3, 128
484+
ADD_IF_GE BUFFER_PTR2, BLOCKS_CTR, 4, 128
473485
xchg WK_BUF, PRECALC_BUF
474486

475487
.align 32
@@ -479,8 +491,8 @@ _loop:
479491
* we use K_BASE value as a signal of a last block,
480492
* it is set below by: cmovae BUFFER_PTR, K_BASE
481493
*/
482-
cmp K_BASE, BUFFER_PTR
483-
jne _begin
494+
test BLOCKS_CTR, BLOCKS_CTR
495+
jnz _begin
484496
.align 32
485497
jmp _end
486498
.align 32
@@ -512,10 +524,10 @@ _loop0:
512524
.set j, j+2
513525
.endr
514526

515-
add $(2*64), BUFFER_PTR /* move to next odd-64-byte block */
516-
cmp BUFFER_END, BUFFER_PTR /* is current block the last one? */
517-
cmovae K_BASE, BUFFER_PTR /* signal the last iteration smartly */
518-
527+
/* Update Counter */
528+
sub $1, BLOCKS_CTR
529+
/* Move to the next block only if needed*/
530+
ADD_IF_GE BUFFER_PTR, BLOCKS_CTR, 4, 128
519531
/*
520532
* rounds
521533
* 60,62,64,66,68
@@ -532,8 +544,8 @@ _loop0:
532544
UPDATE_HASH 12(HASH_PTR), D
533545
UPDATE_HASH 16(HASH_PTR), E
534546

535-
cmp K_BASE, BUFFER_PTR /* is current block the last one? */
536-
je _loop
547+
test BLOCKS_CTR, BLOCKS_CTR
548+
jz _loop
537549

538550
mov TB, B
539551

@@ -575,10 +587,10 @@ _loop2:
575587
.set j, j+2
576588
.endr
577589

578-
add $(2*64), BUFFER_PTR2 /* move to next even-64-byte block */
579-
580-
cmp BUFFER_END, BUFFER_PTR2 /* is current block the last one */
581-
cmovae K_BASE, BUFFER_PTR /* signal the last iteration smartly */
590+
/* update counter */
591+
sub $1, BLOCKS_CTR
592+
/* Move to the next block only if needed*/
593+
ADD_IF_GE BUFFER_PTR2, BLOCKS_CTR, 4, 128
582594

583595
jmp _loop3
584596
_loop3:
@@ -641,19 +653,12 @@ _loop3:
641653

642654
avx2_zeroupper
643655

644-
lea K_XMM_AR(%rip), K_BASE
645-
656+
/* Setup initial values */
646657
mov CTX, HASH_PTR
647658
mov BUF, BUFFER_PTR
648-
lea 64(BUF), BUFFER_PTR2
649-
650-
shl $6, CNT /* mul by 64 */
651-
add BUF, CNT
652-
add $64, CNT
653-
mov CNT, BUFFER_END
654659

655-
cmp BUFFER_END, BUFFER_PTR2
656-
cmovae K_BASE, BUFFER_PTR2
660+
mov BUF, BUFFER_PTR2
661+
mov CNT, BLOCKS_CTR
657662

658663
xmm_mov BSWAP_SHUFB_CTL(%rip), YMM_SHUFB_BSWAP
659664

arch/x86/crypto/sha1_ssse3_glue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ asmlinkage void sha1_transform_avx2(u32 *digest, const char *data,
201201

202202
static bool avx2_usable(void)
203203
{
204-
if (false && avx_usable() && boot_cpu_has(X86_FEATURE_AVX2)
204+
if (avx_usable() && boot_cpu_has(X86_FEATURE_AVX2)
205205
&& boot_cpu_has(X86_FEATURE_BMI1)
206206
&& boot_cpu_has(X86_FEATURE_BMI2))
207207
return true;

arch/x86/entry/entry_64.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,6 +1190,8 @@ ENTRY(nmi)
11901190
* other IST entries.
11911191
*/
11921192

1193+
ASM_CLAC
1194+
11931195
/* Use %rdx as our temp variable throughout */
11941196
pushq %rdx
11951197

arch/x86/include/asm/elf.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,11 @@ extern int force_personality32;
247247

248248
/*
249249
* This is the base location for PIE (ET_DYN with INTERP) loads. On
250-
* 64-bit, this is raised to 4GB to leave the entire 32-bit address
250+
* 64-bit, this is above 4GB to leave the entire 32-bit address
251251
* space open for things that want to use the area for 32-bit pointers.
252252
*/
253253
#define ELF_ET_DYN_BASE (mmap_is_ia32() ? 0x000400000UL : \
254-
0x100000000UL)
254+
(TASK_SIZE / 3 * 2))
255255

256256
/* This yields a mask that user programs can use to figure out what
257257
instruction set this CPU supports. This could be done in user space,

arch/x86/kernel/cpu/perf_event_intel_lbr.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ static void __intel_pmu_lbr_enable(bool pmi)
153153
*/
154154
if (cpuc->lbr_sel)
155155
lbr_select = cpuc->lbr_sel->config;
156-
if (!pmi)
156+
if (!pmi && cpuc->lbr_sel)
157157
wrmsrl(MSR_LBR_SELECT, lbr_select);
158158

159159
rdmsrl(MSR_IA32_DEBUGCTLMSR, debugctl);
@@ -432,8 +432,10 @@ static void intel_pmu_lbr_read_64(struct cpu_hw_events *cpuc)
432432
int out = 0;
433433
int num = x86_pmu.lbr_nr;
434434

435-
if (cpuc->lbr_sel->config & LBR_CALL_STACK)
436-
num = tos;
435+
if (cpuc->lbr_sel) {
436+
if (cpuc->lbr_sel->config & LBR_CALL_STACK)
437+
num = tos;
438+
}
437439

438440
for (i = 0; i < num; i++) {
439441
unsigned long lbr_idx = (tos - i) & mask;

drivers/acpi/apei/ghes.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,7 @@ static int ghes_remove(struct platform_device *ghes_dev)
10671067
if (list_empty(&ghes_sci))
10681068
unregister_acpi_hed_notifier(&ghes_notifier_sci);
10691069
mutex_unlock(&ghes_list_mutex);
1070+
synchronize_rcu();
10701071
break;
10711072
case ACPI_HEST_NOTIFY_NMI:
10721073
ghes_nmi_remove(ghes);

0 commit comments

Comments
 (0)