Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1317
b: refs/heads/master
c: 857dde2
h: refs/heads/master
i:
  1315: a587ef9
v: v3
  • Loading branch information
David Woodhouse authored and Russell King committed May 21, 2005
1 parent edf17aa commit 0c36fcc
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 10f02d1c59e55f529140dda3a92f0099d748451c
refs/heads/master: 857dde2e79082d2954ede7f10783addaae956777
17 changes: 12 additions & 5 deletions trunk/drivers/serial/8250.c
Original file line number Diff line number Diff line change
Expand Up @@ -682,8 +682,6 @@ static void autoconfig_16550a(struct uart_8250_port *up)
* from EXCR1. Switch back to bank 0, change it in MCR. Then
* switch back to bank 2, read it from EXCR1 again and check
* it's changed. If so, set baud_base in EXCR2 to 921600. -- dwmw2
* On PowerPC we don't want to change baud_base, as we have
* a number of different divisors. -- Tom Rini
*/
serial_outp(up, UART_LCR, 0);
status1 = serial_in(up, UART_MCR);
Expand All @@ -699,16 +697,25 @@ static void autoconfig_16550a(struct uart_8250_port *up)
serial_outp(up, UART_MCR, status1);

if ((status2 ^ status1) & UART_MCR_LOOP) {
#ifndef CONFIG_PPC
unsigned short quot;

serial_outp(up, UART_LCR, 0xE0);

quot = serial_inp(up, UART_DLM) << 8;
quot += serial_inp(up, UART_DLL);
quot <<= 3;

status1 = serial_in(up, 0x04); /* EXCR1 */
status1 &= ~0xB0; /* Disable LOCK, mask out PRESL[01] */
status1 |= 0x10; /* 1.625 divisor for baud_base --> 921600 */
serial_outp(up, 0x04, status1);

serial_outp(up, UART_DLL, quot & 0xff);
serial_outp(up, UART_DLM, quot >> 8);

serial_outp(up, UART_LCR, 0);
up->port.uartclk = 921600*16;
#endif

up->port.uartclk = 921600*16;
up->port.type = PORT_NS16550A;
up->capabilities |= UART_NATSEMI;
return;
Expand Down
8 changes: 4 additions & 4 deletions trunk/include/linux/spinlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ typedef struct {

#define _spin_trylock_bh(lock) ({preempt_disable(); local_bh_disable(); \
_raw_spin_trylock(lock) ? \
1 : ({preempt_enable_no_resched(); local_bh_enable(); 0;});})
1 : ({preempt_enable(); local_bh_enable(); 0;});})

#define _spin_lock(lock) \
do { \
Expand Down Expand Up @@ -383,15 +383,15 @@ do { \
#define _spin_unlock_bh(lock) \
do { \
_raw_spin_unlock(lock); \
preempt_enable_no_resched(); \
preempt_enable(); \
local_bh_enable(); \
__release(lock); \
} while (0)

#define _write_unlock_bh(lock) \
do { \
_raw_write_unlock(lock); \
preempt_enable_no_resched(); \
preempt_enable(); \
local_bh_enable(); \
__release(lock); \
} while (0)
Expand Down Expand Up @@ -423,8 +423,8 @@ do { \
#define _read_unlock_bh(lock) \
do { \
_raw_read_unlock(lock); \
preempt_enable_no_resched(); \
local_bh_enable(); \
preempt_enable(); \
__release(lock); \
} while (0)

Expand Down
8 changes: 4 additions & 4 deletions trunk/kernel/spinlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ EXPORT_SYMBOL(_spin_unlock_irq);
void __lockfunc _spin_unlock_bh(spinlock_t *lock)
{
_raw_spin_unlock(lock);
preempt_enable_no_resched();
preempt_enable();
local_bh_enable();
}
EXPORT_SYMBOL(_spin_unlock_bh);
Expand All @@ -318,7 +318,7 @@ EXPORT_SYMBOL(_read_unlock_irq);
void __lockfunc _read_unlock_bh(rwlock_t *lock)
{
_raw_read_unlock(lock);
preempt_enable_no_resched();
preempt_enable();
local_bh_enable();
}
EXPORT_SYMBOL(_read_unlock_bh);
Expand All @@ -342,7 +342,7 @@ EXPORT_SYMBOL(_write_unlock_irq);
void __lockfunc _write_unlock_bh(rwlock_t *lock)
{
_raw_write_unlock(lock);
preempt_enable_no_resched();
preempt_enable();
local_bh_enable();
}
EXPORT_SYMBOL(_write_unlock_bh);
Expand All @@ -354,7 +354,7 @@ int __lockfunc _spin_trylock_bh(spinlock_t *lock)
if (_raw_spin_trylock(lock))
return 1;

preempt_enable_no_resched();
preempt_enable();
local_bh_enable();
return 0;
}
Expand Down

0 comments on commit 0c36fcc

Please sign in to comment.