mdelay

2007-09-10 Thread Daniel Rodrick
Hi, I'm trying to understand an I2C algo driver for a platform that I'm working on. In the source code where the driver is trying to read and write certain data to my device, I frequently see code like this: /*Initiate a transactionon on bus */ spin_lock_irq(&lock); mdelay(1); spin_unlock_irq(&l

Floating point in kernel

2007-04-24 Thread Daniel Rodrick
Hello, I've always read that although it isn't completely forbidden, but kernel code shouldn't use floating point arithmetic. It is not recommended, but surely looks possible. So just for curosity purposes (and without getting into the debate of "You shouldn't be doing this..."), can some one po

Automatically loading kernel modules at bootup

2007-03-29 Thread Daniel Rodrick
Hi, How do I make sure that my kernel module gets loaded automatically on system bootup? Thanks, Dan - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please

Re: mmaping device memory into userspace.

2007-03-28 Thread Daniel Rodrick
On 3/28/07, Erik Mouw <[EMAIL PROTECTED]> wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, Mar 28, 2007 at 09:45:52AM +0530, Daniel Rodrick wrote: > If we map device memory into user space using mmap(), the user will be > able to do read / write into device using n

mmaping device memory into userspace.

2007-03-27 Thread Daniel Rodrick
Hi list, If we map device memory into user space using mmap(), the user will be able to do read / write into device using normal memory handling routines, right? But as mentioned in LDD3, should appropriate readb() / writeb() routines be actually used to read / write into device memory? Thanks,

need for mmap?

2007-03-20 Thread Daniel Rodrick
Hi list, I'm a newbie, and I just read about the mmap system call. I have a very basic confusion regarding why would a driver ever want to implement mmap. 1) The purpose of mmap is to map the device memory to user space programs, right? Isn't that alreay available via /dev/mem? The interested us

Debugging kernel with KGDB

2007-03-06 Thread Daniel Rodrick
Hi list, I am debugging linux kernel (2.6.15) remotely using gdb and want to debug an area that involves synchronization / timing between two kernel threads. I was wondering if it is possible to debug multiple kernel threads at the same time by manually switching between the two? For instance ca

__KERNEL__ and __MODULE__

2007-01-31 Thread Daniel Rodrick
Hi, I find a lot of code buried within #ifdefs for the following variables: MODULE / __MODULE__ KERNEL / __KERNEL__ 1) AFAIK, the MODULE / __MODULE__ is defined when my drievr is selected to be compiled as a module, and the KERNEL / __KERNEL__ is defined when is is selected to be built in the k

Re: Why can't an ISR cause a page fault?

2007-01-23 Thread Daniel Rodrick
> Hi, > > I read that ISRs can never cause a page fault. Why is that? What would > happen if an ISR tries to use a data item that has been swapped out? Just a guess, when page fault occurs, page fault handler is invoked which is another ISR. This page fault handler handler does the required stu

Why can't an ISR cause a page fault?

2007-01-23 Thread Daniel Rodrick
Hi, I read that ISRs can never cause a page fault. Why is that? What would happen if an ISR tries to use a data item that has been swapped out? Thanks, Dan - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [EMAIL PROTECTED] More majordomo info

after effects of a kernel API change

2007-01-17 Thread Daniel Rodrick
Hi list, Whenever there is a change in the kernel API (or a new API is introduced), all of the drivers that use the older API need to be changed (or recommended to be changed). I believe it is the responsibility of the person changing the kernel API, to change all the drivers that have found thei