Andrew Turner [Sat, 3 Nov 2012 22:39:07 +0000 (22:39 +0000)]
Merge the FDT versions of initarm.
The copies of initarm used on platforms with FDT support were almost
identical. The differences were pulled out into separate functions that
were called by initarm.
This change merges the, now identical, copies of initarm and a few of it's
support functions. This is a step towards a common kernel on ARMv6.
1. Have the APs initialize the TLB1 entries from what has been
programmed on the BSP during (early) boot. This makes sure
that the APs get configured the same as the BSP, irrspective
of how FreeBSD was loaded.
2. Make sure to flush the dcache after writing the TLB1 entries
to the boot page. The APs aren't part of the coherency domain
just yet.
3. Set pmap_bootstrapped after calling pmap_bootstrap(). The
FDT code now maps the devices (like OF), and this resulted
in a panic.
4. Since we pre-wire the CCSR, make sure not to map chunks of
it in pmap_mapdev().
Add a MD_ROOT_FSTYPE kernel option. The option specifies the
file system part for the MD_ROOT mount string. Hardcoding the
the file system type as "ufs" is too restrictive.
Add the buildLINT convenience target, handy for build automation.
The automation can set TARGET_ARCH and TARGET and then make various
top-level targets, including buildLINT and buildkernel (with
KERNCONF=LINT). Previously there was no way to generate the LINT
kernel configuration without having to do something exceptionally
painful.
Kirk McKusick [Sat, 3 Nov 2012 18:55:55 +0000 (18:55 +0000)]
When a file is first being written, the dynamic block reallocation
(implemented by ffs_reallocblks_ufs[12]) relocates the file's blocks
so as to cluster them together into a contiguous set of blocks on
the disk.
When the cluster crosses the boundary into the first indirect block,
the first indirect block is initially allocated in a position
immediately following the last direct block. Block reallocation
would usually destroy locality by moving the indirect block out of
the way to keep the data blocks contiguous. This change compensates
for this problem by noting that the first indirect block should be
left immediately following the last direct block. It then tries
to start a new cluster of contiguous blocks (referenced by the
indirect block) immediately following the indirect block.
We should also do this for other indirect block boundaries, but it
is only important for the first one.
Attilio Rao [Sat, 3 Nov 2012 15:57:37 +0000 (15:57 +0000)]
Merge r242395,242483 from mutex implementation:
give rwlock(9) the ability to crunch different type of structures, with
the only constraint that they have a lock cookie named rw_lock.
This name, then, becames reserved from the struct that wants to use
the rwlock(9) KPI and other locking primitives cannot reuse it for
their members.
Namely such structs are the current struct rwlock and the new struct
rwlock_padalign. The new structure will define an object which has the
same layout of a struct rwlock but will be allocated in areas aligned
to the cache line size and will be as big as a cache line.
For further details check comments on above mentioned revisions.
Eitan Adler [Sat, 3 Nov 2012 14:46:15 +0000 (14:46 +0000)]
Revert the change that makes less default.
Since I've committed this I've receieved roughly an equal
amount of email thanking me for making this change
and asking me to revert it.
I've resisted making this change because
new users tend to prefer less over more
and these users are the least likely to know
how to change the PAGER on their own.
Requested by: many
Objected to: just as many
Decision made by: core
Approved by: cperciva
MFC after: 3 days
Xin LI [Fri, 2 Nov 2012 22:07:45 +0000 (22:07 +0000)]
Copy code from scsi_read_write() as mfi_build_syspd_cdb() to build SCSI
command properly. Without this change, mfi(4) always sends 10 byte READ
and WRITE commands, which will cause data corruption when device is
larger than 2^32 sectors.
Jeff Roberson [Fri, 2 Nov 2012 21:04:06 +0000 (21:04 +0000)]
- In cancel_mkdir_dotdot don't panic if the inodedep is not available. If
the previous diradd had already finished it could have been reclaimed
already. This would only happen under heavy dependency pressure.
The r241025 fixed the case when a binary, executed from nullfs mount,
was still possible to open for write from the lower filesystem. There
is a symmetric situation where the binary could already has file
descriptors opened for write, but it can be executed from the nullfs
overlay.
Handle the issue by passing one v_writecount reference to the lower
vnode if nullfs vnode has non-zero v_writecount. Note that only one
write reference can be donated, since nullfs only keeps one use
reference on the lower vnode. Always use the lower vnode v_writecount
for the checks.
Introduce the VOP_GET_WRITECOUNT to read v_writecount, which is
currently always bypassed to the lower vnode, and VOP_ADD_WRITECOUNT
to manipulate the v_writecount value, which manages a single bypass
reference to the lower vnode. Caling the VOPs instead of directly
accessing v_writecount provide the fix described in the previous
paragraph.
Gleb Smirnoff [Fri, 2 Nov 2012 13:51:47 +0000 (13:51 +0000)]
Remove separate paragraph on ASCII messages and instead
provide this information along with messages documentation,
like this done in manual pages for other netgraph nodes.
Gleb Smirnoff [Fri, 2 Nov 2012 05:26:33 +0000 (05:26 +0000)]
- If DRM_DEBUG_DEFAULT_ON is defined, then initialize drm_debug_flagi to
all supported debugging bits.
- If DRM_DEBUG_DEFAULT_ON isn't defined, then initialize drm_debug_flag
to zero.
DRM_DEBUG_DEFAULT_ON is defined when module is build with -DDEBUG_DRM
or if kernel config has 'options DEBUG_DRM'.
Remove the recently added sysctl variable net.pfil.forward.
Instead, add protocol specific mbuf flags M_IP_NEXTHOP and
M_IP6_NEXTHOP. Use them to indicate that the mbuf's chain
contains the PACKET_TAG_IPFORWARD tag. And do a tag lookup
only when this flag is set.
Eitan Adler [Fri, 2 Nov 2012 00:17:30 +0000 (00:17 +0000)]
10 years too late add support for "2.88MB 3.5in Extra High Density"
floppies.
Its unlikely that anyone actually uses these or cares about these
anymore, since we support other floppy types and this change doesn't
hurt - just add it.
Juli Mallett [Thu, 1 Nov 2012 20:39:39 +0000 (20:39 +0000)]
Don't disable PCIe just because the host is not a PCI host; the latter flag
only applies to non-PCIe systems. If PCIe is in target mode, it will simply
and gracefully fail to attach of its own accord.
Fix sysctl free bug in last commit, which eventually leads to a panic.
Add software mixer table for FastTrack Ultra.
Only set volume controls which are valid at startup for standard
USB audio devices, so that settings like treble and bass use
the reset defaults.
Export all mixer nodes into dev.pcm.X.mixer.Y sysctl nodes, hence the
PCM API doesn't support showing all the knobs. Make sure all the USB audio
mixer nodes are freed at detach. Before this patch USB audio would leak
some memory at detach. Print out buffer sizes in number of samples at attach.
Fix setting of volume controls when the number of channels is greater than two.
Alan Cox [Thu, 1 Nov 2012 16:20:02 +0000 (16:20 +0000)]
In general, we call pmap_remove_all() before calling vm_page_cache(). So,
the call to pmap_remove_all() within vm_page_cache() is usually redundant.
This change eliminates that call to pmap_remove_all() and introduces a
call to pmap_remove_all() before vm_page_cache() in the one place where
it didn't already exist.
When iterating over a paging queue, if the object containing the current
page has a zero reference count, then the page can't have any managed
mappings. So, a call to pmap_remove_all() is pointless.
Change a panic() call in vm_page_cache() to a KASSERT().
Enable the new instructions for reading and writing bases for %fs,
%gs, when supported. Note that WRFSBASE and WRGSBASE are not very
useful on FreeBSD right now, because a return from the kernel mode to
userspace reloads the bases specified by the sysarch(2) syscall, most
likely.
Enable the Supervisor Mode Execution Prevention (SMEP) when
supported. Since the loader(8) performs hand-off to the kernel with
the page tables which contradict the SMEP, postpone enabling the SMEP
on BSP until pmap switched for the proper kernel tables.
Debugged with the help from: avg
Tested by: avg, Michael Moll <kvedulv@kvedulv.de>
MFC after: 1 month
Provide the reading and display of the Standard Extended Features,
introduced with the IvyBridge CPUs. Provide the definitions for new
bits in CR3 and CR4 registers.
Tested by: avg, Michael Moll <kvedulv@kvedulv.de>
MFC after: 2 weeks
Pyun YongHyeon [Thu, 1 Nov 2012 06:02:27 +0000 (06:02 +0000)]
TCP/UDP checksum offloading feature for IP fragmented datagram was
removed in r99417. bge(4) controllers can do TCP checksum offload
for IP fragmented datagrams but unlike ti(4), it lacks UDP checksum
offloading for IP fragmented datagrams. The problem was bge(4)
blindly requested TCP/UDP checksum for IP fragmented datagrams such
that it resulted in corrupted UDP datagrams before r99417.
Remove remaining code for TCP checksum offloading for IP fragmented
datagrams which should have been removed in r99417.
Pyun YongHyeon [Thu, 1 Nov 2012 05:39:21 +0000 (05:39 +0000)]
Remove TCP/UDP checksum offloading feature for IP fragmented
datagrams. Traditionally upper stack fragmented packets without
computing TCP/UDP checksum and these datagrams were passed to
driver. But there are chances that other packets slip into the
interface queue in SMP world. If this happens firmware running on
MIPS 4000 processor in the controller would see mixed packets and
it shall send out corrupted packets.
While I'm here simplify checksum offloading setup.
Juli Mallett [Thu, 1 Nov 2012 03:45:33 +0000 (03:45 +0000)]
Handle the management port on the EBT5600 and disable loopback. The XAUI
port connected to the Broadcom switch does not seem operable, but it's unclear
if that's simply due to a lack of configuration information for the switch.
The switch does not seem to present any identifying information via MDIO,
and is a BCM56512.
Alexander Motin [Thu, 1 Nov 2012 00:09:01 +0000 (00:09 +0000)]
Only four specific ATA PIO commands transfer several sectors per DRQ block
(interrupt). All other ATA PIO commands transfer one sector or 512 bytes
at one time. Hardcode these exceptions in ata(4) with ATA_CAM option.
This fixes timeout of READ LOG EXT command used by `smartctl -x /dev/adaX`.
Jack F Vogel [Wed, 31 Oct 2012 23:50:36 +0000 (23:50 +0000)]
A few important fixes:
- Testing TSO6 has led me to discover that HW RSC is
a problematic feature, it is ONLY designed to work
with IPv4 in the first place, and if IP forwarding
is done it can't be disabled as LRO in the stack,
also initial testing we've done at Intel shows an
equal performance using TSO[46] on the TX and LRO
on RX, if you ran older code on 82599 or later hardware
you actually could have detrimental performance for
this reason. So I am disabling the feature by default
and all our adapters will now use LRO instead.
- If you have flow control off and multiple queues it
was possible when the buffer of one queue becomes
full that all RX movement is stalled, to eliminate
this problem a feature bit is now set that will allow
packets to be dropped when full rather than stall.
Note, the default is to have flow control on, and this
keeps this from happening.
- Because of the recent fixes in the stack, LRO is now
auto-disabled when problematic, so I have decided to
enable it by default in the capabilities in the driver.
- There are some 1G modules used by some customers, a couple
small tweaks to properly support those in the media code.
- A note: we have now done some testing of TSO6 and using
LRO with IPv6 and it all works great!! Seeing line rate
in both directions in best cases. Thanks bz for your
excellent work!!
Alexander Motin [Wed, 31 Oct 2012 22:11:51 +0000 (22:11 +0000)]
ASUS EeePC 1001px has strange variant of ALC269 CODEC, that mutes speaker
if unused in that configuration mixer at NID 15 is muted. Probably CODEC
incorrectly reports its internal connections. Hide that muter from the
driver to avoid muting and make built-in speaker work.
There are several different CODECs sharing this ID and I have not enough
information about them and the bug to implement more universal solution.
Tested by: Big Yuuta <init.py@gmail.com>
MFC after: 2 weeks
Adrian Chadd [Wed, 31 Oct 2012 21:03:55 +0000 (21:03 +0000)]
HAL updates!
* Add some more ANI spur immunity levels.
* For AR5111 radios attached to an AR5212, limit the 5GHz channels
that are available. A later revision of the AR5111 supports the 4.9GHz
PSB channels but right now there's no check in place for the radio
revision.
If someone wants PSB support on AR5212+AR5111 radios then please let
me know and I'll add the relevant version check.
Adrian Chadd [Wed, 31 Oct 2012 20:58:24 +0000 (20:58 +0000)]
Add the emulation PCI device id - these days, 0xabcd shows up all over
the internet as "AR9380 and later which didn't get its PCI ID written
in at power-on", so it's hardly an unknown constant.
Jack F Vogel [Wed, 31 Oct 2012 18:16:42 +0000 (18:16 +0000)]
Correct code that was lost somewhere in the past,
this was designed to keep duplicate null vlan tags from
being added. When doing vlans purely via the switch
this problem will occur. Reported by external customer.
Attilio Rao [Wed, 31 Oct 2012 18:07:18 +0000 (18:07 +0000)]
Rework the known mutexes to benefit about staying on their own
cache line in order to avoid manual frobbing but using
struct mtx_padalign.
The sole exception being nvme and sxfge drivers, where the author
redefined CACHE_LINE_SIZE manually, so they need to be analyzed and
dealt with separately.
Jim Harris [Wed, 31 Oct 2012 17:12:12 +0000 (17:12 +0000)]
Pad and align the callout_cpu mtx to its own cacheline to reduce false
sharing especially on the default CPU 0 callout_cpu structure.
This will be followed up by attilio@ with a conversion to the new struct
mtx_padalign but doing this manual conversion first gives an easy MFC
candidate since mtx_padalign is a more extensive system change.