Messages in this thread | | | Date | Fri, 25 Jun 1999 00:35:25 +0200 | From | Davide Rossetti <> | Subject | PG_reserved in PCI DMA-able mem |
| |
In porting a mixed user/kernel driver for a PCI BusMastering device, after some struggle and a look to the sound driver, I realized that PG_reserved is necessary in kernel memory which has to be mapped from within user space as in:
kvaddr = kmalloc(size, ...) // where size is n*PAGE_SIZE ... { void* adr= kvaddr; unsigned long page; unsigned int sz = size; while (sz > 0) { mem_map_reserve(MAP_NR(adr)); adr += PAGE_SIZE; sz -= PAGE_SIZE; } }
what is the sense of the comment in include/linux/mm.h ?
/* * Various page->flags bits: * * PG_reserved is set for a page which must never be accessed (which * may not even be present). * ...
"which must never be accessed" refers to the I/O subsystem, doesn't it ? or to generically to code instructions ?
I'm curious, what is that bit for ? I experimented the effect: user space doesn't see any modification made from kernel code or PCI DMA access.
ciao
-- +------------------------------------------------------------------+ |Rossetti Davide INFN - Sezione Roma I - gruppo V, prog. APEmille| | web : http://apemaia.roma1.infn.it/~rossetti | | """"" E-mail : davide.rossetti@roma1.infn.it | | |o o| phone : (+39)-6-49914412 | |--o00O-O00o-- fax : (+39)-6-4957697 | | address: Dipartimento di Fisica (V.E.) | | Universita' di Roma "La Sapienza" | | P.le Aldo Moro,5 I - 00185 Roma - Italy| | pgp pub. key: finger rossetti@apemaia.roma1.infn.it | | | |"Most people think about twice a year. I got famous by thinking | | once a week." - George B. Shaw | +------------------------------------------------------------------+
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |