]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoUpdate to OpenPAM Micrampelis.
des [Sat, 26 May 2012 17:10:16 +0000 (17:10 +0000)]
Update to OpenPAM Micrampelis.

11 years agoPassing NULL as a key casues a segfault when loading SSH 1 keys. Use
des [Sat, 26 May 2012 17:03:45 +0000 (17:03 +0000)]
Passing NULL as a key casues a segfault when loading SSH 1 keys.  Use
an empty string instead.

11 years agoUpdate to reflect various doc commit bits taken into safekeeping.
gavin [Sat, 26 May 2012 16:26:23 +0000 (16:26 +0000)]
Update to reflect various doc commit bits taken into safekeeping.

MFC after: 1 week

11 years agoUpdates to reflect recent commit bits handed back, etc.
gavin [Sat, 26 May 2012 14:44:18 +0000 (14:44 +0000)]
Updates to reflect recent commit bits handed back, etc.

MFC after: 1 week

11 years agoVendor import of OpenPAM Micrampelis.
des [Sat, 26 May 2012 14:23:18 +0000 (14:23 +0000)]
Vendor import of OpenPAM Micrampelis.

11 years agoRetrieve CPU number info from the device tree.
raj [Sat, 26 May 2012 13:42:55 +0000 (13:42 +0000)]
Retrieve CPU number info from the device tree.

Obtained from: Freescale, Semihalf.

11 years agoRename e500 prefix to match other Book-E CPU variations. CPU id tidbits for
raj [Sat, 26 May 2012 13:36:18 +0000 (13:36 +0000)]
Rename e500 prefix to match other Book-E CPU variations. CPU id tidbits for
the new cores.

Obtained from: Freescale, Semihalf.

11 years agoProvide SPR definitions for newer Book-E (E500mc, E5500, PPC465).
raj [Sat, 26 May 2012 12:39:23 +0000 (12:39 +0000)]
Provide SPR definitions for newer Book-E (E500mc, E5500, PPC465).

Obtained from: Freescale, Semihalf.

11 years agoUnify SPR defines formatting, no funtional changes.
raj [Sat, 26 May 2012 12:15:13 +0000 (12:15 +0000)]
Unify SPR defines formatting, no funtional changes.

11 years agoTrim the extra $FreeBSD$ from the comment below the license. We use
bz [Sat, 26 May 2012 10:28:11 +0000 (10:28 +0000)]
Trim the extra $FreeBSD$ from the comment below the license.  We use
the __FBSDID() macro on the file now instead.

MFC after: 3 days

11 years agoGet rid of SCTP specific code to avoid CRC32C computations on loopback.
tuexen [Sat, 26 May 2012 09:16:33 +0000 (09:16 +0000)]
Get rid of SCTP specific code to avoid CRC32C computations on loopback.
Just just offloading.
MFC after: 3 days

11 years agoMake the VIA workaround application somewhat more consistent with the
marius [Sat, 26 May 2012 08:43:51 +0000 (08:43 +0000)]
Make the VIA workaround application somewhat more consistent with the
ATI one.

11 years agoConsistently use USB_PAGE_SIZE. Currently, this is cosmetic.
marius [Sat, 26 May 2012 08:33:53 +0000 (08:33 +0000)]
Consistently use USB_PAGE_SIZE. Currently, this is cosmetic.

MFC after: 3 days

11 years agoMake the VIA workaround actually do its intended job.
marius [Sat, 26 May 2012 08:31:12 +0000 (08:31 +0000)]
Make the VIA workaround actually do its intended job.

MFC after: 3 days

11 years agoRemove extraneous empty lines.
marius [Sat, 26 May 2012 08:17:30 +0000 (08:17 +0000)]
Remove extraneous empty lines.

MFC after: 3 day

11 years agoTurn LACP debugging from a compile time option to a sysctl, it is very handy to
thompsa [Sat, 26 May 2012 08:09:01 +0000 (08:09 +0000)]
Turn LACP debugging from a compile time option to a sysctl, it is very handy to
be able to turn it on when negotiation to a switch misbehaves.

Submitted by: Andrew Boyer
MFC after: 3 days

11 years ago- When creating the DMA tag for user data, don't ask for more segments
marius [Sat, 26 May 2012 08:03:42 +0000 (08:03 +0000)]
- When creating the DMA tag for user data, don't ask for more segments
  than required for handling MAXPHYS and report the resulting maximum
  I/O size to CAM instead of implicitly limiting it to DFLTPHYS.
- Move the variables of sym_action2() out of nested scope as required
  by style(9) and remove extraneous curly braces.
- Replace a magic value for PCIR_COMMAND with the appropriate macro.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

Tested with a HBA donated by wilko.

MFC after: 3 days

11 years agomdoc: sort sections into conventional order.
joel [Sat, 26 May 2012 06:31:54 +0000 (06:31 +0000)]
mdoc: sort sections into conventional order.

