Re: Problems in 2.4 kernel

2001-01-17 Thread aprasad
Sanjeev Wrote: I am not able to mount my floppy drive. When I try to mount it gives me the following error 'mount: /dev/fd0 has wrong major or minor number' _ i think kernel is unable to find the driver for the filesystem type you are

can kernel memory allocated by kmalloc be swapped out??

2000-09-17 Thread aprasad
hi everyone, suppose i allocate some kernel memory in a module by calling kmalloc, can that memory be swapped out, for example in AIX even the kernel memory which is allocated by rmalloc is swappable!! Note: please cc the answer as i am not registered to kernel mailing list - To unsubscribe

PCI-DMA

2000-09-18 Thread aprasad
hi, can anybody tell, where to find information about dma usage by pci -devices in linux note:please cc the answer - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/

kmalloc and get_free_pages failure

2000-09-23 Thread aprasad
i tried to allocate physical memory of 128k by calling kmalloc function, passing parameter of (128k-1)bytes, but the computer hanged. when i made it to 32k , the computer rebooted, i am using 2.2.14-5.0 kernel. same was the case with get_free_pages() service.. note:please cc the answer - To

problem with kmalloc

2000-09-23 Thread aprasad
hi! this is related to previous problem, when i tried to allocate 64k of physical memory by calling kmalloc(64*1024-1, GFP_KERNEL), it allocated the memory, also wrote the memory, but when i read it, it gave Ayeei message, saying interrupt handlers has been killed..and computer hanged, its

Problem with console level while switching from kernel mode to user mode

2000-10-04 Thread aprasad
hi everybody, i am writting a character device driver. i am pritting some debugging messages using printk in kernel. now the problem is after switching from kernel space to user space when any system call (read/write ) is done, i am unable to print any messages using printf calls. but if write

atoi() in kernel

2000-10-08 Thread aprasad
hi! is there anything exported for kernel for use with modules that does coversion from alphnumeric to interger or anything like sscanf() - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at

getting struct pci_dev from struct netdevice

2000-10-10 Thread aprasad
hi all, given struct netdevice for any pci network device, is there any way to get corresponding "struct pci_dev". - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/

Re: getting struct pci_dev from struct netdevice

2000-10-10 Thread aprasad
Since struct pci_dev is probably going to morph into a more generic struct hw_dev, maybe struct netdevice needs a pci_dev member... alan cox wrote: There is no guarantee there would be a meaningful pci_dev. In addition in a hot pluggable box the pointer is useless since it will change

executing function in kernel whose name is known

2000-10-11 Thread aprasad
hi, i know the name of a function which is stored in some string in a kernel module, is there any way to execute that function. That function is implemented in a module and has been exported. thanks, anil - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

Re: executing function in kernel whose name is known

2000-10-11 Thread aprasad
i know the name of a function which is stored in some string in a kernel module, is there any way to execute that function. That function is implemented in a module and has been exported. thanks, anil you mean execute from userspace? No. You mean execute from kernel space? Yes, but

ioremap of pci base addresses

2000-10-11 Thread aprasad
hi, once i have got the pci_dev structure( by calling pci_find*), do i explicitly need to call ioremap for remapping mmio. i think pci_enable_device does this. correct me if i am wrong.. thanks, anil - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

calling system call from kernel module

2000-10-12 Thread aprasad
hi, Is there any way to call system call from a kernel module??? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/

kmap for dma buffer

2000-10-12 Thread aprasad
hi all, For dma transfers to/from user space buffer, one need to lock that user space buffer so that it won't be swaped out. and also its bus address is obtained by call virt_to_bus and then this bus address is written to dma controller. but do we explicitly need to map that user buffer into

Re: calling system call from kernel module

