Linux-Development-Sys Digest #672, Volume #8     Fri, 27 Apr 01 04:13:12 EDT

Contents:
  Re: portable computation time estimation? (Josef Moellers)
  can remap_page_range() map large amounts of memory (Barry Smyth)
  Re: can remap_page_range() map large amounts of memory (Arne Driescher)
  Re: Promise FastTrack (Stuart Cianos)
  Re: What is gdt's base address in setup when setup gdtr ?? ("Igor Shmukler")
  Re: Realtek 8139b NIC ("Nick Lockyer")
  2.4.3 Kernel build problem ("Cristov")
  Re: Writing a PCI device driver.
  Re: Writing a PCI device driver. (Ronnie Arosa Carril)
  Re: Realtek 8139b NIC ("MrHyde")
  Re: Realtek 8139b NIC ("Cameron Kerr")
  Re: Realtek 8139b NIC ("Jon_H")
  Re: Realtek 8139b NIC ("Ralph Wade Phillips")
  Re: Writing a PCI device driver. (Nic Bellamy)
  Re: Promise FastTrack (Thomas Zajic)
  mount root file system with read-write (lmc83)
  Re: portable computation time estimation? (Tim Roberts)
  Use of RPATH when creating shared libraries (under Linux) (Michael Kerrisk)
  SmartMedia driver under linux (lmc83)

----------------------------------------------------------------------------

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: portable computation time estimation?
Date: Thu, 26 Apr 2001 16:19:50 +0200

Juergen Hannappel wrote:
> =

> NortonNg <[EMAIL PROTECTED]> writes:
> =

> > hi all,
> >
> >        I am a problem in writing portable code about computation time=

> > estaimation at various CPU speed.
> >       If a job can done in 2 second on PIII 733Mhz cpu
> > Can i estimate correctly how long it will take on PIII 900Ghz cpu??
>                                                             ^^^
> If you talk about the factor 900/733 =3D 1.227 in speed the estimation
> 1.6288 seconds should be fairly accurate. If you talk about a factor

I doubt that this simple calculation holds for more than just a small
handfull of processor-pairs. There is more to processor speed than just
clock speed. A certain processor core may need more cycles for a given
calculation than another processor core.
Also the speed of memory accesses cannot simply be ignored: a faster
processor may possibly have to wait (conceptually) longer for data from
memory than a slower processor.

> 1277 which you would get with a 900 Giga-Hertz CPU i would assume that
> it would take longer than 1.6 milliseconds, but probably there will
> never be a 900GHz PIII.

Hmm, you sound like Scott Nudds ... at least you write "probably"! SCNR

-- =

Josef M=F6llers (Pinguinpfleger bei FSC)
        If failure had no penalty success would not be a prize
                                                -- T.  Pratchett

------------------------------

From: Barry Smyth <[EMAIL PROTECTED]>
Subject: can remap_page_range() map large amounts of memory
Date: Thu, 26 Apr 2001 15:24:07 +0100
Reply-To: [EMAIL PROTECTED]

Hi,

I am writing a driver for a PCI card and I intend to map memory
allocated in the driver to the user by implementing the mmap function.
Could anyone tell me if the remap_page_range() function can map areas of
about 1 or 2 MB size and if so how?

It seems that the kmalloc and get_free_pages functions can only allocate
up to 128k and that the vmalloc function does not provide memory that is
contiguous in physical memory. Does the pointer passed to
remap_page_range have to point to memory which is physically contiguous?

I am working with kernal 2.2.17.

Thanks

------------------------------

From: Arne Driescher <[EMAIL PROTECTED]>
Subject: Re: can remap_page_range() map large amounts of memory
Date: Thu, 26 Apr 2001 16:57:30 +0200

Barry Smyth wrote:
> 
> Hi,
> 
> I am writing a driver for a PCI card and I intend to map memory
> allocated in the driver to the user by implementing the mmap function.
> Could anyone tell me if the remap_page_range() function can map areas of
> about 1 or 2 MB size and if so how?
You can do it the same way as you would for io-mem. However, you
have to reserve the pages by setting the PG_reserved bit in
mem_map[MAP_NR(page)].flags for all pages you want to map.


> 
> It seems that the kmalloc and get_free_pages functions can only allocate
> up to 128k and that the vmalloc function does not provide memory that is
> contiguous in physical memory. Does the pointer passed to
> remap_page_range have to point to memory which is physically contiguous?