11 years agoRename pmap_collect() to pmap_pv_reclaim() and rewrite it such that it no
alc [Sat, 26 May 2012 06:10:25 +0000 (06:10 +0000)]
Rename pmap_collect() to pmap_pv_reclaim() and rewrite it such that it no
longer uses the active and inactive paging queues.  Instead, the pmap now
maintains an LRU-ordered list of pv entry pages, and pmap_pv_reclaim() uses
this list to select pv entries for reclamation.

Note: The old pmap_collect() tried to avoid reclaiming mappings for pages
that have either a hold_count or a busy field that is non-zero.  However,
this isn't necessary for correctness, and the locking in pmap_collect() was
insufficient to guarantee that such mappings weren't reclaimed.  The new
pmap_pv_reclaim() doesn't even try.

MFC after: 5 weeks

11 years agoImplement SEEK_HOLE/SEEK_DATA for UFS.
kib [Sat, 26 May 2012 05:29:53 +0000 (05:29 +0000)]
Implement SEEK_HOLE/SEEK_DATA for UFS.

MFC after: 2 weeks

12 years agoAdd a vn_bmap_seekhole(9) vnode helper which can be used by any
kib [Sat, 26 May 2012 05:28:47 +0000 (05:28 +0000)]
Add a vn_bmap_seekhole(9) vnode helper which can be used by any
filesystem which supports VOP_BMAP(9) to implement SEEK_HOLE/SEEK_DATA
commands for lseek(2).

MFC after: 2 weeks

12 years agoClarify the SEEK_HOLE description, it repositions the file pointer.
kib [Sat, 26 May 2012 05:25:55 +0000 (05:25 +0000)]
Clarify the SEEK_HOLE description, it repositions the file pointer.

MFC after:  3 days

12 years agoAdd the AR9280 workarounds for PCIe suspend/resume.
adrian [Sat, 26 May 2012 01:36:25 +0000 (01:36 +0000)]
Add the AR9280 workarounds for PCIe suspend/resume.

These aren't strictly needed at the moment as we're not doing APSM
and forcing the NIC in and out of network sleep.  But, they don't hurt.

Tested:

* AR9280 (mini-PCIe)

Obtained from: Qualcomm Atheros, Linux ath9k

12 years agoAvoid using hard-coded numbers here.
adrian [Sat, 26 May 2012 01:35:11 +0000 (01:35 +0000)]
Avoid using hard-coded numbers here.

12 years agoRemove an unneeded field from ath_buf.
adrian [Sat, 26 May 2012 01:34:36 +0000 (01:34 +0000)]
Remove an unneeded field from ath_buf.

12 years ago- Add support for BSD iconv when it is build into libc
gabor [Fri, 25 May 2012 22:07:13 +0000 (22:07 +0000)]
- Add support for BSD iconv when it is build into libc

PR: bin/162670
Submitted by: Jan Beich <jbeich@tormail.net>
MFC after: 2 weeks

12 years agoRegenerate system call tables.
ed [Fri, 25 May 2012 21:52:57 +0000 (21:52 +0000)]
Regenerate system call tables.

12 years agoRemove use of non-ISO-C integer types from system call tables.
ed [Fri, 25 May 2012 21:50:48 +0000 (21:50 +0000)]
Remove use of non-ISO-C integer types from system call tables.

These files already use ISO-C-style integer types, so make them less
inconsistent by preferring the standard types.

12 years agoUpdate HID defines for E500mc and E5500 CPU cores.
raj [Fri, 25 May 2012 21:12:24 +0000 (21:12 +0000)]
Update HID defines for E500mc and E5500 CPU cores.

Obtained from: Freescale, Semihalf

12 years agoImport DTS files for the upcoming DPAA QorIQ (PowerPC) support.
raj [Fri, 25 May 2012 20:43:38 +0000 (20:43 +0000)]
Import DTS files for the upcoming DPAA QorIQ (PowerPC) support.

  - P2041RDB
  - P3041DS
  - P5020DS

Obtained from: Freescale

12 years agoAdd a partition type for nandfs to the apm, bsd, gpt and vtoc8 schemes.
marcel [Fri, 25 May 2012 20:33:34 +0000 (20:33 +0000)]
Add a partition type for nandfs to the apm, bsd, gpt and vtoc8 schemes.
The gpart alias for these partition types is "freebsd-nandfs".

12 years agoinit: Remove unnecessary 2-second delay before calling reboot(2).
jilles [Fri, 25 May 2012 19:45:01 +0000 (19:45 +0000)]
init: Remove unnecessary 2-second delay before calling reboot(2).

12 years agoFix physical address type to vm_paddr_t also for powerpc64.
raj [Fri, 25 May 2012 18:17:26 +0000 (18:17 +0000)]
Fix physical address type to vm_paddr_t also for powerpc64.

12 years agoAdd some AR5416/AR5418 WAR's for power-on and suspend/resume:
adrian [Fri, 25 May 2012 17:53:57 +0000 (17:53 +0000)]
Add some AR5416/AR5418 WAR's for power-on and suspend/resume:

* Now that ah_configPCIE is called for both power on and suspend/resume,
  make sure the right bit(s) are cleared and set when suspending and
  resuming.  Specifically:

  + force disable/enable the PCIe PHY upon suspend/resume;
  + reprogram the PCIe WAR register when resuming and upon power-on.

* Add a recipe which powers down any PCIe PHY hardware inside the AR5416
  (which is the PCI variant) to save on power.  I have (currently) no way
  to test exactly how much power is saved, if any.

Tested on:

* AR5416 cardbus - although unfortunately pccard/cbb/cardbus currently
  detaches the NIC upon suspend, I don't think it's a proper test case.

* AR5418 PCIe attached to expresscard - since we're not doing PCIe APSM,
  it's also not likely a full/good test case.

In both instances I went through a handful of suspend/resume cycles and
ensured that the STA vap reassociated correctly.

TODO:

* Setup a laptop to simply sit in a suspend/resume loop, making sure that
  the NIC always correctly comes back;

* Start doing suspend/resume tests with actual traffic going on in the
  background, as I bet this process is all quite racy at the present;

* Test adhoc/hostap mode, just to be completely sure it's working correctly;

* See if I can jury rig an external power source to an AR5416 to test out
  whether ah_disablePCIE() works.

Obtained from: Qualcomm Atheros

12 years agoCorrect error message.
pjd [Fri, 25 May 2012 17:19:30 +0000 (17:19 +0000)]
Correct error message.

MFC after: 3 days

12 years ago* According to the reference code, AR_WA_D3_L1_DISBABLE is bit 14.
adrian [Fri, 25 May 2012 16:45:56 +0000 (16:45 +0000)]
* According to the reference code, AR_WA_D3_L1_DISBABLE is bit 14.
* Add some other WAR bits (very usefully described too) in preparation for
  porting over some suspend/resume fixes from ath9k/Atheros.

Obtained from: Qualcomm Atheros

12 years agoDoh... Don't add __eabi to an old version tag (i.e. FBSD_1.0). Add it to the
marcel [Fri, 25 May 2012 16:30:42 +0000 (16:30 +0000)]
Doh... Don't add __eabi to an old version tag (i.e. FBSD_1.0). Add it to the
current one (= FBSD_1.3).

Pointed out by: kib

12 years agoMissing vm_paddr_t bits which should have been part of r235936.
raj [Fri, 25 May 2012 15:13:55 +0000 (15:13 +0000)]
Missing vm_paddr_t bits which should have been part of r235936.

12 years agoMore Cicada/Vitesse PHY ids.
raj [Fri, 25 May 2012 15:05:17 +0000 (15:05 +0000)]
More Cicada/Vitesse PHY ids.

Obtained from: Semihalf

12 years agoMerge from x86: r232521
marius [Fri, 25 May 2012 14:52:05 +0000 (14:52 +0000)]
Merge from x86: r232521

Exclude USB drivers (except umass and ukbd) from main kernel image.

12 years agoUndefine SCTP_PACKED before including sctp_uio.h, which doesn't
tuexen [Fri, 25 May 2012 11:14:08 +0000 (11:14 +0000)]
Undefine SCTP_PACKED before including sctp_uio.h, which doesn't
use it. Spotted by Irene Ruengeler.

MFC after: 3 days

12 years agoRevert r235918 for now and add comment explaining the reason for the
trasz [Fri, 25 May 2012 10:08:48 +0000 (10:08 +0000)]
Revert r235918 for now and add comment explaining the reason for the
size check.

12 years agoUse 32-bit ufs_ino_t instead of ino_t to keep boot2 small and prevent
gleb [Fri, 25 May 2012 09:36:39 +0000 (09:36 +0000)]
Use 32-bit ufs_ino_t instead of ino_t to keep boot2 small and prevent
unnecessary 64-bit math on 32-bit machines.

Sponsored by: Google Summer of Code 2011

12 years ago- Only use multi-threading for large files
gabor [Fri, 25 May 2012 09:30:16 +0000 (09:30 +0000)]
- Only use multi-threading for large files
- Do not use mmap() by default; it can be enabled by --mmap
- Add some minor optimizations for -u
- Update manual page according to the changes

Submitted by: Oleg Moskalenko <oleg.moskalenko@citrix.com>

12 years agoMFp4 bz_ipv6_fast:
bz [Fri, 25 May 2012 09:27:16 +0000 (09:27 +0000)]
MFp4 bz_ipv6_fast:

  Use M_ZERO with malloc rather than calling bzero() ourselves.

  Change if () panic() checks to KASSERT()s as they are only
  catching invariants in code flow but not dependent on network
  input/output.

  Move initial assigments indirecting pointers after the lock
  has been aquired.

  Passing layer boundries, reset M_PROTOFLAGS.

  Remove a NULL assignment before free.

  Sponsored by: The FreeBSD Foundation
  Sponsored by: iXsystems

Reviewed by: gnn (as part of the whole)
MFC After: 3 days

12 years agoMFp4 bz_ipv6_fast:
bz [Fri, 25 May 2012 09:24:45 +0000 (09:24 +0000)]
MFp4 bz_ipv6_fast:

  Properly protect the inp read access when handling the control code.
  In the past this was expensive but given the rlock it's not so much
  anymore.

  Spotted while: optimizing udp6
  Discussed with: rwatson (a few months ago)

  Sponsored by: The FreeBSD Foundation
  Sponsored by: iXsystems

