Commit Graph

195635 Commits

Author SHA1 Message Date
ian
7d01a916d9 MFC r257111, r257144, r257157, r257183
Test UARTs physical address instead of virtual.

  Be a bit more flexible in how we find the console from the properties on
  /chosen, following the list of allowed console properties in ePAPR. Also
  do not require that stdin be defined and equal to stdout: stdin is
  nonstandard (for ePAPR) and console in an unexpected place is after all
  better than no console.
2014-05-13 19:09:00 +00:00
ian
7efcec8976 MFC r257115, r257116, r257117
Remove dead and duplicated code.
2014-05-13 18:24:02 +00:00
ian
df87ef4409 MFC r257114, r257118
Use common OFW root code to set up fdtbus. This is an almost purely
  negative diff that should improve reliability somewhat. There should be
  no differences in behavior -- please report any that crop up. This has been
  tested on ARM and PPC systems.

  Make sure to get the right node when looking up #interrupt-cells.
2014-05-13 18:14:31 +00:00
ian
0c0ccc18b5 MFC r257093:
Be a little more suspicious of thermal sensors, which can have single
  crazy readings occasionally. One wild reading should not be enough to
  trigger a shutdown, so instead wait for several concerning readings in
  a row.
2014-05-13 18:08:15 +00:00
ian
399f183366 MFC r256994, r257016, r257055, r257059, r257060, r257075
Add two new interfaces to ofw_bus:
  - ofw_bus_map_intr()
    Maps an (iparent, IRQ) tuple to a system-global interrupt number in some
    platform dependent way. This is meant to be implemented as a replacement
    for [FDT_]MAP_IRQ() that is an MI interface that knows about the bus
    hierarchy.
  - ofw_bus_config_intr()
    Configures an interrupt (previously mapped) based on firmware sense flags.
    This replaces manual interpretation of the sense field in bus drivers and
    will, in a follow-up, allow that interpretation to be redirected to the PIC
    drivers where it belongs. This will eventually replace the tables in
    /sys/dev/fdt/fdt_ARCH.c

  The PowerPC/AIM code has been converted to use these globally, with an
  implementation in terms of MAP_IRQ() and powerpc_config_intr(), assuming
  OpenPIC, at the bus root in nexus(4). The ofw_bus_config_intr() will shortly
  be integrated into pic_if.m and bounced through nexus into the PIC tree.

  Factor out MI portions of the PowerPC nexus device into /sys/dev/ofw. The
  sparc64 driver will be modified to use this shortly.

  Allow PIC drivers to translate firmware sense codes for themselves. This
  is designed to replace the tables in dev/fdt/fdt_ARCH.c, but will not
  happen quite yet.

  Do not map IRQs twice. This fixes PowerPC/FDT systems with multiple PICs,
  which would try to treat the previously-mapped interrupts from
  fdt_decode_intr() as interrupt line numbers on the same parent PIC.

  Remove some of the code required for supporting ssm(4) on SPARC in favor
  of a more PowerPC/FDT-focused design. Whenever SPARC64 is integrated
  into this rework, this should be (trivially) revisited.
2014-05-13 18:06:26 +00:00
ian
41e4178a5b MFC r256973, r256974
If the device tree directly contains the timebase frequency, use it. This
 property is required by ePAPR, but maintain the fallback to bus-frequency
 for compatibility.  Allow 32 or 64 bits.
2014-05-13 18:00:41 +00:00
ian
4c1631c2b1 MFC r256932, r256938, r256966, r256953, r256967, r256969, r257015:
Add a new function (OF_getencprop()) that undoes the transformation applied
  by encode-int. Specifically, it takes a set of 32-bit cell values and
  changes them to host byte order. Most non-string instances of OF_getprop()
  should be using this function, which is a no-op on big-endian platforms.

  Use the new function all over the place.
2014-05-13 17:59:17 +00:00
ian
7353aa0b49 MFC r256901, r256914 (by nwhitehorn):
Catch up on 6 years of improvements in Open Firmware nexus devices by
  importing the sparc64 one. At least 90% of this code is MI and will be
  moved into /sys/dev/ofw at some point in the future.

  Ignore registers on devices where the reg property is malformed. Issue a
  warning if this happens under bootverbose. This prevents some
  strange-looking entries in dmesg for SMU devices on Apple G5 systems.
2014-05-13 17:18:48 +00:00
ian
42a63a26cf MFC r256870, r256898, r256899, r256900 (by nwhitehorn):
Standards-conformance and code deduplication:
  - Use bus reference phandles in place of FDT offsets as IRQ domain keys
  - Unify the identical macio/fdt/mambo OpenPIC drivers into one
  - Be more forgiving (following ePAPR) about what we need from the device
    tree to identify an OpenPIC
  - Correctly map all IRQs into an interrupt domain
  - Set IRQ_*_CONFORM for interrupts on an unknown PIC type instead of
    failing attachment for that device.

  Allow lots of interrupts (useful on multi-domain platforms) and do not
  set device_quiet() on all devices attached under nexus(4).
