]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoUndo the earlier revert of the ABI change in libsupc++. On further discussion,
theraven [Fri, 30 Mar 2012 12:48:36 +0000 (12:48 +0000)]
Undo the earlier revert of the ABI change in libsupc++.  On further discussion,
posting an errata notice with 9.1 is the less painful solution.

Approved by: dim (mentor)

12 years agomdoc: terminate quoted strings.
joel [Fri, 30 Mar 2012 12:34:34 +0000 (12:34 +0000)]
mdoc: terminate quoted strings.

12 years agoFix COMPAT_FREEBSD32 build.
davidxu [Fri, 30 Mar 2012 09:03:53 +0000 (09:03 +0000)]
Fix COMPAT_FREEBSD32 build.

Submitted by: Andreas Tobler < andreast at fgznet dot ch >

12 years agoReenable unsolicited responses on CODEC if hdaa_sense_init() called again.
mav [Fri, 30 Mar 2012 08:33:08 +0000 (08:33 +0000)]
Reenable unsolicited responses on CODEC if hdaa_sense_init() called again.
This fixes jack connection events handling after suspend/resume.

PR: kern/166382
MFC after: 1 week

12 years agoRemove trailing space.
davidxu [Fri, 30 Mar 2012 05:49:32 +0000 (05:49 +0000)]
Remove trailing space.

12 years agoMerge umtxq_sleep and umtxq_nanosleep into a single function by using
davidxu [Fri, 30 Mar 2012 05:40:26 +0000 (05:40 +0000)]
Merge umtxq_sleep and umtxq_nanosleep into a single function by using
an abs_timeout structure which describes timeout info.

12 years agoDo not report current link status if driver is not running.
yongari [Fri, 30 Mar 2012 05:27:05 +0000 (05:27 +0000)]
Do not report current link status if driver is not running.
This change also workarounds dhclient's link state handling bug by
not giving current link status.

Unlike other controllers, ale(4)'s PHY hibernation perfectly works
such that driver does not see a valid link if the controller is not
brought up.  If dhclient(8) runs on ale(4) it will blindly waits
until link UP and then gives up after 10 seconds.  Because
dhclient(8) still thinks interface got a valid link when IFM_AVALID
is not set for selected media,  this change makes dhclient initiate
DHCP without waiting for link UP.

12 years agoRemove task queue based link state change handler. Driver no longer
yongari [Fri, 30 Mar 2012 04:46:39 +0000 (04:46 +0000)]
Remove task queue based link state change handler. Driver no longer
needs to defer link state handling.
While I'm here, mark IFF_DRV_RUNNING before changing media.  If
link is established without any delay, that link state change
handling could be lost.

12 years agoFix an issue introduced in sys/x86/include/endian.h with r232721. In
dim [Thu, 29 Mar 2012 23:31:48 +0000 (23:31 +0000)]
Fix an issue introduced in sys/x86/include/endian.h with r232721.  In
that revision, the bswapXX_const() macros were renamed to bswapXX_gen().

Also, bswap64_gen() was implemented as two calls to bswap32(), and
similarly, bswap32_gen() as two calls to bswap16().  This mainly helps
our base gcc to produce more efficient assembly.

However, the arguments are not properly masked, which results in the
wrong value being calculated in some instances.  For example,
bswap32(0x12345678) returns 0x7c563412, and bswap64(0x123456789abcdef0)
returns 0xfcdefc9a7c563412.

Fix this by appropriately masking the arguments to bswap16() in
bswap32_gen(), and to bswap32() in bswap64_gen().  This should also
silence warnings from clang.

Submitted by: jh

12 years agoRevert sys/x86/include/endian.h to what it was before r233419, as that
dim [Thu, 29 Mar 2012 23:30:17 +0000 (23:30 +0000)]
Revert sys/x86/include/endian.h to what it was before r233419, as that
revision has two problems:
- It can produce worse code with both clang and gcc.
- It doesn't fix the actual issue introduced in r232721, which will be
  fixed in the next commit.

Submitted by: bde, tijl and jh
Pointy hat to: dim

12 years agooops, add a missing lock.
adrian [Thu, 29 Mar 2012 21:54:19 +0000 (21:54 +0000)]
oops, add a missing lock.

12 years agoFix typo from last commit.
joel [Thu, 29 Mar 2012 20:55:45 +0000 (20:55 +0000)]
Fix typo from last commit.

Noticed by: brueffer

12 years agoRemove unnecessary Xo/Xc.
joel [Thu, 29 Mar 2012 20:23:35 +0000 (20:23 +0000)]
Remove unnecessary Xo/Xc.

Reviewed by: brueffer

12 years agoIf hastd is invoked with "-P pidfile" option always create pidfile
trociny [Thu, 29 Mar 2012 20:11:16 +0000 (20:11 +0000)]
If hastd is invoked with "-P pidfile" option always create pidfile
regardless of whether -F (foreground) option is set or not.