Reviewed by: gnn (as part of the whole)
MFC After: 3 days

12 years agoUse C99-style initialization for struct dirent in preparation for
gleb [Fri, 25 May 2012 09:16:59 +0000 (09:16 +0000)]
Use C99-style initialization for struct dirent in preparation for
changing the structure.

Sponsored by: Google Summer of Code 2011

12 years agoAdd tunable/sysctl kern.cam.pmp.hide_special, controlling whether special
mav [Fri, 25 May 2012 08:30:09 +0000 (08:30 +0000)]
Add tunable/sysctl kern.cam.pmp.hide_special, controlling whether special
PMP ports such as PMP configuration or SEMB should be exposed or hidden.
These ports were always hidden before as useless and sometimes promatic.
But with updated ses driver supporting SEMB it is no longer so straight.
Keep ports hidden by default to avoid probe request ttimeouts if SEP is
not connected to PMP's SEMB via I2C, that is very often situation.

12 years agoIn case forwarding is turned on for a given address family, refuse to
bz [Fri, 25 May 2012 08:17:59 +0000 (08:17 +0000)]
In case forwarding is turned on for a given address family, refuse to
queue the packet for LRO and tell the driver to directly pass it on.
This avoids re-assembly and later re-fragmentation problems when
forwarding.

It's not the best solution but the simplest and most effective for
the moment.

Should have been done: ages ago
Discussed with and by: many
MFC after: 3 days

12 years agoRemove sleep() from invalidate call in ses driver, waiting for daemon
mav [Fri, 25 May 2012 07:57:17 +0000 (07:57 +0000)]
Remove sleep() from invalidate call in ses driver, waiting for daemon
process exit. Instead use CAM's standard reference counting to prevent
periph going away until process won't complete. I think that sleep in
single CAM SWI thread is not a good idea and may lead to deadlocks if
daemon process waits for some command completion. Combined with recent
patch avoiding use of CAM SWI for ATA it just causes panics because of
sleeps prohibited in interrupt thread context.

12 years agoRevert my local not yet properly tested changes, that leaked in
glebius [Fri, 25 May 2012 07:46:24 +0000 (07:46 +0000)]
Revert my local not yet properly tested changes, that leaked in
with r235923.

12 years agodevice_add_child: protect against child device with no driver but fixed unit number
avg [Fri, 25 May 2012 07:32:26 +0000 (07:32 +0000)]
device_add_child: protect against child device with no driver but fixed unit number

This combination doesn't make sense, unit numbers should be hardwired
only in context of a known driver.  The wildcard devices should have
wildcard unit numbers.

Reviewed by: jhb
MFC after: 2 weeks

12 years agoFix resolving symbol names on ARM.
gber [Fri, 25 May 2012 06:48:42 +0000 (06:48 +0000)]
Fix resolving symbol names on ARM.

On ARM, binutils are adding '$a' symbols in the symbol table for
every function (in addition to normal symbol). When gprof(1) looks
up symbol name, it often reads '$a' instead of proper function name,
because it find it first. With this fix, when read symbol name
begins with '$' and previous symbol has the same address, it will
use previous symbol name (which is proper function name).

Obtained from: Semihalf

12 years agoCorrect an error in pmap_pv_reclaim(). In a rare case, when it should have
alc [Fri, 25 May 2012 05:28:14 +0000 (05:28 +0000)]
Correct an error in pmap_pv_reclaim().  In a rare case, when it should have
returned NULL, it might instead return a pointer to a page that it had just
unmapped.

12 years agooops - ath_hal_disablepcie is actually destined for another purpose,
adrian [Fri, 25 May 2012 05:01:27 +0000 (05:01 +0000)]
oops - ath_hal_disablepcie is actually destined for another purpose,
not to disable the PCIe PHY in prepration for reset.

Extend the enablepci method to have a "poweroff" flag, which if equal
to true means the hardware is about to go to sleep.

12 years agoFixes to man8 groff mandoc style, usage mistakes, or typos.
wblock [Fri, 25 May 2012 03:46:56 +0000 (03:46 +0000)]
Fixes to man8 groff mandoc style, usage mistakes, or typos.

PR: 168016
Submitted by: Nobuyuki Koganemaru
Approved by: gjb
MFC after: 3 days

12 years agoMFp4 bz_ipv6_fast:
bz [Fri, 25 May 2012 03:02:56 +0000 (03:02 +0000)]
MFp4 bz_ipv6_fast:

  Add TSO6 and LRO/IPv6 support.
  Fix the module Makefile to at least properly inlcude opt_inet6.h
  and allow builds without INET or INET6.

  Sponsored by: The FreeBSD Foundation
  Sponsored by: iXsystems

Reviewed by: gnn (as part of the whole)
MFC After: 3 days

