Commit Graph

42975 Commits

Author SHA1 Message Date
Alan Cox
ee3dc7d7fe - Add some of the required vm object locking, including assertions where
the vm object lock is required and already held.
2003-10-25 23:42:17 +00:00
Warner Losh
1e56655e43 Minor style nits suggested by sam and mdodd:
o give an argument to EP_BUSY_WAIT
o use foo_locked rather than foo_body
o Add locking assertions for extra safety.
2003-10-25 21:28:40 +00:00
Warner Losh
470de03fd0 Convert to bus_space.
Make the pccard attachment work with NEWCARD
Start locking of the driver, but only the macros are defined right now

Tested on: Megahertz CC10BT/2
# (These cards are very popular on ebay these days, and run < $10 including
#  shipping from some sellers).
2003-10-25 19:56:19 +00:00
Peter Wemm
f3075be88a For the SMP case, flush the TLB at the beginning of the page zero/copy
routines.  Otherwise we run into trouble with speculative tlb preloads
on SMP systems.  This effectively defeats Jeff's revision 1.438
optimization (for his pentium4-M laptop) in the SMP case.  It breaks
other systems, particularly athlon-MP's.
2003-10-25 18:51:41 +00:00
Alan Cox
93dbd07122 - Align a comment within struct vm_page.
- Annotate the vm_page's valid field as synchronized by the containing
   vm object's lock.
2003-10-25 18:33:04 +00:00
Robert Watson
36bbf86ba6 Check (locked) before performing an advisory unlock following a failure
of vn_start_write().  Otherwise, we may inconsistently attempt to release
the advisory lock.

Pointed out by:	teggej
2003-10-25 16:43:50 +00:00
Robert Watson
c447f5b2f4 When generate a core dump, use advisory locking in an advisory way:
if we do acquire an advisory lock, great!  We'll release it later.
However, if we fail to acquire a lock, we perform the coredump
anyway.  This problem became particularly visible with NFS after
the introduction of rpc.lockd: if the lock manager isn't running,
then locking calls will fail, aborting the core dump (resulting in
a zero-byte dump file).

