Commit Graph

133202 Commits

Author SHA1 Message Date
Pyun YongHyeon
8b51df84e9 Increase a maximum segment size of DMA to 4096. Previously it used
MCLBYTES for the segment size but it used too many Tx descriptors in
TSO case.
While I'm here adjust maximum size of the sum of all segment lengths
in a given DMA mapping to 65535, the maximum size, in bytes, of a IP
packet.
2007-06-11 02:00:50 +00:00
Pyun YongHyeon
cf7a67bf4b Disable automatic IP ID increment. Due to a hardware bug the automatic
IP ID increment in TSO case generated corrupted IP packets.
This change brings back TSO capability.
2007-06-11 01:55:09 +00:00
Ariff Abdullah
bdfbdcec6a Filter/compress the amount of channel trigger. This should reduce
much of lock/unlock contentions within the interrupt handler. Most
of these drivers only need PCMTRIG_START or STOP (ABORT).

Discussed with:		scottl
2007-06-11 00:49:46 +00:00
Marcel Moolenaar
2b39bb4f4f Use default options for default partitioning schemes, rather than
making the relevant files standard. This avoids duplication and
makes it easier to override/disable unwanted schemes. Since ARM
doesn't have a DEFAULTS configuration file, leave the source
files for the BSD and MBR partitioning schemes in files.arm for
now.
2007-06-11 00:38:06 +00:00
Alan Cox
752bb3876c Add the machine-specific definitions for configuring the new physical
memory allocator.

Set the size of phys_avail[] using one of these definitions.

Approved by:	re
2007-06-10 23:39:07 +00:00
Ariff Abdullah
f6cdab92db - Add codec id for ALC660 [1]
- Add codec id for AD1988B, along with fixing its line-in and other
  issues (with proper quirks). [2]

Submitted by:	[1] barbara.xxx1975@libero.it
             	[2] Oliver Brandmueller ob@e-Gitt.NET
MFC after:	3 days
2007-06-10 23:01:40 +00:00
Attilio Rao
393a081d42 Optimize vmmeter locking.
In particular:
- Add an explicative table for locking of struct vmmeter members
- Apply new rules for some of those members
- Remove some unuseful comments

Heavily reviewed by: alc, bde, jeff
Approved by: jeff (mentor)
2007-06-10 21:59:14 +00:00
Andre Oppermann
f194524fb1 Fix a case in tcp_do_segment() where tcp_update_sack_list() would
be called with an incorrect segment end value.  tcp_reass() may
trim segments when they overlap with already existing ones in the
reassembly queue.  Instead of saving the segment end value before
the call to tcp_reass() compute it on the fly based on the effective
segment length afterwards.

This bug was not really problematic as no information got lost and
the eventual SACK information computation was correct nontheless.

MFC after:	1 week
2007-06-10 21:07:21 +00:00
Andre Oppermann
e8949f7407 Fix style for comments, be more verbose and add some more. 2007-06-10 20:59:22 +00:00
David Malone
e37d2b3001 Some improvements to the int-type printing code based on suggestions by bde. 2007-06-10 20:11:52 +00:00
David Malone
fd8c668afc Fix a number of WARNS, including printf, constness and unsigned comparison
warnings.
2007-06-10 19:32:20 +00:00
David Malone
21e1f59618 Some style improvements suggested by bde, including removing an
unused include, adding parens for return and sizeof and renaming,
adding some missing whitespace and sorting some variables.
2007-06-10 19:13:40 +00:00
Stefan Farfeleder
47517a7042 Merge NetBSD changes, among them:
el.c 1.44, el.h 1.17, editline.3 1.53, histedit.h 1.31:
# add EL_GETFP, and EL_SETFP.

el.c 1.42, term.c 1.46, term.h 1.18, editline.3 1.52, histedit.h 1.29:
# - Add more readline functions, enough for gdb-6.5
# - Make el_get varyadic, and implement EL_GETTC.
# - XXX: the EL_SETTC api will change in the future.

Note: The latter change breaks the ABI of the el_get() function.

Approved by:	re (kensmith)
2007-06-10 19:06:09 +00:00
Yaroslav Tykhiy
9cd40e64b4 Now pam_nologin(8) will provide an account management function
instead of an authentication function.  There are a design reason
and a practical reason for that.  First, the module belongs in
account management because it checks availability of the account
and does no authentication.  Second, there are existing and potential
PAM consumers that skip PAM authentication for good or for bad.
E.g., sshd(8) just prefers internal routines for public key auth;
OTOH, cron(8) and atrun(8) do implicit authentication when running
a job on behalf of its owner, so their inability to use PAM auth
is fundamental, but they can benefit from PAM account management.