Also, if -P option is specified, ignore pidfile setting from configuration
not only on start but on reload too. This fixes the issue when for hastd
run with -P option reload caused the pidfile change.

Reviewed by: pjd
MFC after: 1 week

12 years agoFix couple of style nits.
jkim [Thu, 29 Mar 2012 19:29:24 +0000 (19:29 +0000)]
Fix couple of style nits.

12 years agoRevert r233662 and generalize the hack. Writing zero to BAR actually does
jkim [Thu, 29 Mar 2012 19:26:39 +0000 (19:26 +0000)]
Revert r233662 and generalize the hack.  Writing zero to BAR actually does
not disable it and it is even harmful as hselasky found out.  Historically,
this code was originated from (OLDCARD) CardBus driver and later leaked into
PCI driver when CardBus was newbus'ified and refactored with PCI driver.
However, it is not really necessary even for CardBus.

Reviewed by: hselasky, imp, jhb

12 years agoUse a more proper fix for enabling HT MSI mapping windows on Host-PCI
jhb [Thu, 29 Mar 2012 19:03:22 +0000 (19:03 +0000)]
Use a more proper fix for enabling HT MSI mapping windows on Host-PCI
bridges.  Rather than blindly enabling the windows on all of them, only
enable the window when an MSI interrupt is enabled for a device behind
the bridge, similar to what already happens for HT PCI-PCI bridges.

To implement this, each x86 Host-PCI bridge driver has to be able to
locate it's actual backing device on bus 0.  For ACPI, use the _ADR
method to find the slot and function of the device.  For the non-ACPI
case, the legacy(4) driver already scans bus 0 looking for Host-PCI
bridge devices.  Now it saves the slot and function of each bridge that
it finds as ivars that the Host-PCI bridge driver can then use in its
pcib_map_msi() method.

This fixes machines where non-MSI interrupts were broken by the previous
round of HT MSI changes.

Tested by: bapt
MFC after: 1 week

12 years agoRestore proper use of bounce buffers for ISA DMA. When locking was
jhb [Thu, 29 Mar 2012 18:58:02 +0000 (18:58 +0000)]
Restore proper use of bounce buffers for ISA DMA.  When locking was
added, the call to pmap_kextract() was moved up, and as a result the
code never updated the physical address to use for DMA if a bounce
buffer was used.  Restore the earlier location of pmap_kextract() so
it takes bounce buffers into account.

Tested by: kargl
MFC after: 1 week

12 years agoFix ia64 build after r233655.
kib [Thu, 29 Mar 2012 17:50:01 +0000 (17:50 +0000)]
Fix ia64 build after r233655.

MFC after: 1 week

12 years agoDefer the rescheduling of TID -> TXQ frames in some instances.
adrian [Thu, 29 Mar 2012 17:39:18 +0000 (17:39 +0000)]
Defer the rescheduling of TID -> TXQ frames in some instances.

Right now ath_txq_sched() is mainly called from the TX ath_tx_processq()
routine, which is (mostly) done as part of the taskqueue.  It shouldn't
be called outside the taskqueue.

But now that I'm about to flip back on BAR TX, I'm going to start
stressing the ath_tx_tid_pause() and ath_tx_tid_resume() paths.
What I don't want to have happen is a reschedule of the TID traffic
_during_ the completion of TX frames.

Ideally I'd like to have a way to flag back up to the processing code
that the current hardware queue should be rechecked for software TID
queue frames.  But for now, this should suffice for the BAR TX case.

I may eventually delete this code once I've brought some further
sanity to the general TX queue/completion path.

12 years agoPut quotation marks around a string.
joel [Thu, 29 Mar 2012 17:04:04 +0000 (17:04 +0000)]
Put quotation marks around a string.

12 years ago- Rename VM_MEMATTR_UNCACHED to VM_MEMATTR_WEAK_UNCACHEABLE on x86 to
jhb [Thu, 29 Mar 2012 16:51:22 +0000 (16:51 +0000)]
- Rename VM_MEMATTR_UNCACHED to VM_MEMATTR_WEAK_UNCACHEABLE on x86 to
  be less ambiguous and more clearly identify what it means.  This
  attribute is what Intel refers to as UC-, and it's only difference
  relative to normal UC memory is that a WC MTRR will override a UC-
  PAT entry causing the memory to be treated as WC, whereas a UC PAT
  entry will always override the MTRR.
- Remove the VM_MEMATTR_UNCACHED alias from powerpc.

12 years agoUse VM_MEMATTR_UNCACHEABLE for the constant for UC memory rather than
jhb [Thu, 29 Mar 2012 16:48:36 +0000 (16:48 +0000)]
Use VM_MEMATTR_UNCACHEABLE for the constant for UC memory rather than
VM_MEMATTR_UNCACHED.  VM_MEMATTR_UNCACHEABLE is the constant other
platforms use.

MFC after: 2 weeks

12 years agomdoc: Ud takes no argument.
joel [Thu, 29 Mar 2012 16:20:20 +0000 (16:20 +0000)]
mdoc: Ud takes no argument.

