Re: Bootmem failed.

2010-03-29 Thread Andrea Gasparini
Greg Freemyer spiffera, alle Monday 29 March 2010 circa: > This seems to have been held in queue fo 10 days? almost, yes. > Can you work with a recent Redhat / CentOS kernel? > It is still on 2.6.18 and there is still an active support group for it. not without some effort. I'm stuck with this k

napi + dma ?

2010-03-08 Thread Andrea Gasparini
Hi, has someone a good example of a network device driver that use both NAPI interface and DMA for handling packets? I'd be interested in looking how it manage more than one dma cycle in the context of the poll function. thanks, bye! -- -gaspa- --- -

Re: interrupt dependencies.

2010-02-08 Thread Andrea Gasparini
In data lunedì 08 febbraio 2010 17:50:29, Mulyadi Santosa ha scritto: > First idea that crosses my mind is: > > create an atomic (maybe 64 bit one?) counter. Increase it every time > funcA() is executed. then, create same type of counter, let;s name it > old_counter... LOL, Exactly what I tried.

interrupt dependencies.

2010-02-08 Thread Andrea Gasparini
Hi, Let's say I have two kind of interrupt: IntA e IntB After the former, I should do something, let's say "funcA()". and after the second I should do (guess what?) funcB(). My constraints are that funcB have to be called after the relative funcA, and *not* viceversa, and funcA have to be called

Re: implementation of 'mmap' on '/dev/zero'

2009-09-28 Thread Andrea Gasparini
MaJia spiffera, alle Monday 28 September 2009 circa: > I want to read kernel's implementation but did not found corresponding > implementation to '/dev/zero'. I guess you'd find it here: /drivers/char/mem.c bye -- -gaspa- --- https://launchpad

Re: implementing mmap

2009-09-23 Thread Andrea Gasparini
vinit dhatrak wrote, Wednesday 23 September 2009: > huh? the code which you gave to us already had mmap with > "PROT_READ|PROT_WRITE" and it even worked with my setup. > But, if I use PROT_NONE then it crashes with segfault, which is > perfectly correct as such pages are not meant to be accessed S

Re: implementing mmap

2009-09-22 Thread Andrea Gasparini
> You may want to take a look at this page, > > http://www.scs.ch/~frey/linux/memorymap.html > > This also contains a sample source code, here, > http://www.scs.ch/~frey/linux/mmap.example.tar > I tried this code on ARM architecture on a swapless board which works > fine. > > If you could share exa

Re: implementing mmap

2009-09-22 Thread Andrea Gasparini
vinit dhatrak wrote, Tuesday 22 September 2009: > You may want to take a look at this page, > http://www.scs.ch/~frey/linux/memorymap.html Already did. In fact my code was pretty similar, I took this example: http://www.captain.at/howto-linux-device-driver-mmap.php that refers to your link. > If

Re: implementing mmap

2009-09-21 Thread Andrea Gasparini
Andrea Gasparini spiffera, alle Monday 21 September 2009 circa: > I'm clearly missing something trivial, and probably need more coffe... > ;) Ideas? I forgot to mention that I'm on ARM architecture on a swapless board, and that my code (unexpectedly) works on i386. thanks,

implementing mmap

