Commit Graph

91672 Commits

Author SHA1 Message Date
Ian Dowse
318f2fb4bf Add a new mount flag MNT_BYFSID that can be used to unmount a file
system by specifying the file system ID instead of a path. Use this
by default in umount(8). This avoids the need to perform any vnode
operations to look up the mount point, so it makes it possible to
unmount a file system whose root vnode cannot be looked up (e.g.
due to a dead NFS server, or a file system that has become detached
from the hierarchy because an underlying file system was unmounted).
It also provides an unambiguous way to specify which file system is
to be unmunted.

Since the ability to unmount using a path name is retained only for
compatibility, that case now just uses a simple string comparison
of the supplied path against f_mntonname of each mounted file system.

Discussed on:	freebsd-arch
mdoc help from:	ru
2003-07-01 17:40:23 +00:00
David E. O'Brien
9c3f1b326f bfd_elf32_i386_freebsd_vec is the only 32-bit vector we really need.
ar and nm aren't very smart when faced with multiple applicable vectors.
2003-07-01 17:29:48 +00:00
David E. O'Brien
3e1521419b Add elf_i386_fbsd emulation.
Obtained from:	p4
2003-07-01 17:12:55 +00:00
Maxime Henrion
4813f72a9b Honor the boundary of the busdma tag when allocating bounce pages.
This was fixed in revision 1.5 of alpha/alpha/busdma_machdep.c and
was never fixed in other busdma backends using bounce pages.
2003-07-01 16:54:54 +00:00
Scott Long
79501b66a7 Make swi_vm be INTR_MPSAFE. On all platforms, it is only used to activate
busdma_swi().  Now that busdma_swi() uses driver-provided locking, this
should be safe.
2003-07-01 16:00:38 +00:00
Mike Makonnen
745a4a9ef8 Do not attempt to reque a thread on a mutex queue. It may be that
a thread receives a spurious wakeup from sigtimedwait(), so make sure
that the call to the queueing code is called only once before entering
the loop (not in the loop). This should fix some fatal errors people
are seeing with messages stating the thread is already on the mutex queue.
These errors may still be triggered from signal handlers; however, since
that part of the code is not locked down yet.
2003-07-01 15:52:09 +00:00
Scott Long
f6b1c44d1f Mega busdma API commit.
Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg.
Lockfunc allows a driver to provide a function for managing its locking
semantics while using busdma.  At the moment, this is used for the
asynchronous busdma_swi and callback mechanism.  Two lockfunc implementations
are provided: busdma_lock_mutex() performs standard mutex operations on the
mutex that is specified from lockfuncarg.  dftl_lock() is a panic
implementation and is defaulted to when NULL, NULL are passed to
bus_dma_tag_create().  The only time that NULL, NULL should ever be used is
when the driver ensures that bus_dmamap_load() will not be deferred.
Drivers that do not provide their own locking can pass
busdma_lock_mutex,&Giant args in order to preserve the former behaviour.

sparc64 and powerpc do not provide real busdma_swi functions, so this is
largely a noop on those platforms.  The busdma_swi on is64 is not properly
locked yet, so warnings will be emitted on this platform when busdma
callback deferrals happen.

If anyone gets panics or warnings from dflt_lock() being called, please
let me know right away.

Reviewed by:	tmm, gibbs
2003-07-01 15:52:06 +00:00
Ruslan Ermilov
dfebdcdf7c Unbreak "make checkdpadd". 2003-07-01 15:37:35 +00:00
Tony Finch
2fd339446d Improve expression evaluation debugging output, tidy up the handling of
EOF, and improve the commentary about backslash-newline handling.
2003-07-01 15:30:43 +00:00
Maxim Konovalov
8473e4cfc2 o strmode(3) returns void not 0.
PR:		docs/53488
Submitted by:	Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
MFC after:	1 week
2003-07-01 15:28:05 +00:00
Ruslan Ermilov
a51613b6da There's no reason to keep separate AINC knob anymore.
The only real use of it (lib/libc/Makefile) has been
fixed, and if necessary, the contents of AINC should
be added to CFLAGS.

Explained by:	bde
2003-07-01 15:15:45 +00:00
Thomas Moestl
cb33c884cd Add a commented-out entry for OFW_NEWPCI to GENERIC and NOTES, along
with a comment describing it's advantages and the implication of
changing it. While being there, fix a typo in NOTES.

