Commit Graph

163921 Commits

Author SHA1 Message Date
John Baldwin
a49dcb469c Fix some off-by-one errors with the ending address of candidate regions
when attempting to grow a window.
2011-06-10 13:24:56 +00:00
John Baldwin
049dc0d1ff Implement BUS_ADJUST_RESOURCE() for the x86 drivers that sit between the
Host-PCI bridge drivers and nexus.
2011-06-10 12:30:16 +00:00
Craig Rodrigues
78315071f5 Obtain bswap64() function implementation from
version 1.3 of src/common/lib/libc/gen/bswap64.c in NetBSD.

Obtained from: NetBSD
2011-06-10 01:13:15 +00:00
Jilles Tjoelker
292e667663 sh: Do parameter expansion before printing PS4 (set -x).
The function name expandstr() and the general idea of doing this kind of
expansion by treating the text as a here document without end marker is from
dash.

All variants of parameter expansion and arithmetic expansion also work (the
latter is not required by POSIX but it does not take extra code and many
other shells also allow it).

Command substitution is prevented because I think it causes too much code to
be re-entered (for example creating an unbounded recursion of trace lines).

Unfortunately, our LINENO is somewhat crude, otherwise PS4='$LINENO+ ' would
be quite useful.
2011-06-09 23:12:23 +00:00
Xin LI
b24bfc5ae8 MFV: Update to less v444.
MFC after:	2 weeks
2011-06-09 22:52:57 +00:00
Xin LI
5b2db585ea Vendor import of less v444. 2011-06-09 22:50:10 +00:00
Navdeep Parhar
8a6a6922d9 cxgbetool: a tool for the cxgbe(4) driver. 2011-06-09 20:21:45 +00:00
Bjoern A. Zeeb
375c46563c Contrary to when returning in all-good cases at the end of functions we
did not free memory (1) or close the file descriptor (2) in error cases.

Reported by:	Mark Johnston (1)
Reported by:	attilio (2)
Reviewed by:	jhb
Sponsored by:	Sandvine Incorporated
MFC after:	1 week
2011-06-09 19:52:28 +00:00
Nathan Whitehorn
b9856e92ac Add -Wa,-many to CFLAGS on PowerPC. This aids in building a kernel using
clang, which would otherwise complain about some 64-bit bridge mode
instructions.
2011-06-09 19:47:30 +00:00
Alexander Motin
0eac2d6be3 Intel NM10 chipset's SATA controller has same PCI ID and revision as ICH7's,
but has only 2 SATA ports instead of 4. The worst part is that SStatus and
SError registers for missing ports are not implemented and return wrong
values (0xffffffff), that caused infinite reset loop.

