Re: Regarding GPIO driver module

2013-03-05 Thread Prabhakar Lad
Hi,

On Wed, Mar 6, 2013 at 12:23 PM, Rajesh Bhaskaran
 wrote:
> Hi all ,
>
> I was trying to write a GPIO driver module for Hawkboard , in order to
> toggle the LEDs connected to the GPIOs .
>
> I am using a OMAP L138 processor , and am trying to do a ioremap of the
> physical address space to the Kernel's virtual address space . But I guess I
> am not able to figure out the exact base address of the GPIO bank .
>
> I am basically trying to toggle the GPIO Bank 6 . I went through the OMAP
> L138 reference manual , but am unable to find the base address . Afterwards
> I plan to use the ioctl function to toggle the LEDs .
>
> Attaching herewith the link to the OMAP L138 reference manual . Reference
> manual : www.ti.com/lit/ug/spruh77a/spruh77a.pdf
>
> Could anyone kindly guide me , on the procedure to decipher the Baseaddress
> of the GPIO Bank 6 from the Reference manual ?
>
You need to go through the memory map of the device refer[1] for this.
In [1] refer table 2-4 you will find the entire memory map including GPIO.
For GPIO refer this [2] too.

Regards,
--Prabhakar Lad
http://in.linkedin.com/pub/prabhakar-lad/19/92b/955

[1] http://www.ti.com/lit/ds/sprs586d/sprs586d.pdf
[2] http://www.ti.com/lit/ug/sprufl8b/sprufl8b.pdf
> Thanks in advance !
>
> Cheers ,
> ~RCB~
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Regarding GPIO driver module

2013-03-05 Thread Rajesh Bhaskaran
Hi all ,

I was trying to write a GPIO driver module for Hawkboard , in order to
toggle the LEDs connected to the GPIOs .

I am using a OMAP L138 processor , and am trying to do a ioremap of the
physical address space to the Kernel's virtual address space . But I guess
I am not able to figure out the exact base address of the GPIO bank .

I am basically trying to toggle the GPIO Bank 6 . I went through the OMAP
L138 reference manual , but am unable to find the base address . Afterwards
I plan to use the ioctl function to toggle the LEDs .

Attaching herewith the link to the OMAP L138 reference manual . Reference
manual : www.ti.com/lit/ug/spruh77a/spruh77a.pdf

Could anyone kindly guide me , on the procedure to decipher the Baseaddress
of the GPIO Bank 6 from the Reference manual ?

Thanks in advance !

Cheers ,
~RCB~
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


RE: Major/minor numbers

2013-03-05 Thread Pranay Kumar Srivastava





::DISCLAIMER::
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


RE: Major/minor numbers

2013-03-05 Thread Pranay Kumar Srivastava