The option is not enabled in NOTES for now since large portions of code
are conditional on it being disabled, too.
2003-07-01 15:13:07 +00:00
Ruslan Ermilov
0b3cbc5c38 Axe AINC.
Submitted by:	bde
2003-07-01 15:07:01 +00:00
Thomas Moestl
1d80cb1b37 Add the new sparc64 OFW PCI framework, conditional on options OFW_NEWPCI
for now. It introduces a OFW PCI bus driver and a generic OFW PCI-PCI
bridge driver. By utilizing these, the PCI handling is much more elegant
now.

The advantages of the new approach are:
- Device enumeration should hopefully be more like on Solaris now,
  so unit numbers should match what's printed on the box more
  closely.
- Real interrupt routing is implemented now, so cardbus bridges
  etc. have at least a chance to work.
- The quirk tables are gone and have been replaced by (hopefully
  sufficient) heuristics.
- Much cleaner code.

There was also a report that previously bogus interrupt assignments
are fixed now, which can be attributed to the new heuristics.

A pitfall, and the reason why this is not the default yet, is that
it changes device enumeration, as mentioned above, which can make
it necessary to change the system configuration if more than one
unit of a device type is present (on a system with two hme cars,
for example, it is possible that hme0 becomes hme1 and vice versa
after enabling the option). Systems with multiple disk controllers
may need to be booted into single user (and require manual specification
of the root file system on boot) to adjust the fstab.
Nevertheless, I would like to encourage users to use this option,
so that it can be made the default soon.

In detail, the changes are:
- Introduce an OFW PCI bus driver; it inherits most methods from the
  generic PCI bus driver, but uses the firmware for enumeration,
  performs additional initialization for devices and firmware-specific
  interrupt routing. It also implements an OFW-specific method to allow
  child devices to get their firmware nodes.
- Introduce an OFW PCI-PCI bridge driver; again, it inherits most
  of the generic PCI-PCI bridge driver; it has it's own method for
  interrupt routing, as well as some sparc64-specific methods (one to
  get the node again, and one to adjust the bridge bus range, since
  we need to reenumerate all PCI buses).
- Convert the apb driver to the new way of handling things.
- Provide a common framework for OFW bridge drivers, used be the two
  drivers above.
- Provide a small common framework for interrupt routing (for all
  bridge types).
- Convert the psycho driver to the new framework; this gets rid of a
  bunch of old kludges in pci_read_config(), and the whole
  preinitialization  (ofw_pci_init()).
- Convert the ISA MD part and the EBus driver to the new way
  interrupts and nodes are handled.
- Introduce types for firmware interrupt properties.
- Rename the old sparcbus_if to ofw_pci_if by repo copy (it is only
  required for PCI), and move it to a more correct location (new
  support methodsx were also added, and an old one was deprecated).
- Fix a bunch of minor bugs, perform some cleanups.

In some cases, I introduced some minor code duplication to keep the
new code clean, in hopes that the old code will be unifdef'ed soon.

Reviewed in part by:	imp
Tested by:	jake, Marius Strobl <marius@alchemy.franken.de>,
		Sergey Mokryshev <mokr@mokr.net>,
		Chris Jackman <cjackNOSPAM@klatsch.org>
Info on u30 firmware provided by:	kris
2003-07-01 14:52:47 +00:00
Ruslan Ermilov
68b4ee7bfa Fixed build.
Noticed by:	bde
2003-07-01 14:46:26 +00:00
Mike Heffner
6d1c16554d Add PnP PS/2 id for Dell Latitude X200.
PR:		48516
MFC after:	2 weeks
2003-07-01 14:41:16 +00:00
Thomas Moestl
5905e65b56 Some gem and hme hardware bogusly has the intpin register hardwired to
0; detect this case and correct it. While being there, clean up nearby
comments.
2003-07-01 14:11:04 +00:00
Thomas Moestl
3920999db7 Add a new PCI interface method, assign_interrupt, to determine the
interrupt to be used for a device. This is intended solely for internal
use of PCI bus implementations, and exists so that PCI bus drivers
implementing special interrupt assignment methods which require
additional work at the bus level to work right can be easily derived
from the generic driver (or any other one) without resorting to hacks.

