Linux-Development-Sys Digest #686, Volume #7     Fri, 17 Mar 00 20:13:17 EST

Contents:
  SHM and kernel 2.3.5x (Hugh Caley)
  Re: mmap PCI I/O registers ([EMAIL PROTECTED])
  unresolved symbol __divdi3 (Andy Fong)
  Re: Absolute failure of Linux dead ahead? (Pjtg0707)
  BHs in 2.3.X Kernels (Jaspreet Singh)
  Re: where Linux swap when nfs rooted? (Marc SCHAEFER)
  LILO and booting from DiskOnChip ("Mr. Oogie Boogie")
  LILO and booting from DiskOnChip ("Mr. Oogie Boogie")
  Re: unresolved symbol __divdi3 (Nate Eldredge)
  Re: LILO and booting from DiskOnChip (H. Peter Anvin)
  Re: SHM and kernel 2.3.5x (Paul Kimoto)
  Re: Question about syslog() (Juergen Heinzl)
  sysctl from with a LKM (Derek Callaway)
  Re: Kernel timer ("Aurelie Fonteny")
  ����� ������!!! ("Vladimir Vizgalin")
  Re: Linux kernel module on C++ (Kaz Kylheku)
  Re: LILO and booting from DiskOnChip (Andreas Kotes)
  Re: ����� ������!!! (Alexander Viro)
  UDP/RTP header compression ("Aurelie Fonteny")

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

From: Hugh Caley <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: SHM and kernel 2.3.5x
Date: Fri, 17 Mar 2000 08:28:42 -0800

I haven't been able to use development kernel versions 2.3.50 and
higher.  They boot, but when Apache starts I get an error that the shm
filesystem needs to be mounted.  The information in
Documentation/Changes is very sketchy; it simply says that the shm
filesystem needs to be mounted somewhere under /proc and that the
default is /var/shm.  I have no idea what they are talking about ... I
wouldn't bother with the dev kernel anyway except that I am trying to
use my Rio500 with Linux, which requires USB and 2.3.x kernels.

BTW, version 2.3.47 compiles and runs fine (but not with the rio!)

Hugh
[EMAIL PROTECTED]


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

From: [EMAIL PROTECTED]
Subject: Re: mmap PCI I/O registers
Date: Fri, 17 Mar 2000 16:47:37 GMT

I know that memory on PCI boards is configured by the kernel at boot, I
assume that I/O space does not fall into this category.  Since it is a
physical mapping in hardware, I assume that it is impossible to access
(reload) the PCI configuration registers to create a map to the I/O
registers dynamically?


In article <[EMAIL PROTECTED]>,
Alan Donovan <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> >
> > After checking the raw
> > pci_dev value, the base_address of the register bank does have the
LSB
> > bit set (indicating PCI_BASE_ADDRESS_SPACE_IO). It looks like I am
out
> > of luck via mmap() for these registers? I will have to provide
access
> > by implementing ioctl or read/write functions.
>
> Yep.
>
> > There is another set of
> > registers that are double mapped into memory space as well as I/O
space,
> > so these should be accessible via mmap().
>
> Yes -- typically both are available. The definitive Mindshare book on
> PCI says that new cards should offer memory-mapped regs plus
optionally
> regs in IO space, as IO space is densely populated these days, and
also
> some PCI systems don't use IO space.
>
> alan
>
> --
>
========================================================================
> Alan Donovan [EMAIL PROTECTED] http://www.imerge.co.uk
> Imerge Ltd. +44 1223 875265
>


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

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

From: Andy Fong <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: unresolved symbol __divdi3
Date: Fri, 17 Mar 2000 12:14:01 -0500

When I do integer division in my module, I got that error during insmod.
I search through the kernel source code (2.2.12) and that symbol is not 
defined anywhere. I am sure I can do integer divsion in the module because 
I saw it in some of the driver. Is there any special flag I need to add 
in the Makefile? 

I am using RedHat 6.1, the gcc version is:
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)

I have searched the newsgroup but couldn't find anything on this.
Thank you very much for any help.

Andy Fong.


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

