From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: ralf@linux-mips.org,
Linux Kernel list <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>, Greg KH <greg@kroah.com>
Subject: Re: [RFC] Changing pci_iounmap to take 'bar' argument
Date: Thu, 26 May 2005 14:55:57 +1000 [thread overview]
Message-ID: <1117083357.9076.49.camel@gaston> (raw)
In-Reply-To: <1117081814.9076.38.camel@gaston>
> > Ok, just wanted some feedback from you. Some people prefer that I whack
> > some "token" in the vitual address at map time, or that I compare the
> > vaddr at unmap time with all PCI busses IO ranges or that sort of ugly
> > thing, it sounds to me simpler to just pass along the bar number, but I
> > wanted your and Greg's ack first.
>
> Oh, and MIPS seems to be broken here ... it's like ppc, it's ioremap'ing
> MMIO and just using an existing mapped stuff for IO, but unconditionally
> iounmap's on pci_iounmap()... unless there is some arch black magic in
> there, that seems broken. Ralph, should I fix it while I'm at it ?
Hrm... in fact, It complicates life for drivers. There already a few
using it, and there are cases, like sym53c8xx_2, that do something like
int bar = dodgy_logic_to_find_what_bar_to_use();
foo = pci_iomap(dev, bar, pci_resource_len(dev, bar));
And in a completely different function, a simple
pci_iounmap(dev, foo);
To pass the bar in there requires to either add a field to the driver
"instance" structure or to reproduce the "dodgy logic".
I've fixed them all, but I don't like the patch that much.
It may be simpler indeed for me to actually only complicate the ppc &
ppc64 pci_iounmap() implementation and have it compare the virtual
address against known PCI IO spaces...
Ben.
next prev parent reply other threads:[~2005-05-26 4:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-26 4:07 [RFC] Changing pci_iounmap to take 'bar' argument Benjamin Herrenschmidt
2005-05-26 4:25 ` Linus Torvalds
2005-05-26 4:27 ` Benjamin Herrenschmidt
2005-05-26 4:30 ` Benjamin Herrenschmidt
2005-05-26 4:55 ` Benjamin Herrenschmidt [this message]
2005-05-26 15:21 ` Linus Torvalds
2005-05-28 20:08 ` Russell King
2005-05-26 22:53 ` Greg KH
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=1117083357.9076.49.camel@gaston \
--to=benh@kernel.crashing.org \
--cc=akpm@osdl.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ralf@linux-mips.org \
--cc=torvalds@osdl.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 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.