It will be used in the sparc64 ofw_pcibus driver, which will be
committed shortly.

Make use of this method in the generic implementation, and add it to
the method table of bus drivers derived from the PCI one.

Reviewed by:	imp, -hackers
2003-07-01 14:08:33 +00:00
Ruslan Ermilov
c5c68dcde3 Don't build separate annotate.info, it's already part of gdb.info. 2003-07-01 14:04:08 +00:00
Thomas Moestl
036c2cfbfa Allow to write the intpin ivar using the pci_set_intpin() accessor. There
are some Sun PCI devices around which bogusly set intpin to 0, although
they use the intline mechanism; this allows the device driver to correct
that.

Reviewed by:	imp
2003-07-01 13:54:10 +00:00
Ruslan Ermilov
3cc956548f Put rescue/ into a correct slot in the SUBDIR list. Sort bootstrap-,
build-, and cross-tools lists, reformat lists for easier maintenance.

Submitted by:	bde, ru
2003-07-01 12:57:53 +00:00
Bruce Evans
270f6e44db Fixed some style bugs. 2003-07-01 12:30:03 +00:00
Ruslan Ermilov
a3d6b3e7d7 Only bootstrap crunchide(1) and build crunchgen(1) when necessary.
The latter needs to be built either if it's used as a cross-tool
(${TARGET_ARCH} != ${MACHINE_ARCH}) or if it has backward compat
issues, like e.g. lack of the AMD64 support.
2003-07-01 12:25:11 +00:00
Josef Karthauser
5d37567d73 Regen. 2003-07-01 12:17:18 +00:00
Josef Karthauser
4f1e4d55e7 USB scanner support for Mustek BearPaw scanner.
Submitted by:	netchild
2003-07-01 12:16:46 +00:00
Bruce Evans
f5bdb0f7bd Fixed namespace pollution and unsorting of the 1003.1-1990 list in
previous commit.
2003-07-01 12:09:06 +00:00
Hidetoshi Shimokawa
2c56e6e419 Fix tsleep/wakup race on FreeBSD-4. 2003-07-01 12:03:54 +00:00
Tom Hukins
8b582d6ee0 Add the British hundredweight (brhundredweight). For discussion, see:
http://london.pm.org/pipermail/london.pm/Week-of-Mon-20030630/019926.html
For a definition, see:
http://www.bartleby.com/61/55/H0325500.html

Also add some more computing terms described at:
http://www.wikipedia.org/wiki/Integral_data_type

Reviewed by:	dwmalone
MFC after:	2 weeks
2003-07-01 10:33:27 +00:00
Alfred Perlstein
9470460d7a Don't segfault if setproctitle(3) is called with NULL initially.
The old buffer was not being initialized and a later str*() op on
it would cause a crash if it wasn't initialized by a previous
call to setproctitle(3) with an actual string.

Noticed by: Ashley Penney <ashp@unloved.org>
2003-07-01 09:45:35 +00:00
Josef Karthauser
6b38550512 Regen. 2003-07-01 08:46:55 +00:00
Josef Karthauser
702966f238 Support the Epson GT-9300UF usb scanner.
PR:		kern/53929
2003-07-01 08:46:01 +00:00
Greg Lehey
8517ec8be1 free_drive: Free the drive even if it's referenced. I don't know what
I was smoking when I wrote this stuff, but another fix resulted in
every partition in the system being entered as a "referenced" drive.
2003-07-01 07:53:54 +00:00
Alan Cox
c53e8c5654 Modify vm_page_alloc() and vm_page_select_cache() to allow the page that
is returned by vm_page_select_cache() to belong to the object that is
already locked by the caller to vm_page_alloc().
2003-07-01 07:33:41 +00:00
Alan Cox
8526ce9b64 Check the address provided to vm_map_stack() against the vm map's maximum,
returning an error if the address is too high.
2003-07-01 03:57:25 +00:00
Christian Brueffer
89a14234bd Add the beastie_disable variable which allows to turn the beastie
boot menu on and off.

