Re: [patch 2.5] VGA IO on systems with multiple PCI IO domains

From: Geert Uytterhoeven (geert@linux-m68k.org)
Date: Tue Jan 28 2003 - 05:27:21 EST


On Tue, 28 Jan 2003, Ivan Kokshaysky wrote:
> On Tue, Jan 28, 2003 at 10:32:53AM +0100, Geert Uytterhoeven wrote:
> > BTW, we still need a separate isa_request_mem_region(), since right now we
> > cannot simply call request_mem_region(0xa0000, 0x10000) to request the VGA
> > memory buffer in ISA memory space. On ia32 the plain request_mem_region() is
> > OK, but on other archs you need to add the ISA memory space base.
>
> I agree. Currently the VGA_MAP_MEM() hack does the trick in the vgacon.c,
> but it would be a lot better to have a generic function.
> However, I don't think that "isa_" prefix is good - as Ben pointed out,
> legacy IO ranges of PCI devices like VGA, IDE, serial etc. can be
> in other IO spaces than the real ISA bus.
>
> What about
> int pci_request_legacy_resource(struct pci_bus *bus, struct resource *res)
> which would check res->flags and make appropriate decision?
>
> The default in <linux/pci.h> for architectures like ia32 will be
> #ifndef __HAVE_ARCH_LEGACY_REMAP
> static inline int
> pci_request_legacy_resource(struct pci_bus *bus, struct resource *res)
> {
> struct resource *root = res->flags & IORESOURCE_IO ?
> &ioport_resource : &iomem_resource;
> return request_resource(root, res);
> }
> #infdef

That's OK for me.

> This can be overridden in <asm/pci.h>.

Although legacy resources exist on non-PCI as well.

Gr{oetje,eeting}s,

                                                Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jan 31 2003 - 22:00:18 EST