diff --git a/kernel-rt.spec b/kernel-rt.spec index 50c3a089655cf167afcd8bb7df14f650330c8d44..3a62424022973e9aa63dbcc42f3acc4b553418df 100644 --- a/kernel-rt.spec +++ b/kernel-rt.spec @@ -40,9 +40,9 @@ rm -f test_openEuler_sign.ko test_openEuler_sign.ko.sig %global upstream_version 6.6 %global upstream_sublevel 0 -%global devel_release 64 +%global devel_release 79 %global maintenance_release .0.0 -%global pkg_release .5 +%global pkg_release .6 %global rt_release .rt30 %define with_debuginfo 1 @@ -1057,6 +1057,9 @@ fi %endif %changelog +* Thu Feb 27 2025 zhangyu - 6.6.0-79.0.0.6 +- update kernel-rt version to 6.6.0-79.0.0.6 + * Mon Dec 16 2024 zhangyu - 6.6.0-64.0.0.5 - update kernel-rt version to 6.6.0-64.0.0.5 diff --git a/patch-6.6.0-6.0.0-rt20.patch b/patch-6.6.0-6.0.0-rt20.patch index 4d5c8ad7e9af23b9a86af54366a264d97ed64020..0d8c872da0f62a7f82827a5bcb155476f66b9f34 100644 --- a/patch-6.6.0-6.0.0-rt20.patch +++ b/patch-6.6.0-6.0.0-rt20.patch @@ -1,7 +1,7 @@ -From 6d7557e902fe417498dcee655291a7cb4320bf7d Mon Sep 17 00:00:00 2001 +From 033015fbad811f653c8b8bfc9f8fb9943d7104f1 Mon Sep 17 00:00:00 2001 From: zhangyu -Date: Tue, 12 Nov 2024 15:20:05 +0800 -Subject: [PATCH] rt1 +Date: Thu, 27 Feb 2025 14:01:35 +0800 +Subject: [PATCH] openEuler-24.03-LTS --- arch/arm/Kconfig | 6 +- @@ -56,7 +56,7 @@ Subject: [PATCH] rt1 drivers/tty/serial/altera_jtaguart.c | 28 +- drivers/tty/serial/altera_uart.c | 20 +- drivers/tty/serial/amba-pl010.c | 20 +- - drivers/tty/serial/amba-pl011.c | 78 +- + drivers/tty/serial/amba-pl011.c | 14 +- drivers/tty/serial/apbuart.c | 8 +- drivers/tty/serial/ar933x_uart.c | 26 +- drivers/tty/serial/arc_uart.c | 16 +- @@ -170,7 +170,7 @@ Subject: [PATCH] rt1 kernel/trace/trace_output.c | 16 +- net/core/dev.c | 39 +- net/core/skbuff.c | 7 +- - 166 files changed, 5047 insertions(+), 1542 deletions(-) + 166 files changed, 5015 insertions(+), 1510 deletions(-) create mode 100644 kernel/printk/nbcon.c diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig @@ -435,10 +435,10 @@ index 7e8773a2d..9fde36fcb 100644 EXPORT_SYMBOL(kernel_neon_end); diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig -index 58ee09b13..bd83a45b3 100644 +index 9da9d58f1..bedb0c9e5 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig -@@ -99,6 +99,7 @@ config ARM64 +@@ -103,6 +103,7 @@ config ARM64 select ARCH_SUPPORTS_NUMA_BALANCING select ARCH_SUPPORTS_PAGE_TABLE_CHECK select ARCH_SUPPORTS_PER_VMA_LOCK @@ -447,7 +447,7 @@ index 58ee09b13..bd83a45b3 100644 select ARCH_WANT_COMPAT_IPC_PARSE_VERSION if COMPAT select ARCH_WANT_DEFAULT_BPF_JIT diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig -index 37fbb5fc3..9a7d3d054 100644 +index 2979c9f96..57f52ef31 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -166,6 +166,7 @@ config PPC @@ -659,10 +659,10 @@ index d0345bd65..23fed53b8 100644 - #endif diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h -index 4fb84c2e9..61d990f69 100644 +index 8c72d1bcd..c59ad9b7a 100644 --- a/arch/riscv/include/asm/thread_info.h +++ b/arch/riscv/include/asm/thread_info.h -@@ -87,6 +87,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); +@@ -86,6 +86,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); * - pending work-to-be-done flags are in lowest half-word * - other flags in upper half-word(s) */ @@ -670,7 +670,7 @@ index 4fb84c2e9..61d990f69 100644 #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ #define TIF_SIGPENDING 2 /* signal pending */ #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ -@@ -101,6 +102,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); +@@ -100,6 +101,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) #define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL) #define _TIF_UPROBE (1 << TIF_UPROBE) @@ -679,7 +679,7 @@ index 4fb84c2e9..61d990f69 100644 #define _TIF_WORK_MASK \ (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | _TIF_NEED_RESCHED | \ diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c -index e39a905ac..dd118773e 100644 +index bb5fb2b82..25b6819b6 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -8,6 +8,7 @@ @@ -698,7 +698,7 @@ index e39a905ac..dd118773e 100644 #define MISALIGNED_COPY_SIZE ((MISALIGNED_BUFFER_SIZE / 2) - 0x80) unsigned long elf_hwcap __read_mostly; -@@ -571,14 +573,15 @@ unsigned long riscv_get_elf_hwcap(void) +@@ -575,14 +577,15 @@ unsigned long riscv_get_elf_hwcap(void) return hwcap; } @@ -716,7 +716,7 @@ index e39a905ac..dd118773e 100644 void *dst; void *src; long speed = RISCV_HWPROBE_MISALIGNED_SLOW; -@@ -587,12 +590,6 @@ void check_unaligned_access(int cpu) +@@ -591,12 +594,6 @@ void check_unaligned_access(int cpu) if (per_cpu(misaligned_access_speed, cpu) != RISCV_HWPROBE_MISALIGNED_UNKNOWN) return; @@ -729,7 +729,7 @@ index e39a905ac..dd118773e 100644 /* Make an unaligned destination buffer. */ dst = (void *)((unsigned long)page_address(page) | 0x1); /* Unalign src as well, but differently (off by 1 + 2 = 3). */ -@@ -645,7 +642,7 @@ void check_unaligned_access(int cpu) +@@ -649,7 +646,7 @@ void check_unaligned_access(int cpu) pr_warn("cpu%d: rdtime lacks granularity needed to measure unaligned access speed\n", cpu); @@ -738,7 +738,7 @@ index e39a905ac..dd118773e 100644 } if (word_cycles < byte_cycles) -@@ -659,18 +656,83 @@ void check_unaligned_access(int cpu) +@@ -663,18 +660,83 @@ void check_unaligned_access(int cpu) (speed == RISCV_HWPROBE_MISALIGNED_FAST) ? "fast" : "slow"); per_cpu(misaligned_access_speed, cpu) = speed; @@ -840,7 +840,7 @@ index 1b8da4e40..2cb5e6514 100644 if (has_vector()) { if (riscv_v_setup_vsize()) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig -index 958a491fb..acb9d6f2a 100644 +index 7efe93e4e..f05bebbc1 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -122,6 +122,7 @@ config X86 @@ -851,7 +851,7 @@ index 958a491fb..acb9d6f2a 100644 select ARCH_USE_BUILTIN_BSWAP select ARCH_USE_MEMTEST select ARCH_USE_QUEUED_RWLOCKS -@@ -278,6 +279,7 @@ config X86 +@@ -279,6 +280,7 @@ config X86 select HAVE_STATIC_CALL select HAVE_STATIC_CALL_INLINE if HAVE_OBJTOOL select HAVE_PREEMPT_DYNAMIC_CALL @@ -860,7 +860,7 @@ index 958a491fb..acb9d6f2a 100644 select HAVE_RUST if X86_64 select HAVE_SYSCALL_TRACEPOINTS diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h -index 971a05326..d176fa5d0 100644 +index 76e13733b..6c62c6852 100644 --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h @@ -85,8 +85,9 @@ struct thread_info { @@ -875,7 +875,7 @@ index 971a05326..d176fa5d0 100644 #define TIF_SPEC_IB 9 /* Indirect branch speculation mitigation */ #define TIF_SPEC_L1D_FLUSH 10 /* Flush L1D on mm switches (processes) */ #define TIF_USER_RETURN_NOTIFY 11 /* notify kernel of userspace return */ -@@ -108,6 +109,7 @@ struct thread_info { +@@ -109,6 +110,7 @@ struct thread_info { #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) @@ -884,7 +884,7 @@ index 971a05326..d176fa5d0 100644 #define _TIF_SSBD (1 << TIF_SSBD) #define _TIF_SPEC_IB (1 << TIF_SPEC_IB) diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c -index 831fa4a12..5af3ebec0 100644 +index d154b5d77..52f5ce0a9 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -107,7 +107,7 @@ static const struct dmi_system_id processor_power_dmi_table[] = { @@ -897,7 +897,7 @@ index 831fa4a12..5af3ebec0 100644 raw_local_irq_disable(); } diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c -index 1ffc53ff5..2594265e0 100644 +index 42aff7991..d905e53f7 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -57,6 +57,41 @@ static void zram_free_page(struct zram *zram, size_t index); @@ -950,7 +950,7 @@ index 1ffc53ff5..2594265e0 100644 static inline bool init_done(struct zram *zram) { -@@ -1242,6 +1278,7 @@ static bool zram_meta_alloc(struct zram *zram, u64 disksize) +@@ -1252,6 +1288,7 @@ static bool zram_meta_alloc(struct zram *zram, u64 disksize) if (!huge_class_size) huge_class_size = zs_huge_class_size(zram->mem_pool); @@ -1101,10 +1101,10 @@ index 172aa10a8..4ae472053 100644 + preempt_enable(); } diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c -index 94bf438c7..ef401cc81 100644 +index e0daa4e05..fdbb57fcb 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c -@@ -2141,9 +2141,17 @@ bool dcn20_validate_bandwidth(struct dc *dc, struct dc_state *context, +@@ -2142,9 +2142,17 @@ bool dcn20_validate_bandwidth(struct dc *dc, struct dc_state *context, bool fast_validate) { bool voltage_supported; @@ -1124,10 +1124,10 @@ index 94bf438c7..ef401cc81 100644 } diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c -index d1a25fe6c..5674c3450 100644 +index 24105a5b9..349c22dac 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c -@@ -953,9 +953,17 @@ static bool dcn21_validate_bandwidth(struct dc *dc, struct dc_state *context, +@@ -954,9 +954,17 @@ static bool dcn21_validate_bandwidth(struct dc *dc, struct dc_state *context, bool fast_validate) { bool voltage_supported; @@ -1167,7 +1167,7 @@ index 8a5a038fd..68970d6cf 100644 DC_LOGGER_INIT(dc->ctx->logger); BW_VAL_TRACE_COUNT(); -@@ -2062,16 +2061,14 @@ validate_fail: +@@ -2062,16 +2061,14 @@ static bool dcn20_validate_bandwidth_internal(struct dc *dc, struct dc_state *co out = false; validate_out: @@ -1230,7 +1230,7 @@ index 8a5a038fd..68970d6cf 100644 DC_LOGGER_INIT(dc->ctx->logger); BW_VAL_TRACE_COUNT(); -@@ -2362,7 +2358,6 @@ validate_fail: +@@ -2362,7 +2358,6 @@ bool dcn21_validate_bandwidth_fp(struct dc *dc, out = false; validate_out: @@ -1401,7 +1401,7 @@ index 2065be5a1..73d815fc5 100644 return; /* leave this for another sibling */ } -@@ -1591,7 +1591,7 @@ done: +@@ -1591,7 +1591,7 @@ static void execlists_dequeue(struct intel_engine_cs *engine) */ sched_engine->queue_priority_hint = queue_prio(sched_engine); i915_sched_engine_reset_on_empty(sched_engine); @@ -1410,7 +1410,7 @@ index 2065be5a1..73d815fc5 100644 /* * We can skip poking the HW if we ended up with exactly the same set -@@ -1617,13 +1617,6 @@ done: +@@ -1617,13 +1617,6 @@ static void execlists_dequeue(struct intel_engine_cs *engine) } } @@ -1896,7 +1896,7 @@ index 7fa665017..8b30ca8fd 100644 int serial8250_tx_dma(struct uart_8250_port *p) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c -index a1f2259cc..53c284bb2 100644 +index 72f9aab75..b8426ac63 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -263,20 +263,20 @@ static int dw8250_handle_irq(struct uart_port *p) @@ -2008,7 +2008,7 @@ index 28f9a2679..33699e86e 100644 if (tty_termios_baud_rate(termios)) tty_termios_encode_baud_rate(termios, baud, baud); diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c -index 4caecc352..d732ad6a7 100644 +index 9ed62bc7c..e687cd0da 100644 --- a/drivers/tty/serial/8250/8250_omap.c +++ b/drivers/tty/serial/8250/8250_omap.c @@ -405,7 +405,7 @@ static void omap_8250_set_termios(struct uart_port *port, @@ -3081,276 +3081,10 @@ index b5a7404cb..eabbf8afc 100644 } } diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c -index 362bbcdec..9cd660edb 100644 +index bb31ac9ca..1b265d358 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -347,9 +347,9 @@ static int pl011_fifo_to_tty(struct uart_amba_port *uap) - flag = TTY_FRAME; - } - -- spin_unlock(&uap->port.lock); -+ uart_port_unlock(&uap->port); - sysrq = uart_handle_sysrq_char(&uap->port, ch & 255); -- spin_lock(&uap->port.lock); -+ uart_port_lock(&uap->port); - - if (!sysrq) - uart_insert_char(&uap->port, ch, UART011_DR_OE, ch, flag); -@@ -544,7 +544,7 @@ static void pl011_dma_tx_callback(void *data) - unsigned long flags; - u16 dmacr; - -- spin_lock_irqsave(&uap->port.lock, flags); -+ uart_port_lock_irqsave(&uap->port, &flags); - if (uap->dmatx.queued) - dma_unmap_single(dmatx->chan->device->dev, dmatx->dma, - dmatx->len, DMA_TO_DEVICE); -@@ -565,7 +565,7 @@ static void pl011_dma_tx_callback(void *data) - if (!(dmacr & UART011_TXDMAE) || uart_tx_stopped(&uap->port) || - uart_circ_empty(&uap->port.state->xmit)) { - uap->dmatx.queued = false; -- spin_unlock_irqrestore(&uap->port.lock, flags); -+ uart_port_unlock_irqrestore(&uap->port, flags); - return; - } - -@@ -576,7 +576,7 @@ static void pl011_dma_tx_callback(void *data) - */ - pl011_start_tx_pio(uap); - -- spin_unlock_irqrestore(&uap->port.lock, flags); -+ uart_port_unlock_irqrestore(&uap->port, flags); - } - - /* -@@ -1004,7 +1004,7 @@ static void pl011_dma_rx_callback(void *data) - * routine to flush out the secondary DMA buffer while - * we immediately trigger the next DMA job. - */ -- spin_lock_irq(&uap->port.lock); -+ uart_port_lock_irq(&uap->port); - /* - * Rx data can be taken by the UART interrupts during - * the DMA irq handler. So we check the residue here. -@@ -1020,7 +1020,7 @@ static void pl011_dma_rx_callback(void *data) - ret = pl011_dma_rx_trigger_dma(uap); - - pl011_dma_rx_chars(uap, pending, lastbuf, false); -- spin_unlock_irq(&uap->port.lock); -+ uart_port_unlock_irq(&uap->port); - /* - * Do this check after we picked the DMA chars so we don't - * get some IRQ immediately from RX. -@@ -1086,11 +1086,11 @@ static void pl011_dma_rx_poll(struct timer_list *t) - if (jiffies_to_msecs(jiffies - dmarx->last_jiffies) - > uap->dmarx.poll_timeout) { - -- spin_lock_irqsave(&uap->port.lock, flags); -+ uart_port_lock_irqsave(&uap->port, &flags); - pl011_dma_rx_stop(uap); - uap->im |= UART011_RXIM; - pl011_write(uap->im, uap, REG_IMSC); -- spin_unlock_irqrestore(&uap->port.lock, flags); -+ uart_port_unlock_irqrestore(&uap->port, flags); - - uap->dmarx.running = false; - dmaengine_terminate_all(rxchan); -@@ -1186,10 +1186,10 @@ static void pl011_dma_shutdown(struct uart_amba_port *uap) - while (pl011_read(uap, REG_FR) & uap->vendor->fr_busy) - cpu_relax(); - -- spin_lock_irq(&uap->port.lock); -+ uart_port_lock_irq(&uap->port); - uap->dmacr &= ~(UART011_DMAONERR | UART011_RXDMAE | UART011_TXDMAE); - pl011_write(uap->dmacr, uap, REG_DMACR); -- spin_unlock_irq(&uap->port.lock); -+ uart_port_unlock_irq(&uap->port); - - if (uap->using_tx_dma) { - /* In theory, this should already be done by pl011_dma_flush_buffer */ -@@ -1400,9 +1400,9 @@ static void pl011_throttle_rx(struct uart_port *port) - { - unsigned long flags; - -- spin_lock_irqsave(&port->lock, flags); -+ uart_port_lock_irqsave(port, &flags); - pl011_stop_rx(port); -- spin_unlock_irqrestore(&port->lock, flags); -+ uart_port_unlock_irqrestore(port, flags); - } - - static void pl011_enable_ms(struct uart_port *port) -@@ -1420,7 +1420,7 @@ __acquires(&uap->port.lock) - { - pl011_fifo_to_tty(uap); - -- spin_unlock(&uap->port.lock); -+ uart_port_unlock(&uap->port); - tty_flip_buffer_push(&uap->port.state->port); - /* - * If we were temporarily out of DMA mode for a while, -@@ -1445,7 +1445,7 @@ __acquires(&uap->port.lock) - #endif - } - } -- spin_lock(&uap->port.lock); -+ uart_port_lock(&uap->port); - } - - static bool pl011_tx_char(struct uart_amba_port *uap, unsigned char c, -@@ -1551,7 +1551,7 @@ static irqreturn_t pl011_int(int irq, void *dev_id) - unsigned int status, pass_counter = AMBA_ISR_PASS_LIMIT; - int handled = 0; - -- spin_lock_irqsave(&uap->port.lock, flags); -+ uart_port_lock_irqsave(&uap->port, &flags); - status = pl011_read(uap, REG_RIS) & uap->im; - if (status) { - do { -@@ -1581,7 +1581,7 @@ static irqreturn_t pl011_int(int irq, void *dev_id) - handled = 1; - } - -- spin_unlock_irqrestore(&uap->port.lock, flags); -+ uart_port_unlock_irqrestore(&uap->port, flags); - - return IRQ_RETVAL(handled); - } -@@ -1653,14 +1653,14 @@ static void pl011_break_ctl(struct uart_port *port, int break_state) - unsigned long flags; - unsigned int lcr_h; - -- spin_lock_irqsave(&uap->port.lock, flags); -+ uart_port_lock_irqsave(&uap->port, &flags); - lcr_h = pl011_read(uap, REG_LCRH_TX); - if (break_state == -1) - lcr_h |= UART01x_LCRH_BRK; - else - lcr_h &= ~UART01x_LCRH_BRK; - pl011_write(lcr_h, uap, REG_LCRH_TX); -- spin_unlock_irqrestore(&uap->port.lock, flags); -+ uart_port_unlock_irqrestore(&uap->port, flags); - } - - #ifdef CONFIG_CONSOLE_POLL -@@ -1799,7 +1799,7 @@ static void pl011_enable_interrupts(struct uart_amba_port *uap) - unsigned long flags; - unsigned int i; - -- spin_lock_irqsave(&uap->port.lock, flags); -+ uart_port_lock_irqsave(&uap->port, &flags); - - /* Clear out any spuriously appearing RX interrupts */ - pl011_write(UART011_RTIS | UART011_RXIS, uap, REG_ICR); -@@ -1821,7 +1821,7 @@ static void pl011_enable_interrupts(struct uart_amba_port *uap) - if (!pl011_dma_rx_running(uap)) - uap->im |= UART011_RXIM; - pl011_write(uap->im, uap, REG_IMSC); -- spin_unlock_irqrestore(&uap->port.lock, flags); -+ uart_port_unlock_irqrestore(&uap->port, flags); - } - - static void pl011_unthrottle_rx(struct uart_port *port) -@@ -1829,7 +1829,7 @@ static void pl011_unthrottle_rx(struct uart_port *port) - struct uart_amba_port *uap = container_of(port, struct uart_amba_port, port); - unsigned long flags; - -- spin_lock_irqsave(&uap->port.lock, flags); -+ uart_port_lock_irqsave(&uap->port, &flags); - - uap->im = UART011_RTIM; - if (!pl011_dma_rx_running(uap)) -@@ -1837,7 +1837,7 @@ static void pl011_unthrottle_rx(struct uart_port *port) - - pl011_write(uap->im, uap, REG_IMSC); - -- spin_unlock_irqrestore(&uap->port.lock, flags); -+ uart_port_unlock_irqrestore(&uap->port, flags); - } - - static int pl011_startup(struct uart_port *port) -@@ -1857,7 +1857,7 @@ static int pl011_startup(struct uart_port *port) - - pl011_write(uap->vendor->ifls, uap, REG_IFLS); - -- spin_lock_irq(&uap->port.lock); -+ uart_port_lock_irq(&uap->port); - - cr = pl011_read(uap, REG_CR); - cr &= UART011_CR_RTS | UART011_CR_DTR; -@@ -1868,7 +1868,7 @@ static int pl011_startup(struct uart_port *port) - - pl011_write(cr, uap, REG_CR); - -- spin_unlock_irq(&uap->port.lock); -+ uart_port_unlock_irq(&uap->port); - - /* - * initialise the old status of the modem signals -@@ -1929,12 +1929,12 @@ static void pl011_disable_uart(struct uart_amba_port *uap) - unsigned int cr; - - uap->port.status &= ~(UPSTAT_AUTOCTS | UPSTAT_AUTORTS); -- spin_lock_irq(&uap->port.lock); -+ uart_port_lock_irq(&uap->port); - cr = pl011_read(uap, REG_CR); - cr &= UART011_CR_RTS | UART011_CR_DTR; - cr |= UART01x_CR_UARTEN | UART011_CR_TXE; - pl011_write(cr, uap, REG_CR); -- spin_unlock_irq(&uap->port.lock); -+ uart_port_unlock_irq(&uap->port); - - /* - * disable break condition and fifos -@@ -1946,14 +1946,14 @@ static void pl011_disable_uart(struct uart_amba_port *uap) - - static void pl011_disable_interrupts(struct uart_amba_port *uap) - { -- spin_lock_irq(&uap->port.lock); -+ uart_port_lock_irq(&uap->port); - - /* mask all interrupts and clear all pending ones */ - uap->im = 0; - pl011_write(uap->im, uap, REG_IMSC); - pl011_write(0xffff, uap, REG_ICR); - -- spin_unlock_irq(&uap->port.lock); -+ uart_port_unlock_irq(&uap->port); - } - - static void pl011_shutdown(struct uart_port *port) -@@ -2098,7 +2098,7 @@ pl011_set_termios(struct uart_port *port, struct ktermios *termios, - - bits = tty_get_frame_size(termios->c_cflag); - -- spin_lock_irqsave(&port->lock, flags); -+ uart_port_lock_irqsave(port, &flags); - - /* - * Update the per-port timeout. -@@ -2172,7 +2172,7 @@ pl011_set_termios(struct uart_port *port, struct ktermios *termios, - old_cr |= UART011_CR_RXE; - pl011_write(old_cr, uap, REG_CR); - -- spin_unlock_irqrestore(&port->lock, flags); -+ uart_port_unlock_irqrestore(port, flags); - } - - static void -@@ -2190,10 +2190,10 @@ sbsa_uart_set_termios(struct uart_port *port, struct ktermios *termios, - termios->c_cflag &= ~(CMSPAR | CRTSCTS); - termios->c_cflag |= CS8 | CLOCAL; - -- spin_lock_irqsave(&port->lock, flags); -+ uart_port_lock_irqsave(port, &flags); - uart_update_timeout(port, CS8, uap->fixed_baud); - pl011_setup_status_masks(port, termios); -- spin_unlock_irqrestore(&port->lock, flags); -+ uart_port_unlock_irqrestore(port, flags); - } - - static const char *pl011_type(struct uart_port *port) -@@ -2328,13 +2328,10 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) +@@ -2335,13 +2335,10 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) clk_enable(uap->clk); @@ -3358,20 +3092,21 @@ index 362bbcdec..9cd660edb 100644 - if (uap->port.sysrq) - locked = 0; - else if (oops_in_progress) -- locked = spin_trylock(&uap->port.lock); +- locked = uart_port_trylock(&uap->port); +- else +- uart_port_lock(&uap->port); + if (uap->port.sysrq || oops_in_progress) + locked = uart_port_trylock_irqsave(&uap->port, &flags); - else -- spin_lock(&uap->port.lock); ++ else + uart_port_lock_irqsave(&uap->port, &flags); /* * First save the CR then disable the interrupts -@@ -2360,8 +2357,7 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) +@@ -2367,8 +2364,7 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) pl011_write(old_cr, uap, REG_CR); if (locked) -- spin_unlock(&uap->port.lock); +- uart_port_unlock(&uap->port); - local_irq_restore(flags); + uart_port_unlock_irqrestore(&uap->port, flags); @@ -3641,7 +3376,7 @@ index bcca5627a..5a3f2fc47 100644 port->read_status_mask = ATMEL_US_OVRE; if (termios->c_iflag & INPCK) -@@ -2377,22 +2377,22 @@ gclk_fail: +@@ -2377,22 +2377,22 @@ static void atmel_set_termios(struct uart_port *port, else atmel_disable_ms(port); @@ -4199,7 +3934,7 @@ index 8bd0f8e45..58c2c460c 100644 while (!(readb(sport->port.membase + UARTSFIFO) & UARTSFIFO_RXEMPT)) { flg = TTY_NORMAL; -@@ -956,9 +956,9 @@ out: +@@ -956,9 +956,9 @@ static void lpuart_rxint(struct lpuart_port *sport) static void lpuart32_txint(struct lpuart_port *sport) { @@ -4235,7 +3970,7 @@ index 8bd0f8e45..58c2c460c 100644 return; } -@@ -1244,7 +1244,7 @@ exit: +@@ -1244,7 +1244,7 @@ static void lpuart_copy_rx_to_tty(struct lpuart_port *sport) dma_sync_sg_for_device(chan->device->dev, &sport->rx_sgl, 1, DMA_FROM_DEVICE); @@ -4571,7 +4306,7 @@ index 819f957b6..a75eafbcb 100644 static const char *icom_type(struct uart_port *port) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c -index a5d0df2ba..267c9af4b 100644 +index 349d4849b..3934ab8fe 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -586,7 +586,7 @@ static void imx_uart_dma_tx_callback(void *data) @@ -4592,7 +4327,7 @@ index a5d0df2ba..267c9af4b 100644 } /* called with port.lock taken and irqs off */ -@@ -782,11 +782,11 @@ static irqreturn_t imx_uart_rtsint(int irq, void *dev_id) +@@ -797,11 +797,11 @@ static irqreturn_t imx_uart_rtsint(int irq, void *dev_id) struct imx_port *sport = dev_id; irqreturn_t ret; @@ -4606,7 +4341,7 @@ index a5d0df2ba..267c9af4b 100644 return ret; } -@@ -795,9 +795,9 @@ static irqreturn_t imx_uart_txint(int irq, void *dev_id) +@@ -810,9 +810,9 @@ static irqreturn_t imx_uart_txint(int irq, void *dev_id) { struct imx_port *sport = dev_id; @@ -4618,7 +4353,7 @@ index a5d0df2ba..267c9af4b 100644 return IRQ_HANDLED; } -@@ -911,11 +911,11 @@ static irqreturn_t imx_uart_rxint(int irq, void *dev_id) +@@ -926,11 +926,11 @@ static irqreturn_t imx_uart_rxint(int irq, void *dev_id) struct imx_port *sport = dev_id; irqreturn_t ret; @@ -4632,7 +4367,7 @@ index a5d0df2ba..267c9af4b 100644 return ret; } -@@ -978,7 +978,7 @@ static irqreturn_t imx_uart_int(int irq, void *dev_id) +@@ -993,7 +993,7 @@ static irqreturn_t imx_uart_int(int irq, void *dev_id) unsigned int usr1, usr2, ucr1, ucr2, ucr3, ucr4; irqreturn_t ret = IRQ_NONE; @@ -4641,7 +4376,7 @@ index a5d0df2ba..267c9af4b 100644 usr1 = imx_uart_readl(sport, USR1); usr2 = imx_uart_readl(sport, USR2); -@@ -1048,7 +1048,7 @@ static irqreturn_t imx_uart_int(int irq, void *dev_id) +@@ -1063,7 +1063,7 @@ static irqreturn_t imx_uart_int(int irq, void *dev_id) ret = IRQ_HANDLED; } @@ -4650,7 +4385,7 @@ index a5d0df2ba..267c9af4b 100644 return ret; } -@@ -1131,7 +1131,7 @@ static void imx_uart_break_ctl(struct uart_port *port, int break_state) +@@ -1146,7 +1146,7 @@ static void imx_uart_break_ctl(struct uart_port *port, int break_state) unsigned long flags; u32 ucr1; @@ -4659,7 +4394,7 @@ index a5d0df2ba..267c9af4b 100644 ucr1 = imx_uart_readl(sport, UCR1) & ~UCR1_SNDBRK; -@@ -1140,7 +1140,7 @@ static void imx_uart_break_ctl(struct uart_port *port, int break_state) +@@ -1155,7 +1155,7 @@ static void imx_uart_break_ctl(struct uart_port *port, int break_state) imx_uart_writel(sport, ucr1, UCR1); @@ -4668,7 +4403,7 @@ index a5d0df2ba..267c9af4b 100644 } /* -@@ -1153,9 +1153,9 @@ static void imx_uart_timeout(struct timer_list *t) +@@ -1168,9 +1168,9 @@ static void imx_uart_timeout(struct timer_list *t) unsigned long flags; if (sport->port.state) { @@ -4680,7 +4415,7 @@ index a5d0df2ba..267c9af4b 100644 mod_timer(&sport->timer, jiffies + MCTRL_TIMEOUT); } -@@ -1185,9 +1185,9 @@ static void imx_uart_dma_rx_callback(void *data) +@@ -1200,9 +1200,9 @@ static void imx_uart_dma_rx_callback(void *data) status = dmaengine_tx_status(chan, sport->rx_cookie, &state); if (status == DMA_ERROR) { @@ -4692,7 +4427,7 @@ index a5d0df2ba..267c9af4b 100644 return; } -@@ -1216,9 +1216,9 @@ static void imx_uart_dma_rx_callback(void *data) +@@ -1231,9 +1231,9 @@ static void imx_uart_dma_rx_callback(void *data) r_bytes = rx_ring->head - rx_ring->tail; /* If we received something, check for 0xff flood */ @@ -4704,7 +4439,7 @@ index a5d0df2ba..267c9af4b 100644 if (!(sport->port.ignore_status_mask & URXD_DUMMY_READ)) { -@@ -1476,7 +1476,7 @@ static int imx_uart_startup(struct uart_port *port) +@@ -1491,7 +1491,7 @@ static int imx_uart_startup(struct uart_port *port) if (!uart_console(port) && imx_uart_dma_init(sport) == 0) dma_is_inited = 1; @@ -4713,7 +4448,7 @@ index a5d0df2ba..267c9af4b 100644 /* Reset fifo's and state machines */ imx_uart_soft_reset(sport); -@@ -1549,7 +1549,7 @@ static int imx_uart_startup(struct uart_port *port) +@@ -1564,7 +1564,7 @@ static int imx_uart_startup(struct uart_port *port) imx_uart_disable_loopback_rs485(sport); @@ -4722,7 +4457,7 @@ index a5d0df2ba..267c9af4b 100644 return 0; } -@@ -1574,21 +1574,21 @@ static void imx_uart_shutdown(struct uart_port *port) +@@ -1589,21 +1589,21 @@ static void imx_uart_shutdown(struct uart_port *port) sport->dma_is_rxing = 0; } @@ -4748,7 +4483,7 @@ index a5d0df2ba..267c9af4b 100644 /* * Stop our timer. -@@ -1599,7 +1599,7 @@ static void imx_uart_shutdown(struct uart_port *port) +@@ -1614,7 +1614,7 @@ static void imx_uart_shutdown(struct uart_port *port) * Disable all interrupts, port and break condition. */ @@ -4757,7 +4492,7 @@ index a5d0df2ba..267c9af4b 100644 ucr1 = imx_uart_readl(sport, UCR1); ucr1 &= ~(UCR1_TRDYEN | UCR1_RRDYEN | UCR1_RTSDEN | UCR1_RXDMAEN | -@@ -1621,7 +1621,7 @@ static void imx_uart_shutdown(struct uart_port *port) +@@ -1636,7 +1636,7 @@ static void imx_uart_shutdown(struct uart_port *port) ucr4 &= ~UCR4_TCEN; imx_uart_writel(sport, ucr4, UCR4); @@ -4766,7 +4501,7 @@ index a5d0df2ba..267c9af4b 100644 clk_disable_unprepare(sport->clk_per); clk_disable_unprepare(sport->clk_ipg); -@@ -1684,7 +1684,7 @@ imx_uart_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -1699,7 +1699,7 @@ imx_uart_set_termios(struct uart_port *port, struct ktermios *termios, baud = uart_get_baud_rate(port, termios, old, 50, port->uartclk / 16); quot = uart_get_divisor(port, baud); @@ -4775,7 +4510,7 @@ index a5d0df2ba..267c9af4b 100644 /* * Read current UCR2 and save it for future use, then clear all the bits -@@ -1812,7 +1812,7 @@ imx_uart_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -1827,7 +1827,7 @@ imx_uart_set_termios(struct uart_port *port, struct ktermios *termios, if (UART_ENABLE_MS(&sport->port, termios->c_cflag)) imx_uart_enable_ms(&sport->port); @@ -4784,7 +4519,7 @@ index a5d0df2ba..267c9af4b 100644 } static const char *imx_uart_type(struct uart_port *port) -@@ -1874,7 +1874,7 @@ static int imx_uart_poll_init(struct uart_port *port) +@@ -1889,7 +1889,7 @@ static int imx_uart_poll_init(struct uart_port *port) imx_uart_setup_ufcr(sport, TXTL_DEFAULT, RXTL_DEFAULT); @@ -4793,7 +4528,7 @@ index a5d0df2ba..267c9af4b 100644 /* * Be careful about the order of enabling bits here. First enable the -@@ -1902,7 +1902,7 @@ static int imx_uart_poll_init(struct uart_port *port) +@@ -1917,7 +1917,7 @@ static int imx_uart_poll_init(struct uart_port *port) imx_uart_writel(sport, ucr1 | UCR1_RRDYEN, UCR1); imx_uart_writel(sport, ucr2 | UCR2_ATEN, UCR2); @@ -4802,7 +4537,7 @@ index a5d0df2ba..267c9af4b 100644 return 0; } -@@ -2022,9 +2022,9 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count) +@@ -2037,9 +2037,9 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count) if (sport->port.sysrq) locked = 0; else if (oops_in_progress) @@ -4814,7 +4549,7 @@ index a5d0df2ba..267c9af4b 100644 /* * First, save UCR1/2/3 and then disable interrupts -@@ -2052,7 +2052,7 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count) +@@ -2067,7 +2067,7 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count) imx_uart_ucrs_restore(sport, &old_ucr); if (locked) @@ -4823,7 +4558,7 @@ index a5d0df2ba..267c9af4b 100644 } /* -@@ -2210,10 +2210,10 @@ static enum hrtimer_restart imx_trigger_start_tx(struct hrtimer *t) +@@ -2225,10 +2225,10 @@ static enum hrtimer_restart imx_trigger_start_tx(struct hrtimer *t) struct imx_port *sport = container_of(t, struct imx_port, trigger_start_tx); unsigned long flags; @@ -4836,7 +4571,7 @@ index a5d0df2ba..267c9af4b 100644 return HRTIMER_NORESTART; } -@@ -2223,10 +2223,10 @@ static enum hrtimer_restart imx_trigger_stop_tx(struct hrtimer *t) +@@ -2238,10 +2238,10 @@ static enum hrtimer_restart imx_trigger_stop_tx(struct hrtimer *t) struct imx_port *sport = container_of(t, struct imx_port, trigger_stop_tx); unsigned long flags; @@ -4849,7 +4584,7 @@ index a5d0df2ba..267c9af4b 100644 return HRTIMER_NORESTART; } -@@ -2493,9 +2493,9 @@ static void imx_uart_restore_context(struct imx_port *sport) +@@ -2508,9 +2508,9 @@ static void imx_uart_restore_context(struct imx_port *sport) { unsigned long flags; @@ -4861,7 +4596,7 @@ index a5d0df2ba..267c9af4b 100644 return; } -@@ -2510,7 +2510,7 @@ static void imx_uart_restore_context(struct imx_port *sport) +@@ -2525,7 +2525,7 @@ static void imx_uart_restore_context(struct imx_port *sport) imx_uart_writel(sport, sport->saved_reg[2], UCR3); imx_uart_writel(sport, sport->saved_reg[3], UCR4); sport->context_saved = false; @@ -4870,7 +4605,7 @@ index a5d0df2ba..267c9af4b 100644 } static void imx_uart_save_context(struct imx_port *sport) -@@ -2518,7 +2518,7 @@ static void imx_uart_save_context(struct imx_port *sport) +@@ -2533,7 +2533,7 @@ static void imx_uart_save_context(struct imx_port *sport) unsigned long flags; /* Save necessary regs */ @@ -4879,7 +4614,7 @@ index a5d0df2ba..267c9af4b 100644 sport->saved_reg[0] = imx_uart_readl(sport, UCR1); sport->saved_reg[1] = imx_uart_readl(sport, UCR2); sport->saved_reg[2] = imx_uart_readl(sport, UCR3); -@@ -2530,7 +2530,7 @@ static void imx_uart_save_context(struct imx_port *sport) +@@ -2545,7 +2545,7 @@ static void imx_uart_save_context(struct imx_port *sport) sport->saved_reg[8] = imx_uart_readl(sport, UBMR); sport->saved_reg[9] = imx_uart_readl(sport, IMX21_UTS); sport->context_saved = true; @@ -6757,10 +6492,10 @@ index 73c60f5ea..46e70e155 100644 clk_disable(up->clk); diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c -index f798ef3c4..b808c1768 100644 +index f820a09cb..a7db08431 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c -@@ -473,9 +473,9 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s, +@@ -492,9 +492,9 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s, uport = &port->uport; if (oops_in_progress) @@ -6772,7 +6507,7 @@ index f798ef3c4..b808c1768 100644 geni_status = readl(uport->membase + SE_GENI_STATUS); -@@ -511,7 +511,7 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s, +@@ -530,7 +530,7 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s, qcom_geni_serial_setup_tx(uport, port->tx_remaining); if (locked) @@ -6781,7 +6516,7 @@ index f798ef3c4..b808c1768 100644 } static void handle_rx_console(struct uart_port *uport, u32 bytes, bool drop) -@@ -963,7 +963,7 @@ static irqreturn_t qcom_geni_serial_isr(int isr, void *dev) +@@ -992,7 +992,7 @@ static irqreturn_t qcom_geni_serial_isr(int isr, void *dev) if (uport->suspended) return IRQ_NONE; @@ -7512,7 +7247,7 @@ index d4ec943cb..6d4006b41 100644 static const char *tegra_uart_type(struct uart_port *u) diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c -index 8ff0efac6..398104760 100644 +index 77ff27268..8c0b29ff9 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -79,7 +79,7 @@ static inline void uart_port_deref(struct uart_port *uport) @@ -8194,7 +7929,7 @@ index f793624fd..2559c9781 100644 #ifdef CONFIG_SERIAL_SH_SCI_DMA if (s->chan_rx_saved) { -@@ -2550,7 +2550,7 @@ done: +@@ -2550,7 +2550,7 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios, serial_port_out(port, SCCKS, sccks); } @@ -8203,7 +7938,7 @@ index f793624fd..2559c9781 100644 sci_reset(port); -@@ -2672,7 +2672,7 @@ done: +@@ -2672,7 +2672,7 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios, if ((termios->c_cflag & CREAD) != 0) sci_start_rx(port); @@ -9776,7 +9511,7 @@ index 2e5e86a00..9c13dac1d 100644 return uart_resume_port(cdns_uart->cdns_uart_driver, port); diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c -index 493fc4742..afa52883c 100644 +index 117abcf36..03e2eaf24 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -3543,8 +3543,15 @@ static ssize_t show_cons_active(struct device *dev, @@ -10114,7 +9849,7 @@ index 9aac2ab15..6b9c8a16e 100644 static inline struct task_struct *this_cpu_ksoftirqd(void) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h -index 98b58ae88..974816e66 100644 +index 70eec8a48..6b4f36bd3 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -3300,7 +3300,11 @@ struct softnet_data { @@ -10197,7 +9932,7 @@ index e4878bb58..ebebc32e7 100644 #ifdef CONFIG_SMP diff --git a/include/linux/sched.h b/include/linux/sched.h -index b8be76b0c..c4fe6d06d 100644 +index a694cc11d..1d6148e22 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -946,6 +946,9 @@ struct task_struct { @@ -10210,7 +9945,7 @@ index b8be76b0c..c4fe6d06d 100644 /* Bit to tell LSMs we're in execve(): */ unsigned in_execve:1; -@@ -1989,6 +1992,7 @@ static inline int dl_task_check_affinity(struct task_struct *p, const struct cpu +@@ -1992,6 +1995,7 @@ static inline int dl_task_check_affinity(struct task_struct *p, const struct cpu } #endif @@ -10218,7 +9953,7 @@ index b8be76b0c..c4fe6d06d 100644 extern int yield_to(struct task_struct *p, bool preempt); extern void set_user_nice(struct task_struct *p, long nice); extern int task_prio(const struct task_struct *p); -@@ -2140,17 +2144,17 @@ static inline void update_tsk_thread_flag(struct task_struct *tsk, int flag, +@@ -2143,17 +2147,17 @@ static inline void update_tsk_thread_flag(struct task_struct *tsk, int flag, update_ti_thread_flag(task_thread_info(tsk), flag, value); } @@ -10239,7 +9974,7 @@ index b8be76b0c..c4fe6d06d 100644 { return test_ti_thread_flag(task_thread_info(tsk), flag); } -@@ -2163,9 +2167,11 @@ static inline void set_tsk_need_resched(struct task_struct *tsk) +@@ -2166,9 +2170,11 @@ static inline void set_tsk_need_resched(struct task_struct *tsk) static inline void clear_tsk_need_resched(struct task_struct *tsk) { clear_tsk_thread_flag(tsk,TIF_NEED_RESCHED); @@ -10252,7 +9987,7 @@ index b8be76b0c..c4fe6d06d 100644 { return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED)); } -@@ -2346,7 +2352,7 @@ static inline int rwlock_needbreak(rwlock_t *lock) +@@ -2349,7 +2355,7 @@ static inline int rwlock_needbreak(rwlock_t *lock) static __always_inline bool need_resched(void) { @@ -10533,7 +10268,7 @@ index 74d9fe360..0be63993d 100644 #ifndef CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h -index 54ade3cea..c67dd30bc 100644 +index 3f10e29df..37bb8e247 100644 --- a/include/linux/trace_events.h +++ b/include/linux/trace_events.h @@ -179,8 +179,8 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status); @@ -10686,7 +10421,7 @@ index ce2889f12..d636a1bbd 100644 new_owner = top_waiter->task; /* -@@ -1002,6 +990,12 @@ retry_private: +@@ -1002,6 +990,12 @@ int futex_lock_pi(u32 __user *uaddr, unsigned int flags, ktime_t *time, int tryl goto no_block; } @@ -10699,7 +10434,7 @@ index ce2889f12..d636a1bbd 100644 rt_mutex_init_waiter(&rt_waiter); /* -@@ -1039,19 +1033,37 @@ retry_private: +@@ -1039,19 +1033,37 @@ int futex_lock_pi(u32 __user *uaddr, unsigned int flags, ktime_t *time, int tryl ret = rt_mutex_wait_proxy_lock(&q.pi_state->pi_mutex, to, &rt_waiter); cleanup: @@ -10743,7 +10478,7 @@ index ce2889f12..d636a1bbd 100644 no_block: /* * Fixup the pi_state owner and possibly acquire the lock if we -@@ -1132,6 +1144,7 @@ retry: +@@ -1132,6 +1144,7 @@ int futex_unlock_pi(u32 __user *uaddr, unsigned int flags) top_waiter = futex_top_waiter(hb, &key); if (top_waiter) { struct futex_pi_state *pi_state = top_waiter->pi_state; @@ -10751,7 +10486,7 @@ index ce2889f12..d636a1bbd 100644 ret = -EINVAL; if (!pi_state) -@@ -1144,22 +1157,39 @@ retry: +@@ -1144,22 +1157,39 @@ int futex_unlock_pi(u32 __user *uaddr, unsigned int flags) if (pi_state->owner != current) goto out_unlock; @@ -10797,7 +10532,7 @@ index ce2889f12..d636a1bbd 100644 put_pi_state(pi_state); -@@ -1187,6 +1217,7 @@ retry: +@@ -1187,6 +1217,7 @@ int futex_unlock_pi(u32 __user *uaddr, unsigned int flags) return ret; } @@ -12998,7 +12733,7 @@ index 000000000..b53d93585 +} +device_initcall(printk_init_ops); diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c -index b4e390e0b..615a2d094 100644 +index 8b04d0932..a760c46d3 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -102,12 +102,6 @@ DEFINE_STATIC_SRCU(console_srcu); @@ -13103,7 +12838,7 @@ index b4e390e0b..615a2d094 100644 /* * We cannot access per-CPU data (e.g. per-CPU flush irq_work) before -@@ -698,9 +742,6 @@ out: +@@ -698,9 +742,6 @@ static ssize_t msg_print_ext_body(char *buf, size_t size, return len; } @@ -13122,7 +12857,7 @@ index b4e390e0b..615a2d094 100644 { /* * Do not use spinning in panic(). The panic CPU wants to keep the lock. -@@ -1887,7 +1928,7 @@ lockdep: +@@ -1887,7 +1928,7 @@ static void console_lock_spinning_enable(void) * * Return: 1 if the lock rights were passed, 0 otherwise. */ @@ -13131,7 +12866,7 @@ index b4e390e0b..615a2d094 100644 { int waiter; -@@ -2305,54 +2346,123 @@ out: +@@ -2305,54 +2346,123 @@ int vprintk_store(int facility, int level, return ret; } @@ -13478,7 +13213,7 @@ index b4e390e0b..615a2d094 100644 /* Skip record that has level above the console loglevel. */ if (may_suppress && suppress_message_printing(r.info->level)) goto out; -@@ -2887,6 +2945,13 @@ out: +@@ -2887,6 +2945,13 @@ static bool printk_get_next_message(struct printk_message *pmsg, u64 seq, return true; } @@ -13492,7 +13227,7 @@ index b4e390e0b..615a2d094 100644 /* * Print one record for the given console. The record printed is whatever * record is the next available record for the given console. -@@ -2904,12 +2969,10 @@ out: +@@ -2904,12 +2969,10 @@ static bool printk_get_next_message(struct printk_message *pmsg, u64 seq, */ static bool console_emit_next_record(struct console *con, bool *handover, int cookie) { @@ -13634,7 +13369,7 @@ index b4e390e0b..615a2d094 100644 if (!progress) continue; -@@ -3038,19 +3145,7 @@ abandon: +@@ -3038,19 +3145,7 @@ static bool console_flush_all(bool do_cond_resched, u64 *next_seq, bool *handove return false; } @@ -14217,7 +13952,7 @@ index fde338606..e7b808b82 100644 return NULL; } -@@ -1441,20 +1457,118 @@ fail_reopen: +@@ -1441,20 +1457,118 @@ bool prb_reserve_in_last(struct prb_reserved_entry *e, struct printk_ringbuffer return false; } @@ -14835,7 +14570,7 @@ index 11a1fac3a..6f085a159 100644 static void print_cpu_stall(unsigned long gps) diff --git a/kernel/sched/core.c b/kernel/sched/core.c -index 7a9aff1db..dcf660b79 100644 +index de6dd807d..987b959aa 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -901,14 +901,15 @@ static inline void hrtick_rq_init(struct rq *rq) @@ -14969,7 +14704,7 @@ index 7a9aff1db..dcf660b79 100644 } static void sched_update_worker(struct task_struct *tsk) -@@ -6816,16 +6842,26 @@ static void sched_update_worker(struct task_struct *tsk) +@@ -6818,16 +6844,26 @@ static void sched_update_worker(struct task_struct *tsk) } } @@ -15001,7 +14736,7 @@ index 7a9aff1db..dcf660b79 100644 sched_update_worker(tsk); } EXPORT_SYMBOL(schedule); -@@ -6889,11 +6925,7 @@ void __sched schedule_preempt_disabled(void) +@@ -6891,11 +6927,7 @@ void __sched schedule_preempt_disabled(void) #ifdef CONFIG_PREEMPT_RT void __sched notrace schedule_rtlock(void) { @@ -15014,7 +14749,7 @@ index 7a9aff1db..dcf660b79 100644 } NOKPROBE_SYMBOL(schedule_rtlock); #endif -@@ -7089,6 +7121,32 @@ static void __setscheduler_prio(struct task_struct *p, int prio) +@@ -7091,6 +7123,32 @@ static void __setscheduler_prio(struct task_struct *p, int prio) #ifdef CONFIG_RT_MUTEXES @@ -15047,7 +14782,7 @@ index 7a9aff1db..dcf660b79 100644 static inline int __rt_effective_prio(struct task_struct *pi_task, int prio) { if (pi_task) -@@ -8951,6 +9009,21 @@ static inline void preempt_dynamic_init(void) { } +@@ -8953,6 +9011,21 @@ static inline void preempt_dynamic_init(void) { } #endif /* #ifdef CONFIG_PREEMPT_DYNAMIC */ @@ -15107,10 +14842,10 @@ index 8b3063398..76530c8b3 100644 } late_initcall(sched_init_debug); diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c -index d5ae744de..51cc50a7e 100644 +index c9a4ea466..de39191ea 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c -@@ -1154,8 +1154,10 @@ static void clear_buddies(struct cfs_rq *cfs_rq, struct sched_entity *se); +@@ -1170,8 +1170,10 @@ static void clear_buddies(struct cfs_rq *cfs_rq, struct sched_entity *se); * XXX: strictly: vd_i += N*r_i/w_i such that: vd_i > ve_i * this is probably good enough. */ @@ -15122,7 +14857,7 @@ index d5ae744de..51cc50a7e 100644 if ((s64)(se->vruntime - se->deadline) < 0) return; -@@ -1174,10 +1176,19 @@ static void update_deadline(struct cfs_rq *cfs_rq, struct sched_entity *se) +@@ -1190,10 +1192,19 @@ static void update_deadline(struct cfs_rq *cfs_rq, struct sched_entity *se) /* * The task has consumed its request, reschedule. */ @@ -15145,7 +14880,7 @@ index d5ae744de..51cc50a7e 100644 } #include "pelt.h" -@@ -1285,7 +1296,7 @@ static void update_tg_load_avg(struct cfs_rq *cfs_rq) +@@ -1301,7 +1312,7 @@ static void update_tg_load_avg(struct cfs_rq *cfs_rq) /* * Update the current task's runtime statistics. */ @@ -15154,7 +14889,7 @@ index d5ae744de..51cc50a7e 100644 { struct sched_entity *curr = cfs_rq->curr; u64 now = rq_clock_task(rq_of(cfs_rq)); -@@ -1312,7 +1323,7 @@ static void update_curr(struct cfs_rq *cfs_rq) +@@ -1328,7 +1339,7 @@ static void update_curr(struct cfs_rq *cfs_rq) schedstat_add(cfs_rq->exec_clock, delta_exec); curr->vruntime += calc_delta_fair(delta_exec, curr); @@ -15163,7 +14898,7 @@ index d5ae744de..51cc50a7e 100644 update_min_vruntime(cfs_rq); if (entity_is_task(curr)) { -@@ -1326,6 +1337,11 @@ static void update_curr(struct cfs_rq *cfs_rq) +@@ -1342,6 +1353,11 @@ static void update_curr(struct cfs_rq *cfs_rq) account_cfs_rq_runtime(cfs_rq, delta_exec); } @@ -15175,7 +14910,7 @@ index d5ae744de..51cc50a7e 100644 static void update_curr_fair(struct rq *rq) { update_curr(cfs_rq_of(&rq->curr->se)); -@@ -5629,7 +5645,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) +@@ -5656,7 +5672,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) /* * Update run-time statistics of the 'current'. */ @@ -15184,7 +14919,7 @@ index d5ae744de..51cc50a7e 100644 /* * Ensure that runnable average is periodically updated. -@@ -5643,7 +5659,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) +@@ -5670,7 +5686,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) * validating it and just reschedule. */ if (queued) { @@ -15193,7 +14928,7 @@ index d5ae744de..51cc50a7e 100644 return; } /* -@@ -5789,7 +5805,7 @@ static void __account_cfs_rq_runtime(struct cfs_rq *cfs_rq, u64 delta_exec) +@@ -5816,7 +5832,7 @@ static void __account_cfs_rq_runtime(struct cfs_rq *cfs_rq, u64 delta_exec) * hierarchy can be throttled */ if (!assign_cfs_rq_runtime(cfs_rq) && likely(cfs_rq->curr)) @@ -15202,7 +14937,7 @@ index d5ae744de..51cc50a7e 100644 } static __always_inline -@@ -6088,7 +6104,7 @@ unthrottle_throttle: +@@ -6115,7 +6131,7 @@ void unthrottle_cfs_rq(struct cfs_rq *cfs_rq) /* Determine whether we need to wake up potentially idle CPU: */ if (rq->curr == rq->idle && rq->cfs.nr_running) @@ -15211,7 +14946,7 @@ index d5ae744de..51cc50a7e 100644 } #ifdef CONFIG_SMP -@@ -7333,7 +7349,7 @@ static void hrtick_start_fair(struct rq *rq, struct task_struct *p) +@@ -7357,7 +7373,7 @@ static void hrtick_start_fair(struct rq *rq, struct task_struct *p) if (delta < 0) { if (task_current(rq, p)) @@ -15220,7 +14955,7 @@ index d5ae744de..51cc50a7e 100644 return; } hrtick_start(rq, delta); -@@ -9314,7 +9330,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ +@@ -9341,7 +9357,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ * prevents us from potentially nominating it as a false LAST_BUDDY * below. */ @@ -15229,7 +14964,7 @@ index d5ae744de..51cc50a7e 100644 return; if (!sched_feat(WAKEUP_PREEMPTION)) -@@ -9356,7 +9372,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ +@@ -9384,7 +9400,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ return; preempt: @@ -15238,7 +14973,7 @@ index d5ae744de..51cc50a7e 100644 } #ifdef CONFIG_QOS_SCHED -@@ -9839,8 +9855,7 @@ static bool _qos_smt_check_need_resched(int this_cpu, struct rq *rq) +@@ -9873,8 +9889,7 @@ static bool _qos_smt_check_need_resched(int this_cpu, struct rq *rq) /* * There are two cases rely on the set need_resched to drive away @@ -15248,7 +14983,7 @@ index d5ae744de..51cc50a7e 100644 * b) The qos_smt_status of siblings cpu is offline, the task of curr cpu is idle, * and current cpu only has SCHED_IDLE tasks enqueued. */ -@@ -14214,7 +14229,7 @@ static inline void task_tick_core(struct rq *rq, struct task_struct *curr) +@@ -14248,7 +14263,7 @@ static inline void task_tick_core(struct rq *rq, struct task_struct *curr) */ if (rq->core->core_forceidle_count && rq->cfs.nr_running == 1 && __entity_slice_used(&curr->se, MIN_NR_TASKS_DURING_FORCEIDLE)) @@ -15257,7 +14992,7 @@ index d5ae744de..51cc50a7e 100644 } /* -@@ -14530,7 +14545,7 @@ prio_changed_fair(struct rq *rq, struct task_struct *p, int oldprio) +@@ -14564,7 +14579,7 @@ prio_changed_fair(struct rq *rq, struct task_struct *p, int oldprio) */ if (task_current(rq, p)) { if (p->prio > oldprio) @@ -15323,10 +15058,10 @@ index 761870540..f9918a975 100644 extern struct rt_bandwidth def_rt_bandwidth; diff --git a/kernel/signal.c b/kernel/signal.c -index f36c58ea7..0f2615143 100644 +index c73873d67..aef5dcf43 100644 --- a/kernel/signal.c +++ b/kernel/signal.c -@@ -2332,15 +2332,35 @@ static int ptrace_stop(int exit_code, int why, unsigned long message, +@@ -2334,15 +2334,35 @@ static int ptrace_stop(int exit_code, int why, unsigned long message, do_notify_parent_cldstop(current, false, why); /* @@ -15368,10 +15103,10 @@ index f36c58ea7..0f2615143 100644 cgroup_leave_frozen(true); diff --git a/kernel/softirq.c b/kernel/softirq.c -index bd9716d7b..2fde8af88 100644 +index cd8770b2f..10099e684 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c -@@ -247,6 +247,19 @@ out: +@@ -247,6 +247,19 @@ void __local_bh_enable_ip(unsigned long ip, unsigned int cnt) } EXPORT_SYMBOL(__local_bh_enable_ip); @@ -15427,7 +15162,7 @@ index bd9716d7b..2fde8af88 100644 tick_irq_exit(); } -@@ -967,12 +1002,70 @@ static struct smp_hotplug_thread softirq_threads = { +@@ -1014,12 +1049,70 @@ static struct smp_hotplug_thread softirq_threads = { .thread_comm = "ksoftirqd/%u", }; @@ -15503,7 +15238,7 @@ diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 57e5cb36f..c4ae45701 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c -@@ -1812,7 +1812,7 @@ retry: +@@ -1812,7 +1812,7 @@ void hrtimer_interrupt(struct clock_event_device *dev) if (!ktime_before(now, cpu_base->softirq_expires_next)) { cpu_base->softirq_expires_next = KTIME_MAX; cpu_base->softirq_activated = 1; @@ -15566,10 +15301,10 @@ index 63a8ce717..b3fbe97d1 100644 /* diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c -index 8f92edf15..b2bdd1863 100644 +index 2412c0a46..939d67174 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c -@@ -2708,6 +2708,8 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status) +@@ -2706,6 +2706,8 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status) if (tif_need_resched()) trace_flags |= TRACE_FLAG_NEED_RESCHED; @@ -15579,10 +15314,10 @@ index 8f92edf15..b2bdd1863 100644 trace_flags |= TRACE_FLAG_PREEMPT_RESCHED; return (trace_flags << 16) | (min_t(unsigned int, pc & 0xff, 0xf)) | diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c -index 3b7d3e9eb..5a4fefbc0 100644 +index 2b948d35f..959f09ab8 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c -@@ -460,17 +460,29 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry) +@@ -464,17 +464,29 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry) (entry->flags & TRACE_FLAG_IRQS_OFF && bh_off) ? 'D' : (entry->flags & TRACE_FLAG_IRQS_OFF) ? 'd' : bh_off ? 'b' : @@ -15615,10 +15350,10 @@ index 3b7d3e9eb..5a4fefbc0 100644 need_resched = 'p'; break; diff --git a/net/core/dev.c b/net/core/dev.c -index 540ab980e..8bbcd7283 100644 +index 75e94b327..5d021cc1f 100644 --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4715,15 +4715,6 @@ static void rps_trigger_softirq(void *data) +@@ -4723,15 +4723,6 @@ static void rps_trigger_softirq(void *data) #endif /* CONFIG_RPS */ @@ -15634,7 +15369,7 @@ index 540ab980e..8bbcd7283 100644 /* * After we queued a packet into sd->input_pkt_queue, * we need to make sure this queue is serviced soon. -@@ -6692,6 +6683,32 @@ static void skb_defer_free_flush(struct softnet_data *sd) +@@ -6711,6 +6702,32 @@ static void skb_defer_free_flush(struct softnet_data *sd) } } @@ -15667,7 +15402,7 @@ index 540ab980e..8bbcd7283 100644 static int napi_threaded_poll(void *data) { struct napi_struct *napi = data; -@@ -11629,7 +11646,11 @@ static int __init net_dev_init(void) +@@ -11648,7 +11665,11 @@ static int __init net_dev_init(void) INIT_CSD(&sd->csd, rps_trigger_softirq, sd); sd->cpu = i; #endif @@ -15680,10 +15415,10 @@ index 540ab980e..8bbcd7283 100644 init_gro_hash(&sd->backlog); diff --git a/net/core/skbuff.c b/net/core/skbuff.c -index f0a9ef1ae..682175af4 100644 +index a9efd6fb2..ce127b20d 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c -@@ -6863,8 +6863,13 @@ nodefer: __kfree_skb(skb); +@@ -6865,8 +6865,13 @@ nodefer: __kfree_skb(skb); /* Make sure to trigger NET_RX_SOFTIRQ on the remote CPU * if we are unlucky enough (this seems very unlikely). */