Linux-Development-Sys Digest #708, Volume #7     Mon, 27 Mar 00 07:13:13 EST

Contents:
  latest 2.3.99-pre3 won't boot on I-OPENER (Bryan)
  Re: libpthread causes segfault ("Rob Eisink")
  Re: libpthread causes segfault (Kaz Kylheku)
  Re: unresolved symbol: kernel_flag (nilesh patel)
  Changing kernel parameters
  Determining HDD Partition Info In Module ([EMAIL PROTECTED])
  Re: UART overrun errors (Mats Byggmastar)
  Re: Windows CE target for GCC? ([EMAIL PROTECTED])
  Re: UART overrun errors (Anders Larsen)
  Re: Zero padding in sprintf() doesn't work for strings - HELP ! (Wolfram Gloger)
  need the source code of fsck (Hasan Jamal)
  Re: ioctl block pthread_create ?? (Mathias Waack)
  Re: UART overrun errors (Etienne Lorrain)
  Re: UART overrun errors (Etienne Lorrain)
  need fsck source code (Hasan Jamal)
  Re: need the source code of fsck (Anders Larsen)
  Re: Linux Serial Port Interrupt Problem (Etienne Lorrain)
  Re: need the source code of fsck (Alan Donovan)
  Re: need fsck source code (Alan Donovan)
  finding out track numbers (Badrinath Venkatachari)
  Re: physical and virtual addresses and ioremap (nilesh patel)

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

From: Bryan <[EMAIL PROTECTED]>
Subject: latest 2.3.99-pre3 won't boot on I-OPENER
Crossposted-To: comp.os.linux.hardware
Date: Mon, 27 Mar 2000 03:24:45 GMT


very very strange...

2.2.13 (from slackware 7.0) boots just fine on the i-opener (winchip
style cpu; not sure if that matters or not).

but when I use lilo to boot 2.3.99-pre3, it just hangs.  lilo doesn't
even get very far, it hangs within 1-2 seconds of printing '...'
(dots).  again, 2.2.13 works just fine: lilo loads to completion and
the kernel/system works.

anyone else have any ideas?  I've rebuilt the kernel (2.3) SO many
times; trying 586 then 486 now I'm even trying 386 (as the cpu type).