From: [EMAIL PROTECTED] (Pjtg0707)
Crossposted-To: comp.os.linux.advocacy
Subject: Re: Absolute failure of Linux dead ahead?
Reply-To: [EMAIL PROTECTED]
Date: Fri, 17 Mar 2000 17:25:37 GMT

On Fri, 17 Mar 2000 14:58:51 GMT, The Ghost In The Machine 
<[EMAIL PROTECTED]> wrote:
>In comp.os.linux.advocacy, Geoff Lane <[EMAIL PROTECTED]>

>Would you rather we rewrite the kernel in Fortran or COBOL? :-)
>

What have you got against Fortran? And why can't you guys get your
acts together and rewrite Linux in Fortran, so I don't have to learn 
any new stuffs anymore? >;-)


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

From: Jaspreet Singh <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development,comp.os.linux.development.apps
Subject: BHs in 2.3.X Kernels
Date: Fri, 17 Mar 2000 12:25:56 -0500

Hi,
I am using 2.3.35 kernel for SA1100 architecture.   I have a device
driver which uses a bottom half.  Use of a BH causes the machine to
freeze. Do BHs behave on a 2.3.35 kernel ?

Regards
Jaspreet Singh

Here is the driver code:

#include <linux/init.h>
#include <linux/proc_fs.h>
#include <linux/sched.h>
#include <linux/poll.h>
#include <asm/io.h>
#include <linux/interrupt.h>


static struct timer_list _testTimer;
static void test_io_timeout( unsigned long );
static void test_bh( void* Buffer );
static void test_init_timer( void );

#define _SDATA        Ser3UTDR

//static int ledval = 0;

static void test_init_timer( void )
{
    init_timer( &_testTimer );
    _testTimer.function = test_io_timeout;
    _testTimer.data =(int) NULL;
    _testTimer.expires = jiffies + ( HZ/100 ); /* expire after 10 ms */
    add_timer( &_testTimer );
}

/*
 * Task queue.
 *
 */
static struct tq_struct test_task = {
    NULL,               /* linked list of active bh's */
    0,                  /* must be initialized to zero */
    NULL,               /* function to call */
    NULL,               /* argument to function */
};


int init_module( void )
{

    test_init_timer();
    return 0;
}

void cleanup_module( void )
{
    del_timer( &_testTimer );
}

static void test_io_timeout( unsigned long ptr)
{
    _SDATA = 'T';
    /*
     * Queue the read task.
     *
     */
    test_task.routine = (void *)&test_bh;
    queue_task( &test_task,&tq_immediate );
    mark_bh(IMMEDIATE_BH);

    test_init_timer();
    return;

}

static void test_bh( void* Buffer )
{
    _SDATA = 'B';
}



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

From: Marc SCHAEFER <[EMAIL PROTECTED]>
Subject: Re: where Linux swap when nfs rooted?
Date: 17 Mar 2000 10:01:23 GMT

Zirong WANG <[EMAIL PROTECTED]> wrote:
: I am just wondering where Linux can swap when my system is rooted
: with NFS.

1.2.x could swap on NFS. Later version can't.

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

From: "Mr. Oogie Boogie" <[EMAIL PROTECTED]>
Subject: LILO and booting from DiskOnChip
Date: Fri, 17 Mar 2000 15:43:29 -0500

Hello All,

Sorry to butt in but I hope this is an appropriate group for my
problem. I have a Mighty Mite carrier board with a DiskOnChip 2000. I
am using the Linux v2.2 drivers from M-Systems with kernel v2.2.13.

Simply, when boot/root is set to the DoC, kernel messages during
bootup *do not* appear over the serial line. Strangely, when a boot
floppy (identical kernel) is used with the DoC as root the kernel
messages *do* appear over the serial line. 
 
Has anyone encountered this problem before?

Do you think this is an error with the DoC or kernel?

Any helpful suggestions on how I can fix this?

Thanks for your time,

Ralph A. Preston
The MITRE Corporation
202 Burlington Road, MS E015
Bedford, MA 01730-1420
Work: 781-271-7914  Fax: 781-271-8875  Cell: 617-257-2695

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

