From d48acff6d623914b204dfb8f82d0050786014c37 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 16 Dec 2024 15:51:09 +0800 Subject: [PATCH] kernel-rt:update to 6.6.0-64.0.0.rt30.5 && rpi-rt update to 6.6.0-64.0.0.rt.2 --- 0001-raspberrypi-kernel-RT.patch | 526 ++++++------- _multibuild | 1 + kernel-rt.spec | 7 +- patch-6.6.0-6.0.0-rt20.patch | 692 +++++++++--------- ...6.0.0-rt20.patch-openeuler_defconfig.patch | 22 +- raspberrypi-kernel-rt.spec | 203 ++--- 6 files changed, 751 insertions(+), 700 deletions(-) diff --git a/0001-raspberrypi-kernel-RT.patch b/0001-raspberrypi-kernel-RT.patch index db2a1ba..fa1cffa 100644 --- a/0001-raspberrypi-kernel-RT.patch +++ b/0001-raspberrypi-kernel-RT.patch @@ -1,7 +1,7 @@ -From a8b87098c93aa630d286de4af9637a247d55a370 Mon Sep 17 00:00:00 2001 +From 1dd24e3cb6227ce71015d651d5eff0ea7a38b79f Mon Sep 17 00:00:00 2001 From: zhangyu -Date: Fri, 17 May 2024 15:06:01 +0800 -Subject: [PATCH] rpi-rt +Date: Tue, 12 Nov 2024 16:08:21 +0800 +Subject: [PATCH] rpi-rt1 --- arch/arm/Kconfig | 6 +- @@ -32,7 +32,7 @@ Subject: [PATCH] rpi-rt drivers/gpu/drm/i915/Kconfig | 1 - drivers/gpu/drm/i915/display/intel_crtc.c | 15 +- drivers/gpu/drm/i915/display/intel_vblank.c | 6 +- - drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 5 +- + drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 7 +- .../drm/i915/gt/intel_execlists_submission.c | 17 +- drivers/gpu/drm/i915/gt/intel_reset.c | 12 +- drivers/gpu/drm/i915/gt/uc/intel_guc.h | 2 +- @@ -168,11 +168,11 @@ Subject: [PATCH] rpi-rt kernel/trace/trace_output.c | 16 +- net/core/dev.c | 39 +- net/core/skbuff.c | 7 +- - 164 files changed, 5041 insertions(+), 1542 deletions(-) + 164 files changed, 5045 insertions(+), 1540 deletions(-) create mode 100644 kernel/printk/nbcon.c diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index 2483ce304..52707a682 100644 +index 749935e2e..46910150c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -34,6 +34,7 @@ config ARM @@ -433,10 +433,10 @@ index a1ff693e4..adcc34042 100644 EXPORT_SYMBOL(kernel_neon_end); diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig -index bb49f48de..699c3f58a 100644 +index 21ae67351..f45c46671 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig -@@ -98,6 +98,7 @@ config ARM64 +@@ -99,6 +99,7 @@ config ARM64 select ARCH_SUPPORTS_NUMA_BALANCING select ARCH_SUPPORTS_PAGE_TABLE_CHECK select ARCH_SUPPORTS_PER_VMA_LOCK @@ -531,7 +531,7 @@ index 4ebf2ef28..381c3be3b 100644 select MPIC select OF_DYNAMIC diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c -index e8c412969..c61e29dea 100644 +index b1e6d275c..9a8d3970d 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c @@ -25,6 +25,7 @@ @@ -626,10 +626,10 @@ index e8c412969..c61e29dea 100644 } diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig -index bb40f2eae..63cdc5c2f 100644 +index 3be10e723..2a848e2c0 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig -@@ -48,6 +48,7 @@ config RISCV +@@ -49,6 +49,7 @@ config RISCV select ARCH_SUPPORTS_HUGETLBFS if MMU select ARCH_SUPPORTS_PAGE_TABLE_CHECK if MMU select ARCH_SUPPORTS_PER_VMA_LOCK if MMU @@ -637,7 +637,7 @@ index bb40f2eae..63cdc5c2f 100644 select ARCH_USE_MEMTEST select ARCH_USE_QUEUED_RWLOCKS select ARCH_USES_CFI_TRAPS if CFI_CLANG -@@ -136,6 +137,7 @@ config RISCV +@@ -137,6 +138,7 @@ config RISCV select HAVE_PERF_USER_STACK_DUMP select HAVE_POSIX_CPU_TIMERS_TASK_WORK select HAVE_PREEMPT_DYNAMIC_KEY if !XIP_KERNEL @@ -657,10 +657,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 d18ce0113..e18710fe5 100644 +index 4fb84c2e9..61d990f69 100644 --- a/arch/riscv/include/asm/thread_info.h +++ b/arch/riscv/include/asm/thread_info.h -@@ -82,6 +82,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); +@@ -87,6 +87,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) */ @@ -668,7 +668,7 @@ index d18ce0113..e18710fe5 100644 #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ #define TIF_SIGPENDING 2 /* signal pending */ #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ -@@ -96,6 +97,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); +@@ -101,6 +102,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) @@ -838,10 +838,10 @@ index 1b8da4e40..2cb5e6514 100644 if (has_vector()) { if (riscv_v_setup_vsize()) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig -index a993a3716..aa7ab6207 100644 +index 958a491fb..acb9d6f2a 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig -@@ -121,6 +121,7 @@ config X86 +@@ -122,6 +122,7 @@ config X86 select ARCH_USES_CFI_TRAPS if X86_64 && CFI_CLANG select ARCH_SUPPORTS_LTO_CLANG select ARCH_SUPPORTS_LTO_CLANG_THIN @@ -849,7 +849,7 @@ index a993a3716..aa7ab6207 100644 select ARCH_USE_BUILTIN_BSWAP select ARCH_USE_MEMTEST select ARCH_USE_QUEUED_RWLOCKS -@@ -277,6 +278,7 @@ config X86 +@@ -278,6 +279,7 @@ config X86 select HAVE_STATIC_CALL select HAVE_STATIC_CALL_INLINE if HAVE_OBJTOOL select HAVE_PREEMPT_DYNAMIC_CALL @@ -882,10 +882,10 @@ 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 bd6a7857c..d45dfd10b 100644 +index 831fa4a12..5af3ebec0 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c -@@ -108,7 +108,7 @@ static const struct dmi_system_id processor_power_dmi_table[] = { +@@ -107,7 +107,7 @@ static const struct dmi_system_id processor_power_dmi_table[] = { */ static void __cpuidle acpi_safe_halt(void) { @@ -895,7 +895,7 @@ index bd6a7857c..d45dfd10b 100644 raw_local_irq_disable(); } diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c -index d77d3664c..d083a5dfb 100644 +index 1ffc53ff5..2594265e0 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); @@ -1073,7 +1073,7 @@ 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 d587f807d..5036a3e60 100644 +index 94bf438c7..ef401cc81 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, @@ -1325,24 +1325,25 @@ index f5659ebd0..5b6d2f555 100644 spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags); diff --git a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c -index ecc990ec1..8d04b1068 100644 +index f2973cd1a..aa77f8601 100644 --- a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c +++ b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c -@@ -312,10 +312,9 @@ void __intel_breadcrumbs_park(struct intel_breadcrumbs *b) +@@ -315,7 +315,12 @@ void __intel_breadcrumbs_park(struct intel_breadcrumbs *b) + return; + /* Kick the work once more to drain the signalers, and disarm the irq */ - irq_work_sync(&b->irq_work); - while (READ_ONCE(b->irq_armed) && !atomic_read(&b->active)) { -- local_irq_disable(); -- signal_irq_work(&b->irq_work); -- local_irq_enable(); +- irq_work_queue(&b->irq_work); ++ irq_work_sync(&b->irq_work); ++ while (READ_ONCE(b->irq_armed) && !atomic_read(&b->active)) { + irq_work_queue(&b->irq_work); - cond_resched(); ++ cond_resched(); + irq_work_sync(&b->irq_work); - } ++ } } + void intel_breadcrumbs_free(struct kref *kref) diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c -index 42e09f158..ac80e229f 100644 +index 2065be5a1..73d815fc5 100644 --- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c +++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c @@ -1303,7 +1303,7 @@ static void execlists_dequeue(struct intel_engine_cs *engine) @@ -1596,7 +1597,7 @@ index 4a9e71b2d..021949f25 100644 lsr = serial_port_in(port, UART_LSR); diff --git a/drivers/tty/serial/8250/8250_bcm7271.c b/drivers/tty/serial/8250/8250_bcm7271.c -index aa5aff046..ff0662c68 100644 +index 9afd5979c..db23b3a02 100644 --- a/drivers/tty/serial/8250/8250_bcm7271.c +++ b/drivers/tty/serial/8250/8250_bcm7271.c @@ -567,7 +567,7 @@ static irqreturn_t brcmuart_isr(int irq, void *dev_id) @@ -1648,7 +1649,7 @@ index aa5aff046..ff0662c68 100644 serial8250_do_shutdown(port); } -@@ -788,7 +788,7 @@ static int brcmuart_handle_irq(struct uart_port *p) +@@ -807,7 +807,7 @@ static int brcmuart_handle_irq(struct uart_port *p) * interrupt but there is no data ready. */ if (((iir & UART_IIR_ID) == UART_IIR_RX_TIMEOUT) && !(priv->shutdown)) { @@ -1657,7 +1658,7 @@ index aa5aff046..ff0662c68 100644 status = serial_port_in(p, UART_LSR); if ((status & UART_LSR_DR) == 0) { -@@ -813,7 +813,7 @@ static int brcmuart_handle_irq(struct uart_port *p) +@@ -832,7 +832,7 @@ static int brcmuart_handle_irq(struct uart_port *p) handled = 1; } @@ -1666,7 +1667,7 @@ index aa5aff046..ff0662c68 100644 if (handled) return 1; } -@@ -831,7 +831,7 @@ static enum hrtimer_restart brcmuart_hrtimer_func(struct hrtimer *t) +@@ -850,7 +850,7 @@ static enum hrtimer_restart brcmuart_hrtimer_func(struct hrtimer *t) if (priv->shutdown) return HRTIMER_NORESTART; @@ -1675,7 +1676,7 @@ index aa5aff046..ff0662c68 100644 status = serial_port_in(p, UART_LSR); /* -@@ -855,7 +855,7 @@ static enum hrtimer_restart brcmuart_hrtimer_func(struct hrtimer *t) +@@ -874,7 +874,7 @@ static enum hrtimer_restart brcmuart_hrtimer_func(struct hrtimer *t) status |= UART_MCR_RTS; serial_port_out(p, UART_MCR, status); } @@ -1684,7 +1685,7 @@ index aa5aff046..ff0662c68 100644 return HRTIMER_NORESTART; } -@@ -1154,10 +1154,10 @@ static int __maybe_unused brcmuart_suspend(struct device *dev) +@@ -1173,10 +1173,10 @@ static int __maybe_unused brcmuart_suspend(struct device *dev) * This will prevent resume from enabling RTS before the * baud rate has been restored. */ @@ -1697,7 +1698,7 @@ index aa5aff046..ff0662c68 100644 serial8250_suspend_port(priv->line); clk_disable_unprepare(priv->baud_mux_clk); -@@ -1196,10 +1196,10 @@ static int __maybe_unused brcmuart_resume(struct device *dev) +@@ -1215,10 +1215,10 @@ static int __maybe_unused brcmuart_resume(struct device *dev) if (priv->saved_mctrl & TIOCM_RTS) { /* Restore RTS */ @@ -1896,10 +1897,10 @@ index a1f2259cc..53c284bb2 100644 if (status & (UART_LSR_DR | UART_LSR_BI)) { dw8250_writel_ext(p, RZN1_UART_RDMACR, 0); diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c -index 4d20f3aa2..342786064 100644 +index 27430fdd9..17be6ad24 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c -@@ -201,9 +201,9 @@ static int xr17v35x_startup(struct uart_port *port) +@@ -243,9 +243,9 @@ static int xr17v35x_startup(struct uart_port *port) * * Synchronize UART_IER access against the console. */ @@ -1939,7 +1940,7 @@ index 6af4e1c12..f522eb502 100644 } diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c -index 74da5676c..23457daae 100644 +index 28f9a2679..33699e86e 100644 --- a/drivers/tty/serial/8250/8250_mtk.c +++ b/drivers/tty/serial/8250/8250_mtk.c @@ -102,7 +102,7 @@ static void mtk8250_dma_rx_complete(void *param) @@ -1960,7 +1961,7 @@ index 74da5676c..23457daae 100644 } static void mtk8250_rx_dma(struct uart_8250_port *up) -@@ -368,7 +368,7 @@ mtk8250_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -372,7 +372,7 @@ mtk8250_set_termios(struct uart_port *port, struct ktermios *termios, * Ok, we're now changing the port state. Do it with * interrupts disabled. */ @@ -1969,7 +1970,7 @@ index 74da5676c..23457daae 100644 /* * Update the per-port timeout. -@@ -416,7 +416,7 @@ mtk8250_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -420,7 +420,7 @@ mtk8250_set_termios(struct uart_port *port, struct ktermios *termios, if (uart_console(port)) up->port.cons->cflag = termios->c_cflag; @@ -1979,10 +1980,10 @@ index 74da5676c..23457daae 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 346167afe..db5519ce0 100644 +index 4caecc352..d732ad6a7 100644 --- a/drivers/tty/serial/8250/8250_omap.c +++ b/drivers/tty/serial/8250/8250_omap.c -@@ -401,7 +401,7 @@ static void omap_8250_set_termios(struct uart_port *port, +@@ -405,7 +405,7 @@ static void omap_8250_set_termios(struct uart_port *port, * interrupts disabled. */ pm_runtime_get_sync(port->dev); @@ -1991,7 +1992,7 @@ index 346167afe..db5519ce0 100644 /* * Update the per-port timeout. -@@ -504,7 +504,7 @@ static void omap_8250_set_termios(struct uart_port *port, +@@ -508,7 +508,7 @@ static void omap_8250_set_termios(struct uart_port *port, } omap8250_restore_regs(up); @@ -2000,7 +2001,7 @@ index 346167afe..db5519ce0 100644 pm_runtime_mark_last_busy(port->dev); pm_runtime_put_autosuspend(port->dev); -@@ -529,7 +529,7 @@ static void omap_8250_pm(struct uart_port *port, unsigned int state, +@@ -533,7 +533,7 @@ static void omap_8250_pm(struct uart_port *port, unsigned int state, pm_runtime_get_sync(port->dev); /* Synchronize UART_IER access against the console. */ @@ -2009,7 +2010,7 @@ index 346167afe..db5519ce0 100644 serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B); efr = serial_in(up, UART_EFR); -@@ -541,7 +541,7 @@ static void omap_8250_pm(struct uart_port *port, unsigned int state, +@@ -545,7 +545,7 @@ static void omap_8250_pm(struct uart_port *port, unsigned int state, serial_out(up, UART_EFR, efr); serial_out(up, UART_LCR, 0); @@ -2018,7 +2019,7 @@ index 346167afe..db5519ce0 100644 pm_runtime_mark_last_busy(port->dev); pm_runtime_put_autosuspend(port->dev); -@@ -660,7 +660,7 @@ static irqreturn_t omap8250_irq(int irq, void *dev_id) +@@ -676,7 +676,7 @@ static irqreturn_t omap8250_irq(int irq, void *dev_id) unsigned long delay; /* Synchronize UART_IER access against the console. */ @@ -2027,7 +2028,7 @@ index 346167afe..db5519ce0 100644 up->ier = port->serial_in(port, UART_IER); if (up->ier & (UART_IER_RLSI | UART_IER_RDI)) { port->ops->stop_rx(port); -@@ -670,7 +670,7 @@ static irqreturn_t omap8250_irq(int irq, void *dev_id) +@@ -686,7 +686,7 @@ static irqreturn_t omap8250_irq(int irq, void *dev_id) */ cancel_delayed_work(&up->overrun_backoff); } @@ -2036,7 +2037,7 @@ index 346167afe..db5519ce0 100644 delay = msecs_to_jiffies(up->overrun_backoff_time_ms); schedule_delayed_work(&up->overrun_backoff, delay); -@@ -717,10 +717,10 @@ static int omap_8250_startup(struct uart_port *port) +@@ -733,10 +733,10 @@ static int omap_8250_startup(struct uart_port *port) } /* Synchronize UART_IER access against the console. */ @@ -2049,7 +2050,7 @@ index 346167afe..db5519ce0 100644 #ifdef CONFIG_PM up->capabilities |= UART_CAP_RPM; -@@ -733,9 +733,9 @@ static int omap_8250_startup(struct uart_port *port) +@@ -749,9 +749,9 @@ static int omap_8250_startup(struct uart_port *port) serial_out(up, UART_OMAP_WER, priv->wer); if (up->dma && !(priv->habit & UART_HAS_EFR2)) { @@ -2061,7 +2062,7 @@ index 346167afe..db5519ce0 100644 } enable_irq(up->port.irq); -@@ -761,10 +761,10 @@ static void omap_8250_shutdown(struct uart_port *port) +@@ -777,10 +777,10 @@ static void omap_8250_shutdown(struct uart_port *port) serial_out(up, UART_OMAP_EFR2, 0x0); /* Synchronize UART_IER access against the console. */ @@ -2074,7 +2075,7 @@ index 346167afe..db5519ce0 100644 disable_irq_nosync(up->port.irq); dev_pm_clear_wake_irq(port->dev); -@@ -789,10 +789,10 @@ static void omap_8250_throttle(struct uart_port *port) +@@ -805,10 +805,10 @@ static void omap_8250_throttle(struct uart_port *port) pm_runtime_get_sync(port->dev); @@ -2087,7 +2088,7 @@ index 346167afe..db5519ce0 100644 pm_runtime_mark_last_busy(port->dev); pm_runtime_put_autosuspend(port->dev); -@@ -807,14 +807,14 @@ static void omap_8250_unthrottle(struct uart_port *port) +@@ -823,14 +823,14 @@ static void omap_8250_unthrottle(struct uart_port *port) pm_runtime_get_sync(port->dev); /* Synchronize UART_IER access against the console. */ @@ -2104,7 +2105,7 @@ index 346167afe..db5519ce0 100644 pm_runtime_mark_last_busy(port->dev); pm_runtime_put_autosuspend(port->dev); -@@ -958,7 +958,7 @@ static void __dma_rx_complete(void *param) +@@ -974,7 +974,7 @@ static void __dma_rx_complete(void *param) unsigned long flags; /* Synchronize UART_IER access against the console. */ @@ -2113,7 +2114,7 @@ index 346167afe..db5519ce0 100644 /* * If the tx status is not DMA_COMPLETE, then this is a delayed -@@ -967,7 +967,7 @@ static void __dma_rx_complete(void *param) +@@ -983,7 +983,7 @@ static void __dma_rx_complete(void *param) */ if (dmaengine_tx_status(dma->rxchan, dma->rx_cookie, &state) != DMA_COMPLETE) { @@ -2122,7 +2123,7 @@ index 346167afe..db5519ce0 100644 return; } __dma_rx_do_complete(p); -@@ -978,7 +978,7 @@ static void __dma_rx_complete(void *param) +@@ -994,7 +994,7 @@ static void __dma_rx_complete(void *param) omap_8250_rx_dma(p); } @@ -2131,7 +2132,7 @@ index 346167afe..db5519ce0 100644 } static void omap_8250_rx_dma_flush(struct uart_8250_port *p) -@@ -1083,7 +1083,7 @@ static void omap_8250_dma_tx_complete(void *param) +@@ -1099,7 +1099,7 @@ static void omap_8250_dma_tx_complete(void *param) dma_sync_single_for_cpu(dma->txchan->device->dev, dma->tx_addr, UART_XMIT_SIZE, DMA_TO_DEVICE); @@ -2140,7 +2141,7 @@ index 346167afe..db5519ce0 100644 dma->tx_running = 0; -@@ -1112,7 +1112,7 @@ static void omap_8250_dma_tx_complete(void *param) +@@ -1128,7 +1128,7 @@ static void omap_8250_dma_tx_complete(void *param) serial8250_set_THRI(p); } @@ -2149,7 +2150,7 @@ index 346167afe..db5519ce0 100644 } static int omap_8250_tx_dma(struct uart_8250_port *p) -@@ -1278,7 +1278,7 @@ static int omap_8250_dma_handle_irq(struct uart_port *port) +@@ -1294,7 +1294,7 @@ static int omap_8250_dma_handle_irq(struct uart_port *port) return IRQ_HANDLED; } @@ -2158,7 +2159,7 @@ index 346167afe..db5519ce0 100644 status = serial_port_in(port, UART_LSR); -@@ -1758,15 +1758,15 @@ static int omap8250_runtime_resume(struct device *dev) +@@ -1774,15 +1774,15 @@ static int omap8250_runtime_resume(struct device *dev) up = serial8250_get_port(priv->line); if (up && omap8250_lost_context(up)) { @@ -3052,7 +3053,7 @@ index b5a7404cb..eabbf8afc 100644 } } diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c -index a5717655b..901928dba 100644 +index 39fd89e8e..80ed063bd 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -361,9 +361,9 @@ static int pl011_fifo_to_tty(struct uart_amba_port *uap) @@ -3067,7 +3068,7 @@ index a5717655b..901928dba 100644 if (!sysrq) uart_insert_char(&uap->port, ch, UART011_DR_OE, ch, flag); -@@ -558,7 +558,7 @@ static void pl011_dma_tx_callback(void *data) +@@ -564,7 +564,7 @@ static void pl011_dma_tx_callback(void *data) unsigned long flags; u16 dmacr; @@ -3076,7 +3077,7 @@ index a5717655b..901928dba 100644 if (uap->dmatx.queued) dma_unmap_single(dmatx->chan->device->dev, dmatx->dma, dmatx->len, DMA_TO_DEVICE); -@@ -579,7 +579,7 @@ static void pl011_dma_tx_callback(void *data) +@@ -585,7 +585,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; @@ -3085,7 +3086,7 @@ index a5717655b..901928dba 100644 return; } -@@ -590,7 +590,7 @@ static void pl011_dma_tx_callback(void *data) +@@ -596,7 +596,7 @@ static void pl011_dma_tx_callback(void *data) */ pl011_start_tx_pio(uap); @@ -3094,7 +3095,7 @@ index a5717655b..901928dba 100644 } /* -@@ -1018,7 +1018,7 @@ static void pl011_dma_rx_callback(void *data) +@@ -1024,7 +1024,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. */ @@ -3103,7 +3104,7 @@ index a5717655b..901928dba 100644 /* * Rx data can be taken by the UART interrupts during * the DMA irq handler. So we check the residue here. -@@ -1034,7 +1034,7 @@ static void pl011_dma_rx_callback(void *data) +@@ -1040,7 +1040,7 @@ static void pl011_dma_rx_callback(void *data) ret = pl011_dma_rx_trigger_dma(uap); pl011_dma_rx_chars(uap, pending, lastbuf, false); @@ -3112,7 +3113,7 @@ index a5717655b..901928dba 100644 /* * Do this check after we picked the DMA chars so we don't * get some IRQ immediately from RX. -@@ -1100,11 +1100,11 @@ static void pl011_dma_rx_poll(struct timer_list *t) +@@ -1106,11 +1106,11 @@ static void pl011_dma_rx_poll(struct timer_list *t) if (jiffies_to_msecs(jiffies - dmarx->last_jiffies) > uap->dmarx.poll_timeout) { @@ -3126,7 +3127,7 @@ index a5717655b..901928dba 100644 uap->dmarx.running = false; dmaengine_terminate_all(rxchan); -@@ -1200,10 +1200,10 @@ static void pl011_dma_shutdown(struct uart_amba_port *uap) +@@ -1206,10 +1206,10 @@ static void pl011_dma_shutdown(struct uart_amba_port *uap) while (pl011_read(uap, REG_FR) & uap->vendor->fr_busy) cpu_relax(); @@ -3139,7 +3140,7 @@ index a5717655b..901928dba 100644 if (uap->using_tx_dma) { /* In theory, this should already be done by pl011_dma_flush_buffer */ -@@ -1414,9 +1414,9 @@ static void pl011_throttle_rx(struct uart_port *port) +@@ -1420,9 +1420,9 @@ static void pl011_throttle_rx(struct uart_port *port) { unsigned long flags; @@ -3151,7 +3152,7 @@ index a5717655b..901928dba 100644 } static void pl011_enable_ms(struct uart_port *port) -@@ -1434,7 +1434,7 @@ __acquires(&uap->port.lock) +@@ -1440,7 +1440,7 @@ __acquires(&uap->port.lock) { pl011_fifo_to_tty(uap); @@ -3160,7 +3161,7 @@ index a5717655b..901928dba 100644 tty_flip_buffer_push(&uap->port.state->port); /* * If we were temporarily out of DMA mode for a while, -@@ -1459,7 +1459,7 @@ __acquires(&uap->port.lock) +@@ -1465,7 +1465,7 @@ __acquires(&uap->port.lock) #endif } } @@ -3169,7 +3170,7 @@ index a5717655b..901928dba 100644 } static bool pl011_tx_char(struct uart_amba_port *uap, unsigned char c, -@@ -1570,7 +1570,7 @@ static irqreturn_t pl011_int(int irq, void *dev_id) +@@ -1576,7 +1576,7 @@ static irqreturn_t pl011_int(int irq, void *dev_id) unsigned int status, pass_counter = AMBA_ISR_PASS_LIMIT; int handled = 0; @@ -3178,7 +3179,7 @@ index a5717655b..901928dba 100644 status = pl011_read(uap, REG_RIS) & uap->im; if (status) { do { -@@ -1600,7 +1600,7 @@ static irqreturn_t pl011_int(int irq, void *dev_id) +@@ -1606,7 +1606,7 @@ static irqreturn_t pl011_int(int irq, void *dev_id) handled = 1; } @@ -3187,7 +3188,7 @@ index a5717655b..901928dba 100644 return IRQ_RETVAL(handled); } -@@ -1672,14 +1672,14 @@ static void pl011_break_ctl(struct uart_port *port, int break_state) +@@ -1678,14 +1678,14 @@ static void pl011_break_ctl(struct uart_port *port, int break_state) unsigned long flags; unsigned int lcr_h; @@ -3204,7 +3205,7 @@ index a5717655b..901928dba 100644 } #ifdef CONFIG_CONSOLE_POLL -@@ -1818,7 +1818,7 @@ static void pl011_enable_interrupts(struct uart_amba_port *uap) +@@ -1824,7 +1824,7 @@ static void pl011_enable_interrupts(struct uart_amba_port *uap) unsigned long flags; unsigned int i; @@ -3213,7 +3214,7 @@ index a5717655b..901928dba 100644 /* Clear out any spuriously appearing RX interrupts */ pl011_write(UART011_RTIS | UART011_RXIS, uap, REG_ICR); -@@ -1840,7 +1840,7 @@ static void pl011_enable_interrupts(struct uart_amba_port *uap) +@@ -1846,7 +1846,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); @@ -3222,7 +3223,7 @@ index a5717655b..901928dba 100644 } static void pl011_unthrottle_rx(struct uart_port *port) -@@ -1848,7 +1848,7 @@ static void pl011_unthrottle_rx(struct uart_port *port) +@@ -1854,7 +1854,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; @@ -3231,7 +3232,7 @@ index a5717655b..901928dba 100644 uap->im = UART011_RTIM; if (!pl011_dma_rx_running(uap)) -@@ -1856,7 +1856,7 @@ static void pl011_unthrottle_rx(struct uart_port *port) +@@ -1862,7 +1862,7 @@ static void pl011_unthrottle_rx(struct uart_port *port) pl011_write(uap->im, uap, REG_IMSC); @@ -3240,7 +3241,7 @@ index a5717655b..901928dba 100644 } static int pl011_startup(struct uart_port *port) -@@ -1876,7 +1876,7 @@ static int pl011_startup(struct uart_port *port) +@@ -1882,7 +1882,7 @@ static int pl011_startup(struct uart_port *port) pl011_write(uap->vendor->ifls, uap, REG_IFLS); @@ -3249,7 +3250,7 @@ index a5717655b..901928dba 100644 cr = pl011_read(uap, REG_CR); cr &= UART011_CR_RTS | UART011_CR_DTR; -@@ -1887,7 +1887,7 @@ static int pl011_startup(struct uart_port *port) +@@ -1893,7 +1893,7 @@ static int pl011_startup(struct uart_port *port) pl011_write(cr, uap, REG_CR); @@ -3258,7 +3259,7 @@ index a5717655b..901928dba 100644 /* * initialise the old status of the modem signals -@@ -1948,12 +1948,12 @@ static void pl011_disable_uart(struct uart_amba_port *uap) +@@ -1954,12 +1954,12 @@ static void pl011_disable_uart(struct uart_amba_port *uap) unsigned int cr; uap->port.status &= ~(UPSTAT_AUTOCTS | UPSTAT_AUTORTS); @@ -3273,7 +3274,7 @@ index a5717655b..901928dba 100644 /* * disable break condition and fifos -@@ -1965,14 +1965,14 @@ static void pl011_disable_uart(struct uart_amba_port *uap) +@@ -1971,14 +1971,14 @@ static void pl011_disable_uart(struct uart_amba_port *uap) static void pl011_disable_interrupts(struct uart_amba_port *uap) { @@ -3290,7 +3291,7 @@ index a5717655b..901928dba 100644 } static void pl011_shutdown(struct uart_port *port) -@@ -2117,7 +2117,7 @@ pl011_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2123,7 +2123,7 @@ pl011_set_termios(struct uart_port *port, struct ktermios *termios, bits = tty_get_frame_size(termios->c_cflag); @@ -3299,7 +3300,7 @@ index a5717655b..901928dba 100644 /* * Update the per-port timeout. -@@ -2191,7 +2191,7 @@ pl011_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2197,7 +2197,7 @@ pl011_set_termios(struct uart_port *port, struct ktermios *termios, old_cr |= UART011_CR_RXE; pl011_write(old_cr, uap, REG_CR); @@ -3308,7 +3309,7 @@ index a5717655b..901928dba 100644 } static void -@@ -2209,10 +2209,10 @@ sbsa_uart_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2215,10 +2215,10 @@ sbsa_uart_set_termios(struct uart_port *port, struct ktermios *termios, termios->c_cflag &= ~(CMSPAR | CRTSCTS); termios->c_cflag |= CS8 | CLOCAL; @@ -3321,7 +3322,7 @@ index a5717655b..901928dba 100644 } static const char *pl011_type(struct uart_port *port) -@@ -2347,13 +2347,10 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) +@@ -2353,13 +2353,10 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) clk_enable(uap->clk); @@ -3338,7 +3339,7 @@ index a5717655b..901928dba 100644 /* * First save the CR then disable the interrupts -@@ -2379,8 +2376,7 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) +@@ -2385,8 +2382,7 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) pl011_write(old_cr, uap, REG_CR); if (locked) @@ -3558,7 +3559,7 @@ index ad4ae19b6..1aa5b2b49 100644 static struct console arc_console = { diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c -index 88cdafa5a..1946fafc3 100644 +index bcca5627a..5a3f2fc47 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c @@ -861,7 +861,7 @@ static void atmel_complete_tx_dma(void *arg) @@ -3641,7 +3642,7 @@ index 88cdafa5a..1946fafc3 100644 } } diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c -index 0dd8cceb8..4a08fd5ee 100644 +index 44c27e5ce..b104c36ce 100644 --- a/drivers/tty/serial/bcm63xx_uart.c +++ b/drivers/tty/serial/bcm63xx_uart.c @@ -201,7 +201,7 @@ static void bcm_uart_break_ctl(struct uart_port *port, int ctl) @@ -3662,7 +3663,7 @@ index 0dd8cceb8..4a08fd5ee 100644 } /* -@@ -332,7 +332,7 @@ static irqreturn_t bcm_uart_interrupt(int irq, void *dev_id) +@@ -335,7 +335,7 @@ static irqreturn_t bcm_uart_interrupt(int irq, void *dev_id) unsigned int irqstat; port = dev_id; @@ -3671,7 +3672,7 @@ index 0dd8cceb8..4a08fd5ee 100644 irqstat = bcm_uart_readl(port, UART_IR_REG); if (irqstat & UART_RX_INT_STAT) -@@ -353,7 +353,7 @@ static irqreturn_t bcm_uart_interrupt(int irq, void *dev_id) +@@ -356,7 +356,7 @@ static irqreturn_t bcm_uart_interrupt(int irq, void *dev_id) estat & UART_EXTINP_DCD_MASK); } @@ -3680,7 +3681,7 @@ index 0dd8cceb8..4a08fd5ee 100644 return IRQ_HANDLED; } -@@ -451,9 +451,9 @@ static void bcm_uart_shutdown(struct uart_port *port) +@@ -454,9 +454,9 @@ static void bcm_uart_shutdown(struct uart_port *port) { unsigned long flags; @@ -3692,7 +3693,7 @@ index 0dd8cceb8..4a08fd5ee 100644 bcm_uart_disable(port); bcm_uart_flush(port); -@@ -470,7 +470,7 @@ static void bcm_uart_set_termios(struct uart_port *port, struct ktermios *new, +@@ -473,7 +473,7 @@ static void bcm_uart_set_termios(struct uart_port *port, struct ktermios *new, unsigned long flags; int tries; @@ -3701,7 +3702,7 @@ index 0dd8cceb8..4a08fd5ee 100644 /* Drain the hot tub fully before we power it off for the winter. */ for (tries = 3; !bcm_uart_tx_empty(port) && tries; tries--) -@@ -546,7 +546,7 @@ static void bcm_uart_set_termios(struct uart_port *port, struct ktermios *new, +@@ -549,7 +549,7 @@ static void bcm_uart_set_termios(struct uart_port *port, struct ktermios *new, uart_update_timeout(port, new->c_cflag, baud); bcm_uart_enable(port); @@ -3710,7 +3711,7 @@ index 0dd8cceb8..4a08fd5ee 100644 } /* -@@ -712,9 +712,9 @@ static void bcm_console_write(struct console *co, const char *s, +@@ -715,9 +715,9 @@ static void bcm_console_write(struct console *co, const char *s, /* bcm_uart_interrupt() already took the lock */ locked = 0; } else if (oops_in_progress) { @@ -3722,7 +3723,7 @@ index 0dd8cceb8..4a08fd5ee 100644 locked = 1; } -@@ -725,7 +725,7 @@ static void bcm_console_write(struct console *co, const char *s, +@@ -728,7 +728,7 @@ static void bcm_console_write(struct console *co, const char *s, wait_for_xmitr(port); if (locked) @@ -4074,7 +4075,7 @@ index 249cb380c..7fa809a40 100644 /* diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c -index 385b41275..71d0cbd74 100644 +index 8bd0f8e45..58c2c460c 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -532,9 +532,9 @@ static void lpuart_dma_tx_complete(void *arg) @@ -4376,7 +4377,7 @@ index 385b41275..71d0cbd74 100644 } /* -@@ -3092,7 +3092,7 @@ static int lpuart_suspend(struct device *dev) +@@ -3093,7 +3093,7 @@ static int lpuart_suspend(struct device *dev) uart_suspend_port(&lpuart_reg, &sport->port); if (lpuart_uport_is_active(sport)) { @@ -4385,7 +4386,7 @@ index 385b41275..71d0cbd74 100644 if (lpuart_is_32(sport)) { /* disable Rx/Tx and interrupts */ temp = lpuart32_read(&sport->port, UARTCTRL); -@@ -3104,7 +3104,7 @@ static int lpuart_suspend(struct device *dev) +@@ -3105,7 +3105,7 @@ static int lpuart_suspend(struct device *dev) temp &= ~(UARTCR2_TE | UARTCR2_TIE | UARTCR2_TCIE); writeb(temp, sport->port.membase + UARTCR2); } @@ -4394,7 +4395,7 @@ index 385b41275..71d0cbd74 100644 if (sport->lpuart_dma_rx_use) { /* -@@ -3117,7 +3117,7 @@ static int lpuart_suspend(struct device *dev) +@@ -3118,7 +3118,7 @@ static int lpuart_suspend(struct device *dev) lpuart_dma_rx_free(&sport->port); /* Disable Rx DMA to use UART port as wakeup source */ @@ -4403,7 +4404,7 @@ index 385b41275..71d0cbd74 100644 if (lpuart_is_32(sport)) { temp = lpuart32_read(&sport->port, UARTBAUD); lpuart32_write(&sport->port, temp & ~UARTBAUD_RDMAE, -@@ -3126,11 +3126,11 @@ static int lpuart_suspend(struct device *dev) +@@ -3127,11 +3127,11 @@ static int lpuart_suspend(struct device *dev) writeb(readb(sport->port.membase + UARTCR5) & ~UARTCR5_RDMAS, sport->port.membase + UARTCR5); } @@ -4417,7 +4418,7 @@ index 385b41275..71d0cbd74 100644 if (lpuart_is_32(sport)) { temp = lpuart32_read(&sport->port, UARTBAUD); temp &= ~UARTBAUD_TDMAE; -@@ -3140,7 +3140,7 @@ static int lpuart_suspend(struct device *dev) +@@ -3141,7 +3141,7 @@ static int lpuart_suspend(struct device *dev) temp &= ~UARTCR5_TDMAS; writeb(temp, sport->port.membase + UARTCR5); } @@ -4542,10 +4543,10 @@ 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 c77831e91..66420a992 100644 +index a5d0df2ba..267c9af4b 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c -@@ -584,7 +584,7 @@ static void imx_uart_dma_tx_callback(void *data) +@@ -586,7 +586,7 @@ static void imx_uart_dma_tx_callback(void *data) unsigned long flags; u32 ucr1; @@ -4554,7 +4555,7 @@ index c77831e91..66420a992 100644 dma_unmap_sg(sport->port.dev, sgl, sport->dma_tx_nents, DMA_TO_DEVICE); -@@ -609,7 +609,7 @@ static void imx_uart_dma_tx_callback(void *data) +@@ -611,7 +611,7 @@ static void imx_uart_dma_tx_callback(void *data) imx_uart_writel(sport, ucr4, UCR4); } @@ -4563,7 +4564,7 @@ index c77831e91..66420a992 100644 } /* called with port.lock taken and irqs off */ -@@ -780,11 +780,11 @@ static irqreturn_t imx_uart_rtsint(int irq, void *dev_id) +@@ -782,11 +782,11 @@ static irqreturn_t imx_uart_rtsint(int irq, void *dev_id) struct imx_port *sport = dev_id; irqreturn_t ret; @@ -4577,7 +4578,7 @@ index c77831e91..66420a992 100644 return ret; } -@@ -793,9 +793,9 @@ static irqreturn_t imx_uart_txint(int irq, void *dev_id) +@@ -795,9 +795,9 @@ static irqreturn_t imx_uart_txint(int irq, void *dev_id) { struct imx_port *sport = dev_id; @@ -4589,7 +4590,7 @@ index c77831e91..66420a992 100644 return IRQ_HANDLED; } -@@ -909,11 +909,11 @@ static irqreturn_t imx_uart_rxint(int irq, void *dev_id) +@@ -911,11 +911,11 @@ static irqreturn_t imx_uart_rxint(int irq, void *dev_id) struct imx_port *sport = dev_id; irqreturn_t ret; @@ -4603,7 +4604,7 @@ index c77831e91..66420a992 100644 return ret; } -@@ -976,7 +976,7 @@ static irqreturn_t imx_uart_int(int irq, void *dev_id) +@@ -978,7 +978,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; @@ -4612,7 +4613,7 @@ index c77831e91..66420a992 100644 usr1 = imx_uart_readl(sport, USR1); usr2 = imx_uart_readl(sport, USR2); -@@ -1046,7 +1046,7 @@ static irqreturn_t imx_uart_int(int irq, void *dev_id) +@@ -1048,7 +1048,7 @@ static irqreturn_t imx_uart_int(int irq, void *dev_id) ret = IRQ_HANDLED; } @@ -4621,7 +4622,7 @@ index c77831e91..66420a992 100644 return ret; } -@@ -1129,7 +1129,7 @@ static void imx_uart_break_ctl(struct uart_port *port, int break_state) +@@ -1131,7 +1131,7 @@ static void imx_uart_break_ctl(struct uart_port *port, int break_state) unsigned long flags; u32 ucr1; @@ -4630,7 +4631,7 @@ index c77831e91..66420a992 100644 ucr1 = imx_uart_readl(sport, UCR1) & ~UCR1_SNDBRK; -@@ -1138,7 +1138,7 @@ static void imx_uart_break_ctl(struct uart_port *port, int break_state) +@@ -1140,7 +1140,7 @@ static void imx_uart_break_ctl(struct uart_port *port, int break_state) imx_uart_writel(sport, ucr1, UCR1); @@ -4639,7 +4640,7 @@ index c77831e91..66420a992 100644 } /* -@@ -1151,9 +1151,9 @@ static void imx_uart_timeout(struct timer_list *t) +@@ -1153,9 +1153,9 @@ static void imx_uart_timeout(struct timer_list *t) unsigned long flags; if (sport->port.state) { @@ -4651,7 +4652,7 @@ index c77831e91..66420a992 100644 mod_timer(&sport->timer, jiffies + MCTRL_TIMEOUT); } -@@ -1183,9 +1183,9 @@ static void imx_uart_dma_rx_callback(void *data) +@@ -1185,9 +1185,9 @@ static void imx_uart_dma_rx_callback(void *data) status = dmaengine_tx_status(chan, sport->rx_cookie, &state); if (status == DMA_ERROR) { @@ -4663,7 +4664,7 @@ index c77831e91..66420a992 100644 return; } -@@ -1214,9 +1214,9 @@ static void imx_uart_dma_rx_callback(void *data) +@@ -1216,9 +1216,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 */ @@ -4675,7 +4676,7 @@ index c77831e91..66420a992 100644 if (!(sport->port.ignore_status_mask & URXD_DUMMY_READ)) { -@@ -1474,7 +1474,7 @@ static int imx_uart_startup(struct uart_port *port) +@@ -1476,7 +1476,7 @@ static int imx_uart_startup(struct uart_port *port) if (!uart_console(port) && imx_uart_dma_init(sport) == 0) dma_is_inited = 1; @@ -4684,7 +4685,7 @@ index c77831e91..66420a992 100644 /* Reset fifo's and state machines */ imx_uart_soft_reset(sport); -@@ -1547,7 +1547,7 @@ static int imx_uart_startup(struct uart_port *port) +@@ -1549,7 +1549,7 @@ static int imx_uart_startup(struct uart_port *port) imx_uart_disable_loopback_rs485(sport); @@ -4693,7 +4694,7 @@ index c77831e91..66420a992 100644 return 0; } -@@ -1572,21 +1572,21 @@ static void imx_uart_shutdown(struct uart_port *port) +@@ -1574,21 +1574,21 @@ static void imx_uart_shutdown(struct uart_port *port) sport->dma_is_rxing = 0; } @@ -4719,7 +4720,7 @@ index c77831e91..66420a992 100644 /* * Stop our timer. -@@ -1597,7 +1597,7 @@ static void imx_uart_shutdown(struct uart_port *port) +@@ -1599,7 +1599,7 @@ static void imx_uart_shutdown(struct uart_port *port) * Disable all interrupts, port and break condition. */ @@ -4728,7 +4729,7 @@ index c77831e91..66420a992 100644 ucr1 = imx_uart_readl(sport, UCR1); ucr1 &= ~(UCR1_TRDYEN | UCR1_RRDYEN | UCR1_RTSDEN | UCR1_RXDMAEN | -@@ -1619,7 +1619,7 @@ static void imx_uart_shutdown(struct uart_port *port) +@@ -1621,7 +1621,7 @@ static void imx_uart_shutdown(struct uart_port *port) ucr4 &= ~UCR4_TCEN; imx_uart_writel(sport, ucr4, UCR4); @@ -4737,7 +4738,7 @@ index c77831e91..66420a992 100644 clk_disable_unprepare(sport->clk_per); clk_disable_unprepare(sport->clk_ipg); -@@ -1682,7 +1682,7 @@ imx_uart_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -1684,7 +1684,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); @@ -4746,7 +4747,7 @@ index c77831e91..66420a992 100644 /* * Read current UCR2 and save it for future use, then clear all the bits -@@ -1810,7 +1810,7 @@ imx_uart_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -1812,7 +1812,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); @@ -4755,7 +4756,7 @@ index c77831e91..66420a992 100644 } static const char *imx_uart_type(struct uart_port *port) -@@ -1872,7 +1872,7 @@ static int imx_uart_poll_init(struct uart_port *port) +@@ -1874,7 +1874,7 @@ static int imx_uart_poll_init(struct uart_port *port) imx_uart_setup_ufcr(sport, TXTL_DEFAULT, RXTL_DEFAULT); @@ -4764,7 +4765,7 @@ index c77831e91..66420a992 100644 /* * Be careful about the order of enabling bits here. First enable the -@@ -1900,7 +1900,7 @@ static int imx_uart_poll_init(struct uart_port *port) +@@ -1902,7 +1902,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); @@ -4773,7 +4774,7 @@ index c77831e91..66420a992 100644 return 0; } -@@ -2015,9 +2015,9 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count) +@@ -2022,9 +2022,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) @@ -4785,7 +4786,7 @@ index c77831e91..66420a992 100644 /* * First, save UCR1/2/3 and then disable interrupts -@@ -2045,7 +2045,7 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count) +@@ -2052,7 +2052,7 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count) imx_uart_ucrs_restore(sport, &old_ucr); if (locked) @@ -4794,7 +4795,7 @@ index c77831e91..66420a992 100644 } /* -@@ -2203,10 +2203,10 @@ static enum hrtimer_restart imx_trigger_start_tx(struct hrtimer *t) +@@ -2210,10 +2210,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; @@ -4807,7 +4808,7 @@ index c77831e91..66420a992 100644 return HRTIMER_NORESTART; } -@@ -2216,10 +2216,10 @@ static enum hrtimer_restart imx_trigger_stop_tx(struct hrtimer *t) +@@ -2223,10 +2223,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; @@ -4820,7 +4821,7 @@ index c77831e91..66420a992 100644 return HRTIMER_NORESTART; } -@@ -2486,9 +2486,9 @@ static void imx_uart_restore_context(struct imx_port *sport) +@@ -2493,9 +2493,9 @@ static void imx_uart_restore_context(struct imx_port *sport) { unsigned long flags; @@ -4832,7 +4833,7 @@ index c77831e91..66420a992 100644 return; } -@@ -2503,7 +2503,7 @@ static void imx_uart_restore_context(struct imx_port *sport) +@@ -2510,7 +2510,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; @@ -4841,7 +4842,7 @@ index c77831e91..66420a992 100644 } static void imx_uart_save_context(struct imx_port *sport) -@@ -2511,7 +2511,7 @@ static void imx_uart_save_context(struct imx_port *sport) +@@ -2518,7 +2518,7 @@ static void imx_uart_save_context(struct imx_port *sport) unsigned long flags; /* Save necessary regs */ @@ -4850,7 +4851,7 @@ index c77831e91..66420a992 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); -@@ -2523,7 +2523,7 @@ static void imx_uart_save_context(struct imx_port *sport) +@@ -2530,7 +2530,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; @@ -5283,7 +5284,7 @@ index b38fe4728..5149a947b 100644 /* Don't rewrite B0 */ if (tty_termios_baud_rate(termios)) diff --git a/drivers/tty/serial/ma35d1_serial.c b/drivers/tty/serial/ma35d1_serial.c -index 69da24565..73910c54d 100644 +index 99225f1e0..faccd772c 100644 --- a/drivers/tty/serial/ma35d1_serial.c +++ b/drivers/tty/serial/ma35d1_serial.c @@ -269,16 +269,16 @@ static void receive_chars(struct uart_ma35d1_port *up) @@ -5364,7 +5365,7 @@ index 69da24565..73910c54d 100644 static int __init ma35d1serial_console_setup(struct console *co, char *options) diff --git a/drivers/tty/serial/mcf.c b/drivers/tty/serial/mcf.c -index 1666ce012..91b15243f 100644 +index aea29b4e6..ee40af20a 100644 --- a/drivers/tty/serial/mcf.c +++ b/drivers/tty/serial/mcf.c @@ -135,12 +135,12 @@ static void mcf_break_ctl(struct uart_port *port, int break_state) @@ -6728,10 +6729,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 2e1b1c827..549909644 100644 +index f798ef3c4..b808c1768 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c -@@ -482,9 +482,9 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s, +@@ -473,9 +473,9 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s, uport = &port->uport; if (oops_in_progress) @@ -6743,7 +6744,7 @@ index 2e1b1c827..549909644 100644 geni_status = readl(uport->membase + SE_GENI_STATUS); -@@ -520,7 +520,7 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s, +@@ -511,7 +511,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) @@ -6752,7 +6753,7 @@ index 2e1b1c827..549909644 100644 } static void handle_rx_console(struct uart_port *uport, u32 bytes, bool drop) -@@ -972,7 +972,7 @@ static irqreturn_t qcom_geni_serial_isr(int isr, void *dev) +@@ -963,7 +963,7 @@ static irqreturn_t qcom_geni_serial_isr(int isr, void *dev) if (uport->suspended) return IRQ_NONE; @@ -6903,7 +6904,7 @@ index be5c842b5..d824c8318 100644 local_irq_restore(flags); } diff --git a/drivers/tty/serial/rp2.c b/drivers/tty/serial/rp2.c -index de220ac8c..d46a81cdd 100644 +index 5a1de6044..45be2b881 100644 --- a/drivers/tty/serial/rp2.c +++ b/drivers/tty/serial/rp2.c @@ -276,9 +276,9 @@ static unsigned int rp2_uart_tx_empty(struct uart_port *port) @@ -7320,10 +7321,10 @@ index f3cd69346..dbec29d9a 100644 static int __init sbd_console_setup(struct console *co, char *options) diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c -index eea662212..2aa0b7e5e 100644 +index df6023dda..1468c35bd 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c -@@ -806,6 +806,7 @@ static void sc16is7xx_tx_proc(struct kthread_work *ws) +@@ -812,6 +812,7 @@ static void sc16is7xx_tx_proc(struct kthread_work *ws) { struct uart_port *port = &(to_sc16is7xx_one(ws, tx_work)->port); struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); @@ -7331,7 +7332,7 @@ index eea662212..2aa0b7e5e 100644 if ((port->rs485.flags & SER_RS485_ENABLED) && (port->rs485.delay_rts_before_send > 0)) -@@ -814,6 +815,10 @@ static void sc16is7xx_tx_proc(struct kthread_work *ws) +@@ -820,6 +821,10 @@ static void sc16is7xx_tx_proc(struct kthread_work *ws) mutex_lock(&one->efr_lock); sc16is7xx_handle_tx(port); mutex_unlock(&one->efr_lock); @@ -7483,7 +7484,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 2eceef54e..6cd64ccc2 100644 +index 8ff0efac6..398104760 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) @@ -7537,7 +7538,7 @@ index 2eceef54e..6cd64ccc2 100644 } /* -@@ -715,11 +715,11 @@ static void uart_send_xchar(struct tty_struct *tty, char ch) +@@ -717,11 +717,11 @@ static void uart_send_xchar(struct tty_struct *tty, char ch) if (port->ops->send_xchar) port->ops->send_xchar(port, ch); else { @@ -7551,19 +7552,20 @@ index 2eceef54e..6cd64ccc2 100644 } uart_port_deref(port); } -@@ -1098,9 +1098,9 @@ static int uart_tiocmget(struct tty_struct *tty) +@@ -1107,10 +1107,10 @@ static int uart_tiocmget(struct tty_struct *tty) + goto out; if (!tty_io_error(tty)) { - result = uport->mctrl; - spin_lock_irq(&uport->lock); + uart_port_lock_irq(uport); + result = uport->mctrl; result |= uport->ops->get_mctrl(uport); - spin_unlock_irq(&uport->lock); + uart_port_unlock_irq(uport); } out: mutex_unlock(&port->mutex); -@@ -1236,16 +1236,16 @@ static int uart_wait_modem_status(struct uart_state *state, unsigned long arg) +@@ -1246,16 +1246,16 @@ static int uart_wait_modem_status(struct uart_state *state, unsigned long arg) uport = uart_port_ref(state); if (!uport) return -EIO; @@ -7584,7 +7586,7 @@ index 2eceef54e..6cd64ccc2 100644 set_current_state(TASK_INTERRUPTIBLE); -@@ -1290,9 +1290,9 @@ static int uart_get_icount(struct tty_struct *tty, +@@ -1300,9 +1300,9 @@ static int uart_get_icount(struct tty_struct *tty, uport = uart_port_ref(state); if (!uport) return -EIO; @@ -7596,7 +7598,7 @@ index 2eceef54e..6cd64ccc2 100644 uart_port_deref(uport); icount->cts = cnow.cts; -@@ -1445,9 +1445,9 @@ static int uart_rs485_config(struct uart_port *port) +@@ -1455,9 +1455,9 @@ static int uart_rs485_config(struct uart_port *port) uart_set_rs485_termination(port, rs485); uart_set_rs485_rx_during_tx(port, rs485); @@ -7608,7 +7610,7 @@ index 2eceef54e..6cd64ccc2 100644 if (ret) { memset(rs485, 0, sizeof(*rs485)); /* unset GPIOs */ -@@ -1464,9 +1464,9 @@ static int uart_get_rs485_config(struct uart_port *port, +@@ -1474,9 +1474,9 @@ static int uart_get_rs485_config(struct uart_port *port, unsigned long flags; struct serial_rs485 aux; @@ -7620,7 +7622,7 @@ index 2eceef54e..6cd64ccc2 100644 if (copy_to_user(rs485, &aux, sizeof(aux))) return -EFAULT; -@@ -1494,7 +1494,7 @@ static int uart_set_rs485_config(struct tty_struct *tty, struct uart_port *port, +@@ -1504,7 +1504,7 @@ static int uart_set_rs485_config(struct tty_struct *tty, struct uart_port *port, uart_set_rs485_termination(port, &rs485); uart_set_rs485_rx_during_tx(port, &rs485); @@ -7629,7 +7631,7 @@ index 2eceef54e..6cd64ccc2 100644 ret = port->rs485_config(port, &tty->termios, &rs485); if (!ret) { port->rs485 = rs485; -@@ -1503,7 +1503,7 @@ static int uart_set_rs485_config(struct tty_struct *tty, struct uart_port *port, +@@ -1513,7 +1513,7 @@ static int uart_set_rs485_config(struct tty_struct *tty, struct uart_port *port, if (!(rs485.flags & SER_RS485_ENABLED)) port->ops->set_mctrl(port, port->mctrl); } @@ -7638,7 +7640,7 @@ index 2eceef54e..6cd64ccc2 100644 if (ret) { /* restore old GPIO settings */ gpiod_set_value_cansleep(port->rs485_term_gpio, -@@ -1528,9 +1528,9 @@ static int uart_get_iso7816_config(struct uart_port *port, +@@ -1538,9 +1538,9 @@ static int uart_get_iso7816_config(struct uart_port *port, if (!port->iso7816_config) return -ENOTTY; @@ -7650,7 +7652,7 @@ index 2eceef54e..6cd64ccc2 100644 if (copy_to_user(iso7816, &aux, sizeof(aux))) return -EFAULT; -@@ -1559,9 +1559,9 @@ static int uart_set_iso7816_config(struct uart_port *port, +@@ -1569,9 +1569,9 @@ static int uart_set_iso7816_config(struct uart_port *port, if (iso7816.reserved[i]) return -EINVAL; @@ -7662,7 +7664,7 @@ index 2eceef54e..6cd64ccc2 100644 if (ret) return ret; -@@ -1778,9 +1778,9 @@ static void uart_tty_port_shutdown(struct tty_port *port) +@@ -1788,9 +1788,9 @@ static void uart_tty_port_shutdown(struct tty_port *port) if (WARN(!uport, "detached port still initialized!\n")) return; @@ -7674,7 +7676,7 @@ index 2eceef54e..6cd64ccc2 100644 serial_base_port_shutdown(uport); uart_port_shutdown(port); -@@ -1795,11 +1795,11 @@ static void uart_tty_port_shutdown(struct tty_port *port) +@@ -1805,11 +1805,11 @@ static void uart_tty_port_shutdown(struct tty_port *port) /* * Free the transmit buffer. */ @@ -7688,7 +7690,7 @@ index 2eceef54e..6cd64ccc2 100644 free_page((unsigned long)buf); -@@ -1942,10 +1942,10 @@ static bool uart_carrier_raised(struct tty_port *port) +@@ -1952,10 +1952,10 @@ static bool uart_carrier_raised(struct tty_port *port) */ if (WARN_ON(!uport)) return true; @@ -7701,7 +7703,7 @@ index 2eceef54e..6cd64ccc2 100644 uart_port_deref(uport); return mctrl & TIOCM_CAR; -@@ -2062,9 +2062,9 @@ static void uart_line_info(struct seq_file *m, struct uart_driver *drv, int i) +@@ -2072,9 +2072,9 @@ static void uart_line_info(struct seq_file *m, struct uart_driver *drv, int i) pm_state = state->pm_state; if (pm_state != UART_PM_STATE_ON) uart_change_pm(state, UART_PM_STATE_ON); @@ -7713,7 +7715,7 @@ index 2eceef54e..6cd64ccc2 100644 if (pm_state != UART_PM_STATE_ON) uart_change_pm(state, pm_state); -@@ -2403,9 +2403,9 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) +@@ -2413,9 +2413,9 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) */ if (!console_suspend_enabled && uart_console(uport)) { if (uport->ops->start_rx) { @@ -7725,7 +7727,7 @@ index 2eceef54e..6cd64ccc2 100644 } goto unlock; } -@@ -2420,7 +2420,7 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) +@@ -2430,7 +2430,7 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) tty_port_set_suspended(port, true); tty_port_set_initialized(port, false); @@ -7734,7 +7736,7 @@ index 2eceef54e..6cd64ccc2 100644 ops->stop_tx(uport); if (!(uport->rs485.flags & SER_RS485_ENABLED)) ops->set_mctrl(uport, 0); -@@ -2428,7 +2428,7 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) +@@ -2438,7 +2438,7 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) mctrl = uport->mctrl; uport->mctrl = 0; ops->stop_rx(uport); @@ -7743,7 +7745,7 @@ index 2eceef54e..6cd64ccc2 100644 /* * Wait for the transmitter to empty. -@@ -2500,9 +2500,9 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) +@@ -2510,9 +2510,9 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) uart_change_pm(state, UART_PM_STATE_ON); uport->ops->set_termios(uport, &termios, NULL); if (!console_suspend_enabled && uport->ops->start_rx) { @@ -7755,7 +7757,7 @@ index 2eceef54e..6cd64ccc2 100644 } if (console_suspend_enabled) console_start(uport->cons); -@@ -2513,10 +2513,10 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) +@@ -2523,10 +2523,10 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) int ret; uart_change_pm(state, UART_PM_STATE_ON); @@ -7768,7 +7770,7 @@ index 2eceef54e..6cd64ccc2 100644 if (console_suspend_enabled || !uart_console(uport)) { /* Protected by port mutex for now */ struct tty_struct *tty = port->tty; -@@ -2526,11 +2526,11 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) +@@ -2536,11 +2536,11 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) if (tty) uart_change_line_settings(tty, state, NULL); uart_rs485_config(uport); @@ -7782,7 +7784,7 @@ index 2eceef54e..6cd64ccc2 100644 tty_port_set_initialized(port, true); } else { /* -@@ -2642,11 +2642,11 @@ uart_configure_port(struct uart_driver *drv, struct uart_state *state, +@@ -2652,11 +2652,11 @@ uart_configure_port(struct uart_driver *drv, struct uart_state *state, * keep the DTR setting that is set in uart_set_options() * We probably don't need a spinlock around this, but */ @@ -7819,7 +7821,7 @@ index 7d5aaa8d4..e51ca593a 100644 return IRQ_HANDLED; } diff --git a/drivers/tty/serial/serial_port.c b/drivers/tty/serial/serial_port.c -index d622a9297..7d51e66ec 100644 +index ed3953bd0..92a57b243 100644 --- a/drivers/tty/serial/serial_port.c +++ b/drivers/tty/serial/serial_port.c @@ -35,14 +35,14 @@ static int serial_port_runtime_resume(struct device *dev) @@ -7938,7 +7940,7 @@ index be08fb6f7..eaa980722 100644 static void diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c -index a560b729f..84ab434c9 100644 +index f793624fd..2559c9781 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -1205,7 +1205,7 @@ static void sci_dma_tx_complete(void *arg) @@ -7959,7 +7961,7 @@ index a560b729f..84ab434c9 100644 } /* Locking: called with port lock held */ -@@ -1320,7 +1320,7 @@ static void sci_dma_rx_complete(void *arg) +@@ -1325,7 +1325,7 @@ static void sci_dma_rx_complete(void *arg) dev_dbg(port->dev, "%s(%d) active cookie %d\n", __func__, port->line, s->active_rx); @@ -7968,7 +7970,7 @@ index a560b729f..84ab434c9 100644 active = sci_dma_rx_find_active(s); if (active >= 0) -@@ -1347,20 +1347,20 @@ static void sci_dma_rx_complete(void *arg) +@@ -1352,20 +1352,20 @@ static void sci_dma_rx_complete(void *arg) dma_async_issue_pending(chan); @@ -7993,7 +7995,7 @@ index a560b729f..84ab434c9 100644 } static void sci_dma_tx_release(struct sci_port *s) -@@ -1409,13 +1409,13 @@ static int sci_dma_rx_submit(struct sci_port *s, bool port_lock_held) +@@ -1414,13 +1414,13 @@ static int sci_dma_rx_submit(struct sci_port *s, bool port_lock_held) fail: /* Switch to PIO */ if (!port_lock_held) @@ -8009,7 +8011,7 @@ index a560b729f..84ab434c9 100644 return -EAGAIN; } -@@ -1437,14 +1437,14 @@ static void sci_dma_tx_work_fn(struct work_struct *work) +@@ -1442,14 +1442,14 @@ static void sci_dma_tx_work_fn(struct work_struct *work) * transmit till the end, and then the rest. Take the port lock to get a * consistent xmit buffer state. */ @@ -8026,7 +8028,7 @@ index a560b729f..84ab434c9 100644 return; } -@@ -1452,7 +1452,7 @@ static void sci_dma_tx_work_fn(struct work_struct *work) +@@ -1457,7 +1457,7 @@ static void sci_dma_tx_work_fn(struct work_struct *work) DMA_MEM_TO_DEV, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); if (!desc) { @@ -8035,7 +8037,7 @@ index a560b729f..84ab434c9 100644 dev_warn(port->dev, "Failed preparing Tx DMA descriptor\n"); goto switch_to_pio; } -@@ -1464,12 +1464,12 @@ static void sci_dma_tx_work_fn(struct work_struct *work) +@@ -1469,12 +1469,12 @@ static void sci_dma_tx_work_fn(struct work_struct *work) desc->callback_param = s; s->cookie_tx = dmaengine_submit(desc); if (dma_submit_error(s->cookie_tx)) { @@ -8050,7 +8052,7 @@ index a560b729f..84ab434c9 100644 dev_dbg(port->dev, "%s: %p: %d...%d, cookie %d\n", __func__, xmit->buf, tail, head, s->cookie_tx); -@@ -1477,10 +1477,10 @@ static void sci_dma_tx_work_fn(struct work_struct *work) +@@ -1482,10 +1482,10 @@ static void sci_dma_tx_work_fn(struct work_struct *work) return; switch_to_pio: @@ -8063,7 +8065,7 @@ index a560b729f..84ab434c9 100644 return; } -@@ -1497,17 +1497,17 @@ static enum hrtimer_restart sci_dma_rx_timer_fn(struct hrtimer *t) +@@ -1502,17 +1502,17 @@ static enum hrtimer_restart sci_dma_rx_timer_fn(struct hrtimer *t) dev_dbg(port->dev, "DMA Rx timed out\n"); @@ -8084,7 +8086,7 @@ index a560b729f..84ab434c9 100644 dev_dbg(port->dev, "Cookie %d #%d has already completed\n", s->active_rx, active); -@@ -1525,7 +1525,7 @@ static enum hrtimer_restart sci_dma_rx_timer_fn(struct hrtimer *t) +@@ -1530,7 +1530,7 @@ static enum hrtimer_restart sci_dma_rx_timer_fn(struct hrtimer *t) */ status = dmaengine_tx_status(s->chan_rx, s->active_rx, &state); if (status == DMA_COMPLETE) { @@ -8093,7 +8095,7 @@ index a560b729f..84ab434c9 100644 dev_dbg(port->dev, "Transaction complete after DMA engine was stopped"); return HRTIMER_NORESTART; } -@@ -1546,7 +1546,7 @@ static enum hrtimer_restart sci_dma_rx_timer_fn(struct hrtimer *t) +@@ -1551,7 +1551,7 @@ static enum hrtimer_restart sci_dma_rx_timer_fn(struct hrtimer *t) sci_dma_rx_reenable_irq(s); @@ -8102,7 +8104,7 @@ index a560b729f..84ab434c9 100644 return HRTIMER_NORESTART; } -@@ -1770,9 +1770,9 @@ static irqreturn_t sci_tx_interrupt(int irq, void *ptr) +@@ -1775,9 +1775,9 @@ static irqreturn_t sci_tx_interrupt(int irq, void *ptr) struct uart_port *port = ptr; unsigned long flags; @@ -8114,7 +8116,7 @@ index a560b729f..84ab434c9 100644 return IRQ_HANDLED; } -@@ -1786,11 +1786,11 @@ static irqreturn_t sci_tx_end_interrupt(int irq, void *ptr) +@@ -1791,11 +1791,11 @@ static irqreturn_t sci_tx_end_interrupt(int irq, void *ptr) if (port->type != PORT_SCI) return sci_tx_interrupt(irq, ptr); @@ -8128,7 +8130,7 @@ index a560b729f..84ab434c9 100644 return IRQ_HANDLED; } -@@ -2187,7 +2187,7 @@ static void sci_break_ctl(struct uart_port *port, int break_state) +@@ -2192,7 +2192,7 @@ static void sci_break_ctl(struct uart_port *port, int break_state) return; } @@ -8137,7 +8139,7 @@ index a560b729f..84ab434c9 100644 scsptr = serial_port_in(port, SCSPTR); scscr = serial_port_in(port, SCSCR); -@@ -2201,7 +2201,7 @@ static void sci_break_ctl(struct uart_port *port, int break_state) +@@ -2206,7 +2206,7 @@ static void sci_break_ctl(struct uart_port *port, int break_state) serial_port_out(port, SCSPTR, scsptr); serial_port_out(port, SCSCR, scscr); @@ -8146,7 +8148,7 @@ index a560b729f..84ab434c9 100644 } static int sci_startup(struct uart_port *port) -@@ -2233,7 +2233,7 @@ static void sci_shutdown(struct uart_port *port) +@@ -2238,7 +2238,7 @@ static void sci_shutdown(struct uart_port *port) s->autorts = false; mctrl_gpio_disable_ms(to_sci_port(port)->gpios); @@ -8155,7 +8157,7 @@ index a560b729f..84ab434c9 100644 sci_stop_rx(port); sci_stop_tx(port); /* -@@ -2243,7 +2243,7 @@ static void sci_shutdown(struct uart_port *port) +@@ -2248,7 +2248,7 @@ static void sci_shutdown(struct uart_port *port) scr = serial_port_in(port, SCSCR); serial_port_out(port, SCSCR, scr & (SCSCR_CKE1 | SCSCR_CKE0 | s->hscif_tot)); @@ -8164,7 +8166,7 @@ index a560b729f..84ab434c9 100644 #ifdef CONFIG_SERIAL_SH_SCI_DMA if (s->chan_rx_saved) { -@@ -2545,7 +2545,7 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2550,7 +2550,7 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios, serial_port_out(port, SCCKS, sccks); } @@ -8173,7 +8175,7 @@ index a560b729f..84ab434c9 100644 sci_reset(port); -@@ -2667,7 +2667,7 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -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); @@ -8182,7 +8184,7 @@ index a560b729f..84ab434c9 100644 sci_port_disable(s); -@@ -3052,9 +3052,9 @@ static void serial_console_write(struct console *co, const char *s, +@@ -3057,9 +3057,9 @@ static void serial_console_write(struct console *co, const char *s, if (port->sysrq) locked = 0; else if (oops_in_progress) @@ -8194,7 +8196,7 @@ index a560b729f..84ab434c9 100644 /* first save SCSCR then disable interrupts, keep clock source */ ctrl = serial_port_in(port, SCSCR); -@@ -3074,7 +3074,7 @@ static void serial_console_write(struct console *co, const char *s, +@@ -3079,7 +3079,7 @@ static void serial_console_write(struct console *co, const char *s, serial_port_out(port, SCSCR, ctrl); if (locked) @@ -10084,7 +10086,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 fc25776ea..48707941d 100644 +index 98b58ae88..974816e66 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -3300,7 +3300,11 @@ struct softnet_data { @@ -10100,7 +10102,7 @@ index fc25776ea..48707941d 100644 static inline void input_queue_head_incr(struct softnet_data *sd) diff --git a/include/linux/printk.h b/include/linux/printk.h -index 8ef499ab3..7a942e987 100644 +index e4878bb58..ebebc32e7 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -9,6 +9,8 @@ @@ -10167,10 +10169,10 @@ index 8ef499ab3..7a942e987 100644 #ifdef CONFIG_SMP diff --git a/include/linux/sched.h b/include/linux/sched.h -index b65d74c5e..d5fba1473 100644 +index b8be76b0c..c4fe6d06d 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -944,6 +944,9 @@ struct task_struct { +@@ -946,6 +946,9 @@ struct task_struct { * ->sched_remote_wakeup gets used, so it can be in this word. */ unsigned sched_remote_wakeup:1; @@ -10180,7 +10182,7 @@ index b65d74c5e..d5fba1473 100644 /* Bit to tell LSMs we're in execve(): */ unsigned in_execve:1; -@@ -1979,6 +1982,7 @@ static inline int dl_task_check_affinity(struct task_struct *p, const struct cpu +@@ -1989,6 +1992,7 @@ static inline int dl_task_check_affinity(struct task_struct *p, const struct cpu } #endif @@ -10188,7 +10190,7 @@ index b65d74c5e..d5fba1473 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); -@@ -2130,17 +2134,17 @@ static inline void update_tsk_thread_flag(struct task_struct *tsk, int flag, +@@ -2140,17 +2144,17 @@ static inline void update_tsk_thread_flag(struct task_struct *tsk, int flag, update_ti_thread_flag(task_thread_info(tsk), flag, value); } @@ -10209,7 +10211,7 @@ index b65d74c5e..d5fba1473 100644 { return test_ti_thread_flag(task_thread_info(tsk), flag); } -@@ -2153,9 +2157,11 @@ static inline void set_tsk_need_resched(struct task_struct *tsk) +@@ -2163,9 +2167,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); @@ -10222,7 +10224,7 @@ index b65d74c5e..d5fba1473 100644 { return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED)); } -@@ -2336,7 +2342,7 @@ static inline int rwlock_needbreak(rwlock_t *lock) +@@ -2346,7 +2352,7 @@ static inline int rwlock_needbreak(rwlock_t *lock) static __always_inline bool need_resched(void) { @@ -10307,10 +10309,10 @@ index be65de65f..ec46e3b49 100644 int serial8250_console_exit(struct uart_port *port); diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h -index a7d5fa892..99d3f1e24 100644 +index 5136eade9..9c7bce638 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h -@@ -488,6 +488,7 @@ struct uart_port { +@@ -489,6 +489,7 @@ struct uart_port { struct uart_icount icount; /* statistics */ struct console *cons; /* struct console, if any */ @@ -10318,7 +10320,7 @@ index a7d5fa892..99d3f1e24 100644 /* flags must be updated while holding port mutex */ upf_t flags; -@@ -595,6 +596,7 @@ struct uart_port { +@@ -596,6 +597,7 @@ struct uart_port { static inline void uart_port_lock(struct uart_port *up) { spin_lock(&up->lock); @@ -10326,7 +10328,7 @@ index a7d5fa892..99d3f1e24 100644 } /** -@@ -604,6 +606,7 @@ static inline void uart_port_lock(struct uart_port *up) +@@ -605,6 +607,7 @@ static inline void uart_port_lock(struct uart_port *up) static inline void uart_port_lock_irq(struct uart_port *up) { spin_lock_irq(&up->lock); @@ -10334,7 +10336,7 @@ index a7d5fa892..99d3f1e24 100644 } /** -@@ -614,6 +617,7 @@ static inline void uart_port_lock_irq(struct uart_port *up) +@@ -615,6 +618,7 @@ static inline void uart_port_lock_irq(struct uart_port *up) static inline void uart_port_lock_irqsave(struct uart_port *up, unsigned long *flags) { spin_lock_irqsave(&up->lock, *flags); @@ -10342,7 +10344,7 @@ index a7d5fa892..99d3f1e24 100644 } /** -@@ -624,7 +628,11 @@ static inline void uart_port_lock_irqsave(struct uart_port *up, unsigned long *f +@@ -625,7 +629,11 @@ static inline void uart_port_lock_irqsave(struct uart_port *up, unsigned long *f */ static inline bool uart_port_trylock(struct uart_port *up) { @@ -10355,7 +10357,7 @@ index a7d5fa892..99d3f1e24 100644 } /** -@@ -636,7 +644,11 @@ static inline bool uart_port_trylock(struct uart_port *up) +@@ -637,7 +645,11 @@ static inline bool uart_port_trylock(struct uart_port *up) */ static inline bool uart_port_trylock_irqsave(struct uart_port *up, unsigned long *flags) { @@ -10368,7 +10370,7 @@ index a7d5fa892..99d3f1e24 100644 } /** -@@ -645,6 +657,7 @@ static inline bool uart_port_trylock_irqsave(struct uart_port *up, unsigned long +@@ -646,6 +658,7 @@ static inline bool uart_port_trylock_irqsave(struct uart_port *up, unsigned long */ static inline void uart_port_unlock(struct uart_port *up) { @@ -10376,7 +10378,7 @@ index a7d5fa892..99d3f1e24 100644 spin_unlock(&up->lock); } -@@ -654,6 +667,7 @@ static inline void uart_port_unlock(struct uart_port *up) +@@ -655,6 +668,7 @@ static inline void uart_port_unlock(struct uart_port *up) */ static inline void uart_port_unlock_irq(struct uart_port *up) { @@ -10384,7 +10386,7 @@ index a7d5fa892..99d3f1e24 100644 spin_unlock_irq(&up->lock); } -@@ -663,6 +677,19 @@ static inline void uart_port_unlock_irq(struct uart_port *up) +@@ -664,6 +678,19 @@ static inline void uart_port_unlock_irq(struct uart_port *up) * @flags: The saved interrupt flags for restore */ static inline void uart_port_unlock_irqrestore(struct uart_port *up, unsigned long flags) @@ -10404,7 +10406,7 @@ index a7d5fa892..99d3f1e24 100644 { spin_unlock_irqrestore(&up->lock, flags); } -@@ -1058,14 +1085,14 @@ static inline void uart_unlock_and_check_sysrq(struct uart_port *port) +@@ -1076,14 +1103,14 @@ static inline void uart_unlock_and_check_sysrq(struct uart_port *port) u8 sysrq_ch; if (!port->has_sysrq) { @@ -10421,7 +10423,7 @@ index a7d5fa892..99d3f1e24 100644 if (sysrq_ch) handle_sysrq(sysrq_ch); -@@ -1077,14 +1104,14 @@ static inline void uart_unlock_and_check_sysrq_irqrestore(struct uart_port *port +@@ -1095,14 +1122,14 @@ static inline void uart_unlock_and_check_sysrq_irqrestore(struct uart_port *port u8 sysrq_ch; if (!port->has_sysrq) { @@ -10438,7 +10440,7 @@ index a7d5fa892..99d3f1e24 100644 if (sysrq_ch) handle_sysrq(sysrq_ch); -@@ -1100,12 +1127,12 @@ static inline int uart_prepare_sysrq_char(struct uart_port *port, u8 ch) +@@ -1118,12 +1145,12 @@ static inline int uart_prepare_sysrq_char(struct uart_port *port, u8 ch) } static inline void uart_unlock_and_check_sysrq(struct uart_port *port) { @@ -10503,7 +10505,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 ee9217fa4..1e594ace7 100644 +index 54ade3cea..c67dd30bc 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); @@ -10826,7 +10828,7 @@ index 1d4bc493b..486c68c11 100644 NULL }; diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c -index 151bd3de5..5c21ba41e 100644 +index 3468d8230..6eef8527e 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -56,6 +56,7 @@ @@ -10856,7 +10858,7 @@ index 151bd3de5..5c21ba41e 100644 /* diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c -index 21db0df0e..4a10e8c16 100644 +index bf3a28ee7..99129c891 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c @@ -218,6 +218,11 @@ static __always_inline bool rt_mutex_cmpxchg_acquire(struct rt_mutex_base *lock, @@ -10901,8 +10903,8 @@ index 21db0df0e..4a10e8c16 100644 raw_spin_lock_irq(&lock->wait_lock); set_current_state(state); -@@ -1642,7 +1661,7 @@ static void __sched rt_mutex_handle_deadlock(int res, int detect_deadlock, - WARN(1, "rtmutex deadlock detected\n"); +@@ -1643,7 +1662,7 @@ static void __sched rt_mutex_handle_deadlock(int res, int detect_deadlock, + while (1) { set_current_state(TASK_INTERRUPTIBLE); - schedule(); @@ -10910,7 +10912,7 @@ index 21db0df0e..4a10e8c16 100644 } } -@@ -1737,6 +1756,15 @@ static int __sched rt_mutex_slowlock(struct rt_mutex_base *lock, +@@ -1738,6 +1757,15 @@ static int __sched rt_mutex_slowlock(struct rt_mutex_base *lock, unsigned long flags; int ret; @@ -10926,7 +10928,7 @@ index 21db0df0e..4a10e8c16 100644 /* * Technically we could use raw_spin_[un]lock_irq() here, but this can * be called in early boot if the cmpxchg() fast path is disabled -@@ -1748,6 +1776,7 @@ static int __sched rt_mutex_slowlock(struct rt_mutex_base *lock, +@@ -1749,6 +1777,7 @@ static int __sched rt_mutex_slowlock(struct rt_mutex_base *lock, raw_spin_lock_irqsave(&lock->wait_lock, flags); ret = __rt_mutex_slowlock_locked(lock, ww_ctx, state); raw_spin_unlock_irqrestore(&lock->wait_lock, flags); @@ -10934,7 +10936,7 @@ index 21db0df0e..4a10e8c16 100644 return ret; } -@@ -1755,7 +1784,9 @@ static int __sched rt_mutex_slowlock(struct rt_mutex_base *lock, +@@ -1756,7 +1785,9 @@ static int __sched rt_mutex_slowlock(struct rt_mutex_base *lock, static __always_inline int __rt_mutex_lock(struct rt_mutex_base *lock, unsigned int state) { @@ -10999,7 +11001,7 @@ index 25ec02394..34a59569d 100644 } diff --git a/kernel/locking/rwsem.c b/kernel/locking/rwsem.c -index 9eabd585c..2340b6d90 100644 +index 11ed7ce65..62eac9fd8 100644 --- a/kernel/locking/rwsem.c +++ b/kernel/locking/rwsem.c @@ -1427,8 +1427,14 @@ static inline void __downgrade_write(struct rw_semaphore *sem) @@ -14758,10 +14760,10 @@ index 6d10927a0..8d9408d65 100644 { #ifdef CONFIG_KGDB_KDB diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c -index ade42d6a9..eebb9b454 100644 +index 46612fb15..f893f4cfd 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c -@@ -2408,6 +2408,12 @@ static int rcutorture_booster_init(unsigned int cpu) +@@ -2409,6 +2409,12 @@ static int rcutorture_booster_init(unsigned int cpu) WARN_ON_ONCE(!t); sp.sched_priority = 2; sched_setscheduler_nocheck(t, SCHED_FIFO, &sp); @@ -14775,7 +14777,7 @@ index ade42d6a9..eebb9b454 100644 /* Don't allow time recalculation while creating a new task. */ diff --git a/kernel/rcu/tree_stall.h b/kernel/rcu/tree_stall.h -index e09f4f624..311483048 100644 +index 11a1fac3a..6f085a159 100644 --- a/kernel/rcu/tree_stall.h +++ b/kernel/rcu/tree_stall.h @@ -8,6 +8,7 @@ @@ -14786,7 +14788,7 @@ index e09f4f624..311483048 100644 ////////////////////////////////////////////////////////////////////////////// // -@@ -603,6 +604,8 @@ static void print_other_cpu_stall(unsigned long gp_seq, unsigned long gps) +@@ -604,6 +605,8 @@ static void print_other_cpu_stall(unsigned long gp_seq, unsigned long gps) if (rcu_stall_is_suppressed()) return; @@ -14795,7 +14797,7 @@ index e09f4f624..311483048 100644 /* * OK, time to rat on our buddy... * See Documentation/RCU/stallwarn.rst for info on how to debug -@@ -657,6 +660,8 @@ static void print_other_cpu_stall(unsigned long gp_seq, unsigned long gps) +@@ -658,6 +661,8 @@ static void print_other_cpu_stall(unsigned long gp_seq, unsigned long gps) panic_on_rcu_stall(); rcu_force_quiescent_state(); /* Kick them all. */ @@ -14805,7 +14807,7 @@ index e09f4f624..311483048 100644 static void print_cpu_stall(unsigned long gps) diff --git a/kernel/sched/core.c b/kernel/sched/core.c -index 07bcc5f2e..7a6b82e1f 100644 +index 7a9aff1db..dcf660b79 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -901,14 +901,15 @@ static inline void hrtick_rq_init(struct rq *rq) @@ -14913,7 +14915,7 @@ index 07bcc5f2e..7a6b82e1f 100644 smp_send_reschedule(cpu); else trace_sched_wake_idle_without_ipi(cpu); -@@ -6777,10 +6797,14 @@ void __noreturn do_task_dead(void) +@@ -6775,10 +6795,14 @@ void __noreturn do_task_dead(void) static inline void sched_submit_work(struct task_struct *tsk) { @@ -14930,7 +14932,7 @@ index 07bcc5f2e..7a6b82e1f 100644 task_flags = tsk->flags; /* -@@ -6806,6 +6830,8 @@ static inline void sched_submit_work(struct task_struct *tsk) +@@ -6804,6 +6828,8 @@ static inline void sched_submit_work(struct task_struct *tsk) * make sure to submit it to avoid deadlocks. */ blk_flush_plug(tsk->plug, true); @@ -14939,7 +14941,7 @@ index 07bcc5f2e..7a6b82e1f 100644 } static void sched_update_worker(struct task_struct *tsk) -@@ -6818,16 +6844,26 @@ static void sched_update_worker(struct task_struct *tsk) +@@ -6816,16 +6842,26 @@ static void sched_update_worker(struct task_struct *tsk) } } @@ -14971,7 +14973,7 @@ index 07bcc5f2e..7a6b82e1f 100644 sched_update_worker(tsk); } EXPORT_SYMBOL(schedule); -@@ -6891,11 +6927,7 @@ void __sched schedule_preempt_disabled(void) +@@ -6889,11 +6925,7 @@ void __sched schedule_preempt_disabled(void) #ifdef CONFIG_PREEMPT_RT void __sched notrace schedule_rtlock(void) { @@ -14984,7 +14986,7 @@ index 07bcc5f2e..7a6b82e1f 100644 } NOKPROBE_SYMBOL(schedule_rtlock); #endif -@@ -7091,6 +7123,32 @@ static void __setscheduler_prio(struct task_struct *p, int prio) +@@ -7089,6 +7121,32 @@ static void __setscheduler_prio(struct task_struct *p, int prio) #ifdef CONFIG_RT_MUTEXES @@ -15017,7 +15019,7 @@ index 07bcc5f2e..7a6b82e1f 100644 static inline int __rt_effective_prio(struct task_struct *pi_task, int prio) { if (pi_task) -@@ -8953,6 +9011,21 @@ static inline void preempt_dynamic_init(void) { } +@@ -8951,6 +9009,21 @@ static inline void preempt_dynamic_init(void) { } #endif /* #ifdef CONFIG_PREEMPT_DYNAMIC */ @@ -15077,7 +15079,7 @@ index 8b3063398..76530c8b3 100644 } late_initcall(sched_init_debug); diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c -index 8de28b182..196536f0a 100644 +index d5ae744de..51cc50a7e 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); @@ -15145,7 +15147,7 @@ index 8de28b182..196536f0a 100644 static void update_curr_fair(struct rq *rq) { update_curr(cfs_rq_of(&rq->curr->se)); -@@ -5631,7 +5647,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) +@@ -5629,7 +5645,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) /* * Update run-time statistics of the 'current'. */ @@ -15154,7 +15156,7 @@ index 8de28b182..196536f0a 100644 /* * Ensure that runnable average is periodically updated. -@@ -5645,7 +5661,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) +@@ -5643,7 +5659,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) * validating it and just reschedule. */ if (queued) { @@ -15163,7 +15165,7 @@ index 8de28b182..196536f0a 100644 return; } /* -@@ -5791,7 +5807,7 @@ static void __account_cfs_rq_runtime(struct cfs_rq *cfs_rq, u64 delta_exec) +@@ -5789,7 +5805,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)) @@ -15172,7 +15174,7 @@ index 8de28b182..196536f0a 100644 } static __always_inline -@@ -6090,7 +6106,7 @@ void unthrottle_cfs_rq(struct cfs_rq *cfs_rq) +@@ -6088,7 +6104,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) @@ -15181,7 +15183,7 @@ index 8de28b182..196536f0a 100644 } #ifdef CONFIG_SMP -@@ -7291,7 +7307,7 @@ static void hrtick_start_fair(struct rq *rq, struct task_struct *p) +@@ -7333,7 +7349,7 @@ static void hrtick_start_fair(struct rq *rq, struct task_struct *p) if (delta < 0) { if (task_current(rq, p)) @@ -15190,7 +15192,7 @@ index 8de28b182..196536f0a 100644 return; } hrtick_start(rq, delta); -@@ -9231,7 +9247,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ +@@ -9314,7 +9330,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. */ @@ -15198,8 +15200,8 @@ index 8de28b182..196536f0a 100644 + if (need_resched()) return; - /* Idle tasks are by definition preempted by non-idle tasks. */ -@@ -9273,7 +9289,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ + if (!sched_feat(WAKEUP_PREEMPTION)) +@@ -9356,7 +9372,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ return; preempt: @@ -15208,7 +15210,7 @@ index 8de28b182..196536f0a 100644 } #ifdef CONFIG_QOS_SCHED -@@ -9756,8 +9772,7 @@ static bool _qos_smt_check_need_resched(int this_cpu, struct rq *rq) +@@ -9839,8 +9855,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 @@ -15218,7 +15220,7 @@ index 8de28b182..196536f0a 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. */ -@@ -14139,7 +14154,7 @@ static inline void task_tick_core(struct rq *rq, struct task_struct *curr) +@@ -14214,7 +14229,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)) @@ -15227,7 +15229,7 @@ index 8de28b182..196536f0a 100644 } /* -@@ -14455,7 +14470,7 @@ prio_changed_fair(struct rq *rq, struct task_struct *p, int oldprio) +@@ -14530,7 +14545,7 @@ prio_changed_fair(struct rq *rq, struct task_struct *p, int oldprio) */ if (task_current(rq, p)) { if (p->prio > oldprio) @@ -15281,11 +15283,11 @@ index 77bb7ee8c..6dedad4f4 100644 rd->rto_cpu = -1; diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h -index 9de2bac64..0f60c4654 100644 +index 761870540..f9918a975 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h -@@ -2600,6 +2600,7 @@ extern void init_sched_fair_class(void); - extern void reweight_task(struct task_struct *p, int prio); +@@ -2601,6 +2601,7 @@ extern void init_sched_fair_class(void); + extern void reweight_task(struct task_struct *p, const struct load_weight *lw); extern void resched_curr(struct rq *rq); +extern void resched_curr_lazy(struct rq *rq); @@ -15293,7 +15295,7 @@ index 9de2bac64..0f60c4654 100644 extern struct rt_bandwidth def_rt_bandwidth; diff --git a/kernel/signal.c b/kernel/signal.c -index 28cddef39..cf2c75e3e 100644 +index f36c58ea7..0f2615143 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, @@ -15338,7 +15340,7 @@ index 28cddef39..cf2c75e3e 100644 cgroup_leave_frozen(true); diff --git a/kernel/softirq.c b/kernel/softirq.c -index 210cf5f8d..cae0ae2e2 100644 +index bd9716d7b..2fde8af88 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -247,6 +247,19 @@ void __local_bh_enable_ip(unsigned long ip, unsigned int cnt) @@ -15361,7 +15363,7 @@ index 210cf5f8d..cae0ae2e2 100644 /* * Invoked from ksoftirqd_run() outside of the interrupt disabled section * to acquire the per CPU local lock for reentrancy protection. -@@ -619,6 +632,24 @@ static inline void tick_irq_exit(void) +@@ -623,6 +636,24 @@ static inline void tick_irq_exit(void) #endif } @@ -15386,7 +15388,7 @@ index 210cf5f8d..cae0ae2e2 100644 static inline void __irq_exit_rcu(void) { #ifndef __ARCH_IRQ_EXIT_IRQS_DISABLED -@@ -631,6 +662,10 @@ static inline void __irq_exit_rcu(void) +@@ -635,6 +666,10 @@ static inline void __irq_exit_rcu(void) if (!in_interrupt() && local_softirq_pending()) invoke_softirq(); @@ -15397,7 +15399,7 @@ index 210cf5f8d..cae0ae2e2 100644 tick_irq_exit(); } -@@ -963,12 +998,70 @@ static struct smp_hotplug_thread softirq_threads = { +@@ -967,12 +1002,70 @@ static struct smp_hotplug_thread softirq_threads = { .thread_comm = "ksoftirqd/%u", }; @@ -15470,10 +15472,10 @@ index 210cf5f8d..cae0ae2e2 100644 } early_initcall(spawn_ksoftirqd); diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c -index edb0f821d..a72900121 100644 +index 57e5cb36f..c4ae45701 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c -@@ -1809,7 +1809,7 @@ void hrtimer_interrupt(struct clock_event_device *dev) +@@ -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; @@ -15482,7 +15484,7 @@ index edb0f821d..a72900121 100644 } __hrtimer_run_queues(cpu_base, now, flags, HRTIMER_ACTIVE_HARD); -@@ -1922,7 +1922,7 @@ void hrtimer_run_queues(void) +@@ -1925,7 +1925,7 @@ void hrtimer_run_queues(void) if (!ktime_before(now, cpu_base->softirq_expires_next)) { cpu_base->softirq_expires_next = KTIME_MAX; cpu_base->softirq_activated = 1; @@ -15536,7 +15538,7 @@ index 63a8ce717..b3fbe97d1 100644 /* diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c -index c0831e669..5436270e0 100644 +index 8f92edf15..b2bdd1863 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) @@ -15585,10 +15587,10 @@ index 3b7d3e9eb..5a4fefbc0 100644 need_resched = 'p'; break; diff --git a/net/core/dev.c b/net/core/dev.c -index 1f6c8945f..1e8928cd3 100644 +index 540ab980e..8bbcd7283 100644 --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4705,15 +4705,6 @@ static void rps_trigger_softirq(void *data) +@@ -4715,15 +4715,6 @@ static void rps_trigger_softirq(void *data) #endif /* CONFIG_RPS */ @@ -15604,7 +15606,7 @@ index 1f6c8945f..1e8928cd3 100644 /* * After we queued a packet into sd->input_pkt_queue, * we need to make sure this queue is serviced soon. -@@ -6682,6 +6673,32 @@ static void skb_defer_free_flush(struct softnet_data *sd) +@@ -6692,6 +6683,32 @@ static void skb_defer_free_flush(struct softnet_data *sd) } } @@ -15637,7 +15639,7 @@ index 1f6c8945f..1e8928cd3 100644 static int napi_threaded_poll(void *data) { struct napi_struct *napi = data; -@@ -11618,7 +11635,11 @@ static int __init net_dev_init(void) +@@ -11629,7 +11646,11 @@ static int __init net_dev_init(void) INIT_CSD(&sd->csd, rps_trigger_softirq, sd); sd->cpu = i; #endif @@ -15650,10 +15652,10 @@ index 1f6c8945f..1e8928cd3 100644 init_gro_hash(&sd->backlog); diff --git a/net/core/skbuff.c b/net/core/skbuff.c -index 60876262b..02e2bab1e 100644 +index f0a9ef1ae..682175af4 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c -@@ -6852,8 +6852,13 @@ nodefer: __kfree_skb(skb); +@@ -6863,8 +6863,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). */ diff --git a/_multibuild b/_multibuild index 0f374d0..356fd9f 100644 --- a/_multibuild +++ b/_multibuild @@ -1,4 +1,5 @@ raspberrypi-kernel haoc-kernel + raspberrypi-kernel-rt diff --git a/kernel-rt.spec b/kernel-rt.spec index 5bcd59e..50c3a08 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 27 +%global devel_release 64 %global maintenance_release .0.0 -%global pkg_release .4 +%global pkg_release .5 %global rt_release .rt30 %define with_debuginfo 1 @@ -1057,6 +1057,9 @@ fi %endif %changelog +* Mon Dec 16 2024 zhangyu - 6.6.0-64.0.0.5 +- update kernel-rt version to 6.6.0-64.0.0.5 + * Tue May 21 2024 zhangyu - 6.6.0-27.0.0.4 - update kernel-rt version to 6.6.0-27.0.0.3 diff --git a/patch-6.6.0-6.0.0-rt20.patch b/patch-6.6.0-6.0.0-rt20.patch index db2a1ba..4d5c8ad 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 a8b87098c93aa630d286de4af9637a247d55a370 Mon Sep 17 00:00:00 2001 +From 6d7557e902fe417498dcee655291a7cb4320bf7d Mon Sep 17 00:00:00 2001 From: zhangyu -Date: Fri, 17 May 2024 15:06:01 +0800 -Subject: [PATCH] rpi-rt +Date: Tue, 12 Nov 2024 15:20:05 +0800 +Subject: [PATCH] rt1 --- arch/arm/Kconfig | 6 +- @@ -24,6 +24,8 @@ Subject: [PATCH] rpi-rt drivers/acpi/processor_idle.c | 2 +- drivers/block/zram/zram_drv.c | 37 + drivers/block/zram/zram_drv.h | 3 + + drivers/crypto/ccp/hygon/psp-dev.c | 2 +- + drivers/crypto/ccp/hygon/tdm-dev.c | 2 +- .../gpu/drm/amd/display/amdgpu_dm/dc_fpu.c | 53 +- .../drm/amd/display/dc/dcn20/dcn20_resource.c | 10 +- .../drm/amd/display/dc/dcn21/dcn21_resource.c | 10 +- @@ -32,7 +34,7 @@ Subject: [PATCH] rpi-rt drivers/gpu/drm/i915/Kconfig | 1 - drivers/gpu/drm/i915/display/intel_crtc.c | 15 +- drivers/gpu/drm/i915/display/intel_vblank.c | 6 +- - drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 5 +- + drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 7 +- .../drm/i915/gt/intel_execlists_submission.c | 17 +- drivers/gpu/drm/i915/gt/intel_reset.c | 12 +- drivers/gpu/drm/i915/gt/uc/intel_guc.h | 2 +- @@ -168,11 +170,11 @@ Subject: [PATCH] rpi-rt kernel/trace/trace_output.c | 16 +- net/core/dev.c | 39 +- net/core/skbuff.c | 7 +- - 164 files changed, 5041 insertions(+), 1542 deletions(-) + 166 files changed, 5047 insertions(+), 1542 deletions(-) create mode 100644 kernel/printk/nbcon.c diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index 2483ce304..52707a682 100644 +index 749935e2e..46910150c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -34,6 +34,7 @@ config ARM @@ -234,7 +236,7 @@ index fef62e4a9..622a30243 100644 return 0; } diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c -index a1ff693e4..adcc34042 100644 +index 7e8773a2d..9fde36fcb 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c @@ -55,6 +55,34 @@ extern unsigned int VFP_arch_feroceon __alias(VFP_arch); @@ -272,7 +274,7 @@ index a1ff693e4..adcc34042 100644 /* * Is 'thread's most up to date state stored in this CPUs hardware? * Must be called from non-preemptible context. -@@ -243,7 +271,7 @@ static void vfp_panic(char *reason, u32 inst) +@@ -240,7 +268,7 @@ static void vfp_panic(char *reason, u32 inst) /* * Process bitmask of exception conditions. */ @@ -281,7 +283,7 @@ index a1ff693e4..adcc34042 100644 { int si_code = 0; -@@ -251,8 +279,7 @@ static void vfp_raise_exceptions(u32 exceptions, u32 inst, u32 fpscr, struct pt_ +@@ -248,8 +276,7 @@ static void vfp_raise_exceptions(u32 exceptions, u32 inst, u32 fpscr, struct pt_ if (exceptions == VFP_EXCEPTION_ERROR) { vfp_panic("unhandled bounce", inst); @@ -291,7 +293,7 @@ index a1ff693e4..adcc34042 100644 } /* -@@ -280,8 +307,7 @@ static void vfp_raise_exceptions(u32 exceptions, u32 inst, u32 fpscr, struct pt_ +@@ -277,8 +304,7 @@ static void vfp_raise_exceptions(u32 exceptions, u32 inst, u32 fpscr, struct pt_ RAISE(FPSCR_OFC, FPSCR_OFE, FPE_FLTOVF); RAISE(FPSCR_IOC, FPSCR_IOE, FPE_FLTINV); @@ -301,7 +303,7 @@ index a1ff693e4..adcc34042 100644 } /* -@@ -327,6 +353,8 @@ static u32 vfp_emulate_instruction(u32 inst, u32 fpscr, struct pt_regs *regs) +@@ -324,6 +350,8 @@ static u32 vfp_emulate_instruction(u32 inst, u32 fpscr, struct pt_regs *regs) static void VFP_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs) { u32 fpscr, orig_fpscr, fpsid, exceptions; @@ -310,7 +312,7 @@ index a1ff693e4..adcc34042 100644 pr_debug("VFP: bounce: trigger %08x fpexc %08x\n", trigger, fpexc); -@@ -372,8 +400,8 @@ static void VFP_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs) +@@ -369,8 +397,8 @@ static void VFP_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs) * unallocated VFP instruction but with FPSCR.IXE set and not * on VFP subarch 1. */ @@ -321,7 +323,7 @@ index a1ff693e4..adcc34042 100644 } /* -@@ -397,14 +425,14 @@ static void VFP_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs) +@@ -394,14 +422,14 @@ static void VFP_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs) */ exceptions = vfp_emulate_instruction(trigger, fpscr, regs); if (exceptions) @@ -338,7 +340,7 @@ index a1ff693e4..adcc34042 100644 /* * The barrier() here prevents fpinst2 being read -@@ -416,7 +444,13 @@ static void VFP_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs) +@@ -413,7 +441,13 @@ static void VFP_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs) emulate: exceptions = vfp_emulate_instruction(trigger, orig_fpscr, regs); if (exceptions) @@ -353,7 +355,7 @@ index a1ff693e4..adcc34042 100644 } static void vfp_enable(void *unused) -@@ -518,11 +552,9 @@ static inline void vfp_pm_init(void) { } +@@ -512,11 +546,9 @@ static inline void vfp_pm_init(void) { } */ void vfp_sync_hwstate(struct thread_info *thread) { @@ -367,7 +369,7 @@ index a1ff693e4..adcc34042 100644 u32 fpexc = fmrx(FPEXC); /* -@@ -534,8 +566,7 @@ void vfp_sync_hwstate(struct thread_info *thread) +@@ -527,8 +559,7 @@ void vfp_sync_hwstate(struct thread_info *thread) fmxr(FPEXC, fpexc); } @@ -377,7 +379,7 @@ index a1ff693e4..adcc34042 100644 } /* Ensure that the thread reloads the hardware VFP state on the next use. */ -@@ -695,7 +726,7 @@ static int vfp_support_entry(struct pt_regs *regs, u32 trigger) +@@ -683,7 +714,7 @@ static int vfp_support_entry(struct pt_regs *regs, u32 trigger) if (!user_mode(regs)) return vfp_kmode_exception(regs, trigger); @@ -386,7 +388,7 @@ index a1ff693e4..adcc34042 100644 fpexc = fmrx(FPEXC); /* -@@ -760,6 +791,7 @@ static int vfp_support_entry(struct pt_regs *regs, u32 trigger) +@@ -748,6 +779,7 @@ static int vfp_support_entry(struct pt_regs *regs, u32 trigger) * replay the instruction that trapped. */ fmxr(FPEXC, fpexc); @@ -394,7 +396,7 @@ index a1ff693e4..adcc34042 100644 } else { /* Check for synchronous or asynchronous exceptions */ if (!(fpexc & (FPEXC_EX | FPEXC_DEX))) { -@@ -774,17 +806,17 @@ static int vfp_support_entry(struct pt_regs *regs, u32 trigger) +@@ -762,17 +794,17 @@ static int vfp_support_entry(struct pt_regs *regs, u32 trigger) if (!(fpscr & FPSCR_IXE)) { if (!(fpscr & FPSCR_LENGTH_MASK)) { pr_debug("not VFP\n"); @@ -414,7 +416,7 @@ index a1ff693e4..adcc34042 100644 return 0; } -@@ -831,7 +863,7 @@ void kernel_neon_begin(void) +@@ -819,7 +851,7 @@ void kernel_neon_begin(void) unsigned int cpu; u32 fpexc; @@ -423,7 +425,7 @@ index a1ff693e4..adcc34042 100644 /* * Kernel mode NEON is only allowed outside of hardirq context with -@@ -863,7 +895,7 @@ void kernel_neon_end(void) +@@ -850,7 +882,7 @@ void kernel_neon_end(void) { /* Disable the NEON/VFP unit. */ fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN); @@ -433,10 +435,10 @@ index a1ff693e4..adcc34042 100644 EXPORT_SYMBOL(kernel_neon_end); diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig -index bb49f48de..699c3f58a 100644 +index 58ee09b13..bd83a45b3 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig -@@ -98,6 +98,7 @@ config ARM64 +@@ -99,6 +99,7 @@ config ARM64 select ARCH_SUPPORTS_NUMA_BALANCING select ARCH_SUPPORTS_PAGE_TABLE_CHECK select ARCH_SUPPORTS_PER_VMA_LOCK @@ -531,7 +533,7 @@ index 4ebf2ef28..381c3be3b 100644 select MPIC select OF_DYNAMIC diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c -index e8c412969..c61e29dea 100644 +index b1e6d275c..9a8d3970d 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c @@ -25,6 +25,7 @@ @@ -626,10 +628,10 @@ index e8c412969..c61e29dea 100644 } diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig -index bb40f2eae..63cdc5c2f 100644 +index 3be10e723..2a848e2c0 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig -@@ -48,6 +48,7 @@ config RISCV +@@ -49,6 +49,7 @@ config RISCV select ARCH_SUPPORTS_HUGETLBFS if MMU select ARCH_SUPPORTS_PAGE_TABLE_CHECK if MMU select ARCH_SUPPORTS_PER_VMA_LOCK if MMU @@ -637,7 +639,7 @@ index bb40f2eae..63cdc5c2f 100644 select ARCH_USE_MEMTEST select ARCH_USE_QUEUED_RWLOCKS select ARCH_USES_CFI_TRAPS if CFI_CLANG -@@ -136,6 +137,7 @@ config RISCV +@@ -137,6 +138,7 @@ config RISCV select HAVE_PERF_USER_STACK_DUMP select HAVE_POSIX_CPU_TIMERS_TASK_WORK select HAVE_PREEMPT_DYNAMIC_KEY if !XIP_KERNEL @@ -657,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 d18ce0113..e18710fe5 100644 +index 4fb84c2e9..61d990f69 100644 --- a/arch/riscv/include/asm/thread_info.h +++ b/arch/riscv/include/asm/thread_info.h -@@ -82,6 +82,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); +@@ -87,6 +87,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) */ @@ -668,7 +670,7 @@ index d18ce0113..e18710fe5 100644 #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ #define TIF_SIGPENDING 2 /* signal pending */ #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ -@@ -96,6 +97,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); +@@ -101,6 +102,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) @@ -838,10 +840,10 @@ index 1b8da4e40..2cb5e6514 100644 if (has_vector()) { if (riscv_v_setup_vsize()) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig -index a993a3716..aa7ab6207 100644 +index 958a491fb..acb9d6f2a 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig -@@ -121,6 +121,7 @@ config X86 +@@ -122,6 +122,7 @@ config X86 select ARCH_USES_CFI_TRAPS if X86_64 && CFI_CLANG select ARCH_SUPPORTS_LTO_CLANG select ARCH_SUPPORTS_LTO_CLANG_THIN @@ -849,7 +851,7 @@ index a993a3716..aa7ab6207 100644 select ARCH_USE_BUILTIN_BSWAP select ARCH_USE_MEMTEST select ARCH_USE_QUEUED_RWLOCKS -@@ -277,6 +278,7 @@ config X86 +@@ -278,6 +279,7 @@ config X86 select HAVE_STATIC_CALL select HAVE_STATIC_CALL_INLINE if HAVE_OBJTOOL select HAVE_PREEMPT_DYNAMIC_CALL @@ -882,10 +884,10 @@ 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 bd6a7857c..d45dfd10b 100644 +index 831fa4a12..5af3ebec0 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c -@@ -108,7 +108,7 @@ static const struct dmi_system_id processor_power_dmi_table[] = { +@@ -107,7 +107,7 @@ static const struct dmi_system_id processor_power_dmi_table[] = { */ static void __cpuidle acpi_safe_halt(void) { @@ -895,7 +897,7 @@ index bd6a7857c..d45dfd10b 100644 raw_local_irq_disable(); } diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c -index d77d3664c..d083a5dfb 100644 +index 1ffc53ff5..2594265e0 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); @@ -970,6 +972,32 @@ index d090753f9..833abc17d 100644 #ifdef CONFIG_ZRAM_MEMORY_TRACKING ktime_t ac_time; #endif +diff --git a/drivers/crypto/ccp/hygon/psp-dev.c b/drivers/crypto/ccp/hygon/psp-dev.c +index c150aa163..cdd2d1a39 100644 +--- a/drivers/crypto/ccp/hygon/psp-dev.c ++++ b/drivers/crypto/ccp/hygon/psp-dev.c +@@ -17,7 +17,7 @@ + #include + #include + #include +-#include ++//#include + + #include "psp-dev.h" + +diff --git a/drivers/crypto/ccp/hygon/tdm-dev.c b/drivers/crypto/ccp/hygon/tdm-dev.c +index 42322c6bd..46aa8b02d 100644 +--- a/drivers/crypto/ccp/hygon/tdm-dev.c ++++ b/drivers/crypto/ccp/hygon/tdm-dev.c +@@ -12,7 +12,7 @@ + #include + #include + #include +-#include ++//#include + #include + #include + #include diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c b/drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c index 172aa10a8..4ae472053 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c @@ -1073,7 +1101,7 @@ 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 d587f807d..5036a3e60 100644 +index 94bf438c7..ef401cc81 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, @@ -1139,7 +1167,7 @@ index 8a5a038fd..68970d6cf 100644 DC_LOGGER_INIT(dc->ctx->logger); BW_VAL_TRACE_COUNT(); -@@ -2062,16 +2061,14 @@ static bool dcn20_validate_bandwidth_internal(struct dc *dc, struct dc_state *co +@@ -2062,16 +2061,14 @@ validate_fail: out = false; validate_out: @@ -1202,7 +1230,7 @@ index 8a5a038fd..68970d6cf 100644 DC_LOGGER_INIT(dc->ctx->logger); BW_VAL_TRACE_COUNT(); -@@ -2362,7 +2358,6 @@ bool dcn21_validate_bandwidth_fp(struct dc *dc, +@@ -2362,7 +2358,6 @@ validate_fail: out = false; validate_out: @@ -1325,24 +1353,25 @@ index f5659ebd0..5b6d2f555 100644 spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags); diff --git a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c -index ecc990ec1..8d04b1068 100644 +index f2973cd1a..aa77f8601 100644 --- a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c +++ b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c -@@ -312,10 +312,9 @@ void __intel_breadcrumbs_park(struct intel_breadcrumbs *b) +@@ -315,7 +315,12 @@ void __intel_breadcrumbs_park(struct intel_breadcrumbs *b) + return; + /* Kick the work once more to drain the signalers, and disarm the irq */ - irq_work_sync(&b->irq_work); - while (READ_ONCE(b->irq_armed) && !atomic_read(&b->active)) { -- local_irq_disable(); -- signal_irq_work(&b->irq_work); -- local_irq_enable(); +- irq_work_queue(&b->irq_work); ++ irq_work_sync(&b->irq_work); ++ while (READ_ONCE(b->irq_armed) && !atomic_read(&b->active)) { + irq_work_queue(&b->irq_work); - cond_resched(); ++ cond_resched(); + irq_work_sync(&b->irq_work); - } ++ } } + void intel_breadcrumbs_free(struct kref *kref) diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c -index 42e09f158..ac80e229f 100644 +index 2065be5a1..73d815fc5 100644 --- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c +++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c @@ -1303,7 +1303,7 @@ static void execlists_dequeue(struct intel_engine_cs *engine) @@ -1372,7 +1401,7 @@ index 42e09f158..ac80e229f 100644 return; /* leave this for another sibling */ } -@@ -1591,7 +1591,7 @@ static void execlists_dequeue(struct intel_engine_cs *engine) +@@ -1591,7 +1591,7 @@ done: */ sched_engine->queue_priority_hint = queue_prio(sched_engine); i915_sched_engine_reset_on_empty(sched_engine); @@ -1381,7 +1410,7 @@ index 42e09f158..ac80e229f 100644 /* * We can skip poking the HW if we ended up with exactly the same set -@@ -1617,13 +1617,6 @@ static void execlists_dequeue(struct intel_engine_cs *engine) +@@ -1617,13 +1617,6 @@ done: } } @@ -1596,7 +1625,7 @@ index 4a9e71b2d..021949f25 100644 lsr = serial_port_in(port, UART_LSR); diff --git a/drivers/tty/serial/8250/8250_bcm7271.c b/drivers/tty/serial/8250/8250_bcm7271.c -index aa5aff046..ff0662c68 100644 +index 9afd5979c..db23b3a02 100644 --- a/drivers/tty/serial/8250/8250_bcm7271.c +++ b/drivers/tty/serial/8250/8250_bcm7271.c @@ -567,7 +567,7 @@ static irqreturn_t brcmuart_isr(int irq, void *dev_id) @@ -1648,7 +1677,7 @@ index aa5aff046..ff0662c68 100644 serial8250_do_shutdown(port); } -@@ -788,7 +788,7 @@ static int brcmuart_handle_irq(struct uart_port *p) +@@ -807,7 +807,7 @@ static int brcmuart_handle_irq(struct uart_port *p) * interrupt but there is no data ready. */ if (((iir & UART_IIR_ID) == UART_IIR_RX_TIMEOUT) && !(priv->shutdown)) { @@ -1657,7 +1686,7 @@ index aa5aff046..ff0662c68 100644 status = serial_port_in(p, UART_LSR); if ((status & UART_LSR_DR) == 0) { -@@ -813,7 +813,7 @@ static int brcmuart_handle_irq(struct uart_port *p) +@@ -832,7 +832,7 @@ static int brcmuart_handle_irq(struct uart_port *p) handled = 1; } @@ -1666,7 +1695,7 @@ index aa5aff046..ff0662c68 100644 if (handled) return 1; } -@@ -831,7 +831,7 @@ static enum hrtimer_restart brcmuart_hrtimer_func(struct hrtimer *t) +@@ -850,7 +850,7 @@ static enum hrtimer_restart brcmuart_hrtimer_func(struct hrtimer *t) if (priv->shutdown) return HRTIMER_NORESTART; @@ -1675,7 +1704,7 @@ index aa5aff046..ff0662c68 100644 status = serial_port_in(p, UART_LSR); /* -@@ -855,7 +855,7 @@ static enum hrtimer_restart brcmuart_hrtimer_func(struct hrtimer *t) +@@ -874,7 +874,7 @@ static enum hrtimer_restart brcmuart_hrtimer_func(struct hrtimer *t) status |= UART_MCR_RTS; serial_port_out(p, UART_MCR, status); } @@ -1684,7 +1713,7 @@ index aa5aff046..ff0662c68 100644 return HRTIMER_NORESTART; } -@@ -1154,10 +1154,10 @@ static int __maybe_unused brcmuart_suspend(struct device *dev) +@@ -1173,10 +1173,10 @@ static int __maybe_unused brcmuart_suspend(struct device *dev) * This will prevent resume from enabling RTS before the * baud rate has been restored. */ @@ -1697,7 +1726,7 @@ index aa5aff046..ff0662c68 100644 serial8250_suspend_port(priv->line); clk_disable_unprepare(priv->baud_mux_clk); -@@ -1196,10 +1196,10 @@ static int __maybe_unused brcmuart_resume(struct device *dev) +@@ -1215,10 +1215,10 @@ static int __maybe_unused brcmuart_resume(struct device *dev) if (priv->saved_mctrl & TIOCM_RTS) { /* Restore RTS */ @@ -1711,10 +1740,10 @@ index aa5aff046..ff0662c68 100644 return 0; diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c -index e561f21cd..594201fbc 100644 +index 3449f8790..30434718f 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c -@@ -271,7 +271,7 @@ static void serial8250_backup_timeout(struct timer_list *t) +@@ -259,7 +259,7 @@ static void serial8250_backup_timeout(struct timer_list *t) unsigned int iir, ier = 0, lsr; unsigned long flags; @@ -1723,7 +1752,7 @@ index e561f21cd..594201fbc 100644 /* * Must disable interrupts or else we risk racing with the interrupt -@@ -304,7 +304,7 @@ static void serial8250_backup_timeout(struct timer_list *t) +@@ -292,7 +292,7 @@ static void serial8250_backup_timeout(struct timer_list *t) if (up->port.irq) serial_out(up, UART_IER, ier); @@ -1732,7 +1761,7 @@ index e561f21cd..594201fbc 100644 /* Standard timer interval plus 0.2s to keep the port running */ mod_timer(&up->timer, -@@ -607,6 +607,7 @@ serial8250_register_ports(struct uart_driver *drv, struct device *dev) +@@ -592,6 +592,7 @@ serial8250_register_ports(struct uart_driver *drv, struct device *dev) #ifdef CONFIG_SERIAL_8250_CONSOLE @@ -1740,7 +1769,7 @@ index e561f21cd..594201fbc 100644 static void univ8250_console_write(struct console *co, const char *s, unsigned int count) { -@@ -614,6 +615,37 @@ static void univ8250_console_write(struct console *co, const char *s, +@@ -599,6 +600,37 @@ static void univ8250_console_write(struct console *co, const char *s, serial8250_console_write(up, s, count); } @@ -1778,7 +1807,7 @@ index e561f21cd..594201fbc 100644 static int univ8250_console_setup(struct console *co, char *options) { -@@ -713,12 +745,20 @@ static int univ8250_console_match(struct console *co, char *name, int idx, +@@ -698,12 +730,20 @@ static int univ8250_console_match(struct console *co, char *name, int idx, static struct console univ8250_console = { .name = "ttyS", @@ -1800,7 +1829,7 @@ index e561f21cd..594201fbc 100644 .index = -1, .data = &serial8250_reg, }; -@@ -1007,11 +1047,11 @@ static void serial_8250_overrun_backoff_work(struct work_struct *work) +@@ -992,11 +1032,11 @@ static void serial_8250_overrun_backoff_work(struct work_struct *work) struct uart_port *port = &up->port; unsigned long flags; @@ -1814,7 +1843,7 @@ index e561f21cd..594201fbc 100644 } /** -@@ -1209,9 +1249,9 @@ void serial8250_unregister_port(int line) +@@ -1194,9 +1234,9 @@ void serial8250_unregister_port(int line) if (uart->em485) { unsigned long flags; @@ -1896,10 +1925,10 @@ index a1f2259cc..53c284bb2 100644 if (status & (UART_LSR_DR | UART_LSR_BI)) { dw8250_writel_ext(p, RZN1_UART_RDMACR, 0); diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c -index 4d20f3aa2..342786064 100644 +index 27430fdd9..17be6ad24 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c -@@ -201,9 +201,9 @@ static int xr17v35x_startup(struct uart_port *port) +@@ -243,9 +243,9 @@ static int xr17v35x_startup(struct uart_port *port) * * Synchronize UART_IER access against the console. */ @@ -1939,7 +1968,7 @@ index 6af4e1c12..f522eb502 100644 } diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c -index 74da5676c..23457daae 100644 +index 28f9a2679..33699e86e 100644 --- a/drivers/tty/serial/8250/8250_mtk.c +++ b/drivers/tty/serial/8250/8250_mtk.c @@ -102,7 +102,7 @@ static void mtk8250_dma_rx_complete(void *param) @@ -1960,7 +1989,7 @@ index 74da5676c..23457daae 100644 } static void mtk8250_rx_dma(struct uart_8250_port *up) -@@ -368,7 +368,7 @@ mtk8250_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -372,7 +372,7 @@ mtk8250_set_termios(struct uart_port *port, struct ktermios *termios, * Ok, we're now changing the port state. Do it with * interrupts disabled. */ @@ -1969,7 +1998,7 @@ index 74da5676c..23457daae 100644 /* * Update the per-port timeout. -@@ -416,7 +416,7 @@ mtk8250_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -420,7 +420,7 @@ mtk8250_set_termios(struct uart_port *port, struct ktermios *termios, if (uart_console(port)) up->port.cons->cflag = termios->c_cflag; @@ -1979,10 +2008,10 @@ index 74da5676c..23457daae 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 346167afe..db5519ce0 100644 +index 4caecc352..d732ad6a7 100644 --- a/drivers/tty/serial/8250/8250_omap.c +++ b/drivers/tty/serial/8250/8250_omap.c -@@ -401,7 +401,7 @@ static void omap_8250_set_termios(struct uart_port *port, +@@ -405,7 +405,7 @@ static void omap_8250_set_termios(struct uart_port *port, * interrupts disabled. */ pm_runtime_get_sync(port->dev); @@ -1991,7 +2020,7 @@ index 346167afe..db5519ce0 100644 /* * Update the per-port timeout. -@@ -504,7 +504,7 @@ static void omap_8250_set_termios(struct uart_port *port, +@@ -508,7 +508,7 @@ static void omap_8250_set_termios(struct uart_port *port, } omap8250_restore_regs(up); @@ -2000,7 +2029,7 @@ index 346167afe..db5519ce0 100644 pm_runtime_mark_last_busy(port->dev); pm_runtime_put_autosuspend(port->dev); -@@ -529,7 +529,7 @@ static void omap_8250_pm(struct uart_port *port, unsigned int state, +@@ -533,7 +533,7 @@ static void omap_8250_pm(struct uart_port *port, unsigned int state, pm_runtime_get_sync(port->dev); /* Synchronize UART_IER access against the console. */ @@ -2009,7 +2038,7 @@ index 346167afe..db5519ce0 100644 serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B); efr = serial_in(up, UART_EFR); -@@ -541,7 +541,7 @@ static void omap_8250_pm(struct uart_port *port, unsigned int state, +@@ -545,7 +545,7 @@ static void omap_8250_pm(struct uart_port *port, unsigned int state, serial_out(up, UART_EFR, efr); serial_out(up, UART_LCR, 0); @@ -2018,7 +2047,7 @@ index 346167afe..db5519ce0 100644 pm_runtime_mark_last_busy(port->dev); pm_runtime_put_autosuspend(port->dev); -@@ -660,7 +660,7 @@ static irqreturn_t omap8250_irq(int irq, void *dev_id) +@@ -676,7 +676,7 @@ static irqreturn_t omap8250_irq(int irq, void *dev_id) unsigned long delay; /* Synchronize UART_IER access against the console. */ @@ -2027,7 +2056,7 @@ index 346167afe..db5519ce0 100644 up->ier = port->serial_in(port, UART_IER); if (up->ier & (UART_IER_RLSI | UART_IER_RDI)) { port->ops->stop_rx(port); -@@ -670,7 +670,7 @@ static irqreturn_t omap8250_irq(int irq, void *dev_id) +@@ -686,7 +686,7 @@ static irqreturn_t omap8250_irq(int irq, void *dev_id) */ cancel_delayed_work(&up->overrun_backoff); } @@ -2036,7 +2065,7 @@ index 346167afe..db5519ce0 100644 delay = msecs_to_jiffies(up->overrun_backoff_time_ms); schedule_delayed_work(&up->overrun_backoff, delay); -@@ -717,10 +717,10 @@ static int omap_8250_startup(struct uart_port *port) +@@ -733,10 +733,10 @@ static int omap_8250_startup(struct uart_port *port) } /* Synchronize UART_IER access against the console. */ @@ -2049,7 +2078,7 @@ index 346167afe..db5519ce0 100644 #ifdef CONFIG_PM up->capabilities |= UART_CAP_RPM; -@@ -733,9 +733,9 @@ static int omap_8250_startup(struct uart_port *port) +@@ -749,9 +749,9 @@ static int omap_8250_startup(struct uart_port *port) serial_out(up, UART_OMAP_WER, priv->wer); if (up->dma && !(priv->habit & UART_HAS_EFR2)) { @@ -2061,7 +2090,7 @@ index 346167afe..db5519ce0 100644 } enable_irq(up->port.irq); -@@ -761,10 +761,10 @@ static void omap_8250_shutdown(struct uart_port *port) +@@ -777,10 +777,10 @@ static void omap_8250_shutdown(struct uart_port *port) serial_out(up, UART_OMAP_EFR2, 0x0); /* Synchronize UART_IER access against the console. */ @@ -2074,7 +2103,7 @@ index 346167afe..db5519ce0 100644 disable_irq_nosync(up->port.irq); dev_pm_clear_wake_irq(port->dev); -@@ -789,10 +789,10 @@ static void omap_8250_throttle(struct uart_port *port) +@@ -805,10 +805,10 @@ static void omap_8250_throttle(struct uart_port *port) pm_runtime_get_sync(port->dev); @@ -2087,7 +2116,7 @@ index 346167afe..db5519ce0 100644 pm_runtime_mark_last_busy(port->dev); pm_runtime_put_autosuspend(port->dev); -@@ -807,14 +807,14 @@ static void omap_8250_unthrottle(struct uart_port *port) +@@ -823,14 +823,14 @@ static void omap_8250_unthrottle(struct uart_port *port) pm_runtime_get_sync(port->dev); /* Synchronize UART_IER access against the console. */ @@ -2104,7 +2133,7 @@ index 346167afe..db5519ce0 100644 pm_runtime_mark_last_busy(port->dev); pm_runtime_put_autosuspend(port->dev); -@@ -958,7 +958,7 @@ static void __dma_rx_complete(void *param) +@@ -974,7 +974,7 @@ static void __dma_rx_complete(void *param) unsigned long flags; /* Synchronize UART_IER access against the console. */ @@ -2113,7 +2142,7 @@ index 346167afe..db5519ce0 100644 /* * If the tx status is not DMA_COMPLETE, then this is a delayed -@@ -967,7 +967,7 @@ static void __dma_rx_complete(void *param) +@@ -983,7 +983,7 @@ static void __dma_rx_complete(void *param) */ if (dmaengine_tx_status(dma->rxchan, dma->rx_cookie, &state) != DMA_COMPLETE) { @@ -2122,7 +2151,7 @@ index 346167afe..db5519ce0 100644 return; } __dma_rx_do_complete(p); -@@ -978,7 +978,7 @@ static void __dma_rx_complete(void *param) +@@ -994,7 +994,7 @@ static void __dma_rx_complete(void *param) omap_8250_rx_dma(p); } @@ -2131,7 +2160,7 @@ index 346167afe..db5519ce0 100644 } static void omap_8250_rx_dma_flush(struct uart_8250_port *p) -@@ -1083,7 +1083,7 @@ static void omap_8250_dma_tx_complete(void *param) +@@ -1099,7 +1099,7 @@ static void omap_8250_dma_tx_complete(void *param) dma_sync_single_for_cpu(dma->txchan->device->dev, dma->tx_addr, UART_XMIT_SIZE, DMA_TO_DEVICE); @@ -2140,7 +2169,7 @@ index 346167afe..db5519ce0 100644 dma->tx_running = 0; -@@ -1112,7 +1112,7 @@ static void omap_8250_dma_tx_complete(void *param) +@@ -1128,7 +1128,7 @@ static void omap_8250_dma_tx_complete(void *param) serial8250_set_THRI(p); } @@ -2149,7 +2178,7 @@ index 346167afe..db5519ce0 100644 } static int omap_8250_tx_dma(struct uart_8250_port *p) -@@ -1278,7 +1278,7 @@ static int omap_8250_dma_handle_irq(struct uart_port *port) +@@ -1294,7 +1294,7 @@ static int omap_8250_dma_handle_irq(struct uart_port *port) return IRQ_HANDLED; } @@ -2158,7 +2187,7 @@ index 346167afe..db5519ce0 100644 status = serial_port_in(port, UART_LSR); -@@ -1758,15 +1758,15 @@ static int omap8250_runtime_resume(struct device *dev) +@@ -1774,15 +1774,15 @@ static int omap8250_runtime_resume(struct device *dev) up = serial8250_get_port(priv->line); if (up && omap8250_lost_context(up)) { @@ -2209,7 +2238,7 @@ index a3b25779d..53e238c8c 100644 mutex_unlock(&tport->mutex); } diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c -index 8099e6a26..510bb858f 100644 +index a17803da8..2d4e775cd 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -557,6 +557,11 @@ static int serial8250_em485_init(struct uart_8250_port *p) @@ -2386,7 +2415,7 @@ index 8099e6a26..510bb858f 100644 serial8250_rpm_put(p); return HRTIMER_NORESTART; -@@ -1627,12 +1644,12 @@ static enum hrtimer_restart serial8250_em485_handle_start_tx(struct hrtimer *t) +@@ -1624,12 +1641,12 @@ static enum hrtimer_restart serial8250_em485_handle_start_tx(struct hrtimer *t) struct uart_8250_port *p = em485->port; unsigned long flags; @@ -2401,7 +2430,7 @@ index 8099e6a26..510bb858f 100644 return HRTIMER_NORESTART; } -@@ -1921,7 +1938,7 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir) +@@ -1912,7 +1929,7 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir) if (iir & UART_IIR_NO_INT) return 0; @@ -2410,7 +2439,7 @@ index 8099e6a26..510bb858f 100644 status = serial_lsr_in(up); -@@ -1991,9 +2008,9 @@ static int serial8250_tx_threshold_handle_irq(struct uart_port *port) +@@ -1982,9 +1999,9 @@ static int serial8250_tx_threshold_handle_irq(struct uart_port *port) if ((iir & UART_IIR_ID) == UART_IIR_THRI) { struct uart_8250_port *up = up_to_u8250p(port); @@ -2422,7 +2451,7 @@ index 8099e6a26..510bb858f 100644 } iir = serial_port_in(port, UART_IIR); -@@ -2008,10 +2025,10 @@ static unsigned int serial8250_tx_empty(struct uart_port *port) +@@ -1999,10 +2016,10 @@ static unsigned int serial8250_tx_empty(struct uart_port *port) serial8250_rpm_get(up); @@ -2435,7 +2464,7 @@ index 8099e6a26..510bb858f 100644 serial8250_rpm_put(up); -@@ -2073,13 +2090,13 @@ static void serial8250_break_ctl(struct uart_port *port, int break_state) +@@ -2064,13 +2081,13 @@ static void serial8250_break_ctl(struct uart_port *port, int break_state) unsigned long flags; serial8250_rpm_get(up); @@ -2451,7 +2480,7 @@ index 8099e6a26..510bb858f 100644 serial8250_rpm_put(up); } -@@ -2214,7 +2231,7 @@ int serial8250_do_startup(struct uart_port *port) +@@ -2205,7 +2222,7 @@ int serial8250_do_startup(struct uart_port *port) * * Synchronize UART_IER access against the console. */ @@ -2460,7 +2489,7 @@ index 8099e6a26..510bb858f 100644 up->acr = 0; serial_port_out(port, UART_LCR, UART_LCR_CONF_MODE_B); serial_port_out(port, UART_EFR, UART_EFR_ECB); -@@ -2224,7 +2241,7 @@ int serial8250_do_startup(struct uart_port *port) +@@ -2215,7 +2232,7 @@ int serial8250_do_startup(struct uart_port *port) serial_port_out(port, UART_LCR, UART_LCR_CONF_MODE_B); serial_port_out(port, UART_EFR, UART_EFR_ECB); serial_port_out(port, UART_LCR, 0); @@ -2469,7 +2498,7 @@ index 8099e6a26..510bb858f 100644 } if (port->type == PORT_DA830) { -@@ -2233,10 +2250,10 @@ int serial8250_do_startup(struct uart_port *port) +@@ -2224,10 +2241,10 @@ int serial8250_do_startup(struct uart_port *port) * * Synchronize UART_IER access against the console. */ @@ -2482,7 +2511,7 @@ index 8099e6a26..510bb858f 100644 mdelay(10); /* Enable Tx, Rx and free run mode */ -@@ -2350,7 +2367,7 @@ int serial8250_do_startup(struct uart_port *port) +@@ -2341,7 +2358,7 @@ int serial8250_do_startup(struct uart_port *port) * * Synchronize UART_IER access against the console. */ @@ -2491,7 +2520,7 @@ index 8099e6a26..510bb858f 100644 wait_for_xmitr(up, UART_LSR_THRE); serial_port_out_sync(port, UART_IER, UART_IER_THRI); -@@ -2362,7 +2379,7 @@ int serial8250_do_startup(struct uart_port *port) +@@ -2353,7 +2370,7 @@ int serial8250_do_startup(struct uart_port *port) iir = serial_port_in(port, UART_IIR); serial_port_out(port, UART_IER, 0); @@ -2500,7 +2529,7 @@ index 8099e6a26..510bb858f 100644 if (port->irqflags & IRQF_SHARED) enable_irq(port->irq); -@@ -2385,7 +2402,7 @@ int serial8250_do_startup(struct uart_port *port) +@@ -2376,7 +2393,7 @@ int serial8250_do_startup(struct uart_port *port) */ serial_port_out(port, UART_LCR, UART_LCR_WLEN8); @@ -2509,7 +2538,7 @@ index 8099e6a26..510bb858f 100644 if (up->port.flags & UPF_FOURPORT) { if (!up->port.irq) up->port.mctrl |= TIOCM_OUT1; -@@ -2431,7 +2448,7 @@ int serial8250_do_startup(struct uart_port *port) +@@ -2422,7 +2439,7 @@ int serial8250_do_startup(struct uart_port *port) } dont_test_tx_en: @@ -2518,7 +2547,7 @@ index 8099e6a26..510bb858f 100644 /* * Clear the interrupt registers again for luck, and clear the -@@ -2502,17 +2519,17 @@ void serial8250_do_shutdown(struct uart_port *port) +@@ -2493,17 +2510,17 @@ void serial8250_do_shutdown(struct uart_port *port) * * Synchronize UART_IER access against the console. */ @@ -2539,7 +2568,7 @@ index 8099e6a26..510bb858f 100644 if (port->flags & UPF_FOURPORT) { /* reset interrupts on the AST Fourport board */ inb((port->iobase & 0xfe0) | 0x1f); -@@ -2521,7 +2538,7 @@ void serial8250_do_shutdown(struct uart_port *port) +@@ -2512,7 +2529,7 @@ void serial8250_do_shutdown(struct uart_port *port) port->mctrl &= ~TIOCM_OUT2; serial8250_set_mctrl(port, port->mctrl); @@ -2548,7 +2577,7 @@ index 8099e6a26..510bb858f 100644 /* * Disable break condition and FIFOs -@@ -2757,14 +2774,14 @@ void serial8250_update_uartclk(struct uart_port *port, unsigned int uartclk) +@@ -2748,14 +2765,14 @@ void serial8250_update_uartclk(struct uart_port *port, unsigned int uartclk) quot = serial8250_get_divisor(port, baud, &frac); serial8250_rpm_get(up); @@ -2565,7 +2594,7 @@ index 8099e6a26..510bb858f 100644 serial8250_rpm_put(up); out_unlock: -@@ -2801,7 +2818,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2792,7 +2809,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, * Synchronize UART_IER access against the console. */ serial8250_rpm_get(up); @@ -2574,7 +2603,7 @@ index 8099e6a26..510bb858f 100644 up->lcr = cval; /* Save computed LCR */ -@@ -2904,7 +2921,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2895,7 +2912,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, serial_port_out(port, UART_FCR, up->fcr); /* set fcr */ } serial8250_set_mctrl(port, port->mctrl); @@ -2583,7 +2612,7 @@ index 8099e6a26..510bb858f 100644 serial8250_rpm_put(up); /* Don't rewrite B0 */ -@@ -2927,15 +2944,15 @@ void serial8250_do_set_ldisc(struct uart_port *port, struct ktermios *termios) +@@ -2918,15 +2935,15 @@ void serial8250_do_set_ldisc(struct uart_port *port, struct ktermios *termios) { if (termios->c_line == N_PPS) { port->flags |= UPF_HARDPPS_CD; @@ -2603,7 +2632,7 @@ index 8099e6a26..510bb858f 100644 } } } -@@ -3331,6 +3348,11 @@ static void serial8250_console_putchar(struct uart_port *port, unsigned char ch) +@@ -3322,6 +3339,11 @@ static void serial8250_console_putchar(struct uart_port *port, unsigned char ch) wait_for_xmitr(up, UART_LSR_THRE); serial_port_out(port, UART_TX, ch); @@ -2615,7 +2644,7 @@ index 8099e6a26..510bb858f 100644 } /* -@@ -3359,6 +3381,7 @@ static void serial8250_console_restore(struct uart_8250_port *up) +@@ -3350,6 +3372,7 @@ static void serial8250_console_restore(struct uart_8250_port *up) serial8250_out_MCR(up, up->mcr | UART_MCR_DTR | UART_MCR_RTS); } @@ -2623,7 +2652,7 @@ index 8099e6a26..510bb858f 100644 /* * Print a string to the serial port using the device FIFO * -@@ -3409,15 +3432,15 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s, +@@ -3400,15 +3423,15 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s, touch_nmi_watchdog(); if (oops_in_progress) @@ -2642,7 +2671,7 @@ index 8099e6a26..510bb858f 100644 /* check scratch reg to see if port powered off during system sleep */ if (up->canary && (up->canary != serial_port_in(port, UART_SCR))) { -@@ -3481,8 +3504,137 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s, +@@ -3472,8 +3495,137 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s, serial8250_modem_status(up); if (locked) @@ -2781,7 +2810,7 @@ index 8099e6a26..510bb858f 100644 static unsigned int probe_baud(struct uart_port *port) { -@@ -3501,6 +3653,7 @@ static unsigned int probe_baud(struct uart_port *port) +@@ -3492,6 +3644,7 @@ static unsigned int probe_baud(struct uart_port *port) int serial8250_console_setup(struct uart_port *port, char *options, bool probe) { @@ -2789,7 +2818,7 @@ index 8099e6a26..510bb858f 100644 int baud = 9600; int bits = 8; int parity = 'n'; -@@ -3510,6 +3663,8 @@ int serial8250_console_setup(struct uart_port *port, char *options, bool probe) +@@ -3501,6 +3654,8 @@ int serial8250_console_setup(struct uart_port *port, char *options, bool probe) if (!port->iobase && !port->membase) return -ENODEV; @@ -3052,10 +3081,10 @@ index b5a7404cb..eabbf8afc 100644 } } diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c -index a5717655b..901928dba 100644 +index 362bbcdec..9cd660edb 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c -@@ -361,9 +361,9 @@ static int pl011_fifo_to_tty(struct uart_amba_port *uap) +@@ -347,9 +347,9 @@ static int pl011_fifo_to_tty(struct uart_amba_port *uap) flag = TTY_FRAME; } @@ -3067,7 +3096,7 @@ index a5717655b..901928dba 100644 if (!sysrq) uart_insert_char(&uap->port, ch, UART011_DR_OE, ch, flag); -@@ -558,7 +558,7 @@ static void pl011_dma_tx_callback(void *data) +@@ -544,7 +544,7 @@ static void pl011_dma_tx_callback(void *data) unsigned long flags; u16 dmacr; @@ -3076,7 +3105,7 @@ index a5717655b..901928dba 100644 if (uap->dmatx.queued) dma_unmap_single(dmatx->chan->device->dev, dmatx->dma, dmatx->len, DMA_TO_DEVICE); -@@ -579,7 +579,7 @@ static void pl011_dma_tx_callback(void *data) +@@ -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; @@ -3085,7 +3114,7 @@ index a5717655b..901928dba 100644 return; } -@@ -590,7 +590,7 @@ static void pl011_dma_tx_callback(void *data) +@@ -576,7 +576,7 @@ static void pl011_dma_tx_callback(void *data) */ pl011_start_tx_pio(uap); @@ -3094,7 +3123,7 @@ index a5717655b..901928dba 100644 } /* -@@ -1018,7 +1018,7 @@ static void pl011_dma_rx_callback(void *data) +@@ -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. */ @@ -3103,7 +3132,7 @@ index a5717655b..901928dba 100644 /* * Rx data can be taken by the UART interrupts during * the DMA irq handler. So we check the residue here. -@@ -1034,7 +1034,7 @@ static void pl011_dma_rx_callback(void *data) +@@ -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); @@ -3112,7 +3141,7 @@ index a5717655b..901928dba 100644 /* * Do this check after we picked the DMA chars so we don't * get some IRQ immediately from RX. -@@ -1100,11 +1100,11 @@ static void pl011_dma_rx_poll(struct timer_list *t) +@@ -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) { @@ -3126,7 +3155,7 @@ index a5717655b..901928dba 100644 uap->dmarx.running = false; dmaengine_terminate_all(rxchan); -@@ -1200,10 +1200,10 @@ static void pl011_dma_shutdown(struct uart_amba_port *uap) +@@ -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(); @@ -3139,7 +3168,7 @@ index a5717655b..901928dba 100644 if (uap->using_tx_dma) { /* In theory, this should already be done by pl011_dma_flush_buffer */ -@@ -1414,9 +1414,9 @@ static void pl011_throttle_rx(struct uart_port *port) +@@ -1400,9 +1400,9 @@ static void pl011_throttle_rx(struct uart_port *port) { unsigned long flags; @@ -3151,7 +3180,7 @@ index a5717655b..901928dba 100644 } static void pl011_enable_ms(struct uart_port *port) -@@ -1434,7 +1434,7 @@ __acquires(&uap->port.lock) +@@ -1420,7 +1420,7 @@ __acquires(&uap->port.lock) { pl011_fifo_to_tty(uap); @@ -3160,7 +3189,7 @@ index a5717655b..901928dba 100644 tty_flip_buffer_push(&uap->port.state->port); /* * If we were temporarily out of DMA mode for a while, -@@ -1459,7 +1459,7 @@ __acquires(&uap->port.lock) +@@ -1445,7 +1445,7 @@ __acquires(&uap->port.lock) #endif } } @@ -3169,7 +3198,7 @@ index a5717655b..901928dba 100644 } static bool pl011_tx_char(struct uart_amba_port *uap, unsigned char c, -@@ -1570,7 +1570,7 @@ static irqreturn_t pl011_int(int irq, void *dev_id) +@@ -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; @@ -3178,7 +3207,7 @@ index a5717655b..901928dba 100644 status = pl011_read(uap, REG_RIS) & uap->im; if (status) { do { -@@ -1600,7 +1600,7 @@ static irqreturn_t pl011_int(int irq, void *dev_id) +@@ -1581,7 +1581,7 @@ static irqreturn_t pl011_int(int irq, void *dev_id) handled = 1; } @@ -3187,7 +3216,7 @@ index a5717655b..901928dba 100644 return IRQ_RETVAL(handled); } -@@ -1672,14 +1672,14 @@ static void pl011_break_ctl(struct uart_port *port, int break_state) +@@ -1653,14 +1653,14 @@ static void pl011_break_ctl(struct uart_port *port, int break_state) unsigned long flags; unsigned int lcr_h; @@ -3204,7 +3233,7 @@ index a5717655b..901928dba 100644 } #ifdef CONFIG_CONSOLE_POLL -@@ -1818,7 +1818,7 @@ static void pl011_enable_interrupts(struct uart_amba_port *uap) +@@ -1799,7 +1799,7 @@ static void pl011_enable_interrupts(struct uart_amba_port *uap) unsigned long flags; unsigned int i; @@ -3213,7 +3242,7 @@ index a5717655b..901928dba 100644 /* Clear out any spuriously appearing RX interrupts */ pl011_write(UART011_RTIS | UART011_RXIS, uap, REG_ICR); -@@ -1840,7 +1840,7 @@ static void pl011_enable_interrupts(struct uart_amba_port *uap) +@@ -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); @@ -3222,7 +3251,7 @@ index a5717655b..901928dba 100644 } static void pl011_unthrottle_rx(struct uart_port *port) -@@ -1848,7 +1848,7 @@ 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; @@ -3231,7 +3260,7 @@ index a5717655b..901928dba 100644 uap->im = UART011_RTIM; if (!pl011_dma_rx_running(uap)) -@@ -1856,7 +1856,7 @@ static void pl011_unthrottle_rx(struct uart_port *port) +@@ -1837,7 +1837,7 @@ static void pl011_unthrottle_rx(struct uart_port *port) pl011_write(uap->im, uap, REG_IMSC); @@ -3240,7 +3269,7 @@ index a5717655b..901928dba 100644 } static int pl011_startup(struct uart_port *port) -@@ -1876,7 +1876,7 @@ 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); @@ -3249,7 +3278,7 @@ index a5717655b..901928dba 100644 cr = pl011_read(uap, REG_CR); cr &= UART011_CR_RTS | UART011_CR_DTR; -@@ -1887,7 +1887,7 @@ static int pl011_startup(struct uart_port *port) +@@ -1868,7 +1868,7 @@ static int pl011_startup(struct uart_port *port) pl011_write(cr, uap, REG_CR); @@ -3258,7 +3287,7 @@ index a5717655b..901928dba 100644 /* * initialise the old status of the modem signals -@@ -1948,12 +1948,12 @@ static void pl011_disable_uart(struct uart_amba_port *uap) +@@ -1929,12 +1929,12 @@ static void pl011_disable_uart(struct uart_amba_port *uap) unsigned int cr; uap->port.status &= ~(UPSTAT_AUTOCTS | UPSTAT_AUTORTS); @@ -3273,7 +3302,7 @@ index a5717655b..901928dba 100644 /* * disable break condition and fifos -@@ -1965,14 +1965,14 @@ static void pl011_disable_uart(struct uart_amba_port *uap) +@@ -1946,14 +1946,14 @@ static void pl011_disable_uart(struct uart_amba_port *uap) static void pl011_disable_interrupts(struct uart_amba_port *uap) { @@ -3290,7 +3319,7 @@ index a5717655b..901928dba 100644 } static void pl011_shutdown(struct uart_port *port) -@@ -2117,7 +2117,7 @@ pl011_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2098,7 +2098,7 @@ pl011_set_termios(struct uart_port *port, struct ktermios *termios, bits = tty_get_frame_size(termios->c_cflag); @@ -3299,7 +3328,7 @@ index a5717655b..901928dba 100644 /* * Update the per-port timeout. -@@ -2191,7 +2191,7 @@ pl011_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -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); @@ -3308,7 +3337,7 @@ index a5717655b..901928dba 100644 } static void -@@ -2209,10 +2209,10 @@ sbsa_uart_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -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; @@ -3321,7 +3350,7 @@ index a5717655b..901928dba 100644 } static const char *pl011_type(struct uart_port *port) -@@ -2347,13 +2347,10 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) +@@ -2328,13 +2328,10 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) clk_enable(uap->clk); @@ -3338,7 +3367,7 @@ index a5717655b..901928dba 100644 /* * First save the CR then disable the interrupts -@@ -2379,8 +2376,7 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) +@@ -2360,8 +2357,7 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) pl011_write(old_cr, uap, REG_CR); if (locked) @@ -3558,7 +3587,7 @@ index ad4ae19b6..1aa5b2b49 100644 static struct console arc_console = { diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c -index 88cdafa5a..1946fafc3 100644 +index bcca5627a..5a3f2fc47 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c @@ -861,7 +861,7 @@ static void atmel_complete_tx_dma(void *arg) @@ -3612,7 +3641,7 @@ index 88cdafa5a..1946fafc3 100644 port->read_status_mask = ATMEL_US_OVRE; if (termios->c_iflag & INPCK) -@@ -2377,22 +2377,22 @@ static void atmel_set_termios(struct uart_port *port, +@@ -2377,22 +2377,22 @@ gclk_fail: else atmel_disable_ms(port); @@ -3641,7 +3670,7 @@ index 88cdafa5a..1946fafc3 100644 } } diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c -index 0dd8cceb8..4a08fd5ee 100644 +index 44c27e5ce..b104c36ce 100644 --- a/drivers/tty/serial/bcm63xx_uart.c +++ b/drivers/tty/serial/bcm63xx_uart.c @@ -201,7 +201,7 @@ static void bcm_uart_break_ctl(struct uart_port *port, int ctl) @@ -3662,7 +3691,7 @@ index 0dd8cceb8..4a08fd5ee 100644 } /* -@@ -332,7 +332,7 @@ static irqreturn_t bcm_uart_interrupt(int irq, void *dev_id) +@@ -335,7 +335,7 @@ static irqreturn_t bcm_uart_interrupt(int irq, void *dev_id) unsigned int irqstat; port = dev_id; @@ -3671,7 +3700,7 @@ index 0dd8cceb8..4a08fd5ee 100644 irqstat = bcm_uart_readl(port, UART_IR_REG); if (irqstat & UART_RX_INT_STAT) -@@ -353,7 +353,7 @@ static irqreturn_t bcm_uart_interrupt(int irq, void *dev_id) +@@ -356,7 +356,7 @@ static irqreturn_t bcm_uart_interrupt(int irq, void *dev_id) estat & UART_EXTINP_DCD_MASK); } @@ -3680,7 +3709,7 @@ index 0dd8cceb8..4a08fd5ee 100644 return IRQ_HANDLED; } -@@ -451,9 +451,9 @@ static void bcm_uart_shutdown(struct uart_port *port) +@@ -454,9 +454,9 @@ static void bcm_uart_shutdown(struct uart_port *port) { unsigned long flags; @@ -3692,7 +3721,7 @@ index 0dd8cceb8..4a08fd5ee 100644 bcm_uart_disable(port); bcm_uart_flush(port); -@@ -470,7 +470,7 @@ static void bcm_uart_set_termios(struct uart_port *port, struct ktermios *new, +@@ -473,7 +473,7 @@ static void bcm_uart_set_termios(struct uart_port *port, struct ktermios *new, unsigned long flags; int tries; @@ -3701,7 +3730,7 @@ index 0dd8cceb8..4a08fd5ee 100644 /* Drain the hot tub fully before we power it off for the winter. */ for (tries = 3; !bcm_uart_tx_empty(port) && tries; tries--) -@@ -546,7 +546,7 @@ static void bcm_uart_set_termios(struct uart_port *port, struct ktermios *new, +@@ -549,7 +549,7 @@ static void bcm_uart_set_termios(struct uart_port *port, struct ktermios *new, uart_update_timeout(port, new->c_cflag, baud); bcm_uart_enable(port); @@ -3710,7 +3739,7 @@ index 0dd8cceb8..4a08fd5ee 100644 } /* -@@ -712,9 +712,9 @@ static void bcm_console_write(struct console *co, const char *s, +@@ -715,9 +715,9 @@ static void bcm_console_write(struct console *co, const char *s, /* bcm_uart_interrupt() already took the lock */ locked = 0; } else if (oops_in_progress) { @@ -3722,7 +3751,7 @@ index 0dd8cceb8..4a08fd5ee 100644 locked = 1; } -@@ -725,7 +725,7 @@ static void bcm_console_write(struct console *co, const char *s, +@@ -728,7 +728,7 @@ static void bcm_console_write(struct console *co, const char *s, wait_for_xmitr(port); if (locked) @@ -4074,7 +4103,7 @@ index 249cb380c..7fa809a40 100644 /* diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c -index 385b41275..71d0cbd74 100644 +index 8bd0f8e45..58c2c460c 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -532,9 +532,9 @@ static void lpuart_dma_tx_complete(void *arg) @@ -4170,7 +4199,7 @@ index 385b41275..71d0cbd74 100644 while (!(readb(sport->port.membase + UARTSFIFO) & UARTSFIFO_RXEMPT)) { flg = TTY_NORMAL; -@@ -956,9 +956,9 @@ static void lpuart_rxint(struct lpuart_port *sport) +@@ -956,9 +956,9 @@ out: static void lpuart32_txint(struct lpuart_port *sport) { @@ -4206,7 +4235,7 @@ index 385b41275..71d0cbd74 100644 return; } -@@ -1244,7 +1244,7 @@ static void lpuart_copy_rx_to_tty(struct lpuart_port *sport) +@@ -1244,7 +1244,7 @@ exit: dma_sync_sg_for_device(chan->device->dev, &sport->rx_sgl, 1, DMA_FROM_DEVICE); @@ -4376,7 +4405,7 @@ index 385b41275..71d0cbd74 100644 } /* -@@ -3092,7 +3092,7 @@ static int lpuart_suspend(struct device *dev) +@@ -3093,7 +3093,7 @@ static int lpuart_suspend(struct device *dev) uart_suspend_port(&lpuart_reg, &sport->port); if (lpuart_uport_is_active(sport)) { @@ -4385,7 +4414,7 @@ index 385b41275..71d0cbd74 100644 if (lpuart_is_32(sport)) { /* disable Rx/Tx and interrupts */ temp = lpuart32_read(&sport->port, UARTCTRL); -@@ -3104,7 +3104,7 @@ static int lpuart_suspend(struct device *dev) +@@ -3105,7 +3105,7 @@ static int lpuart_suspend(struct device *dev) temp &= ~(UARTCR2_TE | UARTCR2_TIE | UARTCR2_TCIE); writeb(temp, sport->port.membase + UARTCR2); } @@ -4394,7 +4423,7 @@ index 385b41275..71d0cbd74 100644 if (sport->lpuart_dma_rx_use) { /* -@@ -3117,7 +3117,7 @@ static int lpuart_suspend(struct device *dev) +@@ -3118,7 +3118,7 @@ static int lpuart_suspend(struct device *dev) lpuart_dma_rx_free(&sport->port); /* Disable Rx DMA to use UART port as wakeup source */ @@ -4403,7 +4432,7 @@ index 385b41275..71d0cbd74 100644 if (lpuart_is_32(sport)) { temp = lpuart32_read(&sport->port, UARTBAUD); lpuart32_write(&sport->port, temp & ~UARTBAUD_RDMAE, -@@ -3126,11 +3126,11 @@ static int lpuart_suspend(struct device *dev) +@@ -3127,11 +3127,11 @@ static int lpuart_suspend(struct device *dev) writeb(readb(sport->port.membase + UARTCR5) & ~UARTCR5_RDMAS, sport->port.membase + UARTCR5); } @@ -4417,7 +4446,7 @@ index 385b41275..71d0cbd74 100644 if (lpuart_is_32(sport)) { temp = lpuart32_read(&sport->port, UARTBAUD); temp &= ~UARTBAUD_TDMAE; -@@ -3140,7 +3140,7 @@ static int lpuart_suspend(struct device *dev) +@@ -3141,7 +3141,7 @@ static int lpuart_suspend(struct device *dev) temp &= ~UARTCR5_TDMAS; writeb(temp, sport->port.membase + UARTCR5); } @@ -4542,10 +4571,10 @@ 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 c77831e91..66420a992 100644 +index a5d0df2ba..267c9af4b 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c -@@ -584,7 +584,7 @@ static void imx_uart_dma_tx_callback(void *data) +@@ -586,7 +586,7 @@ static void imx_uart_dma_tx_callback(void *data) unsigned long flags; u32 ucr1; @@ -4554,7 +4583,7 @@ index c77831e91..66420a992 100644 dma_unmap_sg(sport->port.dev, sgl, sport->dma_tx_nents, DMA_TO_DEVICE); -@@ -609,7 +609,7 @@ static void imx_uart_dma_tx_callback(void *data) +@@ -611,7 +611,7 @@ static void imx_uart_dma_tx_callback(void *data) imx_uart_writel(sport, ucr4, UCR4); } @@ -4563,7 +4592,7 @@ index c77831e91..66420a992 100644 } /* called with port.lock taken and irqs off */ -@@ -780,11 +780,11 @@ static irqreturn_t imx_uart_rtsint(int irq, void *dev_id) +@@ -782,11 +782,11 @@ static irqreturn_t imx_uart_rtsint(int irq, void *dev_id) struct imx_port *sport = dev_id; irqreturn_t ret; @@ -4577,7 +4606,7 @@ index c77831e91..66420a992 100644 return ret; } -@@ -793,9 +793,9 @@ static irqreturn_t imx_uart_txint(int irq, void *dev_id) +@@ -795,9 +795,9 @@ static irqreturn_t imx_uart_txint(int irq, void *dev_id) { struct imx_port *sport = dev_id; @@ -4589,7 +4618,7 @@ index c77831e91..66420a992 100644 return IRQ_HANDLED; } -@@ -909,11 +909,11 @@ static irqreturn_t imx_uart_rxint(int irq, void *dev_id) +@@ -911,11 +911,11 @@ static irqreturn_t imx_uart_rxint(int irq, void *dev_id) struct imx_port *sport = dev_id; irqreturn_t ret; @@ -4603,7 +4632,7 @@ index c77831e91..66420a992 100644 return ret; } -@@ -976,7 +976,7 @@ static irqreturn_t imx_uart_int(int irq, void *dev_id) +@@ -978,7 +978,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; @@ -4612,7 +4641,7 @@ index c77831e91..66420a992 100644 usr1 = imx_uart_readl(sport, USR1); usr2 = imx_uart_readl(sport, USR2); -@@ -1046,7 +1046,7 @@ static irqreturn_t imx_uart_int(int irq, void *dev_id) +@@ -1048,7 +1048,7 @@ static irqreturn_t imx_uart_int(int irq, void *dev_id) ret = IRQ_HANDLED; } @@ -4621,7 +4650,7 @@ index c77831e91..66420a992 100644 return ret; } -@@ -1129,7 +1129,7 @@ static void imx_uart_break_ctl(struct uart_port *port, int break_state) +@@ -1131,7 +1131,7 @@ static void imx_uart_break_ctl(struct uart_port *port, int break_state) unsigned long flags; u32 ucr1; @@ -4630,7 +4659,7 @@ index c77831e91..66420a992 100644 ucr1 = imx_uart_readl(sport, UCR1) & ~UCR1_SNDBRK; -@@ -1138,7 +1138,7 @@ static void imx_uart_break_ctl(struct uart_port *port, int break_state) +@@ -1140,7 +1140,7 @@ static void imx_uart_break_ctl(struct uart_port *port, int break_state) imx_uart_writel(sport, ucr1, UCR1); @@ -4639,7 +4668,7 @@ index c77831e91..66420a992 100644 } /* -@@ -1151,9 +1151,9 @@ static void imx_uart_timeout(struct timer_list *t) +@@ -1153,9 +1153,9 @@ static void imx_uart_timeout(struct timer_list *t) unsigned long flags; if (sport->port.state) { @@ -4651,7 +4680,7 @@ index c77831e91..66420a992 100644 mod_timer(&sport->timer, jiffies + MCTRL_TIMEOUT); } -@@ -1183,9 +1183,9 @@ static void imx_uart_dma_rx_callback(void *data) +@@ -1185,9 +1185,9 @@ static void imx_uart_dma_rx_callback(void *data) status = dmaengine_tx_status(chan, sport->rx_cookie, &state); if (status == DMA_ERROR) { @@ -4663,7 +4692,7 @@ index c77831e91..66420a992 100644 return; } -@@ -1214,9 +1214,9 @@ static void imx_uart_dma_rx_callback(void *data) +@@ -1216,9 +1216,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 */ @@ -4675,7 +4704,7 @@ index c77831e91..66420a992 100644 if (!(sport->port.ignore_status_mask & URXD_DUMMY_READ)) { -@@ -1474,7 +1474,7 @@ static int imx_uart_startup(struct uart_port *port) +@@ -1476,7 +1476,7 @@ static int imx_uart_startup(struct uart_port *port) if (!uart_console(port) && imx_uart_dma_init(sport) == 0) dma_is_inited = 1; @@ -4684,7 +4713,7 @@ index c77831e91..66420a992 100644 /* Reset fifo's and state machines */ imx_uart_soft_reset(sport); -@@ -1547,7 +1547,7 @@ static int imx_uart_startup(struct uart_port *port) +@@ -1549,7 +1549,7 @@ static int imx_uart_startup(struct uart_port *port) imx_uart_disable_loopback_rs485(sport); @@ -4693,7 +4722,7 @@ index c77831e91..66420a992 100644 return 0; } -@@ -1572,21 +1572,21 @@ static void imx_uart_shutdown(struct uart_port *port) +@@ -1574,21 +1574,21 @@ static void imx_uart_shutdown(struct uart_port *port) sport->dma_is_rxing = 0; } @@ -4719,7 +4748,7 @@ index c77831e91..66420a992 100644 /* * Stop our timer. -@@ -1597,7 +1597,7 @@ static void imx_uart_shutdown(struct uart_port *port) +@@ -1599,7 +1599,7 @@ static void imx_uart_shutdown(struct uart_port *port) * Disable all interrupts, port and break condition. */ @@ -4728,7 +4757,7 @@ index c77831e91..66420a992 100644 ucr1 = imx_uart_readl(sport, UCR1); ucr1 &= ~(UCR1_TRDYEN | UCR1_RRDYEN | UCR1_RTSDEN | UCR1_RXDMAEN | -@@ -1619,7 +1619,7 @@ static void imx_uart_shutdown(struct uart_port *port) +@@ -1621,7 +1621,7 @@ static void imx_uart_shutdown(struct uart_port *port) ucr4 &= ~UCR4_TCEN; imx_uart_writel(sport, ucr4, UCR4); @@ -4737,7 +4766,7 @@ index c77831e91..66420a992 100644 clk_disable_unprepare(sport->clk_per); clk_disable_unprepare(sport->clk_ipg); -@@ -1682,7 +1682,7 @@ imx_uart_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -1684,7 +1684,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); @@ -4746,7 +4775,7 @@ index c77831e91..66420a992 100644 /* * Read current UCR2 and save it for future use, then clear all the bits -@@ -1810,7 +1810,7 @@ imx_uart_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -1812,7 +1812,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); @@ -4755,7 +4784,7 @@ index c77831e91..66420a992 100644 } static const char *imx_uart_type(struct uart_port *port) -@@ -1872,7 +1872,7 @@ static int imx_uart_poll_init(struct uart_port *port) +@@ -1874,7 +1874,7 @@ static int imx_uart_poll_init(struct uart_port *port) imx_uart_setup_ufcr(sport, TXTL_DEFAULT, RXTL_DEFAULT); @@ -4764,7 +4793,7 @@ index c77831e91..66420a992 100644 /* * Be careful about the order of enabling bits here. First enable the -@@ -1900,7 +1900,7 @@ static int imx_uart_poll_init(struct uart_port *port) +@@ -1902,7 +1902,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); @@ -4773,7 +4802,7 @@ index c77831e91..66420a992 100644 return 0; } -@@ -2015,9 +2015,9 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count) +@@ -2022,9 +2022,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) @@ -4785,7 +4814,7 @@ index c77831e91..66420a992 100644 /* * First, save UCR1/2/3 and then disable interrupts -@@ -2045,7 +2045,7 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count) +@@ -2052,7 +2052,7 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count) imx_uart_ucrs_restore(sport, &old_ucr); if (locked) @@ -4794,7 +4823,7 @@ index c77831e91..66420a992 100644 } /* -@@ -2203,10 +2203,10 @@ static enum hrtimer_restart imx_trigger_start_tx(struct hrtimer *t) +@@ -2210,10 +2210,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; @@ -4807,7 +4836,7 @@ index c77831e91..66420a992 100644 return HRTIMER_NORESTART; } -@@ -2216,10 +2216,10 @@ static enum hrtimer_restart imx_trigger_stop_tx(struct hrtimer *t) +@@ -2223,10 +2223,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; @@ -4820,7 +4849,7 @@ index c77831e91..66420a992 100644 return HRTIMER_NORESTART; } -@@ -2486,9 +2486,9 @@ static void imx_uart_restore_context(struct imx_port *sport) +@@ -2493,9 +2493,9 @@ static void imx_uart_restore_context(struct imx_port *sport) { unsigned long flags; @@ -4832,7 +4861,7 @@ index c77831e91..66420a992 100644 return; } -@@ -2503,7 +2503,7 @@ static void imx_uart_restore_context(struct imx_port *sport) +@@ -2510,7 +2510,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; @@ -4841,7 +4870,7 @@ index c77831e91..66420a992 100644 } static void imx_uart_save_context(struct imx_port *sport) -@@ -2511,7 +2511,7 @@ static void imx_uart_save_context(struct imx_port *sport) +@@ -2518,7 +2518,7 @@ static void imx_uart_save_context(struct imx_port *sport) unsigned long flags; /* Save necessary regs */ @@ -4850,7 +4879,7 @@ index c77831e91..66420a992 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); -@@ -2523,7 +2523,7 @@ static void imx_uart_save_context(struct imx_port *sport) +@@ -2530,7 +2530,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; @@ -5283,7 +5312,7 @@ index b38fe4728..5149a947b 100644 /* Don't rewrite B0 */ if (tty_termios_baud_rate(termios)) diff --git a/drivers/tty/serial/ma35d1_serial.c b/drivers/tty/serial/ma35d1_serial.c -index 69da24565..73910c54d 100644 +index 99225f1e0..faccd772c 100644 --- a/drivers/tty/serial/ma35d1_serial.c +++ b/drivers/tty/serial/ma35d1_serial.c @@ -269,16 +269,16 @@ static void receive_chars(struct uart_ma35d1_port *up) @@ -5364,7 +5393,7 @@ index 69da24565..73910c54d 100644 static int __init ma35d1serial_console_setup(struct console *co, char *options) diff --git a/drivers/tty/serial/mcf.c b/drivers/tty/serial/mcf.c -index 1666ce012..91b15243f 100644 +index aea29b4e6..ee40af20a 100644 --- a/drivers/tty/serial/mcf.c +++ b/drivers/tty/serial/mcf.c @@ -135,12 +135,12 @@ static void mcf_break_ctl(struct uart_port *port, int break_state) @@ -6728,10 +6757,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 2e1b1c827..549909644 100644 +index f798ef3c4..b808c1768 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c -@@ -482,9 +482,9 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s, +@@ -473,9 +473,9 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s, uport = &port->uport; if (oops_in_progress) @@ -6743,7 +6772,7 @@ index 2e1b1c827..549909644 100644 geni_status = readl(uport->membase + SE_GENI_STATUS); -@@ -520,7 +520,7 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s, +@@ -511,7 +511,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) @@ -6752,7 +6781,7 @@ index 2e1b1c827..549909644 100644 } static void handle_rx_console(struct uart_port *uport, u32 bytes, bool drop) -@@ -972,7 +972,7 @@ static irqreturn_t qcom_geni_serial_isr(int isr, void *dev) +@@ -963,7 +963,7 @@ static irqreturn_t qcom_geni_serial_isr(int isr, void *dev) if (uport->suspended) return IRQ_NONE; @@ -6903,7 +6932,7 @@ index be5c842b5..d824c8318 100644 local_irq_restore(flags); } diff --git a/drivers/tty/serial/rp2.c b/drivers/tty/serial/rp2.c -index de220ac8c..d46a81cdd 100644 +index 5a1de6044..45be2b881 100644 --- a/drivers/tty/serial/rp2.c +++ b/drivers/tty/serial/rp2.c @@ -276,9 +276,9 @@ static unsigned int rp2_uart_tx_empty(struct uart_port *port) @@ -7320,10 +7349,10 @@ index f3cd69346..dbec29d9a 100644 static int __init sbd_console_setup(struct console *co, char *options) diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c -index eea662212..2aa0b7e5e 100644 +index 673aeda71..a227b3d3a 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c -@@ -806,6 +806,7 @@ static void sc16is7xx_tx_proc(struct kthread_work *ws) +@@ -810,6 +810,7 @@ static void sc16is7xx_tx_proc(struct kthread_work *ws) { struct uart_port *port = &(to_sc16is7xx_one(ws, tx_work)->port); struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); @@ -7331,7 +7360,7 @@ index eea662212..2aa0b7e5e 100644 if ((port->rs485.flags & SER_RS485_ENABLED) && (port->rs485.delay_rts_before_send > 0)) -@@ -814,6 +815,10 @@ static void sc16is7xx_tx_proc(struct kthread_work *ws) +@@ -818,6 +819,10 @@ static void sc16is7xx_tx_proc(struct kthread_work *ws) mutex_lock(&one->efr_lock); sc16is7xx_handle_tx(port); mutex_unlock(&one->efr_lock); @@ -7483,7 +7512,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 2eceef54e..6cd64ccc2 100644 +index 8ff0efac6..398104760 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) @@ -7537,7 +7566,7 @@ index 2eceef54e..6cd64ccc2 100644 } /* -@@ -715,11 +715,11 @@ static void uart_send_xchar(struct tty_struct *tty, char ch) +@@ -717,11 +717,11 @@ static void uart_send_xchar(struct tty_struct *tty, char ch) if (port->ops->send_xchar) port->ops->send_xchar(port, ch); else { @@ -7551,19 +7580,20 @@ index 2eceef54e..6cd64ccc2 100644 } uart_port_deref(port); } -@@ -1098,9 +1098,9 @@ static int uart_tiocmget(struct tty_struct *tty) +@@ -1107,10 +1107,10 @@ static int uart_tiocmget(struct tty_struct *tty) + goto out; if (!tty_io_error(tty)) { - result = uport->mctrl; - spin_lock_irq(&uport->lock); + uart_port_lock_irq(uport); + result = uport->mctrl; result |= uport->ops->get_mctrl(uport); - spin_unlock_irq(&uport->lock); + uart_port_unlock_irq(uport); } out: mutex_unlock(&port->mutex); -@@ -1236,16 +1236,16 @@ static int uart_wait_modem_status(struct uart_state *state, unsigned long arg) +@@ -1246,16 +1246,16 @@ static int uart_wait_modem_status(struct uart_state *state, unsigned long arg) uport = uart_port_ref(state); if (!uport) return -EIO; @@ -7584,7 +7614,7 @@ index 2eceef54e..6cd64ccc2 100644 set_current_state(TASK_INTERRUPTIBLE); -@@ -1290,9 +1290,9 @@ static int uart_get_icount(struct tty_struct *tty, +@@ -1300,9 +1300,9 @@ static int uart_get_icount(struct tty_struct *tty, uport = uart_port_ref(state); if (!uport) return -EIO; @@ -7596,7 +7626,7 @@ index 2eceef54e..6cd64ccc2 100644 uart_port_deref(uport); icount->cts = cnow.cts; -@@ -1445,9 +1445,9 @@ static int uart_rs485_config(struct uart_port *port) +@@ -1455,9 +1455,9 @@ static int uart_rs485_config(struct uart_port *port) uart_set_rs485_termination(port, rs485); uart_set_rs485_rx_during_tx(port, rs485); @@ -7608,7 +7638,7 @@ index 2eceef54e..6cd64ccc2 100644 if (ret) { memset(rs485, 0, sizeof(*rs485)); /* unset GPIOs */ -@@ -1464,9 +1464,9 @@ static int uart_get_rs485_config(struct uart_port *port, +@@ -1474,9 +1474,9 @@ static int uart_get_rs485_config(struct uart_port *port, unsigned long flags; struct serial_rs485 aux; @@ -7620,7 +7650,7 @@ index 2eceef54e..6cd64ccc2 100644 if (copy_to_user(rs485, &aux, sizeof(aux))) return -EFAULT; -@@ -1494,7 +1494,7 @@ static int uart_set_rs485_config(struct tty_struct *tty, struct uart_port *port, +@@ -1504,7 +1504,7 @@ static int uart_set_rs485_config(struct tty_struct *tty, struct uart_port *port, uart_set_rs485_termination(port, &rs485); uart_set_rs485_rx_during_tx(port, &rs485); @@ -7629,7 +7659,7 @@ index 2eceef54e..6cd64ccc2 100644 ret = port->rs485_config(port, &tty->termios, &rs485); if (!ret) { port->rs485 = rs485; -@@ -1503,7 +1503,7 @@ static int uart_set_rs485_config(struct tty_struct *tty, struct uart_port *port, +@@ -1513,7 +1513,7 @@ static int uart_set_rs485_config(struct tty_struct *tty, struct uart_port *port, if (!(rs485.flags & SER_RS485_ENABLED)) port->ops->set_mctrl(port, port->mctrl); } @@ -7638,7 +7668,7 @@ index 2eceef54e..6cd64ccc2 100644 if (ret) { /* restore old GPIO settings */ gpiod_set_value_cansleep(port->rs485_term_gpio, -@@ -1528,9 +1528,9 @@ static int uart_get_iso7816_config(struct uart_port *port, +@@ -1538,9 +1538,9 @@ static int uart_get_iso7816_config(struct uart_port *port, if (!port->iso7816_config) return -ENOTTY; @@ -7650,7 +7680,7 @@ index 2eceef54e..6cd64ccc2 100644 if (copy_to_user(iso7816, &aux, sizeof(aux))) return -EFAULT; -@@ -1559,9 +1559,9 @@ static int uart_set_iso7816_config(struct uart_port *port, +@@ -1569,9 +1569,9 @@ static int uart_set_iso7816_config(struct uart_port *port, if (iso7816.reserved[i]) return -EINVAL; @@ -7662,7 +7692,7 @@ index 2eceef54e..6cd64ccc2 100644 if (ret) return ret; -@@ -1778,9 +1778,9 @@ static void uart_tty_port_shutdown(struct tty_port *port) +@@ -1788,9 +1788,9 @@ static void uart_tty_port_shutdown(struct tty_port *port) if (WARN(!uport, "detached port still initialized!\n")) return; @@ -7674,7 +7704,7 @@ index 2eceef54e..6cd64ccc2 100644 serial_base_port_shutdown(uport); uart_port_shutdown(port); -@@ -1795,11 +1795,11 @@ static void uart_tty_port_shutdown(struct tty_port *port) +@@ -1805,11 +1805,11 @@ static void uart_tty_port_shutdown(struct tty_port *port) /* * Free the transmit buffer. */ @@ -7688,7 +7718,7 @@ index 2eceef54e..6cd64ccc2 100644 free_page((unsigned long)buf); -@@ -1942,10 +1942,10 @@ static bool uart_carrier_raised(struct tty_port *port) +@@ -1952,10 +1952,10 @@ static bool uart_carrier_raised(struct tty_port *port) */ if (WARN_ON(!uport)) return true; @@ -7701,7 +7731,7 @@ index 2eceef54e..6cd64ccc2 100644 uart_port_deref(uport); return mctrl & TIOCM_CAR; -@@ -2062,9 +2062,9 @@ static void uart_line_info(struct seq_file *m, struct uart_driver *drv, int i) +@@ -2072,9 +2072,9 @@ static void uart_line_info(struct seq_file *m, struct uart_driver *drv, int i) pm_state = state->pm_state; if (pm_state != UART_PM_STATE_ON) uart_change_pm(state, UART_PM_STATE_ON); @@ -7713,7 +7743,7 @@ index 2eceef54e..6cd64ccc2 100644 if (pm_state != UART_PM_STATE_ON) uart_change_pm(state, pm_state); -@@ -2403,9 +2403,9 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) +@@ -2413,9 +2413,9 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) */ if (!console_suspend_enabled && uart_console(uport)) { if (uport->ops->start_rx) { @@ -7725,7 +7755,7 @@ index 2eceef54e..6cd64ccc2 100644 } goto unlock; } -@@ -2420,7 +2420,7 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) +@@ -2430,7 +2430,7 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) tty_port_set_suspended(port, true); tty_port_set_initialized(port, false); @@ -7734,7 +7764,7 @@ index 2eceef54e..6cd64ccc2 100644 ops->stop_tx(uport); if (!(uport->rs485.flags & SER_RS485_ENABLED)) ops->set_mctrl(uport, 0); -@@ -2428,7 +2428,7 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) +@@ -2438,7 +2438,7 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) mctrl = uport->mctrl; uport->mctrl = 0; ops->stop_rx(uport); @@ -7743,7 +7773,7 @@ index 2eceef54e..6cd64ccc2 100644 /* * Wait for the transmitter to empty. -@@ -2500,9 +2500,9 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) +@@ -2510,9 +2510,9 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) uart_change_pm(state, UART_PM_STATE_ON); uport->ops->set_termios(uport, &termios, NULL); if (!console_suspend_enabled && uport->ops->start_rx) { @@ -7755,7 +7785,7 @@ index 2eceef54e..6cd64ccc2 100644 } if (console_suspend_enabled) console_start(uport->cons); -@@ -2513,10 +2513,10 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) +@@ -2523,10 +2523,10 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) int ret; uart_change_pm(state, UART_PM_STATE_ON); @@ -7768,7 +7798,7 @@ index 2eceef54e..6cd64ccc2 100644 if (console_suspend_enabled || !uart_console(uport)) { /* Protected by port mutex for now */ struct tty_struct *tty = port->tty; -@@ -2526,11 +2526,11 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) +@@ -2536,11 +2536,11 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) if (tty) uart_change_line_settings(tty, state, NULL); uart_rs485_config(uport); @@ -7782,7 +7812,7 @@ index 2eceef54e..6cd64ccc2 100644 tty_port_set_initialized(port, true); } else { /* -@@ -2642,11 +2642,11 @@ uart_configure_port(struct uart_driver *drv, struct uart_state *state, +@@ -2652,11 +2652,11 @@ uart_configure_port(struct uart_driver *drv, struct uart_state *state, * keep the DTR setting that is set in uart_set_options() * We probably don't need a spinlock around this, but */ @@ -7819,7 +7849,7 @@ index 7d5aaa8d4..e51ca593a 100644 return IRQ_HANDLED; } diff --git a/drivers/tty/serial/serial_port.c b/drivers/tty/serial/serial_port.c -index d622a9297..7d51e66ec 100644 +index ed3953bd0..92a57b243 100644 --- a/drivers/tty/serial/serial_port.c +++ b/drivers/tty/serial/serial_port.c @@ -35,14 +35,14 @@ static int serial_port_runtime_resume(struct device *dev) @@ -7938,7 +7968,7 @@ index be08fb6f7..eaa980722 100644 static void diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c -index a560b729f..84ab434c9 100644 +index f793624fd..2559c9781 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -1205,7 +1205,7 @@ static void sci_dma_tx_complete(void *arg) @@ -7959,7 +7989,7 @@ index a560b729f..84ab434c9 100644 } /* Locking: called with port lock held */ -@@ -1320,7 +1320,7 @@ static void sci_dma_rx_complete(void *arg) +@@ -1325,7 +1325,7 @@ static void sci_dma_rx_complete(void *arg) dev_dbg(port->dev, "%s(%d) active cookie %d\n", __func__, port->line, s->active_rx); @@ -7968,7 +7998,7 @@ index a560b729f..84ab434c9 100644 active = sci_dma_rx_find_active(s); if (active >= 0) -@@ -1347,20 +1347,20 @@ static void sci_dma_rx_complete(void *arg) +@@ -1352,20 +1352,20 @@ static void sci_dma_rx_complete(void *arg) dma_async_issue_pending(chan); @@ -7993,7 +8023,7 @@ index a560b729f..84ab434c9 100644 } static void sci_dma_tx_release(struct sci_port *s) -@@ -1409,13 +1409,13 @@ static int sci_dma_rx_submit(struct sci_port *s, bool port_lock_held) +@@ -1414,13 +1414,13 @@ static int sci_dma_rx_submit(struct sci_port *s, bool port_lock_held) fail: /* Switch to PIO */ if (!port_lock_held) @@ -8009,7 +8039,7 @@ index a560b729f..84ab434c9 100644 return -EAGAIN; } -@@ -1437,14 +1437,14 @@ static void sci_dma_tx_work_fn(struct work_struct *work) +@@ -1442,14 +1442,14 @@ static void sci_dma_tx_work_fn(struct work_struct *work) * transmit till the end, and then the rest. Take the port lock to get a * consistent xmit buffer state. */ @@ -8026,7 +8056,7 @@ index a560b729f..84ab434c9 100644 return; } -@@ -1452,7 +1452,7 @@ static void sci_dma_tx_work_fn(struct work_struct *work) +@@ -1457,7 +1457,7 @@ static void sci_dma_tx_work_fn(struct work_struct *work) DMA_MEM_TO_DEV, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); if (!desc) { @@ -8035,7 +8065,7 @@ index a560b729f..84ab434c9 100644 dev_warn(port->dev, "Failed preparing Tx DMA descriptor\n"); goto switch_to_pio; } -@@ -1464,12 +1464,12 @@ static void sci_dma_tx_work_fn(struct work_struct *work) +@@ -1469,12 +1469,12 @@ static void sci_dma_tx_work_fn(struct work_struct *work) desc->callback_param = s; s->cookie_tx = dmaengine_submit(desc); if (dma_submit_error(s->cookie_tx)) { @@ -8050,7 +8080,7 @@ index a560b729f..84ab434c9 100644 dev_dbg(port->dev, "%s: %p: %d...%d, cookie %d\n", __func__, xmit->buf, tail, head, s->cookie_tx); -@@ -1477,10 +1477,10 @@ static void sci_dma_tx_work_fn(struct work_struct *work) +@@ -1482,10 +1482,10 @@ static void sci_dma_tx_work_fn(struct work_struct *work) return; switch_to_pio: @@ -8063,7 +8093,7 @@ index a560b729f..84ab434c9 100644 return; } -@@ -1497,17 +1497,17 @@ static enum hrtimer_restart sci_dma_rx_timer_fn(struct hrtimer *t) +@@ -1502,17 +1502,17 @@ static enum hrtimer_restart sci_dma_rx_timer_fn(struct hrtimer *t) dev_dbg(port->dev, "DMA Rx timed out\n"); @@ -8084,7 +8114,7 @@ index a560b729f..84ab434c9 100644 dev_dbg(port->dev, "Cookie %d #%d has already completed\n", s->active_rx, active); -@@ -1525,7 +1525,7 @@ static enum hrtimer_restart sci_dma_rx_timer_fn(struct hrtimer *t) +@@ -1530,7 +1530,7 @@ static enum hrtimer_restart sci_dma_rx_timer_fn(struct hrtimer *t) */ status = dmaengine_tx_status(s->chan_rx, s->active_rx, &state); if (status == DMA_COMPLETE) { @@ -8093,7 +8123,7 @@ index a560b729f..84ab434c9 100644 dev_dbg(port->dev, "Transaction complete after DMA engine was stopped"); return HRTIMER_NORESTART; } -@@ -1546,7 +1546,7 @@ static enum hrtimer_restart sci_dma_rx_timer_fn(struct hrtimer *t) +@@ -1551,7 +1551,7 @@ static enum hrtimer_restart sci_dma_rx_timer_fn(struct hrtimer *t) sci_dma_rx_reenable_irq(s); @@ -8102,7 +8132,7 @@ index a560b729f..84ab434c9 100644 return HRTIMER_NORESTART; } -@@ -1770,9 +1770,9 @@ static irqreturn_t sci_tx_interrupt(int irq, void *ptr) +@@ -1775,9 +1775,9 @@ static irqreturn_t sci_tx_interrupt(int irq, void *ptr) struct uart_port *port = ptr; unsigned long flags; @@ -8114,7 +8144,7 @@ index a560b729f..84ab434c9 100644 return IRQ_HANDLED; } -@@ -1786,11 +1786,11 @@ static irqreturn_t sci_tx_end_interrupt(int irq, void *ptr) +@@ -1791,11 +1791,11 @@ static irqreturn_t sci_tx_end_interrupt(int irq, void *ptr) if (port->type != PORT_SCI) return sci_tx_interrupt(irq, ptr); @@ -8128,7 +8158,7 @@ index a560b729f..84ab434c9 100644 return IRQ_HANDLED; } -@@ -2187,7 +2187,7 @@ static void sci_break_ctl(struct uart_port *port, int break_state) +@@ -2192,7 +2192,7 @@ static void sci_break_ctl(struct uart_port *port, int break_state) return; } @@ -8137,7 +8167,7 @@ index a560b729f..84ab434c9 100644 scsptr = serial_port_in(port, SCSPTR); scscr = serial_port_in(port, SCSCR); -@@ -2201,7 +2201,7 @@ static void sci_break_ctl(struct uart_port *port, int break_state) +@@ -2206,7 +2206,7 @@ static void sci_break_ctl(struct uart_port *port, int break_state) serial_port_out(port, SCSPTR, scsptr); serial_port_out(port, SCSCR, scscr); @@ -8146,7 +8176,7 @@ index a560b729f..84ab434c9 100644 } static int sci_startup(struct uart_port *port) -@@ -2233,7 +2233,7 @@ static void sci_shutdown(struct uart_port *port) +@@ -2238,7 +2238,7 @@ static void sci_shutdown(struct uart_port *port) s->autorts = false; mctrl_gpio_disable_ms(to_sci_port(port)->gpios); @@ -8155,7 +8185,7 @@ index a560b729f..84ab434c9 100644 sci_stop_rx(port); sci_stop_tx(port); /* -@@ -2243,7 +2243,7 @@ static void sci_shutdown(struct uart_port *port) +@@ -2248,7 +2248,7 @@ static void sci_shutdown(struct uart_port *port) scr = serial_port_in(port, SCSCR); serial_port_out(port, SCSCR, scr & (SCSCR_CKE1 | SCSCR_CKE0 | s->hscif_tot)); @@ -8164,7 +8194,7 @@ index a560b729f..84ab434c9 100644 #ifdef CONFIG_SERIAL_SH_SCI_DMA if (s->chan_rx_saved) { -@@ -2545,7 +2545,7 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2550,7 +2550,7 @@ done: serial_port_out(port, SCCKS, sccks); } @@ -8173,7 +8203,7 @@ index a560b729f..84ab434c9 100644 sci_reset(port); -@@ -2667,7 +2667,7 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2672,7 +2672,7 @@ done: if ((termios->c_cflag & CREAD) != 0) sci_start_rx(port); @@ -8182,7 +8212,7 @@ index a560b729f..84ab434c9 100644 sci_port_disable(s); -@@ -3052,9 +3052,9 @@ static void serial_console_write(struct console *co, const char *s, +@@ -3057,9 +3057,9 @@ static void serial_console_write(struct console *co, const char *s, if (port->sysrq) locked = 0; else if (oops_in_progress) @@ -8194,7 +8224,7 @@ index a560b729f..84ab434c9 100644 /* first save SCSCR then disable interrupts, keep clock source */ ctrl = serial_port_in(port, SCSCR); -@@ -3074,7 +3074,7 @@ static void serial_console_write(struct console *co, const char *s, +@@ -3079,7 +3079,7 @@ static void serial_console_write(struct console *co, const char *s, serial_port_out(port, SCSCR, ctrl); if (locked) @@ -10084,7 +10114,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 fc25776ea..48707941d 100644 +index 98b58ae88..974816e66 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -3300,7 +3300,11 @@ struct softnet_data { @@ -10100,7 +10130,7 @@ index fc25776ea..48707941d 100644 static inline void input_queue_head_incr(struct softnet_data *sd) diff --git a/include/linux/printk.h b/include/linux/printk.h -index 8ef499ab3..7a942e987 100644 +index e4878bb58..ebebc32e7 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -9,6 +9,8 @@ @@ -10167,10 +10197,10 @@ index 8ef499ab3..7a942e987 100644 #ifdef CONFIG_SMP diff --git a/include/linux/sched.h b/include/linux/sched.h -index b65d74c5e..d5fba1473 100644 +index b8be76b0c..c4fe6d06d 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -944,6 +944,9 @@ struct task_struct { +@@ -946,6 +946,9 @@ struct task_struct { * ->sched_remote_wakeup gets used, so it can be in this word. */ unsigned sched_remote_wakeup:1; @@ -10180,7 +10210,7 @@ index b65d74c5e..d5fba1473 100644 /* Bit to tell LSMs we're in execve(): */ unsigned in_execve:1; -@@ -1979,6 +1982,7 @@ static inline int dl_task_check_affinity(struct task_struct *p, const struct cpu +@@ -1989,6 +1992,7 @@ static inline int dl_task_check_affinity(struct task_struct *p, const struct cpu } #endif @@ -10188,7 +10218,7 @@ index b65d74c5e..d5fba1473 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); -@@ -2130,17 +2134,17 @@ static inline void update_tsk_thread_flag(struct task_struct *tsk, int flag, +@@ -2140,17 +2144,17 @@ static inline void update_tsk_thread_flag(struct task_struct *tsk, int flag, update_ti_thread_flag(task_thread_info(tsk), flag, value); } @@ -10209,7 +10239,7 @@ index b65d74c5e..d5fba1473 100644 { return test_ti_thread_flag(task_thread_info(tsk), flag); } -@@ -2153,9 +2157,11 @@ static inline void set_tsk_need_resched(struct task_struct *tsk) +@@ -2163,9 +2167,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); @@ -10222,7 +10252,7 @@ index b65d74c5e..d5fba1473 100644 { return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED)); } -@@ -2336,7 +2342,7 @@ static inline int rwlock_needbreak(rwlock_t *lock) +@@ -2346,7 +2352,7 @@ static inline int rwlock_needbreak(rwlock_t *lock) static __always_inline bool need_resched(void) { @@ -10307,10 +10337,10 @@ index be65de65f..ec46e3b49 100644 int serial8250_console_exit(struct uart_port *port); diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h -index a7d5fa892..99d3f1e24 100644 +index 5136eade9..9c7bce638 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h -@@ -488,6 +488,7 @@ struct uart_port { +@@ -489,6 +489,7 @@ struct uart_port { struct uart_icount icount; /* statistics */ struct console *cons; /* struct console, if any */ @@ -10318,7 +10348,7 @@ index a7d5fa892..99d3f1e24 100644 /* flags must be updated while holding port mutex */ upf_t flags; -@@ -595,6 +596,7 @@ struct uart_port { +@@ -596,6 +597,7 @@ struct uart_port { static inline void uart_port_lock(struct uart_port *up) { spin_lock(&up->lock); @@ -10326,7 +10356,7 @@ index a7d5fa892..99d3f1e24 100644 } /** -@@ -604,6 +606,7 @@ static inline void uart_port_lock(struct uart_port *up) +@@ -605,6 +607,7 @@ static inline void uart_port_lock(struct uart_port *up) static inline void uart_port_lock_irq(struct uart_port *up) { spin_lock_irq(&up->lock); @@ -10334,7 +10364,7 @@ index a7d5fa892..99d3f1e24 100644 } /** -@@ -614,6 +617,7 @@ static inline void uart_port_lock_irq(struct uart_port *up) +@@ -615,6 +618,7 @@ static inline void uart_port_lock_irq(struct uart_port *up) static inline void uart_port_lock_irqsave(struct uart_port *up, unsigned long *flags) { spin_lock_irqsave(&up->lock, *flags); @@ -10342,7 +10372,7 @@ index a7d5fa892..99d3f1e24 100644 } /** -@@ -624,7 +628,11 @@ static inline void uart_port_lock_irqsave(struct uart_port *up, unsigned long *f +@@ -625,7 +629,11 @@ static inline void uart_port_lock_irqsave(struct uart_port *up, unsigned long *f */ static inline bool uart_port_trylock(struct uart_port *up) { @@ -10355,7 +10385,7 @@ index a7d5fa892..99d3f1e24 100644 } /** -@@ -636,7 +644,11 @@ static inline bool uart_port_trylock(struct uart_port *up) +@@ -637,7 +645,11 @@ static inline bool uart_port_trylock(struct uart_port *up) */ static inline bool uart_port_trylock_irqsave(struct uart_port *up, unsigned long *flags) { @@ -10368,7 +10398,7 @@ index a7d5fa892..99d3f1e24 100644 } /** -@@ -645,6 +657,7 @@ static inline bool uart_port_trylock_irqsave(struct uart_port *up, unsigned long +@@ -646,6 +658,7 @@ static inline bool uart_port_trylock_irqsave(struct uart_port *up, unsigned long */ static inline void uart_port_unlock(struct uart_port *up) { @@ -10376,7 +10406,7 @@ index a7d5fa892..99d3f1e24 100644 spin_unlock(&up->lock); } -@@ -654,6 +667,7 @@ static inline void uart_port_unlock(struct uart_port *up) +@@ -655,6 +668,7 @@ static inline void uart_port_unlock(struct uart_port *up) */ static inline void uart_port_unlock_irq(struct uart_port *up) { @@ -10384,7 +10414,7 @@ index a7d5fa892..99d3f1e24 100644 spin_unlock_irq(&up->lock); } -@@ -663,6 +677,19 @@ static inline void uart_port_unlock_irq(struct uart_port *up) +@@ -664,6 +678,19 @@ static inline void uart_port_unlock_irq(struct uart_port *up) * @flags: The saved interrupt flags for restore */ static inline void uart_port_unlock_irqrestore(struct uart_port *up, unsigned long flags) @@ -10404,7 +10434,7 @@ index a7d5fa892..99d3f1e24 100644 { spin_unlock_irqrestore(&up->lock, flags); } -@@ -1058,14 +1085,14 @@ static inline void uart_unlock_and_check_sysrq(struct uart_port *port) +@@ -1076,14 +1103,14 @@ static inline void uart_unlock_and_check_sysrq(struct uart_port *port) u8 sysrq_ch; if (!port->has_sysrq) { @@ -10421,7 +10451,7 @@ index a7d5fa892..99d3f1e24 100644 if (sysrq_ch) handle_sysrq(sysrq_ch); -@@ -1077,14 +1104,14 @@ static inline void uart_unlock_and_check_sysrq_irqrestore(struct uart_port *port +@@ -1095,14 +1122,14 @@ static inline void uart_unlock_and_check_sysrq_irqrestore(struct uart_port *port u8 sysrq_ch; if (!port->has_sysrq) { @@ -10438,7 +10468,7 @@ index a7d5fa892..99d3f1e24 100644 if (sysrq_ch) handle_sysrq(sysrq_ch); -@@ -1100,12 +1127,12 @@ static inline int uart_prepare_sysrq_char(struct uart_port *port, u8 ch) +@@ -1118,12 +1145,12 @@ static inline int uart_prepare_sysrq_char(struct uart_port *port, u8 ch) } static inline void uart_unlock_and_check_sysrq(struct uart_port *port) { @@ -10503,7 +10533,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 ee9217fa4..1e594ace7 100644 +index 54ade3cea..c67dd30bc 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); @@ -10656,7 +10686,7 @@ index ce2889f12..d636a1bbd 100644 new_owner = top_waiter->task; /* -@@ -1002,6 +990,12 @@ int futex_lock_pi(u32 __user *uaddr, unsigned int flags, ktime_t *time, int tryl +@@ -1002,6 +990,12 @@ retry_private: goto no_block; } @@ -10669,7 +10699,7 @@ index ce2889f12..d636a1bbd 100644 rt_mutex_init_waiter(&rt_waiter); /* -@@ -1039,19 +1033,37 @@ int futex_lock_pi(u32 __user *uaddr, unsigned int flags, ktime_t *time, int tryl +@@ -1039,19 +1033,37 @@ retry_private: ret = rt_mutex_wait_proxy_lock(&q.pi_state->pi_mutex, to, &rt_waiter); cleanup: @@ -10713,7 +10743,7 @@ index ce2889f12..d636a1bbd 100644 no_block: /* * Fixup the pi_state owner and possibly acquire the lock if we -@@ -1132,6 +1144,7 @@ int futex_unlock_pi(u32 __user *uaddr, unsigned int flags) +@@ -1132,6 +1144,7 @@ retry: top_waiter = futex_top_waiter(hb, &key); if (top_waiter) { struct futex_pi_state *pi_state = top_waiter->pi_state; @@ -10721,7 +10751,7 @@ index ce2889f12..d636a1bbd 100644 ret = -EINVAL; if (!pi_state) -@@ -1144,22 +1157,39 @@ int futex_unlock_pi(u32 __user *uaddr, unsigned int flags) +@@ -1144,22 +1157,39 @@ retry: if (pi_state->owner != current) goto out_unlock; @@ -10767,7 +10797,7 @@ index ce2889f12..d636a1bbd 100644 put_pi_state(pi_state); -@@ -1187,6 +1217,7 @@ int futex_unlock_pi(u32 __user *uaddr, unsigned int flags) +@@ -1187,6 +1217,7 @@ retry: return ret; } @@ -10826,7 +10856,7 @@ index 1d4bc493b..486c68c11 100644 NULL }; diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c -index 151bd3de5..5c21ba41e 100644 +index 3468d8230..6eef8527e 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -56,6 +56,7 @@ @@ -10856,7 +10886,7 @@ index 151bd3de5..5c21ba41e 100644 /* diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c -index 21db0df0e..4a10e8c16 100644 +index bf3a28ee7..99129c891 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c @@ -218,6 +218,11 @@ static __always_inline bool rt_mutex_cmpxchg_acquire(struct rt_mutex_base *lock, @@ -10901,8 +10931,8 @@ index 21db0df0e..4a10e8c16 100644 raw_spin_lock_irq(&lock->wait_lock); set_current_state(state); -@@ -1642,7 +1661,7 @@ static void __sched rt_mutex_handle_deadlock(int res, int detect_deadlock, - WARN(1, "rtmutex deadlock detected\n"); +@@ -1643,7 +1662,7 @@ static void __sched rt_mutex_handle_deadlock(int res, int detect_deadlock, + while (1) { set_current_state(TASK_INTERRUPTIBLE); - schedule(); @@ -10910,7 +10940,7 @@ index 21db0df0e..4a10e8c16 100644 } } -@@ -1737,6 +1756,15 @@ static int __sched rt_mutex_slowlock(struct rt_mutex_base *lock, +@@ -1738,6 +1757,15 @@ static int __sched rt_mutex_slowlock(struct rt_mutex_base *lock, unsigned long flags; int ret; @@ -10926,7 +10956,7 @@ index 21db0df0e..4a10e8c16 100644 /* * Technically we could use raw_spin_[un]lock_irq() here, but this can * be called in early boot if the cmpxchg() fast path is disabled -@@ -1748,6 +1776,7 @@ static int __sched rt_mutex_slowlock(struct rt_mutex_base *lock, +@@ -1749,6 +1777,7 @@ static int __sched rt_mutex_slowlock(struct rt_mutex_base *lock, raw_spin_lock_irqsave(&lock->wait_lock, flags); ret = __rt_mutex_slowlock_locked(lock, ww_ctx, state); raw_spin_unlock_irqrestore(&lock->wait_lock, flags); @@ -10934,7 +10964,7 @@ index 21db0df0e..4a10e8c16 100644 return ret; } -@@ -1755,7 +1784,9 @@ static int __sched rt_mutex_slowlock(struct rt_mutex_base *lock, +@@ -1756,7 +1785,9 @@ static int __sched rt_mutex_slowlock(struct rt_mutex_base *lock, static __always_inline int __rt_mutex_lock(struct rt_mutex_base *lock, unsigned int state) { @@ -10999,7 +11029,7 @@ index 25ec02394..34a59569d 100644 } diff --git a/kernel/locking/rwsem.c b/kernel/locking/rwsem.c -index 9eabd585c..2340b6d90 100644 +index 11ed7ce65..62eac9fd8 100644 --- a/kernel/locking/rwsem.c +++ b/kernel/locking/rwsem.c @@ -1427,8 +1427,14 @@ static inline void __downgrade_write(struct rw_semaphore *sem) @@ -13073,7 +13103,7 @@ index b4e390e0b..615a2d094 100644 /* * We cannot access per-CPU data (e.g. per-CPU flush irq_work) before -@@ -698,9 +742,6 @@ static ssize_t msg_print_ext_body(char *buf, size_t size, +@@ -698,9 +742,6 @@ out: return len; } @@ -13092,7 +13122,7 @@ index b4e390e0b..615a2d094 100644 { /* * Do not use spinning in panic(). The panic CPU wants to keep the lock. -@@ -1887,7 +1928,7 @@ static void console_lock_spinning_enable(void) +@@ -1887,7 +1928,7 @@ lockdep: * * Return: 1 if the lock rights were passed, 0 otherwise. */ @@ -13101,7 +13131,7 @@ index b4e390e0b..615a2d094 100644 { int waiter; -@@ -2305,54 +2346,123 @@ int vprintk_store(int facility, int level, +@@ -2305,54 +2346,123 @@ out: return ret; } @@ -13448,7 +13478,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 @@ static bool printk_get_next_message(struct printk_message *pmsg, u64 seq, +@@ -2887,6 +2945,13 @@ out: return true; } @@ -13462,7 +13492,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 @@ static bool printk_get_next_message(struct printk_message *pmsg, u64 seq, +@@ -2904,12 +2969,10 @@ out: */ static bool console_emit_next_record(struct console *con, bool *handover, int cookie) { @@ -13604,7 +13634,7 @@ index b4e390e0b..615a2d094 100644 if (!progress) continue; -@@ -3038,19 +3145,7 @@ static bool console_flush_all(bool do_cond_resched, u64 *next_seq, bool *handove +@@ -3038,19 +3145,7 @@ abandon: return false; } @@ -14187,7 +14217,7 @@ index fde338606..e7b808b82 100644 return NULL; } -@@ -1441,20 +1457,118 @@ bool prb_reserve_in_last(struct prb_reserved_entry *e, struct printk_ringbuffer +@@ -1441,20 +1457,118 @@ fail_reopen: return false; } @@ -14758,10 +14788,10 @@ index 6d10927a0..8d9408d65 100644 { #ifdef CONFIG_KGDB_KDB diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c -index ade42d6a9..eebb9b454 100644 +index 46612fb15..f893f4cfd 100644 --- a/kernel/rcu/rcutorture.c +++ b/kernel/rcu/rcutorture.c -@@ -2408,6 +2408,12 @@ static int rcutorture_booster_init(unsigned int cpu) +@@ -2409,6 +2409,12 @@ static int rcutorture_booster_init(unsigned int cpu) WARN_ON_ONCE(!t); sp.sched_priority = 2; sched_setscheduler_nocheck(t, SCHED_FIFO, &sp); @@ -14775,7 +14805,7 @@ index ade42d6a9..eebb9b454 100644 /* Don't allow time recalculation while creating a new task. */ diff --git a/kernel/rcu/tree_stall.h b/kernel/rcu/tree_stall.h -index e09f4f624..311483048 100644 +index 11a1fac3a..6f085a159 100644 --- a/kernel/rcu/tree_stall.h +++ b/kernel/rcu/tree_stall.h @@ -8,6 +8,7 @@ @@ -14786,7 +14816,7 @@ index e09f4f624..311483048 100644 ////////////////////////////////////////////////////////////////////////////// // -@@ -603,6 +604,8 @@ static void print_other_cpu_stall(unsigned long gp_seq, unsigned long gps) +@@ -604,6 +605,8 @@ static void print_other_cpu_stall(unsigned long gp_seq, unsigned long gps) if (rcu_stall_is_suppressed()) return; @@ -14795,7 +14825,7 @@ index e09f4f624..311483048 100644 /* * OK, time to rat on our buddy... * See Documentation/RCU/stallwarn.rst for info on how to debug -@@ -657,6 +660,8 @@ static void print_other_cpu_stall(unsigned long gp_seq, unsigned long gps) +@@ -658,6 +661,8 @@ static void print_other_cpu_stall(unsigned long gp_seq, unsigned long gps) panic_on_rcu_stall(); rcu_force_quiescent_state(); /* Kick them all. */ @@ -14805,7 +14835,7 @@ index e09f4f624..311483048 100644 static void print_cpu_stall(unsigned long gps) diff --git a/kernel/sched/core.c b/kernel/sched/core.c -index 07bcc5f2e..7a6b82e1f 100644 +index 7a9aff1db..dcf660b79 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -901,14 +901,15 @@ static inline void hrtick_rq_init(struct rq *rq) @@ -14913,7 +14943,7 @@ index 07bcc5f2e..7a6b82e1f 100644 smp_send_reschedule(cpu); else trace_sched_wake_idle_without_ipi(cpu); -@@ -6777,10 +6797,14 @@ void __noreturn do_task_dead(void) +@@ -6775,10 +6795,14 @@ void __noreturn do_task_dead(void) static inline void sched_submit_work(struct task_struct *tsk) { @@ -14930,7 +14960,7 @@ index 07bcc5f2e..7a6b82e1f 100644 task_flags = tsk->flags; /* -@@ -6806,6 +6830,8 @@ static inline void sched_submit_work(struct task_struct *tsk) +@@ -6804,6 +6828,8 @@ static inline void sched_submit_work(struct task_struct *tsk) * make sure to submit it to avoid deadlocks. */ blk_flush_plug(tsk->plug, true); @@ -14939,7 +14969,7 @@ index 07bcc5f2e..7a6b82e1f 100644 } static void sched_update_worker(struct task_struct *tsk) -@@ -6818,16 +6844,26 @@ static void sched_update_worker(struct task_struct *tsk) +@@ -6816,16 +6842,26 @@ static void sched_update_worker(struct task_struct *tsk) } } @@ -14971,7 +15001,7 @@ index 07bcc5f2e..7a6b82e1f 100644 sched_update_worker(tsk); } EXPORT_SYMBOL(schedule); -@@ -6891,11 +6927,7 @@ void __sched schedule_preempt_disabled(void) +@@ -6889,11 +6925,7 @@ void __sched schedule_preempt_disabled(void) #ifdef CONFIG_PREEMPT_RT void __sched notrace schedule_rtlock(void) { @@ -14984,7 +15014,7 @@ index 07bcc5f2e..7a6b82e1f 100644 } NOKPROBE_SYMBOL(schedule_rtlock); #endif -@@ -7091,6 +7123,32 @@ static void __setscheduler_prio(struct task_struct *p, int prio) +@@ -7089,6 +7121,32 @@ static void __setscheduler_prio(struct task_struct *p, int prio) #ifdef CONFIG_RT_MUTEXES @@ -15017,7 +15047,7 @@ index 07bcc5f2e..7a6b82e1f 100644 static inline int __rt_effective_prio(struct task_struct *pi_task, int prio) { if (pi_task) -@@ -8953,6 +9011,21 @@ static inline void preempt_dynamic_init(void) { } +@@ -8951,6 +9009,21 @@ static inline void preempt_dynamic_init(void) { } #endif /* #ifdef CONFIG_PREEMPT_DYNAMIC */ @@ -15077,7 +15107,7 @@ index 8b3063398..76530c8b3 100644 } late_initcall(sched_init_debug); diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c -index 8de28b182..196536f0a 100644 +index d5ae744de..51cc50a7e 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); @@ -15145,7 +15175,7 @@ index 8de28b182..196536f0a 100644 static void update_curr_fair(struct rq *rq) { update_curr(cfs_rq_of(&rq->curr->se)); -@@ -5631,7 +5647,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) +@@ -5629,7 +5645,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) /* * Update run-time statistics of the 'current'. */ @@ -15154,7 +15184,7 @@ index 8de28b182..196536f0a 100644 /* * Ensure that runnable average is periodically updated. -@@ -5645,7 +5661,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) +@@ -5643,7 +5659,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) * validating it and just reschedule. */ if (queued) { @@ -15163,7 +15193,7 @@ index 8de28b182..196536f0a 100644 return; } /* -@@ -5791,7 +5807,7 @@ static void __account_cfs_rq_runtime(struct cfs_rq *cfs_rq, u64 delta_exec) +@@ -5789,7 +5805,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)) @@ -15172,7 +15202,7 @@ index 8de28b182..196536f0a 100644 } static __always_inline -@@ -6090,7 +6106,7 @@ void unthrottle_cfs_rq(struct cfs_rq *cfs_rq) +@@ -6088,7 +6104,7 @@ unthrottle_throttle: /* Determine whether we need to wake up potentially idle CPU: */ if (rq->curr == rq->idle && rq->cfs.nr_running) @@ -15181,7 +15211,7 @@ index 8de28b182..196536f0a 100644 } #ifdef CONFIG_SMP -@@ -7291,7 +7307,7 @@ static void hrtick_start_fair(struct rq *rq, struct task_struct *p) +@@ -7333,7 +7349,7 @@ static void hrtick_start_fair(struct rq *rq, struct task_struct *p) if (delta < 0) { if (task_current(rq, p)) @@ -15190,7 +15220,7 @@ index 8de28b182..196536f0a 100644 return; } hrtick_start(rq, delta); -@@ -9231,7 +9247,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ +@@ -9314,7 +9330,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. */ @@ -15198,8 +15228,8 @@ index 8de28b182..196536f0a 100644 + if (need_resched()) return; - /* Idle tasks are by definition preempted by non-idle tasks. */ -@@ -9273,7 +9289,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ + if (!sched_feat(WAKEUP_PREEMPTION)) +@@ -9356,7 +9372,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ return; preempt: @@ -15208,7 +15238,7 @@ index 8de28b182..196536f0a 100644 } #ifdef CONFIG_QOS_SCHED -@@ -9756,8 +9772,7 @@ static bool _qos_smt_check_need_resched(int this_cpu, struct rq *rq) +@@ -9839,8 +9855,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 @@ -15218,7 +15248,7 @@ index 8de28b182..196536f0a 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. */ -@@ -14139,7 +14154,7 @@ static inline void task_tick_core(struct rq *rq, struct task_struct *curr) +@@ -14214,7 +14229,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)) @@ -15227,7 +15257,7 @@ index 8de28b182..196536f0a 100644 } /* -@@ -14455,7 +14470,7 @@ prio_changed_fair(struct rq *rq, struct task_struct *p, int oldprio) +@@ -14530,7 +14545,7 @@ prio_changed_fair(struct rq *rq, struct task_struct *p, int oldprio) */ if (task_current(rq, p)) { if (p->prio > oldprio) @@ -15281,11 +15311,11 @@ index 77bb7ee8c..6dedad4f4 100644 rd->rto_cpu = -1; diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h -index 9de2bac64..0f60c4654 100644 +index 761870540..f9918a975 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h -@@ -2600,6 +2600,7 @@ extern void init_sched_fair_class(void); - extern void reweight_task(struct task_struct *p, int prio); +@@ -2601,6 +2601,7 @@ extern void init_sched_fair_class(void); + extern void reweight_task(struct task_struct *p, const struct load_weight *lw); extern void resched_curr(struct rq *rq); +extern void resched_curr_lazy(struct rq *rq); @@ -15293,7 +15323,7 @@ index 9de2bac64..0f60c4654 100644 extern struct rt_bandwidth def_rt_bandwidth; diff --git a/kernel/signal.c b/kernel/signal.c -index 28cddef39..cf2c75e3e 100644 +index f36c58ea7..0f2615143 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, @@ -15338,10 +15368,10 @@ index 28cddef39..cf2c75e3e 100644 cgroup_leave_frozen(true); diff --git a/kernel/softirq.c b/kernel/softirq.c -index 210cf5f8d..cae0ae2e2 100644 +index bd9716d7b..2fde8af88 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c -@@ -247,6 +247,19 @@ void __local_bh_enable_ip(unsigned long ip, unsigned int cnt) +@@ -247,6 +247,19 @@ out: } EXPORT_SYMBOL(__local_bh_enable_ip); @@ -15361,7 +15391,7 @@ index 210cf5f8d..cae0ae2e2 100644 /* * Invoked from ksoftirqd_run() outside of the interrupt disabled section * to acquire the per CPU local lock for reentrancy protection. -@@ -619,6 +632,24 @@ static inline void tick_irq_exit(void) +@@ -623,6 +636,24 @@ static inline void tick_irq_exit(void) #endif } @@ -15386,7 +15416,7 @@ index 210cf5f8d..cae0ae2e2 100644 static inline void __irq_exit_rcu(void) { #ifndef __ARCH_IRQ_EXIT_IRQS_DISABLED -@@ -631,6 +662,10 @@ static inline void __irq_exit_rcu(void) +@@ -635,6 +666,10 @@ static inline void __irq_exit_rcu(void) if (!in_interrupt() && local_softirq_pending()) invoke_softirq(); @@ -15397,7 +15427,7 @@ index 210cf5f8d..cae0ae2e2 100644 tick_irq_exit(); } -@@ -963,12 +998,70 @@ static struct smp_hotplug_thread softirq_threads = { +@@ -967,12 +1002,70 @@ static struct smp_hotplug_thread softirq_threads = { .thread_comm = "ksoftirqd/%u", }; @@ -15470,10 +15500,10 @@ index 210cf5f8d..cae0ae2e2 100644 } early_initcall(spawn_ksoftirqd); diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c -index edb0f821d..a72900121 100644 +index 57e5cb36f..c4ae45701 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c -@@ -1809,7 +1809,7 @@ void hrtimer_interrupt(struct clock_event_device *dev) +@@ -1812,7 +1812,7 @@ retry: if (!ktime_before(now, cpu_base->softirq_expires_next)) { cpu_base->softirq_expires_next = KTIME_MAX; cpu_base->softirq_activated = 1; @@ -15482,7 +15512,7 @@ index edb0f821d..a72900121 100644 } __hrtimer_run_queues(cpu_base, now, flags, HRTIMER_ACTIVE_HARD); -@@ -1922,7 +1922,7 @@ void hrtimer_run_queues(void) +@@ -1925,7 +1925,7 @@ void hrtimer_run_queues(void) if (!ktime_before(now, cpu_base->softirq_expires_next)) { cpu_base->softirq_expires_next = KTIME_MAX; cpu_base->softirq_activated = 1; @@ -15536,7 +15566,7 @@ index 63a8ce717..b3fbe97d1 100644 /* diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c -index c0831e669..5436270e0 100644 +index 8f92edf15..b2bdd1863 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) @@ -15585,10 +15615,10 @@ index 3b7d3e9eb..5a4fefbc0 100644 need_resched = 'p'; break; diff --git a/net/core/dev.c b/net/core/dev.c -index 1f6c8945f..1e8928cd3 100644 +index 540ab980e..8bbcd7283 100644 --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4705,15 +4705,6 @@ static void rps_trigger_softirq(void *data) +@@ -4715,15 +4715,6 @@ static void rps_trigger_softirq(void *data) #endif /* CONFIG_RPS */ @@ -15604,7 +15634,7 @@ index 1f6c8945f..1e8928cd3 100644 /* * After we queued a packet into sd->input_pkt_queue, * we need to make sure this queue is serviced soon. -@@ -6682,6 +6673,32 @@ static void skb_defer_free_flush(struct softnet_data *sd) +@@ -6692,6 +6683,32 @@ static void skb_defer_free_flush(struct softnet_data *sd) } } @@ -15637,7 +15667,7 @@ index 1f6c8945f..1e8928cd3 100644 static int napi_threaded_poll(void *data) { struct napi_struct *napi = data; -@@ -11618,7 +11635,11 @@ static int __init net_dev_init(void) +@@ -11629,7 +11646,11 @@ static int __init net_dev_init(void) INIT_CSD(&sd->csd, rps_trigger_softirq, sd); sd->cpu = i; #endif @@ -15650,10 +15680,10 @@ index 1f6c8945f..1e8928cd3 100644 init_gro_hash(&sd->backlog); diff --git a/net/core/skbuff.c b/net/core/skbuff.c -index 60876262b..02e2bab1e 100644 +index f0a9ef1ae..682175af4 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c -@@ -6852,8 +6852,13 @@ nodefer: __kfree_skb(skb); +@@ -6863,8 +6863,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). */ diff --git a/patch-6.6.0-6.0.0-rt20.patch-openeuler_defconfig.patch b/patch-6.6.0-6.0.0-rt20.patch-openeuler_defconfig.patch index 06b6fab..f871268 100644 --- a/patch-6.6.0-6.0.0-rt20.patch-openeuler_defconfig.patch +++ b/patch-6.6.0-6.0.0-rt20.patch-openeuler_defconfig.patch @@ -1,15 +1,5 @@ -From cb6750f16a7d1d5074b0f7c46270014dd348a958 Mon Sep 17 00:00:00 2001 -From: zhangyu -Date: Tue, 21 May 2024 14:50:20 +0800 -Subject: [PATCH] rt2 - ---- - arch/arm64/configs/openeuler_defconfig | 4 ++-- - arch/x86/configs/openeuler_defconfig | 8 ++++---- - 2 files changed, 6 insertions(+), 6 deletions(-) - diff --git a/arch/arm64/configs/openeuler_defconfig b/arch/arm64/configs/openeuler_defconfig -index 3b8d78f94..6c7e6f2f9 100644 +index 61f3e4e34..0d3cabb17 100644 --- a/arch/arm64/configs/openeuler_defconfig +++ b/arch/arm64/configs/openeuler_defconfig @@ -97,7 +97,7 @@ CONFIG_PREEMPT_NONE=y @@ -21,17 +11,17 @@ index 3b8d78f94..6c7e6f2f9 100644 # # CPU/Task time and stats accounting # -@@ -755,7 +755,7 @@ CONFIG_HAVE_KVM_VCPU_RUN_PID_CHANGE=y +@@ -757,7 +757,7 @@ CONFIG_HAVE_KVM_VCPU_RUN_PID_CHANGE=y CONFIG_KVM_XFER_TO_GUEST_WORK=y CONFIG_KVM_GENERIC_HARDWARE_ENABLING=y CONFIG_KVM_HISI_VIRT=y -CONFIG_VIRTUALIZATION=y +#CONFIG_VIRTUALIZATION is not set CONFIG_KVM=y - CONFIG_CVM_HOST=y - # CONFIG_NVHE_EL2_DEBUG is not set + CONFIG_HISI_VIRTCCA_HOST=y + CONFIG_HISI_VIRTCCA_CODA=y diff --git a/arch/x86/configs/openeuler_defconfig b/arch/x86/configs/openeuler_defconfig -index 9b5df8585..ece62e3df 100644 +index 61af907af..4c0ea9071 100644 --- a/arch/x86/configs/openeuler_defconfig +++ b/arch/x86/configs/openeuler_defconfig @@ -112,11 +112,11 @@ CONFIG_BPF_SCHED=y @@ -57,7 +47,7 @@ index 9b5df8585..ece62e3df 100644 CONFIG_UID16=y CONFIG_MULTIUSER=y CONFIG_SGETMASK_SYSCALL=y -@@ -744,7 +744,7 @@ CONFIG_HAVE_KVM_NO_POLL=y +@@ -746,7 +746,7 @@ CONFIG_HAVE_KVM_NO_POLL=y CONFIG_KVM_XFER_TO_GUEST_WORK=y CONFIG_HAVE_KVM_PM_NOTIFIER=y CONFIG_KVM_GENERIC_HARDWARE_ENABLING=y diff --git a/raspberrypi-kernel-rt.spec b/raspberrypi-kernel-rt.spec index 584583a..988be73 100644 --- a/raspberrypi-kernel-rt.spec +++ b/raspberrypi-kernel-rt.spec @@ -2,13 +2,13 @@ %global KernelVer %{version}-%{release}.raspi.%{_target_cpu} -%global hulkrelease 26.0.0 +%global hulkrelease 64.0.0 %global debug_package %{nil} Name: raspberrypi-kernel-rt Version: 6.6.0 -Release: %{hulkrelease}.rt.1 +Release: %{hulkrelease}.rt.2 Summary: Linux Kernel License: GPLv2 URL: http://www.kernel.org/ @@ -73,95 +73,105 @@ cd linux-%{KernelVer} perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}.raspi.%{_target_cpu}/" Makefile -make ARCH=%{Arch} %{?_smp_mflags} bcm2711_defconfig +make ARCH=%{Arch} %{?_smp_mflags} O=output/v8 bcm2711_defconfig -make ARCH=%{Arch} %{?_smp_mflags} KERNELRELEASE=%{KernelVer} +make ARCH=%{Arch} %{?_smp_mflags} O=output/v8 KERNELRELEASE=%{KernelVer}-v8 + +make ARCH=%{Arch} %{?_smp_mflags} O=output/2712 bcm2712_defconfig + +make ARCH=%{Arch} %{?_smp_mflags} O=output/2712 KERNELRELEASE=%{KernelVer}-2712 %install cd linux-%{KernelVer} ## install linux - -make ARCH=%{Arch} INSTALL_MOD_PATH=$RPM_BUILD_ROOT modules_install KERNELRELEASE=%{KernelVer} -rm -rf $RPM_BUILD_ROOT/lib/modules/%{KernelVer}/source $RPM_BUILD_ROOT/lib/modules/%{KernelVer}/build - mkdir -p $RPM_BUILD_ROOT/boot -TargetImage=$(make -s image_name) -TargetImage=${TargetImage%.*} -install -m 755 $TargetImage $RPM_BUILD_ROOT/boot/vmlinuz-%{KernelVer} -install -m 644 .config $RPM_BUILD_ROOT/boot/config-%{KernelVer} -install -m 644 System.map $RPM_BUILD_ROOT/boot/System.map-%{KernelVer} +rpi_version=("v8" "2712") +for rpi in "${rpi_version[@]}"; do + pushd output/$rpi + kernel_ver=%{KernelVer}-$rpi + TargetImage=$(make -s image_name) + make ARCH=%{Arch} INSTALL_MOD_PATH=$RPM_BUILD_ROOT modules_install KERNELRELEASE=$kernel_ver + install -m 755 $TargetImage $RPM_BUILD_ROOT/boot/vmlinuz-$kernel_ver + install -m 644 .config $RPM_BUILD_ROOT/boot/config-$kernel_ver + install -m 644 System.map $RPM_BUILD_ROOT/boot/System.map-$kernel_ver + rm -rf $RPM_BUILD_ROOT/lib/modules/$kernel_ver/source $RPM_BUILD_ROOT/lib/modules/$kernel_ver/build + mkdir -p $RPM_BUILD_ROOT/lib/modules/$kernel_ver/build + + ############ to do collect devel file ######### + # 1. Makefile And Kconfig, .config sysmbol + # 2. scrpits dir + # 3. .h file + find -type f \( -name "Makefile*" -o -name "Kconfig*" \) -exec cp --parents {} $RPM_BUILD_ROOT/lib/modules/$kernel_ver/build \; + for f in Module.symvers System.map Module.markers .config;do + test -f $f || continue + cp $f $RPM_BUILD_ROOT/lib/modules/$kernel_ver/build + done + + cp -a scripts $RPM_BUILD_ROOT/lib/modules/$kernel_ver/build + if [ -d arch/%{Arch}/scripts ]; then + cp -a arch/%{Arch}/scripts $RPM_BUILD_ROOT/lib/modules/$kernel_ver/build/arch/%{_arch} || : + fi + if [ -f arch/%{Arch}/*lds ]; then + cp -a arch/%{Arch}/*lds $RPM_BUILD_ROOT/lib/modules/$kernel_ver/build/arch/%{_arch}/ || : + fi + find $RPM_BUILD_ROOT/lib/modules/$kernel_ver/build/scripts/ -name "*.o" -exec rm -rf {} \; + + if [ -d arch/%{Arch}/include ]; then + cp -a --parents arch/%{Arch}/include $RPM_BUILD_ROOT/lib/modules/$kernel_ver/build/ + fi + cp -a include $RPM_BUILD_ROOT/lib/modules/$kernel_ver/build/include + + if [ -f arch/%{Arch}/kernel/module.lds ]; then + cp -a --parents arch/%{Arch}/kernel/module.lds $RPM_BUILD_ROOT/lib/modules/$kernel_ver/build/ + fi + + # module.lds is moved to scripts by commit 596b0474d3d9 in linux 5.10. + if [ -f scripts/module.lds ]; then + cp -a --parents scripts/module.lds $RPM_BUILD_ROOT/lib/modules/$kernel_ver/build/ + fi + + # copy objtool for raspberrypi-kernel-devel (needed for building external modules) + if grep -q CONFIG_STACK_VALIDATION=y .config; then + mkdir -p $RPM_BUILD_ROOT/lib/modules/$kernel_ver/build/tools/objtool + cp -a tools/objtool/objtool $RPM_BUILD_ROOT/lib/modules/$kernel_ver/build/tools/objtool + fi + + popd + + %ifarch aarch64 + cp -a --parents arch/arm/include/asm $RPM_BUILD_ROOT/lib/modules/$kernel_ver/build/ + %endif + + # Make sure the Makefile and version.h have a matching timestamp so that + # external modules can be built + touch -r $RPM_BUILD_ROOT/lib/modules/$kernel_ver/build/Makefile $RPM_BUILD_ROOT/lib/modules/$kernel_ver/build/include/generated/uapi/linux/version.h + touch -r $RPM_BUILD_ROOT/lib/modules/$kernel_ver/build/.config $RPM_BUILD_ROOT/lib/modules/$kernel_ver/build/include/generated/autoconf.h + # for make prepare + if [ ! -f $RPM_BUILD_ROOT/lib/modules/$kernel_ver/build/include/config/auto.conf ];then + cp .config $RPM_BUILD_ROOT/lib/modules/$kernel_ver/build/include/config/auto.conf + fi + + mkdir -p %{buildroot}/usr/src/kernels + mv $RPM_BUILD_ROOT/lib/modules/$kernel_ver/build $RPM_BUILD_ROOT/usr/src/kernels/$kernel_ver + + find $RPM_BUILD_ROOT/usr/src/kernels/$kernel_ver -name ".*.cmd" -exec rm -f {} \; + + pushd $RPM_BUILD_ROOT/lib/modules/$kernel_ver + ln -sf /usr/src/kernels/$kernel_ver build + ln -sf build source + popd +done + +pushd output/2712 mkdir -p $RPM_BUILD_ROOT/boot/dtb-%{KernelVer}/overlays install -m 644 $(find arch/%{Arch}/boot/dts/broadcom/ -name "*.dtb") $RPM_BUILD_ROOT/boot/dtb-%{KernelVer}/ install -m 644 $(find arch/%{Arch}/boot/dts/overlays/ -name "*.dtbo") $RPM_BUILD_ROOT/boot/dtb-%{KernelVer}/overlays/ if ls arch/%{Arch}/boot/dts/overlays/*.dtb > /dev/null 2>&1; then install -m 644 $(find arch/%{Arch}/boot/dts/overlays/ -name "*.dtb") $RPM_BUILD_ROOT/boot/dtb-%{KernelVer}/overlays/ fi -install -m 644 arch/%{Arch}/boot/dts/overlays/README $RPM_BUILD_ROOT/boot/dtb-%{KernelVer}/overlays/ - -mkdir -p $RPM_BUILD_ROOT/lib/modules/%{KernelVer}/build - -############ to do collect devel file ######### -# 1. Makefile And Kconfig, .config sysmbol -# 2. scrpits dir -# 3. .h file -find -type f \( -name "Makefile*" -o -name "Kconfig*" \) -exec cp --parents {} $RPM_BUILD_ROOT/lib/modules/%{KernelVer}/build \; -for f in Module.symvers System.map Module.markers .config;do - test -f $f || continue - cp $f $RPM_BUILD_ROOT/lib/modules/%{KernelVer}/build -done - -cp -a scripts $RPM_BUILD_ROOT/lib/modules/%{KernelVer}/build -if [ -d arch/%{Arch}/scripts ]; then - cp -a arch/%{Arch}/scripts $RPM_BUILD_ROOT/lib/modules/%{KernelVer}/build/arch/%{_arch} || : -fi -if [ -f arch/%{Arch}/*lds ]; then - cp -a arch/%{Arch}/*lds $RPM_BUILD_ROOT/lib/modules/%{KernelVer}/build/arch/%{_arch}/ || : -fi -find $RPM_BUILD_ROOT/lib/modules/%{KernelVer}/build/scripts/ -name "*.o" -exec rm -rf {} \; - -if [ -d arch/%{Arch}/include ]; then - cp -a --parents arch/%{Arch}/include $RPM_BUILD_ROOT/lib/modules/%{KernelVer}/build/ -fi -cp -a include $RPM_BUILD_ROOT/lib/modules/%{KernelVer}/build/include - -if [ -f arch/%{Arch}/kernel/module.lds ]; then - cp -a --parents arch/%{Arch}/kernel/module.lds $RPM_BUILD_ROOT/lib/modules/%{KernelVer}/build/ -fi - -# module.lds is moved to scripts by commit 596b0474d3d9 in linux 5.10. -if [ -f scripts/module.lds ]; then - cp -a --parents scripts/module.lds $RPM_BUILD_ROOT/lib/modules/%{KernelVer}/build/ -fi - -%ifarch aarch64 - cp -a --parents arch/arm/include/asm $RPM_BUILD_ROOT/lib/modules/%{KernelVer}/build/ -%endif - -# copy objtool for raspberrypi-kernel-devel (needed for building external modules) -if grep -q CONFIG_STACK_VALIDATION=y .config; then - mkdir -p $RPM_BUILD_ROOT/lib/modules/%{KernelVer}/build/tools/objtool - cp -a tools/objtool/objtool $RPM_BUILD_ROOT/lib/modules/%{KernelVer}/build/tools/objtool -fi - -# Make sure the Makefile and version.h have a matching timestamp so that -# external modules can be built -touch -r $RPM_BUILD_ROOT/lib/modules/%{KernelVer}/build/Makefile $RPM_BUILD_ROOT/lib/modules/%{KernelVer}/build/include/generated/uapi/linux/version.h -touch -r $RPM_BUILD_ROOT/lib/modules/%{KernelVer}/build/.config $RPM_BUILD_ROOT/lib/modules/%{KernelVer}/build/include/generated/autoconf.h -# for make prepare -if [ ! -f $RPM_BUILD_ROOT/lib/modules/%{KernelVer}/build/include/config/auto.conf ];then - cp .config $RPM_BUILD_ROOT/lib/modules/%{KernelVer}/build/include/config/auto.conf -fi - -mkdir -p %{buildroot}/usr/src/kernels -mv $RPM_BUILD_ROOT/lib/modules/%{KernelVer}/build $RPM_BUILD_ROOT/usr/src/kernels/%{KernelVer} - -find $RPM_BUILD_ROOT/usr/src/kernels/%{KernelVer} -name ".*.cmd" -exec rm -f {} \; - -pushd $RPM_BUILD_ROOT/lib/modules/%{KernelVer} -ln -sf /usr/src/kernels/%{KernelVer} build -ln -sf build source +install -m 644 ../../arch/%{Arch}/boot/dts/overlays/README $RPM_BUILD_ROOT/boot/dtb-%{KernelVer}/overlays/ popd %postun @@ -188,14 +198,15 @@ else fi fi if [ "$version_old" != "0" ]; then - if [ -f /boot/vmlinuz-$version_old ] && [ -d /boot/dtb-$version_old ] && [ -d /lib/modules/$version_old ]; then + if [ -f /boot/vmlinuz-$version_old-v8 ] && [ -d /boot/dtb-$version_old ] && [ -d /lib/modules/$version_old-v8 ] && [ -f /boot/vmlinuz-$version_old-2712 ] && [ -d /lib/modules/$version_old-2712 ]; then ls /boot/dtb-$version_old/overlays/*.dtbo > /dev/null 2>&1 if [ "$?" == "0" ]; then ls /boot/dtb-$version_old/*.dtb > /dev/null 2>&1 if [ "$?" == "0" ]; then - rm -rf /boot/*.dtb /boot/overlays /boot/kernel8.img + rm -rf /boot/*.dtb /boot/overlays /boot/kernel8.img /boot/kernel_2712.img mkdir /boot/overlays - install -m 755 /boot/vmlinuz-$version_old /boot/kernel8.img + install -m 755 /boot/vmlinuz-$version_old-v8 /boot/kernel8.img + install -m 755 /boot/vmlinuz-$version_old-2712 /boot/kernel_2712.img for file in `ls /boot/dtb-$version_old/*.dtb 2>/dev/null` do if [ -f $file ]; then @@ -219,9 +230,10 @@ if [ "$version_old" != "0" ]; then fi %posttrans -rm -rf /boot/*.dtb /boot/overlays /boot/kernel8.img +rm -rf /boot/*.dtb /boot/overlays /boot/kernel8.img /boot/kernel_2712.img mkdir -p /boot/overlays -install -m 755 /boot/vmlinuz-%{KernelVer} /boot/kernel8.img +install -m 755 /boot/vmlinuz-%{KernelVer}-v8 /boot/kernel8.img +install -m 755 /boot/vmlinuz-%{KernelVer}-2712 /boot/kernel_2712.img for file in `ls /boot/dtb-%{KernelVer}/*.dtb 2>/dev/null` do if [ -f $file ]; then @@ -241,10 +253,16 @@ then fi if [ "$HARDLINK" != "no" -a -x /usr/sbin/hardlink ] then - (cd /usr/src/kernels/%{KernelVer} && + (pushd /usr/src/kernels/%{KernelVer}-v8 && /usr/bin/find . -type f | while read f; do hardlink -c /usr/src/kernels/*.oe*.*/$f $f - done) + done && + popd && + pushd /usr/src/kernels/%{KernelVer}-2712 && + /usr/bin/find . -type f | while read f; do + hardlink -c /usr/src/kernels/*.oe*.*/$f $f + done && + popd) fi %files @@ -254,17 +272,23 @@ fi /boot/System.map-* /boot/vmlinuz-* /boot/dtb-* -/lib/modules/%{KernelVer} +/lib/modules/%{KernelVer}-v8 +/lib/modules/%{KernelVer}-2712 %files devel %defattr (-, root, root) %doc -/lib/modules/%{KernelVer}/source -/lib/modules/%{KernelVer}/build -/usr/src/kernels/%{KernelVer} +/lib/modules/%{KernelVer}-v8/source +/lib/modules/%{KernelVer}-v8/build +/lib/modules/%{KernelVer}-2712/source +/lib/modules/%{KernelVer}-2712/build +/usr/src/kernels/%{KernelVer}-* %changelog +* Mon Dec 16 2024 zhangyu - 6.6.0.64.0.1 +- - update Rpi:preempt-RT to openEuler 6.6.0.64.0.1 + * Wed May 15 2024 zhangyu - 6.6.0.25.0.0 - - update Rpi:preempt-RT to openEuler 6.6.0.25.0.0 @@ -2889,4 +2913,5 @@ fi - package init based on openEuler 5.10.0-5.3.0 * Mon Aug 9 2021 Yafen Fang - 5.10.0-5.1.0.1 -- package init based on openEuler 5.10.0-5.1.0 \ No newline at end of file +- package init based on openEuler 5.10.0-5.1.0 +