Skip to content

Commit 2219f6b

Browse files
author
Simao Gomes Viana
committed
Merge remote-tracking branch 'stable/linux-5.5.y' into v5.5+
2 parents 355591b + 18f57e2 commit 2219f6b

File tree

54 files changed

+609
-253
lines changed

Some content is hidden

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

54 files changed

+609
-253
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@
136136
dynamic table installation which will install SSDT
137137
tables to /sys/firmware/acpi/tables/dynamic.
138138

139+
acpi_no_watchdog [HW,ACPI,WDT]
140+
Ignore the ACPI-based watchdog interface (WDAT) and let
141+
a native driver control the watchdog device instead.
142+
139143
acpi_rsdp= [ACPI,EFI,KEXEC]
140144
Pass the RSDP address to the kernel, mostly used
141145
on machines running EFI runtime service to boot the

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 5
33
PATCHLEVEL = 5
4-
SUBLEVEL = 10
4+
SUBLEVEL = 11
55
EXTRAVERSION =
66
NAME = Kleptomaniac Octopus
77

@@ -1239,7 +1239,7 @@ ifneq ($(dtstree),)
12391239
%.dtb: include/config/kernel.release scripts_dtc
12401240
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
12411241

1242-
PHONY += dtbs dtbs_install dt_binding_check
1242+
PHONY += dtbs dtbs_install dtbs_check
12431243
dtbs dtbs_check: include/config/kernel.release scripts_dtc
12441244
$(Q)$(MAKE) $(build)=$(dtstree)
12451245

@@ -1259,6 +1259,7 @@ PHONY += scripts_dtc
12591259
scripts_dtc: scripts_basic
12601260
$(Q)$(MAKE) $(build)=scripts/dtc
12611261

1262+
PHONY += dt_binding_check
12621263
dt_binding_check: scripts_dtc
12631264
$(Q)$(MAKE) $(build)=Documentation/devicetree/bindings
12641265