12 years agoMFp4 bz_ipv6_fast:
bz [Fri, 25 May 2012 03:00:34 +0000 (03:00 +0000)]
MFp4 bz_ipv6_fast:

  Allow LRO to work on IPv6 as well.
  Fix the module Makefile to at least properly inlcude opt_inet6.h
  and allow builds without INET or INET6.

  Sponsored by: The FreeBSD Foundation
  Sponsored by: iXsystems

Reviewed by: gnn (as part of the whole)
MFC After: 3 days

12 years agoMFp4 bz_ipv6_fast:
bz [Fri, 25 May 2012 02:58:21 +0000 (02:58 +0000)]
MFp4 bz_ipv6_fast:

  Factor out Hop-By-Hop option processing.  It's still not heavily used,
  it reduces the footprint of ip6_input() and makes ip6_input() more
  readable.

  Sponsored by: The FreeBSD Foundation
  Sponsored by: iXsystems

Reviewed by: gnn (as part of the whole)
MFC After: 3 days

12 years agoMFp4 bz_ipv6_fast:
bz [Fri, 25 May 2012 02:23:26 +0000 (02:23 +0000)]
MFp4 bz_ipv6_fast:

  Add code to handle pre-checked TCP checksums as indicated by mbuf
  flags to save the entire computation for validation if not needed.

  In the IPv6 TCP output path only compute the pseudo-header checksum,
  set the checksum offset in the mbuf field along the appropriate flag
  as done in IPv4.

  In tcp_respond() just initialize the IPv6 payload length to 0 as
  ip6_output() will properly set it.

  Sponsored by: The FreeBSD Foundation
  Sponsored by: iXsystems

Reviewed by: gnn (as part of the whole)
MFC After: 3 days

12 years agoMFp4 bz_ipv6_fast:
bz [Fri, 25 May 2012 02:21:17 +0000 (02:21 +0000)]
MFp4 bz_ipv6_fast:

  Simple yet effective change enabling checksum "offload" on loopback
  for IPv6 to avoid expensive computations.

  Sponsored by: The FreeBSD Foundation
  Sponsored by: iXsystems

Reviewed by: gnn (as part of the whole)
MFC After: 3 days

12 years agoMFp4 bz_ipv6_fast:
bz [Fri, 25 May 2012 02:19:17 +0000 (02:19 +0000)]
MFp4 bz_ipv6_fast:

  Defer checksum calulations on UDP6 output and respect the mbuf
  flags set by NICs having done checksum validation for us already,
  thus saving the computing time in the input path as well.

  Sponsored by: The FreeBSD Foundation
  Sponsored by: iXsystems

Reviewed by: gnn (as part of the whole)
MFC After: 3 days

12 years agoMFp4 bz_ipv6_fast:
bz [Fri, 25 May 2012 02:17:16 +0000 (02:17 +0000)]
MFp4 bz_ipv6_fast:

  Add support for delayed checksum calculations in the IPv6
  output path.  We currently cannot offload to the card if we
  add extension headers (which incl. fragmentation).

  Fix two SCTP offload support copy&paste bugs: calculate
  checksums if fragmenting and no need to flag IPv4 header
  checksums in the IPv6 forwarding path.

  Sponsored by: The FreeBSD Foundation
  Sponsored by: iXsystems

Reviewed by: gnn (as part of the whole)
MFC After: 3 days

12 years agoPrepare for improved (read: pcie) suspend/resume support.
adrian [Fri, 25 May 2012 02:07:59 +0000 (02:07 +0000)]
Prepare for improved (read: pcie) suspend/resume support.

* Flesh out the pcie disable method for 11n chips, as they were defaulting
  to the AR5212 (empty) PCIe disable method.

* Add accessor macros for the HAL PCIe enable/disable calls.

* Call disable on ath_suspend()

* Call enable on ath_resume()

NOTE:

* This has nothing to do with the NIC sleep/run state - the NIC still
  will stay in network-run state rather than supporting network-sleep
  state.  This is preparation work for supporting correct suspend/resume
  WARs for the 11n PCIe NICs.

TODO:

* It may be feasible at this point to keep the chip powered down during
  initial probe/attach and only power it up upon the first configure/reset
  pass.  This however would require correct (for values of "correct")
  tracking of the NIC power configuration state from the driver and that
  just isn't attempted at the moment.

Tested:

* AR9280 on my Lenovo T60, but with no suspend/resume pass (yet).

12 years agoMFp4 bz_ipv6_fast:
bz [Fri, 25 May 2012 01:48:15 +0000 (01:48 +0000)]
MFp4 bz_ipv6_fast:

  Hide the ip6aux functions.  The only one referenced outside ip6_input.c
  is not compiled in yet (__notyet__) in route6.c (r235954).  We do have
  accessor functions that should be used.

  Sponsored by: The FreeBSD Foundation
  Sponsored by: iXsystems

Reviewed by: gnn (as part of the whole)
MFC After: 3 days
X-MFC: KPI?

12 years agoMFp4 bz_ipv6_fast:
bz [Fri, 25 May 2012 01:45:05 +0000 (01:45 +0000)]
MFp4 bz_ipv6_fast:

  Simplify the code removing a return from an earlier else case,
  not differing from the default function return called now.

  Sponsored by: The FreeBSD Foundation
  Sponsored by: iXsystems

