Commit Graph

50048 Commits

Author SHA1 Message Date
davidxu
aa22b44625 Use scheduler api to adjust thread priority. 2004-10-05 09:10:30 +00:00
phk
0654d8c0e2 Use generic tty code instead of local copy.
Also divorce this driver from the sio driver.
2004-10-05 07:42:19 +00:00
imp
ea0652cf81 Yet another case of resources:
+        * 9:   0x3f0-0x3f3,0x3f4-0x3f5,0x3f7

This requires only one change to support.  Rather than keying on the
size of the resource being 2, instead key off the end & 7 being 3.
This covers the same cases that the size of 2 would catch, but also
covers the new above case.

In addition, I think it is clearer to use the end in preference to the
size and start for case #8 as well.  Turns two tests into one, and
catches no other cases.

Make minor commentary changes to deal with new case #9.

# This change is specifically minimal to allow easy MFC.  A more
# extensive change will go into current once I've had a chance to test
# it on a lot of hardware...
2004-10-05 07:18:11 +00:00
takawata
58f5d3f216 Fix unionfs problems when a directory is mounted on other directory
with different file systems. This may cause ill things
with my previous fix. Now it translate fsid of direct child of
mount point directory only.

Pointed out by: Uwe Doering
2004-10-05 05:59:29 +00:00
scottl
6834dc4a7a Remove SWI_CAMNET since it's no longer used. Re-sort SWI priorities in its
absence.
2004-10-05 04:52:41 +00:00
anholt
323579c7f2 Add PCI ID for VIA K8T800Pro chipset. Tested with agptest and X with DRI
enabled, but not 3D.
2004-10-05 04:40:32 +00:00
scottl
018d557a0b Remove the camnet swi and CAM_PERIPH_NET. It has never been used, and given
that netowrk-over-scsi never really took off, there is little chance that
it will ever be needed.
2004-10-05 04:22:20 +00:00
imp
cf32c9fe79 Add taskqueue_drain. This waits for the specified task to finish, if
running, or returns.  The calling program is responsible for making sure
that nothing new is enqueued.

