diff --git a/0001-raspberrypi-kernel-RT.patch b/0001-raspberrypi-kernel-RT.patch index fa1cffa7e5e318e6f312794d06320fd2a41a21e9..627d8251b494ed7d391f4d8345d8a0bae2a86612 100644 --- a/0001-raspberrypi-kernel-RT.patch +++ b/0001-raspberrypi-kernel-RT.patch @@ -1,7 +1,7 @@ -From 1dd24e3cb6227ce71015d651d5eff0ea7a38b79f Mon Sep 17 00:00:00 2001 +From 6234478af4f6e3fbc8da05ff26a7d49bfccf8ffe Mon Sep 17 00:00:00 2001 From: zhangyu -Date: Tue, 12 Nov 2024 16:08:21 +0800 -Subject: [PATCH] rpi-rt1 +Date: Wed, 16 Apr 2025 11:46:30 +0800 +Subject: [PATCH] rt1 --- arch/arm/Kconfig | 6 +- @@ -54,7 +54,6 @@ Subject: [PATCH] rpi-rt1 drivers/tty/serial/altera_jtaguart.c | 28 +- drivers/tty/serial/altera_uart.c | 20 +- drivers/tty/serial/amba-pl010.c | 20 +- - drivers/tty/serial/amba-pl011.c | 78 +- drivers/tty/serial/apbuart.c | 8 +- drivers/tty/serial/ar933x_uart.c | 26 +- drivers/tty/serial/arc_uart.c | 16 +- @@ -168,7 +167,7 @@ Subject: [PATCH] rpi-rt1 kernel/trace/trace_output.c | 16 +- net/core/dev.c | 39 +- net/core/skbuff.c | 7 +- - 164 files changed, 5045 insertions(+), 1540 deletions(-) + 163 files changed, 5008 insertions(+), 1499 deletions(-) create mode 100644 kernel/printk/nbcon.c diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig @@ -234,7 +233,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 +271,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 +280,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 +290,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 +300,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 +309,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 +320,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 +337,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 +352,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 +366,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 +376,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 +385,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 +393,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 +413,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 +422,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 +432,10 @@ index a1ff693e4..adcc34042 100644 EXPORT_SYMBOL(kernel_neon_end); diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig -index 21ae67351..f45c46671 100644 +index 9da9d58f1..bedb0c9e5 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig -@@ -99,6 +99,7 @@ config ARM64 +@@ -103,6 +103,7 @@ config ARM64 select ARCH_SUPPORTS_NUMA_BALANCING select ARCH_SUPPORTS_PAGE_TABLE_CHECK select ARCH_SUPPORTS_PER_VMA_LOCK @@ -445,7 +444,7 @@ index 21ae67351..f45c46671 100644 select ARCH_WANT_COMPAT_IPC_PARSE_VERSION if COMPAT select ARCH_WANT_DEFAULT_BPF_JIT diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig -index 37fbb5fc3..9a7d3d054 100644 +index 2979c9f96..57f52ef31 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -166,6 +166,7 @@ config PPC @@ -657,10 +656,10 @@ index d0345bd65..23fed53b8 100644 - #endif diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h -index 4fb84c2e9..61d990f69 100644 +index 8c72d1bcd..c59ad9b7a 100644 --- a/arch/riscv/include/asm/thread_info.h +++ b/arch/riscv/include/asm/thread_info.h -@@ -87,6 +87,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); +@@ -86,6 +86,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); * - pending work-to-be-done flags are in lowest half-word * - other flags in upper half-word(s) */ @@ -668,7 +667,7 @@ index 4fb84c2e9..61d990f69 100644 #define TIF_NOTIFY_RESUME 1 /* callback before returning to user */ #define TIF_SIGPENDING 2 /* signal pending */ #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ -@@ -101,6 +102,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); +@@ -100,6 +101,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) #define _TIF_NOTIFY_SIGNAL (1 << TIF_NOTIFY_SIGNAL) #define _TIF_UPROBE (1 << TIF_UPROBE) @@ -677,7 +676,7 @@ index 4fb84c2e9..61d990f69 100644 #define _TIF_WORK_MASK \ (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | _TIF_NEED_RESCHED | \ diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c -index e39a905ac..dd118773e 100644 +index bb5fb2b82..25b6819b6 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -8,6 +8,7 @@ @@ -696,7 +695,7 @@ index e39a905ac..dd118773e 100644 #define MISALIGNED_COPY_SIZE ((MISALIGNED_BUFFER_SIZE / 2) - 0x80) unsigned long elf_hwcap __read_mostly; -@@ -571,14 +573,15 @@ unsigned long riscv_get_elf_hwcap(void) +@@ -575,14 +577,15 @@ unsigned long riscv_get_elf_hwcap(void) return hwcap; } @@ -714,7 +713,7 @@ index e39a905ac..dd118773e 100644 void *dst; void *src; long speed = RISCV_HWPROBE_MISALIGNED_SLOW; -@@ -587,12 +590,6 @@ void check_unaligned_access(int cpu) +@@ -591,12 +594,6 @@ void check_unaligned_access(int cpu) if (per_cpu(misaligned_access_speed, cpu) != RISCV_HWPROBE_MISALIGNED_UNKNOWN) return; @@ -727,7 +726,7 @@ index e39a905ac..dd118773e 100644 /* Make an unaligned destination buffer. */ dst = (void *)((unsigned long)page_address(page) | 0x1); /* Unalign src as well, but differently (off by 1 + 2 = 3). */ -@@ -645,7 +642,7 @@ void check_unaligned_access(int cpu) +@@ -649,7 +646,7 @@ void check_unaligned_access(int cpu) pr_warn("cpu%d: rdtime lacks granularity needed to measure unaligned access speed\n", cpu); @@ -736,7 +735,7 @@ index e39a905ac..dd118773e 100644 } if (word_cycles < byte_cycles) -@@ -659,18 +656,83 @@ void check_unaligned_access(int cpu) +@@ -663,18 +660,83 @@ void check_unaligned_access(int cpu) (speed == RISCV_HWPROBE_MISALIGNED_FAST) ? "fast" : "slow"); per_cpu(misaligned_access_speed, cpu) = speed; @@ -838,7 +837,7 @@ index 1b8da4e40..2cb5e6514 100644 if (has_vector()) { if (riscv_v_setup_vsize()) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig -index 958a491fb..acb9d6f2a 100644 +index 7efe93e4e..f05bebbc1 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -122,6 +122,7 @@ config X86 @@ -849,7 +848,7 @@ index 958a491fb..acb9d6f2a 100644 select ARCH_USE_BUILTIN_BSWAP select ARCH_USE_MEMTEST select ARCH_USE_QUEUED_RWLOCKS -@@ -278,6 +279,7 @@ config X86 +@@ -279,6 +280,7 @@ config X86 select HAVE_STATIC_CALL select HAVE_STATIC_CALL_INLINE if HAVE_OBJTOOL select HAVE_PREEMPT_DYNAMIC_CALL @@ -858,7 +857,7 @@ index 958a491fb..acb9d6f2a 100644 select HAVE_RUST if X86_64 select HAVE_SYSCALL_TRACEPOINTS diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h -index 971a05326..d176fa5d0 100644 +index 76e13733b..6c62c6852 100644 --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h @@ -85,8 +85,9 @@ struct thread_info { @@ -873,7 +872,7 @@ index 971a05326..d176fa5d0 100644 #define TIF_SPEC_IB 9 /* Indirect branch speculation mitigation */ #define TIF_SPEC_L1D_FLUSH 10 /* Flush L1D on mm switches (processes) */ #define TIF_USER_RETURN_NOTIFY 11 /* notify kernel of userspace return */ -@@ -108,6 +109,7 @@ struct thread_info { +@@ -109,6 +110,7 @@ struct thread_info { #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) @@ -882,7 +881,7 @@ index 971a05326..d176fa5d0 100644 #define _TIF_SSBD (1 << TIF_SSBD) #define _TIF_SPEC_IB (1 << TIF_SPEC_IB) diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c -index 831fa4a12..5af3ebec0 100644 +index d154b5d77..52f5ce0a9 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -107,7 +107,7 @@ static const struct dmi_system_id processor_power_dmi_table[] = { @@ -895,7 +894,7 @@ index 831fa4a12..5af3ebec0 100644 raw_local_irq_disable(); } diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c -index 1ffc53ff5..2594265e0 100644 +index d04ceeadb..9c2a78cf0 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); @@ -948,7 +947,7 @@ index 1ffc53ff5..2594265e0 100644 static inline bool init_done(struct zram *zram) { -@@ -1242,6 +1278,7 @@ static bool zram_meta_alloc(struct zram *zram, u64 disksize) +@@ -1253,6 +1289,7 @@ static bool zram_meta_alloc(struct zram *zram, u64 disksize) if (!huge_class_size) huge_class_size = zs_huge_class_size(zram->mem_pool); @@ -1073,10 +1072,10 @@ index 172aa10a8..4ae472053 100644 + preempt_enable(); } diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c -index 94bf438c7..ef401cc81 100644 +index e0daa4e05..fdbb57fcb 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c -@@ -2141,9 +2141,17 @@ bool dcn20_validate_bandwidth(struct dc *dc, struct dc_state *context, +@@ -2142,9 +2142,17 @@ bool dcn20_validate_bandwidth(struct dc *dc, struct dc_state *context, bool fast_validate) { bool voltage_supported; @@ -1096,10 +1095,10 @@ index 94bf438c7..ef401cc81 100644 } diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c -index d1a25fe6c..5674c3450 100644 +index 24105a5b9..349c22dac 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c -@@ -953,9 +953,17 @@ static bool dcn21_validate_bandwidth(struct dc *dc, struct dc_state *context, +@@ -954,9 +954,17 @@ static bool dcn21_validate_bandwidth(struct dc *dc, struct dc_state *context, bool fast_validate) { bool voltage_supported; @@ -1712,10 +1711,10 @@ index 9afd5979c..db23b3a02 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 c536028e9..efb6f1c19 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; @@ -1724,7 +1723,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); @@ -1733,7 +1732,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 @@ -1741,7 +1740,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); } @@ -1779,7 +1778,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", @@ -1801,7 +1800,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; @@ -1815,7 +1814,7 @@ index e561f21cd..594201fbc 100644 } /** -@@ -1209,9 +1249,9 @@ void serial8250_unregister_port(int line) +@@ -1197,9 +1237,9 @@ void serial8250_unregister_port(int line) if (uart->em485) { unsigned long flags; @@ -1868,7 +1867,7 @@ index 7fa665017..8b30ca8fd 100644 int serial8250_tx_dma(struct uart_8250_port *p) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c -index a1f2259cc..53c284bb2 100644 +index 72f9aab75..b8426ac63 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -263,20 +263,20 @@ static int dw8250_handle_irq(struct uart_port *p) @@ -1980,7 +1979,7 @@ index 28f9a2679..33699e86e 100644 if (tty_termios_baud_rate(termios)) tty_termios_encode_baud_rate(termios, baud, baud); diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c -index 4caecc352..d732ad6a7 100644 +index 9ed62bc7c..e687cd0da 100644 --- a/drivers/tty/serial/8250/8250_omap.c +++ b/drivers/tty/serial/8250/8250_omap.c @@ -405,7 +405,7 @@ static void omap_8250_set_termios(struct uart_port *port, @@ -2210,7 +2209,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 2b1b2928e..d70026d03 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) @@ -2387,7 +2386,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; @@ -2402,7 +2401,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; @@ -2411,7 +2410,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); @@ -2423,7 +2422,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); @@ -2436,7 +2435,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); @@ -2452,7 +2451,7 @@ index 8099e6a26..510bb858f 100644 serial8250_rpm_put(up); } -@@ -2214,7 +2231,7 @@ int serial8250_do_startup(struct uart_port *port) +@@ -2206,7 +2223,7 @@ int serial8250_do_startup(struct uart_port *port) * * Synchronize UART_IER access against the console. */ @@ -2461,7 +2460,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) +@@ -2216,7 +2233,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); @@ -2470,7 +2469,7 @@ index 8099e6a26..510bb858f 100644 } if (port->type == PORT_DA830) { -@@ -2233,10 +2250,10 @@ int serial8250_do_startup(struct uart_port *port) +@@ -2225,10 +2242,10 @@ int serial8250_do_startup(struct uart_port *port) * * Synchronize UART_IER access against the console. */ @@ -2483,7 +2482,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) +@@ -2342,7 +2359,7 @@ int serial8250_do_startup(struct uart_port *port) * * Synchronize UART_IER access against the console. */ @@ -2492,7 +2491,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) +@@ -2354,7 +2371,7 @@ int serial8250_do_startup(struct uart_port *port) iir = serial_port_in(port, UART_IIR); serial_port_out(port, UART_IER, 0); @@ -2501,7 +2500,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) +@@ -2377,7 +2394,7 @@ int serial8250_do_startup(struct uart_port *port) */ serial_port_out(port, UART_LCR, UART_LCR_WLEN8); @@ -2510,7 +2509,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) +@@ -2423,7 +2440,7 @@ int serial8250_do_startup(struct uart_port *port) } dont_test_tx_en: @@ -2519,7 +2518,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) +@@ -2494,17 +2511,17 @@ void serial8250_do_shutdown(struct uart_port *port) * * Synchronize UART_IER access against the console. */ @@ -2540,7 +2539,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) +@@ -2513,7 +2530,7 @@ void serial8250_do_shutdown(struct uart_port *port) port->mctrl &= ~TIOCM_OUT2; serial8250_set_mctrl(port, port->mctrl); @@ -2549,7 +2548,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) +@@ -2749,14 +2766,14 @@ void serial8250_update_uartclk(struct uart_port *port, unsigned int uartclk) quot = serial8250_get_divisor(port, baud, &frac); serial8250_rpm_get(up); @@ -2566,7 +2565,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, +@@ -2793,7 +2810,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, * Synchronize UART_IER access against the console. */ serial8250_rpm_get(up); @@ -2575,7 +2574,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, +@@ -2896,7 +2913,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); @@ -2584,7 +2583,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) +@@ -2919,15 +2936,15 @@ void serial8250_do_set_ldisc(struct uart_port *port, struct ktermios *termios) { if (termios->c_line == N_PPS) { port->flags |= UPF_HARDPPS_CD; @@ -2604,7 +2603,7 @@ index 8099e6a26..510bb858f 100644 } } } -@@ -3331,6 +3348,11 @@ static void serial8250_console_putchar(struct uart_port *port, unsigned char ch) +@@ -3323,6 +3340,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); @@ -2616,15 +2615,15 @@ index 8099e6a26..510bb858f 100644 } /* -@@ -3359,6 +3381,7 @@ static void serial8250_console_restore(struct uart_8250_port *up) - serial8250_out_MCR(up, up->mcr | UART_MCR_DTR | UART_MCR_RTS); +@@ -3361,6 +3383,7 @@ static void fifo_wait_for_lsr(struct uart_8250_port *up, unsigned int count) + } } +#ifdef CONFIG_SERIAL_8250_LEGACY_CONSOLE /* * 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, +@@ -3420,15 +3443,15 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s, touch_nmi_watchdog(); if (oops_in_progress) @@ -2643,7 +2642,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, +@@ -3492,8 +3515,137 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s, serial8250_modem_status(up); if (locked) @@ -2782,7 +2781,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) +@@ -3512,6 +3664,7 @@ static unsigned int probe_baud(struct uart_port *port) int serial8250_console_setup(struct uart_port *port, char *options, bool probe) { @@ -2790,7 +2789,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) +@@ -3521,6 +3674,8 @@ int serial8250_console_setup(struct uart_port *port, char *options, bool probe) if (!port->iobase && !port->membase) return -ENODEV; @@ -3052,303 +3051,6 @@ index b5a7404cb..eabbf8afc 100644 } } } -diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c -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) - flag = TTY_FRAME; - } - -- spin_unlock(&uap->port.lock); -+ uart_port_unlock(&uap->port); - sysrq = uart_handle_sysrq_char(&uap->port, ch & 255); -- spin_lock(&uap->port.lock); -+ uart_port_lock(&uap->port); - - if (!sysrq) - uart_insert_char(&uap->port, ch, UART011_DR_OE, ch, flag); -@@ -564,7 +564,7 @@ static void pl011_dma_tx_callback(void *data) - unsigned long flags; - u16 dmacr; - -- spin_lock_irqsave(&uap->port.lock, flags); -+ uart_port_lock_irqsave(&uap->port, &flags); - if (uap->dmatx.queued) - dma_unmap_single(dmatx->chan->device->dev, dmatx->dma, - dmatx->len, DMA_TO_DEVICE); -@@ -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; -- spin_unlock_irqrestore(&uap->port.lock, flags); -+ uart_port_unlock_irqrestore(&uap->port, flags); - return; - } - -@@ -596,7 +596,7 @@ static void pl011_dma_tx_callback(void *data) - */ - pl011_start_tx_pio(uap); - -- spin_unlock_irqrestore(&uap->port.lock, flags); -+ uart_port_unlock_irqrestore(&uap->port, flags); - } - - /* -@@ -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. - */ -- spin_lock_irq(&uap->port.lock); -+ uart_port_lock_irq(&uap->port); - /* - * Rx data can be taken by the UART interrupts during - * the DMA irq handler. So we check the residue here. -@@ -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); -- spin_unlock_irq(&uap->port.lock); -+ uart_port_unlock_irq(&uap->port); - /* - * Do this check after we picked the DMA chars so we don't - * get some IRQ immediately from RX. -@@ -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) { - -- spin_lock_irqsave(&uap->port.lock, flags); -+ uart_port_lock_irqsave(&uap->port, &flags); - pl011_dma_rx_stop(uap); - uap->im |= UART011_RXIM; - pl011_write(uap->im, uap, REG_IMSC); -- spin_unlock_irqrestore(&uap->port.lock, flags); -+ uart_port_unlock_irqrestore(&uap->port, flags); - - uap->dmarx.running = false; - dmaengine_terminate_all(rxchan); -@@ -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(); - -- spin_lock_irq(&uap->port.lock); -+ uart_port_lock_irq(&uap->port); - uap->dmacr &= ~(UART011_DMAONERR | UART011_RXDMAE | UART011_TXDMAE); - pl011_write(uap->dmacr, uap, REG_DMACR); -- spin_unlock_irq(&uap->port.lock); -+ uart_port_unlock_irq(&uap->port); - - if (uap->using_tx_dma) { - /* In theory, this should already be done by pl011_dma_flush_buffer */ -@@ -1420,9 +1420,9 @@ static void pl011_throttle_rx(struct uart_port *port) - { - unsigned long flags; - -- spin_lock_irqsave(&port->lock, flags); -+ uart_port_lock_irqsave(port, &flags); - pl011_stop_rx(port); -- spin_unlock_irqrestore(&port->lock, flags); -+ uart_port_unlock_irqrestore(port, flags); - } - - static void pl011_enable_ms(struct uart_port *port) -@@ -1440,7 +1440,7 @@ __acquires(&uap->port.lock) - { - pl011_fifo_to_tty(uap); - -- spin_unlock(&uap->port.lock); -+ uart_port_unlock(&uap->port); - tty_flip_buffer_push(&uap->port.state->port); - /* - * If we were temporarily out of DMA mode for a while, -@@ -1465,7 +1465,7 @@ __acquires(&uap->port.lock) - #endif - } - } -- spin_lock(&uap->port.lock); -+ uart_port_lock(&uap->port); - } - - static bool pl011_tx_char(struct uart_amba_port *uap, unsigned char c, -@@ -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; - -- spin_lock_irqsave(&uap->port.lock, flags); -+ uart_port_lock_irqsave(&uap->port, &flags); - status = pl011_read(uap, REG_RIS) & uap->im; - if (status) { - do { -@@ -1606,7 +1606,7 @@ static irqreturn_t pl011_int(int irq, void *dev_id) - handled = 1; - } - -- spin_unlock_irqrestore(&uap->port.lock, flags); -+ uart_port_unlock_irqrestore(&uap->port, flags); - - return IRQ_RETVAL(handled); - } -@@ -1678,14 +1678,14 @@ static void pl011_break_ctl(struct uart_port *port, int break_state) - unsigned long flags; - unsigned int lcr_h; - -- spin_lock_irqsave(&uap->port.lock, flags); -+ uart_port_lock_irqsave(&uap->port, &flags); - lcr_h = pl011_read(uap, REG_LCRH_TX); - if (break_state == -1) - lcr_h |= UART01x_LCRH_BRK; - else - lcr_h &= ~UART01x_LCRH_BRK; - pl011_write(lcr_h, uap, REG_LCRH_TX); -- spin_unlock_irqrestore(&uap->port.lock, flags); -+ uart_port_unlock_irqrestore(&uap->port, flags); - } - - #ifdef CONFIG_CONSOLE_POLL -@@ -1824,7 +1824,7 @@ static void pl011_enable_interrupts(struct uart_amba_port *uap) - unsigned long flags; - unsigned int i; - -- spin_lock_irqsave(&uap->port.lock, flags); -+ uart_port_lock_irqsave(&uap->port, &flags); - - /* Clear out any spuriously appearing RX interrupts */ - pl011_write(UART011_RTIS | UART011_RXIS, uap, REG_ICR); -@@ -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); -- spin_unlock_irqrestore(&uap->port.lock, flags); -+ uart_port_unlock_irqrestore(&uap->port, flags); - } - - 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; - -- spin_lock_irqsave(&uap->port.lock, flags); -+ uart_port_lock_irqsave(&uap->port, &flags); - - uap->im = UART011_RTIM; - if (!pl011_dma_rx_running(uap)) -@@ -1862,7 +1862,7 @@ static void pl011_unthrottle_rx(struct uart_port *port) - - pl011_write(uap->im, uap, REG_IMSC); - -- spin_unlock_irqrestore(&uap->port.lock, flags); -+ uart_port_unlock_irqrestore(&uap->port, flags); - } - - static int pl011_startup(struct uart_port *port) -@@ -1882,7 +1882,7 @@ static int pl011_startup(struct uart_port *port) - - pl011_write(uap->vendor->ifls, uap, REG_IFLS); - -- spin_lock_irq(&uap->port.lock); -+ uart_port_lock_irq(&uap->port); - - cr = pl011_read(uap, REG_CR); - cr &= UART011_CR_RTS | UART011_CR_DTR; -@@ -1893,7 +1893,7 @@ static int pl011_startup(struct uart_port *port) - - pl011_write(cr, uap, REG_CR); - -- spin_unlock_irq(&uap->port.lock); -+ uart_port_unlock_irq(&uap->port); - - /* - * initialise the old status of the modem signals -@@ -1954,12 +1954,12 @@ static void pl011_disable_uart(struct uart_amba_port *uap) - unsigned int cr; - - uap->port.status &= ~(UPSTAT_AUTOCTS | UPSTAT_AUTORTS); -- spin_lock_irq(&uap->port.lock); -+ uart_port_lock_irq(&uap->port); - cr = pl011_read(uap, REG_CR); - cr &= UART011_CR_RTS | UART011_CR_DTR; - cr |= UART01x_CR_UARTEN | UART011_CR_TXE; - pl011_write(cr, uap, REG_CR); -- spin_unlock_irq(&uap->port.lock); -+ uart_port_unlock_irq(&uap->port); - - /* - * disable break condition and fifos -@@ -1971,14 +1971,14 @@ static void pl011_disable_uart(struct uart_amba_port *uap) - - static void pl011_disable_interrupts(struct uart_amba_port *uap) - { -- spin_lock_irq(&uap->port.lock); -+ uart_port_lock_irq(&uap->port); - - /* mask all interrupts and clear all pending ones */ - uap->im = 0; - pl011_write(uap->im, uap, REG_IMSC); - pl011_write(0xffff, uap, REG_ICR); - -- spin_unlock_irq(&uap->port.lock); -+ uart_port_unlock_irq(&uap->port); - } - - static void pl011_shutdown(struct uart_port *port) -@@ -2123,7 +2123,7 @@ pl011_set_termios(struct uart_port *port, struct ktermios *termios, - - bits = tty_get_frame_size(termios->c_cflag); - -- spin_lock_irqsave(&port->lock, flags); -+ uart_port_lock_irqsave(port, &flags); - - /* - * Update the per-port timeout. -@@ -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); - -- spin_unlock_irqrestore(&port->lock, flags); -+ uart_port_unlock_irqrestore(port, flags); - } - - static void -@@ -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; - -- spin_lock_irqsave(&port->lock, flags); -+ uart_port_lock_irqsave(port, &flags); - uart_update_timeout(port, CS8, uap->fixed_baud); - pl011_setup_status_masks(port, termios); -- spin_unlock_irqrestore(&port->lock, flags); -+ uart_port_unlock_irqrestore(port, flags); - } - - static const char *pl011_type(struct uart_port *port) -@@ -2353,13 +2353,10 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) - - clk_enable(uap->clk); - -- local_irq_save(flags); -- if (uap->port.sysrq) -- locked = 0; -- else if (oops_in_progress) -- locked = spin_trylock(&uap->port.lock); -+ if (uap->port.sysrq || oops_in_progress) -+ locked = uart_port_trylock_irqsave(&uap->port, &flags); - else -- spin_lock(&uap->port.lock); -+ uart_port_lock_irqsave(&uap->port, &flags); - - /* - * First save the CR then disable the interrupts -@@ -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) -- spin_unlock(&uap->port.lock); -- local_irq_restore(flags); -+ uart_port_unlock_irqrestore(&uap->port, flags); - - clk_disable(uap->clk); - } diff --git a/drivers/tty/serial/apbuart.c b/drivers/tty/serial/apbuart.c index d3cb341f2..364599f25 100644 --- a/drivers/tty/serial/apbuart.c @@ -4543,7 +4245,7 @@ index 819f957b6..a75eafbcb 100644 static const char *icom_type(struct uart_port *port) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c -index a5d0df2ba..267c9af4b 100644 +index 349d4849b..3934ab8fe 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -586,7 +586,7 @@ static void imx_uart_dma_tx_callback(void *data) @@ -4564,7 +4266,7 @@ index a5d0df2ba..267c9af4b 100644 } /* called with port.lock taken and irqs off */ -@@ -782,11 +782,11 @@ static irqreturn_t imx_uart_rtsint(int irq, void *dev_id) +@@ -797,11 +797,11 @@ static irqreturn_t imx_uart_rtsint(int irq, void *dev_id) struct imx_port *sport = dev_id; irqreturn_t ret; @@ -4578,7 +4280,7 @@ index a5d0df2ba..267c9af4b 100644 return ret; } -@@ -795,9 +795,9 @@ static irqreturn_t imx_uart_txint(int irq, void *dev_id) +@@ -810,9 +810,9 @@ static irqreturn_t imx_uart_txint(int irq, void *dev_id) { struct imx_port *sport = dev_id; @@ -4590,7 +4292,7 @@ index a5d0df2ba..267c9af4b 100644 return IRQ_HANDLED; } -@@ -911,11 +911,11 @@ static irqreturn_t imx_uart_rxint(int irq, void *dev_id) +@@ -926,11 +926,11 @@ static irqreturn_t imx_uart_rxint(int irq, void *dev_id) struct imx_port *sport = dev_id; irqreturn_t ret; @@ -4604,7 +4306,7 @@ index a5d0df2ba..267c9af4b 100644 return ret; } -@@ -978,7 +978,7 @@ static irqreturn_t imx_uart_int(int irq, void *dev_id) +@@ -993,7 +993,7 @@ static irqreturn_t imx_uart_int(int irq, void *dev_id) unsigned int usr1, usr2, ucr1, ucr2, ucr3, ucr4; irqreturn_t ret = IRQ_NONE; @@ -4613,7 +4315,7 @@ index a5d0df2ba..267c9af4b 100644 usr1 = imx_uart_readl(sport, USR1); usr2 = imx_uart_readl(sport, USR2); -@@ -1048,7 +1048,7 @@ static irqreturn_t imx_uart_int(int irq, void *dev_id) +@@ -1063,7 +1063,7 @@ static irqreturn_t imx_uart_int(int irq, void *dev_id) ret = IRQ_HANDLED; } @@ -4622,7 +4324,7 @@ index a5d0df2ba..267c9af4b 100644 return ret; } -@@ -1131,7 +1131,7 @@ static void imx_uart_break_ctl(struct uart_port *port, int break_state) +@@ -1146,7 +1146,7 @@ static void imx_uart_break_ctl(struct uart_port *port, int break_state) unsigned long flags; u32 ucr1; @@ -4631,7 +4333,7 @@ index a5d0df2ba..267c9af4b 100644 ucr1 = imx_uart_readl(sport, UCR1) & ~UCR1_SNDBRK; -@@ -1140,7 +1140,7 @@ static void imx_uart_break_ctl(struct uart_port *port, int break_state) +@@ -1155,7 +1155,7 @@ static void imx_uart_break_ctl(struct uart_port *port, int break_state) imx_uart_writel(sport, ucr1, UCR1); @@ -4640,7 +4342,7 @@ index a5d0df2ba..267c9af4b 100644 } /* -@@ -1153,9 +1153,9 @@ static void imx_uart_timeout(struct timer_list *t) +@@ -1168,9 +1168,9 @@ static void imx_uart_timeout(struct timer_list *t) unsigned long flags; if (sport->port.state) { @@ -4652,7 +4354,7 @@ index a5d0df2ba..267c9af4b 100644 mod_timer(&sport->timer, jiffies + MCTRL_TIMEOUT); } -@@ -1185,9 +1185,9 @@ static void imx_uart_dma_rx_callback(void *data) +@@ -1200,9 +1200,9 @@ static void imx_uart_dma_rx_callback(void *data) status = dmaengine_tx_status(chan, sport->rx_cookie, &state); if (status == DMA_ERROR) { @@ -4664,7 +4366,7 @@ index a5d0df2ba..267c9af4b 100644 return; } -@@ -1216,9 +1216,9 @@ static void imx_uart_dma_rx_callback(void *data) +@@ -1231,9 +1231,9 @@ static void imx_uart_dma_rx_callback(void *data) r_bytes = rx_ring->head - rx_ring->tail; /* If we received something, check for 0xff flood */ @@ -4676,7 +4378,7 @@ index a5d0df2ba..267c9af4b 100644 if (!(sport->port.ignore_status_mask & URXD_DUMMY_READ)) { -@@ -1476,7 +1476,7 @@ static int imx_uart_startup(struct uart_port *port) +@@ -1491,7 +1491,7 @@ static int imx_uart_startup(struct uart_port *port) if (!uart_console(port) && imx_uart_dma_init(sport) == 0) dma_is_inited = 1; @@ -4685,7 +4387,7 @@ index a5d0df2ba..267c9af4b 100644 /* Reset fifo's and state machines */ imx_uart_soft_reset(sport); -@@ -1549,7 +1549,7 @@ static int imx_uart_startup(struct uart_port *port) +@@ -1564,7 +1564,7 @@ static int imx_uart_startup(struct uart_port *port) imx_uart_disable_loopback_rs485(sport); @@ -4694,7 +4396,7 @@ index a5d0df2ba..267c9af4b 100644 return 0; } -@@ -1574,21 +1574,21 @@ static void imx_uart_shutdown(struct uart_port *port) +@@ -1589,21 +1589,21 @@ static void imx_uart_shutdown(struct uart_port *port) sport->dma_is_rxing = 0; } @@ -4720,7 +4422,7 @@ index a5d0df2ba..267c9af4b 100644 /* * Stop our timer. -@@ -1599,7 +1599,7 @@ static void imx_uart_shutdown(struct uart_port *port) +@@ -1614,7 +1614,7 @@ static void imx_uart_shutdown(struct uart_port *port) * Disable all interrupts, port and break condition. */ @@ -4729,7 +4431,7 @@ index a5d0df2ba..267c9af4b 100644 ucr1 = imx_uart_readl(sport, UCR1); ucr1 &= ~(UCR1_TRDYEN | UCR1_RRDYEN | UCR1_RTSDEN | UCR1_RXDMAEN | -@@ -1621,7 +1621,7 @@ static void imx_uart_shutdown(struct uart_port *port) +@@ -1636,7 +1636,7 @@ static void imx_uart_shutdown(struct uart_port *port) ucr4 &= ~UCR4_TCEN; imx_uart_writel(sport, ucr4, UCR4); @@ -4738,7 +4440,7 @@ index a5d0df2ba..267c9af4b 100644 clk_disable_unprepare(sport->clk_per); clk_disable_unprepare(sport->clk_ipg); -@@ -1684,7 +1684,7 @@ imx_uart_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -1699,7 +1699,7 @@ imx_uart_set_termios(struct uart_port *port, struct ktermios *termios, baud = uart_get_baud_rate(port, termios, old, 50, port->uartclk / 16); quot = uart_get_divisor(port, baud); @@ -4747,7 +4449,7 @@ index a5d0df2ba..267c9af4b 100644 /* * Read current UCR2 and save it for future use, then clear all the bits -@@ -1812,7 +1812,7 @@ imx_uart_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -1827,7 +1827,7 @@ imx_uart_set_termios(struct uart_port *port, struct ktermios *termios, if (UART_ENABLE_MS(&sport->port, termios->c_cflag)) imx_uart_enable_ms(&sport->port); @@ -4756,7 +4458,7 @@ index a5d0df2ba..267c9af4b 100644 } static const char *imx_uart_type(struct uart_port *port) -@@ -1874,7 +1874,7 @@ static int imx_uart_poll_init(struct uart_port *port) +@@ -1889,7 +1889,7 @@ static int imx_uart_poll_init(struct uart_port *port) imx_uart_setup_ufcr(sport, TXTL_DEFAULT, RXTL_DEFAULT); @@ -4765,7 +4467,7 @@ index a5d0df2ba..267c9af4b 100644 /* * Be careful about the order of enabling bits here. First enable the -@@ -1902,7 +1902,7 @@ static int imx_uart_poll_init(struct uart_port *port) +@@ -1917,7 +1917,7 @@ static int imx_uart_poll_init(struct uart_port *port) imx_uart_writel(sport, ucr1 | UCR1_RRDYEN, UCR1); imx_uart_writel(sport, ucr2 | UCR2_ATEN, UCR2); @@ -4774,7 +4476,7 @@ index a5d0df2ba..267c9af4b 100644 return 0; } -@@ -2022,9 +2022,9 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count) +@@ -2037,9 +2037,9 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count) if (sport->port.sysrq) locked = 0; else if (oops_in_progress) @@ -4786,7 +4488,7 @@ index a5d0df2ba..267c9af4b 100644 /* * First, save UCR1/2/3 and then disable interrupts -@@ -2052,7 +2052,7 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count) +@@ -2067,7 +2067,7 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count) imx_uart_ucrs_restore(sport, &old_ucr); if (locked) @@ -4795,7 +4497,7 @@ index a5d0df2ba..267c9af4b 100644 } /* -@@ -2210,10 +2210,10 @@ static enum hrtimer_restart imx_trigger_start_tx(struct hrtimer *t) +@@ -2225,10 +2225,10 @@ static enum hrtimer_restart imx_trigger_start_tx(struct hrtimer *t) struct imx_port *sport = container_of(t, struct imx_port, trigger_start_tx); unsigned long flags; @@ -4808,7 +4510,7 @@ index a5d0df2ba..267c9af4b 100644 return HRTIMER_NORESTART; } -@@ -2223,10 +2223,10 @@ static enum hrtimer_restart imx_trigger_stop_tx(struct hrtimer *t) +@@ -2238,10 +2238,10 @@ static enum hrtimer_restart imx_trigger_stop_tx(struct hrtimer *t) struct imx_port *sport = container_of(t, struct imx_port, trigger_stop_tx); unsigned long flags; @@ -4821,7 +4523,7 @@ index a5d0df2ba..267c9af4b 100644 return HRTIMER_NORESTART; } -@@ -2493,9 +2493,9 @@ static void imx_uart_restore_context(struct imx_port *sport) +@@ -2508,9 +2508,9 @@ static void imx_uart_restore_context(struct imx_port *sport) { unsigned long flags; @@ -4833,7 +4535,7 @@ index a5d0df2ba..267c9af4b 100644 return; } -@@ -2510,7 +2510,7 @@ static void imx_uart_restore_context(struct imx_port *sport) +@@ -2525,7 +2525,7 @@ static void imx_uart_restore_context(struct imx_port *sport) imx_uart_writel(sport, sport->saved_reg[2], UCR3); imx_uart_writel(sport, sport->saved_reg[3], UCR4); sport->context_saved = false; @@ -4842,7 +4544,7 @@ index a5d0df2ba..267c9af4b 100644 } static void imx_uart_save_context(struct imx_port *sport) -@@ -2518,7 +2518,7 @@ static void imx_uart_save_context(struct imx_port *sport) +@@ -2533,7 +2533,7 @@ static void imx_uart_save_context(struct imx_port *sport) unsigned long flags; /* Save necessary regs */ @@ -4851,7 +4553,7 @@ index a5d0df2ba..267c9af4b 100644 sport->saved_reg[0] = imx_uart_readl(sport, UCR1); sport->saved_reg[1] = imx_uart_readl(sport, UCR2); sport->saved_reg[2] = imx_uart_readl(sport, UCR3); -@@ -2530,7 +2530,7 @@ static void imx_uart_save_context(struct imx_port *sport) +@@ -2545,7 +2545,7 @@ static void imx_uart_save_context(struct imx_port *sport) sport->saved_reg[8] = imx_uart_readl(sport, UBMR); sport->saved_reg[9] = imx_uart_readl(sport, IMX21_UTS); sport->context_saved = true; @@ -6729,10 +6431,10 @@ index 73c60f5ea..46e70e155 100644 clk_disable(up->clk); diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c -index f798ef3c4..b808c1768 100644 +index f820a09cb..a7db08431 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c -@@ -473,9 +473,9 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s, +@@ -492,9 +492,9 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s, uport = &port->uport; if (oops_in_progress) @@ -6744,7 +6446,7 @@ index f798ef3c4..b808c1768 100644 geni_status = readl(uport->membase + SE_GENI_STATUS); -@@ -511,7 +511,7 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s, +@@ -530,7 +530,7 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s, qcom_geni_serial_setup_tx(uport, port->tx_remaining); if (locked) @@ -6753,7 +6455,7 @@ index f798ef3c4..b808c1768 100644 } static void handle_rx_console(struct uart_port *uport, u32 bytes, bool drop) -@@ -963,7 +963,7 @@ static irqreturn_t qcom_geni_serial_isr(int isr, void *dev) +@@ -992,7 +992,7 @@ static irqreturn_t qcom_geni_serial_isr(int isr, void *dev) if (uport->suspended) return IRQ_NONE; @@ -7321,10 +7023,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 df6023dda..1468c35bd 100644 +index 2962e2351..0b1cfbdf6 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c -@@ -812,6 +812,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); @@ -7332,7 +7034,7 @@ index df6023dda..1468c35bd 100644 if ((port->rs485.flags & SER_RS485_ENABLED) && (port->rs485.delay_rts_before_send > 0)) -@@ -820,6 +821,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); @@ -7484,7 +7186,7 @@ index d4ec943cb..6d4006b41 100644 static const char *tegra_uart_type(struct uart_port *u) diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c -index 8ff0efac6..398104760 100644 +index 77ff27268..8c0b29ff9 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -79,7 +79,7 @@ static inline void uart_port_deref(struct uart_port *uport) @@ -9748,7 +9450,7 @@ index 2e5e86a00..9c13dac1d 100644 return uart_resume_port(cdns_uart->cdns_uart_driver, port); diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c -index 493fc4742..afa52883c 100644 +index 117abcf36..03e2eaf24 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -3543,8 +3543,15 @@ static ssize_t show_cons_active(struct device *dev, @@ -10086,7 +9788,7 @@ index 9aac2ab15..6b9c8a16e 100644 static inline struct task_struct *this_cpu_ksoftirqd(void) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h -index 98b58ae88..974816e66 100644 +index 044527ef5..25b806cab 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -3300,7 +3300,11 @@ struct softnet_data { @@ -10169,7 +9871,7 @@ index e4878bb58..ebebc32e7 100644 #ifdef CONFIG_SMP diff --git a/include/linux/sched.h b/include/linux/sched.h -index b8be76b0c..c4fe6d06d 100644 +index a694cc11d..1d6148e22 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -946,6 +946,9 @@ struct task_struct { @@ -10182,7 +9884,7 @@ index b8be76b0c..c4fe6d06d 100644 /* Bit to tell LSMs we're in execve(): */ unsigned in_execve:1; -@@ -1989,6 +1992,7 @@ static inline int dl_task_check_affinity(struct task_struct *p, const struct cpu +@@ -1992,6 +1995,7 @@ static inline int dl_task_check_affinity(struct task_struct *p, const struct cpu } #endif @@ -10190,7 +9892,7 @@ index b8be76b0c..c4fe6d06d 100644 extern int yield_to(struct task_struct *p, bool preempt); extern void set_user_nice(struct task_struct *p, long nice); extern int task_prio(const struct task_struct *p); -@@ -2140,17 +2144,17 @@ static inline void update_tsk_thread_flag(struct task_struct *tsk, int flag, +@@ -2143,17 +2147,17 @@ static inline void update_tsk_thread_flag(struct task_struct *tsk, int flag, update_ti_thread_flag(task_thread_info(tsk), flag, value); } @@ -10211,7 +9913,7 @@ index b8be76b0c..c4fe6d06d 100644 { return test_ti_thread_flag(task_thread_info(tsk), flag); } -@@ -2163,9 +2167,11 @@ static inline void set_tsk_need_resched(struct task_struct *tsk) +@@ -2166,9 +2170,11 @@ static inline void set_tsk_need_resched(struct task_struct *tsk) static inline void clear_tsk_need_resched(struct task_struct *tsk) { clear_tsk_thread_flag(tsk,TIF_NEED_RESCHED); @@ -10224,7 +9926,7 @@ index b8be76b0c..c4fe6d06d 100644 { return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED)); } -@@ -2346,7 +2352,7 @@ static inline int rwlock_needbreak(rwlock_t *lock) +@@ -2349,7 +2355,7 @@ static inline int rwlock_needbreak(rwlock_t *lock) static __always_inline bool need_resched(void) { @@ -10505,7 +10207,7 @@ index 74d9fe360..0be63993d 100644 #ifndef CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h -index 54ade3cea..c67dd30bc 100644 +index 3f10e29df..37bb8e247 100644 --- a/include/linux/trace_events.h +++ b/include/linux/trace_events.h @@ -179,8 +179,8 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status); @@ -12970,7 +12672,7 @@ index 000000000..b53d93585 +} +device_initcall(printk_init_ops); diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c -index b4e390e0b..615a2d094 100644 +index 8b04d0932..a760c46d3 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -102,12 +102,6 @@ DEFINE_STATIC_SRCU(console_srcu); @@ -14807,7 +14509,7 @@ index 11a1fac3a..6f085a159 100644 static void print_cpu_stall(unsigned long gps) diff --git a/kernel/sched/core.c b/kernel/sched/core.c -index 7a9aff1db..dcf660b79 100644 +index 6a01cd02b..8a0947884 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -901,14 +901,15 @@ static inline void hrtick_rq_init(struct rq *rq) @@ -14915,7 +14617,7 @@ index 7a9aff1db..dcf660b79 100644 smp_send_reschedule(cpu); else trace_sched_wake_idle_without_ipi(cpu); -@@ -6775,10 +6795,14 @@ void __noreturn do_task_dead(void) +@@ -6776,10 +6796,14 @@ void __noreturn do_task_dead(void) static inline void sched_submit_work(struct task_struct *tsk) { @@ -14932,7 +14634,7 @@ index 7a9aff1db..dcf660b79 100644 task_flags = tsk->flags; /* -@@ -6804,6 +6828,8 @@ static inline void sched_submit_work(struct task_struct *tsk) +@@ -6805,6 +6829,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); @@ -14941,7 +14643,7 @@ index 7a9aff1db..dcf660b79 100644 } static void sched_update_worker(struct task_struct *tsk) -@@ -6816,16 +6842,26 @@ static void sched_update_worker(struct task_struct *tsk) +@@ -6819,16 +6845,26 @@ static void sched_update_worker(struct task_struct *tsk) } } @@ -14973,7 +14675,7 @@ index 7a9aff1db..dcf660b79 100644 sched_update_worker(tsk); } EXPORT_SYMBOL(schedule); -@@ -6889,11 +6925,7 @@ void __sched schedule_preempt_disabled(void) +@@ -6892,11 +6928,7 @@ void __sched schedule_preempt_disabled(void) #ifdef CONFIG_PREEMPT_RT void __sched notrace schedule_rtlock(void) { @@ -14986,7 +14688,7 @@ index 7a9aff1db..dcf660b79 100644 } NOKPROBE_SYMBOL(schedule_rtlock); #endif -@@ -7089,6 +7121,32 @@ static void __setscheduler_prio(struct task_struct *p, int prio) +@@ -7092,6 +7124,32 @@ static void __setscheduler_prio(struct task_struct *p, int prio) #ifdef CONFIG_RT_MUTEXES @@ -15019,7 +14721,7 @@ index 7a9aff1db..dcf660b79 100644 static inline int __rt_effective_prio(struct task_struct *pi_task, int prio) { if (pi_task) -@@ -8951,6 +9009,21 @@ static inline void preempt_dynamic_init(void) { } +@@ -8954,6 +9012,21 @@ static inline void preempt_dynamic_init(void) { } #endif /* #ifdef CONFIG_PREEMPT_DYNAMIC */ @@ -15079,10 +14781,10 @@ index 8b3063398..76530c8b3 100644 } late_initcall(sched_init_debug); diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c -index d5ae744de..51cc50a7e 100644 +index c530d501b..6595ad6fe 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c -@@ -1154,8 +1154,10 @@ static void clear_buddies(struct cfs_rq *cfs_rq, struct sched_entity *se); +@@ -1170,8 +1170,10 @@ static void clear_buddies(struct cfs_rq *cfs_rq, struct sched_entity *se); * XXX: strictly: vd_i += N*r_i/w_i such that: vd_i > ve_i * this is probably good enough. */ @@ -15094,7 +14796,7 @@ index d5ae744de..51cc50a7e 100644 if ((s64)(se->vruntime - se->deadline) < 0) return; -@@ -1174,10 +1176,19 @@ static void update_deadline(struct cfs_rq *cfs_rq, struct sched_entity *se) +@@ -1190,10 +1192,19 @@ static void update_deadline(struct cfs_rq *cfs_rq, struct sched_entity *se) /* * The task has consumed its request, reschedule. */ @@ -15117,7 +14819,7 @@ index d5ae744de..51cc50a7e 100644 } #include "pelt.h" -@@ -1285,7 +1296,7 @@ static void update_tg_load_avg(struct cfs_rq *cfs_rq) +@@ -1301,7 +1312,7 @@ static void update_tg_load_avg(struct cfs_rq *cfs_rq) /* * Update the current task's runtime statistics. */ @@ -15126,7 +14828,7 @@ index d5ae744de..51cc50a7e 100644 { struct sched_entity *curr = cfs_rq->curr; u64 now = rq_clock_task(rq_of(cfs_rq)); -@@ -1312,7 +1323,7 @@ static void update_curr(struct cfs_rq *cfs_rq) +@@ -1328,7 +1339,7 @@ static void update_curr(struct cfs_rq *cfs_rq) schedstat_add(cfs_rq->exec_clock, delta_exec); curr->vruntime += calc_delta_fair(delta_exec, curr); @@ -15135,7 +14837,7 @@ index d5ae744de..51cc50a7e 100644 update_min_vruntime(cfs_rq); if (entity_is_task(curr)) { -@@ -1326,6 +1337,11 @@ static void update_curr(struct cfs_rq *cfs_rq) +@@ -1342,6 +1353,11 @@ static void update_curr(struct cfs_rq *cfs_rq) account_cfs_rq_runtime(cfs_rq, delta_exec); } @@ -15147,7 +14849,7 @@ index d5ae744de..51cc50a7e 100644 static void update_curr_fair(struct rq *rq) { update_curr(cfs_rq_of(&rq->curr->se)); -@@ -5629,7 +5645,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) +@@ -5656,7 +5672,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) /* * Update run-time statistics of the 'current'. */ @@ -15156,7 +14858,7 @@ index d5ae744de..51cc50a7e 100644 /* * Ensure that runnable average is periodically updated. -@@ -5643,7 +5659,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) +@@ -5670,7 +5686,7 @@ entity_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr, int queued) * validating it and just reschedule. */ if (queued) { @@ -15165,7 +14867,7 @@ index d5ae744de..51cc50a7e 100644 return; } /* -@@ -5789,7 +5805,7 @@ static void __account_cfs_rq_runtime(struct cfs_rq *cfs_rq, u64 delta_exec) +@@ -5816,7 +5832,7 @@ static void __account_cfs_rq_runtime(struct cfs_rq *cfs_rq, u64 delta_exec) * hierarchy can be throttled */ if (!assign_cfs_rq_runtime(cfs_rq) && likely(cfs_rq->curr)) @@ -15174,7 +14876,7 @@ index d5ae744de..51cc50a7e 100644 } static __always_inline -@@ -6088,7 +6104,7 @@ void unthrottle_cfs_rq(struct cfs_rq *cfs_rq) +@@ -6115,7 +6131,7 @@ void unthrottle_cfs_rq(struct cfs_rq *cfs_rq) /* Determine whether we need to wake up potentially idle CPU: */ if (rq->curr == rq->idle && rq->cfs.nr_running) @@ -15183,7 +14885,7 @@ index d5ae744de..51cc50a7e 100644 } #ifdef CONFIG_SMP -@@ -7333,7 +7349,7 @@ static void hrtick_start_fair(struct rq *rq, struct task_struct *p) +@@ -7357,7 +7373,7 @@ static void hrtick_start_fair(struct rq *rq, struct task_struct *p) if (delta < 0) { if (task_current(rq, p)) @@ -15192,7 +14894,7 @@ index d5ae744de..51cc50a7e 100644 return; } hrtick_start(rq, delta); -@@ -9314,7 +9330,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ +@@ -9341,7 +9357,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ * prevents us from potentially nominating it as a false LAST_BUDDY * below. */ @@ -15201,7 +14903,7 @@ index d5ae744de..51cc50a7e 100644 return; if (!sched_feat(WAKEUP_PREEMPTION)) -@@ -9356,7 +9372,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ +@@ -9384,7 +9400,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ return; preempt: @@ -15210,7 +14912,7 @@ index d5ae744de..51cc50a7e 100644 } #ifdef CONFIG_QOS_SCHED -@@ -9839,8 +9855,7 @@ static bool _qos_smt_check_need_resched(int this_cpu, struct rq *rq) +@@ -9873,8 +9889,7 @@ static bool _qos_smt_check_need_resched(int this_cpu, struct rq *rq) /* * There are two cases rely on the set need_resched to drive away @@ -15220,7 +14922,7 @@ index d5ae744de..51cc50a7e 100644 * b) The qos_smt_status of siblings cpu is offline, the task of curr cpu is idle, * and current cpu only has SCHED_IDLE tasks enqueued. */ -@@ -14214,7 +14229,7 @@ static inline void task_tick_core(struct rq *rq, struct task_struct *curr) +@@ -14248,7 +14263,7 @@ static inline void task_tick_core(struct rq *rq, struct task_struct *curr) */ if (rq->core->core_forceidle_count && rq->cfs.nr_running == 1 && __entity_slice_used(&curr->se, MIN_NR_TASKS_DURING_FORCEIDLE)) @@ -15229,7 +14931,7 @@ index d5ae744de..51cc50a7e 100644 } /* -@@ -14530,7 +14545,7 @@ prio_changed_fair(struct rq *rq, struct task_struct *p, int oldprio) +@@ -14564,7 +14579,7 @@ prio_changed_fair(struct rq *rq, struct task_struct *p, int oldprio) */ if (task_current(rq, p)) { if (p->prio > oldprio) @@ -15295,10 +14997,10 @@ index 761870540..f9918a975 100644 extern struct rt_bandwidth def_rt_bandwidth; diff --git a/kernel/signal.c b/kernel/signal.c -index f36c58ea7..0f2615143 100644 +index c73873d67..aef5dcf43 100644 --- a/kernel/signal.c +++ b/kernel/signal.c -@@ -2332,15 +2332,35 @@ static int ptrace_stop(int exit_code, int why, unsigned long message, +@@ -2334,15 +2334,35 @@ static int ptrace_stop(int exit_code, int why, unsigned long message, do_notify_parent_cldstop(current, false, why); /* @@ -15340,7 +15042,7 @@ index f36c58ea7..0f2615143 100644 cgroup_leave_frozen(true); diff --git a/kernel/softirq.c b/kernel/softirq.c -index bd9716d7b..2fde8af88 100644 +index f8cf88cc4..13f919072 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -247,6 +247,19 @@ void __local_bh_enable_ip(unsigned long ip, unsigned int cnt) @@ -15363,7 +15065,7 @@ index bd9716d7b..2fde8af88 100644 /* * Invoked from ksoftirqd_run() outside of the interrupt disabled section * to acquire the per CPU local lock for reentrancy protection. -@@ -623,6 +636,24 @@ static inline void tick_irq_exit(void) +@@ -630,6 +643,24 @@ static inline void tick_irq_exit(void) #endif } @@ -15388,7 +15090,7 @@ index bd9716d7b..2fde8af88 100644 static inline void __irq_exit_rcu(void) { #ifndef __ARCH_IRQ_EXIT_IRQS_DISABLED -@@ -635,6 +666,10 @@ static inline void __irq_exit_rcu(void) +@@ -642,6 +673,10 @@ static inline void __irq_exit_rcu(void) if (!in_interrupt() && local_softirq_pending()) invoke_softirq(); @@ -15399,7 +15101,7 @@ index bd9716d7b..2fde8af88 100644 tick_irq_exit(); } -@@ -967,12 +1002,70 @@ static struct smp_hotplug_thread softirq_threads = { +@@ -1021,12 +1056,70 @@ static struct smp_hotplug_thread softirq_threads = { .thread_comm = "ksoftirqd/%u", }; @@ -15472,7 +15174,7 @@ index bd9716d7b..2fde8af88 100644 } early_initcall(spawn_ksoftirqd); diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c -index 57e5cb36f..c4ae45701 100644 +index e99b1305e..c4ce69da0 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -1812,7 +1812,7 @@ void hrtimer_interrupt(struct clock_event_device *dev) @@ -15538,10 +15240,10 @@ index 63a8ce717..b3fbe97d1 100644 /* diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c -index 8f92edf15..b2bdd1863 100644 +index 2412c0a46..939d67174 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c -@@ -2708,6 +2708,8 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status) +@@ -2706,6 +2706,8 @@ unsigned int tracing_gen_ctx_irq_test(unsigned int irqs_status) if (tif_need_resched()) trace_flags |= TRACE_FLAG_NEED_RESCHED; @@ -15551,10 +15253,10 @@ index 8f92edf15..b2bdd1863 100644 trace_flags |= TRACE_FLAG_PREEMPT_RESCHED; return (trace_flags << 16) | (min_t(unsigned int, pc & 0xff, 0xf)) | diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c -index 3b7d3e9eb..5a4fefbc0 100644 +index 2b948d35f..959f09ab8 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c -@@ -460,17 +460,29 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry) +@@ -464,17 +464,29 @@ int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry) (entry->flags & TRACE_FLAG_IRQS_OFF && bh_off) ? 'D' : (entry->flags & TRACE_FLAG_IRQS_OFF) ? 'd' : bh_off ? 'b' : @@ -15587,10 +15289,10 @@ index 3b7d3e9eb..5a4fefbc0 100644 need_resched = 'p'; break; diff --git a/net/core/dev.c b/net/core/dev.c -index 540ab980e..8bbcd7283 100644 +index 115de6fee..2bf5b6889 100644 --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4715,15 +4715,6 @@ static void rps_trigger_softirq(void *data) +@@ -4725,15 +4725,6 @@ static void rps_trigger_softirq(void *data) #endif /* CONFIG_RPS */ @@ -15606,7 +15308,7 @@ index 540ab980e..8bbcd7283 100644 /* * After we queued a packet into sd->input_pkt_queue, * we need to make sure this queue is serviced soon. -@@ -6692,6 +6683,32 @@ static void skb_defer_free_flush(struct softnet_data *sd) +@@ -6713,6 +6704,32 @@ static void skb_defer_free_flush(struct softnet_data *sd) } } @@ -15639,7 +15341,7 @@ index 540ab980e..8bbcd7283 100644 static int napi_threaded_poll(void *data) { struct napi_struct *napi = data; -@@ -11629,7 +11646,11 @@ static int __init net_dev_init(void) +@@ -11654,7 +11671,11 @@ static int __init net_dev_init(void) INIT_CSD(&sd->csd, rps_trigger_softirq, sd); sd->cpu = i; #endif @@ -15652,10 +15354,10 @@ index 540ab980e..8bbcd7283 100644 init_gro_hash(&sd->backlog); diff --git a/net/core/skbuff.c b/net/core/skbuff.c -index f0a9ef1ae..682175af4 100644 +index a9efd6fb2..ce127b20d 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c -@@ -6863,8 +6863,13 @@ nodefer: __kfree_skb(skb); +@@ -6865,8 +6865,13 @@ nodefer: __kfree_skb(skb); /* Make sure to trigger NET_RX_SOFTIRQ on the remote CPU * if we are unlucky enough (this seems very unlikely). */ diff --git a/raspberrypi-kernel-rt.spec b/raspberrypi-kernel-rt.spec index e21e66f10895ba29760b1bf446405d5f1d854ee3..e39f1b380eb1d5d7189ff5861f50d5891f4a9cae 100644 --- a/raspberrypi-kernel-rt.spec +++ b/raspberrypi-kernel-rt.spec @@ -2,13 +2,13 @@ %global KernelVer %{version}-%{release}.raspi.%{_target_cpu} -%global hulkrelease 62.0.0 +%global hulkrelease 84.0.0 %global debug_package %{nil} Name: raspberrypi-kernel-rt Version: 6.6.0 -Release: %{hulkrelease}.rt47.3 +Release: %{hulkrelease}.rt47.4 Summary: Linux Kernel License: GPLv2 URL: http://www.kernel.org/ @@ -265,6 +265,9 @@ fi %changelog +* Wed Apr 16 2025 zhangyu - 6.6.0.84.0.4 +- - update Rpi:preempt-RT to openEuler 6.6.0.84.4.0 + * Mon Dec 09 2024 zhangyu - 6.6.0.62.0.3 - - update Rpi:preempt-RT to openEuler 6.6.0.62.3.0