diff options
| -rw-r--r-- | arch/sparc/kernel/process_64.c | 4 | ||||
| -rw-r--r-- | arch/sparc/kernel/syscalls.S | 4 | ||||
| -rw-r--r-- | arch/sparc/mm/tsb.c | 2 | ||||
| -rw-r--r-- | drivers/tty/serial/sunhv.c | 22 | ||||
| -rw-r--r-- | drivers/tty/serial/sunsab.c | 14 | ||||
| -rw-r--r-- | drivers/tty/serial/sunsu.c | 14 | ||||
| -rw-r--r-- | drivers/tty/serial/sunzilog.c | 14 |
7 files changed, 31 insertions, 43 deletions
diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c index 32a280ec38c1..d7b4967f8fa6 100644 --- a/arch/sparc/kernel/process_64.c +++ b/arch/sparc/kernel/process_64.c | |||
| @@ -58,9 +58,12 @@ void arch_cpu_idle(void) | |||
| 58 | { | 58 | { |
| 59 | if (tlb_type != hypervisor) { | 59 | if (tlb_type != hypervisor) { |
| 60 | touch_nmi_watchdog(); | 60 | touch_nmi_watchdog(); |
| 61 | local_irq_enable(); | ||
| 61 | } else { | 62 | } else { |
| 62 | unsigned long pstate; | 63 | unsigned long pstate; |
| 63 | 64 | ||
| 65 | local_irq_enable(); | ||
| 66 | |||
| 64 | /* The sun4v sleeping code requires that we have PSTATE.IE cleared over | 67 | /* The sun4v sleeping code requires that we have PSTATE.IE cleared over |
| 65 | * the cpu sleep hypervisor call. | 68 | * the cpu sleep hypervisor call. |
| 66 | */ | 69 | */ |
| @@ -82,7 +85,6 @@ void arch_cpu_idle(void) | |||
| 82 | : "=&r" (pstate) | 85 | : "=&r" (pstate) |
| 83 | : "i" (PSTATE_IE)); | 86 | : "i" (PSTATE_IE)); |
| 84 | } | 87 | } |
| 85 | local_irq_enable(); | ||
| 86 | } | 88 | } |
| 87 | 89 | ||
| 88 | #ifdef CONFIG_HOTPLUG_CPU | 90 | #ifdef CONFIG_HOTPLUG_CPU |
diff --git a/arch/sparc/kernel/syscalls.S b/arch/sparc/kernel/syscalls.S index 87729fff13b9..33a17e7b3ccd 100644 --- a/arch/sparc/kernel/syscalls.S +++ b/arch/sparc/kernel/syscalls.S | |||
| @@ -189,7 +189,8 @@ linux_sparc_syscall32: | |||
| 189 | mov %i0, %l5 ! IEU1 | 189 | mov %i0, %l5 ! IEU1 |
| 190 | 5: call %l7 ! CTI Group brk forced | 190 | 5: call %l7 ! CTI Group brk forced |
| 191 | srl %i5, 0, %o5 ! IEU1 | 191 | srl %i5, 0, %o5 ! IEU1 |
| 192 | ba,a,pt %xcc, 3f | 192 | ba,pt %xcc, 3f |
| 193 | sra %o0, 0, %o0 | ||
| 193 | 194 | ||
| 194 | /* Linux native system calls enter here... */ | 195 | /* Linux native system calls enter here... */ |
| 195 | .align 32 | 196 | .align 32 |
| @@ -217,7 +218,6 @@ linux_sparc_syscall: | |||
| 217 | 3: stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] | 218 | 3: stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] |
| 218 | ret_sys_call: | 219 | ret_sys_call: |
| 219 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %g3 | 220 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %g3 |
| 220 | sra %o0, 0, %o0 | ||
| 221 | mov %ulo(TSTATE_XCARRY | TSTATE_ICARRY), %g2 | 221 | mov %ulo(TSTATE_XCARRY | TSTATE_ICARRY), %g2 |
| 222 | sllx %g2, 32, %g2 | 222 | sllx %g2, 32, %g2 |
| 223 | 223 | ||
diff --git a/arch/sparc/mm/tsb.c b/arch/sparc/mm/tsb.c index 3b3a360b429a..f5d506fdddad 100644 --- a/arch/sparc/mm/tsb.c +++ b/arch/sparc/mm/tsb.c | |||
| @@ -273,7 +273,7 @@ void __init pgtable_cache_init(void) | |||
| 273 | prom_halt(); | 273 | prom_halt(); |
| 274 | } | 274 | } |
| 275 | 275 | ||
| 276 | for (i = 0; i < 8; i++) { | 276 | for (i = 0; i < ARRAY_SIZE(tsb_cache_names); i++) { |
| 277 | unsigned long size = 8192 << i; | 277 | unsigned long size = 8192 << i; |
| 278 | const char *name = tsb_cache_names[i]; | 278 | const char *name = tsb_cache_names[i]; |
| 279 | 279 | ||
diff --git a/drivers/tty/serial/sunhv.c b/drivers/tty/serial/sunhv.c index cf86e729532b..dc697cee248a 100644 --- a/drivers/tty/serial/sunhv.c +++ b/drivers/tty/serial/sunhv.c | |||
| @@ -433,13 +433,10 @@ static void sunhv_console_write_paged(struct console *con, const char *s, unsign | |||
| 433 | unsigned long flags; | 433 | unsigned long flags; |
| 434 | int locked = 1; | 434 | int locked = 1; |
| 435 | 435 | ||
| 436 | local_irq_save(flags); | 436 | if (port->sysrq || oops_in_progress) |
| 437 | if (port->sysrq) { | 437 | locked = spin_trylock_irqsave(&port->lock, flags); |
| 438 | locked = 0; | 438 | else |
| 439 | } else if (oops_in_progress) { | 439 | spin_lock_irqsave(&port->lock, flags); |
| 440 | locked = spin_trylock(&port->lock); | ||
| 441 | } else | ||
| 442 | spin_lock(&port->lock); | ||
| 443 | 440 | ||
| 444 | while (n > 0) { | 441 | while (n > 0) { |
| 445 | unsigned long ra = __pa(con_write_page); | 442 | unsigned long ra = __pa(con_write_page); |
| @@ -470,8 +467,7 @@ static void sunhv_console_write_paged(struct console *con, const char *s, unsign | |||
| 470 | } | 467 | } |
| 471 | 468 | ||
| 472 | if (locked) | 469 | if (locked) |
| 473 | spin_unlock(&port->lock); | 470 | spin_unlock_irqrestore(&port->lock, flags); |
| 474 | local_irq_restore(flags); | ||
| 475 | } | 471 | } |
| 476 | 472 | ||
| 477 | static inline void sunhv_console_putchar(struct uart_port *port, char c) | 473 | static inline void sunhv_console_putchar(struct uart_port *port, char c) |
| @@ -492,7 +488,10 @@ static void sunhv_console_write_bychar(struct console *con, const char *s, unsig | |||
| 492 | unsigned long flags; | 488 | unsigned long flags; |
| 493 | int i, locked = 1; | 489 | int i, locked = 1; |
| 494 | 490 | ||
| 495 | local_irq_save(flags); | 491 | if (port->sysrq || oops_in_progress) |
| 492 | locked = spin_trylock_irqsave(&port->lock, flags); | ||
| 493 | else | ||
| 494 | spin_lock_irqsave(&port->lock, flags); | ||
| 496 | if (port->sysrq) { | 495 | if (port->sysrq) { |
| 497 | locked = 0; | 496 | locked = 0; |
| 498 | } else if (oops_in_progress) { | 497 | } else if (oops_in_progress) { |
| @@ -507,8 +506,7 @@ static void sunhv_console_write_bychar(struct console *con, const char *s, unsig | |||
| 507 | } | 506 | } |
| 508 | 507 | ||
| 509 | if (locked) | 508 | if (locked) |
| 510 | spin_unlock(&port->lock); | 509 | spin_unlock_irqrestore(&port->lock, flags); |
| 511 | local_irq_restore(flags); | ||
| 512 | } | 510 | } |
| 513 | 511 | ||
| 514 | static struct console sunhv_console = { | 512 | static struct console sunhv_console = { |
diff --git a/drivers/tty/serial/sunsab.c b/drivers/tty/serial/sunsab.c index 380fb5355cb2..5faa8e905e98 100644 --- a/drivers/tty/serial/sunsab.c +++ b/drivers/tty/serial/sunsab.c | |||
| @@ -844,20 +844,16 @@ static void sunsab_console_write(struct console *con, const char *s, unsigned n) | |||
| 844 | unsigned long flags; | 844 | unsigned long flags; |
| 845 | int locked = 1; | 845 | int locked = 1; |
| 846 | 846 | ||
| 847 | local_irq_save(flags); | 847 | if (up->port.sysrq || oops_in_progress) |
| 848 | if (up->port.sysrq) { | 848 | locked = spin_trylock_irqsave(&up->port.lock, flags); |
| 849 | locked = 0; | 849 | else |
| 850 | } else if (oops_in_progress) { | 850 | spin_lock_irqsave(&up->port.lock, flags); |
| 851 | locked = spin_trylock(&up->port.lock); | ||
| 852 | } else | ||
| 853 | spin_lock(&up->port.lock); | ||
| 854 | 851 | ||
| 855 | uart_console_write(&up->port, s, n, sunsab_console_putchar); | 852 | uart_console_write(&up->port, s, n, sunsab_console_putchar); |
| 856 | sunsab_tec_wait(up); | 853 | sunsab_tec_wait(up); |
| 857 | 854 | ||
| 858 | if (locked) | 855 | if (locked) |
| 859 | spin_unlock(&up->port.lock); | 856 | spin_unlock_irqrestore(&up->port.lock, flags); |
| 860 | local_irq_restore(flags); | ||
| 861 | } | 857 | } |
| 862 | 858 | ||
| 863 | static int sunsab_console_setup(struct console *con, char *options) | 859 | static int sunsab_console_setup(struct console *con, char *options) |
diff --git a/drivers/tty/serial/sunsu.c b/drivers/tty/serial/sunsu.c index db79b76f5c8e..9a0f24f83720 100644 --- a/drivers/tty/serial/sunsu.c +++ b/drivers/tty/serial/sunsu.c | |||
| @@ -1295,13 +1295,10 @@ static void sunsu_console_write(struct console *co, const char *s, | |||
| 1295 | unsigned int ier; | 1295 | unsigned int ier; |
| 1296 | int locked = 1; | 1296 | int locked = 1; |
| 1297 | 1297 | ||
| 1298 | local_irq_save(flags); | 1298 | if (up->port.sysrq || oops_in_progress) |
| 1299 | if (up->port.sysrq) { | 1299 | locked = spin_trylock_irqsave(&up->port.lock, flags); |
| 1300 | locked = 0; | 1300 | else |
| 1301 | } else if (oops_in_progress) { | 1301 | spin_lock_irqsave(&up->port.lock, flags); |
| 1302 | locked = spin_trylock(&up->port.lock); | ||
| 1303 | } else | ||
| 1304 | spin_lock(&up->port.lock); | ||
| 1305 | 1302 | ||
| 1306 | /* | 1303 | /* |
| 1307 | * First save the UER then disable the interrupts | 1304 | * First save the UER then disable the interrupts |
| @@ -1319,8 +1316,7 @@ static void sunsu_console_write(struct console *co, const char *s, | |||
| 1319 | serial_out(up, UART_IER, ier); | 1316 | serial_out(up, UART_IER, ier); |
| 1320 | 1317 | ||
| 1321 | if (locked) | 1318 | if (locked) |
| 1322 | spin_unlock(&up->port.lock); | 1319 | spin_unlock_irqrestore(&up->port.lock, flags); |
| 1323 | local_irq_restore(flags); | ||
| 1324 | } | 1320 | } |
| 1325 | 1321 | ||
| 1326 | /* | 1322 | /* |
diff --git a/drivers/tty/serial/sunzilog.c b/drivers/tty/serial/sunzilog.c index 45a8c6aa5837..a2c40ed287d2 100644 --- a/drivers/tty/serial/sunzilog.c +++ b/drivers/tty/serial/sunzilog.c | |||
| @@ -1195,20 +1195,16 @@ sunzilog_console_write(struct console *con, const char *s, unsigned int count) | |||
| 1195 | unsigned long flags; | 1195 | unsigned long flags; |
| 1196 | int locked = 1; | 1196 | int locked = 1; |
| 1197 | 1197 | ||
| 1198 | local_irq_save(flags); | 1198 | if (up->port.sysrq || oops_in_progress) |
| 1199 | if (up->port.sysrq) { | 1199 | locked = spin_trylock_irqsave(&up->port.lock, flags); |
| 1200 | locked = 0; | 1200 | else |
| 1201 | } else if (oops_in_progress) { | 1201 | spin_lock_irqsave(&up->port.lock, flags); |
| 1202 | locked = spin_trylock(&up->port.lock); | ||
| 1203 | } else | ||
| 1204 | spin_lock(&up->port.lock); | ||
| 1205 | 1202 | ||
| 1206 | uart_console_write(&up->port, s, count, sunzilog_putchar); | 1203 | uart_console_write(&up->port, s, count, sunzilog_putchar); |
| 1207 | udelay(2); | 1204 | udelay(2); |
| 1208 | 1205 | ||
| 1209 | if (locked) | 1206 | if (locked) |
| 1210 | spin_unlock(&up->port.lock); | 1207 | spin_unlock_irqrestore(&up->port.lock, flags); |
| 1211 | local_irq_restore(flags); | ||
| 1212 | } | 1208 | } |
| 1213 | 1209 | ||
| 1214 | static int __init sunzilog_console_setup(struct console *con, char *options) | 1210 | static int __init sunzilog_console_setup(struct console *con, char *options) |