> -Original Message-
> From: kernelnewbies-boun...@kernelnewbies.org [mailto:kernelnewbies-
> boun...@kernelnewbies.org] On Behalf Of kernelnewbies-
> requ...@kernelnewbies.org
> Sent: Tuesday, March 05, 2013 5:53 PM
> To: kernelnewbies@kernelnewbies.org
> Subject: Kernelnewbies Digest, Vol 28, Issue 9
> 
> Send Kernelnewbies mailing list submissions to
>   kernelnewbies@kernelnewbies.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>   http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> or, via email, send a message with subject or body 'help' to
>   kernelnewbies-requ...@kernelnewbies.org
> 
> You can reach the person managing the list at
>   kernelnewbies-ow...@kernelnewbies.org
> 
> When replying, please edit your Subject line so it is more specific than "Re:
> Contents of Kernelnewbies digest..."
> 
> 
> Today's Topics:
> 
>1. Module compilation error (Pietro Paolini)
>2. Re: Module compilation error (Mulyadi Santosa)
>3. Re: Module compilation error (valdis.kletni...@vt.edu)
>4. pthread_lock (ishare)
>5. Re: pthread_lock (Mandeep Sandhu)
>6. Re: pthread_lock (valdis.kletni...@vt.edu)
>7. Major/minor numbers (Shraddha Kamat)
>8. Re: pthread_lock (Mandeep Sandhu)
>9. Re: pthread_lock (ishare)
>   10. Re: Major/minor numbers (Anuz Pratap Singh Tomar)
> 
> 
> --
> 
> Message: 1
> Date: Mon, 4 Mar 2013 19:48:33 -0500 (EST)
> From: Pietro Paolini 
> Subject: Module compilation error
> To: kernelnewbies@kernelnewbies.org
> Message-ID: <8CFE7524C1296F0-1764-9EDF@webmail-
> m235.sysops.aol.com>
> Content-Type: text/plain; charset="us-ascii"; format=flowed
> 
> Hi all,
> 
> I tried, as beginner, to compile a simple module downloaded by internet,
> hello_printk, I am using ArchLinux and I followed the simplest way for
> compile a new kernel tree from here :
> 
> https://wiki.archlinux.org/index.php/Kernels/Compilation/Arch_Build_Syste
> m
> 
> But when I try to compile I catch these errors:
> 
> echo >&2 "  ERROR: Kernel configuration is invalid.";   \
> echo >&2 " include/generated/autoconf.h or
> include/config/auto.conf are missing.";\
> echo >&2 " Run 'make oldconfig && make prepare' on kernel src
> to fix it.";  \
> echo >&2 ;  \
> /bin/false)
> 
> Of course I checked the path of the kernel and under the directory wrote on
> the error messages I can find the files autoconf.h and auto.conf that I really
> don't understand what could be wrong, the makefile is really really simple
> then I can post it:
> 
> obj-m := hello_printk.o
> KDIR  ?= mypersonalpath/core/linux/src/linux-3.7
> PWD   := $(shell pwd)
> default:
> $(MAKE) -C $(KDIR) M=$(PWD) modules
> 
> Someone can help me ?
> 
> 
> 
> Pietro Paolini
> pulsarpie...@aol.com
> 
> 
> 
> --
> 
> Message: 2
> Date: Tue, 5 Mar 2013 09:07:51 +0700
> From: Mulyadi Santosa 
> Subject: Re: Module compilation error
> To: Pietro Paolini 
> Cc: kernelnewbies@kernelnewbies.org
> Message-ID:
>gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> On Tue, Mar 5, 2013 at 7:48 AM, Pietro Paolini 
> wrote:
> > Hi all,
> >
> > I tried, as beginner, to compile a simple module downloaded by
> > internet, hello_printk, I am using ArchLinux and I followed the
> > simplest way for compile a new kernel tree from here :
> >
> > https://wiki.archlinux.org/index.php/Kernels/Compilation/Arch_Build_Sy
> > stem
> >
> > But when I try to compile I catch these errors:
> >
> > echo >&2 "  ERROR: Kernel configuration is invalid.";   \
> > echo >&2 " include/generated/autoconf.h or
> > include/config/auto.conf are missing.";\
> > echo >&2 " Run 'make oldconfig && make prepare' on kernel src
> 
> try the suggested above step. IIRC, those commands will do things like
> preparing the neccessary object files, headers and so on, so it is ready for
> you to be used on your kernel programming.
> 
> Apologize since I can't provide deeper details about this.
> 
> 
> 
> --
> regards,
> 
> Mulyadi Santosa
> Freelance Linux trainer and consultant
> 
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
> 
> 
> 
> --
> 
> Message: 3
> Date: Mon, 04 Mar 2013 21:47:46 -0500
> From: valdis.kletni...@vt.edu
> Subject: Re: Module compilation error
> To: Mulyadi Santosa 
> Cc: Pietro Paolini ,
>   kernelnewbies@kernelnewbies.org
> Message-ID: <6607.1362451...@turing-police.cc.vt.edu>
> Content-Type: text/plain; charset="us-ascii"
> 
> On Tue, 05 Mar 2013 09:07:51 +0700, Mulyadi Santosa said:
> > On Tue, Mar 5, 2013 at 7:48 AM, Pietro Paolini 
> wrote:
> 
> > > echo >&2 " Run 'make oldconfig && make prepare' on kernel src
> >
> > try the suggested above step. IIRC, those commands will do things like
> > preparing the neccessary object files, he