12 years agoRemove superfluous paragraph macro.
joel [Thu, 29 Mar 2012 16:07:22 +0000 (16:07 +0000)]
Remove superfluous paragraph macro.

12 years agoFix build after changes to trap headers.
nwhitehorn [Thu, 29 Mar 2012 16:04:42 +0000 (16:04 +0000)]
Fix build after changes to trap headers.

12 years agomandoc complains loudly when <TAB>s are misused in columnated lists. Fix
joel [Thu, 29 Mar 2012 16:02:40 +0000 (16:02 +0000)]
mandoc complains loudly when <TAB>s are misused in columnated lists. Fix
this syntax violation and while I'm here also convert <TAB> to Ta and adjust
quotation marks in order to prevent this problem in the future.

12 years agoMove tty_opened_ns() into syscons.c which is currently the
hselasky [Thu, 29 Mar 2012 15:47:29 +0000 (15:47 +0000)]
Move tty_opened_ns() into syscons.c which is currently the
only client of this macro.

Suggested by: ed @
MFC after: 1 week

12 years agoFix bug where isci(4) would report only 15 bytes of returned data on a
jimharris [Thu, 29 Mar 2012 15:43:07 +0000 (15:43 +0000)]
Fix bug where isci(4) would report only 15 bytes of returned data on a
READ_CAP_16 command to a SATA target.

Sponsored by: Intel
Reviewed by: sbruno
Approved by: sbruno
MFC after: 3 days

12 years agoFix for boot issue: Don't disable BARs on AGP devices. In general:
hselasky [Thu, 29 Mar 2012 15:33:44 +0000 (15:33 +0000)]
Fix for boot issue: Don't disable BARs on AGP devices. In general:
Don't disable BARs on any PCI display devices, because doing that can
sometimes cause the main memory bus to stop working, causing all
memory reads to return nothing but 0xFFFFFFFF, even though the memory
location was previously written.  After a while a privileged
instruction fault will appear and then nothing more can be debugged.
The reason for this behaviour is unknown.

MFC after: 1 week

12 years agoFix for NULL-pointer panic during boot, if keys are pressed too early.
hselasky [Thu, 29 Mar 2012 14:53:14 +0000 (14:53 +0000)]
Fix for NULL-pointer panic during boot, if keys are pressed too early.

MFC after: 1 week

12 years agoMake stream our stream reset implementation
rrs [Thu, 29 Mar 2012 13:36:53 +0000 (13:36 +0000)]
Make stream our stream reset implementation
compliant to RFC6525.

MFC after: 1 month

12 years agoRemove unnecessary assembly code.
jchandra [Thu, 29 Mar 2012 11:46:29 +0000 (11:46 +0000)]
Remove unnecessary assembly code.

The compiler should generate lw/sw corresponding to register
operations.

12 years agoRemove disklabel handling code from growfs. This should be done
trasz [Thu, 29 Mar 2012 11:20:19 +0000 (11:20 +0000)]
Remove disklabel handling code from growfs.  This should be done
via geom_part(4), and it doesn't belong in growfs anyway.

Reviewed by: kib, mckusick
Sponsored by: The FreeBSD Foundation

12 years agoImport DragonFly BSD commit
kib [Thu, 29 Mar 2012 10:32:34 +0000 (10:32 +0000)]
Import DragonFly BSD commit

  From: Sascha Wildner <saw@online.de>
  Date: Fri, 2 Mar 2012 09:15:56 +0000 (+0100)
  Subject: rtld: Add a special case in do_dlsym() for TLS stored symbols.
  X-Git-Url: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/1388aaafe730c85693936aaf9bc6d83fc2d981be?hp=bca4412595a8979ab9f1bf36068c806ce88a667a

  rtld: Add a special case in do_dlsym() for TLS stored symbols.

Submitted-by: Markus Pfeiffer <markus.pfeiffer@morphism.de>
Discussed with: kan
MFC after: 1 week

12 years agoVMDB offset should be greater than logical volume size only for MBR.
ae [Thu, 29 Mar 2012 07:29:27 +0000 (07:29 +0000)]
VMDB offset should be greater than logical volume size only for MBR.

12 years agoDo proper cleanup for the GPT case when an error occurs.
ae [Thu, 29 Mar 2012 06:37:02 +0000 (06:37 +0000)]
Do proper cleanup for the GPT case when an error occurs.

12 years agomdoc: sort prologue macros.
joel [Thu, 29 Mar 2012 06:19:00 +0000 (06:19 +0000)]
mdoc: sort prologue macros.

12 years agoRemove trailing whitespace per mdoc lint warning
eadler [Thu, 29 Mar 2012 05:02:12 +0000 (05:02 +0000)]
Remove trailing whitespace per mdoc lint warning

Disussed with: gavin
No objection from: doc
Approved by: joel
MFC after: 3 days

