8、 设备号 kdev_t被废除不可用,新的dev_t拓展到了32位,12位主设备号,20位次设备号。 unsigned int iminor(struct inode *inode); unsigned int imajor(struct inode *inode); 老版本:8位主设备号,8位次设备号 int MAJOR(kdev_t dev); int MINOR(kdev_t dev);
29、 USB驱动 老版本struct usb_driver取消了,新的结构体为 struct usb_class_driver { char *name; struct file_operations *fops; mode_t mode; int minor_base; }; int usb_submit_urb(struct urb *urb, int mem_flags); int (*probe) (struct usb_interface *intf, const struct usb_device_id *id);
30、 block I/O 层 这一部分做的改动最大。不祥叙。
31、 mmap() int remap_page_range(struct vm_area_struct *vma, unsigned long from, unsigned long to, unsigned long size, pgprot_t prot); int io_remap_page_range(struct vm_area_struct *vma, unsigned long from, unsigned long to, unsigned long size, pgprot_t prot); struct page *(*nopage)(struct vm_area_struct *area, unsigned long address, int *type); int (*populate)(struct vm_area_struct *area, unsigned long address, unsigned long len, pgprot_t prot, unsigned long pgoff, int nonblock); int install_page(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, struct page *page, pgprot_t prot); struct page *vmalloc_to_page(void *address);
32、 零拷贝块I/O(Zero-copy block I/O) struct bio *bio_map_user(struct block_device *bdev, unsigned long uaddr, unsigned int len, int write_to_vm); void bio_unmap_user(struct bio *bio, int write_to_vm); int get_user_pages(struct task_struct *task, struct mm_struct *mm, unsigned long start, int len, int write, int force, struct page **pages, struct vm_area_struct **vmas); 33、 高端内存操作kmaps