Commit Graph

202622 Commits

Author SHA1 Message Date
Baptiste Daroussin
1a41e1f147 Add newly generated locales from CLDR 27.0.1
only skip timedef until I figure out how to workaround svn painful mime-type handling
2015-08-08 01:45:53 +00:00
Baptiste Daroussin
78e197d1f9 Add FreeBSD keyword on generated Makefiles 2015-08-08 00:57:27 +00:00
Baptiste Daroussin
5d0dcc7e8a Add to mtree directories for newly supported locales 2015-08-08 00:51:11 +00:00
Baptiste Daroussin
c58c4251bb Add set of tools created by edwin@ long time ago to generate locales
Those tools were modified and extended by John Marino <draco@marino.st>
Add the generated charmaps and maps for LC_CTYPE generation

Obtained from:	Dragonfly
2015-08-08 00:28:23 +00:00
Baptiste Daroussin
57df665ac1 Add localedef(1) to bootstrap tools 2015-08-08 00:18:32 +00:00
Baptiste Daroussin
057ca2d437 Add localedef(1), a locale definition generator tool
The localedef tool can read entire (and unmodified) CLDR posix definition
files, and generate all 6 LC categories: LC_COLLATE, LC_CTYPE, LC_TIME,
LC_NUMERIC, LC_MONETARY and LC_MESSAGES.

This tool has a long history with Solaris.  The Nexenta developers
modified it to read CLDR files and created the much richer collation
formats.  The libc collation functions have to be modified to read the
new format (called "BSD-1.0") and to handle the new data structures.

The result will be that locale-sensitive tools and functions will now
properly sort multibyte and unicode strings.

Obtained from:	Dragonfly
2015-08-07 23:53:31 +00:00
Baptiste Daroussin
7be46fbdfd Define libavl in src.libnames.mk 2015-08-07 23:45:32 +00:00
Baptiste Daroussin
2a6abeebef The collate functions within libc have been using version 1 and 1.2 of the
packed LC_COLLATE binary formats. These were generated with the colldef
tool, but the new LC_COLLATE files are going to be generated by the new
localedef tool using CLDR POSIX files as input.  The BSD-flavored
version of localedef identifies the format as "BSD 1.0".  Any
LC_COLLATE file with a different version will simply not be loaded, and
all LC* categories will get set to "C" (aka "POSIX") locale.

This work is based off of Nexenta's contribution to Illumos.
The integration with xlocale is John Marino's work for Dragonfly.

The following commits will enable localedef tool, disable the colldef
tool, add generated colldef directory, and finally remove colldef from
base.

The only difference with Dragonfly are:
- a few fixes to build with clang
- And identification of the flavor as "BSD 1.0" instead of "Dragonfly 4.4"

Obtained from:	Dragonfly
2015-08-07 23:41:26 +00:00
Ian Lepore
6f7a9f7c8d RFC 2783 requires a status of ETIMEDOUT, not EWOULDBLOCK, on a timeout. 2015-08-07 21:14:19 +00:00
Mark Johnston
7e518a6648 - Use an explicit "depends_on module kernel" guard in DTrace libraries that
reference types defined in the kernel. Otherwise dtrace(1) expects to find
  CTF definitions for all referenced types, which is not very reasonable
  when it is being used in a build environment. This was previously worked
  around by adding "-x nolibs" to dtrace -h or -G invocations, but as of
  r283025, dtrace(1) actually handles dependencies properly, so this is no
  longer necessary.
- Remove "pragma ident" directives from DTrace libraries, as they're being
  phased out upstream as well.

Submitted by:	Krister Johansen <Krister.Johansen@isilon.com> [1]
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-08-07 19:56:22 +00:00
Marcel Moolenaar
8f1d6b6915 Fix typo introduced in previous commit.
Pointed out by: Nikolai Lifanov <lifanov at mail.lifanov.com>
2015-08-07 18:40:44 +00:00
Mark Johnston
8811063172 ipv4_is_zeronet() and ipv4_is_loopback() expect an address in network
order, but IN_ZERONET and IN_LOOPBACK expect it in host order.