From: "Mr. Oogie Boogie" <[EMAIL PROTECTED]>
Subject: LILO and booting from DiskOnChip
Date: Fri, 17 Mar 2000 15:43:48 -0500

Hello All,

Sorry to butt in but I hope this is an appropriate group for my
problem. I have a Mighty Mite carrier board with a DiskOnChip 2000. I
am using the Linux v2.2 drivers from M-Systems with kernel v2.2.13.

Simply, when boot/root is set to the DoC, kernel messages during
bootup *do not* appear over the serial line. Strangely, when a boot
floppy (identical kernel) is used with the DoC as root the kernel
messages *do* appear over the serial line. 
 
Has anyone encountered this problem before?

Do you think this is an error with the DoC or kernel?

Any helpful suggestions on how I can fix this?

Thanks for your time,

Ralph A. Preston
The MITRE Corporation
202 Burlington Road, MS E015
Bedford, MA 01730-1420
Work: 781-271-7914  Fax: 781-271-8875  Cell: 617-257-2695

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

From: Nate Eldredge <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: unresolved symbol __divdi3
Date: 17 Mar 2000 13:08:10 -0800

Andy Fong <[EMAIL PROTECTED]> writes:

> When I do integer division in my module, I got that error during insmod.
> I search through the kernel source code (2.2.12) and that symbol is not 
> defined anywhere. I am sure I can do integer divsion in the module because 
> I saw it in some of the driver. Is there any special flag I need to add 
> in the Makefile? 
> 
> I am using RedHat 6.1, the gcc version is:
> Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
> gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)

It's an internal function from libgcc.a, which the kernel people
elected not to include in the kernel.  A quick fix is to extract the
necessary .o file from libgcc.a (which lives in your gcc tree) and
link it with your module using ld -r.


-- 

Nate Eldredge
[EMAIL PROTECTED]

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

From: [EMAIL PROTECTED] (H. Peter Anvin)
Subject: Re: LILO and booting from DiskOnChip
Date: 17 Mar 2000 13:18:36 -0800
Reply-To: [EMAIL PROTECTED] (H. Peter Anvin)

Followup to:  <[EMAIL PROTECTED]>
By author:    "Mr. Oogie Boogie" <[EMAIL PROTECTED]>
In newsgroup: comp.os.linux.development.system
>
> Hello All,
> 
> Sorry to butt in but I hope this is an appropriate group for my
> problem. I have a Mighty Mite carrier board with a DiskOnChip 2000. I
> am using the Linux v2.2 drivers from M-Systems with kernel v2.2.13.
> 
> Simply, when boot/root is set to the DoC, kernel messages during
> bootup *do not* appear over the serial line. Strangely, when a boot
> floppy (identical kernel) is used with the DoC as root the kernel
> messages *do* appear over the serial line. 
>  
> Has anyone encountered this problem before?
> 
> Do you think this is an error with the DoC or kernel?
> 

It's due to the extremely hacky nature of the M-systems BIOS
extension.  The latest prerelease of SYSLINUX 1.49 (I haven't had time
to make a formal 1.49 release yet) contains some hacks to make this
work.

        -hpa
-- 
<[EMAIL PROTECTED]> at work, <[EMAIL PROTECTED]> in private!
"Unix gives you enough rope to shoot yourself in the foot."

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

From: [EMAIL PROTECTED] (Paul Kimoto)
Subject: Re: SHM and kernel 2.3.5x
Date: 17 Mar 2000 16:32:12 -0500
Reply-To: [EMAIL PROTECTED]

In article <[EMAIL PROTECTED]>, Hugh Caley wrote:
> I haven't been able to use development kernel versions 2.3.50 and
> higher.  They boot, but when Apache starts I get an error that the shm
> filesystem needs to be mounted.  The information in
> Documentation/Changes is very sketchy; it simply says that the shm
> filesystem needs to be mounted somewhere under /proc and that the
> default is /var/shm.  I have no idea what they are talking about