Document this change in the manpage.

Modify /etc/pam.d files accordingly, so that pam_nologin.so is listed
under the "account" function class.

Bump __FreeBSD_version (mostly for ports, as this change should be
invisible to C code outside pam_nologin.)

PR:		bin/112574
Approved by:	des, re
2007-06-10 18:57:20 +00:00
Marcel Moolenaar
6ceeb2bc16 Work around a firmware bug in the HP rx2660, where in ACPI an I/O port
is really a memory mapped I/O address. The bug is in the GAS that
describes the address and in particular the SpaceId field. The field
should not say the address is an I/O port when it clearly is not.

With an additional check for the IA64_BUS_SPACE_IO case in the bus
access functions, and the fact that I/O ports pretty much not used
in general on ia64, make the calculation of the I/O port address a
function. This avoids inlining the work-around into every driver,
and also helps reduce overall code bloat.
2007-06-10 16:53:01 +00:00
Marcel Moolenaar
0c94ac1cd7 Fix bogon in previous commit: <machine/cpu.h> is still needed. 2007-06-10 16:32:08 +00:00
Matt Jacob
adb0d36d03 Cast len to be a uintmax_t and make format in KASSERT match so as
to avoid different sizes on different platforms types of complaints.

Reviewed by:	Ariff
2007-06-10 15:46:34 +00:00
Matt Jacob
471f8f34b5 Remove const type qualifier from a function- gcc4.2 doesn't accept it.
Reviewed by:	Ariff
2007-06-10 15:45:29 +00:00
Olivier Houchard
9f547eadb7 Initialize the dma tag's bounce_zone to NULL if we didn't allocate it. 2007-06-10 12:33:01 +00:00
Christian Brueffer
4b9f7fd11c Remove /usr/X11R6 and subdirs.
MFC after:	3 days
2007-06-10 08:51:03 +00:00
Warner Losh
ab8c137045 Prefer device_printf over printf
Eliminate cdce_unit from softc.
2007-06-10 07:33:48 +00:00
Warner Losh
ed6ed00ed0 Prefer device_printf over printf. Eliminate axe_unit as it is no
longer required.
2007-06-10 07:24:32 +00:00
Ceri Davies
f18f2fc7fd Backout mess mistakenly committed with manpage update. 2007-06-10 06:18:04 +00:00
Ceri Davies
664fd46b84 Document SCTP support. 2007-06-10 06:11:03 +00:00
Matt Jacob
4f9822d264 Remove 'inline' qualifiers from functions which are not, in fact, inlines. 2007-06-10 04:54:42 +00:00
Matt Jacob
8f054c6bd6 Cast the ioctl define to the type of the variable being switched on. 2007-06-10 04:53:13 +00:00
Matt Jacob
fc2ca23fa3 Remove unused variable. 2007-06-10 04:51:03 +00:00
Matt Jacob
ad37a275f6 Init timespec to zero fo quiesce warnings. 2007-06-10 04:42:20 +00:00
Matt Jacob
3a4ac24970 Quiesce warnings by initializing irql values to zero. 2007-06-10 04:40:13 +00:00
Matt Jacob
2ba956ed13 Ensure that newpath is always initialized, even for the error case. 2007-06-10 04:37:22 +00:00
Matt Jacob
808ec29326 Commit for Nate his "guidelines for submitting quirks". 2007-06-10 04:31:55 +00:00
Marcel Moolenaar
d23391e38d The definition of CACHELINESIZE moved from <machine/cpu.h> to
<machine/md_var.h>.
2007-06-10 03:13:56 +00:00
Matt Jacob
a659386c7e Remove unused variable. 2007-06-10 01:50:05 +00:00
Matt Jacob
26756b7a58 The new compiler can't quite follow the logic of has_stime and
complains about using uninitialized tags in stime.
2007-06-10 01:49:17 +00:00
Matt Jacob
9b73d2396a Initialized ets to zero. This is arguably a gcc bug in that ets is always
set to rts when timeout is non-NULL and then timevalid is set and ets is
only checked later when timervalid is set.
2007-06-10 01:43:11 +00:00
Matt Jacob
16ccae5559 Complete an initialization to make gcc 4.2 happy. 2007-06-10 01:28:55 +00:00
Matt Jacob
cffc6c3fe1 Initialize devname. 2007-06-10 01:28:26 +00:00
Ken Smith
3c7e4206c2 Add ofw_bus_if.h as a dependency on sparc64. Without this sparc64 kernel
builds had been succeeding if run serially but could fail if run in
parallel because the bge module build might start before ofw_bus_if.h
got created as part of the mainline kernel build.

