[linux-yocto] Fwd: [PATCH] serial: pch_uart: no need to disable irq for -rt kernel

Darren Hart dvhart at linux.intel.com
Wed Nov 21 08:06:25 PST 2012



On 11/21/2012 07:53 AM, Bruce Ashfield wrote:
> On 12-11-21 10:46 AM, Bruce Ashfield wrote:
>> Looping this via the linux-yocto mailing list as well, since I plan to
>> merge this to the 3.4 yocto kernel (with a slightly tweaked header),
>> which shares the same base and will have the same problem.
>>
>> Darren: does this look fine to you ?
> 
> Cancel this. I *knew* the patch looked familiar .. I already have
> this fix .. from Darren :)

Right, that. ;-)

--
Darren

> 
> Cheers,
> 
> Bruce
> 
>>
>> Cheers,
>>
>> Bruce
>>
>>
>> -------- Original Message --------
>> Subject: [PATCH] serial: pch_uart: no need to disable irq for -rt kernel
>> Date: Wed, 21 Nov 2012 16:23:30 +0800
>> From: Liang Li <liang.li at windriver.com>
>>
>> Fix the following call trace when ttyPCH* is used as serial console:
>>
>> BUG: sleeping function called from invalid context at
>> ../linux/kernel/rtmutex.c:646
>>
>> in_atomic(): 0, irqs_disabled(): 1, pid: 12, name: kworker/0:1
>> Pid: 12, comm: kworker/0:1 Tainted: G W
>> 3.4.16-rt17-preempt-rt #1
>> Call Trace:
>> [<c1057236>] __might_sleep+0xd6/0x100
>> [<c163892c>] rt_spin_lock+0x1c/0x40
>> [<c1351c18>] pch_console_write+0x58/0x1c0
>> [<c102a4cb>] __call_console_drivers+0x7b/0xa0
>> [<c102a653>] _call_console_drivers+0x73/0x120
>> [<c163c51d>] ? sub_preempt_count+0x7d/0xb0
>> [<c102a9c1>] console_unlock+0xf1/0x250
>> [<c1346179>] console_callback+0x79/0x120
>> [<c1045177>] process_one_work+0x107/0x410
>> [<c1346100>] ? poke_blanked_console+0xc0/0xc0
>> [<c1346100>] ? poke_blanked_console+0xc0/0xc0
>> [<c10459c5>] worker_thread+0x135/0x2e0
>> [<c1045890>] ? manage_workers.isra.26+0x200/0x200
>> [<c1045890>] ? manage_workers.isra.26+0x200/0x200
>> [<c104a5e3>] kthread+0x73/0x80
>> [<c104a570>] ? __init_kthread_worker+0x40/0x40
>> [<c163f9fa>] kernel_thread_helper+0x6/0x10
>> BUG: sleeping function called from invalid context at ...
>>
>> Signed-off-by: Liang Li <liang.li at windriver.com>
>> ---
>>   drivers/tty/serial/pch_uart.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
>> index 7d47514..604fcc0 100644
>> --- a/drivers/tty/serial/pch_uart.c
>> +++ b/drivers/tty/serial/pch_uart.c
>> @@ -1551,7 +1551,7 @@ pch_console_write(struct console *co, const char
>> *s, unsigned int count)
>>
>>       touch_nmi_watchdog();
>>
>> -    local_irq_save(flags);
>> +    local_irq_save_nort(flags);
>>       if (priv->port.sysrq) {
>>           spin_lock(&priv->lock);
>>           /* serial8250_handle_port() already took the port lock */
>> @@ -1584,7 +1584,7 @@ pch_console_write(struct console *co, const char
>> *s, unsigned int count)
>>           spin_unlock(&priv->port.lock);
>>       if (priv_locked)
>>           spin_unlock(&priv->lock);
>> -    local_irq_restore(flags);
>> +    local_irq_restore_nort(flags);
>>   }
>>
>>   static int __init pch_console_setup(struct console *co, char *options)
> 

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Technical Lead - Linux Kernel



More information about the linux-yocto mailing list