Sean Bruno [Mon, 18 Jun 2012 23:18:49 +0000 (23:18 +0000)]
Document support for Intel Enhanced Speedstep Tech interface
of cpufreq(4) via a new man page est(4)
Document the two exposed tuneables of est(4).
I'd appreciate more reviews of content if possible. I gleaned
the information contained herein from sys/x86/cpufreq/est.c and
the Intel reference documentation
Rick Macklem [Mon, 18 Jun 2012 22:17:28 +0000 (22:17 +0000)]
Fix the NFSv4 client for the case where mmap'd files are
written, but not msync'd by a process. A VOP_PUTPAGES()
called when VOP_RECLAIM() happens will usually fail, since
the NFSv4 Open has already been closed by VOP_INACTIVE().
Add a vm_object_page_clean() call to the NFSv4 client's
VOP_INACTIVE(), so that the write happens before the NFSv4
Open is closed. kib@ suggested using vgone() instead and
I will explore this, but this patch fixes things in the
meantime. For some reason, the VOP_PUTPAGES() is still
attaempted in VOP_RECLAIM(), but having this fail doesn't
cause any problems except a "stateid0 in write" being logged.
Adjust the fix in r236953, by not generating the signal manually, but
performing the return to usermode using full return path. This
consolidates the handling of exceptional situations in less number of
places, and is less code as well.
Marius Strobl [Mon, 18 Jun 2012 20:19:07 +0000 (20:19 +0000)]
Revert r236529, re-enabling verification of the flashed content as
the underlying problem was dealt with in r237239 (in fact, disabling
verification also actually only made the problem less likely to occur).
Marius Strobl [Mon, 18 Jun 2012 20:14:42 +0000 (20:14 +0000)]
Revert the part of r236495 that introduced checking of SPI_SR_TXEMPTY
for TX transfer completion as for reasons unknown this occasionally
causes SPI_SR_RXBUFF and SPI_SR_ENDRX to not rise.
In any case, once the RX part of the transfer is done it's obvious
that the preceding TX part had finished and checking of SPI_SR_TXEMPTY
was introduced to rule out a possible cause for the data corruption
mentioned in r236495 but which didn't turn out to be the problem
anyway.
Alan Cox [Mon, 18 Jun 2012 16:21:59 +0000 (16:21 +0000)]
Add PV chunk and list locking to pmap_page_exists_quick(),
pmap_page_is_mapped(), and pmap_remove_pages(). These functions
are no longer serialized by the pvh global lock.
Make radix lookup on src and dst flow addresses optional
and configurable on per-interface basis.
Remove __inline__ for several functions being called once per
flow (e.g once per 10-20 packets on common traffic flows).
Update manual page to simplify search for BPF data link types.
Adrian Chadd [Mon, 18 Jun 2012 02:08:04 +0000 (02:08 +0000)]
Extend the radiotap code to be aware of the size of any extra vendor
bitmaps that may occur.
The way this works is:
* the beginning of the radiotap frame has a 32 bit "radiotap" namespace
bitmap;
* if the vendor bitmap bit is set, then the next bitmap will be interpreted
as a vendor bitmap;
* this can keep going on and on (ie, more vendor and radiotap namespace
bitmaps can be added) until the last bitmap with no "more bitmaps" set.
Now, the radiotap code gets its grubby fingers into the supplied
radiotap rx/tx buffer and replaces the channel configuration
for each frame. I don't know why it's not up to the drivers themselves
to do this, but I digress. So, if a vendor bitmap (or two, etc) exists,
the offset calculations will be all completely wrong.
This particular patch introduces ieee80211_radiotap_attachv(), which
includes the number of vendor bitmaps (well, any other bitmaps, vendor
or otherwise) between the end of the bitmap/header and the start of the
actual radiotap field entries. This makes the radiotap calculations
"right", so it correctly calculates where to overwrite the channel
configuration.
The long term fix is to go through and make each driver update the channel
configuration, as some of the fields are already being updated.
That, however, is a longer term fix that will need each driver fixed.
I leave that as an exercise to someone in the future.
Matt Jacob [Sun, 17 Jun 2012 21:39:40 +0000 (21:39 +0000)]
Prepare for FC-Tape support. This involved doing a lot of little cleanups
and crosschecks against firmware documentation. We now check and report
FC firmware attributes and at least are now prepared for the upper 48 bits
of f/w attributes (which are probably for the 8100 or later cards). This
involed changing how inbits and outbits are calculated for varios commands,
hopefully clearer and cleaner. This also caused me to clean up the actual
mailbox register usage. Finally, we are now unconditionally using a CRN
for initiator mode.
A longstanding issue with the 2400/2500 is that they do *not* support
a "Prefer PTP followed by loop", which explains why enabling that
caused the f/w to crash.
A slightly more invasive change is to let the firmware load entirely
drive whether multi_id support is enabled or not.
Don't check for race with close on advisory unlock (there is nothing smart we
can do when such a race occurs). This saves lock/unlock cycle for the filedesc
lock for every advisory unlock operation.
On certain newer Intel Atom based motherboards, for instance the D2500CC which I have, syscons in text-mode fails to show the expected
contents due to write errors into video-memory.
At least one of the causes is that we copy from syscons internal buffer
to the video memory with optimized bcopy(9) which uses >16bit operations.
Until now, 32bit and wider operations have always worked on the video
memory, but since I cannot find a single source which says that this
SHALL work, and since these chipsets/bugs are now out there, this
commit changes syscons to always use 16bit copies on i386 & amd64.
This may be relevevant for PR's:
166262
166639
and various other bug reports floating elsewhere on the net, but
I lack hardware to test those.
Davide Italiano [Sun, 17 Jun 2012 13:48:39 +0000 (13:48 +0000)]
Disable hwpmc(4) support for Intel Xeon Sandy Bridge (Model 0x2D).
Due to some differences in MSRs between Xeon Sandy Bridge and Core Sandy
Bridge (Model 0x2A), wrmsr() may generate in a GP# fault exception and so a
panic of the machine.
Davide Italiano [Sun, 17 Jun 2012 13:03:50 +0000 (13:03 +0000)]
The variable 'error' in sys_poll() is initialized in declaration to value
zero but in any case is overwritten by successive copyin(), making the
previous initialization useless. Remove this.
As an added bonus this fixes a style(9) bug.
Adrian Chadd [Sun, 17 Jun 2012 03:08:33 +0000 (03:08 +0000)]
After some discussion with bschmidt@, it's likely better to just go
through ieee80211_suspend_all() and ieee80211_resume_all().
All the other wireless drivers are doing that particular dance.
Eitan Adler [Sun, 17 Jun 2012 02:46:27 +0000 (02:46 +0000)]
attach_generic causes missing devices in /dev when the driver
interacts with some non-highpoint controollers. Change attach_generic to
be off by default.
PR: kern/168910
Submitted by: Richard Yao <ryao@gentoo.org>
Approved by: cperciva
No objections by: -hackers
Obtained from: Gentoo FreeBSD
MFC after: 2 weeks
Attilio Rao [Sat, 16 Jun 2012 21:39:00 +0000 (21:39 +0000)]
Do a more targeted check on the page cache and avoid to check the cache
pointer directly in vnode_pager_setsize() by using newly introduced
vm_page_is_cached() function.
Alan Cox [Sat, 16 Jun 2012 18:56:19 +0000 (18:56 +0000)]
The page flag PGA_WRITEABLE is set and cleared exclusively by the pmap
layer, but it is read directly by the MI VM layer. This change introduces
pmap_page_is_write_mapped() in order to completely encapsulate all direct
access to PGA_WRITEABLE in the pmap layer.
Aesthetics aside, I am making this change because amd64 will likely begin
using an alternative method to track write mappings, and having
pmap_page_is_write_mapped() in place allows me to make such a change
without further modification to the MI VM layer.
As an added bonus, tidy up some nearby comments concerning page flags.
Robert Millan [Sat, 16 Jun 2012 16:51:42 +0000 (16:51 +0000)]
In CTFCONVERT_CMD initialization, check that ${MAKE_VERSION} is defined
before using it. Bootstrap make (as built by usr.bin/make/Makefile.dist)
does not define this variable, but it needs to parse bsd.own.mk in order
to build a complete make.
Revert part of the r235740 which changed separate allocation of the
string buffer for each linelist l_line into one large string. Since
linelists parsed out during the previous passes store the pointers to
previously allocated l_lines, the reallocation caused undefined
behaviour on accessing the buffers, and quite deterministic fault on
freeing them (in mountd(8) startup).
This fixes reading of netgroup(5) file which contains more then one
netgroup.
Brooks Davis [Fri, 15 Jun 2012 19:40:59 +0000 (19:40 +0000)]
MFP4: 212854, 212854
Add a LOCAL_LIB_DIRS variable to complement the existing LOCAL_DIRS
and LOCAL_TOOL_DIRS variables. Directories in LOCAL_LIB_DIRS are
built at the end of the _generic_libs target.
Warner Losh [Fri, 15 Jun 2012 08:37:50 +0000 (08:37 +0000)]
Make it possible to link together a sam and an rm kernel. The results
aren't very pretty yet, but this takes DELAY and cpu_reset and makes
them pointers.
# I worry that these are set too late in the boot, especially cpu_reset.
Warner Losh [Fri, 15 Jun 2012 07:50:26 +0000 (07:50 +0000)]
Collapse the files.at91 and files.at91sam9 back into files.at91.
Create a new option for at91rm9200 support. Set this option in
std.at91. Create a new option for the at91sam9 standard devices. Set
this option in std.at91sam9. Retire files.at91sam9. Add options for
at91sam9x25 SoC and SAM9X25EK board, but don't connect it just yet as
the supporting files aren't quite ready.
Note: device at91rm9200 and device at91sam9 are presently mutually
exclusive.
Warner Losh [Fri, 15 Jun 2012 06:38:55 +0000 (06:38 +0000)]
Take half a step closer towards having a unified atmel kernel by
rearranging where we initialize the time counter and putting the
common stubs into a central place.
Adrian Chadd [Fri, 15 Jun 2012 01:15:59 +0000 (01:15 +0000)]
Convert ath(4) to just use ieee80211_suspend_all() and ieee80211_resume_all().
The existing code tries to use the beacon miss timer to signal that the AP
has gone away. Unfortunately this doesn't seem to be behaving itself.
I'll try to investigate why this is for the sake of completeness.
The result is the STA will stay "associated" to the AP it was associated
with when it suspended. It never receives a bmiss notification so it
never tries reassociating.
Marius Strobl [Thu, 14 Jun 2012 22:19:23 +0000 (22:19 +0000)]
- As a baind-aid, disable ATAPI DMA when using ATA_CAM for these controllers
as well as it causes the kernel to hang during boot.
Reported and tested by: Kevin Oberman
- Use NULL instead of 0 for a pointer.
Marius Strobl [Thu, 14 Jun 2012 21:16:19 +0000 (21:16 +0000)]
- Add support for the FT2232 based egnite Turtelizer 2 JTAG/RS232 Adapter.
This includes adding support for skipping FTDI interfaces used for JTAG
leaving them for userland and just attaching to the RS232 half, similarly
to how the corresponding Linux drivers handles these kind of adapters.
While at it, sort uftdi_devs and return BUS_PROBE_SPECIFIC (because
uftdi_probe() alters the instance variables for better or worse as do
other probe routines of USB drivers) instead of 0.
- Remove duplicated entries for BeagleBone.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
- Remove some stray lines.
Marius Strobl [Thu, 14 Jun 2012 20:49:22 +0000 (20:49 +0000)]
Fix a braino in r236469; the number of DMA tags required for handling
MAXPHYS should be based on PAGE_SIZE rather than SYM_CONF_DMA_BOUNDARY.
While at it, reuse the SYM_CONF_MAX_SG macro for specifying the maximum
number of DMA tags so sym(4) itself doesn't size memory beyond what's
required for handling MAXPHYS.
Doug Barton [Thu, 14 Jun 2012 19:30:31 +0000 (19:30 +0000)]
Improve the functionality of the PORTS_MODULES knob by adding
LOCALBASE/bin and sbin to PATH, allowing dependencies to be found;
adding SRC_BASE and OSVERSION to match the new kernel, and putting
the related builds under MAKEOBJDIRPREFIX so that they only need
to be built once per kernel.
In addition to the PR this includes ideas/contributions from crees
and matthew.
PR: ports/161452
Submitted by: Garrett Cooper <yanegomi@gmail.com>