# man page coming soon.
2004-10-05 04:16:01 +00:00
scottl
4a0945bc22 Use a taskqueue rather than an swi to handle deferred notifications. 2004-10-05 04:03:00 +00:00
yar
26afc75c03 Add a more verbose description for `device vlan'
to the above comment block devoted to such descriptions.
2004-10-04 14:16:17 +00:00
yar
8acb0316f8 Hint a kernel builder that vlan needs miibus, which isn't obvious. 2004-10-04 14:06:01 +00:00
phk
bd3b1af9a6 Change the perfectly precise message
printf("No buffers busy after final sync");
to
       printf("All buffers synced.");
in order to not leave the users wondering if there should be.
2004-10-04 13:13:23 +00:00
phk
7c355c0de6 Use tty layer generic code instead of local copy.
Device names {cua,tty}R%r[.init,.lock] clashes with pty(4) driver
and allows for only 32 ports.  This should probably be revisited.
2004-10-04 09:38:53 +00:00
julian
395c906e95 Another case where we need to guard against a partially
constructed process.

Submitted by: Stephan Uphoff ( ups at tree.com	)
MFC after:	3 days
2004-10-04 06:45:48 +00:00
alc
52911b00b3 Undo revision 1.251. This change was a performance pessimizing work-around
that is no longer required.  (In fact, it is not clear that it was ever
required in HEAD or RELENG_4, only RELENG_3 required a work-around.)  Now,
as before revision 1.251, if the preexisting PTE is invalid, pmap_enter()
does not call pmap_invalidate_page() to update the TLB(s).

Note: Even with this change, the handling of a copy-on-write fault is
inefficient, in such cases pmap_enter() calls pmap_invalidate_page() twice.

Discussed with: bde@
PR: kern/16568
2004-10-03 20:14:07 +00:00
julian
96dbdb17db Always strt out with an initilalised ksegrp structure.
MFC after:	3 days
2004-10-03 20:06:11 +00:00
stefanf
2594b3ec4c Use the correct printf specifier.
PR:	47187
2004-10-03 16:34:01 +00:00
stefanf
2168e6b1e4 The macro for the function specifier inline is spelled '__inline'. 2004-10-03 16:12:29 +00:00
stefanf
c9e4308554 Use the correct type for iop_attach(). 2004-10-03 16:06:46 +00:00
davidxu
33faeb8a73 Don't bother to turn off other P_STOPPED bits for SIGKILL, doing
so would cause kernel to produce an unkillable process in some cases,
especially, P_STOPPED_SINGLE has a singling thread, turning off the
bit would mess the state.
2004-10-03 13:23:49 +00:00
sanpei
f86c038b96 Add device ID for atuwi USB wlan driver,
(Atmel at76c503a http://vitsch.net/bsd/atuwi)
	o AINCOMM AWU2000B
	o ATMEL WL1130USB

PR:		kern/72195
Submitted by:	Daan Vreeken [PA4DAN] <Danovitsch@Vitsch.net>
MFC after:	1 week
2004-10-03 09:30:09 +00:00
green
fb8e0f5c56 Prevent reentrancy of the IPv6 routing code (leading to crash with
INVARIANTS on, who knows what with it off).
2004-10-03 00:49:33 +00:00
green
cb606898b9 Add support to IPFW for matching by TCP data length. 2004-10-03 00:47:15 +00:00
green
4f70622005 Add support to IPFW for classification based on "diverted" status
(that is, input via a divert socket).
2004-10-03 00:26:35 +00:00
green
a1ab5f0c7d Add to IPFW the ability to do ALTQ classification/tagging. 2004-10-03 00:17:46 +00:00
alc
c4db706631 The physical address stored in the vm_page is page aligned. There is no
need to mask off the page offset bits.  (This operation made some sense
prior to i386/i386/pmap.c revision 1.254 when we passed a physical address
rather than a vm_page pointer to pmap_enter().)
2004-10-03 00:16:43 +00:00
dwhite
7ac950b117 Disable MTU feedback in IPv6 if the sender writes data that must be fragmented.
Discussed extensively with KAME.  The API author's intent isn't clear at this
point, so rather than remove the code entirely, #if 0 out and put a big
comment in for now. The IPV6_RECVPATHMTU sockopt is available if the
application wants to be notified of the path MTU to optimize packet sizes.

Thanks to JINMEI Tatuya <jinmei@isl.rdc.toshiba.co.jp> for putting up
with my incessant badgering on this issue, and fenner for pointing out
the API issue and suggesting solutions.
2004-10-02 23:45:02 +00:00
green
9f302cddd1 * Use two cdevsw's for ugen(4): one for control endpoints, and one for
data endpoints.  The control endpoint doesn't need read/write/poll
  operations, and more importantly, the thread counts should be
  separate so that the control endpoint can properly reference itself
  while deleting and recreating the data endpoints.
* Add some macros that handle referencing/releasing devices, and use them
  for sleeping/woken-up and open/close operations as apppropriate.
* Use d_purge for FreeBSD, and a loop testing the open status for all
  the endpoints for NetBSD and OpenBSD, so that when the device is
  detached, the right thing always happens.
2004-10-02 22:49:54 +00:00
green
c0dc03c5fc * When toggling short transfers on a bulk transfer endpoint, cancel and
restart the current waiting transfer.  If this isn't done, the device's
  next transfer (that we would like to do a short read on) is going to
  return an error -- for short transfer.
* For bulk transfer endpoints, restore the maximum transfer length each
  time a transfer is done, or the first short transfer will make all the
  rest that size or smaller.
* Remove impossibilities (malloc(M_WAITOK) == NULL, &var == NULL).
2004-10-02 22:33:26 +00:00
le
58075b5ab9 Don't allow to create a drive that already exists. 2004-10-02 20:50:21 +00:00
le
8ff45b1742 Correctly skip the '/dev/' part when creating new drives and prefix
a drive's provider with '/dev/' when printing the config.

Reported by:  will@
2004-10-02 20:12:20 +00:00
phk
955182f9c8 Add #ifdef _KERNEL which allows sicontrol(8) to include this file
from userland to get the debugging definitions.
2004-10-02 18:49:29 +00:00
takawata
2e6eb5bbd1 Fix a problem when you try to mount a directory on another directory
belongs to the same filesystem. In this problem, getcwd(3) will fail.

I found the problem two years ago and I have forgotten to merge.

http://docs.FreeBSD.org/cgi/mid.cgi?200202251435.XAA91094
2004-10-02 17:17:04 +00:00
phk
a199369c05 Use generic device/tty adaptation code.
New device names are "{tty|cua}A$(card)$(port)[.init|.lock]"

Put a portname in the port structure if SI_DEBUG is defined to avoid
need to inspect minor number to construct name..

Constify some strings.

Remove duplicated DBG_ #defines.
2004-10-02 16:56:08 +00:00
pjd
06c0f5f487 Unlock g_gate_list_mtx mutex when we cannot allocate unit number.
MT5 candidate.

PR:		kern/72253
Submitted by:	Ivan Voras <ivoras@fer.hr>
2004-10-02 15:03:26 +00:00
phk
cd175bdd40 Add support for CTS modemsignal as well.
RI does not seem to be supported.
2004-10-02 12:47:30 +00:00
alc
19377ec887 Eliminate unnecessary uses of PHYS_TO_VM_PAGE() from pmap_enter(). These
uses predate the change in the pmap_enter() interface that replaced the
page's physical address by the address of its vm_page structure.  The
PHYS_TO_VM_PAGE() was being used to compute the address of the same vm_page
structure that was being passed in.
2004-10-02 07:34:58 +00:00
alc
de84da4673 Remove an unused declaration. (I should have included this change in
revision 1.486.)
2004-10-02 05:58:32 +00:00
alc
ad2a4ca3e0 Add a SOCKBUF_LOCK() to a rarely executed path in do_sendfile(). 2004-10-02 05:37:47 +00:00
sam
9cd015b873 Remove extraneous SECPOLICY_LOCK_DESTROY calls that cause the mutex to be
destroyed twice.

Submitted by:	Roselyn Lee
2004-10-02 00:19:05 +00:00
ru
3a3e9a66ad Document MD commands. 2004-10-01 19:44:42 +00:00
cognet
d3c9c2ab1a Add optimized version of the bswap macroes for constants if __OPTIMIZED__ is
defined.
2004-10-01 16:55:59 +00:00
cognet
898ea0c226 There's no need to turn on MALLOC_PROFILE by default. 2004-10-01 16:51:37 +00:00
cognet
d91492d389 Don't attempt to profile __udivsi3() and friends, as mcount() uses them. 2004-10-01 16:44:08 +00:00
nyan
3bdfc2d86c Add more PnP serial cards support.
PR:		kern/72226
Submitted by:	Hirokazu WATANABE <wnabe@par.odn.ne.jp>
2004-10-01 15:58:54 +00:00
nyan
05d726664c Fix BIOS default geometry on pc98.
PR:		kern/72225
Submitted by:	Hirokazu WATANABE <wnabe@par.odn.ne.jp>
2004-10-01 15:57:23 +00:00
mux
05b626ea17 Read the MAC address in the EEPROM in the correct byte order. This
is a no-op on little endian architectures, but fixes getting the MAC
address for some dc(4) cards on big endian architectures.

This is a RELENG_5 candidate.

Tested by:	gallatin (powerpc), marius (sparc64)
First version of the patch written by:	gallatin
2004-10-01 15:23:31 +00:00
alfred
0efc91b067 Clear a process's procfs trace points upon delivery of SIGKILL.
MT5 candidate. (Desired features for 5.3-RELEASE "More truss problems")
2004-10-01 14:15:20 +00:00
sos
104924bb06 Always set half'n'half mode on ICH* chips. 2004-10-01 09:06:22 +00:00
sos
a2615e3bda Fix the serverworks modesetting code, of mask offset was wrong. 2004-10-01 09:04:53 +00:00
green
010d0a4ade Add ALTQ support for dc(4), based upon a mostly-working patch from mlaier. 2004-10-01 07:04:09 +00:00
green
d8d12b2198 Conditionalize IFF_NEEDSGIANT, like everything else here, on IS_MPSAFE.
The driver doesn't look any less safe without Giant than with, and works
with IS_MPSAFE set to 1 here, so others should probably test it as such.
2004-10-01 07:01:38 +00:00
phk
2e5b8b9883 Fix a LOR relating to freeing cdevs. 2004-10-01 06:33:39 +00:00
imp
b360d8fe2f assign 187 to ata over ethernet for Sam's ata over ethernet driver.
# Yes, this is the right thing to do: we keep assignments for 4.x here
# to document them, and Sam has a nearly completed driver.
2004-10-01 06:04:24 +00:00
alfred
a72e384f52 cover soreadable and sowriteable with the corresponding socketbuffer locks. 2004-10-01 05:54:06 +00:00
das
c32ecae436 nfsclient/nfs_bio.c has a PHOLD() without a PRELE(). Neither should
be necessary here.  Also, use killproc() instead of psignal().
2004-10-01 05:01:41 +00:00
das
e399d76f1b Avoid calling _PHOLD(p1) with p2's lock held, since _PHOLD()
may block to swap in p1.  Instead, call _PHOLD earlier, at a
point where the only lock held happens to be p1's.
2004-10-01 05:01:29 +00:00
das
9d2cf40e63 Don't PHOLD() the target process in procfs, since this is already done
in pseudofs.  Moreover, PHOLD() may block between the p_candebug()
access check and the actual operation.
2004-10-01 05:01:17 +00:00
das
81fc7cf485 Fix the following race:
1. Process p1 is currently being swapped in.
  2. Process p2 calls linux_ptrace(PTRACE_GETFPXREGS, p1_pid, ...)
  3. After acquiring a reference to FIRST_THREAD_IN_PROC(p1),
     p2 blocks in faultin() while p1 finishes being swapped in.
     This means p2 won't get back the lock on p1 until after p1's
     threads are runnable.
  4. After p1 is swapped in, the first thread in p1 exits.
  5. p2 now uses its dangling reference to p1's first thread.
2004-10-01 05:01:00 +00:00
ru
6131d82787 The "autoboot" command also has a third (optional) parameter. 2004-10-01 00:15:13 +00:00
ru
bad5ef964a Don't give instructions on how to disable ACPI in the MI section.
For novice users, beastie.4th can just do it.  Expert users can
read ACPI instructions by typing "help ACPI".
2004-09-30 21:57:16 +00:00
ru
97d41e4265 Setting "kernel" to an absolute path is a bad idea because
after loading such a kernel, "module_path" will be set to
an insane value.  Fixed example by providing an equivalent
setting.  For the record, when automatically loading a
kernel (commands "boot" and "boot-conf"), the following is
tried, in this order:

	path=/boot/${kernel} file=${bootfile}
	path=/boot/${kernel} file=${kernel}
	path=${kernel} file=${bootfile}
	path=${kernel} file=${kernel}
	path=${module_path} file=${kernel}
2004-09-30 21:48:51 +00:00
sos
e7c7f8c03c Resurrect dump that broke with the last update. 2004-09-30 20:54:59 +00:00
ru
7756db1184 Bring this file more up to date. 2004-09-30 20:02:07 +00:00
ru
73b20fb9b8 Retire now useless userconfig_script_*. 2004-09-30 18:23:35 +00:00
jhb
59af2fcb61 Fix a typo to fix the !DIAGNOSTIC build.
Submitted by:	many
2004-09-30 18:13:18 +00:00
green
3f01e230b4 Validate the action pointer to be within the rule size, so that trying to
add corrupt ipfw rules would not potentially panic the system or worse.
2004-09-30 17:42:00 +00:00
ru
7a16aef8e5 The value of $interpret is "OK", in uppercase. 2004-09-30 17:12:05 +00:00
ru
fb9413f278 Fixed the default value of the $prompt variable, document what
happens if $prompt is unset.
2004-09-30 17:11:26 +00:00
ru
25eaf9d98a Setting dump device from loader(8) has not been supported since 2002. 2004-09-30 15:27:37 +00:00
kensmith
f4c1d5275d This along with v1.6 of counter.c fixes some timecounter issues on
MP machines (hopefully).  CPU timers are OK on UP machines but we
don't keep the timers in sync on MP machines so if the CPU's timer
is chosen as the primary timecounter it's possible for time to
not be monotonically increasing because different CPU's counters
may be used at different times.  But the CPU's counters are otherwise
one of the higher quality counters available.  So, on UP machines
we'll use a relatively high quality value but on MP machines we'll
use a quality that should prevent the CPU's counters from being chosen.

Requested by:	green (who did the first version of the patch)
Reviewed by:	marius, green
MFC after:	1 week
2004-09-30 14:38:59 +00:00
kensmith
c445431dd6 Set the tc_quality field of the struct before calling tc_init(), since
the structure space had been obtained from malloc() its contents is
random garbage.  The choice of value being set is part of a larger effort
to solve some timecounter issues on MP machines (while working on that
we noticed this problem).

Noticed by:	marius
Reviewed by:	marius, green
MFC after:	3 days
2004-09-30 14:30:29 +00:00
ru
e80e866341 The default value of "bootfile" has been "kernel" since 2000. 2004-09-30 14:06:03 +00:00
ru
eac3553eeb Mention "help index" in the online help, and provide a help for
the `?' command.
2004-09-30 13:47:30 +00:00
ru
2c636ec906 Added support for the -D boot option. 2004-09-30 13:11:55 +00:00
ru
ce70f55679 Document boot_cdrom, boot_multicons, and boot_serial.
Reduce diffs between help.common and loader(8).
Mention that boot_userconfig is currently a no-op.
2004-09-30 13:09:00 +00:00
le
ada7c51edc Make it possible to rebuild degraded RAID5 plexes. Note that it is
currently not possible to do this while the volume is mounted.

