Hi all, I am allocating a buffer with __get_free_pages, then trying to map it. As remap_pfn/page_range() cannot be used, I tried nopage() implementation (check nopage_module.c). But while looking through some drivers (oss), i found that remap_pfn/page_range() can be used for such physical memory after setting PG_reserved bit of all pages of the buffer. So i tried setting PG_reserved bit & then using remap_page_range() (check remap_module.c). its also working fine. 1) Now what will be the correct way to do such type of mapping? then i wrote the above things for memory obtained by pci_alloc_consistent(). pci_remap_module.c contains implementation using remap_page_range(). pci_nopage_module.c contains implementation using nopage(). but while running nopage implementation, i am getting some kernel messeges like: <0>Bad page state at __free_pages_ok (in process 'a.out', page c1632720) flags:0x20001070 mapping:c19e23a4 mapcount:0 count:2 Backtrace: [] bad_page+0x58/0x89 [] __free_pages_ok+0x77/0xcc [] my_close+0x6d/0x74 [pci_nopage_module] [] __fput+0x55/0x100 [] remove_vm_struct+0x62/0x79 [] exit_mmap+0x13e/0x148 [] mmput+0x4e/0x72 [] do_exit+0x1f1/0x3de [] sys_exit_group+0x0/0xd [] syscall_call+0x7/0xb Trying to fix it up, but a reboot is needed Can somebody help me regarding this? If i am missing something, let me know. i have tried this on Fedora core 3 as well as RHEL4-U2 & getting messeges on both. thanks in advance. Yogeshwar