Reported by:	Yogeshwar Shenoy <ynshenoy@alumni.cs.ucsb.edu>
2003-10-25 16:14:09 +00:00
Robert Watson
67536f038c Allow MAC policies to block/revoke kern_alq write access to a file.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
Reviewed by:	jeff
2003-10-25 16:10:41 +00:00
Robert Watson
da77b2fa6b Make MAC_EXTERNALIZE() and MAC_INTERNALIZE() simply take the object
type, rather than "object_label" as the first argument.  This reduces
complexity a little for the consumer, and also makes it easier for
use to rename the underlying entry points in struct mac_policy_obj.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-10-25 15:28:20 +00:00
Hidetoshi Shimokawa
65290832bd Fix fwmem_strategy() race in 4-stable. 2003-10-25 15:05:59 +00:00
Hidetoshi Shimokawa
a4468d6352 Move validity check of 'xfer->fc != NULL' to right place. 2003-10-25 15:04:49 +00:00
Hidetoshi Shimokawa
b604f6e80f dcons_crom.c needs dcons and firewire. 2003-10-25 12:59:22 +00:00
Hajimu UMEMOTO
618d51bbdc revert following unwanted changes:
- __packed to __attribute__((__packed__)
  -  uintN_t back to u_intN_t

Reported by:	bde
2003-10-25 10:57:08 +00:00
Hajimu UMEMOTO
16cd67e933 correct namespace pollution.
Submitted by:	bde
2003-10-25 09:37:10 +00:00
Alan Cox
52051abcf1 - Call vnode_pager_input_old() with the vm object locked. 2003-10-25 05:21:16 +00:00
Peter Wemm
b09a77f561 GC workaround code for detecting pentium4's and disabling PSE and PG_G.
It's been ifdef'ed out for ages.
2003-10-25 05:14:38 +00:00
Nate Lawson
9b937d4836 Add devctl(4) notify support to ACPI. Various subsystems now notify
userland whenever events occur.  See the example in devd.conf below
to see how to use it.
2003-10-25 05:03:25 +00:00
Warner Losh
c365ed47e4 Whole grab-bag of changes:
o Make the driver MPSAFE
o Some changes due to diff reduction effort with vx.
o Removed some obsolete junk.

Reviewed by: sam, modd
2003-10-25 04:09:49 +00:00
Warner Losh
e0eeb66087 Start to minimize diffs between vx and ep. These latter is based on a
more advanced version of the chips supported by the former.  Matt Dodd
and I are working towards merging them, and this a step on that path.
2003-10-25 04:05:33 +00:00
Robert Watson
138f64b698 Sort type declarations together.
Remove an excess carriage return.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-10-25 03:50:44 +00:00
Warner Losh
17e02bb39b Convenience functions to generate notifications from the kernel. The ACPI
code will start using these shortly.

Reviewed by: njl
2003-10-24 22:41:54 +00:00
Doug Ambrisko
43e42f3688 Add support for another multiple serial port card based on OX16PCI954 device
id 0x950a.

MFC:	after 4.9 release.
2003-10-24 22:34:56 +00:00
Eric Anholt
4294fd5ce1 Don't try to use dev->dma_lock unless dma is initialized (dev->dma != NULL)
in bufs_info sysctl handler.  dev->dma and dev->dma_lock existence are
protected by DRM_LOCK().  Fixes panic on sysctl hw.dri when the device is
uninitialied (when you aren't in X).
2003-10-24 21:45:21 +00:00
John-Mark Gurney
0eb3b7bb7f don't allow reading from files that haven't been open'd for reading. 2003-10-24 21:07:53 +00:00
John Baldwin
8b201c42c6 - Add a DDB command 'show intrcnt' to show the non-zero interrupt counts.
- Add a DDB function to dump the contents of an ithread and optionally
  details about each handler in that ithread.  This function can be used
  by MD code to implement DDB commands that display information about
  interrupt sources and their registered handlers.
2003-10-24 21:05:30 +00:00
John Baldwin
07930cce05 A few whitespace and comment tweaks. 2003-10-24 21:02:26 +00:00
John Baldwin
fe38ebca56 - Fail to probe if acpi0 probed ok as this driver basically tries to probe
the ACPI timer and we shouldn't do that if ACPI is already around to do
  that for us.
- Set a description and tweak the order of checks in the probe function
  to more closely match other PCI drivers.

This should probably be moved to sys/dev/piix/piix.c at some point and
turned on for all i386 kernels rather than just SMP ones.
2003-10-24 21:01:31 +00:00
Hajimu UMEMOTO
c302f5bc07 remove the ip6r0_addr and ip6r0_slmap members from ip6_rthdr0{}
according to rfc2292bis.

Obtained from:	KAME
2003-10-24 20:37:05 +00:00
Hajimu UMEMOTO
5434eaa208 correct tab and order. 2003-10-24 19:51:49 +00:00
Poul-Henning Kamp
7b3c545769 Close the right consumers if we run into trouble opening them all.
Submitted by:	Pawel Jakub Dawidek <nick@garage.freebsd.pl>
2003-10-24 18:47:31 +00:00
Poul-Henning Kamp
87ac8d11c2 Fix two old/new consumer confusions.
Submitted by:    Pawel Jakub Dawidek <nick@garage.freebsd.pl>
2003-10-24 18:46:23 +00:00
Poul-Henning Kamp
63b92d134e When grabbing vnodes to service NFS requests, make sure to call
vn_start_write() early to avoid snapshot deadlocks.

By:	mckusick
2003-10-24 18:36:49 +00:00
Hajimu UMEMOTO
f95d46333d Switch Advanced Sockets API for IPv6 from RFC2292 to RFC3542
(aka RFC2292bis).  Though I believe this commit doesn't break
backward compatibility againt existing binaries, it breaks
backward compatibility of API.
Now, the applications which use Advanced Sockets API such as
telnet, ping6, mld6query and traceroute6 use RFC3542 API.

Obtained from:	KAME
2003-10-24 18:26:30 +00:00
Hajimu UMEMOTO
234a35c714 Since dp->dom_ifattach calls malloc() with M_WAITOK, we cannot
use mutex lock directly here.  Protect ifp->if_afdata instead.

Reported by:	grehan
2003-10-24 16:57:59 +00:00
Hartmut Brandt
7298db81fe Sysctl names should not contain dots. Convert them to underlines. 2003-10-24 16:44:27 +00:00
Hidetoshi Shimokawa
869093b15d Add dumb console driver and related bits.
dcons(4): very simple console and gdb port driver
dcons_crom(4): FireWire attachment
dconschat(8): User interface to dcons

Tested with: i386, i386-PAE, and sparc64.
2003-10-24 15:44:10 +00:00
Hidetoshi Shimokawa
102ebc1f95 Fix for FW_ASYREQ.
- set send.pay_len correctly.
- copy response only if needed.
- remove unnecessary 'err = 0'.
2003-10-24 13:55:51 +00:00
Hidetoshi Shimokawa
ad5c39fe2a Don't check timeout just after booted.
Some transactions could be considered wrongly to be timeout
bacause interrupts are disabled during boot process.
2003-10-24 07:42:21 +00:00
Hartmut Brandt
0376020649 Module build infrastructure for the NgATM SAA layer. 2003-10-24 07:42:08 +00:00
Hartmut Brandt
98ef351f12 Netgraph part of the NgATM signalling AA layer. These nodes can
also be used as a general-purpose transport protocol above any
packet layer (IP, UDP).
2003-10-24 07:39:11 +00:00
Warner Losh
d2bda4e032 Backswards is as backwards does: If we're MPSAFE, then we don't need
giant, which implies that we need to take out giant it we're NOT
MPSAFE.

# I can't believe the number of people that looked at this failed to
# detect this.
2003-10-24 07:20:13 +00:00
Marcel Moolenaar
3a988c5c87 Remove unused header. See also ia64/disasm/disasm.h. 2003-10-24 06:53:43 +00:00
Marcel Moolenaar
2a0a749f39 Remove ia64_pack_bundle() and ia64_unpack_bundle(). They are not
used anymore.
2003-10-24 06:52:21 +00:00
Marcel Moolenaar
4d85274d1a Remove unused file. db_disasm() has been implemented in db_interface.c
now.
2003-10-24 06:48:41 +00:00
Alan Cox
2e3b314d3a - Push down Giant from vm_pageout() to vm_pageout_scan(), freeing
vm_pageout_page_stats() from Giant.
 - Modify vm_pager_put_pages() and vm_pager_page_unswapped() to expect the
   vm object to be locked on entry.  (All of the pager routines now expect
   this.)
2003-10-24 06:43:04 +00:00
Marcel Moolenaar
5664617492 Implement db_disasm() by using the new disassembler. Temporarily
unimplement db_write_breakpoint() and db_clear_breakpoint().
2003-10-24 06:42:03 +00:00
Mike Silbersack
0709c23335 Reduce the number of tcp time_wait structs to maxsockets / 5; this ensures
that at most 20% of sockets can be in time_wait at one time, ensuring
that time_wait sockets do not starve real connections from inpcb
structures.

No implementation change is needed, jlemon already implemented a nice
LRU-ish algorithm for tcp_tw structure recycling.

This should reduce the need for sysadmins to lower the default msl on
busy servers.
2003-10-24 05:44:14 +00:00
Arun Sharma
f47392f4c2 Use a TR of size 1 << IA64_ID_PAGE_SHIFT instead of 16M to avoid
overlapping TR/TC entries (which results in a machine check). Note
that we don't look at the size of the memory descriptor, because
it doesn't guarantee non-overlap.

With this change, a UP kernel could boot on a Intel Tiger4 machine
with the following options:

options         LOG2_ID_PAGE_SIZE=26		# 64M
options         LOG2_PAGE_SIZE=14               # 16K

Approved by: marcel
2003-10-24 04:56:58 +00:00
Peter Wemm
cedb3695c1 Add __va_copy and make it always visible, in spite of the __ISO_C_VISIBLE
setting.  Make va_copy be an alias if __ISO_C_VISIBLE >= 1999.

Why?  more than a few ports have an autoconf that looks for __va_copy
because it is available on glibc.  It is critical that we use it if
at all possible on amd64.  It generally isn't a problem for i386 and its
ilk because autoconf driven code tends to fall back to an assignment.
2003-10-24 02:50:39 +00:00
Marcel Moolenaar
5c03a7c7f9 Don't use fuword() or suword() unconditionally. They explicitly
disallow reading or writing.
2003-10-24 02:33:26 +00:00