diff mbox series

[4/6] parisc: Drop locking in pdc console code

Message ID 20221217220428.383330-4-deller@gmx.de (mailing list archive)
State Accepted, archived
Headers show
Series [1/6] parisc: Drop PMD_SHIFT from calculation in pgtable.h | expand

Commit Message

Helge Deller Dec. 17, 2022, 10:04 p.m. UTC
No need to have specific locking for console I/O since
the PDC functions provide an own locking.

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: <stable@vger.kernel.org> # 6.1+
---
 arch/parisc/kernel/pdc_cons.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

--
2.38.1
diff mbox series

Patch

diff --git a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c
index 7d0989f523d0..df374f7b42c9 100644
--- a/arch/parisc/kernel/pdc_cons.c
+++ b/arch/parisc/kernel/pdc_cons.c
@@ -12,29 +12,19 @@ 
 #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;
 }