Just ignore that SError value while I found no better way to identify them.
2011-06-09 16:30:13 +00:00
Doug Barton
3f6c8f3765 Minor typo, fix 2 attributions 2011-06-09 06:10:39 +00:00
Jung-uk Kim
bc8e4ad2ef Tidy up r222866.
- Re-add accidentally removed atomic op. for sysctl(9) handler.
- Remove a period(`.') at the end of a debugging message.
- Consistently spell "low" for "TSC-low" timecounter throughout.

Pointed out by:	bde
2011-06-08 23:44:59 +00:00
Kenneth D. Merry
b4775b4c1d Add dump.c to the rtsol build. It is needed now that sec2str is non-static
and used in rtsold.c.
2011-06-08 21:59:07 +00:00
Jilles Tjoelker
725cc7854e sh: Add simple tests for set -x and PS4. 2011-06-08 21:58:19 +00:00
David E. O'Brien
9fe1fe8204 Simply post r222273. 2011-06-08 21:29:33 +00:00
David Christensen
76dbe6498b - Major reorganization of mbuf handling throughout the driver to
increase robustness (no more calls to panic(9)) and simplify
  code.
- Allocate RX/TX data structures as a single buffer rather than
  an array of 4KB pages to simplify code.
- Fixed LRO (aka TPA) code.  Removed kernel module parameter and
  support enabling disabling LRO through ifconfig(8) command line.
  LRO is still disabled by default but should be enabled for best
  performance on an endpoint device.
- Fixed statistcs code and removed kernel module parameter (stats
  should just work).
- Added many software counters to help identify the cause of some
  performance issues.
- Streamlined adapter internal init/stop code paths.
- Fiddled with debug code (adding some here, removing some there).
- Continued style(9) adjustments.
2011-06-08 21:18:14 +00:00
Jung-uk Kim
26e6537a73 Increase quality of TSC (or TSC-low) timecounter to 1000 if it is P-state
invariant.  For SMP case (TSC-low), it also has to pass SMP synchronization
test and the CPU vendor/model has to be white-listed explicitly.  Currently,
all Intel CPUs and single-socket AMD Family 15h processors are listed here.

Discussed with:	hackers
2011-06-08 20:08:06 +00:00
Jung-uk Kim
95f2f0985b Introduce low-resolution TSC timecounter "TSC-low". It replaces the normal
TSC timecounter if TSC frequency is higher than ~4.29 MHz (or 2^32-1 Hz) or
multiple CPUs are present.  The "TSC-low" frequency is always lower than a
preset maximum value and derived from TSC frequency (by being halved until
it becomes lower than the maximum).  Note the maximum value for SMP case is
significantly lower than UP case because we want to reduce (rare but known)
"temporal anomalies" caused by non-serialized RDTSC instruction.  Normally,
it is still higher than "ACPI-fast" timecounter frequency (which was default
timecounter hardware for long time until r222222) to be useful.
2011-06-08 19:38:31 +00:00
Attilio Rao
e3adb68519 In the current code, a double panic condition may lead to dumps
interleaving.
Signal dumping to happen only for the first panic which should be the
most important.

Sponsored by:	Sandvine Incorporated
Submitted by:	Nima Misaghian (nmisaghian AT sandvine DOT com)
MFC after:	2 weeks
2011-06-08 19:28:59 +00:00
Jung-uk Kim
75aa1914d5 Remove a redundant assignment since r221703. 2011-06-08 18:52:42 +00:00
Hiroki Sato
06056832ec - Accumulate RA options instead of replacing old ones when a new RA arrived.
RFC 4861 6.3.4 clearly defines handling multiple RAs in this way.

- RDNSS/DNSSL options from multiple RAs on a single link will be
  gathered and sent to resolvconf(8).

- Call "resolvconf -d" only after at least one RDNSS or DNSSL option is
  received and then all of them are expired.

- The rtsold.dump output now supports displaying a list of the RA options.

- Use more human-readable expression for logging values of struct timeval.

Discussed with:	ume
2011-06-08 16:03:29 +00:00
Andreas Tobler
d91c258074 - Improve error handling.
- Add retry loops in the i2c read/write functions.
- Combied the ADC channel selection and readout of the value into
  one iicbus_transfer to avoid possible races.

Reviewed by: nwhitehorn
2011-06-08 16:00:30 +00:00
Nathan Whitehorn
f33b8de1dc Compile RTLD with global dot symbols on 64-bit PowerPC, as a crutch for
GDB's ability to locate r_debug_state (which is actually the only function
that need be compiled this way).
2011-06-08 13:23:35 +00:00
Bjoern A. Zeeb
869052041d Add the missing call to ip6_ipsec_filtertunnel() to be able to control
whether decapsulated IPsec packets will be passed to pfil again depending
on the setting of the net.ip6.ipsec6.filtertunnel sysctl.

PR:		kern/157670
Submitted by:	Manuel Kasper (mk neon1.net)
MFC after:	2 weeks
2011-06-08 10:59:36 +00:00
Ruslan Ermilov
0b545d875b Added FreeBSD 8.3. 2011-06-08 08:16:32 +00:00
Andriy Gapon
234dab4a82 remove code for dynamic offlining/onlining of CPUs on x86
The code has definitely been broken for SCHED_ULE, which is a default
scheduler.  It may have been broken for SCHED_4BSD in more subtle ways,
e.g. with manually configured CPU affinities and for interrupt devilery
purposes.
We still provide a way to disable individual CPUs or all hyperthreading
"twin" CPUs before SMP startup.  See the UPDATING entry for details.

Interaction between building CPU topology and disabling CPUs still
remains fuzzy: topology is first built using all availble CPUs and then
the disabled CPUs should be "subtracted" from it.  That doesn't work
well if the resulting topology becomes non-uniform.

This work is done in cooperation with Attilio Rao who in addition to
reviewing also provided parts of code.

PR:		kern/145385
Discussed with:	gcooper, ambrisko, mdf, sbruno
Reviewed by:	attilio
Tested by:	pho, pluknet
X-MFC after:	never
2011-06-08 08:12:15 +00:00
Ruslan Ermilov
c8c215e682 Pull up all vendor changes to mdoc(7).
This also replaces the local fix in r219209 that made .Ac emit
ASCII angle quotes with an official fix.  In the official fix,
ASCII quotes are output when using the .Aq, .Ao and .Ac calls,
but only when nested into the .An macro.

PR:		gnu/154822
2011-06-08 08:08:42 +00:00
Hiroki Sato
b4da9fbccd - Disable "resolvconf -d" temporarily to avoid extra invocations of the script
under a certain condition.
- Fix argv handling.

Spotted by:	ume
2011-06-08 04:06:56 +00:00
Bjoern A. Zeeb
ffe8cd7b10 Correct comments and debug logging in ipsec to better match reality.
MFC after:	3 days
2011-06-08 03:02:11 +00:00
Xin LI
df6a289e76 Use .Dq instead of hardcoding `` and ''.
Suggested by:	gjb
2011-06-08 00:31:10 +00:00
Marius Strobl
ab267f9dbf - For the case when tl1_align(_trap) is used to call rsf_fatal via
RSF_FATAL we need to switch to alternate globals for KSTACK_CHECK just
  like tl1_data_excptn(_trap) does. This is more or less cosmetic because
  in case RSF_FATAL is called we're already heading south.
- Correct an END().
- Read the window state from the correct register for a CATR().
2011-06-07 23:15:21 +00:00
Martin Matuska
baa256da8c Silence notice on pool creation, import and access.
Suggested by:	Jeremy Chadwick (freebsd-stable@)
Discussed with:	pjd
MFC after:	1 week
2011-06-07 20:46:31 +00:00
Marko Zec
2fe7ca2ca6 Set curvnet context in a callout-trigerred code path.
MFC after:	3 days
2011-06-07 20:46:03 +00:00
Bjoern A. Zeeb
ec49fe398a For the moment document the possible problem introduced with dynamic address
family detection in world, mostly noticed by ifconfig(8), when running with
an old kernel.

Reported by:	Andrzej Tobola (ato iem.pw.edu.pl)
Reported by:	gcooper
2011-06-07 19:39:34 +00:00
Xin LI
c73830758a Add a special mount option "failok" to indicate that the administrator wants
the system to proceed to boot without bailing out into single user mode,
even when the file system can not be successfully mounted.

This option is implemented in mount(8) and not passed into kernel.

MFC after:	1 month
2011-06-07 18:48:49 +00:00
John Baldwin
c721b93449 Log the socket address passed as the destination to sendto() and sendmsg()
via ktrace.

MFC after:	1 week
2011-06-07 17:40:33 +00:00
Marius Strobl
c40847145b Adapt CATR() to r222813. This is somewhat tricky as we can't afford using
more than three temporary register in several places CATR() is used so
this code trades instructions in for registers. Actually, this still isn't
sufficient and CATR() has the side-effect of clobbering %y. Luckily, with
the current uses of CATR() this either doesn't matter or we are able to
(save and) restore it.
Now that there's only one use of AND() and TEST() left inline these.
2011-06-07 17:33:39 +00:00
Marius Strobl
3bd5692b1f Fix a problem with r222813; given that we may only operate on interrupt
globals here but clobber %y save and restore the latter.
2011-06-07 17:19:14 +00:00
Alexander Motin
cbebc90de0 Make automatic hw.snd.default_unit choice a bit more intelligent. Instead
of just setting it to the first registered device, reevaluate it for each
device registered, trying to choose best candidate, unless one was forced.
For now use such preference order: play&rec, play, rec.

As side effect, this should workaround the situation when HDMI audio output
of the video card, usually not connected to anything, becomes default, that
requires manual user intervention to make sound working. If at some point
this won't be enough, we can try to fetch some additional priority flags
from the device driver.
2011-06-07 17:01:52 +00:00
Jaakko Heinonen
189075e9db Remove a gratuitous newline. This should be a non-functional change.
PR:		bin/153667
Submitted by:	Craig Leres
MFC after:	1 week
2011-06-07 16:23:27 +00:00
Hiroki Sato
5a10f1ccec Fix a bug that prevents tc=xxx from working. 2011-06-07 15:40:17 +00:00
Adrian Chadd
e484e92770 Since HAL_PHYERR_* is used in the radar code, always include ah_desc.h. 2011-06-07 14:00:47 +00:00
Hiroki Sato
07a42575b4 - Use ELM_MALLOC() for struct rainfo.
- Fix a missing back pointer assignment in struct prefix to struct rainfo
  when addr="" is specified.  This caused SIGSEGV.

- Insert a prefix element to a tail queue after setting parameters.
2011-06-07 12:00:29 +00:00
Andrey V. Elsukov
08892bf4bf Do not use LCM from stripesize and user specified alignment value.
When user wants have specific alignment - do what user wants.
Use stripesize as alignment value in case, when some of gpart's
arguments are ommitted for automatic calculation.

Suggested by:	mav
2011-06-07 11:11:11 +00:00
Julien Laffaye
d3edd193e0 - Add myself to calendar.freebsd
- Add the forgotten relation to mentors in committers-ports.dot

Approved by:	bapt@ (mentor)
2011-06-07 09:06:15 +00:00
Adrian Chadd
3d423111f6 Flesh out a new HAL method to fetch the radar PHY error frame information.
For the AR5211/AR5212, this is apparently a one byte pulse duration
counter value. It is only coded up here for the AR5212 as I don't have
any AR5211-series hardware to test it on.

This information was extracted from the Madwifi DFS branch along with
some local additions.

Please note - all this does is extract out the radar event duration,
it in no way reflects the presence of a radar. Further code is needed
to take a set of radar events and filter them to extract out correct
radar pulse trains (and ignore other events.)

For further information, please see:

http://wiki.freebsd.org/dev/ath_hal%284%29/RadarDetection

This includes references to the relevant patents which describe what
is going on.

Obtained from:	Madwifi
2011-06-07 09:03:28 +00:00
Attilio Rao
033e1e35d3 etire the cpumask_t type and replace it with cpuset_t usage.
This is intended to fix the bug where cpu mask objects are
capped to 32.  MAXCPU, then, can now arbitrarely bumped to whatever
value.  Anyway, as long as several structures in the kernel are
statically allocated and sized as MAXCPU, it is suggested to keep it
as low as possible for the time being.

Technical notes on this commit itself:
- More functions to handle with cpuset_t objects are introduced.
  The most notable are cpusetobj_ffs() (which calculates a ffs(3)
  for a cpuset_t object), cpusetobj_strprint() (which prepares a string
  representing a cpuset_t object) and cpusetobj_strscan() (which
  creates a valid cpuset_t starting from a string representation).
- pc_cpumask and pc_other_cpus are target to be removed soon.
  With the moving from cpumask_t to cpuset_t they are now inefficient
  and not really useful.  Anyway, for the time being, please note that
  access to pcpu datas is protected by sched_pin() in order to avoid
  migrating the CPU while reading more than one (possible) word
- Please note that size of cpuset_t objects may differ between kernel
  and userland.  While this is not directly related to the patch itself,
  it is good to understand that concept and possibly use the patch
  as a reference on how to deal with cpuset_t objects in userland, when
  accessing kernland members.
- KTR_CPUMASK is changed and now is represented through a string, to be
  set as the example reported in NOTES.

Please additively note that no MAXCPU is bumped in this patch, but
private testing has been done until to MAXCPU=128 on a real 8x8x2(htt)
machine (amd64).

Please note that the FreeBSD version is not yet bumped because of
the upcoming pcpu changes.  However, note that this patch is not
targeted for MFC.

People to thank for the time spent on this patch:
- sbruno, pluknet and Nicholas Esborn (nick AT desert DOT net) tested
  several revision of the patches and really helped in improving
  stability of this work.
- marius fixed several bugs in the sparc64 implementation and reviewed
  patches related to ktr.
- jeff and jhb discussed the basic approach followed.
- kib and marcel made targeted review on some specific part of the
  patch.
- marius, art, nwhitehorn and andreast reviewed MD specific part of
  the patch.
- marius, andreast, gonzo, nwhitehorn and jceel tested MD specific
  implementations of the patch.
- Other people have made contributions on other patches that have been
  already committed and have been listed separately.

Companies that should be mentioned for having participated at several
degrees:
- Yahoo! for having offered the machines used for testing on big
  count of CPUs.
- The FreeBSD Foundation for having sponsored my devsummit attendance,
  which has been instrumental.
- Sandvine for having offered offices and infrastructure during
  development.

(I really hope I didn't forget anyone, if it happened I apologize in
advance).
2011-06-07 08:46:13 +00:00
Attilio Rao
5e9857e76b MFC 2011-06-07 08:24:29 +00:00
Attilio Rao
f0fcb36793 Add an UPDATE entry. 2011-06-07 08:07:41 +00:00
Attilio Rao
74e4245e3f Bring back the number of CPU to 32. 2011-06-07 08:05:23 +00:00