Re: [patch] do_no_pfn

From: Carsten Otte
Date: Wed Jun 21 2006 - 03:37:30 EST


Bjorn Helgaas wrote:
> I do have a case where I used pages without struct pages, but
> I don't really like the implementation, and I'd love to have
> someone who knows about VM tell me "no, dummy, you should do it
> this way instead."
>
> Here's the scenario: I'm trying to implement
> /sys/class/pci_bus/DDDD:BB/legacy_mem so we can run X servers
> on multiple VGA cards. The chipset (used in HP parisc and ia64
> boxes) supports multiple PCI root bridges, and it routes the
> VGA legacy MMIO space at 0xA0000-0xBFFFF to one of them.
>
> This region is MMIO, so there are no struct pages for it. I can
> easily mmap the space for the first VGA device. But to support
> a second device, I have to be able to invalidate the mappings
> for the first device, twiddle stuff in the chipset, and make new
> mappings for the second device. And of course I have to do the
> reverse (invalidate mappings of second device, twiddle chipset,
> map first device) when the first X server faults on the frame
> buffer.
>
> Basically, only one of the /sys/class/pci_bus/DDDD:BB/legacy_mem
> files can have an active mmap at a time, and I haven't figured
> out a good way to do the mutual exclusion.
Probably you can just nuke the pte's similar to __xip_unmap() in
mm/filemap_xip.c.

cheers,
Carsten

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