Submitted by:	Tao Liu <Tao.Liu@isilon.com>
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-08-07 18:30:11 +00:00
Marcel Moolenaar
de93252622 o Fix a typo.
o  Describe the file formats mkimg can create.
2015-08-07 17:22:37 +00:00
Gleb Smirnoff
ad30bc5aec Fix mtx_assert() argument. 2015-08-07 16:23:16 +00:00
Alexander Motin
ebef81ecea Add unmapped I/O support to ata(4) driver.
Main problem there was PIO mode support, that required KVA mapping.
Handle that case using recently added pmap_quick_enter_page(9) KPI,
mapping data pages to KVA one at a time.
2015-08-07 14:38:26 +00:00
Alexander Motin
3301406331 Add more ifdefs to fix build with GCC after r286406. 2015-08-07 14:12:51 +00:00
Gleb Smirnoff
7a3151955b Fix !MWL_DEBUG build. 2015-08-07 12:34:20 +00:00
Jason A. Harmening
cbaa6a0e0c Create man page for pmap_quick_enter_page(9) and pmap_quick_remove_page(9)
Reviewed by:	kib, brueffer, wblock
Approved by:	kib (mentor)
Differential Revision:	https://reviews.freebsd.org/D3312
2015-08-07 12:13:15 +00:00
Gleb Smirnoff
79d2c5e857 Change KPI of how device drivers that provide wireless connectivity interact
with the net80211 stack.

Historical background: originally wireless devices created an interface,
just like Ethernet devices do. Name of an interface matched the name of
the driver that created. Later, wlan(4) layer was introduced, and the
wlanX interfaces become the actual interface, leaving original ones as
"a parent interface" of wlanX. Kernelwise, the KPI between net80211 layer
and a driver became a mix of methods that pass a pointer to struct ifnet
as identifier and methods that pass pointer to struct ieee80211com. From
user point of view, the parent interface just hangs on in the ifconfig
list, and user can't do anything useful with it.

Now, the struct ifnet goes away. The struct ieee80211com is the only
KPI between a device driver and net80211. Details:

- The struct ieee80211com is embedded into drivers softc.
- Packets are sent via new ic_transmit method, which is very much like
  the previous if_transmit.
- Bringing parent up/down is done via new ic_parent method, which notifies
  driver about any changes: number of wlan(4) interfaces, number of them
  in promisc or allmulti state.
- Device specific ioctls (if any) are received on new ic_ioctl method.
- Packets/errors accounting are done by the stack. In certain cases, when
  driver experiences errors and can not attribute them to any specific
  interface, driver updates ic_oerrors or ic_ierrors counters.

Details on interface configuration with new world order:
- A sequence of commands needed to bring up wireless DOESN"T change.
- /etc/rc.conf parameters DON'T change.
- List of devices that can be used to create wlan(4) interfaces is
  now provided by net.wlan.devices sysctl.

Most drivers in this change were converted by me, except of wpi(4),
that was done by Andriy Voskoboinyk. Big thanks to Kevin Lo for testing
changes to at least 8 drivers. Thanks to Olivier Cochard, gjb@, mmoll@,
op@ and lev@, who also participated in testing. Details here:

https://wiki.freebsd.org/projects/ifnet/net80211

Still, drivers: ndis, wtap, mwl, ipw, bwn, wi, upgt, uath were not
tested. Changes to mwl, ipw, bwn, wi, upgt are trivial and chances
of problems are low. The wtap wasn't compilable even before this change.
But the ndis driver is complex, and it is likely to be broken with this
commit. Help with testing and debugging it is appreciated.

Differential Revision:	D2655, D2740
Sponsored by:	Nginx, Inc.
Sponsored by:	Netflix
2015-08-07 11:43:14 +00:00
Christian Brueffer
84fe889c63 Manpage cleanup.
- new sentence -> new line
- fix manpage references
- fix macro usage
- fix a typo

MFC after:	1 week
2015-08-07 10:48:52 +00:00
Andrew Turner
d1b2133d03 Attach dwmmc to the ofwbus, som devicetrees place it here.
Sponsored by:	ABT Systems Ltd
2015-08-07 08:57:58 +00:00
Andrew Turner
a336c37514 Stop including machine/fdt.h, it's unneeded, and purposefully
unimplemented on arm64.

Sponsored by:	ABT Systems Ltd
2015-08-07 08:54:50 +00:00
Marcelo Araujo
8b3ae99560 Wrap some unused functions with notyet, it is necessary to be able to
build the modules/ctl directly.
Remove a dead MALLOC_DEFINE.

Differential Revision:	D3329
Reviewed by:		mav
Sponsored by:		gandi.net
2015-08-07 08:30:43 +00:00
Konstantin Belousov
347e9d5495 Minor style cleanup of the code surrounding r286404.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-08-07 08:24:12 +00:00
Konstantin Belousov
9b34965019 The condition to use direct processing for the unmapped bio is
reverted.  We can do direct processing when g_io_check() does not need
to perform transient remapping of the bio, otherwise the thread has to
sleep.

Reviewed by:	mav (previous version)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-08-07 08:13:34 +00:00
Marcelo Araujo
b47f904d8f Remove an extra new line on usage().
Rename domain to domainname to be identical to the man page.

Reported by:	bde
2015-08-07 07:05:47 +00:00
Marcelo Araujo
fa77157916 Fix variable 'old' is used uninitialized whenever '&&' condition is false.
Spotted by clang.

Differential Revision:	D2721
Reviewed by:		rodrigc, bapt
2015-08-07 06:15:01 +00:00
Konstantin Belousov
c3f62b5352 Remove unused i386 header privatespace.h. For the native kernel, its
use was removed in r173592 (Nov 2007), yet Xen PV bits continued
referencing the privatespace structure, and were removed in r282274
(Apr 2015).

Discussed with:	jhb
Sponsored by:	The FreeBSD Foundation
2015-08-07 05:59:58 +00:00
Gregory Neil Shapiro
1caaaaf09e Reminder to check tools/build/mk/OptionalObsoleteFiles.inc on new
version imports.

Obtained from:	garga@
2015-08-07 04:58:35 +00:00
Marcel Moolenaar
9286ca0227 Rebase after r286395: rounding fix for dynamic VHD 2015-08-07 04:35:43 +00:00
Marcel Moolenaar
c20f01c4ea Fix the dynamic VHD format to work with qemu. The size of the disk
is taken to match the geometry and only when the geometry is max'd
out, is the actual recorded size taken.

Note that qemu has the same logic for the fixed VHD format. However
that is known to conflict with Microsoft Azure, where the recorded
size of the image is what counts.

Pointed out by: gjb@
2015-08-07 04:27:51 +00:00
Marcelo Araujo
e6330ffeee Get closest as possible with style(9). No functional change.
Differential Revision:	D3295
Reviewed by:		bapt
2015-08-07 02:37:47 +00:00
Kevin Lo
0fa4d4b570 Add support for ASUS WL-100g. 2015-08-07 02:05:16 +00:00
Xin LI
9c354f41b3 Now that the portsnap buildbox is generating the raw bits for INDEX-11,
add it to the set of INDEX files built by portsnap.

MFC after:	2 weeks
2015-08-06 23:44:46 +00:00
Alan Cox
e0a63baae4 Introduce a sysctl for reporting the number of fully populated reservations. 2015-08-06 21:27:50 +00:00
Ian Lepore
374b1ec1ea Document the recently added get-bitmode and eeprom read/write functionality. 2015-08-06 20:59:03 +00:00
John Baldwin
1e2ec671fc Consistently use both leading and trailing spaces inside of the {}'s
when pretty-printing structures.  Most structures used both spaces,
but some only used a trailing space and some used neither.
2015-08-06 20:05:40 +00:00
Ian Lepore
a046541623 Return the current ftdi bitbang mode with the UFTDIIOC_GET_BITMODE ioctl.
The ftdi chip itself has a "get bitmode" command that doesn't actually
return the current bitmode, just a snapshot of the gpio lines.  The chip
apparently has no way to provide the current bitmode.