2009-09-21 Thread Andrea Gasparini
Hi, I'm just writing some code that wants to implement a stupid mmap on a device. What I did is the following: 1 - allocating a buffer with kmalloc: kmalloc_ptr = kmalloc(LEN + 2 * PAGE_SIZE, GFP_KERNEL); 2 - make sure that it's page aligned: kmalloc_area = (kmalloc_ptr + PAGE_SIZ

Re: network packets and netif_rx()

2008-10-09 Thread Andrea Gasparini
Hi, thanks for your replies. "Lal" wrote: > > for( count = 0 ; count < reads ; count ++ ){ > Shouldn't it be count += 2 ?? Not exactly, 'reads' is a function of rxlen, not reported for clarity. Actually is something like rxlen/2 plus some padding, but I snipped it out cause I'm pretty sure it w

network packets and netif_rx()

2008-10-07 Thread Andrea Gasparini
Hi, I'm having some problems in developing the receiving part of a ethernet driver. That's my first experience on a eth driver, so it could be a really dumb thing. My interrupt handler does exactly as said by 'LinuxNetworkInternals' and is similar to the dm9000 driver. I'm testing all that stu

Re: Linux Install

2008-01-09 Thread Andrea Gasparini
> I need to know whether i can install a minimal linux system without > depending on a Linux distribution. > That means from scrach by downloading source or other utilities. Here you can find what you want: http://www.linuxfromscratch.org/ (and through google too) bye. -- -gaspa- --

Re: Assigning statically bttv irqs

2007-12-19 Thread Andrea Gasparini
Hi jim > IOW, try moving your card to a different slot. No way, because i have only three slots and three pci cards. So, I think it doen's help... :( thanks, bye! -- -gaspa- --- - http://launchpad.net/~gaspa - -- HomePage: iogaspa

Re: Assigning statically bttv irqs

2007-12-19 Thread Andrea Gasparini
Hi Erik > On Wed, Dec 19, 2007 at 06:11:10PM +0100, Andrea Gasparini wrote: > > I want to assign bttv irqs in order to don't share irqs between bttv > > cards. So, can i try to assign "statically", at least for some test, > > irqs in bttv code? > > Could

Assigning statically bttv irqs

2007-12-19 Thread Andrea Gasparini
Hi all, I want to assign bttv irqs in order to don't share irqs between bttv cards. So, can i try to assign "statically", at least for some test, irqs in bttv code? Could I lead to some problem doing that? My idea is to assign statically as best as possibile irq for all bttv chip, inside bttv_p

Re: Slub versus slab

2007-12-07 Thread Andrea Gasparini
Hi Thomas, > As far as I've understood the SLUB development, I'd say the SLUB > intends to be a drop-in replacement for SLAB, usable in all situations, > with performances at least equal to the ones of SLAB, but with a better > scalability. Yes, I intended it in this way, too. But I read some d

Slub versus slab

2007-12-06 Thread Andrea Gasparini
Hi, there's someone with experience on Slub/slab performance? I would understand when to use the first, when the latter... I found that on numa architecture is surely bettere SLUB.[1] But this is a rare case, imho. [or: in my experience] In a "normal" i386 architecture, with some ram intensive a

Re: RTC Driver in Linux

2007-11-14 Thread Andrea Gasparini
Hi, > Currently I am doing I2C rtc driver (DS1388) development for Linux. > So I wanted to about how the file "/dev/rtc" is getting created in > linux, whether is it manually creating or automatically by the driver?. It depends... It can be created manually throug mknod, or automaticall

Re: scull driver from ldd3 book , insmod , error

2007-11-05 Thread Andrea Gasparini
> > [EMAIL PROTECTED] ~/programming/ldd3/examples/scull $ make > > make -C /lib/modules/2.6.22.9/build > > M=/home/iman/programming/ldd3/examples/scull > > LDDINC=/home/iman/programming/ldd3/examples/scull/../include modules > > make[1]: Entering directory `/home/iman/linux- 2.6.22.9' > > CC [M]

Re: scull driver from ldd3 book , insmod , error

2007-11-01 Thread Andrea Gasparini
Iman Darabi spiffera, alle Thursday 01 November 2007 circa: > i got scull driver from http://examples.oreilly.com/linuxdrive3/ > it needs linux-2.6.10 , but i've gentoo with linux-2.6.22.9 ( and gcc > version 4.1.1 ) > > so i used 2.6.10 header files to compile scull like this : No, you must compi

Re: Using functions declared in other driver

2007-09-25 Thread Andrea Gasparini
Hi Konstantin, > I guess my_driver doesn't see the functions by some reason, or these are > not exported to the kernel symbols at all. > Any suggestions? you should be sure that the "another driver" functions are exported, through the EXPORT_SYMBOL macro, if not, you must modify the other modul

Re: Kernel module error

2007-08-30 Thread Andrea Gasparini
Hi, > I've a problem insmoding the hello-? Modules in the "Linux kernel > programming guide" by Peter Jay, > > On CentOS(2.6.9-34), I compiled the code successfully, but I had the > error "No module found in object" > > On Knoppix (Linux Knoppix 2.6.12 #2 SMP Tue Aug 9 23:20:52 CEST 2005 > i686 GN

kmalloc issue

2007-08-10 Thread Andrea Gasparini
Hi, i have a structure that could grow while time goes on. rather that have a biiig static structure, we want to make it possible allocate it in block in order to don't make kmalloc call each single time, but don't make it to big if requests are a few. we have a code like that: too_little_my

Re: pthreads

2007-07-30 Thread Andrea Gasparini
>   i am porting user code as kernel code.in user code pthreads is used i > want respective in kernel.pthread_mutex_t and PTHREAD_MUTEX_INITIALIZER > is used in user code you can try using the Big Kernel Lock. :D Bye! -- -gaspa- --- - Powered

Re: tasklet_action() - Bad Kernel Trap

2007-07-27 Thread Andrea Gasparini
Hi Tony, It's similar to an Oops output, but not equal, probably it's different for different architecture. So, if i'm right, you can find some explaination in the file: Documentation/oops-tracing.txt and in a many other internet page (searching something related to "oops") In short, it tell

Re: System cpu usage.

2007-07-24 Thread Andrea Gasparini
Hi Mulyadi, thanks for the reply, > And, what kind of workload that is handled by this box anyway? Web > serving? compile farm? rendering? Is there something like "auto forking > when needed" daemon i.e dynamically forking new child when a job need to > be handled... i already solved this, sorry

System cpu usage.

2007-07-23 Thread Andrea Gasparini
Hi all, i have a strange behavior on a system, that has a much high system cpu usage, as said by top: Cpu(s): 26.7%us 73.3%sy 0.0%ni 0.0%id 0.0%wa 0.0%hi, 0.0%si, 0.0%st Mem:508220k total, 447044k used,61176k free,19920k buffers Swap: 987988k total,0k used, 987988k free

Re: Mutex and Sleep

2007-07-17 Thread Andrea Gasparini
> Rajendra :- What kind of control mechanism does it provide over the > buggy driver/kernel code ? it says... "BUG: sleeping function called from invalid context at kernel/mutex.c:86" > Wrong context meaning what? that can't sleep. Bye -- -gaspa- --

Re: Mutex and Sleep

2007-07-17 Thread Andrea Gasparini
> Rajendra :- Andrea, yes I got that , but what is the purpose in having > the might_sleep function then? ah, i catch it. ;) that's a control over the buggy driver/kernel code that use mutex or other mechanism in wrong contexts. just this. (and this post is a proof of that... :-P ) bye! -- -g

Re: Mutex and Sleep

2007-07-17 Thread Andrea Gasparini
Hi Rajendra, > Thanks for the clarification , however I have source code of kernel > 2.6.21.5 and if u check that kernel/mutex.c on line no. 86 u will find > that it does have might_sleep function being called. This function is > called in void inline fastcall __sched mutex_lock(struct mutex* )

Re: Mutex and Sleep

2007-07-17 Thread Andrea Gasparini
Rajendra Stalekar spiffera, alle Tuesday 17 July 2007 circa: > which implies that if no lock is acquired it would sleep till it gets > it. I think you're quite confused, and that's a bad thing if you make confused other people. 1) migth_sleep doesn't have anything to do with mutex, if you contro

Re: make file

2007-07-09 Thread Andrea Gasparini
> i dont get error,i will get output > hello1.ko and hello.ko but not combine.ko - don't open other thread with your mail. - see the other replies. - more I see this stuff, more i think that you can't do it this way... for example you _can't_ have more one module_init... What's your wanted beha

Re: problem with make file

2007-07-09 Thread Andrea Gasparini
> obj-m :=combine.o > module-objs :=hello1.o hello2.o > obj-m :=hello1.o hello2.o i think that you should do something like: obj-m :=combine.o combine-objs :=hello1.o hello2.o obj-m +=hello1.o hello2.o But it's not enough, you should al least omit module_exit() and module_init() of one module.

Re: Loading modules

2007-07-06 Thread Andrea Gasparini
Kamal gupta spiffera, alle Friday 06 July 2007 circa: > Am I missing something ? mmm... Have you _recompiled_ with the makefile you did?? from what you wrote, it seems that you made the Makefile, but skipped the compilation phase. Probably i'm wrong: in this case never mind! :D bye! -- -gaspa