public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] Changing pci_iounmap to take 'bar' argument
@ 2005-05-26  4:07 Benjamin Herrenschmidt
  2005-05-26  4:25 ` Linus Torvalds
  2005-05-26 22:53 ` Greg KH
  0 siblings, 2 replies; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2005-05-26  4:07 UTC (permalink / raw)
  To: Linux Kernel list; +Cc: Andrew Morton, Greg KH, Linus Torvalds

Hi !

On ppc and ppc64 platforms, pci_iounmap() currently does nothing, which
is bogus (leak of ioremap space for mmio). It needs to iounmap for MMIOs
and do nothign for IO space.

The problem is that wether it's IO or MMIO cannot be easily deduced from
the virtual address. We _could_ change the whole thing on ppc32 to play
tricks with the top address bits, and we could compare the virtual
address with the known regions containing PHBs IO space, but that sounds
to me like working around a bad API in the first place.

What about, instead, just adding the "int bar" argument to pci_iounmap()
like we pass to pci_iomap() so it can access the resource flags ?

If it's ok with you, I'll send a patch doing it later today.

Ben.



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-05-28 20:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2005-05-26 15:21         ` Linus Torvalds
2005-05-28 20:08           ` Russell King
2005-05-26 22:53 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox