Re: PATCH: devfs mkIII test review please.

2000-08-27 Thread Poul-Henning Kamp

In message [EMAIL PROTECTED], Boris Popov
 writes:
On Fri, 18 Aug 2000, Poul-Henning Kamp wrote:

 Missing:
 Rename
 Subdirs.
 Close some race conditions using guaranteed atomic operations.
 Mountoption (ro ?) to prevent new devices from appearing in an instance.
 All uses of cdevsw_add() needs to be use devfs_clone() instead.

   How should 3rd party KLDs implement cloning function ? For now it
seems to be impossible to use a single binary for DEVFS and non-DEVFS
case.

Once the code has been shaken out, the cloning stuff will be standard.

Right now I prefer to keep as much as possible under #ifdef DEVFS.

See kern/vfs_conf.c for another good reason (besides KLD) to make
the cloning stuff standard.

--
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | TCP/IP since RFC 956
FreeBSD coreteam member | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: PATCH: devfs mkIII test review please.

2000-08-26 Thread Boris Popov

On Fri, 18 Aug 2000, Poul-Henning Kamp wrote:

 Missing:
 Rename
 Subdirs.
 Close some race conditions using guaranteed atomic operations.
 Mountoption (ro ?) to prevent new devices from appearing in an instance.
 All uses of cdevsw_add() needs to be use devfs_clone() instead.

How should 3rd party KLDs implement cloning function ? For now it
seems to be impossible to use a single binary for DEVFS and non-DEVFS
case.

--
Boris Popov
http://www.butya.kz/~bp/



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: PATCH: devfs mkIII test review please.

2000-08-22 Thread Mark Murray

 They can also be made by the driver using make_dev_alias().

Cool!

Man page please?

M
--
Mark Murray
Join the anti-SPAM movement: http://www.cauce.org


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: PATCH: devfs mkIII test review please.

2000-08-21 Thread Poul-Henning Kamp

In message [EMAIL PROTECTED], Sheldon Hearn writes:


On Sat, 19 Aug 2000 21:26:24 +0200, Poul-Henning Kamp wrote:

 Ahh, right, this is something else than I thought:  These are
 symlinks in the normal case, for instance:
 
  /dev/audio - /dev/audio0

What's the plan for things like these?  Are we going to take the soft
option and teach /etc/rc to create symlinks for device nodes found on
startup and require folks to make the rest themselves?  Or can this be
handled gracefully in the kernel?

DEVFS supports symlinks.

Symlinks can be made from userland with the normal "ln -s"

They can also be made by the driver using make_dev_alias().

Who makes the symlinks and when should be decided by the driver writer.

--
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | TCP/IP since RFC 956
FreeBSD coreteam member | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: PATCH: devfs mkIII test review please.

2000-08-19 Thread Poul-Henning Kamp


Please configure DDB and INVARIANTS in your kernel when you 
use this patch, and send me output from the "trace" command
in DDB when it panics.

Poul-Henning

In message [EMAIL PROTECTED], Robert Drehmel writes:
This is a multi-part message in MIME format.
--CD4992067B057DE3DC660AE0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

In 84513.966631292@critter, Poul-Henning Kamp [EMAIL PROTECTED]
wrote:

 Please look at, test and review:
 
 http://phk.freebsd.dk/patch/devfsIII.patch
[...]

When booting the kernel built from a sys tree patched with
the above patch, i get the following: (dmesg.out is attached)

"""
Mounting root from ufs:/dev/ad0s1a
devfs_mount(mp = 0xc0b2be00)
devfs_mount: root vp = 0xc6f66b00
devfs_statfs(mp = 0xc0b2be00)
devfs_mount: at /dev
cloned ad0s1b - 0xc0b31b80


Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0xe8
fault code  = supervisor write, page not present
instruction pointer = 0x8:0xc024176c
stack pointer   = 0x10:0xc7560e3c
frame pointer   = 0x10:0xc7560e54
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 16 (swapon)
interrupt mask  = none
trap number = 12
panic: page fault
"""

--
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | TCP/IP since RFC 956
FreeBSD coreteam member | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: PATCH: devfs mkIII test review please.

2000-08-19 Thread Poul-Henning Kamp


Ok, I belive this one is fixed now, please try again.

Poul-Henning

In message [EMAIL PROTECTED], Robert Drehmel writes:

In 84513.966631292@critter, Poul-Henning Kamp [EMAIL PROTECTED]
wrote:

 Please look at, test and review:
 
 http://phk.freebsd.dk/patch/devfsIII.patch
[...]

When booting the kernel built from a sys tree patched with
the above patch, i get the following: (dmesg.out is attached)

"""
Mounting root from ufs:/dev/ad0s1a
devfs_mount(mp = 0xc0b2be00)
devfs_mount: root vp = 0xc6f66b00
devfs_statfs(mp = 0xc0b2be00)
devfs_mount: at /dev
cloned ad0s1b - 0xc0b31b80


Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0xe8
fault code  = supervisor write, page not present
instruction pointer = 0x8:0xc024176c
stack pointer   = 0x10:0xc7560e3c
frame pointer   = 0x10:0xc7560e54
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 16 (swapon)
interrupt mask  = none
trap number = 12
panic: page fault
"""

-- 
Robert S. F. Drehmel [EMAIL PROTECTED]

FreeBSD i386 5.0-CURRENT #39: Thu Aug 17 16:57:57 CEST 2000
--
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | TCP/IP since RFC 956
FreeBSD coreteam member | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: PATCH: devfs mkIII test review please.

2000-08-19 Thread Robert Drehmel

In 85506.966672378@critter,
Poul-Henning Kamp [EMAIL PROTECTED] wrote:

 Please configure DDB and INVARIANTS in your kernel when you 
 use this patch, and send me output from the "trace" command
 in DDB when it panics.

"""
Stopped at  i586_bz2+0x2:   fstl0(%edx)

i586_bz2(c0b32b80,3,2000,c65fa440,c7554eb8) at i586_bz2+0x2
spec_open(c7554eb8,c7554ecc,c021d154,c7554eb8,c6f5ad80) at spec_open+0x145
spec_vnoperate(c7554eb8,c6f5ad80,c65fa440,c02cde50,0) at spec_vnoperate+0x15
swapon(c65fa440,c7554f80,8055000,8051cfb,8051c0c) at swapon+0x7b
syscall2(2f,2f,2f,8051c0c,8051cfb) at syscall2+0x166
Xint0x80_syscall() at Xint0x80_syscall+0x25
"""

I also noticed that top and ps are unusable since I first
booted the kernel that was built from the sys tree patched 
with ``devfsIII.patch''.
 
"""
$ top
kvm_open: proc size mismatch (32736 total, 1048 chunks)
top: out of memory
$ ps
ps: proc size mismatch (8448 total, 1048 chunks)
$ 
"""

-- 
Robert S. F. Drehmel [EMAIL PROTECTED]

FreeBSD i386 5.0-CURRENT #43: Sat Aug 19 07:16:51 CEST 2000
^^^^^^^^^^^^^^


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: PATCH: devfs mkIII test review please.

2000-08-19 Thread Poul-Henning Kamp

In message [EMAIL PROTECTED], Robert Drehmel writes:

I also noticed that top and ps are unusable since I first
booted the kernel that was built from the sys tree patched 
with ``devfsIII.patch''.
 
"""
$ top
kvm_open: proc size mismatch (32736 total, 1048 chunks)
top: out of memory
$ ps
ps: proc size mismatch (8448 total, 1048 chunks)
$ 
"""

This is the usual excercise with recompiling libkvm, ps, top and
friends when certain central kernel structures changes size.

--
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | TCP/IP since RFC 956
FreeBSD coreteam member | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: PATCH: devfs mkIII test review please.

2000-08-19 Thread Robert Drehmel

In 86054.966696645@critter, Poul-Henning Kamp wrote:

 Ok, I belive this one is fixed now, please try again.

Yes, it boots.  But when using a kernel with ``options DEVFS'',
there is no /dev/audio or /dev/mouse, for example; devfs has
mounted itself to /dev.

-- 
Robert S. F. Drehmel [EMAIL PROTECTED]

FreeBSD i386 5.0-CURRENT #50: Sat Aug 19 19:08:04 CEST 2000
^^^^^^^^^^^^^^


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: PATCH: devfs mkIII test review please.

2000-08-19 Thread Poul-Henning Kamp

In message [EMAIL PROTECTED], Robert Drehmel writes:
In 86054.966696645@critter, Poul-Henning Kamp wrote:

 Ok, I belive this one is fixed now, please try again.

Yes, it boots.  But when using a kernel with ``options DEVFS'',
there is no /dev/audio or /dev/mouse, for example; devfs has
mounted itself to /dev.

Yes, I expected such issues.  This means that the respective
drivers don't use make_dev() to generate a proper dev_t
for their use.

I will look at thost two drivers tonight, I'm just finishing
the floppy drivers clone() function.

If you want to take a shot at it yourself it's quite simple:
you need to call make_dev() somewhere, typically in *_attach
to generate and name the dev_t for the function.

--
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | TCP/IP since RFC 956
FreeBSD coreteam member | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: PATCH: devfs mkIII test review please.

2000-08-19 Thread Poul-Henning Kamp

In message [EMAIL PROTECTED], Robert Drehmel writes:
In 86054.966696645@critter, Poul-Henning Kamp wrote:

 Ok, I belive this one is fixed now, please try again.

Yes, it boots.  But when using a kernel with ``options DEVFS'',
there is no /dev/audio or /dev/mouse, for example; devfs has
mounted itself to /dev.

Ahh, right, this is something else than I thought:  These are
symlinks in the normal case, for instance:

/dev/audio - /dev/audio0

I have not coded the solution for the automagic for these yet,
for now you can create them by hand using the standard "ln -s ..."
command.

--
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | TCP/IP since RFC 956
FreeBSD coreteam member | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: PATCH: devfs mkIII test review please.

2000-08-18 Thread Robert Drehmel

In 84513.966631292@critter, Poul-Henning Kamp [EMAIL PROTECTED]
wrote:

 Please look at, test and review:
 
 http://phk.freebsd.dk/patch/devfsIII.patch
[...]

When booting the kernel built from a sys tree patched with
the above patch, i get the following: (dmesg.out is attached)

"""
Mounting root from ufs:/dev/ad0s1a
devfs_mount(mp = 0xc0b2be00)
devfs_mount: root vp = 0xc6f66b00
devfs_statfs(mp = 0xc0b2be00)
devfs_mount: at /dev
cloned ad0s1b - 0xc0b31b80


Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0xe8
fault code  = supervisor write, page not present
instruction pointer = 0x8:0xc024176c
stack pointer   = 0x10:0xc7560e3c
frame pointer   = 0x10:0xc7560e54
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 16 (swapon)
interrupt mask  = none
trap number = 12
panic: page fault
"""

-- 
Robert S. F. Drehmel [EMAIL PROTECTED]

FreeBSD i386 5.0-CURRENT #39: Thu Aug 17 16:57:57 CEST 2000
^^^^^^^^^^^^^^

Copyright (c) 1992-2000 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD 5.0-CURRENT #39: Thu Aug 17 16:57:57 CEST 2000
[EMAIL PROTECTED]:/usr/src/sys/compile/GIZMO
Timecounter "i8254"  frequency 1193182 Hz
Timecounter "TSC"  frequency 99967437 Hz
CPU: Pentium/P54C (99.97-MHz 586-class CPU)
  Origin = "GenuineIntel"  Id = 0x525  Stepping = 5
  Features=0x1bfFPU,VME,DE,PSE,TSC,MSR,MCE,CX8
real memory  = 83886080 (81920K bytes)
avail memory = 78176256 (76344K bytes)
Preloaded elf kernel "kernel.old" at 0xc035b000.
Intel Pentium detected, installing workaround for F00F bug
md0: Malloc disk
npx0: math processor on motherboard
npx0: INT 16 interface
pcib0: Host to PCI bridge on motherboard
pci0: PCI bus on pcib0
pci0: Host to PCI bridge (vendor=1060 device=0891) at 0.0
isic0: AVM Fritz!Card PCI port 0xfce0-0xfcff mem 0xfedffc00-0xfedffc1f irq 11 at 
device 12.0 on pci0
isic0: ISAC 2085 Version A1/A2 or 2086/2186 Version 1.1 (IOM-2)
isab0: UMC UM8886 ISA Bridge with EIDE at device 18.0 on pci0
isa0: ISA bus on isab0
pci0: S3 Trio graphics accelerator at 19.0
isa0: unexpected small tag 1
isa0: unexpected small tag 1
isa0: unexpected small tag 1
isa0: unexpected small tag 1
isa0: unexpected small tag 1
isa0: unexpected small tag 1
isa0: unexpected small tag 1
isa0: unexpected small tag 1
isa0: unexpected small tag 1
isa0: unexpected small tag 1
isa0: unexpected small tag 1
isa0: unexpected small tag 1
isa0: unexpected small tag 1
isa0: unexpected small tag 1
isa0: unexpected small tag 1
ata0 at port 0x1f0-0x1f7,0x3f6 irq 14 on isa0
ata1 at port 0x170-0x177,0x376 irq 15 on isa0
atkbdc0: Keyboard controller (i8042) at port 0x60,0x64 on isa0
atkbd0: AT Keyboard irq 1 on atkbdc0
psm0: PS/2 Mouse irq 12 on atkbdc0
psm0: model Generic PS/2 mouse, device ID 0
fdc0: NEC 765 or clone at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
fd0: 1440-KB 3.5" drive on fdc0 drive 0
ppc0: Parallel port at port 0x378-0x37f irq 7 on isa0
ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
plip0: PLIP network interface on ppbus0
ppi0: Parallel I/O on ppbus0
lpt0: Printer on ppbus0
lpt0: Interrupt-driven port
sbc0: ESS 688 at port 0x220-0x22f irq 5 drq 1 on isa0
pcm1: ESS 18xx DSP on sbc0
sc0: System console on isa0
sc0: VGA 16 virtual consoles, flags=0x200
sio0 at port 0x3f8-0x3ff irq 4 on isa0
sio0: type 16550A
vga0: Generic ISA VGA at port 0x3c0-0x3df iomem 0xa-0xb on isa0
unknown: ESS sound card can't assign resources
unknown: 16450 compatible COM device can't assign resources
unknown: Standard LPT printer port can't assign resources
unknown: PNP0700 can't assign resources
unknown: PS/2 Mouse Port can't assign resources
unknown: IBM Enhanced (101/102-key) KC can't assign resources
i4b: ISDN call control device attached
i4btel: 1 ISDN telephony interface device(s) attached
i4brbch: 2 raw B channel access device(s) attached
i4bipr: 1 IP over raw HDLC ISDN device(s) attached (VJ header compression)
i4bctl: ISDN system control port attached
i4btrc: 1 ISDN trace device(s) attached
i4bisppp: 1 ISDN SyncPPP device(s) attached
ad0: 814MB Maxtor 7850 AV [1654/16/63] at ata0-master using BIOSPIO
acd0: CDROM FX001DE at ata1-slave using BIOSPIO
Mounting root from ufs:/dev/ad0s1a