MFC in:  1 week
2004-09-30 12:57:35 +00:00
ru
b0a3fc4cda `?' is not the same as "help index". 2004-09-30 12:16:23 +00:00
phk
9743317a02 Assign a global unit number for the tty slave devices (init/lock) using
the new subr_unit.c code.

For now assert Giant in ttycreate() and ttyfree().  It is not obvious that
it will ever pay off to lock these with anything else.
2004-09-30 10:38:48 +00:00
alfred
f7d6dfe28f Forward declare struct kaioinfo to un-void a pointer in struct proc. 2004-09-30 09:18:48 +00:00
phk
fbd7b98a6a Add a new API for allocating unit number (-like) resources.
Allocation is always lowest free unit number.

A mixed range/bitmap strategy for maximum memory efficiency.  In
the typical case where no unit numbers are freed total memory usage
is 56 bytes on i386.

malloc is called M_WAITOK but no locking is provided (yet).  A bit of
experience will be necessary to determine the best strategy.  Hopefully
a "caller provides locking" strategy can be maintained, but that may
require use of M_NOWAIT allocation and failure handling.

A userland test driver is included.
2004-09-30 07:04:03 +00:00
peter
0bb82cb8b2 Remove extra */
Submitted by: Manfred Antar <null@pozo.com>
2004-09-30 02:13:42 +00:00
sam
3234aae2af Add missing locking for secpolicy refcnt manipulations.
Submitted by:	Roselyn Lee
2004-09-30 01:08:02 +00:00
rwatson
473ce53fa4 Merge netipsec/key.c:1.17 into KAME pfkey implementation:
date: 2004/09/26 02:01:27;  author: sam;  state: Exp;  lines: +0 -5
  Correct handling of SADB_UPDATE and SADB_ADD requests.  key_align may
  split the mbuf due to use of m_pulldown.  Discarding the result because
  of this does not make sense as no subsequent code depends on the entire
  msg being linearized (only the individual pieces).  It's likely
  something else is wrong here but for now this appears to get things back
  to a working state.

  Submitted by:   Roselyn Lee

This change was also made in the KAME CVS repository as key.c:1.337 by
itojun.
2004-09-30 00:49:55 +00:00
philip
cab5e018dd Introduce a tunable to disable support for Synaptics touchpads. A number of
people have reported problems (stickyness, aiming difficulty) which is proving
difficult to fix, so this will default to disable until sometime after 5.3R.

To enable Synaptics support, set the 'hw.psm.synaptics_support=1' tunable.

MT5 candidate.

Approved by:	njl
2004-09-29 23:49:57 +00:00
kensmith
a831027f1e We seem to have occasions where sending an IPI takes significantly
longer than 'normal'.  The cause is still being tracked down but
in the meantime there are machines where raising IPI_RETRIES does
help - it's not just a case of the machine staying locked up longer
and then panic-ing anyway.  Several helpful folks on sparc64@ tried
a patch that helped figure out what to raise this number to.

Discussed on:	sparc64@
MFC after:	3 days
2004-09-29 21:39:36 +00:00
nectar
611fe940a3 Disallow negative coordinates and sizes in the syscons CONS_SCRSHOT
ioctl.

Reported by:	Christer Oberg <christer.oberg@deprotect.com>
2004-09-29 21:36:07 +00:00
alc
118a3c283b Prevent the unexpected deallocation of a page table page while performing
pmap_copy().  This entails additional locking in pmap_copy() and the
addition of a "flags" parameter to the page table page allocator for
specifying whether it may sleep when memory is unavailable.  (Already,
pmap_copy() checks the availability of memory, aborting if it is scarce.
In theory, another CPU could, however, allocate memory between
pmap_copy()'s check and the call to the page table page allocator,
causing the current thread to release its locks and sleep.  This change
makes this scenario impossible.)

Reviewed by: tegge@
2004-09-29 19:20:40 +00:00
jhb
3793e610ff Only fall back to probing the floppy drives via hints if there is a failure
in the actual _FDE parsing.  If the failure occurs earlier such as in
fdc_attach() then don't try to probe any drives.

MFC after:	3 days
Reviewed by:	njl
Tested by:	Christian Laursen xi at borderworlds dot dk
2004-09-29 19:08:34 +00:00
mlaier
f3ac83fdb2 Fix typeo. Should read ***!***IFQ_DRV_IS_EMPTY.
This might fix some of the trouble around em(4) filling up its buffers.

Submitted by:	mtm
Pointy hat to:	mlaier
MFC after:	2 days
2004-09-29 18:28:28 +00:00
wpaul
098b505763 When opening a pipe, usbd_setup_pipe() will do a usbd_clear_endpoint_stall()
to make sure the pipe is ready. Some devices apparently don't support
the clear stall command however. So what happens when you issue such
devices a clear stall command? Typically, the command just times out.
This, at least, is the behavior I've observed with two devices that
I own: a Rio600 mp3 player and a T-Mobile Sidekick II.

It used to be that after the timeout expired, the pipe open operation
would conclude and you could still access the device, with the only
negative effect being a long delay on open. But in the recent past,
someone added code to make the timeout a fatal error, thereby breaking
the ability to communicate with these devices in any way.

I don't know exactly what the right solution is for this problem:
presumeably there is some way to determine whether or not a device
supports the 'clear stall' command beyond just issuing one and waiting
to see if it times out, but I don't know what that is. So for now,
I've added a special case to the error checking code so that the
timeout is once again non-fatal, thereby letting me use my two
devices again.
2004-09-29 18:12:33 +00:00
green
70acfe3e4f Account for alias devices when tearing them down in destroy_dev() so we
don't panic on a NULL cdev->si_devsw.
2004-09-29 16:38:38 +00:00
wpaul
99be37dba4 Fix minor indentation/formatting nit. (No code changes.) 2004-09-29 15:46:37 +00:00
des
f665f60342 Turn VM_KMEM_SIZE_MAX and VM_KMEM_SIZE_SCALE into tunables.
MFC after:	3 days
2004-09-29 14:21:40 +00:00
ru
581f87750d Fixed exiting from pager using the `q' key while paging
"help index" or "help <topic>" with list of subtopics.
2004-09-29 13:43:55 +00:00
mlaier
b65eae4c19 Add an additional struct inpcb * argument to pfil(9) in order to enable
passing along socket information. This is required to work around a LOR with
the socket code which results in an easy reproducible hard lockup with
debug.mpsafenet=1. This commit does *not* fix the LOR, but enables us to do
so later. The missing piece is to turn the filter locking into a leaf lock
and will follow in a seperate (later) commit.