Reviewed by: gnn (as part of the whole)
MFC After: 3 days

12 years agoMFp4 bz_ipv6_fast:
bz [Fri, 25 May 2012 01:43:52 +0000 (01:43 +0000)]
MFp4 bz_ipv6_fast:

  We currently nowhere set IP6A_SWAP making the entire check useless
  with the current code.  Keep around but do not compile in.

  Sponsored by: The FreeBSD Foundation
  Sponsored by: iXsystems

Reviewed by: gnn (as part of the whole)
MFC After: 3 days

12 years agoMFp4 bz_ipv6_fast:
bz [Fri, 25 May 2012 01:42:48 +0000 (01:42 +0000)]
MFp4 bz_ipv6_fast:

  No need to hold the (expensive) rt lock over (expensive) logging.

  Sponsored by: The FreeBSD Foundation
  Sponsored by: iXsystems

Reviewed by: gnn (as part of the whole)
MFC After: 3 days

12 years agoMFp4 bz_ipv6_fast:
bz [Fri, 25 May 2012 01:13:39 +0000 (01:13 +0000)]
MFp4 bz_ipv6_fast:

  Factor out the tcp_hc_getmtu() call.  As the comments say it
  applies to both v4 and v6, so only write it once making it easier
  to read the protocol family specifc code.

  Sponsored by: The FreeBSD Foundation
  Sponsored by: iXsystems

Reviewed by: gnn (as part of the whole)
MFC After: 3 days

12 years agoDon't try to set a null TERM environment.
jamie [Fri, 25 May 2012 00:38:06 +0000 (00:38 +0000)]
Don't try to set a null TERM environment.

Submitted by: Mateusz Guzik <mjguzik gmail.com>

12 years agoCatch up with realpath(3) changes (r235266) and unbreak acpidump(8).
jkim [Fri, 25 May 2012 00:18:19 +0000 (00:18 +0000)]
Catch up with realpath(3) changes (r235266) and unbreak acpidump(8).

12 years agoAdd a missing " to get closer to compiling.
bz [Thu, 24 May 2012 23:46:17 +0000 (23:46 +0000)]
Add a missing " to get closer to compiling.

12 years agoMerge ACPICA 20120518.
jkim [Thu, 24 May 2012 23:12:30 +0000 (23:12 +0000)]
Merge ACPICA 20120518.

12 years agoMFp4 bz_ipv6_fast:
bz [Thu, 24 May 2012 23:03:23 +0000 (23:03 +0000)]
MFp4 bz_ipv6_fast:

  Significantly update tcp_lro for mostly two things:
  1) introduce basic support for IPv6 without extension headers.
  2) try hard to also get the incremental checksum updates right,
     especially also in the IPv4 case for the IP and TCP header.

  Move variables around for better locality, factor things out into
  functions, allow checksum updates to be compiled out, ...

  Leave a few comments on further things to look at in the future,
  though that is not the full list.

  Update drivers with appropriate #includes as needed for IPv6 data
  type in LRO.

  Sponsored by: The FreeBSD Foundation
  Sponsored by: iXsystems

Reviewed by: gnn (as part of the whole)
MFC After: 3 days

12 years agoAtomic operation acquire barriers also need to be isync on 64-bit systems.
nwhitehorn [Thu, 24 May 2012 22:14:39 +0000 (22:14 +0000)]
Atomic operation acquire barriers also need to be isync on 64-bit systems.

12 years agoRevert isync for ILP32 to sync as per my original change that I discussed
marcel [Thu, 24 May 2012 22:06:00 +0000 (22:06 +0000)]
Revert isync for ILP32 to sync as per my original change that I discussed
with Nathan. Leave __ATOMIC_ACQ as an isync as per Nathan.

12 years agoMFp4 bz_ipv6_fast:
bz [Thu, 24 May 2012 22:00:48 +0000 (22:00 +0000)]
MFp4 bz_ipv6_fast:

  in_cksum.h required ip.h to be included for struct ip.  To be
  able to use some general checksum functions like in_addword()
  in a non-IPv4 context, limit the (also exported to user space)
  IPv4 specific functions to the times, when the ip.h header is
  present and IPVERSION is defined (to 4).

  We should consider more general checksum (updating) functions
  to also allow easier incremental checksum updates in the L3/4
  stack and firewalls, as well as ponder further requirements by
  certain NIC drivers needing slightly different pseudo values
  in offloading cases.  Thinking in terms of a better "library".

  Sponsored by: The FreeBSD Foundation
  Sponsored by: iXsystems

Reviewed by: gnn (as part of the whole)
MFC After: 3 days

