All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: uart_match_port() question
Date: Mon, 28 Nov 2005 22:36:14 +1100	[thread overview]
Message-ID: <1133177775.7768.187.camel@gaston> (raw)
In-Reply-To: <20051128113020.GA30298@flint.arm.linux.org.uk>

On Mon, 2005-11-28 at 11:30 +0000, Russell King wrote:
> On Sun, Nov 27, 2005 at 11:21:46AM +1100, Benjamin Herrenschmidt wrote:
> > Hi Russel, would you accept a patch like that:

My deepest appologies ! :)

> s/l,/l&/
> 
> > Index: linux-work/drivers/serial/serial_core.c
> > ===================================================================
> > --- linux-work.orig/drivers/serial/serial_core.c	2005-11-14 20:32:16.000000000 +1100
> > +++ linux-work/drivers/serial/serial_core.c	2005-11-27 11:13:54.000000000 +1100
> > @@ -2307,7 +2307,8 @@
> >  		return (port1->iobase == port2->iobase) &&
> >  		       (port1->hub6   == port2->hub6);
> >  	case UPIO_MEM:
> > -		return (port1->membase == port2->membase);
> > +		return (port1->membase == port2->membase) ||
> > +			(port1->mapbase && port1->mapbase == port2->mapbase);
> >  	}
> >  	return 0;
> >  }
> 
> I don't think so.  (see below)

Heh, Ok.

> Looking at this deeper, I think we should _only_ use mapbase in this
> case

Totally agreed.

> .  membase is really a indeterminant cookie which bears no real
> relationship to whether two ports are identical - in fact, if we are
> going to compare two of these cookies, I think arch code should be
> involved.
> 
> So how about:
> 
> -             return (port1->membase == port2->membase);
> +             return (port1->mapbase == port2->mapbase);

Yup, indeed. I did it the above way in case you had good reasons of
comparing membase too, but indeed, comparing mapbase only makes the most
sense.

I'll send a proper patch tomorrow.

Ben.


  reply	other threads:[~2005-11-28 11:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-27  0:21 uart_match_port() question Benjamin Herrenschmidt
2005-11-28 11:30 ` Russell King
2005-11-28 11:36   ` Benjamin Herrenschmidt [this message]
2005-12-07 22:15 ` Bjorn Helgaas
2005-12-07 23:13   ` Benjamin Herrenschmidt
2005-12-07 23:36     ` Bjorn Helgaas
2005-12-08  0:17       ` Benjamin Herrenschmidt
2005-12-08 16:26         ` Bjorn Helgaas

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=1133177775.7768.187.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.