]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoThe conversion tools have been further improved and some erroneous
Stefan Eßer [Wed, 20 Aug 2014 17:07:41 +0000 (17:07 +0000)]
The conversion tools have been further improved and some erroneous
conversions have been detected and fixed.

It is now possible to add options after the encoding in the parameter
list for convert-keymap.pl. This is currently used to selectively
enable interpretation of the ISO8859-1 currency symbol as the Euro
sign found in ISO5589-15, or to add a Yen symbol in place of '\' for
specific Japanese keyboards. The option are appended to the parameter
list, as in e.g. "convert-keymap.pl german.iso.kbd ISO5589-1 EURO".

The options are appended to the encoding in the form "+EURO" or "+YEN"
in KBDFILES.map, to keep the meaning of the columns intact.

MFC after: 3 days

10 years agoMisc fixes suggested by Coverity.
Alan Somers [Wed, 20 Aug 2014 17:04:49 +0000 (17:04 +0000)]
Misc fixes suggested by Coverity.

sbin/devd/tests/client_test.c
* In the event that popen fails, don't dereference its return value.
* Fix array overwrite in the stream and seqpacket tests.
* Close sockets at the end of successful ATF tests.

Reported by: Coverity scan
CID: 1232019123202012320291232030
MFC after: 1 week
Sponsored by: Spectra Logic

10 years agoRewrite of ti_i2c based on gonzo's patch, fix the following bugs/problems:
Luiz Otavio O Souza [Wed, 20 Aug 2014 17:02:37 +0000 (17:02 +0000)]
Rewrite of ti_i2c based on gonzo's patch, fix the following bugs/problems:

  . interrupt storm detected on "intr70:"; throttling interrupt source;

  . Added access serialization on iicbus_transfer(), previously there was
    no such protection and a new transfer could easily confuse the
    controller;

  . Add error checkings (i.e. stop the transfer when a error is detected
    and do _not_ overwrite the previous error);

  . On command done interrupt do not assume that the transfer was finished
    sucessfully as we will receive the command done interrupt even after
    errors;

  . Simplify the FIFO handling;

  . Reset the FIFO between the transfers as the FIFO may contain data from
    the last (failed) transfer;

  . Fix the iicbus speed for AM335x, which in turn will make better use of
    the I2C noise filter (set to one internal clock cycle);

  . Move the read and write handler to ithread instead of notifying the
    requesting thread with wakeup(9);

  . Fix the comments based on OMAP4 TRM.

The above changes allows me to read the EDID from my HDMI monitor on BBB
with gonzo's patches to support TDA19988 (which does 128 bytes reads) and
repeatedly scan the iicbus (with a modified i2c(8)) without lock up the bus.

Phabric: D465

10 years agoAnother rpund of fixes, after checking keymaps for plausibility and with
Stefan Eßer [Wed, 20 Aug 2014 17:00:47 +0000 (17:00 +0000)]
Another rpund of fixes, after checking keymaps for plausibility and with
several updates to the converter tools. There is now support for hybrid
source keymaps, which e.g. use ISO8859-1 (not -15) but still provide an
Euro key (on the "E" key). ISO8859-1 currency symbols on other keys are
still converted to that character, not the Euro sign. A similar hack was
applied to the Japanese keyboards to add the Yen key, that could not be
expressed in SYSCONS.

Several modifications have been applied after the conversion (removal of
unused accents tables, some reformatting, exchange of a few key symbols).

The German keymap (de.kbd) is now using deadkeys only for those keys,
that behave that way under Windows. There are now ".acc" and ".noacc"
variants, which use deadkeys vs. nodeadkeys for all accent keys.

I'm still in the process of comparing keymaps that existed in different
encodings in SYSCONS. These are generally translated slightly differently,
either because of mistakes, or because of different preferences, or due
to limitations of the respective encoding.

MFC after: 3 days

10 years agoNumerous small fixes, mostly suggested by Coverity.
Alan Somers [Wed, 20 Aug 2014 16:59:33 +0000 (16:59 +0000)]
Numerous small fixes, mostly suggested by Coverity.

tests/sys/kern/unix_seqpacket_test.c
* Remove a duplicate error check in mk_pair_of_sockets
* Always close sockets in the success path of ATF test cases.  Don't
  bother with the error paths, because those are mostly assertions
  anyway.  Most of these socket leaks were reported by Coverity.
  All of them are harmless, because each ATF test case runs in its
  own process.
* Fix the len argument to send in shutdown_send and
  shutdown_send_sigpipe.  The old version was using sizeof a pointer
  instead of sizeof the char array.  Reported by Coverity.
* Change a few ATF_CHECK to ATF_REQUIRE if the test can't reasonably
  continue past a failure.

Reported by: Coverity Scan
CID: 122999512299911229988122999412299891229992
CID: 122999312299901229984122996712300051229977
CID: 122996612300041229976
MFC after: 1 week
Sponsored by: Spectra Logic

10 years agoMake Bruce happy removing the "LL abomination" from time.h
Davide Italiano [Wed, 20 Aug 2014 16:32:02 +0000 (16:32 +0000)]
Make Bruce happy removing the "LL abomination" from time.h
It's not necessary in all the three instances because
they already have the correct type on all the supported
arches.

Requested by: bde

10 years agoAdd kernel modules for si(4), wds(4), and wl(4).
John Baldwin [Wed, 20 Aug 2014 16:09:05 +0000 (16:09 +0000)]
Add kernel modules for si(4), wds(4), and wl(4).

10 years agoUnexpand TAILQ_FOREACH().
John Baldwin [Wed, 20 Aug 2014 16:07:56 +0000 (16:07 +0000)]
Unexpand TAILQ_FOREACH().

