.. | .. |
---|
2199 | 2199 | { |
---|
2200 | 2200 | struct uart_amba_port *uap = amba_ports[co->index]; |
---|
2201 | 2201 | unsigned int old_cr = 0, new_cr; |
---|
2202 | | - unsigned long flags = 0; |
---|
| 2202 | + unsigned long flags; |
---|
2203 | 2203 | int locked = 1; |
---|
2204 | 2204 | |
---|
2205 | 2205 | clk_enable(uap->clk); |
---|
2206 | 2206 | |
---|
2207 | | - /* |
---|
2208 | | - * local_irq_save(flags); |
---|
2209 | | - * |
---|
2210 | | - * This local_irq_save() is nonsense. If we come in via sysrq |
---|
2211 | | - * handling then interrupts are already disabled. Aside of |
---|
2212 | | - * that the port.sysrq check is racy on SMP regardless. |
---|
2213 | | - */ |
---|
| 2207 | + local_irq_save(flags); |
---|
2214 | 2208 | if (uap->port.sysrq) |
---|
2215 | 2209 | locked = 0; |
---|
2216 | 2210 | else if (oops_in_progress) |
---|
2217 | | - locked = spin_trylock_irqsave(&uap->port.lock, flags); |
---|
| 2211 | + locked = spin_trylock(&uap->port.lock); |
---|
2218 | 2212 | else |
---|
2219 | | - spin_lock_irqsave(&uap->port.lock, flags); |
---|
| 2213 | + spin_lock(&uap->port.lock); |
---|
2220 | 2214 | |
---|
2221 | 2215 | /* |
---|
2222 | 2216 | * First save the CR then disable the interrupts |
---|
.. | .. |
---|
2242 | 2236 | pl011_write(old_cr, uap, REG_CR); |
---|
2243 | 2237 | |
---|
2244 | 2238 | if (locked) |
---|
2245 | | - spin_unlock_irqrestore(&uap->port.lock, flags); |
---|
| 2239 | + spin_unlock(&uap->port.lock); |
---|
| 2240 | + local_irq_restore(flags); |
---|
2246 | 2241 | |
---|
2247 | 2242 | clk_disable(uap->clk); |
---|
2248 | 2243 | } |
---|