If your hardware doesn't care about the memory layout you can remap
the pages by implementing a nopage handler. This allows you to map
pages to any order you want.
> 
> I am working with kernal 2.2.17.
> 
> Thanks

-Arne

P.S. Read Rubini Chapter 13 about this topic.

------------------------------

From: [EMAIL PROTECTED] (Stuart Cianos)
Subject: Re: Promise FastTrack
Date: 26 Apr 2001 15:29:49 GMT

I am afraid their drivers are not compatible with the 2.4 kernel, and 
Promise has reported that it may be slow going before they release their new 
driver. Source for their driver is unavailable, which means that we can not 
upgrade our kernel using their cards. This is not a problem with our FreeBSD   
boxes, as the FreeBSD kernel includes support for that card.

- Stu


[EMAIL PROTECTED] (Thomas Zajic) wrote in 
<[EMAIL PROTECTED]>:

>On 26/04/01, Stuart Cianos ([EMAIL PROTECTED]) wrote:
>
>> Would it be feasible to build Promise FastTrack IDE RAID controller
>> support into the kernel by porting the drivers in FreeBSD 4.3 over?
>
>Why? At our office, the FastTrack/66 works fine with the (self-compiled)
>"official" kernel module provided by Promise.
>
>Thomas


------------------------------

From: "Igor Shmukler" <[EMAIL PROTECTED]>
Subject: Re: What is gdt's base address in setup when setup gdtr ??
Date: Thu, 26 Apr 2001 16:05:41 GMT

> In setup ,lgdt will load gdt discripters.
> Its base address is saved in GDTR (48 bit ,limitation of gdt (16bit) +
base address of gdt 932 bits)) which is in i386 .
> In setup.S ,
> ........
> gdt_48:
>
> .word  512+gdt,0x9  !!!!!!what is this means???

I answered you in previous post. Didn't help as it seems though.
Get Intel manuals.




------------------------------

From: "Nick Lockyer" <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux,comp.os.linux.misc
Subject: Re: Realtek 8139b NIC
Date: Thu, 26 Apr 2001 16:55:11 +0100

I saw this happen some time ago.  Turned out that the IRQ that the card
wanted to use was in use (shared?) with another device and that stopped it
working.  Look at /proc/interrupts

MrHyde <[EMAIL PROTECTED]> wrote in message
news:9c8rjc$eu4$[EMAIL PROTECTED]...
> HIi,
>
>  I'm trying to use the rtl8139 driver with a RTL8139B (96394S1 -
9260TAIWAN)
> Chip integrated on a  Cyrix ST-3WT Mainboard, and I've got a problem. The
> driver module is loaded correctly but the NIC doesn't work correctly: it
can
> send packets, but it  doesn't receive. I'm trying with diferent Linux
> distributions (Red-Hat 5.x & 6.x) and with diferent kernel versions
(2.0.x,
> 2.2.x, 2.4.x) and the problem continues. I thought that it was a hardware
> problem of the NIC, but in my last trials I tested this mainboard with
> Win'98 and the NIC works correctly  (!?).
>
>  The manual of the board says that is 802.3 and 802.3u full compatible,
and
>  the pinout of the RJ45 connector is:
>  Pin 1 Transmit output +
>  Pin 2 Transmit output -
>  Pin 3 Receive input +
>  Pin 6 Receive input -
>  Resting pins are not connected.
>
>  Why this card works in Windows and is not working in Linux?? What should
I
>  try?
>
>  Thanks a lot.
>
>  _____________________
>  Oscar Vico
>  SOL services on line, s.a.
>  Serrano Anguita 10, 3 D
>  28004 Madrid - Spain
>  Tel. +34 91 446 7984
>  Fax. +34 91 446 6965
>
>
>
>
>



------------------------------

From: "Cristov" <[EMAIL PROTECTED]>
Subject: 2.4.3 Kernel build problem
Date: Thu, 26 Apr 2001 09:26:58 -0700

Has anybody run into a build problem when trying to compile IPX Networking
into the kernel?

I get this:

net/network.o: undefined reference to 'sysctrl_ipx_pprop_broadcasting'
make: ** [vmlinux] Error 1

Anybody see this yet?  Or have a patch for this?

Chris



------------------------------

From: [EMAIL PROTECTED] ()
Subject: Re: Writing a PCI device driver.
Date: Thu, 26 Apr 2001 17:16:53 -0000

