Commit Graph

60548 Commits

Author SHA1 Message Date
emax
6fcacdf9ef s/USBDEVNAME/device_get_nameunit/g
s/USBBASEDEVICE/device_t/g
2006-09-07 23:38:09 +00:00
mjacob
fd58e8e716 Create a 'ready' handler for each personality. The purpose of this handler
is to able to be called after *all* attach and enable events are done.

We establish a SYSINIT hook to call this handler. The current usage for it
is to add scsi target resources *after* all enables are done. There seems
to be some dependencies between different halves of a dual-port with respect
to target mode.

Put in more meaningful event messages for some events- in particular
QUEUE FULL events so we can see what the queue depth was when the
IOC sent us this message.

MFC after:	1 week
2006-09-07 23:08:21 +00:00
anholt
50839278da Merge from DRM upstream:
- Add support for Intel 965 Express chipsets.
- Add support for R200 vertex programs, along with minor bugfixes.
- Add support for vblank synchronization to pipe B of Intel hardware
  (laptop screens).
2006-09-07 23:04:47 +00:00
imp
6af2f13b58 MFp4: first cut at getting I2C transfers working (generically). I'm
unsure if this driver correctly implements all the start/stop junk
right (but it did or didn't before I made this commit).
2006-09-07 21:53:28 +00:00
imp
423b53ad2f MFp4: berndt pointed me at an errata that shows that the stat register
offsets were originally documented incorrectly.  This fixes that.  It
shouldn't affect anything other than error stat reporting.
2006-09-07 21:50:01 +00:00
ambrisko
c0a1798768 Change the class from uint8_t to int8_t so people can filter on >0
events.
2006-09-07 19:32:05 +00:00
jhay
13e2e37860 All multicast listeners on a port should get one copy of the packet. This
was broken during the locking changes.
2006-09-07 18:44:54 +00:00
ambrisko
2b1d36a00f Change the event log dump on initial boot to use get_event versus
AEN.  This makes the boot messages cleaner.  I now know how this
structure works so I can implement it versus guessing.  Remove the
not ready type code since it is ready now.

I added the time stamp/locale/class so people can parse messages better.
Create a sysctl so that we can set the locale/class level.
2006-09-07 18:40:49 +00:00
jhb
140b39e46d Use a single constant to define the sizes of the physmap[], phys_avail[],
and dump_avail[] arrays so they are in sync (previously it was possible
to store more entries in the physmap[] then we could store in phys_avail[],
which was pointless).  While I'm here, bump up the length of these tables
to hold 30 entries on amd64 and 16 on i386.  This allows machines with
fairly fragmented memory maps to boot ok (at least one machine would
not boot FreeBSD/i386 but would boot FreeBSD/amd64 because amd64 allowed
for more fragments).

MFC after:	3 days
2006-09-07 15:03:02 +00:00
ru
0d416557b8 Back when we had T/TCP support, we used to apply different
timeouts for TCP and T/TCP connections in the TIME_WAIT
state, and we had two separate timed wait queues for them.
Now that is has gone, the timeout is always 2*MSL again,
and there is no reason to keep two queues (the first was
unused anyway!).

Also, reimplement the remaining queue using a TAILQ (it
was technically impossible before, with two queues).
2006-09-07 13:06:00 +00:00
andre
c9b5882a6e Second step of TSO (TCP segmentation offload) support in our network stack.
TSO is only used if we are in a pure bulk sending state.  The presence of
TCP-MD5, SACK retransmits, SACK advertizements, IPSEC and IP options prevent
using TSO.  With TSO the TCP header is the same (except for the sequence number)
for all generated packets.  This makes it impossible to transmit any options
which vary per generated segment or packet.

The length of TSO bursts is limited to TCP_MAXWIN.

The sysctl net.inet.tcp.tso globally controls the use of TSO and is enabled.

TSO enabled sends originating from tcp_output() have the CSUM_TCP and CSUM_TSO
flags set, m_pkthdr.csum_data filled with the header pseudo-checksum and
m_pkthdr.tso_segsz set to the segment size (net payload size, not counting
IP+TCP headers or TCP options).

IPv6 currently lacks a pseudo-header checksum function and thus doesn't support
TSO yet.

Tested by:	Jack Vogel <jfvogel-at-gmail.com>
Sponsored by:	TCP/IP Optimization Fundraise 2005
2006-09-07 12:53:01 +00:00
ru
8f497b5c52 Remove a microoptimization for i386 that was a micropessimization for amd64. 2006-09-07 09:49:08 +00:00
mjacob
82698a46fb more usb fallout changes 2006-09-07 06:18:34 +00:00
mjacob
161582abd4 Static -> static. 2006-09-07 06:00:03 +00:00
trhodes
8a7125d081 Catch up with USB changes, device_ptr_t was removed, we need device_t here. 2006-09-07 05:34:04 +00:00
scottl
f0ed81ae57 Catch up to USB changes. 2006-09-07 05:21:52 +00:00
scottl
fa6dd3282a Remove old debugging code from the interrupt handler. 2006-09-07 05:05:41 +00:00
imp
28b388f478 More removing compatibility macros.
md5 still the same.

"Dave, stop.  I feel my mind slipping away." -- hal
2006-09-07 00:06:42 +00:00
imp
fb77a38eda Only include FreeBSD defines. This file is slated to go to the happy
hunting ground in the sky.

Also, remove the #defines OBE.
2006-09-06 23:49:36 +00:00
imp
443562c936 s/Static/static/g
s/device_ptr_t/device_t/g

No md5 changes in the .o's

# Note to the md5 tracking club: $FreeBSD$ changes md5 after every commit
# so you need to checkout -kk to get $FreeBSD$ instead of the actual value
# of the keyword.
2006-09-06 23:44:25 +00:00
imp
4a25cdf453 More antideclarification.
md5 still the same after all these years (and after -g was removed).
2006-09-06 23:29:53 +00:00
andre
59a81089bf Reserve a precious 16bit gap in the mbuf pkthdr struct for ethernet 802.1pq
vlan tags.
2006-09-06 22:33:49 +00:00
sobomax
55dc203a73 Unbreak in the case when device apic is compiled into non-SMP kernel.
Reported by:	jhay
MFC after:	2 weeks
2006-09-06 22:05:34 +00:00
jhb
27f742341b Use sysctl_handle_long() instead of duplicating it's logic for
kern.ipc.maxsockbuf so that this sysctl works for 32-bit binaries running
on amd64 via compat/freebsd32.

MFC after:	3 days
2006-09-06 21:59:36 +00:00
imp
8637a91214 Remove the portibility layer goo.
Produces the same .o as before.

md5 by: /sbin/md5
2006-09-06 21:53:28 +00:00
andre
cb05913fd2 First step of TSO (TCP segmentation offload) support in our network stack.
o add IFCAP_TSO[46] for drivers to announce this capability for IPv4 and IPv6
 o add CSUM_TSO flag to mbuf pkthdr csum_flags field
 o add tso_segsz field to mbuf pkthdr
 o enhance ip_output() packet length check to allow for large TSO packets
 o extend tcp_maxmtu[46]() with a flag pointer to pass interface capabilities
 o adjust all callers of tcp_maxmtu[46]() accordingly

Discussed on:	-current, -net
Sponsored by:	TCP/IP Optimization Fundraise 2005
2006-09-06 21:51:59 +00:00
imp
2786b657b9 jhb points out that these mallocs don't need to be checked because
of M_WAITOK.
2006-09-06 20:22:43 +00:00
imp
50aef09189 MFp4: check the return value of malloc and report an error when invalid. 2006-09-06 19:46:02 +00:00
andre
b095262f18 Check inp_flags instead of inp_vflag for INP_ONESBCAST flag.
PR:		kern/99558
Tested by:	Andrey V. Elsukov <bu7cher-at-yandex.ru>
Sponsored by:	TCP/IP Optimization Fundraise 2005
MFC after:	3 days
2006-09-06 19:04:36 +00:00
andre
ae5965062b Improve description of if_capabilities, if_capenable and ifi_hwassist.
Sponsored by:	TCP/IP Optimization Fundraise 2005
2006-09-06 18:06:04 +00:00
mlaier
9e3a82aacc Fix stateful filtering of loopback IPv6 traffic to an address not configured
on lo0.  While here fix a comment.

PR:		kern/102647
Reported by:	Frank Steinborn
Submitted by:	suz (earlier version)
MFC after:	3 days
2006-09-06 17:19:45 +00:00
andre
f044a1949b Fix the socket option IP_ONESBCAST by giving it its own case in ip_output()
and skip over the normal IP processing.

Add a supporting function ifa_ifwithbroadaddr() to verify and validate the
supplied subnet broadcast address.

PR:		kern/99558
Tested by:	Andrey V. Elsukov <bu7cher-at-yandex.ru>
Sponsored by:	TCP/IP Optimization Fundraise 2005
MFC after:	3 days
2006-09-06 17:12:10 +00:00
mp
f2b0030374 Remove call to fdfree() for the AIO daemons to prevent kernel panics
with linprocfs. This call is not needed since file descriptor sharing
was removed in v1.125.

Reviewed by:	alc, davidxu, ambrisko
MFC after:	3 days
2006-09-06 15:11:20 +00:00
ru
a11da36d0e Refine previous revision to allow acpi_wakecode.h to be safely built
from both the acpi module build directory and a kernel build directory.
The latter didn't work when one attempted to build a kernel which had
"device acpi" with the "make kernel-toolchain buildkernel" command
because a cross-compiler couldn't find anything in the standard system
include path (it's empty in the kernel-toolchain case).

Fix this by passing a better root path to kernel headers (src/sys)
which works for both cases, kernel and module (-I@ only worked for
module).

Also, while here, pass -nostdinc (and a different spelling for icc) --
it's a feature that the kernel source tree is self-contained, and this
change enforces this.

Reported by:	glebius
2006-09-06 14:23:40 +00:00
glebius
d907e70991 o Backout rev. 1.125 of in_pcb.c. It appeared to behave extremely
bad under high load. For example with 40k sockets and 25k tcptw
  entries, connect() syscall can run for seconds. Debugging showed
  that it iterates the cycle millions times and purges thousands of
  tcptw entries at a time.
  Besides practical unusability this change is architecturally
  wrong. First, in_pcblookup_local() is used in connect() and bind()
  syscalls. No stale entries purging shouldn't be done here. Second,
  it is a layering violation.
o Return back the tcptw purging cycle to tcp_timer_2msl_tw(),
  that was removed in rev. 1.78 by rwatson. The commit log of this
  revision tells nothing about the reason cycle was removed. Now
  we need this cycle, since major cleaner of stale tcptw structures
  is removed.
o Disable probably necessary, but now unused
  tcp_twrecycleable() function.

Reviewed by:	ru
2006-09-06 13:56:35 +00:00
mjacob
670deaece6 The poison pill of death: adding a target mode reply handler and target
resources to a non-FC card killed us dead. Sorry for the breakage since
last July 12.
2006-09-05 23:53:07 +00:00
pjd
5c567602d8 Fix problems with destroy and forcible destroy functionality:
- hold/release device in start/done routines, this will probably slow
  down things a bit, but previous code was racy;
- only release device if g_gate_destroy() failed - if it succeeded device
  is dead and there is nothing to release;
- various other changes which makes forcible destruction reliable.

MFC after:	3 days
2006-09-05 21:56:00 +00:00
mjacob
b48a7df7a2 Coverity: initialize some variables before potential use. 2006-09-05 20:28:28 +00:00
ru
d3b5cc24ad - Include <sys/reboot.h> to get the RB_* defines.
- Make the PROBE_KEYBOARD option better resemble the -P option in
  boot2, i.e., if keyboard isn't present then boot with both
  RB_SERIAL and RB_MULTIPLE set.

Reviewed by:	jhb
2006-09-05 19:28:03 +00:00
jhay
b02696f240 Use net.inet6.ip6.redirect / ip6_sendredirects as part of the decision
to generate icmp6 redirects. Now it is possible to switch redirects off.

MFC after:	1 week
2006-09-05 19:20:42 +00:00
sobomax
6c1dd2ff20 The FreeBSD by default "disables" hyper-threading cores, by not scheduling
any threads to them. However, it still counts those cores as "active but
permanently idle" when calculating system-wide CPUs statistics. It is
incorrect, since it skews statistics quite a bit and creates real problems
for certain types of applications (monitoring applications for example),
by making them believe that the system does have enough idle CPU resources,
while in fact it does not.

Correct the problem by not calling performance counting routines on "disabled"
cores. The cleaner solution would be to just disable APIC timer interrupts on
those cores completely, but ENOTIME here and it is not clear if the
additional complexity really worth minor performance gain.

Reviewed by:	ssouhlal
Sponsored by:	Sippy Software, Inc.
MFC after:	2 weeks
2006-09-05 17:15:24 +00:00
anholt
3aee831e44 Include agp_i810.c in amd64 AGP builds to get support for the Intel 915 Express
chipsets.

PR:		kern/93676
Submitted by:	Jan Blaha <Jan.Blaha@unet.cz>
MFC after:	1 week
2006-09-05 16:55:13 +00:00
glebius
f0b3d43b52 Finally fix rev. 1.256
Pointy hat to:	glebius
2006-09-05 14:00:59 +00:00
glebius
697f63c7e3 Remove extra parenthesis in last commit.
Nitpicked by:	ru
2006-09-05 12:22:54 +00:00
glebius
70efc78561 - Make net.inet.tcp.maxtcptw modifiable at run time.
- If net.inet.tcp.maxtcptw was ever set explicitly, do
  not change it if kern.ipc.maxsockets is changed.
2006-09-05 12:08:47 +00:00
davidxu
3001f9c21f Merge all code of do_lock_normal, do_lock_pi and do_lock_pp into
function do_lock_umutex.
2006-09-05 12:01:09 +00:00
pjd
12baf6e1ec Add 'show vnode <addr>' DDB command. 2006-09-04 22:15:44 +00:00
sam
68abcd5aeb bump version for libpcap+tcpdump imports 2006-09-04 21:49:31 +00:00
sam
5a5f01cc9e more juniper dlt's
MFC after:	1 month
2006-09-04 19:24:34 +00:00
marcel
b288558c95 Add SIIG 4 port serial card based on the Oxford OX16PCI954. 2006-09-04 18:27:14 +00:00
mr
f9af67a2ee Add locking to vge_ifmedia_upd().
With this WD-timeouts for vge(4) got reduced signifficantly.
Testet on -stable.

Submitted by:	Oleg Bulyzhin
MFC after:	1 day
2006-09-04 13:14:44 +00:00
thomas
b6505e0884 Fix typo in comment. 2006-09-04 08:32:17 +00:00
ru
4dbb4c1732 If building the module as part of the kernel build, determine
the "device isa" presence out of the opt_isa.h in the kernel
build directory, rather than always assuming its presence.
sparc64 is still special cased and is not affected by this
change.

Noticed by:	bde
2006-09-04 07:40:53 +00:00
rwatson
9af04e1fec White space cleanup, no functional change. 2006-09-04 06:06:23 +00:00
dwhite
3631541670 Avoid an infinite loop in empty_both_buffers() by adding a timeout.
This helps systems that don't actually have atkbd controllers, such as the Intel
SBX82 blade, boot without device.hints hacks.

Hardware for this fix provided by iXsystems.

PR:		94822
Submitted by:	Devon H. O'Dell <devon.odell@coyotepoint.com>
MFC After:	3 days
2006-09-04 00:19:31 +00:00
alc
9fce925349 Make vm_page_release_contig() static. 2006-09-03 22:24:08 +00:00
marius
e2d308d090 Do as the USII CPU manual suggests and leave interrupts enabled
for a bit before retrying to resend an IPI in order to avoid
deadlocks if the other CPU is also trying to send one.
OpenSolaris uses a delay of 1 microsecond here but waiting 2
microseconds with interrupts enabled like Linux does shouldn't
hurt but is a bit safer.

MFC after:	1 day
2006-09-03 21:20:21 +00:00
rwatson
de3d4015b8 Regenerate. 2006-09-03 16:24:36 +00:00
rwatson
fcca60a093 Set freebsd32 system call event identifiers for:
- old truncate, ftruncate
- old getpeername, gethostid, sethostid, getrlimit, setrlimit, killpg.
- old quota, getsockname, getdirentries.
- lgetfh
- old getdomainname, setdomainname
- sysarch, rtprio, __getcwd, jail, sigtimedwait
- extattrctl, extattr_{get,set,delete,list}_{file,fd,link}
- getresgid, getresuid, kqueue, eaccess, nmount, sendfile
- fhstatfs, kldunloadf

Right identifiers for:

- nfssvc

Remove incorrect identifier for:

- __acl_get_file

Compile tested with help of:	sam
Obtained from:	TrustedBSD Project
2006-09-03 16:17:49 +00:00
rwatson
58bc728eee Regenerate for updated audit event identifiers. 2006-09-03 15:11:13 +00:00
rwatson
211375c235 Assign proper audit event identifiers to a number of system calls not
covered in previous passes:

- sysarch, rtprio
- clock_settime
- preadv/pwritev
- __getcwd
- kqueue
- fhstatfs
- kldunloadf

Obtained from:	TrustedBSD Project
2006-09-03 15:10:40 +00:00
ume
d5da60dc31 Support Celsius (nn.nC), Fahrenheit (nn.nF) and Kelvin (nnnn) to
specify temperature.

Reviewed by:	njl
MFC after:	3 days
2006-09-03 15:10:04 +00:00
rwatson
c5e1a3ed4e Regenerate. 2006-09-03 13:48:48 +00:00
rwatson
01259c59f9 Regenerate. Looks like someone missed doing this previously as more than
just the audit event change appears in the diff.
2006-09-03 13:47:52 +00:00
rwatson
9e972f8275 Use AUE_NTP_ADJTIME instead of AUE_ADJTIME for ntp_adjtime().
Obtained from:	TrustedBSD Project
2006-09-03 13:47:24 +00:00
rwatson
3387bd0cd3 Use AUE_NTP_ADJTIME for ntp_adjtime() instead of AUE_ADJTIME.
Obtained from:	TrustedBSD Project
2006-09-03 13:44:21 +00:00
mjacob
639497743e Restore multi-version cleanliness. 2006-09-03 01:26:55 +00:00
mjacob
90adef8e68 Bump __FreeBSD_version by one due to newbus changes. 2006-09-03 01:12:34 +00:00
jmg
632f50effc up the default msgbuf limit to 64k.. a verbose boot on i386 on modern
hardware returns almost 48k of data...  to change the default per platform,
it should be done in DEFAULTS, not here...

Discussed on:	-arch
2006-09-03 00:33:19 +00:00
jmg
c25fb06d92 add a newbus method for obtaining the bus's bus_dma_tag_t... This is
required by arches like sparc64 (not yet implemented) and sun4v where there
are seperate IOMMU's for each PCI bus...  For all other arches, it will
end up returning NULL, which makes it a no-op...

Convert a few drivers (the ones we've been working w/ on sun4v) to the
new convection...  Eventually all drivers will need to replace the parent
tag of NULL, w/ bus_get_dma_tag(dev), though dev is usually different for
each driver, and will require hand inspection...

Reviewed by:	scottl (earlier version)
2006-09-03 00:27:42 +00:00
jmg
84ee477ac3 Break out typedefs from bus_dma.h to _bus_dma.h so that we can get the
typedef for bus_dma_tag_t in sys/bus.h w/o poluting the namespace...
This is in preperation for adding bus_get_dma_tag to sys/bus.h...
2006-09-03 00:26:17 +00:00
davidxu
b73a4c5234 Check if it is root user in do_unlock_pp. 2006-09-03 00:07:37 +00:00
sos
f62c7d769a Add support for VIA 8237A. 2006-09-02 12:55:42 +00:00
rwatson
079c101b83 Merge OpenBSM 1.0 alpha 10 changes into src/sys/bsm; comment spelling
fixes.

Obtained from:	TrustedBSD Project
2006-09-02 10:49:44 +00:00
rwatson
4f2dba52bb Remove two hypothetical calls to suser() in ifdef'd (and uncompilable)
svr4 code: this code would call centralized sysctl code that does
these checks also.

MFC after:	1 week
Obtained from:	TrustedBSD Project
Sponsored by:	nCircle Network Security, Inc.
2006-09-02 08:18:22 +00:00
davidxu
f41d0bcd97 Make sure we get new m_owner value if we can not unlock it in
uncontested case. Reorder statements in do_unlock_umutex.
2006-09-02 02:41:33 +00:00
davidch
d04203c60c /tmp/cvsleYf6y 2006-09-01 22:30:56 +00:00
marius
84a40b96d0 Fix spelling in a status message.
MFC after:	1 day
2006-09-01 20:14:06 +00:00
marius
e307864a64 Fix spelling and wording in a comment. 2006-09-01 20:12:12 +00:00
jhb
dfef451bbe Comment tweaks. 2006-09-01 16:11:50 +00:00
jhb
5b29358f02 - Use pci_enable_busmaster() and pci_enable_io() to update the command
register.  This really shouldn't be using pci_enable_io() directly as
  bus_alloc_resource() does it already, but the cached copy of the
  command word needs to be correct so the enable/disable mwi functions
  work properly.
- Use pci bus accessors to read revision ID and subvendor IDs.

Reviewed by:	jvogel
2006-09-01 16:11:12 +00:00
jhb
d8270676ef Add locking to the ifmedia callouts.
Reviewed by:	jvogel, yongari
2006-09-01 16:08:36 +00:00
wsalamon
c62317c442 Audit the argv and env vectors passed in on exec:
Add the argument auditing functions for argv and env.
  Add kernel-specific versions of the tokenizer functions for the
  arg and env represented as a char array.
  Implement the AUDIT_ARGV and AUDIT_ARGE audit policy commands to
  enable/disable argv/env auditing.
  Call the argument auditing from the exec system calls.

Obtained from: TrustedBSD Project
Approved by: rwatson (mentor)
2006-09-01 11:45:40 +00:00
brueffer
e279989d71 Don't build iwi(4) on amd64, there are problems with the firmware modules.
Reported by:	sam
Approved by:	rwatson (mentor)
MFC after:	3 days
2006-09-01 11:27:22 +00:00
glebius
218dae77ed Fix my error in rev. 1.109.
Submitted by:	jhb
Pointy hat to:	glebius
2006-09-01 09:56:24 +00:00
marcel
a37b953058 In cpu_set_user_tls(), properly set the thread pointer. It is 0x7000
bytes after the end of the TCB, which is itself 8 bytes.
2006-09-01 06:05:40 +00:00
mjacob
ccda04f5c0 More ispfwfunc definitions funnies which break pre-7.0 builds. 2006-09-01 05:03:42 +00:00
mjacob
0cc7c39787 Add missing pre-7.0 firmware pointer. Oops. 2006-09-01 04:57:14 +00:00
mjacob
4fd622b09a fix bug in 2322 receive sequencer f/w load 2006-09-01 04:18:17 +00:00
anholt
adc458edd5 Add support for another ATI IGP 340M (RS200M) AGP bridge.
PR:		kern/100958
Submitted by:	Kazuo Dohzono <dohzono@axion-software.com>
MFC after:	1 week
2006-09-01 02:22:17 +00:00
jhb
8f6bfd83f7 Just foward declare 'struct adapter' instead of declaring an actual
'adapter' structure.
2006-08-31 18:50:16 +00:00
jhb
4e7db0ae21 Compare the correct field against NULL when determining whether or not to
do bus_teardown_intr().
2006-08-31 18:49:41 +00:00
jhay
a1d5a9ece3 Recognise IPv6 PIM packets.
MFC after:	1 week
2006-08-31 16:56:45 +00:00
yongari
80409385e4 Add PHY support for BCM5752.
Tested by:	delphij, Ganbold < ganbold AT micom DOT mng DOT net >
2006-08-31 11:15:18 +00:00
yongari
6012ad6e4a Add Broadcom BCM5752 PHY id. 2006-08-31 11:13:51 +00:00
rse
4b6df285e8 Fix typos: s/rebulid/rebuild/
Submitted by: Christoph Schug <chris@schug.net>
2006-08-31 08:45:44 +00:00
davidxu
14a4be51a4 Reorder some statments. Fix typo and remove stale comments. 2006-08-30 23:59:45 +00:00
sos
0387eca150 Properly initialize the nVidia MCP5X interrupts etc.
Suggested by:	nVidia
2006-08-30 11:50:22 +00:00
cognet
56796490ea Remove dead code, already defined in sys/cdef.h
Spotted out by:	bde
2006-08-30 11:45:07 +00:00
cognet
192d7d2aa6 Use ENTRY_NP for alternate entry points instead of ENTRY to avoid calling
mcount twice when profiling.

Spotted out by:	bde
2006-08-30 11:44:37 +00:00
cognet
8397e9dcdc Use ENTRY instead of ALTENTRY, it doesn't exist on arm. 2006-08-29 23:53:34 +00:00
mohans
0b0d785f6a Fix for a deadlock triggered by a 'umount -f' causing a NFS request to never
retransmit (or return). Thanks to John Baldwin for helping nail this one.

Found by : Kris Kennaway
2006-08-29 22:00:12 +00:00
jhb
94a898c189 The _sx_assert() prototype should exist if either of INVARIANTS or
INVARIANT_SUPPORT is defined so you can build a kernel with
INVARIANT_SUPPORT, but build a module with just INVARIANTS on.

MFC after:	3 days
Reported by:	kuriyama
2006-08-29 20:36:33 +00:00
jkim
6c8639b149 Restore Digital Outpur Register (DOR) for enhanced controller after reset. 2006-08-29 18:19:39 +00:00
cognet
ecf44c474e Ooops m->md.pvh_attrs can't be used to know if the page is writeable, because
it only remembers if the page is modified or referenced.

Bad review from:	cognet
2006-08-28 21:43:34 +00:00
cognet
fa893a6f9c Relocate the vector page for AT91, to work around bugs with the LOW_VECTOR
code.
2006-08-28 20:05:00 +00:00
ssouhlal
c390c18c07 FREE -> free
Submitted by:	rdivacky
2006-08-28 13:52:27 +00:00
netchild
4dda206f9c MFi386 parts of rev 1.55 (modulo real MD parts):
- implement CLONE_PARENT semantic
 - lock proc in the currently disabled part of CLONE_THREAD

Submitted by:	rdivacky
2006-08-28 13:09:24 +00:00
davidxu
c4a566770e Update comments about interrupted mutex locking. 2006-08-28 07:09:27 +00:00
davidxu
3cac7b5ddb Regenerate. 2006-08-28 04:28:25 +00:00
davidxu
5a12667fcf This is initial version of POSIX priority mutex support, a new userland
mutex structure is added as following:
struct umutex {
        __lwpid_t       m_owner;
        uint32_t        m_flags;
        uint32_t        m_ceilings[2];
        uint32_t        m_spare[4];
};
The m_owner represents owner thread, it is a thread id, in non-contested
case, userland can simply use atomic_cmpset_int to lock the mutex, if the
mutex is contested, high order bit will be set, and userland should do locking
and unlocking via kernel syscall. Flag UMUTEX_PRIO_INHERIT represents
pthread's PTHREAD_PRIO_INHERIT mutex, which when contention happens, kernel
should do priority propagating. Flag UMUTEX_PRIO_PROTECT indicates it is
pthread's PTHREAD_PRIO_PROTECT mutex, userland should initialize m_owner
to contested state UMUTEX_CONTESTED, then atomic_cmpset_int will be failure
and kernel syscall should be invoked to do locking, this becauses
for such a mutex, kernel should always boost the thread's priority before
it can lock the mutex, m_ceilings is used by PTHREAD_PRIO_PROTECT mutex,
the first element is used to boost thread's priority when it locked the mutex,
second element is used when the mutex is unlocked, the PTHREAD_PRIO_PROTECT
mutex's link list is kept in userland, the m_ceiling[1] is managed by thread
library so kernel needn't allocate memory to keep the link list, when such
a mutex is unlocked, kernel reset m_owner to UMUTEX_CONTESTED.
Flag USYNC_PROCESS_SHARED indicate if the synchronization object is process
shared, if the flag is not set, it saves a vm_map_lookup() call.

The umtx chain is still used as a sleep queue, when a thread is blocked on
PTHREAD_PRIO_INHERIT mutex, a umtx_pi is allocated to support priority
propagating, it is dynamically allocated and reference count is used,
it is not optimized but works well in my tests, while the umtx chain has
its own locking protocol, the priority propagating protocol are all protected
by sched_lock because priority propagating function is called with sched_lock
held from scheduler.

No visible performance degradation is found which these changes. Some parameter
names in _umtx_op syscall are renamed.
2006-08-28 04:24:51 +00:00
davidxu
87b5aa08ee Implement casuword32, compare and set user integer, thank Marcel Moolenarr
who wrote the IA64 version of casuword32.
2006-08-28 02:28:15 +00:00
alc
f2ccfe9525 Refactor vm_page_sleep_if_busy() so that the test for a busy page is
inlined and a procedure call is made in the rare case, i.e., when it is
necessary to sleep.  In this case, inlining the test actually makes the
kernel smaller.
2006-08-27 19:50:13 +00:00
netchild
c1c941b5f5 Fix video playing and network connections in realplayer (and most likely
other stuff) in the osrelease=2.6.16 case:
 - implement CLONE_PARENT semantic
 - fix TLS loading in clone CLONE_SETTLS
 - lock proc in the currently disabled part of CLONE_THREAD

I suggest to not unload the linux module after testing this, there are
some "<defunct>" processes hanging around after exiting (they aren't
with osrelease=2.4.2) and they may panic your kernel when unloading the
linux module. They are in state Z and some of them consume CPU according
to ps. But I don't trust the CPU part, the idle threads gets too much CPU
that this may be possible (accumulating idle, X and 2 defunct processes
results in 104.7%, this looks to much to be a rounding error).

Noticed by:	Intron <mag@intron.ac>
Submitted by:	rdivacky (in collaboration with Intron)
Tested by:	Intron, netchild
Reviewed by:	jhb (previous version)
2006-08-27 18:51:32 +00:00
cognet
15bd8c41bf Fill in dump_avail[] before pmap_boostrap() is called so that
ARM_USE_SMALL_ALLOC work.
2006-08-27 13:23:51 +00:00
marck
1358ff558a Resurrect reference to (contemporary) kern.ipc.nmbclusters.
Suggested by:	ru

MFC after:	3 days
2006-08-27 12:57:37 +00:00
netchild
ac9f0aa27b regen 2006-08-27 08:58:00 +00:00
netchild
33681b868d Add the linux statfs64 call. This allows Tivoli backup to proceed a little
but further on -current (still not successful, but a step into the right
direction).

Sponsored by:	Google SoC 2006
Submitted by:	rdivacky
Tested by:	Paul Mather <paul@gromit.dlib.vt.edu>
2006-08-27 08:56:54 +00:00
kan
6ef43dbb8f GCC 3.4.6 gets confused on this file and produces bogus warning.
Shut it up.
2006-08-26 21:48:00 +00:00
csjp
d35597591e Fix panic associated with file creation via RPC/NFS when the MLS policy
is loaded. This problem stems from the fact that the policy is not properly
initializing the mac label associated with the NFS daemon.

Obtained from:	TrustedBSD Project
Discussed with:	rwatson
2006-08-26 20:13:35 +00:00
mjacob
a7e39208a3 Add 2400 f/w support. 2006-08-26 18:40:25 +00:00
mjacob
dfc1171709 Add QLogic 2400 (4Gb) firmware. 2006-08-26 18:39:18 +00:00
rwatson
c9215ad31e Allow the user process to query the kernel's notion of a maximum
audit record size at run-time, which can be used by the user
process to size the user space buffer it reads into from the audit
pipe.

Perforce change:	105098
Obtained from:		TrustedBSD Project
2006-08-26 17:59:31 +00:00
mohans
a1c6033ca7 Fix for a bug that causes the computation of "len" in tcp_output() to
get messed up, resulting in an inconsistency between the TCP state
and so_snd.
2006-08-26 17:53:19 +00:00
marius
e78225039a Fix another bug introduced with rev. 1.204; in vfs_donmount() if
the 'vfs_getopt(optlist, "errmsg", (void **)&errmsg, &errmsg_len)'
call fails, 'errmsg' is left uninitialized, making the later tests
against NULL meaningless, and the uses bogus. Thus initialize
'errmsg' to NULL beforehand. [1]
While at it, remove the superfluous assignment of 0 to 'errmsg_len'
if the above mentioned call fails as it's already initialized to 0.

Submitted by:	Michael Plass [1]
2006-08-26 16:28:19 +00:00
ssouhlal
4fdc09f2f9 The "taskqueue_fast" spinlocks were renamed to "fast_taskqueue" in
subr_taskqueue.c:r1.32

Reported by:	rdivacky
2006-08-26 11:21:25 +00:00
netchild
e7f60f069c Correct the number of retries in a futex_wake() call.
Sponsored by:	Google SoC 2006
Submitted by:	rdivacky
2006-08-26 10:36:16 +00:00
rwatson
0e87efb2f4 Update kernel OpenBSM parts, especially src/sys/bsm, for the OpenBSM
1.0 alpha 9 import.  See the OpenBSM import commit message for a
detailed summary of changes.

Obtained from:  TrustedBSD Project
2006-08-26 08:17:58 +00:00
alc
8f32cfe8b1 Prevent a call to contigmalloc() that asks for more physical memory than
the machine has from causing a panic.

Submitted by: Michael Plass
PR: 101668
MFC after: 3 days
2006-08-26 02:43:23 +00:00
alc
72ff1a9186 Eliminate unused definitions. (They came from NetBSD.)
Discussed with: cognet, grehan, marcel
2006-08-25 23:51:11 +00:00
thompsa
6e3cd0c979 Move the bridge hook after the loopback check so that IFF_SIMPLEX is honoured
on member interfaces. This makes us the same as OpenBSD/NetBSD.

MFC after:	3 days
2006-08-25 20:16:39 +00:00
thompsa
3289f04db9 The bridge cant hear its own transmissions so set IFF_SIMPLEX.
PR:		kern/102361
Tested by:	Radim Kolar <hsn@netmag.cz>
MFC after:	3 days
2006-08-25 20:11:56 +00:00
emax
06408c929f - Catch up with ongoing rwatson's socket work;
- Fix a couple of LORs and panics;

- Temporarily remove the code that tries to cleanup sockets that stuck
  on accepting queues (both complete and incomplete). I'm taking an ostrich
  approach here until I find a better way to deal with sockets that were
  disconnected before accepting (i.e. while socket was on complete or
  incomplete accept queue).
2006-08-25 17:53:13 +00:00
pjd
a2a865527b Fix comment. 2006-08-25 15:13:49 +00:00
cognet
53e0a06a26 Explicitely set the "allocbuffer" field to NULL when creating a new dmamap. 2006-08-25 15:10:45 +00:00
cognet
3748f87bf1 Do not create dma maps with bus_dmamap_create, as we call
bus_dmamem_alloc later which will overwrite the value, leading to a small
memory leak.
2006-08-25 13:38:42 +00:00
netchild
fedc5604a0 Emulate what vfork does instead of using it in linux_vfork. This way
we can do the stuff we need to do with linux processes at fork and
don't panic the kernel at exit of the child.

Submitted by:	rdivacky
Tested with:	tst-vfork* (glibc regression tests)
Tested by:	netchild
2006-08-25 11:59:56 +00:00
rwatson
cd0b41ad37 Don't call suser_cred() directly from linux_sethostname(), as it just
wraps userland_sysctl(), which performs necessary privilege checks as
part of its normal operation.

MFC after:	1 week
2006-08-25 11:02:42 +00:00
davidxu
fa0e6a0558 Same as previous change, the user provided priority should be reversed
too.
2006-08-25 10:05:30 +00:00
sos
632c97e1f1 Properly initialize and destroy the RAID lock.
Also dont mess with RAID's thats not attached yet and avoid panic.
2006-08-25 09:33:56 +00:00
thompsa
e1f848cfb4 Fix spelling. 2006-08-25 08:25:35 +00:00
rwatson
31d250192d Remove $P4$ from this file; other then temporarily P4-local work in
progress the kernel audit code in CVS is considered authoritative.
This will ease $P4$-related merging issues during the CVS loopback.

Obtained from:	TrustedBSD Project
2006-08-25 07:30:23 +00:00
davidxu
e2f7e9cc95 Initialize kg_base_user_pri. 2006-08-25 06:29:16 +00:00
davidxu
8e3f035b3f Add user priority loaning code to support priority propagation for
1:1 threading's POSIX priority mutexes, the code is no-op unless
priority-aware umtx code is committed.
2006-08-25 06:12:53 +00:00
alc
d108c1d6d1 The return value from vm_pageq_add_new_page() is not used. Eliminate it. 2006-08-25 04:36:19 +00:00
davidxu
dd7f1d7e06 Add member kg_base_user_pri and flag TDF_UBORROWING, they will be used
to support userland priority propagation for 1:1 threading.
2006-08-25 03:15:27 +00:00
grehan
9053cfbe6a Remove file that snuck in accidentally in Marcel's gdb commit. 2006-08-25 00:21:48 +00:00
cognet
d4600e67df Finally bring it support for the i80219 XScale processor.
Submitted by:	Max M. Boyarov <m.boyarov bsd by>
2006-08-24 23:51:28 +00:00
cognet
ccd457af25 Use ELFDATA2MSB if we're building big endian.
Noticed by:	Oleksandr Tymoshenko <gonzo freebsd org>
2006-08-24 23:00:03 +00:00
marius
5e65c8cd9e Remove the DPMS code in creator_blank_display(), as it causes some
LCDs to blink in the V_DISPLAY_ON case, at least in combination with
some 13W3-VGA-adaptors (what's exactly going on is unclear though,
as it happens when all of H-sync, V-sync and video output are enabled
and not touching the sync bits from the preset fixes it). Thus
creator_blank_display() now is reduced to turning the video output
on/off.
Although that DPMS code did what the XFree86/Xorg sunffb(4x) does,
it was questionable in the first place, as both implementations
also turn(ed) off the video output on standby and suspend, thus most
likely causing the monitor to turn off instead of entering standby
or suspend as intended (at least my monitors don't).

Reported and tested by:	Patrick Reich
MFC after:		3 days
2006-08-24 22:00:24 +00:00