10 years agoFix build of si(4) and enable it in LINT on amd64 and i386.
John Baldwin [Wed, 20 Aug 2014 16:07:17 +0000 (16:07 +0000)]
Fix build of si(4) and enable it in LINT on amd64 and i386.

10 years agoBump MAXCPU on amd64 from 64 to 256. In practice APIC only permits 255
John Baldwin [Wed, 20 Aug 2014 16:06:24 +0000 (16:06 +0000)]
Bump MAXCPU on amd64 from 64 to 256.  In practice APIC only permits 255
CPUs (IDs 0 through 254).  Getting above that limit requires x2APIC.

MFC after: 1 month

10 years agoBump the default size of cpuset_t masks in userland from 128 bits to 256.
John Baldwin [Wed, 20 Aug 2014 16:05:15 +0000 (16:05 +0000)]
Bump the default size of cpuset_t masks in userland from 128 bits to 256.

This should not be an ABI change since the various public APIs that use
cpusets all include an explicit size parameter in addition to the cpuset
parameter.

MFC after: 1 week

10 years agoReplace dev_clone with cdevpriv(9) KPI in audit_pipe code.
Davide Italiano [Wed, 20 Aug 2014 16:04:30 +0000 (16:04 +0000)]
Replace dev_clone with cdevpriv(9) KPI in audit_pipe code.
This is (yet another) step towards the removal of device
cloning from our kernel.

CR: https://reviews.freebsd.org/D441
Reviewed by: kib, rwatson
Tested by: pho

10 years agoAdd ${LIBC} to DPADD to fix "make checkdpadd"
Enji Cooper [Wed, 20 Aug 2014 15:43:26 +0000 (15:43 +0000)]
Add ${LIBC} to DPADD to fix "make checkdpadd"

Phabric: D632
Approved by: jmmv (mentor)
MFC after: 2 weeks

10 years agoAdd missing break.
Pedro F. Giffuni [Wed, 20 Aug 2014 14:58:25 +0000 (14:58 +0000)]
Add missing break.

CID: 603368

10 years agopci: make MSI(-X) enable and disable methods of the PCI bus
Roger Pau Monné [Wed, 20 Aug 2014 14:57:20 +0000 (14:57 +0000)]
pci: make MSI(-X) enable and disable methods of the PCI bus

Make the functions pci_disable_msi, pci_enable_msi and pci_enable_msix
methods of the newbus PCI bus. This code should not include any
functional change.

Sponsored by: Citrix Systems R&D
Reviewed by: imp, jhb
Differential Revision: https://reviews.freebsd.org/D354

dev/pci/pci.c:
 - Convert the mentioned functions to newbus methods.
 - Fix the callers of the converted functions.

sys/dev/pci/pci_private.h:
dev/pci/pci_if.m:
 - Declare the new methods.

dev/pci/pcivar.h:
 - Add helpers to call the newbus methods.

ofed/include/linux/pci.h:
 - Add define to prevent the ofed version of pci_enable_msix from
   clashing with the FreeBSD native version.

10 years agoRemove useless - and buggy, it resulted in spurious warnings in logs - code.
Edward Tomasz Napierala [Wed, 20 Aug 2014 13:54:27 +0000 (13:54 +0000)]
Remove useless - and buggy, it resulted in spurious warnings in logs - code.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

10 years agoAdd description for the "automounted" mount flag.
Edward Tomasz Napierala [Wed, 20 Aug 2014 13:52:47 +0000 (13:52 +0000)]
Add description for the "automounted" mount flag.

Reviewed by: emaste@
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

10 years agoRework ".." lookup; previous one failed to properly busy the mountpoint.
Edward Tomasz Napierala [Wed, 20 Aug 2014 13:46:51 +0000 (13:46 +0000)]
Rework ".." lookup; previous one failed to properly busy the mountpoint.

Reviewed by: kib@
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

10 years agoAfter much toying around with this AMRR initial rate stuff,
Adrian Chadd [Wed, 20 Aug 2014 09:10:03 +0000 (09:10 +0000)]
After much toying around with this AMRR initial rate stuff,
I've decided that for 11n rates it's best to start (very) low and work
our way up.

So, from now on, the initial rate for AMRR 11n is MCS4.
It doesn't try MCS12 or MCS20 - at low signal strengths those don't
work very well at all.

AMRR will step the rate control up over time if things work out better.

Tested:

* Intel 5100
* Intel 5300 (using local diffs to test out 3x3 stream support)

10 years agoDo not busy the UFS mount point inside VOP_RENAME(). The
Konstantin Belousov [Wed, 20 Aug 2014 08:15:23 +0000 (08:15 +0000)]
Do not busy the UFS mount point inside VOP_RENAME().  The
kern_renameat() already starts write on the mp, which prevents
parallel unmount from proceed.  Busying mp after vn_start_write()
deadlocks the unmount.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoCorrect the test for condition to suspend UFS filesystem during
Konstantin Belousov [Wed, 20 Aug 2014 08:13:03 +0000 (08:13 +0000)]
Correct the test for condition to suspend UFS filesystem during
unmount.  There is no need to suspend read-only filesystem, while we
need suspension on modificable mount point.

Reported by: rwatson
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoIncrease max number of physical segments on amd64 to 63.
Konstantin Belousov [Wed, 20 Aug 2014 08:07:08 +0000 (08:07 +0000)]
Increase max number of physical segments on amd64 to 63.

Eventually, the vmd_segs of the struct vm_domain should become bitset
instead of long, to allow arbitrary compile-time selected maximum.

Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoAdd arch-specific macro SFBUF_PHYS_DMAP(), which should translate the
Konstantin Belousov [Wed, 20 Aug 2014 08:02:38 +0000 (08:02 +0000)]
Add arch-specific macro SFBUF_PHYS_DMAP(), which should translate the
physical address of the page to direct map address, in case
SFBUF_OPTIONAL_DIRECT_MAP returns true.  The case of PowerPC AIM
64bit, where the page physical address is identical to the direct map
address, is accidental.

Reviewed by: alc
Sponsored by: The FreeBSD Foundation

10 years agoFix conversion errors leading to malformed keymap files.
Stefan Eßer [Wed, 20 Aug 2014 07:48:09 +0000 (07:48 +0000)]
Fix conversion errors leading to malformed keymap files.

MFC after: 3 days

10 years agoFix further conversion errors found while testing the converted keymaps.
Stefan Eßer [Wed, 20 Aug 2014 07:46:28 +0000 (07:46 +0000)]
Fix further conversion errors found while testing the converted keymaps.

MFC after: 3 days

10 years agoIf eapol packets are sent at the lowest rate, key negotiation will
Kevin Lo [Wed, 20 Aug 2014 01:32:04 +0000 (01:32 +0000)]
If eapol packets are sent at the lowest rate, key negotiation will
become more reliable.

Submitted by: Akinori Furukoshi <moonlightakkiy at yahoo dot ca>

10 years agoAdd the D-Link DWA-125 rev D1.
Kevin Lo [Wed, 20 Aug 2014 01:26:27 +0000 (01:26 +0000)]
Add the D-Link DWA-125 rev D1.

Tested by myself.

10 years agoDon't stop other legs of a parallel build due to a failure in make_check.
Ian Lepore [Wed, 20 Aug 2014 00:33:37 +0000 (00:33 +0000)]
Don't stop other legs of a parallel build due to a failure in make_check.
The whole point is to see if there's any failure, which is handled by
building a newer version of make.

10 years agoAdd zdb into rescue environment.
Xin LI [Wed, 20 Aug 2014 00:14:41 +0000 (00:14 +0000)]
Add zdb into rescue environment.

On amd64, this would increase the binary size by 1.1MiB and
make it possible to examine zpool status offline, useful for
recovery and diagnostic purposes.

Submitted by: sef
Obtained from: FreeNAS
MFC after: 2 weeks

10 years agoAvoid showing stale errors when nmount(2) fails.
Bryan Drewery [Tue, 19 Aug 2014 21:04:31 +0000 (21:04 +0000)]
Avoid showing stale errors when nmount(2) fails.

Sometimes nmount(2) will fail without setting errmsg. The previous (ignored)
error would then be shown as the reason for the failed call if the next
nmount(2) also fails without [ENOENT,ENOTSUP].

An example is when there is a tmpfs mounted with -o size. vfs_filteropt() adds
'size' as an error in errmsg due to 'size' not being in tmpfs_updateopts. Then
tmpfs_mount returns [ENOTSUP] from nmount(2), which is then ignored. The next
call may race with an unmount causing an invalid [EINVAL] that then does log an
error, with the tmpfs errmsg.

The race itself is a separate issue to fix as it is expected to have an
[ENOENT] returned instead.

In this example the mount being shown is actually nullfs, not tmpfs that the
error is from.

  mountd[740]: can't delete exports for /poudriere/data/.m/exp-head-commit-test-devel/04/.npkg: Invalid argument mount option <size> is unknown

It should only show:

  mountd[740]: can't delete exports for /poudriere/data/.m/exp-head-commit-test-devel/04/.npkg: Invalid argument

MFC after: 2 weeks

10 years agoAdd recent DragonFly releases.
Bryan Drewery [Tue, 19 Aug 2014 20:35:09 +0000 (20:35 +0000)]
Add recent DragonFly releases.

Submitted by: Zach Crownover <zachary.crownover@gmail.com>
MFC after: 1 week

10 years agoAdd LIBMD and LIBUTIL to DPADD to fix "make checkdpadd"
Enji Cooper [Tue, 19 Aug 2014 18:47:47 +0000 (18:47 +0000)]
Add LIBMD and LIBUTIL to DPADD to fix "make checkdpadd"

Approved by: jmmv (mentor)
MFC after: 5 days
Phabric: D633
PR: 192763

10 years agoAdd missing libraries to DPADD; sort DPADD so DPADD and LDADD match up
Enji Cooper [Tue, 19 Aug 2014 18:31:20 +0000 (18:31 +0000)]
Add missing libraries to DPADD; sort DPADD so DPADD and LDADD match up

This fixes "make checkdpadd"

Approved by: jmmv (mentor)
MFC after: 2 weeks
Phabric: D630
PR: 192765

10 years agoFix typo (LIBLDNSADD -> LIBLDNS) to fix "make checkdpadd"
Enji Cooper [Tue, 19 Aug 2014 18:27:43 +0000 (18:27 +0000)]
Fix typo (LIBLDNSADD -> LIBLDNS) to fix "make checkdpadd"

X-MFC with: r269648
Phabric: D634
Approved by: jmmv (mentor)

10 years agoFix lock recursion on LUN shutdown, introduced on r269497.
Alexander Motin [Tue, 19 Aug 2014 17:04:18 +0000 (17:04 +0000)]
Fix lock recursion on LUN shutdown, introduced on r269497.

MFC after: 3 days

10 years agoBump __FreeBSD_version after r269489 so ports can use it.
Bryan Drewery [Tue, 19 Aug 2014 15:47:51 +0000 (15:47 +0000)]
Bump __FreeBSD_version after r269489 so ports can use it.

10 years agoRegen after r270171
Bryan Drewery [Tue, 19 Aug 2014 15:46:40 +0000 (15:46 +0000)]
Regen after r270171

10 years agoAdd missing WITHOUT_CUSE file.
Hans Petter Selasky [Tue, 19 Aug 2014 15:40:26 +0000 (15:40 +0000)]
Add missing WITHOUT_CUSE file.

10 years agoUse bsd.lib.mk here as all other csu Makefiles do.
Bryan Drewery [Tue, 19 Aug 2014 15:30:56 +0000 (15:30 +0000)]
Use bsd.lib.mk here as all other csu Makefiles do.

This effectively reverts r124752.

There's no reason this should be different. It resulted in needing NO_PIE in
the original opt-out NO_PIE commit as this was not using the proper framework.

Reported by: peter

10 years agoRegen after r270168
Bryan Drewery [Tue, 19 Aug 2014 15:09:24 +0000 (15:09 +0000)]
Regen after r270168

10 years agoRevert r267233 for now. PIE support needs to be reworked.
Bryan Drewery [Tue, 19 Aug 2014 15:04:32 +0000 (15:04 +0000)]
Revert r267233 for now. PIE support needs to be reworked.

1. 50+% of NO_PIE use is fixed by adding -fPIC to INTERNALLIB and other
   build-only utility libraries.
2. Another 40% is fixed by generating _pic.a variants of various libraries.
3. Some of the NO_PIE use is a bit absurd as it is disabling PIE (and ASLR)
   where it never would work anyhow, such as csu or loader. This suggests
   there may be better ways of adding support to the tree. Many of these
   cases can be fixed such that -fPIE will work but there is really no
   reason to have it in those cases.
4. Some of the uses are working around hacks done to some Makefiles that are
   really building libraries but have been using bsd.prog.mk because the code
   is cleaner. Had they been using bsd.lib.mk then NO_PIE would not have
   been needed.

We likely do want to enable PIE by default (opt-out) for non-tree consumers
(such as ports). For in-tree though we probably want to only enable PIE
(opt-in) for common attack targets such as remote service daemons and setuid
utilities. This is also a great performance compromise since ASLR is expected
to reduce performance. As such it does not make sense to enable it in all
utilities such as ls(1) that have little benefit to having it enabled.

Reported by: kib

10 years agoSort ASUS section and add USB device ID of ASUS USB-AC51.
Kevin Lo [Tue, 19 Aug 2014 09:02:58 +0000 (09:02 +0000)]
Sort ASUS section and add USB device ID of ASUS USB-AC51.

10 years agoAdd support for -X, which installs the native cross tools for qemu
Warner Losh [Tue, 19 Aug 2014 03:51:10 +0000 (03:51 +0000)]
Add support for -X, which installs the native cross tools for qemu
operations. Doesn't install qemu nor setup the jail, yet.

10 years agoNew DTS files to suppport the SAM9260EK eval board. Derived, in part,
Warner Losh [Tue, 19 Aug 2014 03:51:05 +0000 (03:51 +0000)]
New DTS files to suppport the SAM9260EK eval board. Derived, in part,
from the SAM9G20EK dts files (so that file is GPL'd).

10 years agoDestroy the "qdiffsample_zone" UMA zone on unload to avoid a use-after-unload
Lawrence Stewart [Tue, 19 Aug 2014 02:19:53 +0000 (02:19 +0000)]
Destroy the "qdiffsample_zone" UMA zone on unload to avoid a use-after-unload
panic easily triggered by running "sysctl -a" after unload.

Reported and tested by: Grenville Armitage <garmitage@swin.edu.au>
MFC after: 1 week

10 years agoFor vendors like Juniper, extensibility for sockets is important. A
Marcel Moolenaar [Mon, 18 Aug 2014 23:45:40 +0000 (23:45 +0000)]
For vendors like Juniper, extensibility for sockets is important.  A
good example is socket options that aren't necessarily generic.  To
this end, OSD is added to the socket structure and hooks are defined
for key operations on sockets.  These are:
o   soalloc() and sodealloc()
o   Get and set socket options
o   Socket related kevent filters.

One aspect about hhook that appears to be not fully baked is the return
semantics (the return value from the hook is ignored in hhook_run_hooks()
at the time of commit).  To support return values, the socket_hhook_data
structure contains a 'status' field to hold return values.

Submitted by: Anuranjan Shukla <anshukla@juniper.net>
Obtained from: Juniper Networks, Inc.

10 years agoFix a few conversion problems (e.g. when a keymap is derived from ISO8859-1,
Stefan Eßer [Mon, 18 Aug 2014 21:07:12 +0000 (21:07 +0000)]
Fix a few conversion problems (e.g. when a keymap is derived from ISO8859-1,
but shall provide an Euro sign - similar for Japanese Yen).

The Brazilian keymap "br.kbd" now has accents, by default - the no-accents
version has been renamed to "br.noacc.kbd".

MFC after: 3 days

10 years agoCreate the native-xtools target. This target creates only the cross
Warner Losh [Mon, 18 Aug 2014 21:04:44 +0000 (21:04 +0000)]
Create the native-xtools target. This target creates only the cross
building toolchain for the host computer. This toolchain produces
TARGET_ARCH and assumes the rest of the system contains libraries for
the target. It is intended to be used in a "qemu-user jail" where all
the binaries would otherwise be the target architecture's to build
ports. However, emulation of the compilers is too slow, so we build
native binaries for that. Rather than use the xdev produced binaries,
with all their weird links and paths, these binaries use the native
paths. They will not work unless installed into the qemu-user jail.

Differential Revision: https://phabric.freebsd.org/D518
Reviewed by: sbruno@

10 years agoMake note about reset vs RTOE actions...
Warner Losh [Mon, 18 Aug 2014 21:04:35 +0000 (21:04 +0000)]
Make note about reset vs RTOE actions...

10 years agoFix minor problems found while converting to NEWCONS format.
Stefan Eßer [Mon, 18 Aug 2014 20:58:17 +0000 (20:58 +0000)]
Fix minor problems found while converting to NEWCONS format.

MFC after: 3 days

10 years agoMinor fixes to convert-keymap.pl (conversion of 8bit characters in the form
Stefan Eßer [Mon, 18 Aug 2014 20:55:11 +0000 (20:55 +0000)]
Minor fixes to convert-keymap.pl (conversion of 8bit characters in the form
'x' with high bit set) and to KBDFILES.map (fix encodings and comment out a
few redundant keymap files).

MFC after: 3 days

10 years agoThere exists a possible sequence of page table page allocation failures
Alan Cox [Mon, 18 Aug 2014 20:28:08 +0000 (20:28 +0000)]
There exists a possible sequence of page table page allocation failures
starting with a superpage demotion by pmap_enter() that could result in
a PV list lock being held when pmap_enter() is just about to return
KERN_RESOURCE_SHORTAGE.  Consequently, the KASSERT that no PV list locks
are held needs to be replaced with a conditional unlock.

Discussed with: kib
X-MFC with: r269728
Sponsored by: EMC / Isilon Storage Division

10 years agoDeal explicitly with possible failures of make_dev_alias_p() in GEOM.
Scott Long [Mon, 18 Aug 2014 19:27:47 +0000 (19:27 +0000)]
Deal explicitly with possible failures of make_dev_alias_p() in GEOM.

Submitted by:   Mariusz Zaborski <oshogbo@FreeBSD.org>
MFC after:      3 days

10 years agoAdd the patch commited in r270147.
Roman Divacky [Mon, 18 Aug 2014 18:07:28 +0000 (18:07 +0000)]
Add the patch commited in r270147.

10 years agoBackport r197824, r213427 and r213960 from LLVM trunk:
Roman Divacky [Mon, 18 Aug 2014 18:05:55 +0000 (18:05 +0000)]
Backport r197824, r213427 and r213960 from LLVM trunk:

  r197824 | rdivacky | 2013-12-20 19:08:54 +0100 (Fri, 20 Dec 2013) | 2 lines

  Implement initial-exec TLS for PPC32.

  r213427 | hfinkel | 2014-07-19 01:29:49 +0200 (Sat, 19 Jul 2014) | 7 lines

  [PowerPC] 32-bit ELF PIC support

  This adds initial support for PPC32 ELF PIC (Position Independent Code; the
  -fPIC variety), thus rectifying a long-standing deficiency in the PowerPC
  backend.

  Patch by Justin Hibbits!

  r213960 | hfinkel | 2014-07-25 19:47:22 +0200 (Fri, 25 Jul 2014) | 3 lines

  [PowerPC] Support TLS on PPC32/ELF

  Patch by Justin Hibbits!

Reviewed by: jhibbits
Approved by: dim

10 years agoAdd LIBCRYPTO and LIBSSL to DPADD
Enji Cooper [Mon, 18 Aug 2014 18:01:18 +0000 (18:01 +0000)]
Add LIBCRYPTO and LIBSSL to DPADD

This fixes "make checkdpadd"

Phabric: D621
PR: 192761
Approved by: rpaulo (mentor)
MFC after: 2 weeks

10 years agoReplace DPADD with DPSRCS to fix "make checkdpadd"
Enji Cooper [Mon, 18 Aug 2014 17:38:50 +0000 (17:38 +0000)]
Replace DPADD with DPSRCS to fix "make checkdpadd"

Phabric: D625
Approved by: jmmv (mentor)
Reviewed by: dim
PR: 192734
MFC after: 2 weeks

10 years agoAdd LIBCRYPT to DPADD, remove LDFLAGS from LDADD, and sort the Makefile variables
Enji Cooper [Mon, 18 Aug 2014 17:35:39 +0000 (17:35 +0000)]
Add LIBCRYPT to DPADD, remove LDFLAGS from LDADD, and sort the Makefile variables

This fixes "make checkdpadd"

Phabric: D620
Approved by: jmmv (mentor)
PR: 192729
MFC after: 5 days

10 years agoAdd Canadian Bilingual keyboard
Ed Maste [Mon, 18 Aug 2014 17:10:55 +0000 (17:10 +0000)]
Add Canadian Bilingual keyboard

10 years agoRemove vestiges of previous autofs.
Edward Tomasz Napierala [Mon, 18 Aug 2014 14:47:13 +0000 (14:47 +0000)]
Remove vestiges of previous autofs.

Discussed with: alfred@
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

10 years agoUse the "bSubslotSize" and "bSubFrameSize" fields to obtain the actual
Hans Petter Selasky [Mon, 18 Aug 2014 14:30:43 +0000 (14:30 +0000)]
Use the "bSubslotSize" and "bSubFrameSize" fields to obtain the actual
sample size. According to the USB audio frame format specification
from USB.org, the value in the "bBitResolution" field can be less than
the actual sample size, depending on the actual hardware, and should
not be used for this computation.

PR: 192755
MFC after: 1 week

10 years agoAdd more USB class codes.
Hans Petter Selasky [Mon, 18 Aug 2014 14:23:07 +0000 (14:23 +0000)]
Add more USB class codes.

Obtained from: libusb project at SourceForge
MFC after: 1 week

10 years ago- Do not look for more matching lines if -L is specified
Gabor Kovesdan [Mon, 18 Aug 2014 12:29:28 +0000 (12:29 +0000)]
- Do not look for more matching lines if -L is specified

Submitted by:   eadler (based on)
MFC after: 2 weeks

10 years agoImport the tools used to convert the keymap files from SYSCONS (in locale
Stefan Eßer [Mon, 18 Aug 2014 09:40:19 +0000 (09:40 +0000)]
Import the tools used to convert the keymap files from SYSCONS (in locale
dependent encoding) to NEWCONS (Unicode).

The file "LANG.map" is used to convert INDEX.keymaps. It has 3 columns:
- the language ID as used in the source file
- the language ID to be used in the generated file (e.g. "iw" -> "he")
- the encoding of the menu texts for this language
The conversion result is written to STDOUT.

The file "KBDFILES.map" is used to batch convert keymap files. It's
columns are:
- the encoding used for the keymap sounce file
- the name of the source file
- the name of the generated file
The output files are created in the TEMP sub-directory of the vt keymap
directory, in order to preserve (possibly uncommitted) keymap files in
/usr/src/share/vt/keymaps.

The convert-keymap.pl script can be directly executed by passing the
source file name and the encoding on the command line. It writes to
STDOUT and generates hex Unicode codepoints by default. (This can be
changed to decimal in the script.)

While written for the one-time conversion of the SYSCONS keymaps into
the format required for NEWCONS, I think these tools may be useful for
easy conversion of possible further SYSCONS keymap files, that have not
been committed to the source tree.

10 years agoZero buffer before request.
Alexander V. Chernikov [Mon, 18 Aug 2014 08:07:50 +0000 (08:07 +0000)]
Zero buffer before request.

10 years ago/usr/libexec/ld.so.1 never was a thing on FreeBSD/arm. This was the
Warner Losh [Mon, 18 Aug 2014 02:45:06 +0000 (02:45 +0000)]
/usr/libexec/ld.so.1 never was a thing on FreeBSD/arm. This was the
FreeBSD 3.x and 4.x run time linker. FreeBSD/arm's first release was
5.0. Retire this long-dead code.

10 years agoExpand the elf brandelf infrastructure to give access to the whole ELF
Warner Losh [Mon, 18 Aug 2014 02:44:56 +0000 (02:44 +0000)]
Expand the elf brandelf infrastructure to give access to the whole ELF
header (Elf_Ehdr) to determine if a particular interpretor wants to
accept it or not. Use this mechanism to filter EABI arm on OABI arm
kernels, and vice versa. This method could also be used to implement
OABI on EABI arm kernels, if desired, or to allow a single mips kernel
to run o32, n32 and n64 binaries.

Differential Revision: https://reviews.freebsd.org/D609

10 years agoRename ca keyboard to ca-fr
Ed Maste [Mon, 18 Aug 2014 01:49:42 +0000 (01:49 +0000)]
Rename ca keyboard to ca-fr

"ca" will shortly be used for the Canadian Multilingual keyboard.

10 years agoAdd LIBUTIL to DPADD
Enji Cooper [Mon, 18 Aug 2014 01:21:41 +0000 (01:21 +0000)]
Add LIBUTIL to DPADD

This will fix "make checkdpadd"

MFC after: 5 days
PR: 192759
Approved by: rpaulo (mentor)

10 years agoAdd -ll to LDADD to fix "make checkdpadd"
Enji Cooper [Mon, 18 Aug 2014 00:50:09 +0000 (00:50 +0000)]
Add -ll to LDADD to fix "make checkdpadd"

Phabric: D622
MFC after: 2 weeks
Approved by: rpaulo (mentor)

10 years agoFix typo in lib/atf/libatfc++/Makefile
Enji Cooper [Sun, 17 Aug 2014 23:30:45 +0000 (23:30 +0000)]
Fix typo in lib/atf/libatfc++/Makefile

LIBATFC should be LIBATF_C; this was missed in the initial import
(r241823)

PR: 192731
MFC after: 3 days
Phabric: D619
Approved by: rpaulo (mentor)

10 years agoAdd forgotten DPADD to ifconfig(8).
Alexander V. Chernikov [Sun, 17 Aug 2014 20:06:47 +0000 (20:06 +0000)]
Add forgotten DPADD to ifconfig(8).

PR: 192760
Submitted by: yaneurabeya at gmail.com
MFC after: 2 weeks

10 years agoAttempt at converting the SYSCONS keymaps to Unicode for use with NEWCONS.
Stefan Eßer [Sun, 17 Aug 2014 19:54:21 +0000 (19:54 +0000)]
Attempt at converting the SYSCONS keymaps to Unicode for use with NEWCONS.
I have spent many hours comparing source and destination formats, and hope
to have caught the most severe conversion errors.

Files were converted with a Perl script which I'll shortly commit to the
tools directory. This script is a much enhanced version of the one
provided by ray@ and is expected to support the full kbdmap(5) syntax.

The naming convention used is:

 <2-letter country code>.<variant>.kbd

Only if there are multiple layouts for different languages:

 <2-letter country code>-<2-letter language code>.<variant>.kbd

In nearly all cases, the keyboards are country specific, only. Currently
there is only one case where the language was added ("ch-fr.kbd" for
the Swiss-French keyboard layout).

I choose to write Unicode character codes as hex numbers. While this
increases the diff to the SYSCONS keymap files for the trivial cases
(conversion from ISO8859-1), it really helps to verify the more complex
cases against a Unicode table (which is indexed by hex numbers).

This commit does not cover all files that have been converted, since I
need to sort out which ones to use, if there were several with different
source encodings to choose from.

Review and test of the keymap files is highly desirable before 10.1 is
released. I'd also appreciate educated opinions regarding the optimum
variant (to be made available as the default for each language).

Since there are no NEWCONS keymaps in 10-STABLE, I plan to MFC after
the minimum allowed delay of 3 days, to allow at least a few weeks to
test and improve what will be in the next release.

MFC after: 3 days

10 years agosh: Avoid overflow in atoi() when parsing HISTSIZE.
Jilles Tjoelker [Sun, 17 Aug 2014 19:36:56 +0000 (19:36 +0000)]
sh: Avoid overflow in atoi() when parsing HISTSIZE.

Side effect: a non-numeric HISTSIZE now results in the default size (100)
instead of 0.

10 years agoRemove LOG_ODELAY because it does nothing.
Neel Natu [Sun, 17 Aug 2014 19:06:26 +0000 (19:06 +0000)]
Remove LOG_ODELAY because it does nothing.

Reviewed by: jilles
CR: https://reviews.freebsd.org/D611

10 years agoRemove keyboard entropy [1] from r270105.
Bjoern A. Zeeb [Sun, 17 Aug 2014 18:27:02 +0000 (18:27 +0000)]
Remove keyboard entropy [1] from r270105.

Reported by: ian [1]
(Pointy hat)^2 to: imp

10 years agoAdd missing license to at91_common.c. It was committed w/o a license.
Warner Losh [Sun, 17 Aug 2014 16:53:19 +0000 (16:53 +0000)]
Add missing license to at91_common.c. It was committed w/o a license.

Pointy hat to: imp@

10 years agoDefine at91_master_clock in only one file to eliminate warnings about
Warner Losh [Sun, 17 Aug 2014 16:53:14 +0000 (16:53 +0000)]
Define at91_master_clock in only one file to eliminate warnings about
it multiply defined commons.

10 years agoConvert the HL201 config file to use FDT.
Warner Losh [Sun, 17 Aug 2014 16:53:10 +0000 (16:53 +0000)]
Convert the HL201 config file to use FDT.

10 years agosh: Reject integer overflow in number and is_number.
Jilles Tjoelker [Sun, 17 Aug 2014 16:40:29 +0000 (16:40 +0000)]
sh: Reject integer overflow in number and is_number.

10 years agosh: Don't hardcode relative paths in the tests stderr files.
Jilles Tjoelker [Sun, 17 Aug 2014 14:26:12 +0000 (14:26 +0000)]
sh: Don't hardcode relative paths in the tests stderr files.

These paths have had to be adjusted to changes in the testsuite runner
several times, so modify the tests to remove the need for such adjustment.

A cp in functional_test.sh is now unneeded, but this matters little in
performance.

10 years agoAdd a few missing entries and fix entries that are obviously wrong.
Stefan Eßer [Sun, 17 Aug 2014 11:59:23 +0000 (11:59 +0000)]
Add a few missing entries and fix entries that are obviously wrong.
The use of the old ISO language code "iw" for Hebrew was inconsistent
and it is replaced by the new language code "he" (which was already
used for the keyboard menu entry, but not for the menu heading or the
default font).

These changes are in preparation of the conversion of this file and
the keymap definitions to Unicode for use with NEWCONS.

10 years agostaticize two functions, and use proper format for a struct sglist
Luigi Rizzo [Sun, 17 Aug 2014 10:25:27 +0000 (10:25 +0000)]
staticize two functions, and use proper format for a struct sglist
(reported by bz)

10 years agoBring in the new automounter, similar to what's provided in most other
Edward Tomasz Napierala [Sun, 17 Aug 2014 09:44:42 +0000 (09:44 +0000)]
Bring in the new automounter, similar to what's provided in most other
UNIX systems, eg. MacOS X and Solaris.  It uses Sun-compatible map format,
has proper kernel support, and LDAP integration.

There are still a few outstanding problems; they will be fixed shortly.

Reviewed by: allanjude@, emaste@, kib@, wblock@ (earlier versions)
Phabric: D523
MFC after: 2 weeks
Relnotes: yes
Sponsored by: The FreeBSD Foundation

10 years agoAdd missing DPADD to Makefile.
Hans Petter Selasky [Sun, 17 Aug 2014 06:28:57 +0000 (06:28 +0000)]
Add missing DPADD to Makefile.

PR: 192733

10 years agoWhen the initarm_* routines were renamed to platform_* and moved to their
Ian Lepore [Sun, 17 Aug 2014 02:56:58 +0000 (02:56 +0000)]
When the initarm_* routines were renamed to platform_* and moved to their
own header file, the lovely block of comments explaining what the generic
init code expects of the soc implementations got lost, restore it.

10 years agoRename the old initarm_* functions to the new platform_* names. Also
Ian Lepore [Sun, 17 Aug 2014 02:53:36 +0000 (02:53 +0000)]
Rename the old initarm_* functions to the new platform_* names.  Also
move the registration of the static device map table into the function
intended to do devmap init stuff.

10 years agoClean up unused definitions.
Alexander V. Chernikov [Sat, 16 Aug 2014 22:55:58 +0000 (22:55 +0000)]
Clean up unused definitions.

10 years ago* Use standard net/sff8472.h header for sff bits and offsets.
Alexander V. Chernikov [Sat, 16 Aug 2014 21:53:44 +0000 (21:53 +0000)]
* Use standard net/sff8472.h header for sff bits and offsets.
* Convert sff_8472_id to 'const char *' to please clang.

Pointed by: np

10 years agoFactor out the common code for function boundary tracing instead of
Mark Johnston [Sat, 16 Aug 2014 21:42:55 +0000 (21:42 +0000)]
Factor out the common code for function boundary tracing instead of
duplicating the entire implementation for both x86 and powerpc. This makes
it easier to add support for other architectures and has no functional
impact.

Phabric: D613
Reviewed by: gnn, jhibbits, rpaulo
Tested by: jhibbits (powerpc)
MFC after: 2 weeks

10 years agoMove the imx6 sysctl temperature info to hw.imx6 where all the other
Ian Lepore [Sat, 16 Aug 2014 20:44:45 +0000 (20:44 +0000)]
Move the imx6 sysctl temperature info to hw.imx6 where all the other
soc-wide info lives.  It was under dev.imx6_anatop.0.

What does anatop mean anyway?  Nobody seems to know, so it's probably
not where somebody will think to look for imx6 hardware info.

10 years agoAdd support for reading i2c SFP/SFP+ data from NIC driver and
Alexander V. Chernikov [Sat, 16 Aug 2014 19:13:52 +0000 (19:13 +0000)]
Add support for reading i2c SFP/SFP+ data from NIC driver and
presenting most interesting fields via ifconfig -v.
This version supports Intel ixgbe driver only.

Tested on: Cisco,Intel,Mellanox,ModuleTech,Molex transceivers
MFC after: 2 weeks

10 years agoUpdate to the current version of netmap.
Luigi Rizzo [Sat, 16 Aug 2014 15:00:01 +0000 (15:00 +0000)]
Update to the current version of netmap.
Mostly bugfixes or features developed in the past 6 months,
so this is a 10.1 candidate.

Basically no user API changes (some bugfixes in sys/net/netmap_user.h).

In detail:

1. netmap support for virtio-net, including in netmap mode.
  Under bhyve and with a netmap backend [2] we reach over 1Mpps
  with standard APIs (e.g. libpcap), and 5-8 Mpps in netmap mode.

2. (kernel) add support for multiple memory allocators, so we can
  better partition physical and virtual interfaces giving access
  to separate users. The most visible effect is one additional
  argument to the various kernel functions to compute buffer
  addresses. All netmap-supported drivers are affected, but changes
  are mechanical and trivial

3. (kernel) simplify the prototype for *txsync() and *rxsync()
  driver methods. All netmap drivers affected, changes mostly mechanical.

4. add support for netmap-monitor ports. Think of it as a mirroring
  port on a physical switch: a netmap monitor port replicates traffic
  present on the main port. Restrictions apply. Drive carefully.

5. if_lem.c: support for various paravirtualization features,
  experimental and disabled by default.
  Most of these are described in our ANCS'13 paper [1].
  Paravirtualized support in netmap mode is new, and beats the
  numbers in the paper by a large factor (under qemu-kvm,
  we measured gues-host throughput up to 10-12 Mpps).

A lot of refactoring and additional documentation in the files
in sys/dev/netmap, but apart from #2 and #3 above, almost nothing
of this stuff is visible to other kernel parts.

Example programs in tools/tools/netmap have been updated with bugfixes
and to support more of the existing features.

This is meant to go into 10.1 so we plan an MFC before the Aug.22 deadline.

A lot of this code has been contributed by my colleagues at UNIPI,
including Giuseppe Lettieri, Vincenzo Maffione, Stefano Garzarella.

MFC after: 3 days.

10 years agoUse mount protocol version 3 by default for showmount and umount.
Peter Wemm [Sat, 16 Aug 2014 14:56:11 +0000 (14:56 +0000)]
Use mount protocol version 3 by default for showmount and umount.
mount_nfs effectively uses mount protocol v3 by default already.
v1 mount protocol is being removed along with nfsv2 by a high profile NFS
appliance vendor and our legacy v1 mount protocol usage causes rpc errors.

10 years agoprint additional debugging info in virtqueue_dump()
Luigi Rizzo [Sat, 16 Aug 2014 13:13:17 +0000 (13:13 +0000)]
print additional debugging info in virtqueue_dump()
(not fundamental, but useful to debug performance issues on vtnet)

MFC after: 3 days

10 years agonet: move interface removal notification up in if_detach_internal
Roger Pau Monné [Sat, 16 Aug 2014 10:47:24 +0000 (10:47 +0000)]
net: move interface removal notification up in if_detach_internal

This is needed to prevent having interfaces with ifp->if_addr == NULL
on bridge interfaces. Moving the notification event handlers up makes
sure the interfaces are removed before doing any more cleanup.

Sponsored by: Citrix Systems R&D
Reviewed by: melifaro
Differential Revision: https://reviews.freebsd.org/D598

net/if.c
 - Move interface removal notification up in if_detach_internal.

10 years agoComplete r254667, do not destroy pmap lock if KVA allocation failed.
Konstantin Belousov [Sat, 16 Aug 2014 08:31:25 +0000 (08:31 +0000)]
Complete r254667, do not destroy pmap lock if KVA allocation failed.

Submitted by: Svatopluk Kraus <onwahe@gmail.com>
MFC after: 1 week

10 years agoAdd if_ath_alq code into the non-module build.
Adrian Chadd [Sat, 16 Aug 2014 03:05:02 +0000 (03:05 +0000)]
Add if_ath_alq code into the non-module build.

10 years agosh: Mask off shift distance (<< and >>) in arithmetic.
Jilles Tjoelker [Fri, 15 Aug 2014 22:36:41 +0000 (22:36 +0000)]
sh: Mask off shift distance (<< and >>) in arithmetic.

In C, shift distances equal to or larger than the number of bits in the
operand result in undefined behaviour. As part of eliminating undefined
behaviour in arithmetic, mask off the distance like Java and JavaScript
specify and C on x86 usually does.

Assumption: conversion from unsigned to signed retains the two's complement
bits.
Assumption: uintmax_t has no padding bits.

10 years agoMake the USB and ZFS devd configuration files optional depending on the
Enji Cooper [Fri, 15 Aug 2014 21:35:31 +0000 (21:35 +0000)]
Make the USB and ZFS devd configuration files optional depending on the
values of MK_USB/MK_ZFS

Making zfs.conf optional resolves PR # 186971

PR: 186971
Phabric: D606
Approved by: jmmv (mentor)
Sponsored by: EMC / Isilon Storage Division