why not choose another way to define the _IOC_xxxMASK related to the ioctl

2013-03-30 Thread RS
it defines in the kernel: #define _IOC_NRMASK ((1 _IOC_NRBITS)-1) //define ... #define _IOC_NRSHIFT0 ... #define _IOC_DIR(nr) (((nr) _IOC_DIRSHIFT) _IOC_DIRMASK) //when decode why not define it like this: #define _IOC_NRSHIFT 0 ... #define _IOC_NRMASK

Re: relationship between cpu_affinity and Packet RX Processing

2013-03-30 Thread Rami Rosen
Hi, Stay tuned as I intend to put on the web an expanded document, including documentations about kernel internals (besides networking). Regards, Rami Rosen http://ramirose.wix.com/ramirosen On Fri, Mar 29, 2013 at 4:36 PM, Kumar amit mehta gmate.a...@gmail.com wrote: On Tue, Mar 26, 2013 at

Re: why not choose another way to define the _IOC_xxxMASK related to the ioctl

2013-03-30 Thread Tobias Boege
On Sat, 30 Mar 2013, RS wrote: it defines in the kernel: #define _IOC_NRMASK((1 _IOC_NRBITS)-1) //define ... #define _IOC_NRSHIFT0 ... #define _IOC_DIR(nr) (((nr) _IOC_DIRSHIFT) _IOC_DIRMASK) //when decode why not define it like this: #define

Re:Re: why not choose another way to define the _IOC_xxxMASK related to the ioctl

2013-03-30 Thread RS
Think you ! Oh , I was wrong . How careless I was. I have fixed it : #define _IOC_NRMASK (((1 _IOC_NRBITS)-1) _IOC_NRSHIFT) // if the _IOC_NRBITS is 8 ,then the result is 0XFF #define _IOC_DIR(nr)((nr _IOC_DIRMASK) _IOC_DIRSHIFT) // when decode , keep the same. Now I think

Re: [help] kernel oops in function gpio_to_irq

2013-03-30 Thread Matthias Brugger
El 27/03/2013 18:16, Mylene Josserand mylene.josser...@navocap.com va escriure: Hi everyone, I have a problem with gpio functions. My kernel version is 3.8.2 and my SoC is a imX27 on a home-made board. First, when I boot, I had only the Starting kernel... message. So I rebuild my kernel

Re: why not choose another way to define the _IOC_xxxMASK related to the ioctl

2013-03-30 Thread Valdis . Kletnieks
On Sat, 30 Mar 2013 18:01:32 +0800, RS said: Now I think this will spend more time than the kernel code when executed. Have you actually examined the generated code on several popular architectures to see what gcc actually does? (hint - many things can constant-folded at compile time. So if

Re: How is gpio_keys.ko supposed to work?

2013-03-30 Thread Sven Geggus
Jerry Zhang jerry.scofi...@gmail.com wrote: The entry will only be created after the Driver probes the Device successfully. In your case, you need to be sure the corresponding platform_device is claimed in your board setup code. What does claiming the device actually mean? Do I really need to

Re: pci_alloc_consistent doubt

2013-03-30 Thread Dhananjay Maske
Hi Everyone, Can some one please help me with pci_alloc_consistent and how to use the buffer allocated by it ?. Thank you in Advance. Djay On Thu, Mar 28, 2013 at 10:08 AM, Dhananjay Maske dhananjay.mask...@gmail.com wrote: On Thu, Mar 28, 2013 at 1:14 AM, Dhananjay Maske

Re: relationship between cpu_affinity and Packet RX Processing

2013-03-30 Thread Paulo Petruzalek
Thanks a lot for this document Rami! I'm starting to study the kernel and it will greatly help me to figure out how to dig into the source code. Looking forward for the expanded version as well! Best regards, Paulo iPhoneから送信 30/03/2013 05:16、Rami Rosen roszenr...@gmail.com のメッセージ: Hi,

Re: extended asm and register clobbers

2013-03-30 Thread ishare
On Sat, Mar 30, 2013 at 02:04:04PM -0700, dw wrote: I read this line from the docs: If you refer to a particular hardware register from the assembler code, you probably have to list the register after the third colon to tell the compiler the register's value is modified. My own