linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Chaithrika U S" <chaithrika@ti.com>
To: 'Alan Cox' <alan@lxorguk.ukuu.org.uk>
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	davinci-linux-open-source@linux.davincidsp.com,
	khilman@deeprootsystems.com, akpm@linux-foundation.org
Subject: RE: [PATCH] serial: 8250: Add cpufreq support
Date: Mon, 18 Jan 2010 18:47:49 +0530	[thread overview]
Message-ID: <000c01ca9840$a1fb99b0$e5f2cd10$@com> (raw)
In-Reply-To: <20100113134445.010d4f1c@lxorguk.ukuu.org.uk>

On Wed, Jan 13, 2010 at 19:14:45, Alan Cox wrote:
> > +static int serial8250_cpufreq_transition(struct notifier_block *nb,
> > +					     unsigned long val, void *data)
> > +{
> > +	struct uart_8250_port *p;
> > +	struct uart_port *uport;
> > +
> > +	p = container_of(nb, struct uart_8250_port, freq_transition);
> > +	uport = &p->port;
> > +
> > +	if (IS_ERR(p->clk))
> > +		goto cpu_freq_exit;
> > +
> > +	if (p->port.uartclk == clk_get_rate(p->clk))
> > +		goto cpu_freq_exit;
> > +
> > +	p->port.uartclk = clk_get_rate(p->clk);
> > +	if (val == CPUFREQ_POSTCHANGE) {
> > +		struct ktermios *termios;
> > +		struct tty_struct *tty;
> > +		if (uport->state == NULL)
> > +			goto cpu_freq_exit;
> > +
> > +		tty = uport->state->port.tty;
> 
> Need locking on port->tty.
> 
> > +		if (tty == NULL)
> > +			goto cpu_freq_exit;
> > +
> 
> Need locking on tty->termios
> 
> I'd say this is also probably at the wrong level - why not do it at the
> uart_port level instead (ie move the code you have into serial_core using
> uart_port) - you've made it all nicely generic already.
> 
> Alan
> 	
	
Thank you for the review comments.
I will submit an updated version of patch soon.

Regards, 
Chaithrika



  reply	other threads:[~2010-01-18 13:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-13 12:35 [PATCH] serial: 8250: Add cpufreq support Chaithrika U S
2010-01-13 13:44 ` Alan Cox
2010-01-18 13:17   ` Chaithrika U S [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-04-03  6:03 Shankarmurthy, Akshay
2012-04-03  9:55 ` Alan Cox
     [not found]   ` <20120403105530.7fa3bce7-38n7/U1jhRXW96NNrWNlrekiAK3p4hvP@public.gmane.org>
2012-04-05 10:40     ` Shankarmurthy, Akshay
2012-04-05 10:53       ` Alan Cox
2012-04-12  5:21         ` Shankarmurthy, Akshay
2012-04-12  9:47           ` Alan Cox
2012-04-17  9:43             ` Shankarmurthy, Akshay
2012-04-18 19:47               ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000c01ca9840$a1fb99b0$e5f2cd10$@com' \
    --to=chaithrika@ti.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).