This will hopefully be MT5'ed in order to fix the problem for RELENG_5 in
forseeable future.

Suggested by:		rwatson
A lot of work by:	csjp (he'd be even more helpful w/o mentor-reviews ;)
Reviewed by:		rwatson, csjp
Tested by:		-pf, -ipfw, LINT, csjp and myself
MFC after:		3 days

LOR IDs:		14 - 17 (not fixed yet)
2004-09-29 04:54:33 +00:00
rwatson
e455dd69f8 Assign so_pcb to NULL rather than 0 as it's a pointer.
Spotted by:	dwhite
2004-09-29 04:01:13 +00:00
peter
52704bafb2 MFi386: rev 1.239 - invalidate tlb after pte update 2004-09-29 01:59:10 +00:00
peter
883b7abe1a MFi386: rev 1.236 - improve panic message for a busted mptable 2004-09-29 01:58:24 +00:00
phk
fd3b3185c9 Use generic infrastructure for the ucom driver instead of local stuff.
This changes the naming of USB serial devices to: /dev/ttyU%d and
/dev/cuaU%d for call-in and call-out devices respectively.  (Please
notice: capital 'U')

Please also note that we now have .init and .lock devices for USB
serial ports.  These are not persistent across device removal.  devd(8)
can be used to configure them on attachment time.

These changes also improve the chances of the system surviving if
the USB device is unplugged at an inconvenient time.  At least we
do not rip things apart while there are any threads in the device
driver anymore.

	Remove cdevsw, rely on the tty generic one.

	Don't make_dev(), use ttycreate() which does all the magic.

	In detach, do close procesing if we ripped things apart
	while the device was open.  Call ttyfree() once we're done
	cleaning up.
2004-09-28 20:23:49 +00:00
phk
f2271ed30b Add -1 to this non-existent use of m_print in the source tree so LINT
compiles again :-)
2004-09-28 20:14:51 +00:00
phk
d08ddc3f6b Add functions to create and free the "tty-ness" of a serial port in a
generic way.  This code will allow a similar amount of code to be
removed from most if not all serial port drivers.

	Add generic cdevsw for tty devices.

	Add generic slave cdevsw for init/lock devices.

	Add ttypurge function which wakes up all know generic sleep
	points in the tty code, and calls into the hw-driver if it
	provides a method.

	Add ttycreate function which creates tty device and optionally
	cua device.  In both cases .init/.lock devices are created
	as well.

	Change ttygone() slightly to also call the hw driver provided
	purge routine.

	Add ttyfree() which will purge and destroy the cdevs.

	Add ttyconsole mode for setting console friendly termios
	on a port.
2004-09-28 19:33:49 +00:00
jmg
0d1f936e78 improve the mbuf m_print function.. Only pull length from pkthdr if there
is one, detect mbuf loops and stop, add an extra arg so you can only print
the first x bytes of the data per mbuf (print all if arg is -1), print
flags using %b (bitmask)...

No code in the tree appears to use m_print, and it's just a maner of adding
-1 as an additional arg to m_print to restore original behavior..

MFC after:	4 days
2004-09-28 18:40:18 +00:00
wpaul
2f2f7359cc Arrgh. Recently I tried using ugen(4) in an application that uses
select(2), and discovered to my horror that ugen(4)'s bulk in/out support
is horribly lobotomized. Bulk transfers are done using the synchronous
API instead of the asynchronous one. This causes the following broken
behavior to occur:

- You open the bulk in/out ugen device and get a descriptor
- You create some other descriptor (socket, other device, etc...)
- You select on both the descriptors waiting until either one has
  data ready to read
- Because of ugen's brokenness, you block in usb_bulk_transfer() inside
  ugen_do_read() instead of blocking in select()
- The non-USB descriptor becomes ready for reading, but you remain blocked
  on select()
- The USB descriptor becomes ready for reading
- Only now are you woken up so that you can ready data from either
  descriptor.

