This is a note to let you know that I've just added the patch titled parisc: Drop locking in pdc console code to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: parisc-drop-locking-in-pdc-console-code.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 7dc4dbfe750e1f18c511e73c8ed114da8de9ff85 Mon Sep 17 00:00:00 2001 From: Helge Deller <deller@xxxxxx> Date: Sat, 17 Dec 2022 17:45:40 +0100 Subject: parisc: Drop locking in pdc console code From: Helge Deller <deller@xxxxxx> commit 7dc4dbfe750e1f18c511e73c8ed114da8de9ff85 upstream. No need to have specific locking for console I/O since the PDC functions provide an own locking. Signed-off-by: Helge Deller <deller@xxxxxx> Cc: <stable@xxxxxxxxxxxxxxx> # 6.1+ Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/parisc/kernel/pdc_cons.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c index 7d0989f523d0..cf3bf8232374 100644 --- a/arch/parisc/kernel/pdc_cons.c +++ b/arch/parisc/kernel/pdc_cons.c @@ -12,37 +12,27 @@ #include <asm/page.h> /* for PAGE0 */ #include <asm/pdc.h> /* for iodc_call() proto and friends */ -static DEFINE_SPINLOCK(pdc_console_lock); - static void pdc_console_write(struct console *co, const char *s, unsigned count) { int i = 0; - unsigned long flags; - spin_lock_irqsave(&pdc_console_lock, flags); do { i += pdc_iodc_print(s + i, count - i); } while (i < count); - spin_unlock_irqrestore(&pdc_console_lock, flags); } #ifdef CONFIG_KGDB static int kgdb_pdc_read_char(void) { - int c; - unsigned long flags; - - spin_lock_irqsave(&pdc_console_lock, flags); - c = pdc_iodc_getc(); - spin_unlock_irqrestore(&pdc_console_lock, flags); + int c = pdc_iodc_getc(); return (c <= 0) ? NO_POLL_CHAR : c; } static void kgdb_pdc_write_char(u8 chr) { - if (PAGE0->mem_cons.cl_class != CL_DUPLEX) - pdc_console_write(NULL, &chr, 1); + /* no need to print char as it's shown on standard console */ + /* pdc_iodc_print(&chr, 1); */ } static struct kgdb_io kgdb_pdc_io_ops = { -- 2.39.0 Patches currently in stable-queue which might be from deller@xxxxxx are queue-6.1/parisc-drop-duplicate-kgdb_pdc-console.patch queue-6.1/parisc-fix-locking-in-pdc_iodc_print-firmware-call.patch queue-6.1/parisc-drop-locking-in-pdc-console-code.patch queue-6.1/parisc-drop-pmd_shift-from-calculation-in-pgtable.h.patch queue-6.1/parisc-led-fix-potential-null-ptr-deref-in-start_task.patch queue-6.1/parisc-add-missing-force-prerequisites-in-makefile.patch