2014-05-13 17:12:07 +00:00
ian
3d20d204d8 MFC r256814, r256816, r256818, r256846, r256855, r256864 (by nwhitehorn):
- Handle 2GB of ram
 - Allow the OFW interrupt mapping code to work with PCI devices not
   enumerated by Open Firmware, as in the case of FDT.
 - Provide an interface for PCI bus drivers that need some of ofw_pci's
   metadata during attach.
 - Use standard ofw_bus helpers instead of reinventing the wheel.
 - Make hard-wired TLB allocations be at minimum one page.
2014-05-13 16:59:50 +00:00
ian
788d947f59 MFC r256798: Return BUS_PROBE_NOWILDCARD from fdtbus_probe. 2014-05-13 16:52:21 +00:00
ian
a7a560a760 MFC r256792, r256793, r256799 (by nwhitehorn): Unify AIM and booke code. 2014-05-13 16:50:10 +00:00
kevlo
9a6f8ee2e6 MFC r264216, r265817, r265822:
Add man page for udplite(4).
2014-05-13 06:09:01 +00:00
kevlo
69da76e9e5 MFC r264212,r264213,r264248,r265776,r265811,r265909:
- Add support for UDP-Lite protocol (RFC 3828) to IPv4 and IPv6 stacks.
  Tested with vlc and a test suite [1].
  [1] http://www.erg.abdn.ac.uk/~gerrit/udp-lite/files/udplite_linux.tar.gz

  Reviewed by:	jhb, glebius, adrian

- Fix a logic bug which prevented the sending of UDP packet with 0 checksum.

- Disable TX checksum offload for UDP-Lite completely. It wasn't used for
  partial checksum coverage, but even for full checksum coverage it doesn't
  work.
2014-05-13 06:05:53 +00:00
alc
ab793415d0 MFC r265418
Prior to r254304, a separate function, vm_pageout_page_stats(), was used
  to periodically update the reference status of the active pages.  This
  function was called, instead of vm_pageout_scan(), when memory was not
  scarce.  The objective was to provide up to date reference status for
  active pages in case memory did become scarce and active pages needed to
  be deactivated.

  The active page queue scan performed by vm_pageout_page_stats() was
  virtually identical to that performed by vm_pageout_scan(), and so r254304
  eliminated vm_pageout_page_stats().  Instead, vm_pageout_scan() is
  called with the parameter "pass" set to zero.  The intention was that when
  pass is zero, vm_pageout_scan() would only scan the active queue.
  However, the variable page_shortage can still be greater than zero when
  memory is not scarce and vm_pageout_scan() is called with pass equal to
  zero.  Consequently, the inactive queue may be scanned and dirty pages
  laundered even though that was not intended by r254304.  This revision
  fixes that.
2014-05-13 05:26:43 +00:00
alc
498371bb43 MFC r260567
Correctly update the count of stuck pages, "addl_page_shortage", in
  vm_pageout_scan().  There were missing increments in two less common
  cases.

  Don't conflate the count of stuck pages and the pageout deficit provided
  by vm_page_alloc{,_contig}().

  Handle held pages consistently in the inactive queue scan.  In the more
  common case, we did not move the page to the tail of the queue.  Whereas,
  in the less common case, we did.  There's no particular reason to move
  the page in the less common case, so remove it.

  Perform the calculation of the page shortage for the active queue scan a
  little earlier, before the active queue lock is acquired.  The correctness
  of this calculation doesn't depend on the active queue lock being held.

  Eliminate a redundant variable, "pcount".  Use the more descriptive
  variable, "maxscan", in its place.

  Apply a few nearby style fixes, e.g., eliminate stray whitespace and
  excess parentheses.