Re: Some Links for Easy Understanding of Linux of Kernel Source code

2013-03-05 Thread Anand Arumugam
you dont need to look into kernel code to know how to do ipc stuff... to
learn abt ipc get a copy of richard stevens book and go over it.
if you want to browse thru the kernel code the easiest way is
http://lxr.linux.no/linux



On Tue, Mar 5, 2013 at 10:41 AM, praveen kumar  wrote:

> Hello all
> I am a collage student and i need some link so to under stand kernel
> source code easily
> and also how to do IPC programming
> thank you
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Some Links for Easy Understanding of Linux of Kernel Source code

2013-03-05 Thread praveen kumar
Hello all
I am a collage student and i need some link so to under stand kernel source
code easily
and also how to do IPC programming
thank you
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Major/minor numbers

2013-03-05 Thread Anuz Pratap Singh Tomar
On Tue, Mar 5, 2013 at 6:32 AM, Shraddha Kamat  wrote:

> Does the max number of devices supported by Linux limited by major minor
> number ? Can you please give me some pointers regarding this.
>
http://stackoverflow.com/questions/14833467/maximum-values-of-major-and-minor-numbers-in-linux

> -- Shraddha
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
Thank you
Warm Regards
Anuz
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: pthread_lock

2013-03-05 Thread ishare
On Tue, Mar 05, 2013 at 01:39:54PM +0530, Mandeep Sandhu wrote:
> On Tue, Mar 5, 2013 at 11:32 AM,   wrote:
> > On Tue, 05 Mar 2013 11:02:45 +0530, Mandeep Sandhu said:
> >
> >> next schedule. I think the waiting threads (processes) will moved from
> >> the wait queue to the run queue from where they will be scheduled to
> >> run.
> >
> > For bonus points, read source code and/or comments and figure out what
> > Linux does to prevent the 'thundering herd' problem (consider 100 threads
> > all waiting on the same mutex - if you blindly wake all 100 up, you'll 
> > schedule
> > them all, the first will find the mutex available and then re-take it, and
> > then the next 99 will get run only to find it contended and go back to
> > sleep.  So figure out what Linux does in that case. :)
> 
> Googling around, I found the 'thundering herd' being mentioned in
> relation to threads waiting on sockets using the accept() sys call.
> Are wait's on mutex's also plagued by the same issue? I guess it is,
> though what sys call would be used in this case?
  
 the threads waiting on sockets will be waked up by net event.
 similarly,the waiters  on mutex's can be wake up by signal.I guess it is 
pthread_cont_signal 
  

> 
> Thanks,
> -mandeep

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: pthread_lock

2013-03-05 Thread Mandeep Sandhu
On Tue, Mar 5, 2013 at 11:32 AM,   wrote:
> On Tue, 05 Mar 2013 11:02:45 +0530, Mandeep Sandhu said:
>
>> next schedule. I think the waiting threads (processes) will moved from
>> the wait queue to the run queue from where they will be scheduled to
>> run.
>
> For bonus points, read source code and/or comments and figure out what
> Linux does to prevent the 'thundering herd' problem (consider 100 threads
> all waiting on the same mutex - if you blindly wake all 100 up, you'll 
> schedule
> them all, the first will find the mutex available and then re-take it, and
> then the next 99 will get run only to find it contended and go back to
> sleep.  So figure out what Linux does in that case. :)

Googling around, I found the 'thundering herd' being mentioned in
relation to threads waiting on sockets using the accept() sys call.
Are wait's on mutex's also plagued by the same issue? I guess it is,
though what sys call would be used in this case?

Thanks,
-mandeep

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies