]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoSilence a warning with GCC that was breaking the build with Juniper's GCC.
David Chisnall [Sat, 5 Apr 2014 08:17:48 +0000 (08:17 +0000)]
Silence a warning with GCC that was breaking the build with Juniper's GCC.

Reviewed by: marcel

10 years agoShow error code when failing to destroy a mirror on delay
Bryan Drewery [Sat, 5 Apr 2014 03:01:29 +0000 (03:01 +0000)]
Show error code when failing to destroy a mirror on delay

Sponsored by: EMC / Isilon Storage Division
MFC after: 2 weeks

10 years agoInitialise m_pkthdr via bzero instead of explicitly zeroing each member
Ed Maste [Fri, 4 Apr 2014 21:09:06 +0000 (21:09 +0000)]
Initialise m_pkthdr via bzero instead of explicitly zeroing each member

Sponsored by: The FreeBSD Foundation

10 years agoEnable SMP for Pandaboard.
Ian Lepore [Fri, 4 Apr 2014 20:58:45 +0000 (20:58 +0000)]
Enable SMP for Pandaboard.

10 years agoSwitch wandboards over to the common IMX6 kernel config, which has SMP
Ian Lepore [Fri, 4 Apr 2014 20:42:44 +0000 (20:42 +0000)]
Switch wandboards over to the common IMX6 kernel config, which has SMP
enabled.  Also switch IMX6 to use SCHED_ULE.

The now-unreferenced WANDBOARD.common config will be deleted after giving
folks who may be including it a heads-up to switch to IMX6.

10 years agoCorrect return type of pdfork(2).
Ed Schouten [Fri, 4 Apr 2014 19:53:45 +0000 (19:53 +0000)]
Correct return type of pdfork(2).

The pdfork(2) man page states:

"pdfork() returns a PID, 0 or -1, as fork(2) does."

As it returns a PID, the return type should obviously be pid_t. As int
and pid_t have the same size on all architectures, this change does not
affect the ABI in any way.

10 years agoWe don't support any ARM systems with an ISA bus and don't need a freelist
Ian Lepore [Fri, 4 Apr 2014 19:35:38 +0000 (19:35 +0000)]
We don't support any ARM systems with an ISA bus and don't need a freelist
of memory to support ISA addressing limitations.

10 years agoFix variable type to avoid printf formatter warning.
Julio Merino [Fri, 4 Apr 2014 18:10:11 +0000 (18:10 +0000)]
Fix variable type to avoid printf formatter warning.

This fixes the build under powerpc64 where gcc complains about a mismatch
between a %zd printf formatter and an int variable passed to it.

10 years agoConnect sys/boot/amd64 to the build
Ed Maste [Fri, 4 Apr 2014 18:07:21 +0000 (18:07 +0000)]
Connect sys/boot/amd64 to the build

Sponsored by: The FreeBSD Foundation

10 years agoPrevent XDTP from being a relative path
Baptiste Daroussin [Fri, 4 Apr 2014 17:58:33 +0000 (17:58 +0000)]
Prevent XDTP from being a relative path
XDTP is used as the default SYSROOT for clang and thus should be an absolute path.

PR: arm/188249
Submitted by: Edgar Martinez <wink15987@gmail.com>
Reviewed by: imp

10 years agoAllocate per-cpu resources for doing pmap_zero_page() and pmap_copy_page().
Ian Lepore [Fri, 4 Apr 2014 17:57:49 +0000 (17:57 +0000)]
Allocate per-cpu resources for doing pmap_zero_page() and pmap_copy_page().
This is performance enhancement rather than bugfix.

10 years agoFix TLB maintenance issues for armv6 and armv7.
Ian Lepore [Fri, 4 Apr 2014 17:45:39 +0000 (17:45 +0000)]
Fix TLB maintenance issues for armv6 and armv7.

  - Add cpu_cpwait to comply with the convention.
  - Add missing TLB invalidations, especially in pmap_kenter & pmap_kremove
    with distinguishing between D and ID pages.
  - Modify pmap init/bootstrap invalidations to ID, just to be safe.
  - Fix TLB-inv and PTE_SYNC ordering.

This combines changes submitted by ian@, cognet@, and Wojciech Macek,
which have all been tested together as a unit.

10 years agoFix TTB set operation for armv7.
Ian Lepore [Fri, 4 Apr 2014 17:39:05 +0000 (17:39 +0000)]
Fix TTB set operation for armv7.

Perform sychronization (by "isb" barrier) after TTB is set.  This
is done to ensure that TLB invalidation always executes after
TTB modification and operates on valid CP15 data (per specification).

Submitted by: Wojciech Macek <wma@semihalf.com>
Reviewed by: ian@, cognet@

10 years agoAdd PCI-IDs for TBD Gen9 RAID controller HBAs from HP to ciss(4)
Sean Bruno [Fri, 4 Apr 2014 17:01:49 +0000 (17:01 +0000)]
Add PCI-IDs for TBD Gen9 RAID controller HBAs from HP to ciss(4)

Submitted by: Benesh, Scott <scott.benesh@hp.com>
MFC after:  2 weeks
Sponsored by: Yahoo! Inc.

10 years agoThe check for local address spoofing lacks ifaddr locking.
Andrey V. Elsukov [Fri, 4 Apr 2014 16:58:32 +0000 (16:58 +0000)]
The check for local address spoofing lacks ifaddr locking.
Remove these loops and use in_localip() and in6_localip()
functions instead.

MFC after: 1 week
Sponsored by: Yandex LLC

10 years agoRemove unused variable.
Andrey V. Elsukov [Fri, 4 Apr 2014 15:57:27 +0000 (15:57 +0000)]
Remove unused variable.

MFC after: 1 week
Sponsored by: Yandex LLC

10 years agoRemove dead code.
Andrey V. Elsukov [Fri, 4 Apr 2014 15:55:38 +0000 (15:55 +0000)]
Remove dead code.

MFC after: 1 week
Sponsored by: Yandex LLC

10 years agoChange kernel/rootfs hints to use search patterns instead of absolute
Sean Bruno [Fri, 4 Apr 2014 15:52:45 +0000 (15:52 +0000)]
Change kernel/rootfs hints to use search patterns instead of absolute
locations.

10 years agoRework the iSCSI PDU transmit code to avoid lock contention and coalesce
Edward Tomasz Napierala [Fri, 4 Apr 2014 15:49:37 +0000 (15:49 +0000)]
Rework the iSCSI PDU transmit code to avoid lock contention and coalesce
PDUs before sending.

Sponsored by: The FreeBSD Foundation

10 years agogcc: define __block when block support is enabled
Pedro F. Giffuni [Fri, 4 Apr 2014 15:49:23 +0000 (15:49 +0000)]
gcc: define __block when block support is enabled

This mimics the behaviour in clang and lets us build cleanly
the libdispatch port on platforms where the base gcc is still
the default compiler.

Bump __FreeBSD_version for ports.

Tested by: theraven
MFC after: 3 days

10 years agoFlag several sysctl variables as tunables.
Ian Lepore [Fri, 4 Apr 2014 15:31:57 +0000 (15:31 +0000)]
Flag several sysctl variables as tunables.

10 years agoAdjust the comments about translating clock divisor bits to match recent
Ian Lepore [Fri, 4 Apr 2014 15:03:03 +0000 (15:03 +0000)]
Adjust the comments about translating clock divisor bits to match recent
code changes.

10 years agoFix printf format mismatches
Ed Maste [Fri, 4 Apr 2014 13:35:36 +0000 (13:35 +0000)]
Fix printf format mismatches

Sponsored by: The FreeBSD Foundation

10 years agoFix SIGIO delivery. Use fsetown() to handle file descriptor owner
David Xu [Fri, 4 Apr 2014 12:31:13 +0000 (12:31 +0000)]
Fix SIGIO delivery. Use fsetown() to handle file descriptor owner
ioctl and use pgsigio() to send SIGIO.

Submitted by: truckman
Reviewed by: mjg

10 years agoAll the iSCSI sysctls are also tunables; advertise that.
Edward Tomasz Napierala [Fri, 4 Apr 2014 08:48:55 +0000 (08:48 +0000)]
All the iSCSI sysctls are also tunables; advertise that.

Sponsored by: The FreeBSD Foundation

10 years agoWe don't need TAILQ for iSCSI PDUs; STAILQ is enough.
Edward Tomasz Napierala [Fri, 4 Apr 2014 08:43:23 +0000 (08:43 +0000)]
We don't need TAILQ for iSCSI PDUs; STAILQ is enough.

Sponsored by: The FreeBSD Foundation

10 years agoMerge r262906 from ^/projects/release-embedded:
Glen Barber [Fri, 4 Apr 2014 07:42:12 +0000 (07:42 +0000)]
Merge r262906 from ^/projects/release-embedded:
  Remove only-works-on-amd64 restriction.

Sponsored by: The FreeBSD Foundation

10 years agoMerge r262907 from ^/projects/release-embedded:
Glen Barber [Fri, 4 Apr 2014 07:02:38 +0000 (07:02 +0000)]
Merge r262907 from ^/projects/release-embedded:
  Add ZEDBOARD support for release builds.

Sponsored by: The FreeBSD Foundation

10 years agoGarbage collect fdavail.
Mateusz Guzik [Fri, 4 Apr 2014 05:07:36 +0000 (05:07 +0000)]
Garbage collect fdavail.

It rarely returns an error and fdallocn handles the failure of fdalloc
just fine.

10 years agoRemove unused prototype.
Ruslan Bukin [Fri, 4 Apr 2014 05:05:43 +0000 (05:05 +0000)]
Remove unused prototype.

10 years agoLet's try having just one mmc/sd controller driver.
Ian Lepore [Fri, 4 Apr 2014 03:48:43 +0000 (03:48 +0000)]
Let's try having just one mmc/sd controller driver.

Pointed out by: gjb

10 years agoUse the sdhci driver for Pandaboard.
Ian Lepore [Fri, 4 Apr 2014 03:24:19 +0000 (03:24 +0000)]
Use the sdhci driver for Pandaboard.

10 years agoSwitch OMAP4 (Pandaboard et. al.) to use the ti_sdhci driver.
Ian Lepore [Fri, 4 Apr 2014 03:11:06 +0000 (03:11 +0000)]
Switch OMAP4 (Pandaboard et. al.) to use the ti_sdhci driver.

10 years agoFix the logic for translating between MMCHS and SDHCI clock divisors.
Ian Lepore [Fri, 4 Apr 2014 03:04:29 +0000 (03:04 +0000)]
Fix the logic for translating between MMCHS and SDHCI clock divisors.

Submitted by: Svatopluk Kraus <onwahe@gmail.com>

10 years ago-k option is compliant with POSIX.
Greg Lehey [Fri, 4 Apr 2014 01:48:25 +0000 (01:48 +0000)]
-k option is compliant with POSIX.

10 years agoWhen changing the sd bus clock divisor, clear just the bus clock enable bit
Ian Lepore [Fri, 4 Apr 2014 01:10:02 +0000 (01:10 +0000)]
When changing the sd bus clock divisor, clear just the bus clock enable bit
before changing the divisor bits in the register.  We were writing a zero
to the register, which clears the enable, but also cleared the divisor bits
at the same time.  That's a violation of the sdhci spec, which says the
divisor can only be changed when the clock is disabled.  This has worked
okay on most hardware for years, but the TI OMAP controller would misbehave
after changing the divisor improperly.

Submitted by: Svatopluk Kraus <onwahe@gmail.com>

10 years agoVarious fixes to the ti_sdhci driver, mostly to make it work on Pandaboard.
Ian Lepore [Fri, 4 Apr 2014 00:59:40 +0000 (00:59 +0000)]
Various fixes to the ti_sdhci driver, mostly to make it work on Pandaboard.

 - Don't allow high-speed mode on OMAP4 due to hardware erratum.
 - Check the proper bit in the status register when waiting for the
   controller to come out of reset.
 - Add handling for the "non-removable" fdt property by always returning
   "card is present" status.
 - Add the non-removable property for the MMC card on a Beaglebone Black.
 - Add the non-removable property for Pandaboard as a workaround.

For Pandaboard the card detect pin is handled by the twl6030 fpga device
which gets an interrupt on pin change and then has to query the fpga
for the actual status.  We don't have code to do that yet.

Submitted by: Svatopluk Kraus <onwahe@gmail.com>

10 years agoSupport UEFI booting on amd64 via loader.efi
Ed Maste [Fri, 4 Apr 2014 00:16:46 +0000 (00:16 +0000)]
Support UEFI booting on amd64 via loader.efi

This is largely the work from the projects/uefi branch, with some
additional refinements.  This is derived from (and replaces) the
original i386 efi implementation; i386 support will be restored later.

Specific revisions of note from projects/uefi:

r247380:

  Adjust our load device when we boot from CD under UEFI.

  The process for booting from a CD under UEFI involves adding a FAT
  filesystem containing your loader code as an El Torito boot image.
  When UEFI detects this, it provides a block IO instance that points at
  the FAT filesystem as a child of the device that represents the CD
  itself. The problem being that the CD device is flagged as a "raw
  device" while the boot image is flagged as a "logical partition". The
  existing EFI partition code only looks for logical partitions and so
  the CD filesystem was rendered invisible.

  To fix this, check the type of each block IO device. If it's found to
  be a CD, and thus an El Torito boot image, look up its parent device
  and add that instead so that the loader will then load the kernel from
  the CD filesystem.  This is done by using the handle for the boot
  filesystem as an alias.

  Something similar to this will be required for booting from other
  media as well as the loader will live in the EFI system partition, not
  on the partition containing the kernel.

r246231:

  Add necessary code to hand off from loader to an amd64 kernel.

r246335:

  Grab the EFI memory map and store it as module metadata on the kernel.

  This is the same approach used to provide the BIOS SMAP to the kernel.

r246336:

  Pass the ACPI table metadata via hints so the kernel ACPI code can
  find them.

r246608:

  Rework copy routines to ensure we always use memory allocated via EFI.

  The previous code assumed it could copy wherever it liked. This is not
  the case. The approach taken by this code is pretty ham-fisted in that
  it simply allocates a large (32MB) buffer area and stages into that,
  then copies the whole area into place when it's time to execute. A more
  elegant solution could be used but this works for now.

r247214:

  Fix a number of problems preventing proper handover to the kernel.

  There were two issues at play here. Firstly, there was nothing
  preventing UEFI from placing the loader code above 1GB in RAM. This
  meant that when we switched in the page tables the kernel expects to
  be running on, we are suddenly unmapped and things no longer work. We
  solve this by making our trampoline code not dependent on being at any
  given position and simply copying it to a "safe" location before
  calling it.

  Secondly, UEFI could allocate our stack wherever it wants. As it
  happened on my PC, that was right where I was copying the kernel to.
  This did not cause happiness. The solution to this was to also switch
  to a temporary stack in a safe location before performing the final
  copy of the loaded kernel.

r246231:

  Add necessary code to hand off from loader to an amd64 kernel.

r246335:

  Grab the EFI memory map and store it as module metadata on the kernel.

  This is the same approach used to provide the BIOS SMAP to the kernel.

r246336:

  Pass the ACPI table metadata via hints so the kernel ACPI code can
  find them.

r246608:

  Rework copy routines to ensure we always use memory allocated via EFI.

  The previous code assumed it could copy wherever it liked. This is not
  the case. The approach taken by this code is pretty ham-fisted in that
  it simply allocates a large (32MB) buffer area and stages into that,
  then copies the whole area into place when it's time to execute. A more
  elegant solution could be used but this works for now.

r247214:

  Fix a number of problems preventing proper handover to the kernel.

  There were two issues at play here. Firstly, there was nothing
  preventing UEFI from placing the loader code above 1GB in RAM. This
  meant that when we switched in the page tables the kernel expects to
  be running on, we are suddenly unmapped and things no longer work. We
  solve this by making our trampoline code not dependent on being at any
  given position and simply copying it to a "safe" location before
  calling it.

  Secondly, UEFI could allocate our stack wherever it wants. As it
  happened on my PC, that was right where I was copying the kernel to.
  This did not cause happiness. The solution to this was to also switch
  to a temporary stack in a safe location before performing the final
  copy of the loaded kernel.

r247216:

  Use the UEFI Graphics Output Protocol to get the parameters of the
  framebuffer.

Sponsored by: The FreeBSD Foundation

10 years agoActually save the clock frequency retrieved from fdt data. I fumbled
Ian Lepore [Fri, 4 Apr 2014 00:00:05 +0000 (00:00 +0000)]
Actually save the clock frequency retrieved from fdt data.  I fumbled
this when I converted getprop to getencprop.

Submitted by: Thomas Skibo
Pointy hat to: ian

10 years agoTypo.
Greg Lehey [Thu, 3 Apr 2014 23:22:04 +0000 (23:22 +0000)]
Typo.

Reported by: Igor Sobrado.

10 years agoAdd -fPIC for amd64
Ed Maste [Thu, 3 Apr 2014 23:10:23 +0000 (23:10 +0000)]
Add -fPIC for amd64

Sponsored by: The FreeBSD Foundation

10 years agoCorrect a PCI enumeration bug introduced in r264011
Ryan Stone [Thu, 3 Apr 2014 22:32:12 +0000 (22:32 +0000)]
Correct a PCI enumeration bug introduced in r264011

Ensure that first_func is set to 0 on every iteration of the PCI slot
enumeration loop after the first.  There is a continue statement that would
cause first_func to stay at 1 any PCI device where slot 0 has no functions
until we find a slot that does have a function.  This would cause us to
not enumerate the first PCI function on the device.

Credit to markj@ for spotting the bug.

X-MFC-With: r264011

10 years agoXDDESTDIR should not be set by the user, instead the user might want to tweak
Baptiste Daroussin [Thu, 3 Apr 2014 22:22:10 +0000 (22:22 +0000)]
XDDESTDIR should not be set by the user, instead the user might want to tweak
XDTP and let the standard DESTDIR decide where to install.

Discussed with: imp

10 years agoDetach from controlling session of parent. This is similar
Xin LI [Thu, 3 Apr 2014 22:14:18 +0000 (22:14 +0000)]
Detach from controlling session of parent.  This is similar
to what is done in daemon(3), which we can not use directly
in this context.

Reviewed by: pjd
MFC after: 2 weeks

10 years agoMerge efilib changes from projects/uefi
Ed Maste [Thu, 3 Apr 2014 21:39:59 +0000 (21:39 +0000)]
Merge efilib changes from projects/uefi

r247216:

  Add the ability for a device to have an "alias" handle.

r247379:

  Fix network device registration.

r247380:

  Adjust our load device when we boot from CD under UEFI.

  The process for booting from a CD under UEFI involves adding a FAT
  filesystem containing your loader code as an El Torito boot image.
  When UEFI detects this, it provides a block IO instance that points
  at the FAT filesystem as a child of the device that represents the CD
  itself. The problem being that the CD device is flagged as a "raw
  device" while the boot image is flagged as a "logical partition".
  The existing EFI partition code only looks for logical partitions and
  so the CD filesystem was rendered invisible.

  To fix this, check the type of each block IO device. If it's found to
  be a CD, and thus an El Torito boot image, look up its parent device
  and add that instead so that the loader will then load the kernel from
  the CD filesystem.  This is done by using the handle for the boot
  filesystem as an alias.

  Something similar to this will be required for booting from other media
  as well as the loader will live in the EFI system partition, not on the
  partition containing the kernel.

r247381:

  Remove a scatalogical debug printf that crept in.

10 years agoBuild boot/ficl as 64-bit library on amd64
Ed Maste [Thu, 3 Apr 2014 21:18:03 +0000 (21:18 +0000)]
Build boot/ficl as 64-bit library on amd64

The 32-bit bootloaders on amd64 now use the 32-bit version in ficl32,
as is done with libstand32.  The native 64-bit ficl will be used by the
upcoming UEFI loader.

Sponsored by: The FreeBSD Foundation

10 years agoMFV r258922:
Alexander Motin [Thu, 3 Apr 2014 20:18:55 +0000 (20:18 +0000)]
MFV r258922:
3580 Want zvols to return volblocksize when queried for physical block size

illumos/illumos-gate@a0b60564dfc644f4bfaef1ce26d343b44cf68bc5

It is irrelevant for FreeBSD, just reducing diff.

10 years agoAdd support for the Dlink DIR-825C1 74k MIPS router based on Atheros
Sean Bruno [Thu, 3 Apr 2014 20:12:39 +0000 (20:12 +0000)]
Add support for the Dlink DIR-825C1 74k MIPS router based on Atheros
wireless, bridge and CPU.

10 years agoAdd the Dresden Elektronik "USB Levelshifter Stick Low Cost" to the
Joerg Wunsch [Thu, 3 Apr 2014 20:00:02 +0000 (20:00 +0000)]
Add the Dresden Elektronik "USB Levelshifter Stick Low Cost" to the
list of known FTDI devices.

https://shop.dresden-elektronik.de/accessories/levelshifter/usb-pegelwandler-stick-basic.html

MFC after: 1 week

10 years agoMove the GPIO bank initialization to a new function to make easier to detect
Luiz Otavio O Souza [Thu, 3 Apr 2014 17:55:08 +0000 (17:55 +0000)]
Move the GPIO bank initialization to a new function to make easier to detect
errors.

Reset the GPIO module during the initialization.  This is guaranteed to be
the same as a hardware reset.  Tested on AM335x (BBB) and checked against
the omap3 and omap4 TRM.

Do a better job freeing resources when there are errors and on
ti_gpio_detach().

10 years agoFix the inheritance of the FBSDprivate_1.0 namespace.
David Chisnall [Thu, 3 Apr 2014 17:31:38 +0000 (17:31 +0000)]
Fix the inheritance of the FBSDprivate_1.0 namespace.

10 years agoPut each source file on a separate line
Ed Maste [Thu, 3 Apr 2014 16:21:37 +0000 (16:21 +0000)]
Put each source file on a separate line

This will simplify rebasing the amd64 UEFI patch set.

Sponsored by: The FreeBSD Foundation

10 years agoAdd BIO_DELETE support to ZVOL.
Alexander Motin [Thu, 3 Apr 2014 15:04:32 +0000 (15:04 +0000)]
Add BIO_DELETE support to ZVOL.

It is an adapted merge from the vendor branch of:
    701 UNMAP support for COMSTAR  (in part related to ZFS)
    2130 zvol DKIOCFREE uses nested DMU transactions

10 years agoAllow overriding xz(1) path.
Glen Barber [Thu, 3 Apr 2014 12:04:05 +0000 (12:04 +0000)]
Allow overriding xz(1) path.

Requested by: marck
MFC After: 5 days
X-MFC-With: r264027,r264028,r264029,r264030,r264046
Sponsored by: The FreeBSD Foundation

10 years agoMove _b functions into the 11.x symbol version namespace.
David Chisnall [Thu, 3 Apr 2014 08:16:45 +0000 (08:16 +0000)]
Move _b functions into the 11.x symbol version namespace.

10 years agoAdd an extra void* cast to work around a bug in FreeBSD-gcc inherited
David Chisnall [Thu, 3 Apr 2014 08:08:36 +0000 (08:08 +0000)]
Add an extra void* cast to work around a bug in FreeBSD-gcc inherited
from Apple.

10 years agoSome xdev fixes:
Baptiste Daroussin [Thu, 3 Apr 2014 07:28:36 +0000 (07:28 +0000)]
Some xdev fixes:

- if TARGET_ARCH is not defined and XDEV_ARCH is defined then early define
  TARGET_ARCH to the valud of XDEV_ARCH: This allow the xdev-build target
  to be able to correctly chose the compiler it needs to build
- Allow overwriting XDTP to allow a user to not chose where the xdev env will
  live in
- Fix build for gcc only xdev (like ia64) by providing the proper -B to the
  toolchain and not relying on gcc being installed already in base
- Fix TOOLS_PREFIX so the generated toolchain has the right default sysroot when
  installed intead of getting the DESTDIR one
- Fix supporting DESTDIR
- Also overwrite CXX (needed for cross building c++ libraries with clang) and
  CPP (needed to cross build some libraries when gcc is the target default
  compiler but gcc is not installed on the building host)

Discussed with: imp

10 years agoMake C_* contants fit in 32 bits again by using 4 unused bits.
Xin LI [Thu, 3 Apr 2014 06:32:02 +0000 (06:32 +0000)]
Make C_* contants fit in 32 bits again by using 4 unused bits.

Noticed by: bde

10 years agoAdd information on standards compliance of many options.
Greg Lehey [Thu, 3 Apr 2014 05:49:28 +0000 (05:49 +0000)]
Add information on standards compliance of many options.

MFC after: 2 weeks

10 years ago- Setup both secure and non-secure timer IRQs.
Ruslan Bukin [Thu, 3 Apr 2014 05:48:56 +0000 (05:48 +0000)]
- Setup both secure and non-secure timer IRQs.
  We don't know our ARM security state, so one of them will operate.
- Don't set frequency, since it's unpossible in non-secure state.
  Only rely on DTS clock-frequency value or get clock from timer.

Discussed with: ian, cognet

10 years agoMake -f set -a, as required by the standard.
Greg Lehey [Thu, 3 Apr 2014 05:48:28 +0000 (05:48 +0000)]
Make -f set -a, as required by the standard.

From the original OpenBSD commit message:

  restore the traditional behavior of -f implying -a; apparently Keith
  Bostic forgot to restore it when the -f flag was put back on 2nd of
  September 1989, after being removed on 16th of August as a
  consequence of issues getting it working over NFS, so deviation from
  traditional UNIX behavior in all BSDs looks like an historical
  accident; as a side effect, this change accommodates behavior of
  this option to IEEE Std 1003.1-2008 (``POSIX.1'').

  joint work with jmc@ (who found the inaccuracy in our
  implementation), schwarze@ (who provided a detailed tracking of
  historical facts) and millert@

Submitted by: Igor Sobrado
Discussed with:  mckusick
Obtained from: OpenBSD project
MFC after:  2 weeks

10 years agoImprove readability of comments for DELAY_ACK() macro.
Hiren Panchasara [Thu, 3 Apr 2014 01:46:03 +0000 (01:46 +0000)]
Improve readability of comments for DELAY_ACK() macro.

10 years agoCorrect endianness handling in getting station address from EEPROM.
Pyun YongHyeon [Thu, 3 Apr 2014 01:32:43 +0000 (01:32 +0000)]
Correct endianness handling in getting station address from EEPROM.
While I'm here, remove aue_eeprom_getword() as its only usage is to
read station address and make it more readable.  This change is
inspired by NetBSD.
With this change, aue(4) should work on big endian architectures.

PR: 188177

10 years agoImplement GNU's extension of 'status' operand. The GNU syntax is
Xin LI [Thu, 3 Apr 2014 00:55:16 +0000 (00:55 +0000)]
Implement GNU's extension of 'status' operand.  The GNU syntax is
borrowed where syntax status=noxfer means no transfer statistics
and status=none means no status information at all.

This feature is useful because the statistics information can
sometimes be annoying, and redirecting stderr to /dev/null would
mean error messages also gets silenced.

Obtained from: OpenBSD
MFC after: 2 weeks

10 years agoFix build, broken by r264025.
Edward Tomasz Napierala [Wed, 2 Apr 2014 23:07:15 +0000 (23:07 +0000)]
Fix build, broken by r264025.

Sponsored by: The FreeBSD Foundation

10 years agoRework the cpu frequency management code for imx6.
Ian Lepore [Wed, 2 Apr 2014 21:34:48 +0000 (21:34 +0000)]
Rework the cpu frequency management code for imx6.

This adds the concept of "operating points," combinations of frequency
and voltage at which the cpu is known to work correctly.  Some day these
should come from FDT data, but for now the table is hard-coded.

This also allows tuning the min and max operating frequencies.  The min
frequency is what the thermal management code will slow down to if the
core temperature gets too high.  The max frequency is what gets used if
the temperature is okay.

Normally the max cannot be set higher than the value burned into the
ocotp fuses as the chip's rated max, but there is now a new sysctl+tunable
cpu_overclock_enable; when set to non-zero it allows raising the frequency
above the ocotp value: USE WITH CARE!  (At least one of my imx6 boards
has a cpu whose ocotp values never got set correctly; they claim a max
of 792mhz, but the physical markings on the chip say it's good to 1ghz.)

Because all these values affect the entire SoC, there is a new sysctl
node, hw.imx6, where all these values live.  The values that are currently
under dev.imx6_anatop.0 should probably move to hw.imx6 too, because
"anatop" doesn't even mean anything to me, let alone to an end user.

10 years agoSwitch imx6 to using the mpcore per-cpu event timers, but continue to use
Ian Lepore [Wed, 2 Apr 2014 21:06:43 +0000 (21:06 +0000)]
Switch imx6 to using the mpcore per-cpu event timers, but continue to use
the GPT timer, which is fixed-frequency, as a timecounter.

10 years agoAdd support for the virtio RNG entropy-source device.
Peter Grehan [Wed, 2 Apr 2014 20:18:17 +0000 (20:18 +0000)]
Add support for the virtio RNG entropy-source device.
Call through to /dev/random synchronously to fill
virtio buffers with RNG data.

Tested with FreeBSD-CURRENT and Ubuntu guests.

Submitted by: Leon Dang
Discussed with: markm
MFC after: 3 weeks
Sponsored by: Nahanni Systems

10 years agoChange NO_EVENTTIMERS from an arm-specific to an MI option, so that it can
Ian Lepore [Wed, 2 Apr 2014 19:51:29 +0000 (19:51 +0000)]
Change NO_EVENTTIMERS from an arm-specific to an MI option, so that it can
be used in MI code.

This is intended as a temporary measure to unbreak the build.  The real fix
is to write event timer drivers for legacy arm hardware, then get rid of
this option completely.  That's going to take a few days.

10 years agoDon't call sdhci_init_slot() until after handling the FDT properties
Ian Lepore [Wed, 2 Apr 2014 19:06:53 +0000 (19:06 +0000)]
Don't call sdhci_init_slot() until after handling the FDT properties
related to detecting card presence.  This actually makes no difference
now, but will when we get support for gpio-based card detection.

10 years agoTrivial changes/forced-commit to document previous change r264050 whose
Ian Lepore [Wed, 2 Apr 2014 18:49:50 +0000 (18:49 +0000)]
Trivial changes/forced-commit to document previous change r264050 whose
description was eaten by the dog (or an editor crash or something).

Add variable-frequency support to the arm mpcore eventtimer driver.

This allows a platform's early init code to tell the mpcore driver that the
clock frequency can vary.  That causes the mpcore driver to register an
eventtimer, but not a timecounter.  The platform has to provide a time
counter using some other fixed-frequency clock, but can still use the
per-cpu goodness of the mpcore hardware for event timers.

When the platform support code does something to change the frequency of
the CPU clocks (power saving, thermal management) it must tell the mpcore
driver code about it using arm_tmr_change_frequency().

10 years ago(no commit message)
Ian Lepore [Wed, 2 Apr 2014 18:43:56 +0000 (18:43 +0000)]

10 years agoDisable the timer and clear any pending bit, then setup the new counter
Ian Lepore [Wed, 2 Apr 2014 18:32:27 +0000 (18:32 +0000)]
Disable the timer and clear any pending bit, then setup the new counter
register values, then restart the timer.  This prevents a situation where
an old event fires just as we're about to load a new value into the timer,
when the start routine is called to change the time of the current event.

Also re-nest the parens properly for casting the result of converting
time and frequency to a count.  This doesn't actually change the result of
the calcs, but will some day prevent a loss-of-precision warning on the
assignment, if that warning gets enabled.

10 years agoFix build breakage. Apparently all ARM configs build kern_et.c, but only a
Ian Lepore [Wed, 2 Apr 2014 17:34:17 +0000 (17:34 +0000)]
Fix build breakage.  Apparently all ARM configs build kern_et.c, but only a
few of them also build kern_clocksource.c.  That strikes me as insane, but
maybe there's a good reason for it.  Until I figure that out, un-break
the build by not referencing functions in kern_clocksource if NO_EVENTTIMERS
is defined.

10 years agoUse xz(1) instead of gzip(1) to compress release images
Glen Barber [Wed, 2 Apr 2014 16:53:07 +0000 (16:53 +0000)]
Use xz(1) instead of gzip(1) to compress release images
when WITH_COMPRESSED_IMAGES is used.

Requested by: delphij, brooks, Nikolai Lifanov
MFC After: 1 week
X-MFC-With: r264027,r264028,r264029,r264030
Sponsored by: The FreeBSD Foundation

10 years agoMove setting of the MK_xxx variables based on NO_xxx to avoid
Warner Losh [Wed, 2 Apr 2014 16:33:10 +0000 (16:33 +0000)]
Move setting of the MK_xxx variables based on NO_xxx to avoid
triggering the "you aren't allowed to set this" warning when building
stand alone in directories whose Makefile sets NO_MAN, for example.

10 years agoFreeBSD make (aka fmake) doesn't grok .MAKE.LEVEL. Failsafe and assume
Warner Losh [Wed, 2 Apr 2014 16:33:02 +0000 (16:33 +0000)]
FreeBSD make (aka fmake) doesn't grok .MAKE.LEVEL. Failsafe and assume
that it is OK to set MK_xxx flags.

10 years agoMove scandir_b to a later symbol version.
David Chisnall [Wed, 2 Apr 2014 16:29:29 +0000 (16:29 +0000)]
Move scandir_b to a later symbol version.

10 years agoAdd support for some block functions that come from OS X. These are
David Chisnall [Wed, 2 Apr 2014 16:07:48 +0000 (16:07 +0000)]
Add support for some block functions that come from OS X.  These are
intended to build with any C compiler.

Reviewed by: pfg
MFC after: 3 weeks

10 years agoAdd support for event timers whose clock frequency can change while running.
Ian Lepore [Wed, 2 Apr 2014 15:56:11 +0000 (15:56 +0000)]
Add support for event timers whose clock frequency can change while running.

10 years agoMFV r258379;
Pedro F. Giffuni [Wed, 2 Apr 2014 15:32:44 +0000 (15:32 +0000)]
MFV r258379;

4248 dtrace(1M) should never create DOF with empty probes section
4249 Only probes from the first DTrace object file will be included

Illumos Revision: 4a20ab41aadcb81c53e72fc65886e964e9add59

Reference:
https://www.illumos.org/issues/4248
https://www.illumos.org/issues/4249

Obtained from: Illumos
MFC after: 1 month

10 years agoDocument more parition types.
Andrey V. Elsukov [Wed, 2 Apr 2014 11:12:48 +0000 (11:12 +0000)]
Document more parition types.

Requested by: glebius
MFC after: 1 week

10 years agoFix an issue where the locale and rune locale could become out of sync,
David Chisnall [Wed, 2 Apr 2014 11:10:46 +0000 (11:10 +0000)]
Fix an issue where the locale and rune locale could become out of sync,
causing mb* functions (and similar) to be called with the wrong data
(possibly a null pointer, causing a crash).

PR: standards/188036
MFC after: 1 week

10 years agoUse 2K buffers for IO to help achieve full device speed, rather than the
Ian Lepore [Wed, 2 Apr 2014 01:58:54 +0000 (01:58 +0000)]
Use 2K buffers for IO to help achieve full device speed, rather than the
default wMaxPacketSize (64 or 512 bytes).  This actually helps older FTDI
devices (which were USB 1/full speed) more than the new H-series high
speed, but even for the new chips it helps cut the number of interrupts
when doing very high speed (3-12mbaud).

10 years agoIf WITH_COMPRESSED_IMAGES is set, add the compressed images to
Glen Barber [Tue, 1 Apr 2014 22:54:54 +0000 (22:54 +0000)]
If WITH_COMPRESSED_IMAGES is set, add the compressed images to
the CLEANFILES list.

MFC after: 1 week
X-MFC-With: r264027,r264028,r264029
Sponsored by: The FreeBSD Foundation

10 years agoFix logic error: s/||/&&/
Glen Barber [Tue, 1 Apr 2014 22:52:27 +0000 (22:52 +0000)]
Fix logic error: s/||/&&/

Pointyhat: gjb
MFC after: 1 week
X-MFC-With: r264027,r264028
Sponsored by: The FreeBSD Foundation

10 years agoClean up trailing whitespace in release/Makefile.
Glen Barber [Tue, 1 Apr 2014 22:46:46 +0000 (22:46 +0000)]
Clean up trailing whitespace in release/Makefile.

MFC after: 1 week
X-MFC-With: r264027
Sponsored by: The FreeBSD Foundation

10 years agoAdd a new release build variable, WITH_COMPRESSED_IMAGES.
Glen Barber [Tue, 1 Apr 2014 22:41:26 +0000 (22:41 +0000)]
Add a new release build variable, WITH_COMPRESSED_IMAGES.

When set to a non-empty value, the installation medium is
compressed with gzip(1) as part of the 'install' target in
the release/ directory.

With gzip(1) compression, downloadable image are reduced in
size quite significantly.  Build test against head@263927
shows the following:

 bootonly.iso: 64% smaller
 disc1.iso: 44% smaller
 memstick.img: 47% smaller
 mini-memstick.img: 65% smaller
 dvd1.iso: untested

This option is off by default, I would eventually like to
turn it on by default, and remove the '-k' flag to gzip(1)
so only compressed images are published on FTP.

Requested by: wkoszek
MFC After: 1 week
Sponsored by: The FreeBSD Foundation

10 years agoEnable a KASSERT.
Edward Tomasz Napierala [Tue, 1 Apr 2014 22:21:56 +0000 (22:21 +0000)]
Enable a KASSERT.

Sponsored by: The FreeBSD Foundation

10 years agoGet rid of the "autoscaling", instead just set socket buffer sizes
Edward Tomasz Napierala [Tue, 1 Apr 2014 22:03:03 +0000 (22:03 +0000)]
Get rid of the "autoscaling", instead just set socket buffer sizes
in the usual way.  The only thing the old code did was making things
less predictable.

Sponsored by: The FreeBSD Foundation

10 years agoUse atomic ops instead of mutexes where appropriate.
Edward Tomasz Napierala [Tue, 1 Apr 2014 21:54:20 +0000 (21:54 +0000)]
Use atomic ops instead of mutexes where appropriate.

Submitted by: mav@
Sponsored by: The FreeBSD Foundation

10 years agoInstead of "icltx" and "iclrx", use thread names with prefix from upper
Edward Tomasz Napierala [Tue, 1 Apr 2014 21:47:22 +0000 (21:47 +0000)]
Instead of "icltx" and "iclrx", use thread names with prefix from upper
layer, so that one can see which side of the stack the threads are for.

Sponsored by: The FreeBSD Foundation

10 years agoGet rid of ICL lock; use upper-layer (initiator or target) lock instead.
Edward Tomasz Napierala [Tue, 1 Apr 2014 21:40:46 +0000 (21:40 +0000)]
Get rid of ICL lock; use upper-layer (initiator or target) lock instead.
This avoids extra locking in icl_pdu_queue(); the upper layer needs to call
it while holding its own lock anyway, to avoid sending PDUs out of order.

Sponsored by: The FreeBSD Foundation

10 years agolibnv: Don't lose big-endian flag when receiving a message.
Jilles Tjoelker [Tue, 1 Apr 2014 21:30:54 +0000 (21:30 +0000)]
libnv: Don't lose big-endian flag when receiving a message.

A bug caused the "big endian" flag to be lost when receiving a message. As a
result, the bits are interpreted as little endian and an extremely large
allocation is attempted.

This change fixes ping(8)'s communication to casperd(8) on big-endian
architectures.

Reported by: Anton Shterenlikht
Tested by: danfe

10 years agoRemove the homegrown ctl_be_block_io allocator, replacing it with UMA.
Edward Tomasz Napierala [Tue, 1 Apr 2014 21:13:05 +0000 (21:13 +0000)]
Remove the homegrown ctl_be_block_io allocator, replacing it with UMA.
There is no performance difference.

Reviewed by: mav@
Sponsored by: The FreeBSD Foundation

10 years agoFix some of the style(9) problems on ti_gpio. Note that this commit does
Luiz Otavio O Souza [Tue, 1 Apr 2014 18:46:56 +0000 (18:46 +0000)]
Fix some of the style(9) problems on ti_gpio.  Note that this commit does
not fix all the style(9) problems, but will open room for the next commits.

Remove redundant code and declarations.

No functional changes.

10 years agoUpdate the list of FTDI chips supported by uftdi(4).
Ian Lepore [Tue, 1 Apr 2014 18:41:54 +0000 (18:41 +0000)]
Update the list of FTDI chips supported by uftdi(4).

10 years agoIncrement the SSN only after processing the last fragment of an
Michael Tuexen [Tue, 1 Apr 2014 18:38:04 +0000 (18:38 +0000)]
Increment the SSN only after processing the last fragment of an
ordered user message.

MFC after: 3 days

10 years agoSilence an unnecessary warning.
George V. Neville-Neil [Tue, 1 Apr 2014 18:37:00 +0000 (18:37 +0000)]
Silence an unnecessary warning.

MFC after: 2 weeks

10 years agoAdd missing copyright date.
Ryan Stone [Tue, 1 Apr 2014 17:35:31 +0000 (17:35 +0000)]
Add missing copyright date.

MFC after: 2 months