2000-10-12 Thread aprasad
Is there any way to call system call from a kernel module??? yes, just call it. system calls are just functions (mostly exported and when otherwise, use sys_call_table[] which is exported, but it won't work on __mips__) so you can just call them. thanks tigran, but i am new to kernel

getting physical memory of buffer mapped bu kiobuf

2000-10-13 Thread aprasad
hi, I am mapping user space buffer to kernel space by using kiobufs. as .. .. struct kiobuf *iobuf, alloc_kiovec(1, *iobuf); map_user_kiobuf() /*for user buffer*/ lock_kiovec(); but to start dma transfers, i must know physical address of mapped pages.. is there any way out??? Anil Kumar

Re: mapping user space buffer to kernel address space

2000-10-15 Thread aprasad
Linus Torvalds wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: I have a user buffer and i want to map it to kernel address space can anyone tell how to do this like in AIX we have xmattach Note that it is usually MUCH better to do this the other way around: having a

RE: MAP_NR for 2.4

2000-10-20 Thread aprasad
for using MAP_NR with 2.4, i think you can use macro like #define MAP_NR(addr) (((unsigned long)(addr)-PAGE_OFFSET) PAGE_SHIFT) regards anil - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at

Assembler Error:Unsupported Relocation type while compile my code with kernel

2001-03-01 Thread aprasad
Hi, sorry for this post, but this message i got when tried to compile my code in the kernel.. I am unable to figure out the problem. I have put the my code in drivers/misc directory and made the appropriate entry in Makefile. Thanks, Anil. - To unsubscribe from this list: send the line

Re: max memory limits ???

2000-11-25 Thread aprasad
Matti Aarnio [EMAIL PROTECTED] wrote: On Wed, Nov 22, 2000 at 03:37:09PM +0200, BenHanokh Gabriel wrote: can some1 explain the memory limits on the 2.4 kernel - what is the limit for user-space apps ? At 32 bit systems: 3.5 GB with extreme tricks, 3 GB for more usual. user space

Normal Response Mode of HDLC for linux

2001-01-07 Thread aprasad
Hi all, Has anybody written any support for HDLC normal response mode. I could only find the support of HDLC asynchronous balanced mode (LAPB). Any pointers will highly be appreciated. Thanks, Anil - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

processes 2^15

2000-11-04 Thread aprasad
Hi all, after reaching process count something around 30568, processes start getting pid from start, which ever is the first free entry slot in process table. that means we can't have simultaneously more than roughly 2^15 processes? am i correct? regards, Anil - To unsubscribe from this list:

to resize shared memory segment by using shmctl

2000-11-06 Thread aprasad
Hi, is it possible to change the size of a preexisting shared memory segment by using shmctl? AIX has comand SHM_SIZE to shmctl to resize any existing shared memory segment. can it be done without recreating the whole thing in linux? thanks Anil - To unsubscribe from this list: send the line

Re: Userland - Kernel communication

2000-11-08 Thread aprasad
I wish to give me some pointers to how to communicate with a kernel module from userland. May I use sockets? You can use copy_to/from_user functions present in kernel space, provided you have valid userland pointers also put_user/get_user for single datum transfer. regards Anil - To

Re: Oddness in i_shared_lock and page_table_lock nesting hierarchies ?

2000-11-09 Thread aprasad
I was looking into the vmm code and trying to work out exactly how to fix this, and there are some questions in my mind - mainly a few cases (involving multiple vma updates) which I'm not sure about the cleanest way to tackle. But before I bother anyone with those, I thought I ought to go

reliability of linux-vm subsystem

2000-11-13 Thread aprasad
Hi, When i run following code many times. System becomes useless till all of the instance of this programming are killed by vmm. Till that time linux doesn't accept any command though it switches from one VT to another but its useless. The above programme is run as normal user previleges.

Oops when using MAP_SHARED with do_mmap

2000-11-14 Thread aprasad
Hi, I have written a simple char device which allocate a page size buffer and maps this to user-land via mmap-ing. it works if i specify MAP_PRIVATE as flag in do_mmap but i am getting oops with MAP_SHARED flag. i am using 2.4-test10 kernel. attached are files. (See attached file: char.c)code

keyboard lockup after kdb session

2000-11-15 Thread aprasad
Hi, I am new to kdb. my keyboard is locked after kdb-session (either by generating oops or manual). is there any way to restore it without rebooting... thanks anil - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read

Re: Bug in 2.4.0-test9 and test10 with sys_shmat()

2000-11-17 Thread aprasad
Sending -1 as the shmid to shmat will cause an oops. 2.2.16 caught this with simple boundry checking, so replace the lines if (!shm_sb || (shmid % SEQ_MULTIPLIER) == zero_id) return -EINVAL; with if (!shm_sb || shmid 0 || (shmid % SEQ_MULTIPLIER) == zero_id)

Re: unable to handle paging request...

2000-11-17 Thread aprasad
but EVERY TIME shut my machine down, I always get the following message, just after the line "stopping all md devices": I also used to get the same messages on my celeron machine, but after i disabled the support of RAID in kernel, it started working nicely. I don't know the reason. regards,

query about sending udp packets in kernel mode

2001-02-16 Thread aprasad
Hi All, I need to send udp packets in a kernel module. but i am unable to figure out how to specify fill the struct msghdr to be used by the sendmsg handler of the socket. my skeleton is something like (by going through the kernel code:) struct socket *sock; struct sockaddr_in sin; struct

Re: Problems in 2.4 kernel

2001-01-17 Thread aprasad
Sanjeev Wrote: I am not able to mount my floppy drive. When I try to mount it gives me the following error 'mount: /dev/fd0 has wrong major or minor number' _ i think kernel is unable to find the driver for the filesystem type you are

Assembler Error:"Unsupported Relocation type "while compile my code with kernel

2001-03-01 Thread aprasad
Hi, sorry for this post, but this message i got when tried to compile my code in the kernel.. I am unable to figure out the problem. I have put the my code in drivers/misc directory and made the appropriate entry in Makefile. Thanks, Anil. - To unsubscribe from this list: send the line

insmod failure in kernel-2.2.14

2000-09-16 Thread aprasad
i am using kernel-2.2.14-5.0, i wrote a simple module to just printk a a message and tried to insmod it, but it gave error message: resource/device busy (EBUSY) but the message gets printed in /var/log/messages the code is: -- #define MODULE

can kernel memory allocated by kmalloc be swapped out??

2000-09-17 Thread aprasad
hi everyone, suppose i allocate some kernel memory in a module by calling kmalloc, can that memory be swapped out, for example in AIX even the kernel memory which is allocated by rmalloc is swappable!! Note: please cc the answer as i am not registered to kernel mailing list - To unsubscribe

PCI-DMA

2000-09-18 Thread aprasad
hi, can anybody tell, where to find information about dma usage by pci -devices in linux note:please cc the answer - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/

kmalloc and get_free_pages failure

2000-09-23 Thread aprasad
i tried to allocate physical memory of 128k by calling kmalloc function, passing parameter of (128k-1)bytes, but the computer hanged. when i made it to 32k , the computer rebooted, i am using 2.2.14-5.0 kernel. same was the case with get_free_pages() service.. note:please cc the answer - To

problem with kmalloc

2000-09-23 Thread aprasad
hi! this is related to previous problem, when i tried to allocate 64k of physical memory by calling kmalloc(64*1024-1, GFP_KERNEL), it allocated the memory, also wrote the memory, but when i read it, it gave Ayeei message, saying interrupt handlers has been killed..and computer hanged, its

Re: max memory limits ???

2000-11-25 Thread aprasad
>Matti Aarnio <[EMAIL PROTECTED]> wrote: >On Wed, Nov 22, 2000 at 03:37:09PM +0200, BenHanokh Gabriel wrote: >> can some1 explain the memory limits on the 2.4 kernel >> - what is the limit for user-space apps ? >At 32 bit systems: 3.5 GB with extreme tricks, 3 GB for more usual. user

Re: How to transfer memory from PCI memory directly to user space safely and portable?

2000-11-26 Thread aprasad
>I'm writing a sound card driver where I need to transfer memory from the card >to user space using the CPU. Ideally I'd like to do that without needing to >have an intermediate buffer in kernel memory. I have implemented the copy >functions like this: >From user space to the sound card: > >

Problem with console level while switching from kernel mode to user mode

2000-10-04 Thread aprasad
hi everybody, i am writting a character device driver. i am pritting some debugging messages using printk in kernel. now the problem is after switching from kernel space to user space when any system call (read/write ) is done, i am unable to print any messages using printf calls. but if write

atoi() in kernel

2000-10-08 Thread aprasad
hi! is there anything exported for kernel for use with modules that does coversion from alphnumeric to interger or anything like sscanf() - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at

getting "struct pci_dev" from "struct netdevice"

2000-10-10 Thread aprasad
hi all, given struct netdevice for any pci network device, is there any way to get corresponding "struct pci_dev". - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/

Re: getting "struct pci_dev" from "struct netdevice"

2000-10-10 Thread aprasad
>> >> Since struct pci_dev is probably going to morph into a more generic >> struct hw_dev, maybe struct netdevice needs a pci_dev member... > alan cox wrote: >There is no guarantee there would be a meaningful pci_dev. In addition in >a hot pluggable box the pointer is useless since it will

executing function in kernel whose name is known

2000-10-11 Thread aprasad
hi, i know the name of a function which is stored in some string in a kernel module, is there any way to execute that function. That function is implemented in a module and has been exported. thanks, anil - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

Re: executing function in kernel whose name is known

2000-10-11 Thread aprasad
>> i know the name of a function which is stored in some string in a kernel >> module, is there any way to execute that function. >> That function is implemented in a module and has been exported. >> thanks, >> anil >you mean execute from userspace? No. >You mean execute from kernel space?

Re: executing function in kernel whose name is known

2000-10-11 Thread aprasad
> >> >> >> i know the name of a function which is stored in some string in a kernel >> >> module, is there any way to execute that function. >> >> That function is implemented in a module and has been exported. >> >> thanks, >> >> anil > >> >you mean execute from userspace? No. >> >You mean

ioremap of pci base addresses

2000-10-11 Thread aprasad
hi, once i have got the pci_dev structure( by calling pci_find*), do i explicitly need to call ioremap for remapping mmio. i think pci_enable_device does this. correct me if i am wrong.. thanks, anil - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

calling system call from kernel module

2000-10-12 Thread aprasad
hi, Is there any way to call system call from a kernel module??? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/

kmap for dma buffer

2000-10-12 Thread aprasad
hi all, For dma transfers to/from user space buffer, one need to lock that user space buffer so that it won't be swaped out. and also its bus address is obtained by call virt_to_bus and then this bus address is written to dma controller. but do we explicitly need to map that user buffer into

Re: calling system call from kernel module

2000-10-12 Thread aprasad
>> Is there any way to call system call from a kernel module??? >yes, just call it. system calls are just functions (mostly exported and >when otherwise, use sys_call_table[] which is exported, but it won't work >on __mips__) so you can just call them. thanks tigran, but i am new to kernel

getting physical memory of buffer mapped bu kiobuf

2000-10-13 Thread aprasad
hi, I am mapping user space buffer to kernel space by using kiobufs. as .. .. struct kiobuf *iobuf, alloc_kiovec(1, *iobuf); map_user_kiobuf() /*for user buffer*/ lock_kiovec(); but to start dma transfers, i must know physical address of mapped pages.. is there any way out??? Anil Kumar

Re: mapping user space buffer to kernel address space

2000-10-15 Thread aprasad
Linus Torvalds wrote: >> In article <[EMAIL PROTECTED]>, >> <[EMAIL PROTECTED]> wrote: >> > >> >I have a user buffer and i want to map it to kernel address space >> >can anyone tell how to do this like in AIX we have xmattach > >> Note that it is usually MUCH better to do this the other way

Re: remap_page_range

2000-10-16 Thread aprasad
>suppose i allocate an buffer by calling kmalloc. >i want to map this buffer to user address space. >will remap_page_range will automatically map this >buffer to calling process's address space. it should do if have the struct vm_area_struct of the calling process. as far as i know if you

RE: MAP_NR for 2.4

2000-10-20 Thread aprasad
for using MAP_NR with 2.4, i think you can use macro like #define MAP_NR(addr) (((unsigned long)(addr)-PAGE_OFFSET) >>PAGE_SHIFT) regards anil - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at

Normal Response Mode of HDLC for linux

2001-01-07 Thread aprasad
Hi all, Has anybody written any support for HDLC normal response mode. I could only find the support of HDLC asynchronous balanced mode (LAPB). Any pointers will highly be appreciated. Thanks, Anil - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

processes> 2^15

2000-11-04 Thread aprasad
Hi all, after reaching process count something around 30568, processes start getting pid from start, which ever is the first free entry slot in process table. that means we can't have simultaneously more than roughly 2^15 processes? am i correct? regards, Anil - To unsubscribe from this list:

to resize shared memory segment by using shmctl

2000-11-06 Thread aprasad
Hi, is it possible to change the size of a preexisting shared memory segment by using shmctl? AIX has comand SHM_SIZE to shmctl to resize any existing shared memory segment. can it be done without recreating the whole thing in linux? thanks Anil - To unsubscribe from this list: send the line

Re: Userland -> Kernel communication

2000-11-08 Thread aprasad
>I wish to give me some pointers to how to communicate with a kernel module >from userland. >May I use sockets? You can use copy_to/from_user functions present in kernel space, provided you have valid userland pointers also put_user/get_user for single datum transfer. regards Anil - To

Re: Oddness in i_shared_lock and page_table_lock nesting hierarchies ?

2000-11-09 Thread aprasad
>I was looking into the vmm code and trying to work out exactly how to fix >this, and there are > some questions in my mind - mainly a few cases (involving multiple vma >updates) which > I'm not sure about the cleanest way to tackle. > But before I bother anyone with those, I thought I ought

reliability of linux-vm subsystem

2000-11-13 Thread aprasad
Hi, When i run following code many times. System becomes useless till all of the instance of this programming are killed by vmm. Till that time linux doesn't accept any command though it switches from one VT to another but its useless. The above programme is run as normal user previleges.

Oops when using MAP_SHARED with do_mmap

2000-11-14 Thread aprasad
Hi, I have written a simple char device which allocate a page size buffer and maps this to user-land via mmap-ing. it works if i specify MAP_PRIVATE as flag in do_mmap but i am getting oops with MAP_SHARED flag. i am using 2.4-test10 kernel. attached are files. (See attached file: char.c)code

keyboard lockup after kdb session

2000-11-15 Thread aprasad
Hi, I am new to kdb. my keyboard is locked after kdb-session (either by generating oops or manual). is there any way to restore it without rebooting... thanks anil - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read

Re: Bug in 2.4.0-test9 and test10 with sys_shmat()

2000-11-17 Thread aprasad
>Sending -1 as the shmid to shmat will cause an oops. 2.2.16 caught this >with simple boundry checking, so replace the lines >if (!shm_sb || (shmid % SEQ_MULTIPLIER) == zero_id) return -EINVAL; >with >if (!shm_sb || shmid < 0 || (shmid % SEQ_MULTIPLIER) == zero_id)

Re: "unable to handle paging request..."

2000-11-17 Thread aprasad
but EVERY TIME shut my machine down, I always get the following message, just after >the line "stopping all md devices": I also used to get the same messages on my celeron machine, but after i disabled the support of RAID in kernel, it started working nicely. I don't know the reason. regards,

query about sending udp packets in kernel mode

2001-02-16 Thread aprasad
Hi All, I need to send udp packets in a kernel module. but i am unable to figure out how to specify fill the struct msghdr to be used by the sendmsg handler of the socket. my skeleton is something like (by going through the kernel code:>) struct socket *sock; struct sockaddr_in sin; struct