2014-05-13 05:21:54 +00:00
ian
2a67370d69 MFC r259750, r260245: Add PPS support to the am335x timer driver. 2014-05-12 22:33:22 +00:00
ian
6c09b7134e MFC r259744, cleanups to move global vars into softc, use named values, etc. 2014-05-12 22:30:10 +00:00
ian
20d3a75430 MFC r259739, r259743: Shorten DMTIMER_->DMT_, #define all register constants. 2014-05-12 22:25:41 +00:00
ian
d25116a90b Revert accidental commit that tagged along with an MFC commit. 2014-05-12 22:19:37 +00:00
ian
01928d6e58 MFC r259099: Fix a small error in calculating length of DELAY(). 2014-05-12 22:15:57 +00:00
ian
abdf44b4bc MFC r260235: fixes to dockstar DTS source. 2014-05-12 21:40:03 +00:00
ian
cd8ffe68c7 MFC r264822: Allow .WAIT to appear in SUBDIR= lists 2014-05-12 21:22:53 +00:00
des
7885a006b9 MFH (r264966): add sysctl OIDs for actual swap zone size and capacity 2014-05-12 20:48:04 +00:00
pluknet
62542709cb MFC r265285,265320:
Documented the pget(9) system kernel interface.
2014-05-12 19:42:16 +00:00
ambrisko
5b37001473 MFC 265555
dd mrsas(4) driver from LSI official support of newer MegaRAID SAS
cards.  LSI has been maintaining this driver outside of the FreeBSD
tree.  It overlaps support of ThunderBolt and Invader cards that mfi(4)
supports.  By default mfi(4) will attach to cards.  If the tunable:
	hw.mfi.mrsas_enable=1
is set then mfi(4) will not probe and attach to these newer cards and
allow mrsas(4) to attach.  So by default this driver will not effect
a FreeBSD system unless mfi(4) is removed from the kernel or the
tunable is enabled.

mrsas(4) attaches disks to the CAM layer so it depends on CAM and devices
show up as /dev/daX.  mfiutil(8) does not work with mrsas.  The FreeBSD
version of MegaCli and StorCli from LSI do work with mrsas.  It appears
that StorCli only works with mrsas.  MegaCli appears to work with mfi(4)
and mrsas(4).

It would be good to add mfiutil(4) support to mrsas, emulations modes,
kernel logging, device aliases to ease the transition between mfi(4)
and mrsas(4).

Style issues should be resolved by LSI when they get committers approved.
The plan is get this driver in FreeBSD 9.3 to improve HW support.

Thanks to LSI for developing, testing and working with FreeBSD to
make this driver co-exist in FreeBSD.  This improves the overall
support of MegaRAID SAS.

Submitted by:	Kashyap Desai <Kashyap.Desai@lsi.com>
Sponsored by:	LSI
2014-05-12 17:55:24 +00:00
davidcs
7a535d1845 MFC r265703
Modify Copyright information and other strings to reflect
Qlogic Corporation's purchase of Broadcom's NetXtreme business.
Added clean option to Makefile

Submitted by:David C Somayajulu (davidcs@freebsd.org) QLogic Corporation
2014-05-12 15:52:49 +00:00
ae
8e5289f450 MFC r256690:
Add an automatic resize support to the GEOM_PART class.

  When parent provider has been resized, the scheme specific G_PART_RESIZE
  method does an update of scheme's metadata. But all changes are not saved
  to disk, until `gpart commit` will be called.

MFC r265336:
  Add an advice what to do when partition was automatically resized.
2014-05-12 12:04:44 +00:00
ae
8bd4b60954 MFC r265318:
For schemes that do an automatic partition aligning move this code to
  separate function.

MFC r265331:
  Prevent an unexpected shrinking on resizing due to alignment for MBR,
  PC98 and VTOC8 schemes.

MFC r265333:
  Add better error description for case when we are doing resize and
  scheme-specific method returns EBUSY.

MFC r265539:
  It is safe to allow shrinking, when aligned size is bigger than current.
2014-05-12 10:19:31 +00:00
truckman
767aadd2f0 MFC r265363
Avoid unsigned integer overflow which can cause
rman_reserve_resource_bound() to return incorrect results.

Continue the initial search until the first viable region is found.

Add a comment to explain the search termination test.

PR:		kern/188534
Reviewed by:	jhb (previous version)
2014-05-12 04:27:10 +00:00
thomas
69470d28bf MFC rev. 265260:
Add appropriate quoting to allow building with a KERNCONFDIR containing
spaces.

PR:		kern/162736
2014-05-11 20:44:58 +00:00
gnn
59b23c2313 MFC: 263302, 264461, 264772
263302:
 fix mbuf leak if it does not fit in software queue

 264461:
 Commit various fixes for the SolarFlare drivers, in particular
 this set of patches fixes support for systems with > 32 cores.

 Details include

 sfxge: RXQ index (not label) comes from FW in flush done/failed events

 Change the second argument name of the efx_rxq_flush_done_ev_t and
 efx_rxq_flush_failed_ev_t prototypes to highlight that RXQ index (not label)
 comes from FW in flush done and failed events.

 sfxge: TXQ index (not label) comes from FW in flush done event

 Change the second argument name of the efx_txq_flush_done_ev_t prototype to
 highlight that TXQ index (not label) comes from FW in flush done event.

 sfxge: use TXQ type as label to support more than 32 TXQs

 There are 3 TXQs in event queue 0 and 1 TXQ (with TCP/UDP checksum offload)
 in all other event queues.

 264772:
 Check that port is started when MAC filter is set

 The MAC filter set may be called without softc_lock held in the case of
 SIOCADDMULTI and SIOCDELMULTI ioctls. The ioctl handler checks IFF_DRV_RUNNING
 flag which implies port started, but it is not guaranteed to remain.
 softc_lock shared lock can't be held in the case of these ioctls processing,
 since it results in failure where kernel complains that non-sleepable
 lock is held in sleeping thread.

 Both problems are repeatable on LAG with LACP proto bring up.

