Re: Macro explanation

2012-03-09 Thread Manohar Vanga
Also, from the archives: http://www.mail-archive.com/kernelnewbies@nl.linux.org/msg12320.html On Fri, Mar 9, 2012 at 7:21 PM, Vijay Chauhan kernel.vi...@gmail.comwrote: Hi, I'm checking the container_of and offsetof macro #define container_of(ptr, type, member) ({ \ const

Re: kernel module parameter

2012-01-18 Thread Manohar Vanga
$ ls /sys/module/MODULE_NAME/parameters/ On Wed, Jan 18, 2012 at 4:20 PM, Simon Leung simonle...@gmx.com wrote: Hi all, Is there a way to find out what parameters were used when loading the kernel module. E.g. After loading the driver with 'insmode foo.ko param1=bla'. How can find out later

Re: knewbies project? - updating LDD3 source

2011-05-24 Thread Manohar Vanga
I would see this identical to kernel/Documentation/* except that the pieces are targetting device driver developers. Take a look at the smallsample at the link below. The examples are well documented and it could be expanded to include more features of the kernel.

Re: How vmlinux is recognized?

2011-05-11 Thread Manohar Vanga
Hi Vikram, How the vmlinux (an ELF executable) is recognized by the processor? ELF is just a file format. That is, the machine instructions and data are stored in a specific format. The _processor_ simply recognizes machine instructions and this needs to be taken from the ELF file and loaded

Re: char driver error

2011-05-09 Thread Manohar Vanga
This line is incorrect. You need to learn how kmalloc (or any *alloc for that matter) works because it seems like you don't realise what is happening with this statement. memory_buffer = kmalloc(1, GFP_KERNEL); On Mon, May 9, 2011 at 1:26 PM, Aravind Vijayan aravind1...@gmail.comwrote: Hi

Re: char driver error

2011-05-09 Thread Manohar Vanga
Google for kmalloc: About 182,000 results (0.11 seconds) http://lwn.net/Kernel/LDD3/ http://tldp.org/LDP/lkmpg/2.6/html/index.html Make an effort. It usually helps :-) On Mon, May 9, 2011 at 1:57 PM, Aravind Vijayan aravind1...@gmail.comwrote: On 5/9/11, Manohar Vanga manohar.va...@gmail.com

Re: anyone using sysfsutils in a practical way?

2011-05-06 Thread Manohar Vanga
Possibly off-topic but Alessandro Rubini has uploaded a set of small sample drivers (among other things) at: http://gnudd.com/workdoc.shtml Maybe there is something of interest in there for your course? Thanks On Fri, May 6, 2011 at 4:25 PM, Robert P. J. Day rpj...@crashcourse.cawrote: as

Faking PCI devices?

2011-05-04 Thread Manohar Vanga
Hi, I have written a simulated driver for a PCI board and am looking for a clean way to use the driver. Currently, I am setting the PCI ids to PCI_ANY_ID and only allowing a single probe call to go through using a global variable (concurrency issues but I don't care for the simulation). static

Re: Regarding PREEMPT_RT option

2011-02-02 Thread Manohar Vanga
Hi Sri, I am trying to find detailed explanation of preemption option in config. For desktop, server, and low-latency desktop. Can anyone explain in what scenarios these are useful. Free Electrons has a great presentation about real-time Linux [1]. They go into some detail on the

Re: ARM Cross Compilation Toolchain on x86 machine

2011-01-06 Thread Manohar Vanga
Hi, I would suggest using ELDK. I have had an easy time setting it up in the past. $ wget ftp://ftp.denx.de/pub/eldk/4.2/arm-linux-x86/iso/arm-2008-11-24.iso $ mount -o loop arm-2008-11-24.iso /mnt $ cd /mnt $ sudo ./install -d /opt/eldk-4.2 Now add /opt/eldk-4.2/usr/bin/ to your PATH. My