Diagnosis and patch by:	ru
2007-06-10 00:58:41 +00:00
Alan Cox
11752d88a2 Add a new physical memory allocator. However, do not yet connect it
to the build.

This allocator uses a binary buddy system with a twist.  First and
foremost, this allocator is required to support the implementation of
superpages.  As a side effect, it enables a more robust implementation
of contigmalloc(9).  Moreover, this reimplementation of
contigmalloc(9) eliminates the acquisition of Giant by
contigmalloc(..., M_NOWAIT, ...).

The twist is that this allocator tries to reduce the number of TLB
misses incurred by accesses through a direct map to small, UMA-managed
objects and page table pages.  Roughly speaking, the physical pages
that are allocated for such purposes are clustered together in the
physical address space.  The performance benefits vary.  In the most
extreme case, a uniprocessor kernel running on an Opteron, I measured
an 18% reduction in system time during a buildworld.

This allocator does not implement page coloring.  The reason is that
superpages have much the same effect.  The contiguous physical memory
allocation necessary for a superpage is inherently colored.

Finally, the one caveat is that this allocator does not effectively
support prezeroed pages.  I hope this is temporary.  On i386, this is
a slight pessimization.  However, on amd64, the beneficial effects of
the direct-map optimization outweigh the ill effects.  I speculate
that this is true in general of machines with a direct map.

Approved by:	re
2007-06-10 00:49:16 +00:00
Attilio Rao
bdf08be439 Fix a bug caming from the committing a pre-merge version of the patch
instead than a post-merge version (respect to another rusage fix).

Reported by: marcel
Approved by: jeff(mentor)
2007-06-10 00:28:41 +00:00
Marcel Moolenaar
55b5660de4 Work around an integer overflow in expression `3 * maxbufspace / 4',
when maxbufspace is larger than INT_MAX / 3. The overflow causes a
hard hang on ia64 when physical memory is sufficiently large (8GB).
2007-06-09 23:41:14 +00:00
Marcel Moolenaar
205199b13d Synchronize the instruction cache after writing to memory. This is
needed for breakpoints to work.
2007-06-09 22:15:13 +00:00
Marcel Moolenaar
01bd17cc99 Add kdb_cpu_sync_icache(), intended to synchronize instruction
caches with data caches after writing to memory. This typically
is required to make breakpoints work on ia64 and powerpc. For
those architectures the function is implemented.
2007-06-09 21:55:17 +00:00
Attilio Rao
a1fe14bc33 rufetch and calcru sometimes should be called atomically together.
This patch fixes places where they should be called atomically changing
their locking requirements (both assume per-proc spinlock held) and
introducing rufetchcalc which wrappers both calls to be performed in
atomic way.

Reviewed by: jeff
Approved by: jeff (mentor)
2007-06-09 21:48:44 +00:00
Beech Rintoul
52d1461fdc - Add myself.
Approved by:	sat (mentor)
2007-06-09 21:46:04 +00:00
Andre Oppermann
104ebb2a45 Make the handling of the tcp window explicit for the SYN_SENT case
in tcp_outout().  This is currently not strictly necessary but paves
the way to simplify the entire SYN options handling quite a bit.
Clarify comment.  No change in effective behavour with this commit.

RFC1323 requires the window field in a SYN (i.e., a <SYN> or
<SYN,ACK>) segment itself never be scaled.
2007-06-09 21:19:12 +00:00
Andre Oppermann
5396d0f8d8 Remove some bogosity from the SYN_SENT case in tcp_do_segment
and simplify handling of the send/receive window scaling.  No
change in effective behavour.

RFC1323 requires the window field in a SYN (i.e., a <SYN> or
<SYN,ACK>) segment itself never be scaled.

Noticed by:	yar
2007-06-09 21:09:49 +00:00
Attilio Rao
86a49dea5b Since locking in kern/subr_prof.c is changed a bit, we need nomore of
time_lock spinlock exported.

Approved by: jeff (mentor)
2007-06-09 19:41:14 +00:00
Andre Oppermann
b7de7d87a0 Don't send pure window updates when the peer has closed the connection
and won't ever send more data.
2007-06-09 19:39:14 +00:00
Attilio Rao
a140976eb4 The current rusage code show peculiar problems:
- Unsafeness on ruadd() in thread_exit()
- Unatomicity of thread_exiit() in the exit1() operations

This patch addresses these problems allocating p_fd as part of the
process and modifying the way it is accessed.

A small chunk of this patch, resolves a race about p_state in kern_wait(),
since we have to be sure about the zombif-ing process.

Submitted by: jeff
Approved by: jeff (mentor)
2007-06-09 18:56:11 +00:00