parisc: Drop locking in pdc console code
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+
This commit is contained in:
parent
7e6652c79e
commit
7dc4dbfe75
@ -12,37 +12,27 @@
|
|||||||
#include <asm/page.h> /* for PAGE0 */
|
#include <asm/page.h> /* for PAGE0 */
|
||||||
#include <asm/pdc.h> /* for iodc_call() proto and friends */
|
#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)
|
static void pdc_console_write(struct console *co, const char *s, unsigned count)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
unsigned long flags;
|
|
||||||
|
|
||||||
spin_lock_irqsave(&pdc_console_lock, flags);
|
|
||||||
do {
|
do {
|
||||||
i += pdc_iodc_print(s + i, count - i);
|
i += pdc_iodc_print(s + i, count - i);
|
||||||
} while (i < count);
|
} while (i < count);
|
||||||
spin_unlock_irqrestore(&pdc_console_lock, flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_KGDB
|
#ifdef CONFIG_KGDB
|
||||||
static int kgdb_pdc_read_char(void)
|
static int kgdb_pdc_read_char(void)
|
||||||
{
|
{
|
||||||
int c;
|
int c = pdc_iodc_getc();
|
||||||
unsigned long flags;
|
|
||||||
|
|
||||||
spin_lock_irqsave(&pdc_console_lock, flags);
|
|
||||||
c = pdc_iodc_getc();
|
|
||||||
spin_unlock_irqrestore(&pdc_console_lock, flags);
|
|
||||||
|
|
||||||
return (c <= 0) ? NO_POLL_CHAR : c;
|
return (c <= 0) ? NO_POLL_CHAR : c;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void kgdb_pdc_write_char(u8 chr)
|
static void kgdb_pdc_write_char(u8 chr)
|
||||||
{
|
{
|
||||||
if (PAGE0->mem_cons.cl_class != CL_DUPLEX)
|
/* no need to print char as it's shown on standard console */
|
||||||
pdc_console_write(NULL, &chr, 1);
|
/* pdc_iodc_print(&chr, 1); */
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct kgdb_io kgdb_pdc_io_ops = {
|
static struct kgdb_io kgdb_pdc_io_ops = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user