Linux-Development-Sys Digest #995, Volume #7 Wed, 5 Jul 00 08:13:10 EDT
Contents:
Re: Java on SMP linux. ("1$worth")
tekram DC-395 and 2.4 testing kernel ([EMAIL PROTECTED])
Re: compiling 2.4-test2 kernel problem (John Gluck)
How Kernel_thread() actually work ? ("JKFang")
Cross compiler for MIPS on x86 Linux ("B. Joshua Rosen")
EZUSB in 2.4.x (James Lewis)
Re: capturing ethernetframes ([EMAIL PROTECTED])
release f_op not being called (Marcos E. =?iso-8859-1?Q?Kurb=E1n?=)
Re: /proc/cpuinfo (Dirk Foersterling)
Re: Cross compiler for MIPS on x86 Linux (Andreas Jaeger)
Re: problem with copy_from_user ("Dennis Huang")
copy_from_user ("Dennis Huang")
Re: [Q] Info of file system driver ("Koji Yamamoto")
Re: copy_from_user (Mathias Waack)
Re: Standard Data Types (Eoin Ryan)
Re: How Kernel_thread() actually work ? (Marc SCHAEFER)
Re: Standard Data Types (Mathias Waack)
Re: copy_from_user (Villy Kruse)
Re: How Kernel_thread() actually work ? (Mathias Waack)
Re: [Q] Info of file system driver (Zoran Cutura)
Re: Implementing timers in none Windows applications (Ronald Kriemann)
Re: release f_op not being called ([EMAIL PROTECTED])
Re: release f_op not being called (Mathias Waack)
----------------------------------------------------------------------------
From: "1$worth" <"1$worth"@costreduction.plseremove.screaming.net>
Crossposted-To: comp.lang.java.programmer
Subject: Re: Java on SMP linux.
Date: Tue, 04 Jul 2000 17:15:01 +0100
Ronald Cole wrote:
>
> [EMAIL PROTECTED] (Thaddeus L Olczyk) writes:
> > Sun claims that their Java does not work on linux in SMP (
> > multiprocessor ) systems.
> > Can anyone point me to a good Java implementation that:
> > 1) Has a fairly good debugger.
> > 2) Can run on SMP systems.
> > 3) Most import-- is free.
>
> blackdown.org
Does this fully use SMP??????
------------------------------
From: [EMAIL PROTECTED]
Subject: tekram DC-395 and 2.4 testing kernel
Reply-To: [EMAIL PROTECTED]
Date: Tue, 04 Jul 2000 17:31:50 GMT
I have a tekram DC-395 SCSI card which is based on tekram's own bios. I
have tekram's patches but they fail to apply cleanly to the 2.4 testing
2 kernel. Has anyone worked around this or should I just have at it
manually?
Also anyword on when the DC-395 code may make it into the main kernel
source?
TIA,
Chuck
--
=============================================================================
|Chuck Mattern | "That which does not kill us, makes us stronger."|
|[EMAIL PROTECTED] | -Friedrich Nietzsche- |
=============================================================================
------------------------------
From: John Gluck <[EMAIL PROTECTED]>
Crossposted-To: linux.dev.kernel,alt.os.linux
Subject: Re: compiling 2.4-test2 kernel problem
Date: Tue, 04 Jul 2000 14:25:17 -0400
J Wendel wrote:
[snip
Could you pass along exactly which patches you have installed?
>
> I'm running 2.4.0-test2-AC2 and I still get signal 11 when building
> a new kernel. I'm also looking for a PPP fix (posting this from
> Winduhs).
>
> Thanks,
>
> John
The kernel patches are in the following directory:
ftp://ftp.kernel.org/pub/linux/kernel/people/alan/2.4.0test/
the ppp stuff is here:
http://www.math.uwaterloo.ca/~mostrows/
--
John Gluck (Passport Kernel Design Group)
(613) 765-8392 ESN 395-8392
Unless otherwise stated, any opinions expressed here are strictly my own
and do not reflect any official position of Nortel Networks.
------------------------------
From: "JKFang" <[EMAIL PROTECTED]>
Subject: How Kernel_thread() actually work ?
Date: Wed, 5 Jul 2000 03:05:23 +0800
Some documents say only "Process" exist in Linux.(ie. scheduler dispatch
time to processes)
When kernel_thread() is called, does kernel need anothor virtual memory for
the new
thread (ie. separate page directory, tables, TSS, etc..) ?
If so, this contradicts the concepet "thread" ? (A thread is a light process
in text book)
If not, how does Linux performs this job ?
Can someboy help explaining the source code of "Kernel_thread()" ?
It seems to invoke system call (int 0x80) twice ? What dost it do ??
I cannt understand ?? Help..
------------------------------
From: "B. Joshua Rosen" <[EMAIL PROTECTED]>
Crossposted-To: gnu.gcc.help,comp.os.linux.development.apps
Subject: Cross compiler for MIPS on x86 Linux
Date: Tue, 04 Jul 2000 18:31:43 -0400
I'm trying to build a cross compiler for an embedded MIPS R3000 on a
RedHat 6.2 system.
Myc configure line was
../gcc-2.95.2/configure mips-elf --prefix=/alt/tmp/mips_gcc
--enable-languages=c
I'm getting the following error:
/usr/bin/ld: cannot find -lmld
collect2: ld returned 1 exit status
make[1]: *** [cccp] Error 1
make[1]: Leaving directory `/alt/tmp/gcc/gcc'
make: *** [all-gcc] Error 2
What's lmld and where can I find it?
Thanks
Josh
------------------------------
From: James Lewis <[EMAIL PROTECTED]>
Subject: EZUSB in 2.4.x
Date: Tue, 04 Jul 2000 22:40:35 GMT
I'm looking for information regarding the EZUSB driver... I noticed it
isn't apart of 2.3.x/2.4.x anymore...
James
[EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: capturing ethernetframes
Date: Wed, 05 Jul 2000 01:51:26 GMT
On Tue, 04 Jul 2000 07:22:29 GMT [EMAIL PROTECTED] wrote:
| In article <[EMAIL PROTECTED]>,
| Zoran Cutura <[EMAIL PROTECTED]> wrote:
|> Well Dirk,
|>
|> how often do you want to ask this question?? Isn't it enough to post
|> it once? Wait until somebody answers it. It is very annoying reading
|> the same post over and over again.
|>
|
|
| Like I already said in one of the previous one. The newsserver of our
| university was giving me a serious headache. It always told me that my
| post failed. Now it seems like they did got through.Our newsserver seems
| to be using some kind of caching software that doesn't seem to work the
| way it should. I appologized already for the inconvienience (see my
| posts coming via the dejanews-system) and I'm sorry once more.
I only saw ONE copy of this question. It looked like:
# Path:
rQdQ!sn-xit-03!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.icl.net!newsfeeds.belnet.be!naxos.belnet.be!news.belnet.be!not-for-mail
# From: Dirk Walravens <[EMAIL PROTECTED]>
# Newsgroups: comp.os.linux.development.system
# Subject: capturing ethernetframes
# Date: Mon, 03 Jul 2000 12:43:25 +0200
# Organization: K.U.Leuven
# Lines: 8
# Message-ID: <[EMAIL PROTECTED]>
# NNTP-Posting-Host: marvin.kulnet.kuleuven.ac.be
# Mime-Version: 1.0
# Content-Type: text/plain; charset=us-ascii
# Content-Transfer-Encoding: 7bit
# X-Trace: naxos.belnet.be 962621005 27257 134.58.127.3 (3 Jul 2000 10:43:25 GMT)
# X-Complaints-To: [EMAIL PROTECTED]
# NNTP-Posting-Date: 3 Jul 2000 10:43:25 GMT
# X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.2.14-5.0 i686)
# X-Accept-Language: en
# Cache-Post-Path: [EMAIL PROTECTED]
# X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/)
# Xref: rQdQ comp.os.linux.development.system:108412
#
# Hi,
#
# I'm writing a kernel-module which should be notified whenever my
# ethernetcard receives a frame (and it should get the frame also).
# I don't want to hack a call to my module into some ethernet-card driver.
# Isn't there a more generic way for me to register my module as
# the receiver for ethernetframes. (And at the same time to unregister the
# normal protocolstack in the linux kernel).
--
| Phil Howard - KA9WGN | My current websites: linuxhomepage.com, ham.org
| phil (at) ipal.net +----------------------------------------------------
| Dallas - Texas - USA | [EMAIL PROTECTED]
------------------------------
From: Marcos E. =?iso-8859-1?Q?Kurb=E1n?= <[EMAIL PROTECTED]>
Subject: release f_op not being called
Date: Wed, 05 Jul 2000 00:13:25 -0300
Reply-To: [EMAIL PROTECTED]
Hi all,
Please understand if this is a should-know question:
Could any one tell me why isn't the release method of my driver not
being called when a file descriptor is closed, does it have to do that I
fork() after obtaining it (I close the descriptor from both processes).
Thanks in advance for any help...
Marcos E. Kurban
------------------------------
From: [EMAIL PROTECTED] (Dirk Foersterling)
Subject: Re: /proc/cpuinfo
Date: 5 Jul 2000 03:50:41 GMT
On Mon, 03 Jul 2000 10:53:28 -0400, Matt Lesko wrote:
> As
> for model, I'd just say it some sort of identification of the CPU
> itself, maybe the 8th revision.
It's not the revision. It's the model. Family 5 is pentium class, model
8 is the model. For example: If the vendor of the family 5, model 8 CPU
is AMD, then it's a K6-2. If the vendor is Intel, then it's a Mobile
Pentium MMX.
> BogoMIPS are (bogus) million
> instructions per second, supposed to be a measure of a computer's
> performance. In reality, it has very little to do with a computer's
> performance, hence BogoMIPS. It is found by testing how long it takes to
> run a small loop on startup, and is usually 2 * Mhz of the CPU, even
Nothing to do with "usually". According to the BogoMips mini-HOWTO, your
formula only applies to AMD's K5/K6 and Intel's Pentium MMX.
> according to the kernel source (/usr/src/linux/init/main.c, search down
> to bogomips). Hope this helps a bit. -- Matt Lesko
Where did you get that from? I can't find it.
-dirk
--
D i r k F "o r s t e r l i n g
[EMAIL PROTECTED] ******** http://www.DeathsDoor.com/milliByte/
-------------
ISDN - [I]st [S]owas [D]enn [N]oetig?
------------------------------
From: Andreas Jaeger <[EMAIL PROTECTED]>
Crossposted-To: gnu.gcc.help,comp.os.linux.development.apps
Subject: Re: Cross compiler for MIPS on x86 Linux
Date: 05 Jul 2000 07:37:46 +0200
>>>>> B Joshua Rosen writes:
> I'm trying to build a cross compiler for an embedded MIPS R3000 on a
> RedHat 6.2 system.
> Myc configure line was
> ../gcc-2.95.2/configure mips-elf --prefix=/alt/tmp/mips_gcc
> --enable-languages=c
Use --target=mips-elf instead of just mips-elf. The INSTALL document
describes how to setup a cross compiler.
Andreas
> I'm getting the following error:
> /usr/bin/ld: cannot find -lmld
> collect2: ld returned 1 exit status
> make[1]: *** [cccp] Error 1
> make[1]: Leaving directory `/alt/tmp/gcc/gcc'
> make: *** [all-gcc] Error 2
> What's lmld and where can I find it?
> Thanks
> Josh
--
Andreas Jaeger
SuSE Labs [EMAIL PROTECTED]
private [EMAIL PROTECTED]
------------------------------
From: "Dennis Huang" <[EMAIL PROTECTED]>
Subject: Re: problem with copy_from_user
Date: Wed, 5 Jul 2000 17:29:05 +0800
I don't know why but copy_from_user() return how many bytes NOT copied
insdead copied.
yours, Dennis
<[EMAIL PROTECTED]> wrote in message
news:8iah2q$m16$[EMAIL PROTECTED]...
> I'm writing a char-device-driver (Kernel 2.2.5) and
> i have a problem with the copy_from_user() in my
> write-function. I think it's simple to solve but i
> didn't see an error :-(
>
> Here is the samplecode:
>
> ssize_t daad_write(struct file *daad_file, const char *daad_name, size_t
> buf_size, loff_t *buf)
> {
> int value;
> int result;
> if (buf_size==sizeof(int))
> {
> result=copy_from_user(&value,buf,buf_size);
> printk(KERN_INFO "copied bytes=%i\n",result);
> printk(KERN_INFO "given value=%i\n",value);
> }
> return buf_size;
> }
>
> If i write an integer value (for example: 123) in my testprogram,
> i get the following output in /var/log/messages:
>
> Jun 15 14:04:06 ws-i-h08 kernel: copied bytes=4
> Jun 15 14:04:06 ws-i-h08 kernel: given value=-1072636306
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
------------------------------
From: "Dennis Huang" <[EMAIL PROTECTED]>
Subject: copy_from_user
Date: Wed, 5 Jul 2000 17:35:13 +0800
I am new to Linux and met a problem.
I used copy_from_user() in my IOCTL function.
But the kernel refused to load my module.
It can't find the symbol best_copy_from_user().
I have checked the /proc/ksyms, there is only a best_copy_from_user()
function with version CRC code. And my precompiled code has a barely
best_copy_from_user() function without version CRC. I think that's why the
kernel refused to load the module.
Other functions like printk() work.
Enviroment:
RedHat 6.2 smp kernel.
Linux kernel 2.2.14smp with gcc egcs-2.91.66.
Any help will be appreciate.
yours, Dennis
------------------------------
From: "Koji Yamamoto" <[EMAIL PROTECTED]>
Subject: Re: [Q] Info of file system driver
Date: Wed, 5 Jul 2000 17:57:44 +0900
"Zoran Cutura" <[EMAIL PROTECTED]> wrote :
> This is very specific, and I doubt there are any books or extensive
> documentations. Definitly you should go and check the sources for
> the existing drivers and how they are interfaced.
Thank you very much for your advice. I'll check sources.
Can anyone tell me where I can found good books and URLs of
general device drivers ? I have only O REILLY's "Linux device drivers".
Thanks in advance.
--
Koji Yamamoto
------------------------------
From: Mathias Waack <[EMAIL PROTECTED]>
Subject: Re: copy_from_user
Date: 05 Jul 2000 11:57:14 +0200
"Dennis Huang" <[EMAIL PROTECTED]> writes:
> I am new to Linux and met a problem. I used copy_from_user() in my
> IOCTL function. But the kernel refused to load my module. It can't
> find the symbol best_copy_from_user().
>
> I have checked the /proc/ksyms, there is only a best_copy_from_user()
> function with version CRC code. And my precompiled code has a barely
> best_copy_from_user() function without version CRC. I think that's
> why the kernel refused to load the module. Other functions like
> printk() work.
>
> Enviroment: RedHat 6.2 smp kernel. Linux kernel 2.2.14smp with gcc
> egcs-2.91.66.
Are you really sure that you've used the right headers and command-line
switches for the compilitation of your module?
My 2.2.14 kernel doesn't contain a function or macro named
best_copy_from_user. Where is this function defined? Does RedHat
changes the standard kernel?
IIRC there is a problem with the egcs. It shouldn't be used for kernel
compilation. You should upgrade the compiler.
Not much help, I know:(
Mathias
------------------------------
From: [EMAIL PROTECTED] (Eoin Ryan)
Subject: Re: Standard Data Types
Date: 5 Jul 2000 10:38:03 GMT
[EMAIL PROTECTED] (Mathias Waack) wrote in
<[EMAIL PROTECTED]>:
>
>Hi,
>
>[EMAIL PROTECTED] (Eoin Ryan) writes:
>
>Something like http://www.mosix.org ?
>I don't know your design so I can't say much. Why do you use RPC for
>sending the pages? If you use RPC, you can send the pages between
>different architectures - thats one of the main features (see XDR).
>But why? How do you continue a process coming from one architecture
>on a different hardware?
>
>Are you really, really sure that you understood the problem?
>
>Mathias
>
Firstly, thanks for the site.
Secondly, I'll be using RPC to communicate with potential target machines,
as well as transferring the task_struct to the destination machine. If I
use RPC I can send the task_struct to different architectures of machines
running linux, and the xdr routines will encode the task_struct properly.
However, and this is my grey area, what happens if I try to transfer the
pages of memory? I would imagine that the xdr routines could not encode
these, can they, as they do not have definitions in the .x file. Also, to
what degree would pages of memory be compatible with machines of different
architectures....Pentium 2 V Pentium MMX for example. I imagine that these
two, for example represent an int the same way in memory, but what about
all the other info in a page. What I mean is can I take a page of memory
from a 486 and put it on a Pentium (assuming same page size) without any
changes to the page, or am I limited to Pentium V Pentium and 486 V 486?
Or does the hardware have any bearing on how pages are stored? Will the
migratory process be limited to machines of the exact same archeticture
(even chip) as it started out on?
Eoin
------------------------------
From: Marc SCHAEFER <[EMAIL PROTECTED]>
Subject: Re: How Kernel_thread() actually work ?
Date: 5 Jul 2000 07:45:05 GMT
JKFang <[EMAIL PROTECTED]> wrote:
: If not, how does Linux performs this job ?
Linux supports the clone() system call which can be used from
user space to create a new process. fork() is implemented
using clone().
clone() supports the wide range of process possibilities: from
isolated UNIX standard processes, to processes sharing some of
the address space, or even to what is commonly called threads
in other OSes.
However, I have never used kernel_thread().
------------------------------
From: Mathias Waack <[EMAIL PROTECTED]>
Subject: Re: Standard Data Types
Date: 05 Jul 2000 12:40:41 +0200
[EMAIL PROTECTED] (Eoin Ryan) writes:
> memory, but what about all the other info in a page. What I mean is
> can I take a page of memory from a 486 and put it on a Pentium
> (assuming same page size) without any changes to the page,
AFAIK yes.
> Will the migratory process be
> limited to machines of the exact same archeticture (even chip) as it
> started out on?
Yes (IMHO of course), you're limited to compatible machines. You
cannot run a program compiled for a Pentium MMX on a 486, so a
migration would fail.
And of course all machines should run the same software, especially
kernel and (shared-)libraries.
But there are much questions left:
How do you handle shared libraries? How do you handle resources
likes file descriptors (ie. open pipes, sockets aso.)? How do you
handle device access? (for instance a program opens /dev/some_dev,
which results in modprobe loading the appropriate module, you are
doing some operations on this device which sets the module an a
specific state, and now the program migrates to another node
- how do you restore the modules state on this node?)
So many questions...
I think its a great project, but I have some doubts if its to
realize by only one person. I don't want to restrain you from
starting this project, but I want warn you that you may fail.
Just to prevent a huge frustration;)
Mathias
------------------------------
From: [EMAIL PROTECTED] (Villy Kruse)
Subject: Re: copy_from_user
Date: 5 Jul 2000 11:23:19 GMT
On Wed, 5 Jul 2000 17:35:13 +0800,
Dennis Huang <[EMAIL PROTECTED]> wrote:
>I am new to Linux and met a problem.
>I used copy_from_user() in my IOCTL function.
>But the kernel refused to load my module.
>It can't find the symbol best_copy_from_user().
>
>I have checked the /proc/ksyms, there is only a best_copy_from_user()
>function with version CRC code. And my precompiled code has a barely
>best_copy_from_user() function without version CRC. I think that's why the
>kernel refused to load the module.
>Other functions like printk() work.
>
>Enviroment:
>RedHat 6.2 smp kernel.
>Linux kernel 2.2.14smp with gcc egcs-2.91.66.
>
Compile with -DMODVERSIONS and -DMODULE
and -include /usr/src/linux/include/linux/modversions.h
plus whatever compile flags you already have.
Villy
------------------------------
From: Mathias Waack <[EMAIL PROTECTED]>
Subject: Re: How Kernel_thread() actually work ?
Date: 05 Jul 2000 12:51:00 +0200
"JKFang" <[EMAIL PROTECTED]> writes:
> Some documents say only "Process" exist in Linux.(ie. scheduler
> dispatch time to processes) When kernel_thread() is called, does
> kernel need anothor virtual memory for the new
> thread (ie. separate page directory, tables, TSS, etc..) ?
No.
> If so,
> this contradicts the concepet "thread" ? (A thread is a light process
> in text book) If not, how does Linux performs this job ?
The kernel uses cooperative multitasking. That means, a thread in the
kernel will never be interrupted, it runs until it decides to finish
or to call schedule()
Please remark that a thread in the kernel and a multithreaded user
program are two very different things.
Mathias
------------------------------
From: Zoran Cutura <[EMAIL PROTECTED]>
Subject: Re: [Q] Info of file system driver
Date: Wed, 05 Jul 2000 13:29:30 +0200
Koji Yamamoto wrote:
>
> "Zoran Cutura" <[EMAIL PROTECTED]> wrote :
>
> > This is very specific, and I doubt there are any books or extensive
> > documentations. Definitly you should go and check the sources for
> > the existing drivers and how they are interfaced.
>
> Thank you very much for your advice. I'll check sources.
>
> Can anyone tell me where I can found good books and URLs of
> general device drivers ? I have only O REILLY's "Linux device drivers".
>
which is an excellent book, I'ld recommend the most for learning
to write a device driver.
Z
------------------------------
From: Ronald Kriemann <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development
Subject: Re: Implementing timers in none Windows applications
Date: 05 Jul 2000 13:38:08 +0200
"Gast Primus" <[EMAIL PROTECTED]> writes:
> Hi
>
> I've used XtAppAddTimer() with motif before and have the OSF/Motif
> development kit for Linux. Unfortunately the exec I want to have timers is
> not an X windows application and therefore does not have a Graphics Context.
> Can I use XCreateGC to create a GC using some default values such as 0:0 for
> the display etc - what is a Drawable - to use the X windows timer routines
> as these would be just the job.
You might take a look at the Qt-lib. They have a nice implementation
of timers and I used a similar construction in my own code. Of course
you have to have a "while ( true ) { check_timer(); }" loop in your
application but this can run in a special thread (but if you need
timers, you should already have such a loop ;).
> Thanks in Advance
> Iain
RGDS
Ronald
--
"Codito, ergo sum / I code, therefore I am"
Ronald Kriemann Max-Planck-Institute for
[EMAIL PROTECTED] Mathematics in the Sciences
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: release f_op not being called
Date: Wed, 05 Jul 2000 11:36:46 GMT
I think that you only get release() after *all* file descriptors for
the file have been closed.
Dave
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: Mathias Waack <[EMAIL PROTECTED]>
Subject: Re: release f_op not being called
Date: 05 Jul 2000 13:33:13 +0200
Marcos E. Kurb�n <[EMAIL PROTECTED]> writes:
> Could any one tell me why isn't the release method of my
> driver not being called when a file descriptor is closed, does it have
> to do that I fork() after obtaining it (I close the descriptor from
> both processes).
Maybe. fork() creates a copy of the filedescriptor, so parent and child
share the same fd's. You may have noticed that a fork doesn't result in
another call to your open() routine. (see Stevens 8.3).
If you close all copies of the fd, the release method will be called. If
not then there must be an error in the code.
Mathias
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.development.system) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-System Digest
******************************