The result is select() can only wake up when there's USB data pending. If
any other descriptor becomes ready, you lose: until the USB descriptor
becomes ready, you stay asleep.

The correct approach is to use async bulk transfers, so I changed
the read code to use the async bulk transfer API. I left the write
side alone for now since it's less of an issue.

Note that the uscanner driver has the same brokenness in it.
2004-09-28 18:39:04 +00:00
jmg
df6cea827e fix jumbo frames as much as they can be fixed for re. We now cap the MTU
to 7422 since it appears that the 8169S can't transmit anything larger..
The 8169S can receive full jumbo frames, but we don't have an mru to let
the upper layers know this...

add fixup so that this driver should work on alignment constrained platforms
(!i386 && !amd64)

MFC after:	5 days
2004-09-28 18:22:24 +00:00
kensmith
0c8b421dcd Add an assertion that the pcb_nsaved field of the pcb be less than
MAXWIN to the register window manipulation functions - rwindow_load()
calls rwindow_save() so this one addition should take care of both.
This should help find places that pcb_nsaved doesn't get initialized
properly.

Suggested by:	jake
2004-09-28 16:36:58 +00:00
cognet
951f5beb42 Calling fuword from fuword32 with bl and without returning after is really a bad
idea.
Any way I get a customized CVS template with "Pointy hat to:	cognet"
pre-filled ?
2004-09-28 14:39:26 +00:00
cognet
cb7bd34192 Always invalidate the whole data cache in pmap_enter() for now.
It should not be needed.
2004-09-28 14:38:14 +00:00
cognet
d35924d404 Remove dead code. 2004-09-28 14:37:39 +00:00
phk
fb7e95019c Remove support for accessing device nodes in UFS/FFS.
Device nodes can still be created and exported with NFS.
2004-09-28 13:30:58 +00:00
phk
dd7446483c Protect the start/end counts on consumers and providers with the up/down
mutexes.

Make it possible to also protect the disk statistics (at a minor cost in
performance) by setting bit 2 of kern.geom.collectstats.
2004-09-28 11:56:37 +00:00
phk
d3ceec948f Remove support for using NFS device nodes. 2004-09-28 08:50:01 +00:00
pjd
5b9c332a3c - Set maximum request size to MAXPHYS (128kB), instead of DFLPHYS (64kB).
- Set minimum request size to sectorsize, instead of 512 bytes.

Approved by:	phk (some time ago)
2004-09-28 08:34:27 +00:00
pjd
63dd0f756b Just use MAXPHYS as maximum I/O request size, instead of using my own
#define for this purpose.
No functional change.
2004-09-28 07:33:37 +00:00
markm
9f0701f21f Be consistant; make the memrange bit be part of the mem module like
i386.
2004-09-28 07:29:54 +00:00
markm
bacab2b870 Add the memrange bits to the loadable module.
MT5 after:	3 days
2004-09-28 07:26:00 +00:00
ps
5c74b9f0fb Add ICH6 support. 2004-09-28 01:32:58 +00:00
pjd
ef6747fa18 Decrease kern.geom.raid3.timeout to 4, so it is smaller than
vfs.root.mountdelay by default.
2004-09-27 22:12:14 +00:00
pjd
25b7bcde0d Deny invalid I/O requests which comes from userland here, because later
we'll get a panic.
MT5 candidate.

Reviewed by:	phk
2004-09-27 22:10:01 +00:00
phk
228c7133a0 Desupport device nodes on EXT2 filesystems. 2004-09-27 20:38:46 +00:00
pjd
34196975cf Avoid race while synchronizing components. It is very hard to bump into,
but it is possible:
1. Read data from good component for synchronization.
2. Write data to the same area.
3. Write synchronization data, which are now stale.

Found by:	tegge (for gmirror)
2004-09-27 20:32:35 +00:00
phk
5c67a82c63 Remove NFS4 vop method vector for devices: we are desupporing device nodes
on anything but DEVFS and in this case it was not even used (see below).

Put the NFS4 vop method for fifo's behind "#if 0" because it is unused.
Add a XXX comment to say that I think the unusedness is a bug.
2004-09-27 20:02:50 +00:00
gallatin
730b32e9d8 Add sc_iostart to softc and unbreak the build.
This was forgotten in my previous commit to add i/o port to uninorth.c

Pointy-hat to: me
2004-09-27 19:51:58 +00:00
phk
46bdd46105 style consistency. 2004-09-27 19:44:39 +00:00
pjd
cad6af1c8f Minor, but very important condition fix. The current one can never be true. 2004-09-27 19:32:26 +00:00
phk
6e31d065d3 Give cluster_write() an explicit vnode argument.
In the future a struct buf will not automatically point out a vnode for us.
2004-09-27 19:14:10 +00:00
kensmith
318de0391d Some minor print/panic message cleanups. 2004-09-27 16:06:38 +00:00
pjd
4081d9d5d1 Decrease kern.geom.mirror.timeout to 4, so it is smaller than
vfs.root.mountdelay by default.
2004-09-27 13:47:37 +00:00
kensmith
2e0cfb5fb7 Initialize the count of saved register windows to 0 in the pcb created
for the new thread.  The rest of the fields in the pcb wind up being
written to before they're read as a normal part of the pcb usage but
this field may be read upon return to userland, having it be uninitialized
garbage is bad.

Submitted by:	Andrew Belashov (bel at orel dot ru)
Reviewed by:	jake
MFC after:	3 days
2004-09-27 12:34:47 +00:00
phk
3234741a00 Used cached cdevsw pointer. 2004-09-27 06:34:30 +00:00
phk
27fb35d0b1 Add cdevsw->d_purge() support.
This device method shall wake up any threads sleeping in the device driver
and make the depart the drivers code for good.
2004-09-27 06:18:25 +00:00
pjd
9b6a1c588a Forgot to commit addition of ds_resync field. 2004-09-26 20:42:35 +00:00
pjd
9871848b34 Avoid race while synchronizing components. It is very hard to bump into,
but it is possible:
1. Read data from good component for synchronization.
2. Write data to the same area.
3. Write synchronization data, which are now stale.

Found by:	tegge
2004-09-26 20:41:07 +00:00
marcel
6b98d570bd ...And fix WITNESS builds: declare syscallnames. 2004-09-26 20:39:56 +00:00
pjd
48183ebbc3 Simplify code a bit. 2004-09-26 20:30:15 +00:00
sos
2fb6fe6a94 Remove the old ATA_*LOCK_CH macros that used atomic ops and use
mutexes instead.
This closes the last (known) race issues in ATA which should fix
the various hangs etc seen on heavy loaded systems.

Change from using timeout functions to using callout functions in
the timeout code. This together with above closes the race that could
happen if timeout and device interrupt occured simultaniously.

Also fix the possible recursion in ata_reinit() on very dodgy
devices that could take us down in the probe.
2004-09-26 11:48:43 +00:00
sos
63d0be9051 Rearrange the order of I/O's in dma-start/stop, some chipsets are very
picky on the order of this, especially in error situations.
2004-09-26 11:42:42 +00:00
johan
57ab183269 style: Move the { back to the else line to match the }.
Discussed with:		glebius
X-MFC after:		5.3-Release
2004-09-26 09:01:02 +00:00
marcel
266d410b93 Fix a bug introduced in the previous commit: kdb_cpu_trap() gets to
the trapframe via kdb_frame, but kdb_frame was not initialized until
after the call to kdb_cpu_trap(). Ergo: kdb_cpu_trap() was moved too
far up.