In article <[EMAIL PROTECTED]>,
Ronnie Arosa Carril  <[EMAIL PROTECTED]> wrote:

>If somebody has any device driver source
>code (easy and for a PCI board if it's possible) that can lend me it
>will be fantastic.

What's wrong with all the PCI drivers in the kernel distribution?

--
http://www.spinics.net/linux

------------------------------

From: Ronnie Arosa Carril <[EMAIL PROTECTED]>
Subject: Re: Writing a PCI device driver.
Date: Thu, 26 Apr 2001 19:23:38 +0200

Hi everyone,

I've looked the device driver Robert told me to, but it didn't resolve me any
doubt. It has made myself a mess. For example, in O'Reilly book explains that
operations as open, read... need a strict parameters' match. But what I found
in the device drivers I looked (not only tulip) is that this matching is not so
strict as it seems. Is there something I don't understand? Perhaps I've
misunderstood what I'd read?

Does anybody have some other easier PCI device driver that can lend me?

Thank you




------------------------------

From: "MrHyde" <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux,comp.os.linux.misc
Subject: Re: Realtek 8139b NIC
Date: Thu, 26 Apr 2001 19:24:16 +0200


"Nick Lockyer" <[EMAIL PROTECTED]> escribi� en el mensaje
news:9c9gcu$snv$[EMAIL PROTECTED]...
> I saw this happen some time ago.  Turned out that the IRQ that the card
> wanted to use was in use (shared?) with another device and that stopped it
> working.  Look at /proc/interrupts
>

No it isn't the problem, the interrupts are done. And all appears done, I
thing that is a problem of the driver.

[root@piazza /root]# cat /proc/interrupts
 0:     578776   timer
 1:        184   keyboard
 2:          0   cascade
10:       1332   eth1
12:        398   eth0
13:          0   math error
14:      24349 + ide0

Thanks, anyway


--

_____________________
Oscar Vico
SOL services on line, s.a.
Serrano Anguita 10, 3 D
28004 Madrid - Spain
Tel. +34 91 446 7984
Fax. +34 91 446 6965
[EMAIL PROTECTED]




------------------------------

From: "Cameron Kerr" <[EMAIL PROTECTED]>
Subject: Re: Realtek 8139b NIC
Date: Fri, 27 Apr 2001 08:20:09 +1200

Are you using the 8139too driver? (There is another, but 8139too
is the correct one to use)

-- 
Cameron Kerr -- cameron.kerr @ paradise.net.nz
Praise Slackware, our baud and saviour!
--

------------------------------

Reply-To: "Jon_H" <[EMAIL PROTECTED]>
From: "Jon_H" <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux,comp.os.linux.misc
Subject: Re: Realtek 8139b NIC
Date: Thu, 26 Apr 2001 22:45:50 +0100

what about /cat/ioports
Jon_H

"MrHyde" <[EMAIL PROTECTED]> wrote in message
news:9c9m6n$hoj$[EMAIL PROTECTED]...
>
> "Nick Lockyer" <[EMAIL PROTECTED]> escribi� en el mensaje
> news:9c9gcu$snv$[EMAIL PROTECTED]...
> > I saw this happen some time ago.  Turned out that the IRQ that the card
> > wanted to use was in use (shared?) with another device and that stopped
it
> > working.  Look at /proc/interrupts
> >
>
> No it isn't the problem, the interrupts are done. And all appears done, I
> thing that is a problem of the driver.
>
> [root@piazza /root]# cat /proc/interrupts
>  0:     578776   timer
>  1:        184   keyboard
>  2:          0   cascade
> 10:       1332   eth1
> 12:        398   eth0
> 13:          0   math error
> 14:      24349 + ide0
>
> Thanks, anyway
>
>
> --
>
> _____________________
> Oscar Vico
> SOL services on line, s.a.
> Serrano Anguita 10, 3 D
> 28004 Madrid - Spain
> Tel. +34 91 446 7984
> Fax. +34 91 446 6965
> [EMAIL PROTECTED]
>
>
>



------------------------------

Crossposted-To: alt.os.linux,comp.os.linux.misc
From: "Ralph Wade Phillips" <[EMAIL PROTECTED]>
Subject: Re: Realtek 8139b NIC
Date: Thu, 26 Apr 2001 22:14:28 GMT

Howdy!

MrHyde <[EMAIL PROTECTED]> wrote in message
news:9c9m6n$hoj$[EMAIL PROTECTED]...
>
> No it isn't the problem, the interrupts are done. And all appears done, I
> thing that is a problem of the driver.
>
> [root@piazza /root]# cat /proc/interrupts
>  0:     578776   timer
>  1:        184   keyboard
>  2:          0   cascade
> 10:       1332   eth1
> 12:        398   eth0

        Is IRQ12 (IRQ C?) the one that the Realtek card is on?  IRQ 12 is
used by PS/2 devices, and not all machines release it if there isn't a PS/2
mouse installed.

        Or do you have a PS/2 mouse?  If so, then it's not showing up, but
it IS on IRQ 12.

        Try moving the card to another slot if at all possible.  Or setting
the BIOS to put IRQ 12 on ISA/Non Plug/N/Play.

        RwP





------------------------------

From: Nic Bellamy <[EMAIL PROTECTED]>
Subject: Re: Writing a PCI device driver.
Date: Fri, 27 Apr 2001 10:50:14 +1200

Ronnie Arosa Carril wrote:
> 
> Hi everyone,
> 
> I've looked the device driver Robert told me to, but it didn't resolve me any
> doubt. It has made myself a mess. For example, in O'Reilly book explains that
> operations as open, read... need a strict parameters' match. But what I found
> in the device drivers I looked (not only tulip) is that this matching is not so
> strict as it seems. Is there something I don't understand? Perhaps I've
> misunderstood what I'd read?

Remeber that the current revision of the ORA book is for kernel version
2.0.x - if you're working with 2.2 or 2.4 kernels, some things will have
changed. The definitive reference is the source of the kernel you're
working against - the ORA book will still help you with the concepts
though (this is what I found to be most helpful about it - by the time I
bought it, 2.2 was already available).

Regards,
        Nic.

-- Nic Bellamy <nic at asterisk dot co dot nz>
   IT Consultant, Asterisk Limited - http://www.asterisk.co.nz/

------------------------------

From: [EMAIL PROTECTED] (Thomas Zajic)
Subject: Re: Promise FastTrack
Reply-To: [EMAIL PROTECTED] (Thomas Zajic)
Date: Thu, 26 Apr 2001 23:15:02 GMT

On 26/04/01, Stuart Cianos ([EMAIL PROTECTED]) wrote:

> I am afraid their drivers are not compatible with the 2.4 kernel,
> and Promise has reported that it may be slow going before they
> release their new driver. Source for their driver is unavailable,
> which means that we can not upgrade our kernel using their cards.
> This is not a problem with our FreeBSD boxes, as the FreeBSD kernel
> includes support for that card.

Oh, I see. We're still running 2.2.19 at the office.

Thomas
-- 
=-------------------------------------------------------------------------=
-  Thomas "ZlatkO" Zajic   <[EMAIL PROTECTED]>   Linux-2.2.19/slrn-0.9.7.0a   -
-  "It is not easy to cut through a human head with a hacksaw."  (M. C.)  -
=-------------------------------------------------------------------------=

------------------------------

From: lmc83 <[EMAIL PROTECTED]>
Subject: mount root file system with read-write
Date: Fri, 27 Apr 2001 13:33:05 +0800

hi,
    How to mount a initrd as root file system with read-write?
    I pass kernel parameter with:
        "linux root=/dev/ram0 init=/linuxrc rw"
    but it seems still mounted as read-only,
    what's wrong?

    Liang Ming-Chung

------------------------------

From: Tim Roberts <[EMAIL PROTECTED]>
Subject: Re: portable computation time estimation?
Date: Thu, 26 Apr 2001 23:27:21 -0700

Juergen Hannappel <[EMAIL PROTECTED]> wrote:
>                                                            ^^^
>If you talk about the factor 900/733 = 1.227 in speed the estimation
>1.6288 seconds should be fairly accurate. If you talk about a factor
>1277 which you would get with a 900 Giga-Hertz CPU i would assume that
>it would take longer than 1.6 milliseconds, but probably there will
>never be a 900GHz PIII.

If Moore's law continues to hold, just wait 15 years.

At 900GHz, electrons will take three clock cycles to travel a millimeter.
Two ends of a centimeter-wide chip will be 30 clock cycles off!  That'll
make circuit design a bitch...
--
- Tim Roberts, [EMAIL PROTECTED]
  Providenza & Boekelheide, Inc.

------------------------------

From: [EMAIL PROTECTED] (Michael Kerrisk)
Crossposted-To: comp.unix.programmer
Subject: Use of RPATH when creating shared libraries (under Linux)
Date: Fri, 27 Apr 2001 07:22:00 GMT

Tried this in comp.os.linux.development.apps some days back with no
response, so I'll try posting a little more widely.

Any pointers much appreciated

Cheers

Michael
***************************

I'm doing a little experimenting to see how/if the 
shared library RPATH works when creating shared 
libraries on Linux.  (The following were tested on 
SuSE 6.4, Kernel 2.2.14, glibc 2.1.3)

Essentially, I believe that if I have a shared 
library (libx1.so) which makes use of symbols in 
another shared library (libx2.so), then I should 
not have to mention libx2.so when I compile and 
link a main program which (only) calls a function in libx1
(and this function in turn uses symbols from x2).  
The main program makes no direct references
to symbols in libx2.so.

I have found a way of making this work (shown below), 
but it isn't very clean (I get linker error messages). 
I am guessing there is a better way, and would be 
happy for a pointer on what it is.

Cheers

Michael

******* DEMONSTRATION OF PROBLEM *******

I've collapsed my test down to three sources - two of 
which are used to build separate shared libraries, 
plus a main program:

libx2.so is built using modx2.c and contains the function x2.

libx1.so is built using modx1.c and contains the function x1.  

(Sources of all modules are shown at the end of this note.)

My main program calls function x1() (in libx1.so) and 
x1() in turn calls calls function x2() (in libx2.so), 
and I would like to do things in such a way that I don't 
have to mention libx2.so when building my main program.
(As I recall, this is possible on other Unices).

So I do the following:

$ cc -fPIC -g -c -Wall modx1.c modx2.c
$ gcc -shared -o d2/libx2.so modx2.o
$ gcc -shared -o d1/libx1.so modx1.o -Wl,-rpath,$PWD/d2 -Ld2 -lx2

Using ldd and objdump, I can see that the correct dependency and RPATH
info
is stored in libx1.so:

$ ldd d1/libx1.so 
        libx2.so => /home/mtk/sotest/d2/libx2.so (0x40003000)
        libc.so.6 => /lib/libc.so.6 (0x40009000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

$ objdump --all-headers d1/libx1.so | grep RPATH
  RPATH       /home/mtk/sotest/d2

When I try compiling my main program, I get an error, 
and no executable:

$ cc -Wall -o main main.c -Wl,-rpath,$PWD/d1  -L./d1 -lx1
/usr/i486-suse-linux/bin/ld: warning: libx2.so, needed by
/d1/libx1.so, not found (try using --rpath)
./d1/libx1.so: undefined reference to `x2'
collect2: ld returned 1 exit status
$ ldd main
ldd: ./main: No such file or directory

If I include the -noinhibit-exec linker option, I get a 
correctly functioning executable:

$ cc -Wall -o main main.c -Wl,-noinhibit-exec -Wl,-rpath,$PWD/d1
-L./d1 -lx1
/usr/i486-suse-linux/bin/ld: warning: libx2.so, needed by
/d1/libx1.so, not found (try using --rpath)
./d1/libx1.so: undefined reference to `x2'
$ ldd main
        libx1.so => /home/mtk/sotest/d1/libx1.so (0x40015000)
        libc.so.6 => /lib/libc.so.6 (0x4001b000)
        libx2.so => /home/mtk/sotest/d2/libx2.so (0x400fd000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
$ main
Called x1
Called x2

I would like to achieve the results of the last command, but
without having to use -noinhibit-exec or getting compile/link 
warnings.  How is it done.

Thanks

Michael

********* SOURCE CODE **********

$ cat main.c
/* main.c */

#include <stdlib.h>

void x1(void);

int
main(int argc, char *argv[])
{
    x1();  
    exit(0);
} /* main */

$ cat modx1.c
/* modx1.c */

#include <stdio.h>

void x2(void);

void x1(void) { printf("Called x1\n"); x2(); } 

$ cat modx2.c
/* modx2.c */

#include <stdio.h>

void x2(void) { printf("Called x2\n"); } 



------------------------------

From: lmc83 <[EMAIL PROTECTED]>
Subject: SmartMedia driver under linux
Date: Fri, 27 Apr 2001 14:28:55 +0800

hi,
    Is there any SmartMedia driver under linux ?

    Thanks
    Liang Ming-Chung

------------------------------


** 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 by posting to the
comp.os.linux.development.system newsgroup.

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
******************************

Reply via email to