12 years agoFix 32-bit libgeom consumers run on 64-bit kernels with COMPAT_FREEBSD32.
jmallett [Thu, 29 Mar 2012 03:13:43 +0000 (03:13 +0000)]
Fix 32-bit libgeom consumers run on 64-bit kernels with COMPAT_FREEBSD32.

Kernel pointer values are used as opaque unique identifiers, which are then
used to reconstruct references between various providers, classes, etc., inside
libgeom from the source XML.  Unfortunately, they're converted to pointer-width
integers (in the form of pointers) to do this, and 32-bit userland pointers
cannot hold sensible representations (however opaque) of 64-bit kernel pointers
on all systems.

In the case where the leading bits are zero and 32 distinct bits of pointer can
be identified, this will happen to work.  On systems where the upper 32-bits of
kernel pointers are non-zero and the same for all kernel pointers, this will
result in double frees and all kinds of bizarre crashes and linkage between
objects inside libgeom.

To mitigate this problem, treat the opaque identifiers in the XML as C strings
instead, and internalize them to give unique and consistent per-object pointer
values in userland for each identifier in the XML.  This allows us to keep the
libgeom logic the same with only minor changes to initial setup and parsing.

It might be more sensible for speed reasons to treat the identifiers as numbers
of a large size (uintmax_t, say) rather than strings, but strings seem fine for
now.

(As an added side-effect, this makes it slightly easier to identify unresolved
 references, but nothing has been added to inform the user of those.)

12 years agoo) Fix mips/mips -> mips for Makefile.inc1.
jmallett [Thu, 29 Mar 2012 03:04:59 +0000 (03:04 +0000)]
o) Fix mips/mips -> mips for Makefile.inc1.
o) Rebuild src.conf.5.

12 years agoAssume a big-endian default on MIPS and drop the "eb" suffix from MACHINE_ARCH.
jmallett [Thu, 29 Mar 2012 02:54:35 +0000 (02:54 +0000)]
Assume a big-endian default on MIPS and drop the "eb" suffix from MACHINE_ARCH.
This makes our naming scheme more closely match other systems and the
expectations of much third-party software.  MIPS builds which are little-endian
should require and exhibit no changes.  Big-endian TARGET_ARCHes must be
changed:
From: To:
mipseb mips
mipsn32eb mipsn32
mips64eb mips64

An entry has been added to UPDATING and some foot-shooting protection (complete
with warnings which should become errors in the near future) to the top-level
base system Makefile.

12 years agoReduce code size by creating common timed sleeping function.
davidxu [Thu, 29 Mar 2012 02:46:43 +0000 (02:46 +0000)]
Reduce code size by creating common timed sleeping function.

12 years agoTurn on messages from the Simple Executive codebase, what few there are.
jmallett [Thu, 29 Mar 2012 02:05:11 +0000 (02:05 +0000)]
Turn on messages from the Simple Executive codebase, what few there are.

12 years agoDisable FP instruction emulation by default on !o32 because of ABI concerns.
jmallett [Thu, 29 Mar 2012 02:04:15 +0000 (02:04 +0000)]
Disable FP instruction emulation by default on !o32 because of ABI concerns.

Note that in practice this isn't needed because we get a coprocessor unusable
exception first, but that's actually something like a bug.

12 years agoSupply endianness implied by the -m flag when compiling ucore code.
jmallett [Thu, 29 Mar 2012 02:03:06 +0000 (02:03 +0000)]
Supply endianness implied by the -m flag when compiling ucore code.

12 years agoFix little-endian built.
jmallett [Thu, 29 Mar 2012 02:02:23 +0000 (02:02 +0000)]
Fix little-endian built.

12 years agoAllow multiple inclusion of trap.h. This has always been broken, but
nwhitehorn [Thu, 29 Mar 2012 02:02:14 +0000 (02:02 +0000)]
Allow multiple inclusion of trap.h. This has always been broken, but
until recently never caused problems.

12 years agoFix comment to specify correct struct name.
jimharris [Wed, 28 Mar 2012 23:51:06 +0000 (23:51 +0000)]
Fix comment to specify correct struct name.

Reviewed by: gjb
Approved by: sbruno

12 years agoA refinement of change 232351 to avoid a race with a forcible unmount.
mckusick [Wed, 28 Mar 2012 21:21:19 +0000 (21:21 +0000)]
A refinement of change 232351 to avoid a race with a forcible unmount.
While we have a snapshot vnode unlocked to avoid a deadlock with another
inode in the same inode block being updated, the filesystem containing
it may be forcibly unmounted. When that happens the snapshot vnode is
revoked. We need to check for that condition and fail appropriately.

This change will be included along with 232351 when it is MFC'ed to 9.

Spotted by:  kib
Reviewed by: kib

12 years agoAdd software PMC support.
fabient [Wed, 28 Mar 2012 20:58:30 +0000 (20:58 +0000)]
Add software PMC support.

New kernel events can be added at various location for sampling or counting.
This will for example allow easy system profiling whatever the processor is
with known tools like pmcstat(8).

