ChinaUnix.net
相关文章推荐:

remap

在驱动程序中我用__get_free_pages申请了1MB的内存,将这1MB内存用remap_page_range映射到用户空间。但应用程序用mmap()的地址读不到数据,但用在驱动中增加一个IOCTL命令用copy_to_user却可以拿到数据。这是为什么?

by zhuoyuesky - 内核/嵌入技术 - 2006-11-06 16:48:16 阅读(473) 回复(1)

相关讨论

驱动里面 mmap函数: volatile void *offset=(volatile void *)kmalloc(100,GFP_ATOMIC); vma->vm_flags |= VM_RESERVED; physical_addr=virt_to_phys(offset); if (remap_page_range(vma->vm_start, physical_addr ,vma->vm_end-vma->vm_start, vma->vm_page_prot)) { printk("remap error\n"); return -EAGAIN; } line_addr=offset; 应用程序...

by dida_327 - 内核/嵌入技术 - 2006-10-26 16:13:57 阅读(798) 回复(0)

man in.tftpd如下 FILENAME remapPING The -m option specifies a file which contains filename remapping rules. Each non-comment line (comments begin with hash marks, #) contains an operation, specified below; a regex, a regular expression in the style of egrep; and optionally a replacement pattern. The operation indicated by operation is performed if the regex matches al...

by zxpxyz - 服务器应用 - 2008-03-17 16:50:20 阅读(2503) 回复(2)

static int remap_mmap(struct file *filp, struct vm_area_struct *vma) { int i = 0; int j = 0x0; if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, vma->vm_end - vma->vm_start, vma->vm_page_prot)) return -EAGAIN; vma->vm_ops = &remap_vm_ops; return 0; } 想用上述程序实现mmap,但是发现在用户态调用mmap大于2...

by topjupiter - 内核/嵌入技术 - 2006-04-14 23:07:27 阅读(979) 回复(0)