"GFP_ATOMIC Used to allocate memory from interrupt handlers and other code outside of a process context. Never sleeps. GFP_KERNEL Normal allocation of kernel memory. May sleep."
"struct gendisk is a dynamically allocated structure that requires special kernel manipulation to be initialized; drivers cannot allocate the structure on their own. Instead, you must call:"
"The minors argument should be the number of minor numbers this disk uses; note that you cannot change the minors field later and expect things to work properly. When a disk is no longer needed, it should be freed with:"
"A gendisk is a reference-counted structure (it contains a kobject). There are get_disk and put_disk functions available to manipulate the reference count, but drivers should never need to do that. Normally, the call to del_gendisk removes the final reference to a gendisk, but there are no guarantees"
"But this book is also about how the Linux kernel works and how to adapt its workings to your needs or interests."
"My hope is that this edition helps to bring that fun and opportunity to a new set of Linux developers. Whether your interests are in the kernel or in user space, I hope you find this book to be a useful and interesting guide to just how the kernel works with the hardware."
"I am honored that I’ve had the ability to contribute to this book. I hope that it enables others to learn the details about the kernel, discover that driver development is not a scary or forbidding place, and possibly encourage others to join in and help in the collective effort of making this opera"
"We hope this book is useful as a starting point for people who want to become kernel hackers but don’t know where to start."
用户评论
传说内核87.15%都是driver
linux驱动入门书
描述了介于硬件和传统意义上Linux系统之间的硬件抽象层,比较散乱,没有实际经验的人去读绝对make no sense,但对于有经验的人来说,又觉得有点停留在表面。当然,没有任何可能在这么小的篇幅里讲清楚这个事情。