Simultaneous usage of software PMC and hardware PMC is possible, for example
looking at the lock acquire failure, page fault while sampling on
instructions.

Sponsored by: NETASQ
MFC after: 1 month

12 years agoKeep track of the mount point associated with a special device
mckusick [Wed, 28 Mar 2012 20:49:11 +0000 (20:49 +0000)]
Keep track of the mount point associated with a special device
to enable the collection of counts of synchronous and asynchronous
reads and writes for its associated filesystem. The counts are
displayed using `mount -v'.

Ensure that buffers used for paging indicate the vnode from
which they are operating so that counts of paging I/O operations
from the filesystem are collected.

This checkin only adds the setting of the mount point for the
UFS/FFS filesystem, but it would be trivial to add the setting
and clearing of the mount point at filesystem mount/unmount
time for other filesystems too.

Reviewed by: kib

12 years agoFix Fo arguments.
joel [Wed, 28 Mar 2012 19:20:28 +0000 (19:20 +0000)]
Fix Fo arguments.

Reviewed by: gabor

12 years agoAllocate the ioapics[] array dynamically since it is only needed for the
jhb [Wed, 28 Mar 2012 18:53:48 +0000 (18:53 +0000)]
Allocate the ioapics[] array dynamically since it is only needed for the
duration of madt_setup_io().  This avoids having the array take up
permanent space in the BSS.

Inspired by: bde
MFC after: 2 weeks

12 years agoEnsure consistent target IDs for direct-attached devices.
jimharris [Wed, 28 Mar 2012 18:38:13 +0000 (18:38 +0000)]
Ensure consistent target IDs for direct-attached devices.

Sponsored by: Intel
Reported by: sbruno, <rpokala at panasas dot com>
Tested by: <rpokala at panasas dot com>
Reviewed by: scottl
Approved by: scottl
MFC after: 3 days

12 years agoAdd a PNP ID for Japanese 106-key keyboard.
jkim [Wed, 28 Mar 2012 17:58:37 +0000 (17:58 +0000)]
Add a PNP ID for Japanese 106-key keyboard.

PR: kern/166459
MFC after: 3 days

12 years agoMore PMAP performance improvements: skip 256 MB segments entirely if they
nwhitehorn [Wed, 28 Mar 2012 17:25:29 +0000 (17:25 +0000)]
More PMAP performance improvements: skip 256 MB segments entirely if they
are are not mapped during ranged operations and reduce the scope of the
tlbie lock only to the actual tlbie instruction instead of the entire
sequence. There are a few more optimization possibilities here as well.

12 years agoMFV: r233615
jkim [Wed, 28 Mar 2012 17:21:59 +0000 (17:21 +0000)]
MFV: r233615

Revert r233555 and apply a fix for the reference counting regressions.

Tested by: andreast, lme, nwhitehorn,
Sevan / Venture37 (venture37 at gmail dot com)
Submitted by: Robert Moore (robert dot moore at intel dot com)

12 years agoMove the DTrace return IDT vector back up from 0x20 to 0x92. The 0x20
jhb [Wed, 28 Mar 2012 16:32:17 +0000 (16:32 +0000)]
Move the DTrace return IDT vector back up from 0x20 to 0x92.  The 0x20
vector is currently dedicated to servicing IRQ 0 from the 8259A's, so
it shouldn't be overloaded for DTrace.

Tested by: rstone
MFC after: 1 week

12 years ago- Support inlined location in calltree output.
fabient [Wed, 28 Mar 2012 16:23:40 +0000 (16:23 +0000)]
- Support inlined location in calltree output.
  In case of multiple level of inlining all the locations are flattened.
  Require recent binutils/addr2line (head works or binutils from ports
  with the right $PATH order).
- Multiple fixes in the calltree output (recursion case, ...)
- Fix the calltree top view that previously hide some shared nodes.

Tested with Kcachegrind(kdesdk4)/qcachegrind(head).

Sponsored by: NETASQ

12 years agoDo trivial reformatting of the comment to record the missed commit
kib [Wed, 28 Mar 2012 14:16:15 +0000 (14:16 +0000)]
Do trivial reformatting of the comment to record the missed commit
message for r233609:
Restore the writes of atimes, quotas and superblock from syncer vnode.

Noted by:   rdivacky

12 years agoReviewed by: bde, mckusick
kib [Wed, 28 Mar 2012 14:06:47 +0000 (14:06 +0000)]
Reviewed by: bde, mckusick
Tested by: pho
MFC after: 2 weeks

12 years agoMicrooptimize: in qsync loop over mount vnodes, only unlock mount
kib [Wed, 28 Mar 2012 13:56:18 +0000 (13:56 +0000)]
Microoptimize: in qsync loop over mount vnodes, only unlock mount
interlock after we committed to try to vget() the vnode.

Submitted by: bde
Reviewed by: mckusick
Tested by: pho
MFC after: 1 week

12 years agoUpdate comment.
kib [Wed, 28 Mar 2012 13:47:07 +0000 (13:47 +0000)]
Update comment.

MFC after: 3 days

12 years agoStop HDA controller polling callout on suspend and reset it on resume.
mav [Wed, 28 Mar 2012 13:28:09 +0000 (13:28 +0000)]
Stop HDA controller polling callout on suspend and reset it on resume.

PR: kern/166382
MFC after: 1 week

12 years agoPermit tcpdrop in VNET jails.
zec [Wed, 28 Mar 2012 12:30:16 +0000 (12:30 +0000)]
Permit tcpdrop in VNET jails.

Submitted by: Miljenko Mikuc
MFC after: 3 days

12 years agoCorrectly expose xlocale functions if people include the headers in the wrong
theraven [Wed, 28 Mar 2012 12:11:54 +0000 (12:11 +0000)]
Correctly expose xlocale functions if people include the headers in the wrong
order (as some ports apparently do).

Approved by: dim (mentor)

12 years agoHonor the net.inet.udp.checksum sysctl when using SCTP/UDP/IPv4
tuexen [Wed, 28 Mar 2012 08:11:46 +0000 (08:11 +0000)]
Honor the net.inet.udp.checksum sysctl when using SCTP/UDP/IPv4
encapsulation.
MFCing requires MFCing http://svn.freebsd.org/changeset/base/233554
MFC after: 2 weeks

12 years agoRemove unnecessary #if as the software workaround for PCI protocol
yongari [Wed, 28 Mar 2012 01:52:38 +0000 (01:52 +0000)]
Remove unnecessary #if as the software workaround for PCI protocol
violation should be activated unless the system is cold-booted
after updating EEPROM.
The PCI protocol violation happens only when established link is
10Mbps so the workaround should be updated whenever link state
change is detected.  Previously the workaround was activated only
when user checks current media status with ifconfig(8).

12 years agoLoad entire EEPROM contents in device attach time and verify
yongari [Wed, 28 Mar 2012 01:27:27 +0000 (01:27 +0000)]
Load entire EEPROM contents in device attach time and verify
whether the checksum of EEPROM is valid or not.  Because driver
heavily relies on EEPROM information when it selectively enables
features/workarounds, it would be helpful to know whether driver
sees valid EEPROM.
While I'm here remove all other EEPROM accesses since the entire
EEPROM is loaded at device attach time.

MFC after: 2 weeks

12 years agoPartially revert r223608 and selectively allow microcode loading
yongari [Wed, 28 Mar 2012 01:08:55 +0000 (01:08 +0000)]
Partially revert r223608 and selectively allow microcode loading
for 82550C.  For 82550 controllers this change restores CPUSaver
microcode loading.  Due to silicon bug on 82550 and 82550C with
server extension, these controllers seem to require CPUSaver
microcode to receive fragmented UDP datagrams.  However the
microcode shouldn't be used on client featured 82550C as it locks
up the controller.  In addition, client featured 82550C does not
have the silicon bug.  Also clear temporary memory used for
microcode loading since the same memory area is used for other
commands.
While I'm here use 82550C in probe message instead of generic
82550.

Reported by: Andreas Longwitz <longwitz <> incore de>
Tested by: Andreas Longwitz <longwitz <> incore de>
MFC after: 2 weeks

12 years ago- Do not clobber softc when psm(4) is reintialized.
jkim [Tue, 27 Mar 2012 23:43:01 +0000 (23:43 +0000)]
- Do not clobber softc when psm(4) is reintialized.
- Make INITAFTERSUSPEND flag independent of HOOKRESUME flag.
- Automatically set INITAFTERSUSPEND flag when ALPS GlidePoint is detected.
- Always probe Synaptics Touchpad.  Allow MOUSE_SYN_GETHWINFO ioctl and
automatically set INITAFTERSUSPEND flag when a supported device is detected,
regardless of "hw.psm.synaptics_support" tunable setting.
- Update psm(4) to reflect the above changes.
- Remove long-time defunct SYNCHACK flag while I am in the neighborhood.

MFC after: 1 month

12 years agoRestore interrupt state after executing AcpiEnterSleepState().
jkim [Tue, 27 Mar 2012 23:26:58 +0000 (23:26 +0000)]
Restore interrupt state after executing AcpiEnterSleepState().

12 years agoAllow (with a license warning) "options ZFS" to work in static kernels.
peter [Tue, 27 Mar 2012 21:23:56 +0000 (21:23 +0000)]
Allow (with a license warning) "options ZFS" to work in static kernels.

The 'make depend' rules have to use custom -I paths for the special compat
includes for the opensolaris/zfs headers.

This option will pull in the couple of files that are shared with dtrace,
but they appear to correctly use the MODULE_VERSION/MODULE_DEPEND rules
so loader should do the right thing, as should kldload.

Reviewed by: pjd (glanced at)

12 years agomdoc: add missing El macro.
joel [Tue, 27 Mar 2012 20:50:14 +0000 (20:50 +0000)]
mdoc: add missing El macro.

12 years agoMinor indentation and paragraph nits.
joel [Tue, 27 Mar 2012 20:39:49 +0000 (20:39 +0000)]
Minor indentation and paragraph nits.

12 years agoMake ReiserFS MPSAFE
dumbbell [Tue, 27 Mar 2012 20:36:03 +0000 (20:36 +0000)]
Make ReiserFS MPSAFE

Most functions seemed to be already fine w.r.t. what's done in msdosfs.

MFC after: 1 month

12 years agoOnly use macros inside a reference block.
joel [Tue, 27 Mar 2012 20:10:13 +0000 (20:10 +0000)]
Only use macros inside a reference block.

Discussed with: brueffer

12 years agostrip (R) to match manpage and pci_vendors
bschmidt [Tue, 27 Mar 2012 18:27:45 +0000 (18:27 +0000)]
strip (R) to match manpage and pci_vendors

MFC after: 1 week

12 years agoFix size of PCI softc.
jchandra [Tue, 27 Mar 2012 18:26:35 +0000 (18:26 +0000)]
Fix size of PCI softc.

12 years agoFix crash on VirtualBox (and probably on some real hardware):
gonzo [Tue, 27 Mar 2012 18:22:14 +0000 (18:22 +0000)]
Fix crash on VirtualBox (and probably on some real hardware):

- Do not cover error returned by pmc_core_initialize with the
    result of pmc_uncore_initialize, fail right away.
- Give a user something to report instead failing silently

Reported by: Alexandr Kovalenko <never@nevermind.kiev.ua>

12 years agoAdd a list of available devices which matches the names shown by pciconf.
bschmidt [Tue, 27 Mar 2012 18:17:22 +0000 (18:17 +0000)]
Add a list of available devices which matches the names shown by pciconf.
While here add 2 missing firmware modules.

MFC after: 1 week

12 years agoAdd support for 6150 series devices.
bschmidt [Tue, 27 Mar 2012 17:45:50 +0000 (17:45 +0000)]
Add support for 6150 series devices.

Tested by: Shane Riddle <sh4neriddle at yahoo dot com>
MFC after: 1 week

12 years agoRemove useless Ta macro.
joel [Tue, 27 Mar 2012 15:55:56 +0000 (15:55 +0000)]
Remove useless Ta macro.

12 years agoResource allocation for XLP SoC SDHCI slots
jchandra [Tue, 27 Mar 2012 15:43:32 +0000 (15:43 +0000)]
Resource allocation for XLP SoC SDHCI slots

The on-chip SD slots do not have PCI BARs corresponding to them, so
this has to be handled in the custom SoC memory allocation.

Provide memory resource for rids corresponding to BAR 0 and 1 in
the custom allocation code.

12 years agoUpdate memory and resource allocation code for SoC devices
jchandra [Tue, 27 Mar 2012 15:39:55 +0000 (15:39 +0000)]
Update memory and resource allocation code for SoC devices

The XLP on-chip devices have PCI configuration headers, but some of the
devices need custom resource allocation code.
- devices with no MEM/IO BARs with registers in PCIe extended reg
  space have to be handled in memory resource allocation
- devices without INTPIN/INTLINE in PCI header can be supported
  by having these faked with a shadow register.
- Some devices does not allow 8/16 bit access to the register space,
  he default bus space cannot be used for these.

Subclass pci and override attach and resource allocation methods to
take care of this.

Remove earlier code which did this partially.

12 years agoMFV: r233551
jkim [Tue, 27 Mar 2012 15:27:20 +0000 (15:27 +0000)]
MFV: r233551

Fix two possible memory leaks in error path.

Obtained from: ACPICA

12 years agoMinor mdoc nit.
joel [Tue, 27 Mar 2012 15:22:10 +0000 (15:22 +0000)]
Minor mdoc nit.

12 years agoNOR flash driver for XLP.
jchandra [Tue, 27 Mar 2012 15:16:38 +0000 (15:16 +0000)]
NOR flash driver for XLP.

The NOR interface on the SoC appears on the top level PCI bus. Add
a simple driver for this.

12 years agoMFV: r233550
jkim [Tue, 27 Mar 2012 15:15:30 +0000 (15:15 +0000)]
MFV: r233550

Temporarily revert an upstream commit.  This change caused regressions for
too many laptop users.  Especially, automatic repair for broken _BIF caused
strange reference counting issues and kernal panics.  This reverts:

https://github.com/otcshare/acpica/commit/c995fed15ab41f6feae1299876271ea330f5c1c5

12 years agoExport the udp_cksum sysctl for upcoming SCTP work. Rather than always,
bz [Tue, 27 Mar 2012 15:14:29 +0000 (15:14 +0000)]
Export the udp_cksum sysctl for upcoming SCTP work.  Rather than always,
SCTP will only do IPv4 UDP checksum calculation as defined by the host
policy.  When tunneling SCTP always calculates the inner checksum already
so not doing the outer UDP can save cycles.

While here virtualize the variable.

Requested by: tuexen
MFC after: 2 weeks

12 years agoCFI fixes for big endian archs.
jchandra [Tue, 27 Mar 2012 15:13:12 +0000 (15:13 +0000)]
CFI fixes for big endian archs.

The flash commands and responses are little-endian and have to be
byte swapped on big-endian systems.  However the raw read of data
need not be swapped.

Make the cfi_read and cfi_write do the swapping, and provide a
cfi_read_raw which does not byte swap for reading data from
flash.

12 years agoInstead of only iterating over the set of known SDT probes when sdt.ko is
rstone [Tue, 27 Mar 2012 15:07:43 +0000 (15:07 +0000)]
Instead of only iterating over the set of known SDT probes when sdt.ko is
loaded and unloaded, also have sdt.ko register callbacks with kern_sdt.c
that will be called when a newly loaded KLD module adds more probes or
a module with probes is unloaded.

This fixes two issues: first, if a module with SDT probes was loaded after
sdt.ko was loaded, those new probes would not be available in DTrace.
Second, if a module with SDT probes was unloaded while sdt.ko was loaded,
the kernel would panic the next time DTrace had cause to try and do
anything with the no-longer-existent probes.

This makes it possible to create SDT probes in KLD modules, although there
are still two caveats: first, any SDT probes in a KLD module must be part
of a DTrace provider that is defined in that module.  At present DTrace
only destroys probes when the provider is destroyed, so you can still
panic the system if a KLD module creates new probes in a provider from a
different module(including the kernel) and then unload the the first module.

Second, the system will panic if you unload a module containing SDT probes
while there is an active D script that has enabled those probes.

MFC after: 1 month

12 years agoXLP UART code udpate.
jchandra [Tue, 27 Mar 2012 14:48:40 +0000 (14:48 +0000)]
XLP UART code udpate.

Move XLP PCI UART device to sys/mips/nlm/dev/ directory.  Other
drivers for the XLP SoC devices will be added here as well.
Update uart_cpu_xlp.c and uart_pci_xlp.c use macros for uart port,
speed and IO frequency.

12 years agoUse VM_MEMATTR_UNCACHEABLE instead of VM_MEMATTR_UNCACHED for UC mappings.
jhb [Tue, 27 Mar 2012 14:24:29 +0000 (14:24 +0000)]
Use VM_MEMATTR_UNCACHEABLE instead of VM_MEMATTR_UNCACHED for UC mappings.
VM_MEMATTR_UNCACHED is actually the x86-specific UC- mode (where a WC
MTRR can override the PAT setting).

12 years agoPrevent rtld_verify_object_versions() from being called several times
kib [Tue, 27 Mar 2012 14:10:15 +0000 (14:10 +0000)]
Prevent rtld_verify_object_versions() from being called several times
for the same object. This can happen when object is a dependency of the
dlopen()ed dso. When called several times, we waste time due to unneeded
processing, and memory, because obj->vertab is allocated anew on each
iteration.

Reviewed by: kan
MFC after: 2 weeks

12 years agoxlpge : driver for XLP network accelerator
jchandra [Tue, 27 Mar 2012 14:05:12 +0000 (14:05 +0000)]
xlpge : driver for XLP network accelerator

Features:
- network driver for the four 10G interfaces and two management ports
  on XLP 8xx.
- Support 4xx and 3xx variants of the processor.
- Source code and firmware building for the 16 mips32r2 micro-code engines
  in the Network Accelerator.
- Basic initialization code for Packet ordering Engine.

Submitted by: Prabhath Raman (prabhath at netlogicmicro com)
[refactored and fixed up for style by jchandra]

12 years agoFix random deadlock on pmcstat exit:
fabient [Tue, 27 Mar 2012 14:02:22 +0000 (14:02 +0000)]
Fix random deadlock on pmcstat exit:
- Exit the thread when soft shutdown is requested
- Wakeup owner thread.

Reproduced/tested by looping pmcstat measurement:
pmcstat -S instructions -O/tmp/test ls

MFC after: 1 week

12 years agoSupport for EEPROM and CPLD on XLP EVP boards.
jchandra [Tue, 27 Mar 2012 12:25:47 +0000 (12:25 +0000)]
Support for EEPROM and CPLD on XLP EVP boards.

On XLP evaluation platform, the board information is stored
in an I2C eeprom and the network block configuration is available
from a CPLD connected to the GBU (NOR flash bus). Add support
for both of these.

12 years agoOpencrypto driver for XLP Security and RSA/ECC blocks
jchandra [Tue, 27 Mar 2012 11:43:46 +0000 (11:43 +0000)]
Opencrypto driver for XLP Security and RSA/ECC blocks

Support for the Security and RSA blocks on XLP SoC. Even though
the XLP supports many more algorithms, only the ones supported
in OCF have been added.

Submitted by: Venkatesh J. V. (venkatesh at netlogicmicro com)