note that I'm creating the system on my main desktop system.  I mount
the 2.5" i-opener drive as my main /dev/hda1 and boot from a floppy.
then I run lilo to create the MBR.  then I remove the floppy and
reboot from the notebook drive.  works just fine on my desktop system
(celeron 300a on a BX system).  but when I take that very notebook
drive over to the i-opener, it will STILL only boot 2.2 and not
2.3. ;-(

HELP!!

-- 
Bryan, http://Grateful.Net (ANTISPAM: email is my name at my web's domain)

(c) 2000.  Publishing and/or relaying of this material on all forums other than
USENET implies agreeing to a consultancy fee of US$150 per posting.  You must
obtain a written permit before you publish.  Violators are subject to civil
prosecution for Copyright Infringement as applicable.  Publication by C|NET 
and Microsoft Networks expressly prohibited.

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

From: "Rob Eisink" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: libpthread causes segfault
Date: Mon, 27 Mar 2000 06:22:13 +0200

    Are you sure you've compiled with _THREAD_SAFE? I had the same problem.
Note that STL is _not_ threadsafe.

    Rob



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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: libpthread causes segfault
Reply-To: [EMAIL PROTECTED]
Date: Mon, 27 Mar 2000 04:54:10 GMT

On Sun, 26 Mar 2000 17:59:13 -0800, Michael Dipperstein <[EMAIL PROTECTED]>
wrote:
>If I take my user level test code and the '-lpthread' directive to the
>gcc
>command line, the code fails with a segment fault that results happened
>in
>function errno while trying to handle a printf.

It could be that you forgot -D_REENTRANT. In multithreaded programs, errno is a
thread-specific value. 

To compile multithreaded programs, specify the -pthread option. This adds
-D_REENTRANT and -lpthread to the compiler command line.

>My user level thread code swaps stacks when threads are switched out. 
>Are
>then any restrictions on stack manipulation when the thread library is
>linked in, but none of its functions are called?

Note that the threading library's functions may be called indirectly.  For
example, something as innocuous as putchar() uses pthread_mutex_t locks.

The LinuxThreads library identifies the calling thread by its stack pointer.

There are provisions in the library to set up custom stacks: namely
pthread_attr_setstackaddr() can be used to store a user stack address into a
thread attribute structure and pthread_attr_setstacksize() specifies the size. 

Note: once you use one or more non-standard stacks, LinuxThreads switches to a
rather expensive implementation of thread_self() for all threads. It linearly
searches through all the threads for the one whose stack contains the stack
pointer.

-- 
#exclude <windows.h>

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

From: nilesh patel <[EMAIL PROTECTED]>
Subject: Re: unresolved symbol: kernel_flag
Date: Mon, 27 Mar 2000 11:17:09 +0530


It is not exported .
[EMAIL PROTECTED] wrote:

> Hi.
>
> I'm trying to enhance the stat_systemcall by
> intercepting it via a LKM. Therefore I copied
> the old call from the sources into my module.
> It compiles, but refuses to install via insmod with:
>
> unresolved symbol: kernel_flag.
>
> By the way, I'm compiling with
>
> gcc -O2 -Wall -DMODULE -D__KERNEL__ -DLINUX -D__SMP__ -c syscall.c
>
> Any idea ?
>
> --
> --
>     Regards & Gruesse from Mickey @ http://www.Vanille.de
>   ---------------------------------------------------------
>   How could anyone know me - when I don't even know myself ?


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

From: <[EMAIL PROTECTED]>
Subject: Changing kernel parameters
Date: Mon, 27 Mar 2000 05:30:51 GMT

New to Linux.  How do I change the kernel parameters?  Thanks

--
Posted via CNET Help.com
http://www.help.com/

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

From: [EMAIL PROTECTED]
Subject: Determining HDD Partition Info In Module
Date: Mon, 27 Mar 2000 06:49:18 GMT

I'm developing a loadable kernel module, and need to determine the no.
of partition and partition names of a HDD. Is there any safe way of
doing that?
Right I'm using the info in the structure ide_hwifs, specifically
drive[].part[]. I consider a partition present as long as
drive[].part[].start_sect != 0.
How about the partition names (i.e., hdd1, hdd2, hdd5, etc)? Where can I
find that info?


Sent via Deja.com http://www.deja.com/
Before you buy.

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

From: Mats Byggmastar <[EMAIL PROTECTED]>
Subject: Re: UART overrun errors
Date: Mon, 27 Mar 2000 09:23:57 +0200

Kaz Kylheku wrote:

> The 16550A UART only buys you the ability to transfer several bytes at a time
> rather than using one interrupt for each bytes.
> 
> Ultimately, you still need to use hardware flow control. Are you doing that?

Yes, same problem as with no flow control. Is RTS/CTS flow control actually
controlled by the UART itself? If it was, I would not have these problems.


Mats

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

From: [EMAIL PROTECTED]
Subject: Re: Windows CE target for GCC?
Reply-To: [EMAIL PROTECTED]
Date: Mon, 27 Mar 2000 07:45:51 GMT

Tuomas Airaksinen <[EMAIL PROTECTED]> wrote:
> Thu, 16 Mar 2000 08:08:25 GMT, Tom & Ada Campbell kirjoitti:
>>Is there version of GCC that can output Windows CE executables?
> Can you put Linux on Windows CE-machine???
> I suppose you can't...

Actually you can (http://www.linuxce.org/) but that's not an issue here. Gcc
can produce win32 binaries, so why not CE. It might be possible to do such a
cross compiler out of gcc but you still need CE SDK for headers and
libraries... There even might be a solution available. Cygnuses GNUPro ETS
seems to support many embedded targets
(http://www.redhat.com/services/gnupro/index.html) including MIPS which is
quite common for CE devices. It costs a big pile of money but because it
exists there's a pretty good change to get the gcc part working out of
normal (and free) gcc sources.

Roope

-- 
MicroSoft? is that some kind of a toilet paper?
PS: Look for address here, not from headers. And remove NOSPAM's
___________________________________________________________________________
                 [EMAIL PROTECTED]
     +358 9 812 7567  /  +358 9 511 20585  /  +358 40 750 4480
===========================================================================
       Nokia Networks - Radio Access Systems - Site Solutions

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

From: Anders Larsen <[EMAIL PROTECTED]>
Subject: Re: UART overrun errors
Date: Mon, 27 Mar 2000 08:53:26 +0200

Mats Byggmastar wrote:
> 
> Kaz Kylheku wrote:
> 
> > The 16550A UART only buys you the ability to transfer several bytes at a time
> > rather than using one interrupt for each bytes.
> >
> > Ultimately, you still need to use hardware flow control. Are you doing that?
> 
> Yes, same problem as with no flow control. Is RTS/CTS flow control actually
> controlled by the UART itself? If it was, I would not have these problems.

The 16550C UART can do RTS/CTS flow control in hardware (16550A/B not).
I don't know if the driver makes use of this feature, though.

--
Anders Larsen

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

From: Wolfram Gloger <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Zero padding in sprintf() doesn't work for strings - HELP !
Date: 27 Mar 2000 09:10:17 +0100

Frank T Lofaro <[EMAIL PROTECTED]> writes:

> Or it could actually do a USEFUL behavior, such as pad with zeros.

Sure.

> Just because something is undefined doesn't mean we have to do
> something stupid. (ignoring the flag is stupid, when it is obvious
> what is meant).

First, if it is obvious to a vast majority what is meant by a
construct not yet standardized, and enough people care, the standard
should be changed.

Second, if such a case was changed _now_ in glibc, the surprise would
come with other systems were the flag leads to some other behaviour.
(And those systems most probably can't be changed.)  I've seen far too
many complaints about `Linux-specific' programming, and introducing
this kind of special features would proliferate that sort of
programming unnecessarily.

Regards,
Wolfram.

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

Date: Mon, 27 Mar 2000 16:18:41 +0800
From: Hasan Jamal <[EMAIL PROTECTED]>
Subject: need the source code of fsck

>From [EMAIL PROTECTED]

I need the source code of "fsck", the file system checker under the
/sbin
directory. 
I have searched most of the ftp archives related to linux and did not
find anywhere. 
I got RedHat  & SuSe distribution, in none of them I found.
I would be grateful if anybody can give me the source code or the ftp
site.

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

From: Mathias Waack <[EMAIL PROTECTED]>
Crossposted-To: comp.unix.programmer,comp.unix.questions,comp.unix.solaris
Subject: Re: ioctl block pthread_create ??
Date: Mon, 27 Mar 2000 10:53:01 +0200

Nathan Krasney wrote:
>    * are you suggesting to use PTHREAD_SCOPE_SYSTEM because this will produce bound 
>thread which
>      will guaranty LWP for this created thread ??
>    * are you suggesting to use always PTHREAD_SCOPE_SYSTEM for threads in solaris ?? 
>or in other
>      words when should i use PTHREAD_SCOPE_SYSTEM and when PTHREAD_SCOPE_PROCESS ??

Depends on you're system. If your threads need the OS (ie. do system 
calls or uses hardware resources like different processors), you need 
PTHREAD_SCOPE_SYSTEM. 

>    * is there any documentation about this (bad) behavior of libthread.??

Yes, nearly each book about pthreads describes this, my favorite is 
"Pthreads programming", ISBN 1-56592-115-1. 

Why do you ask question about Solaris in comp.os.linux.*? 
And please don't send me email copies of your postings. 

pls mind the f'up

Mathias

-- 
Mathias Waack           |     [EMAIL PROTECTED]
Tel.:  +49 621 181 2717  Fax.:  +49 621 181 2713

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

From: Etienne Lorrain <[EMAIL PROTECTED]>
Subject: Re: UART overrun errors
Date: Mon, 27 Mar 2000 09:54:39 +0100

Mats Byggmastar wrote:
> Yes, it helps. It helps in the way that I'm becomming more and more
> convinced that Linux is not the correct OS for our application.
> The realtime issues with Linux I've been avare of for a long time
> but it hasn't had any major impact on our product although it is
> a realtime type of application (a GSM protocol analyser/simulator
> for the A and Abis interfaces, E1, 2 Mbit/s).

  Linux is not a RTOS. It can handle some real time tasks, mostly
 when correctly configured (HZ, good hardware so only good drivers
 linked in the kernel) - but if you want 100 % get the next 4.75 ms
 frame - you need external hardware.
  A RTOS is not managing virtual memory because a page fault
 may produce a delay of tens of ms... A RTOS may crash within
 few ms if overloaded, so it is only tested on one or two
 configuration, not on all the PCs whatever the RAM/processor.

> We have managed to
> work around the problems. However, with these serial port problems
> I've had lately I'm becomming very skeptic. We simply have to move
> over to a RTOS.

  You probably need to change the hardware also, the 80x86 is not made
 for hard real time kernels (hardware time to treat an IRQ, slow access
 to I/O space), and whatever kernel you choose, if it access BIOS,
 will disable interrupts for a lot too long. Linux is nearly never
 using BIOS - but for some strange hardware: look what you have
 on your board... Do not forget also to disable power management
 system while you are getting frames.

  My � 0.02
  Etienne.

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

From: Etienne Lorrain <[EMAIL PROTECTED]>
Subject: Re: UART overrun errors
Date: Mon, 27 Mar 2000 10:03:26 +0100

Anders Larsen wrote:
> The 16550C UART can do RTS/CTS flow control in hardware (16550A/B not).
> I don't know if the driver makes use of this feature, though.

  It does make use of it. Also check for 16650 and 16750 and others
 (bigger FIFO) - and PCI boards to not have the ISA delays -
 see file "serial.c"

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

Date: Mon, 27 Mar 2000 17:14:53 +0800
From: Hasan Jamal <[EMAIL PROTECTED]>
Subject: need fsck source code

>From [EMAIL PROTECTED]

I need the source code of "fsck", the file system checker under the
/sbin
directory. 
I have searched most of the ftp archives related to linux and did not
find anywhere. 
I got RedHat  & SuSe distribution, in none of them I found.
I would be grateful if anybody can give me the source code or the ftp
site.

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

From: Anders Larsen <[EMAIL PROTECTED]>
Subject: Re: need the source code of fsck
Date: Mon, 27 Mar 2000 11:15:46 +0200

Hasan Jamal wrote:
> 
> I need the source code of "fsck", the file system checker under the
> /sbin directory.
> I have searched most of the ftp archives related to linux and did not
> find anywhere.
> I got RedHat  & SuSe distribution, in none of them I found.
> I would be grateful if anybody can give me the source code or the ftp
> site.

Both distributions include the source code.
With RedHat, look at e2fsprogs-xxx on the 2.nd (source code) CD

--
Anders Larsen

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

From: Etienne Lorrain <[EMAIL PROTECTED]>
Subject: Re: Linux Serial Port Interrupt Problem
Date: Mon, 27 Mar 2000 10:25:28 +0100

[EMAIL PROTECTED] wrote:
> ...  The
> problem is that when I try to send and receive
> data, my interrupt service routine is never
> called.  I've read the Interrupt Identification
> Register, and verified that there is an interrupt
> pending, but the kernel never calls my interrupt
> routine.
> 
> If anyone out there has seen or heard of this type
> of problem please respond, I've been pulling my
> hair out for a couple of days now.

  Once you have read the IIR, you will no more get a TX
 interrupt because the chip consider it acknowledged (i.e.
 if you have read it _before_ to be interrupted, you loose).
 Take also care of the priority of UART interrupts and
 the order you are treating them.

  In fact, you should really take care of the order
 of reading/writing to UART I/O, and remember: all
 16550 are compatibles, but some 16550 are more
 compatible than others :)

  You may also use the current serial handler...

  My � 0.02,
  Etienne.

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

From: Alan Donovan <[EMAIL PROTECTED]>
Subject: Re: need the source code of fsck
Date: Mon, 27 Mar 2000 10:31:32 +0100

Hasan Jamal wrote:
> 
> From [EMAIL PROTECTED]
> 
> I need the source code of "fsck", the file system checker under the
> /sbin
> directory.
> I have searched most of the ftp archives related to linux and did not
> find anywhere.
> I got RedHat  & SuSe distribution, in none of them I found.
> I would be grateful if anybody can give me the source code or the ftp
> site.

% rpm -qf /sbin/fsck 
e2fsprogs-1.14-4

% rpm -qi e2fsprogs
Name        : e2fsprogs                    Relocations: (not
relocateable)
Version     : 1.14                              Vendor: Red Hat Software
Release     : 4                             Build Date: Sun Mar 21
20:13:05 1999
Install date: Fri Jul  2 18:56:21 1999      Build Host:
porky.devel.redhat.com
Group       : System Environment/Base       Source RPM:
e2fsprogs-1.14-4.src.rpm
Size        : 1161973                          License: GPL
Packager    : Red Hat Software <http://developer.redhat.com/bugzilla/>
Summary     : Utilities used for the second extended (ext2) filesystem.
Description : [...]

% netscape www.rpmfind.net
go to "packages by name", letter E.
download e2fsprogs-1.14-4.src.rpm

% rpm -i e2fsprogs-1.14-4.src.rpm

% ls /usr/src/redhat/SOURCES
e2fsprogs-1.14-4.tgz


RPM is your friend.

alan

========================================================================
  Alan Donovan     [EMAIL PROTECTED]    http://www.imerge.co.uk
  Imerge Ltd.      +44 1223 875265

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

From: Alan Donovan <[EMAIL PROTECTED]>
Subject: Re: need fsck source code
Date: Mon, 27 Mar 2000 10:33:01 +0100

Hasan Jamal wrote:
> 
> From [EMAIL PROTECTED]
> 
> I need the source code of "fsck",

See reply to earlier post.

BTW, this is not a support hotline, so don't repost after only an hour.
You have to be patient if you want a reply. Remember that at any given
time half of the world's Linux users are probably asleep.

alan
 
-- 
========================================================================
  Alan Donovan     [EMAIL PROTECTED]    http://www.imerge.co.uk
  Imerge Ltd.      +44 1223 875265

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

From: Badrinath Venkatachari <[EMAIL PROTECTED]>
Subject: finding out track numbers
Date: Mon, 27 Mar 2000 05:50:41 -0800

Hi,
 Is there (a function or computation) that would permit finding out the
track number and head number on the disk for a given position in a file
? I want to be able to estimate the time to service a given file request
given the present head position. Any ideas on how I can do that ?

thanks and regards
badri


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

From: nilesh patel <[EMAIL PROTECTED]>
Subject: Re: physical and virtual addresses and ioremap
Date: Mon, 27 Mar 2000 17:44:47 +0530

Mathias Waack wrote:

> Hi all,
>
> I've got a question about the address mapping (I'm using kernel 2.2.14).
> Because I've got no device I could play with, I've booted linux with
> the parameter mem=200M.
>
> After that I loaded a kernel module doing the following:
>
> char* virt = ioremap(0xC800000, 0x3800000);
> printk("%lx %lx %lx\n",0xC800000,phys_to_virt(0xC800000),bus_to_virt(0xC800000));

What phys_to_virt does is it adds PAGE_OFFSET to the address which you give.
so whatever you are getting is expected.

How ever what ioremap does is that it finds an empty virtual memory of size  given
above the high_memory. It then writes in the page tables at the virtual memory just
found the  address which you are giving as first argument. It then returns you the
virtual memory address.  So whenever you try to address the virtual memory which was
returned by the ioremap ()  , in the address lines of the CPU will go the address
which is written in the page table that is the one which you passed in the ioremap as
the first argument.

And if the physical address is not valid then you will get faults.
Thats why we call ioremap () for the PCI devices whose memory is mapped high in the
memory .typically 0xf0000000 and above.

Nilesh
printk("%lx %lx %lx\n",virt,virt_to_phys(virt),virt_to_bus(virt);

>
> just to check my understanding. I've got the output:
>
> c800000 cc800000 cc800000
> cd05d000 d05d000 d05d000
>
> The first row is what I expected, but I don't understand the second.
> From my understand the second value of the first row and first value
> of the second row should be the same. And the first value of first row
> and the second value of the second row should also be the same.
>
> After that I've used the addresses from ioremap the mmap this memory
> to the user space:
>
> ptr = virt + some_offset;
> remap_page_range( vma->vm_start, virt_to_phys(virt), some_bytes, vma->page_prot)
>
> This seems to fail, the system becomes instable because the memory seems to become
> corrupted.
>
> So where is my failure?
>
> 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
******************************

Reply via email to