Reviewed by:	scottl
2003-07-01 01:03:32 +00:00
Ian Dowse
ff1db98495 Separate the description of the flags for mount(2) and unmount(2)
to clarify which system call accepts which arguments. Previously
the manual page gave the impression that calling unmount() with
flags of (MNT_FORCE | MNT_UPDATE | MNT_RDONLY) would downgrade a
read-write mount to read-only, which is clearly untrue; to do that,
these flags should be passed to mount() instead.
2003-06-30 22:22:12 +00:00
Mike Makonnen
3b5ba84fd2 Have mktemp(1) construct the temporary file name for us instead
of providing a template manually.

Submitted by:	Lars Eggert <larse@isi.edu>
2003-06-30 22:06:26 +00:00
Brooks Davis
a83659958b Allow diskless_remount files to contain path beginning with / which will
be mounted relative to the NFS root mountpoint.

Reviewed by:	dillon at backplane.com
MFC After:	3 days
2003-06-30 21:47:06 +00:00
Gordon Tetlow
a3367e4f2e Remove mount_portalfs, it's just wrong in this context. 2003-06-30 21:13:56 +00:00
John-Mark Gurney
094dc7e3b9 move maxsegsz down a bit so that the arg definition order matches the
calling order.
2003-06-30 20:20:51 +00:00
Ruslan Ermilov
fdcdec572a Propagate the ${AINC} knob (assembler include) to sys.mk,
and remove the .S.o transformation rule from bsd.lib.mk.
2003-06-30 20:02:46 +00:00
Ruslan Ermilov
70d9bc066f Removed suffix-transformation rules that are duplicates
(or are subsets) of the corresponding rules in sys.mk.
2003-06-30 19:48:14 +00:00
Ruslan Ermilov
5497021b71 Catch up with bsd.lib.mk,v 1.143. 2003-06-30 19:11:20 +00:00
Ruslan Ermilov
bc80c08e61 bsd.lib.mk,v 1.143 no longer uses ld(1) directly to strip
symbols from intermediate object files, so these hacks to
get AMD64 compile are no longer needed.

Tested on:	sledge.FreeBSD.org
2003-06-30 19:08:49 +00:00
Ruslan Ermilov
ea90b1f55d The use of ld(1) to strip compiler local and non-global
symbols from object files has bitrotted over the last
thirteen years, and it now does more harm than good.

An attempt to work around the problems caused by using
ld(1) for stripping was to pass LDFLAGS to the ld(1)
command, but this was not right either as ${LDFLAGS}
should, by design, be used with cc(1) and not ld(1).

One of the proposed solutions was to use the objcopy(1)
utility to do the strip work, and the other would be to
use strip(1), but Bruce Evans suggested not stripping
any symbols at all.  This works by leaving the grunt
work to the final strip(1) command (when installing the
binary).

Submitted by:	bde
2003-06-30 19:03:56 +00:00
Gordon Tetlow
107e6cda51 Don't build mount_nwfs or mount_smbfs in rescue.
Build fdisk_pc98 on pc98 arch, not fdisk.
Don't alias disklabel on pc98, ia64.
Don't build fdisk on sparc64, alpha.

Pointed out by:	tmm@
Submitted by:	Tim Kientzle <kientzle@acm.org>
2003-06-30 18:18:05 +00:00
Alexander Kabaev
be0d01f895 Rename a local variable in order to avoid collision with standard 'log'
function.
2003-06-30 17:05:40 +00:00
Tom Rhodes
f74dd4e7cc Properly use ld.so.conf and ld-elf.so.conf as discussed in the manual page.
PR:		25527
Submitted by:	Alexey Neyman <alex.neyman@auriga.ru>
Reviewed by:	jdp
2003-06-30 15:02:05 +00:00
Tony Finch
eb801906b8 Various fixes from upstream, including a bug...
Fix the usage synopsis.

Amend the copyright notice to reflect the fact that there's no Berkeley
code left.

Fix a typo in a comment, improve the descriptions of the way we use
some global variables (relevant to the bug below), and note that
division-by-zero has side effects so the current expression evaluator
can't be trivially extended to arithmetic in its current design.

Avoid hitting an abort(); /* bug */ when in "text mode" (i.e.
ignoring comment state) by updating the line parser state properly.

PR:	53907
2003-06-30 14:46:25 +00:00
Ruslan Ermilov
6c874d4fa8 Switch to using bsd.prog.mk; this gives us back the standard
.s.o transformation rule.
2003-06-30 14:10:58 +00:00