Frankly, I don't either (although it doesn't matter to me), but
do you know the information printed in this week's Linux Weekly
News?  I mean the section headed "2.3.50 included the new shared
filesystem" in <http://lwn.net/2000/0316/kernel.phtml>.

-- 
Paul Kimoto             <[EMAIL PROTECTED]>

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

From: [EMAIL PROTECTED] (Juergen Heinzl)
Subject: Re: Question about syslog()
Date: Fri, 17 Mar 2000 22:18:55 GMT

In article <8aspmg$d4h$[EMAIL PROTECTED]>, Brian wrote:
> I'm trying to write a message to the system log file. I thought it was
>easy, but just couldn't get it done. Here is the test program:
>
>#include <syslog.h>
>int main(void)
>{
>    syslog(LOG_INFO, "Hello, world\n");
>    return 0;
>}
>
>I've checked the file /etc/syslog.conf, and found the following setting:
>*.info;mail.none;authpriv.none            /var/log/messages
>
>But I just can't find my message in /var/log/messages after I run the
>program. The situation didn't improve if I added openlog() and closelog()
>between syslog(). What have I missed anyway?

Okay in general but you need to call openlog() like ...
openlog( "programme", LOG_PID, LOG_LOCAL0 );
... that.

Ta',
Juergen

-- 
\ Real name     : J�rgen Heinzl                 \       no flames      /
 \ EMail Private : [EMAIL PROTECTED] \ send money instead /

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

From: Derek Callaway <[EMAIL PROTECTED]>
Subject: sysctl from with a LKM
Date: 17 Mar 2000 22:20:16 GMT

I'm using the proc_dir_entry structure in the following fashion:

/* Directory entry */
static struct proc_dir_entry Our_Proc_File =
  {
    0, /* Inode number - ignore, it will be filled by
        * proc_register[_dynamic] */
    18, /* Length of the file name */
    "sys/net/ipv4/stest", /* The file name */
    S_IFREG | S_IRUGO | S_IWUSR,
    /* File mode - this is a regular file which
     * can be read by its owner, its group, and everybody
     * else. Also, its owner can write to it.
     *
     * Actually, this field is just for reference, it's
     * module_permission that does the actual check. It
     * could use this field, but in our implementation it
     * doesn't, for simplicity. */
    1,  /* Number of links (directories where the
         * file is referenced) */
    0, 0,  /* The uid and gid for the file -
            * we give it to root */
    0, /* The size of the file reported by ls. */
    &Inode_Ops_4_Our_Proc_File,
    /* A pointer to the inode structure for
     * the file, if we need it. In our case we
     * do, because we need a write function. */
    NULL
    /* The read function for the file. Irrelevant,
     * because we put it in the inode structure above */
  };