12 years agoConsitently use "__LP64__".
obrien [Thu, 24 May 2012 21:44:46 +0000 (21:44 +0000)]
Consitently use "__LP64__".
[there are 33 __LP64__'s in the kernel (minus cddl/ and contrib/),
and 11 _LP64's]

12 years agoRecognize version 3.1 of the SEC crypto engine.
raj [Thu, 24 May 2012 21:24:23 +0000 (21:24 +0000)]
Recognize version 3.1 of the SEC crypto engine.

12 years agoA few improvements:
marcel [Thu, 24 May 2012 21:23:13 +0000 (21:23 +0000)]
A few improvements:
1.  Define all registers. These definitions are needed to support
    the FCM driver for direct-connect NAND.
2.  Repurpose lbc_read_reg() and lbc_write_reg() for use by localbus
    attached device drivers. Use bus_space functions directly in the
    lbc driver itself.
3.  Be smarter about programming LAWs and mapping memory. The ranges
    defined in the FDT are per bank (= chip select) and since we can
    have up to 8 banks, we could easily use more than 8 LAWs or TLB
    enrties when per-bank memory ranges need multiple LAWs or TLBs
    due to alignment or size constraints.
    We now combine all memory ranges into the fewest possible set of
    contiguous regions and program the hardware for that. Thus, a
    cleverly written FDT with 8 devices may still only need 1 LAW or
    1 TLB entry. Note that the memory ranges can be assigned randomly
    to the banks. We sort as we build to handle that.
4.  Support the FCM when programming the OR register. This is mostly
    for documention purposes as we do not have a way to define the
    mode for a bank.
5.  Remove Semihalf-ism: do not define DEBUG (only to undefine it
    again).

12 years agoFix physical address type to vm_paddr_t.
raj [Thu, 24 May 2012 21:13:24 +0000 (21:13 +0000)]
Fix physical address type to vm_paddr_t.

12 years agoRemove Semihakf-ism. DEBUG is a kernel configuration option. It
marcel [Thu, 24 May 2012 21:09:38 +0000 (21:09 +0000)]
Remove Semihakf-ism. DEBUG is a kernel configuration option. It
should not be defined in source files.

12 years agoJust return if the size of the window is 0. This can happen when the
marcel [Thu, 24 May 2012 21:07:10 +0000 (21:07 +0000)]
Just return if the size of the window is 0. This can happen when the
FDT does not define all ranges possible for a particular node (e.g.
PCI).
While here, only update the trgt_mem and trgt_io pointers if there's
no error. This avoids that we knowingly write an invalid target (= -1).

12 years agoEither the I/O port range or the memory mapped I/O range may not be
marcel [Thu, 24 May 2012 21:01:35 +0000 (21:01 +0000)]
Either the I/O port range or the memory mapped I/O range may not be
defined in the FDT. The range will have a zero size in that case.

12 years agoo Rename kernload_ap to bp_kernelload. This to introduce a common prefix
marcel [Thu, 24 May 2012 20:58:40 +0000 (20:58 +0000)]
o   Rename kernload_ap to bp_kernelload. This to introduce a common prefix
    for variables that live in the boot page.
o   Add bp_trace (yes, it's in the boot page) that gets zeroed before we
    try to wake a core and to which the core being woken can write markers
    so that we know where the core was in case it doesn't wake up. The
    boot code does not yet write markers (too follow).
o   Disable the boot page translation to allow the last 4K page to be used
    for whatever we please. It would get mapped otherwise.
o   Fix kernstart in the case of SMP. The start argument is typically page
    aligned due to the alignment requirements that come with having a boot
    page. The point of using trunc_page is that we get the actual load
    address given that the entry point is immediately following the ELF
    headers. In the SMP case this ended up exactly 4K after the load
    address. Hence subtracting 1 from start.

12 years agoFix the memory barriers for CPUs that do not like lwsync and wedge or cause
marcel [Thu, 24 May 2012 20:45:44 +0000 (20:45 +0000)]
Fix the memory barriers for CPUs that do not like lwsync and wedge or cause
exceptions early enough during boot that the kernel will do ithe same.
Use lwsync only when compiling for LP64 and revert to the more proven isync
when compiling for ILP32. Note that in the end (i.e. between revision 222198
and this change) ILP32 changed from using sync to using isync. As per Nathan
the isync is needed to make sure I/O accesses are properly serialized with
locks and isync tends to be more effecient than sync.

While here, undefine __ATOMIC_ACQ and __ATOMIC_REL at the end of the file
so as not to leak their definitions.

Discussed with: nwhitehorn

12 years agoPreset (clear) the ranges we're supposed to fill from the FDT. If a
marcel [Thu, 24 May 2012 20:24:49 +0000 (20:24 +0000)]
Preset (clear) the ranges we're supposed to fill from the FDT. If a
particular range (either I/O memory or I/O port) is not defined in
the FDT, we're not handing uninitialized structures back to our caller.

12 years agoAllow building for the PowerPC EABI by providing a dummy __eabi()
marcel [Thu, 24 May 2012 20:12:46 +0000 (20:12 +0000)]
Allow building for the PowerPC EABI by providing a dummy __eabi()
function. The purpose of the __eabi() function is to set up the
runtime and is called first thing by main(). The runtime is already
set up for us prior to caling main, so there's nothing to do for
us in the EABI case.

12 years agoFix an inconsistency I just ran into for LDADD and DPADD. The description
marcel [Thu, 24 May 2012 20:00:58 +0000 (20:00 +0000)]
Fix an inconsistency I just ran into for LDADD and DPADD. The description
for both of them use different, and presumably wrong, variables in the
example. They set LDFILES and SRCLIB respectively. I guess that's what
DPADD and LDADD were called first ...

12 years agoWork better with how make/bmake works:
marcel [Thu, 24 May 2012 19:48:15 +0000 (19:48 +0000)]
Work better with how make/bmake works:
1.  Avoid a cd back into ${.CURDIR} to run mkbuiltins when we know make
    will first cd into ${.OBJDIR}. Keep the cwd to what make sets it to.
2.  Don't tell mkbuiltins where to write to (= ${.OBJDIR}), but where to
    get sources from (= ${.CURDIR}). This to compensate for point 1.

This fixes a problem with bmake's mk files that optimize ${.OBJDIR} to
expand to "." after changing cwd, not taking into account that the
target is pretty much undoing that and not getting the full path to the
object tree anymore.

12 years agoFix the following clang warning in drm2:
dim [Thu, 24 May 2012 19:13:54 +0000 (19:13 +0000)]
Fix the following clang warning in drm2:

  sys/dev/drm2/i915/intel_display.c:8861:3: error: expression result unused [-Werror,-Wunused-value]
                  _intel_wait_for(dev,
                  ^~~~~~~~~~~~~~~~~~~~
  @/dev/drm2/i915/intel_drv.h:55:2: note: expanded from macro '_intel_wait_for'
          ret;                                                            \
          ^~~

Reviewed by: kib
MFC after: 1 week

12 years agoMFp4 bz_ipv6_fast:
bz [Thu, 24 May 2012 18:25:09 +0000 (18:25 +0000)]
MFp4 bz_ipv6_fast:

  Introduce a (for now copied stripped down) in6_cksum_pseudo()
  function.  We should be able to use this from in6_cksum() but
  we should also ponder possible MD specific improvements.
  It takes an extra csum argument to allow for easy checks as
  will be done by the upper layer protocol input paths.

  Sponsored by: The FreeBSD Foundation
  Sponsored by: iXsystems

Reviewed by: gnn (as part of the whole)
MFC After: 3 days

12 years agoRevert r220768 for ng_ksocket. This node is special and
glebius [Thu, 24 May 2012 18:22:57 +0000 (18:22 +0000)]
Revert r220768 for ng_ksocket. This node is special and
when it is cloning, its constructor method may be called
in a context that isn't allowed to sleep.

Noticed by: Vadim Goncharov

12 years agoRevert devfs part of r235911. I was unaware about old but unfinished
mav [Thu, 24 May 2012 18:19:23 +0000 (18:19 +0000)]
Revert devfs part of r235911. I was unaware about old but unfinished
discussion between kib@ and gibbs@ about it.

12 years agoMFp4 bz_ipv6_fast:
bz [Thu, 24 May 2012 18:05:10 +0000 (18:05 +0000)]
MFp4 bz_ipv6_fast:

  Optimize in6_cksum(), re-ordering work and limiting variable
  initialization, removing a bzero() for mostly re-initialized
  struct values, making use of the newly introduced in6_getscope(),
  as well as converting an if/panic to a KASSERT().

  Sponsored by: The FreeBSD Foundation
  Sponsored by: iXsystems

Reviewed by: gnn (as part of the whole)
MFC After: 3 days

12 years agoFix to kern/168294 - add flow director support into the
jfv [Thu, 24 May 2012 17:39:54 +0000 (17:39 +0000)]
Fix to kern/168294 - add flow director support into the
static kernel build of ixgbe. Thanks Sergey for pointing
this out.

12 years agoMake g_label(4) ignore provider size when looking for UFS labels.
trasz [Thu, 24 May 2012 16:48:33 +0000 (16:48 +0000)]
Make g_label(4) ignore provider size when looking for UFS labels.
Without it, it fails to create labels for filesystems resized by
growfs(8).

PR: kern/165962
Submitted by: Olivier Cochard-Labbe <olivier at cochard dot me>

12 years agoMFp4 bz_ipv6_fast:
bz [Thu, 24 May 2012 16:30:13 +0000 (16:30 +0000)]
MFp4 bz_ipv6_fast:

  Introduce in6_getscope() to allow more effective checksum
  computations without the need to copy the address to clear the
  scope.

  Sponsored by: The FreeBSD Foundation
  Sponsored by: iXsystems

Reviewed by: gnn (as part of the whole)
MFC After: 3 days

12 years agoHook up mkulzma to the build.
jpaetzel [Thu, 24 May 2012 16:11:51 +0000 (16:11 +0000)]
Hook up mkulzma to the build.

MFC after: 3 days

12 years agoMF amd64 r233097, r233122
alc [Thu, 24 May 2012 15:25:35 +0000 (15:25 +0000)]
MF amd64 r233097, r233122

With the changes over the past year to how accesses to the page's dirty
field are synchronized, there is no need for pmap_protect() to acquire
the page queues lock unless it is going to access the pv lists or
PMAP1/PADDR1.

Style fix to pmap_protect().