arch/arm/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,13 +307,15 @@ endif
307307
ifeq ($(CONFIG_STACKPROTECTOR_PER_TASK),y)
308308
prepare: stack_protector_prepare
309309
stack_protector_prepare: prepare0
310-
$(eval KBUILD_CFLAGS += \
310+
$(eval SSP_PLUGIN_CFLAGS := \
311311
-fplugin-arg-arm_ssp_per_task_plugin-tso=$(shell \
312312
awk '{if ($$2 == "THREAD_SZ_ORDER") print $$3;}'\
313313
include/generated/asm-offsets.h) \
314314
-fplugin-arg-arm_ssp_per_task_plugin-offset=$(shell \
315315
awk '{if ($$2 == "TI_STACK_CANARY") print $$3;}'\
316316
include/generated/asm-offsets.h))
317+
$(eval KBUILD_CFLAGS += $(SSP_PLUGIN_CFLAGS))
318+
$(eval GCC_PLUGINS_CFLAGS += $(SSP_PLUGIN_CFLAGS))
317319
endif
318320

319321
all: $(notdir $(KBUILD_IMAGE))

arch/arm/boot/compressed/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ clean-files += piggy_data lib1funcs.S ashldi3.S bswapsdi2.S \
101101
$(libfdt) $(libfdt_hdrs) hyp-stub.S
102102

103103
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
104-
KBUILD_CFLAGS += $(DISABLE_ARM_SSP_PER_TASK_PLUGIN)
105104

106105
ifeq ($(CONFIG_FUNCTION_TRACER),y)
107106
ORIG_CFLAGS := $(KBUILD_CFLAGS)
@@ -117,7 +116,8 @@ CFLAGS_fdt_ro.o := $(nossp_flags)
117116
CFLAGS_fdt_rw.o := $(nossp_flags)
118117
CFLAGS_fdt_wip.o := $(nossp_flags)
119118

120-
ccflags-y := -fpic $(call cc-option,-mno-single-pic-base,) -fno-builtin -I$(obj)
119+
ccflags-y := -fpic $(call cc-option,-mno-single-pic-base,) -fno-builtin \
120+
-I$(obj) $(DISABLE_ARM_SSP_PER_TASK_PLUGIN)
121121
asflags-y := -DZIMAGE
122122

123123
# Supply kernel BSS size to the decompressor via a linker symbol.

arch/arm/kernel/vdso.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ static bool __init cntvct_functional(void)
9494
* this.
9595
*/
9696
np = of_find_compatible_node(NULL, NULL, "arm,armv7-timer");
97+
if (!np)
98+
np = of_find_compatible_node(NULL, NULL, "arm,armv8-timer");
9799
if (!np)
98100
goto out_put;
99101

arch/arm/lib/copy_from_user.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ ENTRY(arm_copy_from_user)
118118

119119
ENDPROC(arm_copy_from_user)
120120

121-
.pushsection .fixup,"ax"
121+
.pushsection .text.fixup,"ax"
122122
.align 0
123123
copy_abort_preamble
124124
ldmfd sp!, {r1, r2, r3}

arch/riscv/include/asm/csr.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,16 @@
7272
#define EXC_LOAD_PAGE_FAULT 13
7373
#define EXC_STORE_PAGE_FAULT 15
7474

75+
/* PMP configuration */
76+
#define PMP_R 0x01
77+
#define PMP_W 0x02
78+
#define PMP_X 0x04
79+
#define PMP_A 0x18
80+
#define PMP_A_TOR 0x08
81+
#define PMP_A_NA4 0x10
82+
#define PMP_A_NAPOT 0x18
83+
#define PMP_L 0x80
84+
7585
/* symbolic CSR names: */
7686
#define CSR_CYCLE 0xc00
7787
#define CSR_TIME 0xc01
@@ -100,6 +110,8 @@
100110
#define CSR_MCAUSE 0x342
101111
#define CSR_MTVAL 0x343
102112
#define CSR_MIP 0x344
113+
#define CSR_PMPCFG0 0x3a0
114+
#define CSR_PMPADDR0 0x3b0
103115
#define CSR_MHARTID 0xf14
104116

105117
#ifdef CONFIG_RISCV_M_MODE

arch/riscv/kernel/head.S

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ _start_kernel:
5858
/* Reset all registers except ra, a0, a1 */
5959
call reset_regs
6060

61+
/* Setup a PMP to permit access to all of memory. */
62+
li a0, -1
63+
csrw CSR_PMPADDR0, a0
64+
li a0, (PMP_A_NAPOT | PMP_R | PMP_W | PMP_X)
65+
csrw CSR_PMPCFG0, a0
66+
6167
/*
6268
* The hartid in a0 is expected later on, and we have no firmware
6369
* to hand it to us.

block/blk-flush.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ void blk_insert_flush(struct request *rq)
412412
*/
413413
if ((policy & REQ_FSEQ_DATA) &&
414414
!(policy & (REQ_FSEQ_PREFLUSH | REQ_FSEQ_POSTFLUSH))) {
415-
blk_mq_request_bypass_insert(rq, false);
415+
blk_mq_request_bypass_insert(rq, false, false);
416416
return;
417417
}
418418

block/blk-mq-sched.c

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -361,13 +361,19 @@ static bool blk_mq_sched_bypass_insert(struct blk_mq_hw_ctx *hctx,
361361
bool has_sched,
362362
struct request *rq)
363363
{
364-
/* dispatch flush rq directly */
365-
if (rq->rq_flags & RQF_FLUSH_SEQ) {
366-
spin_lock(&hctx->lock);
367-
list_add(&rq->queuelist, &hctx->dispatch);
368-
spin_unlock(&hctx->lock);
364+
/*
365+
* dispatch flush and passthrough rq directly
366+
*
367+
* passthrough request has to be added to hctx->dispatch directly.
368+
* For some reason, device may be in one situation which can't
369+
* handle FS request, so STS_RESOURCE is always returned and the
370+
* FS request will be added to hctx->dispatch. However passthrough
371+
* request may be required at that time for fixing the problem. If
372+
* passthrough request is added to scheduler queue, there isn't any
373+
* chance to dispatch it given we prioritize requests in hctx->dispatch.
374+
*/
375+
if ((rq->rq_flags & RQF_FLUSH_SEQ) || blk_rq_is_passthrough(rq))
369376
return true;
370-
}
371377

372378
if (has_sched)
373379
rq->rq_flags |= RQF_SORTED;
@@ -391,8 +397,32 @@ void blk_mq_sched_insert_request(struct request *rq, bool at_head,
391397

392398
WARN_ON(e && (rq->tag != -1));
393399

394-
if (blk_mq_sched_bypass_insert(hctx, !!e, rq))
400+
if (blk_mq_sched_bypass_insert(hctx, !!e, rq)) {
401+
/*
402+
* Firstly normal IO request is inserted to scheduler queue or
403+
* sw queue, meantime we add flush request to dispatch queue(
404+
* hctx->dispatch) directly and there is at most one in-flight
405+
* flush request for each hw queue, so it doesn't matter to add
406+
* flush request to tail or front of the dispatch queue.
407+
*
408+
* Secondly in case of NCQ, flush request belongs to non-NCQ
409+
* command, and queueing it will fail when there is any
410+
* in-flight normal IO request(NCQ command). When adding flush
411+
* rq to the front of hctx->dispatch, it is easier to introduce
412+
* extra time to flush rq's latency because of S_SCHED_RESTART
413+
* compared with adding to the tail of dispatch queue, then
414+
* chance of flush merge is increased, and less flush requests
415+
* will be issued to controller. It is observed that ~10% time
416+
* is saved in blktests block/004 on disk attached to AHCI/NCQ
417+
* drive when adding flush rq to the front of hctx->dispatch.
418+
*
419+
* Simply queue flush rq to the front of hctx->dispatch so that
420+
* intensive flush workloads can benefit in case of NCQ HW.
421+
*/
422+
at_head = (rq->rq_flags & RQF_FLUSH_SEQ) ? true : at_head;
423+
blk_mq_request_bypass_insert(rq, at_head, false);
395424
goto run;
425+
}
396426

397427
if (e && e->type->ops.insert_requests) {
398428
LIST_HEAD(list);

0 commit comments

Comments
 (0)