linux-kernel-newbies mailing list

FromSubjectsort iconDate
Neal Becker
register 2 char devices in 1 c file?
I need 2 different major # for 1 pci device. Are there any examples of how to do this? I'm wondering about whether this would be a problem with pci_register_driver. -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ
Aug 13, 8:05 am 2008
Greg KH
Re: register 2 char devices in 1 c file?
pci_register_driver has _NOTHING_ to do with major/minor numbers at all. So you should be just fine :) What type of PCI device is this? good luck, greg k-h -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ
Aug 13, 2:26 pm 2008
Rene Herman
Re: register 2 char devices in 1 c file?
Not any problem. Just register two character devices. Rene. -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ
Aug 13, 8:51 am 2008
Peerless Deepak
Pci scan
Hi, I am trying to find understand how the pci devices are enumerated on kernel startup. I am concentrating on powerpc arch. I could see function called pcibios_init . Is it the starting point for doing all device scan or whether the device tree is already formed before this function. Thanks for your time. Regards Deepak.P -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ
Aug 12, 10:54 pm 2008
Peter Teoh
ACM: Research and developments in the Linux kernel
FREE for download (YES, FREE): http://portal.acm.org/toc.cfm?id=1400097 Minding the gap: R&D in the Linux kernel Muli Ben-Yehuda, Eric Van Hensbergen, Marc Fiuczynski Introducing technology into the Linux kernel: a case study Paul E. McKenney, Jonathan Walpole Extending futex for kernel to user notification Helge Bahmann, Konrad Froitzheim Plan 9 authentication in Linux Ashwin Ganti Towards achieving fairness in the Linux scheduler Chee Siang Wong, Ian Tan, Rosalind Dee...
Aug 12, 9:05 pm 2008
Anupam Kapoor
Re: ACM: Research and developments in the Linux kernel
Peter Teoh <htmldeveloper@gmail> wrote: ,---- | > virtio: towards a de-facto standard for virtual I/O devices | > Rusty Russell | > | > Virtual servers and checkpoint/restart in mainstream Linux | > Sukadev Bhattiprolu, Eric W. Biederman, Serge Hallyn, Daniel Lezcano `---- thank you ! very nice... kind regards anupam -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@nl.linux.org Please read the FAQ at [ message continues ]
" title="http://kernelnewbies.o...">http://kernelnewbies.o...
Aug 13, 6:33 am 2008
Peter Teoh
Re: A simple query about memory mgmt
On Wed, Aug 13, 2008 at 1:28 AM, Santosh Pradhan p_name and q_name are variable allocated from the stack, and it will always be different address from the stack. Yes, the optimizer can shrink them to the same address, but whether the optimizer does it or it does not matter. Because u are not comparing the address - which is &p_name == &q_name, but u are comparing the value inside the addresses. But since u have assigned it to the same address of NAME, it will always print HELLO world...
Aug 12, 8:57 pm 2008
Rene Herman
Re: A simple query about memory mgmt
It is unspecified whether or not the compiler will allocate one or two copies of the character sequence "santosh" and therefore whether or not p_name != q_name; to understand that allocating it just once is an optimization. Rene. -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ
Aug 13, 12:37 am 2008
Peter Teoh
Re: A simple query about memory mgmt
Hello Rene and everyone, Ah....ok I agreed, the program below meet exactly your two statement above: #include<stdio.h> #define NAME "santosh" #define NAME1 "santosh" int main() { char *p_name = NAME; char *q_name = NAME1; if (p_name == q_name) printf("Hello, World\n"); return 0; } And of course, now if p_name and q_name are the same value, it is an optimization. After compiling without optimization gcc -O0, the output is as below: 0x080483b4 &lt...
Aug 13, 2:40 am 2008
Rene Herman
Re: A simple query about memory mgmt
On 13-08-08 08:40, Peter Teoh wrote: #define does not allocate anything nor does it tell the compiler anything. Anything starting with a # in C is not handled by the compiler, but by the C pre-processor (man cpp). Now, since only fairly recently, GCC's C pre-processor and C compiler are in fact integrated into a single binary but the conceptual split is still very much in place. The C pre-processor should conceptually be viewed as a general textfile processing tool and no more. you'd ...
Aug 13, 3:06 am 2008
Santosh Pradhan
Re: A simple query about memory mgmt
Thank you all. Regards, Santosh
Aug 13, 6:03 am 2008
Manish Katiyar
Re: A simple query about memory mgmt
Refer to below link ...... first bullet clearly says that gcc will store only one copy if strings are identical. -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ
Aug 13, 1:38 am 2008
Rene Herman
Re: A simple query about memory mgmt
It clearly says that gcc version 3.4.6 will do so. And it makes perfect sense to do so ofcourse but as far as C the language is concerned, it's unspecified and I can assure you that I've used compilers that did not. (whether or not I was happy to be using those compilers is secondary) Rene. -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ
Aug 13, 1:58 am 2008
Johannes Weiner
Re: A simple query about memory mgmt
gcc is one compiler out of many. While gcc might always collapse them, others might not always or never at all do so. Hannes -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ
Aug 13, 1:51 am 2008
Manish Katiyar
Re: A simple query about memory mgmt
Yeah... I completely agree :-) ... the output will be compiler dependant.......was just saying that if you use gcc you are guaranteed -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ
Aug 13, 1:53 am 2008
Rene Herman
Re: A simple query about memory mgmt
Damned if I'm going to check but I remember this being an issue with GCC at some point so I doubt that that the first version of GCC that I used (2.7.2) already did or reliably did in fact... Rene. -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ
Aug 13, 2:10 am 2008
MinChan Kim
Re: How often do you use ram filesystem(ramfs or ramdisk)
Thank you for comment. Are there any other persons who use ramfs/ramdisk with special -- Kinds regards, MinChan Kim -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ
Aug 12, 8:50 pm 2008
Rene Herman
Re: How often do you use ram filesystem(ramfs or ramdisk)
You might also want to read http://lwn.net/Articles/273030/ Rene. -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ
Aug 13, 12:50 am 2008
Peter Teoh
Re: Identifying functions
not sure what u mean. but i think what u are asking is how to find out at any point, when the CPU is stopped, which part of the kernel it is executing at that point, right? One way, how programmers can find that out is to do stack dump. The function is dump_stack() in the kernel source. but to understand the meaning of the stack dump, u need to know how the stack is organized, frame pointer and it usage by GCC, stack frame per function called, what is stack walking etc. Not really pertaining...
Aug 13, 9:47 am 2008
Greg KH
Re: configuring the Kernel
I don't have one, other than the scripts I published in the book, Linux Kernel in a Nutshell. It's free online if you want to poke around in it. This comes up every year or so though, there are a lot of half-way completed implementations out there, google is your friend... thanks, greg k-h -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ
Aug 12, 8:24 pm 2008
Greg KH
Re: configuring the Kernel
You don't even need to do that, just ask the kernel to emit the hotplug messages for the hardware it found and the modules will be automatically loaded. See the startup code for any modern distro for how to do this in a few lines of shell script, or a simple .c program. thanks, greg k-h -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ
Aug 12, 8:25 pm 2008
previous daytodaynext day
August 12, 2008August 13, 2008August 14, 2008