This implements the functionality at the driver level.  The driver starts
out assuming the chip is in UART mode (which it will be, coming out of
reset) and keeps track of every successful set-bitmode operation so that
it can always return the current mode with UFTDIIOC_GET_BITMODE.
2015-08-06 19:47:04 +00:00
John Baldwin
0a46af44bf Whitespace fixes to consistently use spaces before }'s and
wrap long lines.
2015-08-06 19:36:47 +00:00
Ian Lepore
fc43ff0865 Add support to the uftdi driver for reading and writing the serial eeprom
that can be attached to the chips, via ioctl() calls.
2015-08-06 19:29:26 +00:00
John Baldwin
7d89732757 Decode the arguments passed to the *at() family of system calls. This is
especially useful now that libc's open() always calls openat().  While here,
fix a few other things:
- Decode the mode argument passed to access(), eaccess(), and faccessat().
- Decode the atfd paramete to pretty-print AT_FDCWD.
- Decode the special AT_* flags used with some of the *at() system calls.
- Decode arguments for fchmod(), lchmod(), fchown(), lchown(), eaccess(),
  and futimens().
- Decode both of the timeval structures passed to futimes() instead of just
  the first one.
2015-08-06 19:08:33 +00:00
John Baldwin
e82ce59c37 Decode the arguments to mkfifo() and fix an off-by-one error in the arguments
to mknod().
2015-08-06 18:32:32 +00:00
John Baldwin
19d637849e Don't mark the fcntl flag argument as an output parameter so that it is
always decoded.  Previously the argument was not decoded if fcntl() failed.
2015-08-06 18:28:15 +00:00
Xin LI
f770ad4a26 Now that stable/8 is EOL, stop building INDEX-8.
MFC after:	1 week
2015-08-06 18:15:56 +00:00
Konstantin Belousov
a8bf83d618 Formally pair store_rel(&smp_started) with load_acq(&smp_started).
The expected semantic is to have misc. data, e.g. CPU bitmaps, visible
in the BSP after smp_started is written by the last started AP, which
formally requires acquire barrier on the load.  The change is mostly
nop due to the ordered behaviour of the x86 CPUs.

Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2015-08-06 18:02:54 +00:00
Pawel Jakub Dawidek
5ee9ea19fe After crypto_dispatch() bio might be already delivered and destroyed,
so we cannot access it anymore. Setting an error later lead to memory
corruption.

Assert that crypto_dispatch() was successful. It can fail only if we pass a
bogus crypto request, which is a bug in the program, not a runtime condition.

PR:		199705
Submitted by:	luke.tw
Reviewed by:	emaste
MFC after:	3 days
2015-08-06 17:13:34 +00:00
John Baldwin
3c790178c5 Remove some more vestiges of the Xen PV domu support. Specifically,
use vtophys() directly instead of vtomach() and retire the no-longer-used
headers <machine/xenfunc.h> and <machine/xenvar.h>.

Reported by:	bde (stale bits in <machine/xenfunc.h>)
Reviewed by:	royger (earlier version)
Differential Revision:	https://reviews.freebsd.org/D3266
2015-08-06 17:07:21 +00:00
John Baldwin
fada4adf95 The changes that introduced fo_mmap() treated all character device
mappings as if MAP_SHARED was always present since in general MAP_PRIVATE
is not permitted for character devices.  However, there is one exception
in that MAP_PRIVATE mappings are permitted for /dev/zero.

Only require a writable file descriptor (FWRITE) for shared, writable
mappings of character devices.  vm_mmap_cdev() will reject any private
mappings for other devices.

Reviewed by:	kib
Reported by:	sbruno (broke qemu cross-builds), peter
Differential Revision:	https://reviews.freebsd.org/D3316
2015-08-06 16:50:37 +00:00
John Baldwin
7f43ee0fb7 Add various tests to ensure that invalid arguments passed to mmap()
trigger failures.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D3269
2015-08-06 16:14:29 +00:00
John Baldwin
95eee0d40b Convert the map_at_zero test case to ATF. In particular, this will
facilitate adding more mmap() tests.

MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D3268
2015-08-06 16:12:12 +00:00