linux-mips
[Top] [All Lists]

Re: [PATCH] serial_txx9: forcibly init the spinlock for PCI UART used as

To: rmk@arm.linux.org.uk
Subject: Re: [PATCH] serial_txx9: forcibly init the spinlock for PCI UART used as a console
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Fri, 06 Jan 2006 00:14:12 +0900 (JST)
Cc: sshtylyov@ru.mvista.com, linux-mips@linux-mips.org, ralf@linux-mips.org
In-reply-to: <20051227184152.GA4474@flint.arm.linux.org.uk>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <43B143EE.6070700@ru.mvista.com> <20051228.003457.74752441.anemo@mba.ocn.ne.jp> <20051227184152.GA4474@flint.arm.linux.org.uk>
Sender: linux-mips-bounce@linux-mips.org
>>>>> On Tue, 27 Dec 2005 18:41:52 +0000, Russell King <rmk@arm.linux.org.uk> 
>>>>> said:

>> Yes, you are right.  I missed the register_console call in
>> uart_add_one_port().  So your patch will fix the problem.  But I
>> suppose the spinlock should be initialized in serial_core.  How
>> about this?

rmk> I think you're layering work-around on top of work-around on top
rmk> of work-around here.

Russell, could you tell me where is the right place to initialize
port's spinlock ?

Currently, serial_core do initialize the spinlock in uart_set_options
(for console) and uart_add_one_port (for other ports).  And some low
level drivers also initialize it in some place.
(serial8250_isa_init_ports, etc.)

A.  The initialization in serial_core is just for failsafe and low
    level drivers should initialize the spinlock.

B.  Those initializations in low level drivers are there just by
    historical (or any other) reason and now redundant.  They can be
    omitted because serial_core is responsible to initialize the
    spinlock.

Which is right ? (if both are wrong, could you correct me ?)

I will update and send patch(es) based on your answer.  Thank you.

---
Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [PATCH] serial_txx9: forcibly init the spinlock for PCI UART used as a console, Atsushi Nemoto <=