Pointy hat: marcel
2004-09-26 06:48:59 +00:00
imp
b10a387be5 detach before ivar delete. 2004-09-26 05:51:43 +00:00
sam
806751e928 Correct handling of SADB_UPDATE and SADB_ADD requests. key_align may split
the mbuf due to use of m_pulldown.  Discarding the result because of this
does not make sense as no subsequent code depends on the entire msg being
linearized (only the individual pieces).  It's likely something else is wrong
here but for now this appears to get things back to a working state.

Submitted by:	Roselyn Lee
2004-09-26 02:01:27 +00:00
gallatin
00547b7e7d Add support for i/o-ports. This was cut and pasted from grackle.c 2004-09-26 01:56:20 +00:00
simokawa
fa427e74bd Invalidate dcons buffer on shutdown. 2004-09-26 01:15:38 +00:00
marcel
3fdc820b8b Fix INVARIANTS build: Include <machine/cpu.h>. 2004-09-26 00:38:56 +00:00
phk
0a21e60f7a Use the floppy drive unit number to name the /dev entry, not the
controller unit number.

Submitted by:	Rostislav Krasny <rosti_bsd@yahoo.com>
2004-09-25 08:56:57 +00:00
njl
005025984e Allow routing to the SCI even if it's not in the list of valid IRQs.
MFC if:		no problems
2004-09-25 06:15:56 +00:00
ps
dcc5dc757a Fix the statements for checking if we're dealing with a 5705/5750.
Pointhat to:	me
2004-09-25 05:07:20 +00:00
marcel
883da4df6b Move the IA-32 trap handling from trap() to ia32_trap(). Move the
ia32_syscall() function along with it to ia32_trap.c. When COMPAT_IA32
is not defined, we'll raise SIGEMT instead.
2004-09-25 04:27:44 +00:00
julian
01b7ff330e Use the universal 'threaded process' flag rather than the
specific tests for different threading systems.

MFC after:	1 week
2004-09-25 00:53:46 +00:00
ps
fd095ca48d Add support for the BCM5750/5751. Unfortunately the documentation
I have from Broadcom does not give much information on these devices,
so the Broadcom Linux driver was used for clues to what these chips
support.  It turns out they are similar to the 5705 with the 5751
being the PCI-Express version and needing special work-arounds and
settings.
2004-09-24 22:24:33 +00:00
joerg
618df30241 Few (trailing) whitespace and spelling fixes. 2004-09-24 20:33:52 +00:00
joerg
eba049f8c4 Protect fdc->flags within the worker thread, too.
Use kthread_exit() instead of falling through the end of the worker
thread's main function.  Since kthread_exit() wakeup(9)s everyone
sleeping on the thread handle, drop the superfluous wakeup() call.
2004-09-24 20:28:00 +00:00
jhb
896afb3277 Sort forward declared structures. 2004-09-24 20:27:45 +00:00
jhb
3bd2c1b67b Some more whitespace, style, and comment fixes.
Submitted by:	bde (mostly)
2004-09-24 20:27:04 +00:00
jhb
dcd41a1a0d Add a proc *p pointer for td->td_proc to make this code easier to read. 2004-09-24 20:26:15 +00:00
jhb
11511d9ece Improve the panic message for a busted MP table with conflicting entries
for the same PCI interrupt.

Tested by:	Pavel Gubin pg at ie dot tusur dot ru
MFC after:	3 days
2004-09-24 18:42:54 +00:00
das
2e3453ac22 Don't look for swap blocks in objects that aren't swap-backed.
I expect that this will fix the following panic, reported by Jun:
	swap_pager_isswapped: failed to locate all swap meta blocks

MT5 candidate
2004-09-24 16:04:20 +00:00
phk
0894086aa2 Lock the flags field with the mutex.
Improve a number of comments.
2004-09-24 13:04:49 +00:00
simokawa
1de46e4a15 Sync with DragonFly BSD. 2004-09-24 12:43:57 +00:00
maxim
72a6bed376 o Turn net.inet.ip.check_interface sysctl off by default.
When net.inet.ip.check_interface was MFCed to RELENG_4 3+ years ago in
rev. 1.130.2.17 ip_input.c it was 1 by default but shortly changed to
0 (accidently?) in rev. 1.130.2.20 in RELENG_4 only.  Among with the
fact this knob is not documented it breaks POLA especially in bridge
environment.

OK'ed by:	andre
Reviewed by:	-current
2004-09-24 12:18:40 +00:00
pjd
8d7ed450e1 Document vfs.root.mountdelay value.
Reminded by:	ru
2004-09-24 09:33:48 +00:00
pjd
db95a45215 Rename 'mount_root_delay' tunable to 'vfs.root.mountdelay', which fits
a bit better to our current naming scheme.

Discussed with:	ru
2004-09-24 09:19:03 +00:00
phk
8d623dca9a XXX mark two places where we do not hold a threadcount on the dev when
frobbing the cdevsw.

In both cases we examine only the cdevsw and it is a good question if we
weren't better off copying those properties into the cdev in the first
place.  This question will be revisited.
2004-09-24 08:32:36 +00:00
phk
c67c50f50e Remove the cdevsw() function which is now unused. 2004-09-24 08:30:57 +00:00
phk
6ee26d135f Hold threadcount while throbbing cdevsw in our underlying driver.
This is a bit heavyhanded, and will be simplified once the tty code
learns to properly deal with disappearing hw and drivers.
2004-09-24 08:26:03 +00:00
phk
5dd2cd84fe Hold thread reference while we frob cdevsw. 2004-09-24 08:12:41 +00:00
phk
9f34214d76 Hold proper thread count while frobbing drivers ioctl. 2004-09-24 07:24:02 +00:00
phk
14a7813f86 Hold threadcount reference when we call into the underlying console
driver.
2004-09-24 07:16:56 +00:00
phk
615a2ebb57 Eliminate devsw() call, we are not dereferencing the pointer. 2004-09-24 07:11:02 +00:00
phk
01a7a17373 Remove devsw() call missed in last commit. 2004-09-24 07:08:33 +00:00
phk
f42b730c71 Remove SI_ISDISK, I found a better solution. 2004-09-24 06:55:32 +00:00
phk
54ba36ef3e Assert topology is held in g_dev_getprovider().
Don't call devsw().  It is not necessary, and we do not need to hold dev_lock
to compare the devsw pointer to our own since we do not dereference it.
2004-09-24 06:43:20 +00:00
phk
1a87f07f3c Hold thread reference while frobbing cdevsw. 2004-09-24 06:37:00 +00:00
phk
88cf2bf7b8 Hold threadref while we throb cdevsw in devtoname() 2004-09-24 06:29:23 +00:00
phk
19aa7ffe99 Use vn_isdisk() to check if vnode is a disk.
(repeat, CVS core dumped on me)
2004-09-24 06:23:31 +00:00
phk
d04b40f97c use vn_isdisk() to see if vnode is a disk. 2004-09-24 06:21:43 +00:00
phk
ee853f3efd Hold dev_lock and check for NULL devsw pointer when we service FIODTYPE ioctl. 2004-09-24 06:16:48 +00:00
phk
5536d5757b Hold dev_lock and check for NULL devsw pointer when we determine
if a vnode is a disk.
2004-09-24 06:16:08 +00:00
phk
63c4403fe8 Use dev_re[fl]thread() to maintain a ref on the device driver while
we call the ->d_mmap function.
2004-09-24 05:59:11 +00:00
phk
f76f5a867a Use def_re[fl]thread().
Retire various old compatibility helpers.
2004-09-24 05:58:06 +00:00
phk
18b8697aaa use dev_re[fl]thread() rather than home rolled versions. 2004-09-24 05:55:03 +00:00
phk
7ede6d888c Introduce dev_re[lf]thread() functions.
dev_refthread() will return the cdevsw pointer or NULL.  If the
return value is non-NULL a threadcount is held which much be released
with dev_relthread().  If the returned cdevsw is NULL no threadcount
is held on the device.
2004-09-24 05:54:32 +00:00
marcel
d0d010090d Remove. This file was repocopied to ../ski. 2004-09-24 04:49:32 +00:00
marcel
ff6d580efc Replace misuse of NULL with 0UL. 2004-09-24 04:40:28 +00:00
marcel
9048fc74e0 Remove the dependency on the Intel EFI headers in sys/boot/efi. Instead
use <machine/efi.h> for the necessary definitions. This makes the EFI
code in sys/boot/efi totally unused, except for pure EFI loaders. As
such, maintenance and porting (to IA-32) of the EFI code is made as easy
as possible.
2004-09-24 04:35:07 +00:00
marcel
0839086aea Unhook libski and skiload and hook up ski. 2004-09-24 04:21:14 +00:00
marcel
2f0d974661 Post repocopy build fixes. 2004-09-24 04:06:22 +00:00
peter
37b8ce6a5c Implement the KDENABIO etc ioctl's for amd64 as well. 2004-09-24 01:19:11 +00:00
peter
81d75f50e2 Implement the syscons mouse pointer characters for amd64. It was only
implemented for i386 and alpha.
2004-09-24 01:18:22 +00:00
peter
56d687195a Like on i386, use the definition of struct bios_smap from machine/pc/bios.h
again.
2004-09-24 01:11:11 +00:00
peter
04c2ef2193 Converge towards i386. I originally resisted creating <machine/pc/bios.h>
because it was mostly irrelevant - except for the silly BIOS_PADDRTOVADDR
etc macros.  Along the way of working around this, I missed a few things.

* Make syscons properly inherit the bios capslock/shiftlock/etc state like
  i386 does.  Note that we cannot inherit the bios key repeat rate because
  that requires a bios call (which is impossible for us).
* Give syscons the ability to beep on amd64.  Oops.

While here, make bios.c compile and add it to files.amd64.
2004-09-24 01:08:34 +00:00
peter
09b56c9832 Severely strip down the repocopied i386/bios.c and bios.h files. It turns
out that bios_sigsearch() etc is useful for finding tables in roms.
2004-09-24 00:42:36 +00:00
jhb
7b666b4137 A modest collection of various and sundry style, spelling, and whitespace
fixes.

Submitted by:	bde (mostly)
2004-09-24 00:38:15 +00:00
cognet
49654e152d On arm, set the default elf brand to FreeBSD, until the binutils do it for us. 2004-09-23 23:29:24 +00:00
cognet
cf9927973e Re-route interrupts on arm as well. 2004-09-23 22:58:43 +00:00
cognet
c808645c91 Do not use the IO-mapping to issue the reset on the 82546 on arm. For some
reason, it results in corrupted descriptors.
2004-09-23 22:57:53 +00:00
cognet
470dcc3395 Add the config file for the IQ31244 board. 2004-09-23 22:55:00 +00:00
cognet
c3401d9028 Use the new KERNVIRTADDR and PHYSADDR options.
Add KDB.
2004-09-23 22:53:50 +00:00
cognet
6f8e60c5c8 Use -O2 for the arm kernel as well 2004-09-23 22:53:22 +00:00
cognet
984cda6c97 Use the address provided in the conf file, instead of hardcode 0xc0000000. 2004-09-23 22:52:55 +00:00
cognet
c04b68fd28 Add new options :
PHYSADDR : Address of the physical memory
KERNPHYSADDR : Physical address where the kernel starts
KERNVIRTADDR : Virtual address of the kernel
STARTUP_PAGETABLE_ADDR : Where to put the page table at bootstrap
+ Xscale specific options
2004-09-23 22:52:25 +00:00
cognet
e4b4e75d89 Add the possibility to specify the kernel virtual address and the kernel
physical address in the kernel config file, as it varies from CPU to CPU.
2004-09-23 22:47:57 +00:00
cognet
a5a4c2b9b8 Import partial support for the IQ31244 eval board (i80321 CPU). IQ80321 might
work out of the box too, but I have no hardware to test.
It works well enough to go multiuser. Network works, SATA does not, as I have
no drive to test.
Thanks to Intel for sending such a board.

Obtained from:  NetBSD
2004-09-23 22:45:36 +00:00
cognet
b43de02af0 Add Xscale common headers. 2004-09-23 22:36:13 +00:00
cognet
2722789043 Big cleanup: get ride of the whole spl level logic, as FreeBSD doesn't use
it anymore.
2004-09-23 22:33:38 +00:00
cognet
89fa389a22 Now that we have pmap_growkernel(), use more KVA. 2004-09-23 22:32:33 +00:00
cognet
f7c7e8938b Remove the empty definition of struct osigcontext, as it will never be used. 2004-09-23 22:31:49 +00:00
cognet
9fbf5b30d2 Remove the pcb32_cstate field of struct pcb. 2004-09-23 22:31:08 +00:00
cognet
320e303913 Declare sigcode and szsigcode. 2004-09-23 22:30:05 +00:00
cognet
eb21c958c3 Define VM_PROT_READ_IS_EXEC. 2004-09-23 22:29:43 +00:00
cognet
23f2e2a20b Implement _mcount().
Obtained from:	NetBSD
2004-09-23 22:29:18 +00:00
cognet
bce0b28077 Define STACKALIGNBYTES and STACKALIGN. 2004-09-23 22:27:42 +00:00
cognet
6198d361e4 We are using _mcount, not __mcount.
Remove the !__ELF__ case.
2004-09-23 22:26:29 +00:00
cognet
2af9e90e11 Use sf_bufs for uiomove_fromphys(). 2004-09-23 22:25:20 +00:00
cognet
83a28a9eaa On Xscale, use the minicache for the kernel stack. 2004-09-23 22:24:12 +00:00
cognet
4ad93571b6 Make sure to call cred_update_thread() if needed.
Add partial support for KTRACE.
2004-09-23 22:22:33 +00:00
cognet
8fdb656bd1 Implement cpu_throw().
Obtained from:	NetBSD
2004-09-23 22:20:59 +00:00
cognet
e82635c318 Remove unused macroes.
Add user, btrap, etrap, bintr and eintrt in the GPROF case.
2004-09-23 22:18:56 +00:00
cognet
556153cd0c Implement sigreturn(). 2004-09-23 22:12:28 +00:00
cognet
2961849c00 Add the hw.machine sysctl. 2004-09-23 22:11:43 +00:00
cognet
69c5f6a5d4 Remove definitions related to the pmap cache state, and add TDF_NEEDRESCHED. 2004-09-23 22:11:06 +00:00
cognet
f0ee02d552 Add new functions to know which irqs are pending, and to mask and unmask
interrupts, as these are CPU specific.
If the interrupt handler is not marked as INTR_FAST, don't unmask the
interrupt until it as been serviced.
2004-09-23 22:09:57 +00:00
cognet
8cbf7c308c Rename macroes, as we don't need to mess with alignment faults.
Call ast() if TDF_NEEDRESCHED is set too, not just TDF_ASTPENDING.
2004-09-23 22:05:40 +00:00
cognet
f772c01a4d Use sigcode. 2004-09-23 22:03:25 +00:00
cognet
ee071a6682 In db_stack_trace_cmd, remove the "pc" variable, we don't need it. 2004-09-23 22:02:59 +00:00
cognet
70f2c961dd Use the right path for xscale files. 2004-09-23 21:59:43 +00:00
cognet
fa3fe38872 Remove bus_space_vaddr(), it does not exists in FreeBSD. 2004-09-23 21:59:14 +00:00
cognet
e0185957e6 Don't attempt to manage our own segment list, and just remember the buffers
provided.