(Note: The above is modified code from the Kernel_Module_Programming
document at http://www.nodevice.com)


When I insert the LKM (which calls proc_register() and everything else, of
course), the file doesn't show up as it's supposed to. It does yield some
odd behavior, though:

[root@white super]# insmod proctest.o
[root@white super]# find /proc -name "stest*"
find: /proc/sys/net/ipv4/stest: No such file or directory
find: /proc/5144/fd: Permission denied
[root@white super]# rmmod proctest
[root@white super]# find /proc -name "stest*"
find: /proc/5144/fd: Permission denied
[root@white super]#

What's going on here? It works fine if I try to put the file in /proc, but
won't work if I try to put it in a subdirectory.

--
/* Derek Callaway <[EMAIL PROTECTED]> : Programmer; CE Net, Inc. -- S@IRC */ 
   char *sites[]={"http://www.freezersearch.com/index.cfm?aff=dhc",
   "http://www.geekwise.com","http://www.homeworkhelp.org",0}; 

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

From: "Aurelie Fonteny" <[EMAIL PROTECTED]>
Subject: Re: Kernel timer
Date: Fri, 17 Mar 2000 16:29:20 -0600

Thanks for your answer. You were right!
Another question you might be able to answer : the scheduling time is going
to be 400ms : can you get this value with linux kernel timer or is it too
small ? Because I'm understanding Hz corresponds to 1second and I saw this
question somewhere else but nobody seem to have answered it?

Aurelie


Kaz Kylheku wrote in message ...
>On Thu, 16 Mar 2000 17:21:20 -0600, Aurelie Fonteny
<[EMAIL PROTECTED]>
>rote:
>>I'm triing to schedule a routine to work when a timer expires in a module.
>>Here is part of my function :
>>I know there is something wrong, so could you please tell me where or
could
>>you please give me another way to simply call a routine when a timer
>>expires? Or if you have any example working for kernel 2.2, this would
help
>>a lot.
>
>Did you forget to delete the timers as part of module shutdown?



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

From: "Vladimir Vizgalin" <[EMAIL PROTECTED]>
Subject: ����� ������!!!
Date: Sat, 18 Mar 2000 01:54:17 +0200

        ������ �����!!!!
� ���� �������� �������� - ���� ���������� � Linux ��� ����������� ��������
�������. ������ �������� ��� ����� �������. ��� ����� �������� api �������
������, �������� ������ �������, ������ ������� � �.�.

    ������� ����������.

    ��������.



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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: Linux kernel module on C++
Reply-To: [EMAIL PROTECTED]
Date: Fri, 17 Mar 2000 23:58:26 GMT

On Fri, 17 Mar 2000 16:27:20 +0200, Vadim Makhervaks <[EMAIL PROTECTED]> wrote:
>Hi,
>
>    Can the linux kernel module be written on C++? I think that it should be
>possible. What compilation and linkage options shall I use to build this
>module?

Avoid the use of exception handling, and wrap kernel header inclusion with
extern "C" { }.

Also, make sure that your init_module and cleanup_module are extern "C"
functions. (To be 100% correct, any calls from the kernel to callbacks within
your module should also be routed to extern "C" functions, but with the
GNU compilers, static class functions and non-member functions work.)

I'm speaking in terms of principles; I haven't tried it! It's possible that
you will run into difficulties, such as header files breaking in the C++
compiler.

-- 
#exclude <windows.h>

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

From: Andreas Kotes <[EMAIL PROTECTED]>
Subject: Re: LILO and booting from DiskOnChip
Date: Sat, 18 Mar 2000 01:23:24 +0100


Hi Ralph,

On Fri, 17 Mar 2000, Mr. Oogie Boogie wrote:

> Simply, when boot/root is set to the DoC, kernel messages during
> bootup *do not* appear over the serial line. Strangely, when a boot
> floppy (identical kernel) is used with the DoC as root the kernel
> messages *do* appear over the serial line. 
>  
> Has anyone encountered this problem before?

yes.

> Do you think this is an error with the DoC or kernel?

neither. the LILO you're using is stripped and doesn't parse any
commandline-parameters you want to pass to the kernel.

> Any helpful suggestions on how I can fix this?

I patched the kernel (just calling the function that is called when a
console=-parameter shows up in the commandline upon kernel init).

Works like a charm.

   Count

P.S: Please fix your From:-Header

-- 
  -= Andreas Kotes - mailto:[EMAIL PROTECTED] - Questions? Just ask =-
 -= Are you doing what you are able to do to support peace on earth? =-
-= Commercial use of my email address NOT allowed. PGP key available. =-



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

From: [EMAIL PROTECTED] (Alexander Viro)
Subject: Re: ����� ������!!!
Date: 17 Mar 2000 19:31:33 -0500

In article <8auga9$bso$[EMAIL PROTECTED]>,
Vladimir Vizgalin <[EMAIL PROTECTED]> wrote:
>        ������ �����!!!!

����������� �� ����������. � ������� ����� � ������� - � ���� '!' ��������.

-- 
"You're one of those condescending Unix computer users!"
"Here's a nickel, kid.  Get yourself a better computer" - Dilbert.

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

From: "Aurelie Fonteny" <[EMAIL PROTECTED]>
Subject: UDP/RTP header compression
Date: Fri, 17 Mar 2000 18:48:27 -0600

Does anyone know if UDP and RTP header compression have already been
implemented on Linux?
If yes, where can I find it?
Thanks

Aurelie



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


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