Submitted by:	Andrew Rybchenko <Andrew.Rybchenko at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
2014-05-11 17:18:09 +00:00
des
b6c03d4ad7 MFH (r261913): switch default to sha512
MFH (r264964): rewrite so DES still works when not the default
MFH (r262945): clean up man page
2014-05-11 14:54:17 +00:00
brueffer
971a9ff5f3 MFC: r265269
Make the HARDWARE section ready for release notes generation; sort SEE ALSO.

Compared to the original revision, the list of supported chipsets was changed to
reflect those supported in this branch.
2014-05-11 09:54:38 +00:00
brueffer
702625a47d MFC: r265264, r265270
Add rsu(4) and urtwn(4) to the hardware notes.
2014-05-10 20:45:23 +00:00
brueffer
67f3b88afe MFC: r257408 by kevlo
Add manpage for urtwnfw, the Realtek RTL8188CU/RTL8192CU firmware
module.  Also fix a few nits in urtwn.4.
2014-05-10 19:47:54 +00:00
brueffer
88bb1a9d2d MFC: r265263
Make this manpage ready for hardware notes generation, add more Xrefs and perform
general cleanup.

In particular, don't claim rsu(4) devices can be configured with hostname(1)...
2014-05-10 19:10:31 +00:00
rpaulo
a2ba435491 MFC r259126:
Activate the device before attempt to access any of its registers.  Without
this change we may end up with a panic (Fatal kernel mode data abort:
'External Non-Linefetch Abort (S)') as described in
http://e2e.ti.com/support/arm/sitara_arm/f/791/t/276862.aspx.

It is now possible to bring up I2C1 and I2C2 on BBB.
2014-05-10 08:10:01 +00:00
rpaulo
7faac4cdbf Manually MFC 262714:
Add a missing semicolong, noticed by the gnu dt compiler.

In head, the directory layout changed and we can't svn merge correctly.
2014-05-10 08:07:41 +00:00
kib
2ae994402a MFC r265275:
Overwrite the de_Name for the directories on rename to correct the dot
name.
2014-05-10 07:53:36 +00:00
rpaulo
7e66d0998d Revert bogus change in 265804 to configparser.c 2014-05-10 07:26:49 +00:00
rpaulo
d8b1412072 MFC r252440:
Enable the second and the third I2C controllers on Beaglebone-black.
2014-05-10 07:25:26 +00:00
davidcs
a063775f95 MFC r265411
Modify Copyright information to reflect Qlogic Corporation's purchase
of Broadcom's NetXtreme business

Submitted by:David C Somayajulu (davidcs@freebsd.org) QLogic Corporation
2014-05-10 02:10:32 +00:00
jh
93d38c10ec MFC r264194:
Fork a child process and wait until the process terminates when the -P
option is specified. This behavior is documented on the manual page.

PR:		bin/187265
2014-05-09 15:55:45 +00:00
brueffer
384378af24 MFC: r265244
Free resources in an error case.

CID:		1018947
Found with:	Coverity Prevent(tm)
2014-05-09 13:18:24 +00:00
delphij
628e16b68d MFC r265464:
Sort .ALLSRC before concatenating files together.  This makes sure that the
file are always built the same.

(Note that Header and Localstuff must appear first and in that order, the
sorting does not affect as a coincident effect).

Submitted by:	sjg
2014-05-09 07:24:39 +00:00
delphij
0dcd2e5d83 MFC r265458:
Import George Wilson's change for Illumos #4730:

	4730 metaslab group taskq should be destroyed in metaslab_group_destroy()
	Reviewed by: Alex Reece <alex.reece@delphix.com>
	Reviewed by: Matthew Ahrens <mahrens@delphix.com>
	Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>

	Original author: George Wilson
2014-05-09 07:21:32 +00:00
delphij
90e164441d MFC r264836 (MFV r264830):
4745 fix AVL code misspellings
2014-05-09 07:17:29 +00:00
delphij
7cb0f49ed2 MFC r264835 (MFV r264829):
3897 zfs filesystem and snapshot limits
2014-05-09 07:12:31 +00:00
delphij
1b18a5ca98 MFC r264740:
Use case insensitive match in portsnap.

PR:		bin/186510
Submitted by:	olli
2014-05-09 07:07:25 +00:00