Obtained from:	NetBSD
2004-09-23 21:57:47 +00:00
cognet
89eb78d1e9 Use the right path for the bcopyinout_xscale.S file. 2004-09-23 21:56:36 +00:00
cognet
7dea985306 Add MD syscalls to sync the icache and to drain the write buffer.
Obtained from:	NetBSD
2004-09-23 21:56:01 +00:00
cognet
639630ead7 Implement pmap_growkernel() and pmap_extract_and_hold().
Remove the cache state logic : right now, it provides more problems than it
helps.
Add helper functions for mapping devices while bootstrapping.
Reorganize the code a bit, and remove dead code.

Obtained from:	NetBSD (partially)
2004-09-23 21:54:25 +00:00
cognet
2f13c81a30 Map the kernel very early if needed.
Implement sigcode.
2004-09-23 21:49:10 +00:00
joerg
f2a11c9f2e Implement terminating the worker thread when the driver is about to
be deregistered.

Not yet tested, since by now, GEOM doesn't want us to deregister.  PHK
wants to fix that RSN.
2004-09-23 21:12:21 +00:00
jhb
e7c39452fd Add locking notes on the members of rusage. Note that these notes reflect
what is already present in the tree and apply to the rusage struct for
current process usage rather than child process usage.
2004-09-23 21:08:14 +00:00
jhb
08cbc59f16 Update locking notes on several fields to reflect locking already in the
tree:
- td_standin is (k + a) as it is only touched by either curthread or when
  a thread is being created.
- td_upcall is (k + j)
- td_sticks is (k) rather than the earlier (j) note.
- td_uuticks and td_usticks are both (k).
- td_intrval is (j)
- Neither kg_nextupcall or kg_upquantum seem to be locked and that seems
  to be on purpose, so mark those as (n).
2004-09-23 21:07:13 +00:00
jhb
d0df115aaa Don't try to protect td_sticks with sched_lock. It doesn't need it as it
is only accessed by curthread.
2004-09-23 21:03:58 +00:00
jhb
f6dc0c3d5f - Assert sched_lock in upcall_remove() since it is needed there and all
callers already lock it there.
- Lock sched_lock slightly earlier in kse_create() so that it covers
  kg_numupcalls.
2004-09-23 21:03:16 +00:00
jhb
1f2758a712 - Don't try to unlock Giant if single threading fails since we don't have
it locked.
- Unlock Giant before calling exit1() since exit1() does not require Giant.
2004-09-23 21:01:50 +00:00
marcel
6834d51c5f Redefine a PTE as a 64-bit integral type instead of a struct of
bit-fields. Unify the PTE defines accordingly and update all
uses.
2004-09-23 18:37:36 +00:00
stefanf
fc52c1f7c1 Prefer C99's __func__ over GCC's __FUNCTION__.
Approved by:	alfred
2004-09-23 18:25:46 +00:00
phk
eb5eea42df Split the ioctl function in control and slave side, this eliminated
a troublesome devsw() call.
2004-09-23 16:13:46 +00:00
rik
0ad253ffc7 Invalidate cache after changing pte entry.
Discussed with:	jhp and njl
MFC after:	5 days
2004-09-23 16:06:27 +00:00
phk
1d992e18ec Eliminate DEV_STRATEGY() macro: call dev_strategy() directly.
Make dev_strategy() handle errors and departing devices properly.
2004-09-23 14:45:04 +00:00
mlaier
83e80bafba Protect sockaddr_union definitions with a protecting define. This allows to
build kernels with FAST_IPSEC and PF. This is the least disruptive fix.

PR:		kern/71836
Reviewed by:	bms, various mailing lists
MFC after:	3 days
2004-09-23 12:44:40 +00:00
phk
d240df25ed Remove bogus cdevsw frobbing code which tries to prevent double
loading of modules.

MODULE_VERSION() should be used for this I belive.
2004-09-23 12:21:11 +00:00
phk
a4f5e76f74 Do not use devsw() but si_devsw direction. This is still bogus but a
fair bit less so.
2004-09-23 12:19:24 +00:00
pjd
99b0ffd3c0 Introduce new /boot/loader.conf variable: root_mount_delay.
It can be used to delay mounting root partition to give a chance to GEOM
providers to show up.
Now, when there is no needed provider, vfs_rootmount() function will look
for it every second and if it can't be find in defined time, it'll ask
for root device name (before this change it was done immediately).

This will allow to boot from gmirror device in degraded mode.
2004-09-23 10:13:18 +00:00
phk
49324bfed4 Per recent HEADSUP: Disconnect (old)vinum from the kernel build.
Users should move to the new geom_vinum implementation instead.

The refcount logic which is being added to devices to enable safe module
unloading and the buf/vm work also in progress would require a major rework
of the (old)-vinum code to comply with the new semantics.

The actual source files will not be removed until I have coordinated with
the geomvinum people if they need any bits repo-copied etc.
2004-09-23 08:34:50 +00:00
phk
3947e54e89 Do not refcount the cdevsw, but rather maintain a cdev->si_threadcount
of the number of threads which are inside whatever is behind the
cdevsw for this particular cdev.

Make the device mutex visible through dev_lock() and dev_unlock().
We may want finer granularity later.

Replace spechash_mtx use with dev_lock()/dev_unlock().
2004-09-23 07:17:41 +00:00
mjacob
f2f4dbb53f PAE seems to work for isp- at least under mimimal testing. 2004-09-23 05:26:19 +00:00