Linux-Development-Sys Digest #628, Volume #6 Fri, 16 Apr 99 02:14:10 EDT
Contents:
Scheduling for user-level threads
Re: memcpy_tofs(), memcpy_fromfs() (Andi Kleen)
Re: Large pages (Andi Kleen)
Re: compile now yields 'conflicting types' (Paul Kimoto)
pcibios_* functions ("Tim Linehan")
Re: mmap (Arun Sharma)
[EMAIL PROTECTED] (Lincoln M C)
Re: Linux Debugger/Monitor (Andi Kleen)
Re: linux compatability ([EMAIL PROTECTED])
Re: memcpy_tofs(), memcpy_fromfs() (Andi Kleen)
Re: Win32 support in Linux ([EMAIL PROTECTED])
Re: ISR: Kernel->User space call (David Lee)
Re: pcibios_* functions (Peter Pointner)
a debate between Linux & NT ("JZ")
Re: cross compiler (Peter Samuelson)
Linuxcare Openings - Start your Summer with a New Job! (Arthur F. Tyde III - User)
Re: a debate between Linux & NT (Ken)
----------------------------------------------------------------------------
From: <[EMAIL PROTECTED]>
Subject: Scheduling for user-level threads
Date: Thu, 15 Apr 1999 11:34:43 -0500
I have a basic question ?
Consider a user-level implementation of threads. How can I write a
scheduler for user-level threads within a process. For example
when a thread blocks on I/O or system-call , I want another user-level
thread to be scheduled. If I don't have a scheduler then the entire
process will be blocked , which I don't want. Without a scheduler
a thread cannot be scheduled without being voluntarily relinquised
by current thread.
How is this taken care of in Posix threads ? ( In linux I beleive
it uses clone() & some scheduling primitives ) Do they necssarily
require OS support for scheduling.
It would appreciate if anyone could throw light on these issues.
Vijayan
([EMAIL PROTECTED])
------------------------------
From: Andi Kleen <[EMAIL PROTECTED]>
Subject: Re: memcpy_tofs(), memcpy_fromfs()
Date: 15 Apr 1999 22:38:37 +0200
Emile van bergen <[EMAIL PROTECTED]> writes:
> On Wed, 14 Apr 1999, Lorenz Hahn wrote:
>
> > Hi,
> >
> > I've just upgraded a driver from 2.0.36 to 2.2.5 and I've replaced all
> > memcpy_tofs() through copy_to_user() and memcopy_fromfs() through
> > copy_from_user(). The driver runs fine. Don't ask me why the names of
> > the functions have changed. The arguments are the same.
>
> My guess is that the developers found it time to get rid of this
> x86-specific heritage... as the 'fs' in those functions comes from one
> of those funny intel 'segment' registers (actually... 'fs' ;-) )
> which is used in Linux-x86 to hold a descriptor of the segment that
> points to user space.
>
> So those names were really inappropriate for e.g. sparcs or AXPs; the
> new names are more descriptive of what the functions actually do.
No, the reason is that the semantics changed (you need to check
a return value now) The name change is intended to force the
programmers to fix their code, but bad advice, like given in
Rubbini's book, circumvents this goal.
See my other post for more information.
-Andi
--
This is like TV. I don't like TV.
------------------------------
From: Andi Kleen <[EMAIL PROTECTED]>
Subject: Re: Large pages
Date: 15 Apr 1999 22:26:31 +0200
[EMAIL PROTECTED] (David Nilsen) writes:
> I know the Pentium family of CPUs has support for 4mb pages, and did
> some Web searches to see if such a feature is in Linux, but my search
> was inconclusive.
>
> Does anyone know if such a feature exists? If so, can you enable it on
> a per-process basis?
It exists, and is used, but only for the kernel itself[1]. It is
not accessible by user processes ATM. Support for user processes
may be added in 2.3.
-Andi
[1] That is why modules are a little bit slower than compiled
in drivers - they need their own TLB entry.
--
This is like TV. I don't like TV.
------------------------------
From: [EMAIL PROTECTED] (Paul Kimoto)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: compile now yields 'conflicting types'
Date: 15 Apr 1999 13:45:26 -0500
Reply-To: [EMAIL PROTECTED]
This is not a system problem. Followups redirected.
In article <7f4t9i$6rq$[EMAIL PROTECTED]>, Jay Johnson wrote:
[spurious control-M's deleted]
> Hi, I am getting some problems from compiling a package on Linux.
> It works on HPUX and Solaris at School without a warning.
>
> The output looks like this:
>
> /usr/include/mathcalls.h:60:warning:conflicting types for built-in function
> 'cosf'
[...]
> read.c:39:conflicting types for 'sys_errlist'
> /usr/include/stdio.h:221:previous dec of 'sys_errlist'
>
> And the package fails to compile.
>
> I suppose that mathcalls.h is new and it is called from math.h
> and stdio.h is different?
The C library on Linux is a completely different implementation from those
found on commercial operating systems.
In glibc2, the correct prototype is
extern const char *const sys_errlist[];
It is a fatal error for a program to try to use a different prototype
(e.g., without the "const"s). (Since glibc should provide all the
prototypes you need, probably your code does not need to provide its
own. Perhaps it does for use on other systems.)
Presumably something similar is happening with your math functions.
You might give the "-E" flag to gcc to inspect the pre-processor output.
--
Paul Kimoto <[EMAIL PROTECTED]>
------------------------------
From: "Tim Linehan" <[EMAIL PROTECTED]>
Subject: pcibios_* functions
Date: Thu, 15 Apr 1999 18:09:58 GMT
Hi,
I am trying to compile a program that uses the pcibios_read_config_byte ()
and similar functions, basically to read some configuration information
about an installed adapter on my system.
The compiler says that the pcibios_... functions are undefined resources. I
imagine that there is a library that I need to link in to use these
functions, but I can seem to find the right one. Does anyone know what
library is necessary, and where it is located. Are there any references
available that document what functions are located in what libraries?
I'm very new to Linux, so any help would be appreciated.
Thanks,
TL
------------------------------
From: [EMAIL PROTECTED] (Arun Sharma)
Subject: Re: mmap
Reply-To: [EMAIL PROTECTED]
Date: Fri, 16 Apr 1999 01:21:38 GMT
On Thu, 15 Apr 1999 19:09:01 -0500, Rajesh Raju <[EMAIL PROTECTED]> wrote:
>
> Hi ,
> I am writing a device driver.There are 6 base address registers on any
> pci device. I want to know how to mmap the region available on each
> address register to the user space.
>
> I am using remap_page_range (...) routine. But I am not able to mmap the
> whole space.
>
How about using /dev/mem ?
-Arun
------------------------------
Date: Thu, 15 Apr 1999 14:02:27 +0100
From: Lincoln M C <[EMAIL PROTECTED]>
Subject: [EMAIL PROTECTED]
Yum,
K6-3 400
801 BogoMips (for what its worth)
kernel compile time : 2:10.88
using Linux v2.0.32, I'd like to see this on 2.2.x!
------------------------------
From: Andi Kleen <[EMAIL PROTECTED]>
Subject: Re: Linux Debugger/Monitor
Date: 15 Apr 1999 22:23:16 +0200
David Grothe <[EMAIL PROTECTED]> writes:
> Download
> ftp://ftp.gcom.com/pub/linux/src/gdbstub-2.0.36/gdbstub-2.0.36.tgz for
> two-machine serial line GDB execution of kernel code. In the 2.0 kernel
> physical memory addresses == virtual memory addresses so accessing your
> on-board memory is straightforward. If you board memory is at high
> addresses (as in for PCI devices) you will need to map the memory first
> and then access it via the resulting virtual address both in your driver
> and with the debugger.
>
> I'm not sure that GDB can access I/O ports in remote debug mode.
It could be done by putting not inline inb/outb functions somewhere
into the kernel image and calling them from gdb, e.g. via "p"
An interesting alternative to the kgdbstub is
kdb from http://reality.sgi.com/slurn_engr/ ,
assuming you don't use X11.
-Andi (who still dreams about putting a forth into kgdbstub)
--
This is like TV. I don't like TV.
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: linux compatability
Date: Thu, 15 Apr 1999 21:01:51 GMT
Ok, this is really simple. I should know, I've had it linux and win95
for a while, and just moved to win98. I didn't even have to update
linux to do it, either, that was the amazing thing. I did, just so I
would be able to type in win98 rather than win95 at the lilo boot
promplt, but that is very simple. Anyway, I would suggest getting a
book on linux and a cheap cd of redhat, like from cheapbytes
(www.cheapbytes.com). I'd suggest 'Running Linux', published by
O'Reilly and associates (www.ora.com). Anyway, also look at
www.linux.org, they have links to all the docs you will need, even if
they do assume a bit of *nix familiarity to begin with. Not much
though, so if you have some, you will most likely be able to dive
right in. In particular, check out the HOW-TOs (provided with RedHat
as well, and most other good dist.), they explain alot of stuff.
On 15 Apr 1999 17:32:12 GMT, sarma v aryasomayajula
<[EMAIL PROTECTED]> wrote:
>Hi!
>Can anyone suggest me the following installation set up is possible or not?
>I'm interested in setting up Oracle on linux.
>.1 Actually I want to install linux and windows 98 on the same machine and
>while booting it should prompt me whether it should be linux boot or dos
>boot? depending upon the choice it should bring linux or windows.
>2. I wanted to install oracle server on linux with pro*c compiler. I just
>wanted to know whether this type of installation is possible.
>Thanks
------------------------------
From: Andi Kleen <[EMAIL PROTECTED]>
Subject: Re: memcpy_tofs(), memcpy_fromfs()
Date: 15 Apr 1999 22:35:57 +0200
Gerard van der Sel <[EMAIL PROTECTED]> writes:
> Timothy J. Lee wrote:
> >
> > [EMAIL PROTECTED] (NA) writes:
> > |In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> > |THIS.BIT says...
> > |> memcpy_tofs() and memcpy_fromfs() come up as implicit declarations
> > |> on a kernel 2.2.5 computer. What should they be replaced by? What
> > |> kernel version had the change?
> > |
> > |Did you remember to: #include <asm/segment.h> ?
> > |
> > |Implicit declarations are usually a good hint
> > |that prototype is missing.
> >
> > /usr/include/asm/segment.h in kernel 2.2.5 does not have memcpy_tofs(),
> > unlike the same file in kernel 2.0.36.
> >
> > --
> > ------------------------------------------------------------------------
> > Timothy J. Lee timlee@
> > Unsolicited bulk or commercial email is not welcome. netcom.com
> > No warranty of any kind is provided with this message.
> According to Linux Device drivers (Alessandro Rubini, O'Reilly) are
> memcpy_tofs and memcpy_fromfs removed in 2.1 kernels. It said that they
> likely stay away in de 2.2 kernel.
> In the book there is a file called sysdep-2.1.h which now use:
> copy_from_user <> memcpy_tofs
> copy_to_user <> memcpy_fromfs
> Look for the example file belonging to the book. It is in there
This simple mapping is wrong. They were renamed not to annoy the
programmer, but because their semantics changed and to fix a bug
(the verify_area/memcpy*fs combo has an inherent race)
Old Code:
#include <asm/segment.h>
...
if (verify_area(VERIFY_READ, user_bla, blasize)) {
/* clean up */
return -EFAULT;
}
memcpy_fromfs(kernel_bla, user_bla, blasize);
New code:
#include <asm/uaccess.h>
/* verify_area is not needed anymore. */
if (copy_from_user(kernel_bla, user_bla, blasize)) {
/* clean up */
return -EFAULT;
}
Note that copy_from_user does _not_ return -EFAULT in the error case,
it returns the number of uncopied bytes.
Just mapping these functions is wrong, because you lost the EFAULT
user reporting then.
memcpy_tofs and put_user/get_user are similarly.
The benefit is that the new user access functions are fully
SMP/thread safe and they are much faster too, because most of the
work of the 2.0 verify_area is done by the MMU now.
-Andi
--
This is like TV. I don't like TV.
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: Win32 support in Linux
Date: Fri, 16 Apr 1999 02:27:36 GMT
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> My question is simple. Does Linux have win32 support? I had read in
> the 2.2.0 docs on linux.org that it would be, but when I installed it,
> I could not see anything indicating that it did. I don't want to
> win32alize my hd without first knowing that I can still access it from
> linux. Thanks.
>
I'm running the 2.0.36 kernel and yes it has vfat support. First make sure
when you installed LINUX that you selected vfat support in the kernel. I
don't know how to check this. If necessary you may have to recompile your
kernel. From there it's easy. In your /etc/fstab file add a line similar to
this
/dev/hdb5 /dos_c vfat defaults 0 0
save the file. Make sure that you know where this partition is located. Mine
just happens to be hdb5 yours may be different. Then go to the beginning of
your file structure by typing in cd / and pressing enter. Do a mkdir dos_c
and press enter. Now type in mount -a and press enter. You should now be
able to cd to /dos_c and do an ls and see you vfat drive.
============= Posted via Deja News, The Discussion Network ============
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
From: David Lee <[EMAIL PROTECTED]>
Subject: Re: ISR: Kernel->User space call
Date: Fri, 16 Apr 1999 11:55:03 +0800
Joe Pfeiffer wrote:
>
> > In fact, a project called GAMMA they use call gate to
> > trigger a process asyn. handler.
>
> I'm not familiar with that -- what is it?
> --
> Joseph J. Pfeiffer, Jr., Ph.D. Phone -- (505) 646-1605
> Department of Computer Science FAX -- (505) 646-1002
> New Mexico State University http://www.cs.nmsu.edu/~pfeiffer
Here is the link:
http://www.disi.unige.it/project/gamma/
------------------------------
From: Peter Pointner <[EMAIL PROTECTED]>
Subject: Re: pcibios_* functions
Date: Thu, 15 Apr 1999 21:16:06 GMT
Tim Linehan <[EMAIL PROTECTED]> wrote:
> Hi,
> I am trying to compile a program that uses the pcibios_read_config_byte ()
> and similar functions, basically to read some configuration information
> about an installed adapter on my system.
> The compiler says that the pcibios_... functions are undefined resources. I
> imagine that there is a library that I need to link in to use these
> functions, but I can seem to find the right one. Does anyone know what
> library is necessary, and where it is located. Are there any references
> available that document what functions are located in what libraries?
> I'm very new to Linux, so any help would be appreciated.
> Thanks,
> TL
These functions are kernel functions, and I think you can't use them
from user space. You can use the proc interface, e. g. "cat /proc/pci" for
a 2.0.x kernel. On 2.2.x the path and content might be different.
Of course you can read these "files" from your program. For 2.2.x
kernels, there is a utility called lspci (which gets the information
probably via proc). Oh yes: man 5 proc
Peter
------------------------------
From: "JZ" <[EMAIL PROTECTED]>
Subject: a debate between Linux & NT
Date: Thu, 15 Apr 1999 10:22:50 +0800
I have got a debate betwwen Linux & NT.
Can somebody tell me what focus of
linux is better than NT?
How shall I do? I rise Linux.
------------------------------
From: [EMAIL PROTECTED] (Peter Samuelson)
Subject: Re: cross compiler
Date: 14 Apr 1999 23:16:45 -0500
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>
[Timothy J. Lee]
> Note that libgcc.a compiled on the target (usually through a gcc
> native install) is needed.
Only libgcc1.a, and not always true. In particular the i386 and MIPS
ports do not need any of the math functions. This is why my attempt to
bootstrap gcc onto our SGI without buying the SGI compiler (by having
it cross-compile itself from an RS/6000) almost worked. Unfortunately
crt1.o is somewhat essential. (: [Later SGI started rebundling the C
compiler with IRIX again, so someone started distributing the needed
files for this and I snagged them.]
--
Peter Samuelson
<sampo.creighton.edu!psamuels>
------------------------------
From: [EMAIL PROTECTED] (Arthur F. Tyde III - User)
Subject: Linuxcare Openings - Start your Summer with a New Job!
Date: 15 Apr 1999 05:40:22 GMT
Hello All,
Linuxcare is looking for some great talent in the help desk, training,
software development, sales and business development areas to work out
of our offices in San Francisco. (south of Market) Linuxcare is 4
blocks from Caltrain, Muni & BART stations. We offer all the excitement
of a hot Silicon Valley startup, Linux in many flavors, ground floor
opportunities, and all the free sugar and caffeine your system can
process.
In the support group Linux experience is necessary. We favor
individuals with Novell, Cisco, Sun and Microsoft certifications |
experience. Multilingual capability is a significant plus. For
training we're looking for people who have experience in writing
courseware and developing content. Software development needs are all
over the map... Linux experience with device drivers and kernel
development, web, CGI and Perl, all that stuff! Sales and bizdev people
should have a proven track record. Web content people should know Linux
well and be able to convey their knowledge in taut, compelling prose.
The following managers can be contacted directly about these positions.
Support and Help Desk, [EMAIL PROTECTED]
Education and Training, [EMAIL PROTECTED]
Software Development, [EMAIL PROTECTED]
Sales and Business Development, [EMAIL PROTECTED]
Web Site, [EMAIL PROTECTED]
Our mission is to be the primary enabler of the Open Source revolution.
We encourage and fund Open Source projects both externally and
internally. Benefits include medical, dental, optical, three weeks
vacation, 401K, flexible schedules, a competitive salary package with
stock options and that warm glowing feeling you get when you're doing
the right thing well.
Thanks, Art...
--
Arthur F. Tyde III, CEO
Linuxcare, Inc.
415 505-6135 tel, 415 831-9763 fax
mailto:[EMAIL PROTECTED], http://www.linuxcare.com/
Linuxcare, At the Center of Linux
------------------------------
Date: Wed, 14 Apr 1999 22:23:56 -0700
From: Ken <[EMAIL PROTECTED]>
Subject: Re: a debate between Linux & NT
Crossposted-To: comp.os.linux.advocacy,comp.os.ms-windows.nt.advocacy
You're in the wrong group. I've redirected the followup to
comp.os.linux.advocacy and comp.os.ms-windows.nt.advocacy.
[Respondents: please don't cc replies to me.]
JZ wrote:
>
> I have got a debate betwwen Linux & NT.
> Can somebody tell me what focus of
> linux is better than NT?
> How shall I do? I rise Linux.
--
Ken
mailto:[EMAIL PROTECTED]
http://www.well.com/user/shiva/
------------------------------
** 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
******************************