[parisc-linux-cvs] pdc_iodc_putc callable with irqs off
Matthew Wilcox
willy@ldl.fc.hp.com
Tue, 02 Oct 2001 10:33:05 -0600
Index: arch/parisc/kernel/firmware.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/firmware.c,v
retrieving revision 1.29
diff -u -p -r1.29 firmware.c
--- firmware.c 2001/08/14 16:54:52 1.29
+++ firmware.c 2001/10/02 16:05:47
@@ -613,6 +613,7 @@ void pdc_iodc_putc(unsigned char c)
static int __attribute__((aligned(8))) iodc_retbuf[32];
static char __attribute__((aligned(64))) iodc_dbuf[4096];
unsigned int n;
+ unsigned int flags;
switch (c) {
case '\n':
@@ -635,12 +636,12 @@ void pdc_iodc_putc(unsigned char c)
break;
}
- spin_lock_irq(&pdc_lock);
+ spin_lock_irqsave(&pdc_lock, flags);
real32_call(PAGE0->mem_cons.iodc_io,
(unsigned long)PAGE0->mem_cons.hpa, ENTRY_IO_COUT,
PAGE0->mem_cons.spa, __pa(PAGE0->mem_cons.dp.layers),
__pa(iodc_retbuf), 0, __pa(iodc_dbuf), n, 0);
- spin_unlock_irq(&pdc_lock);
+ spin_unlock_irqrestore(&pdc_lock, flags);
}
int pdc_sti_call(unsigned long func, unsigned long flags,