Commit Graph

221502 Commits

Author SHA1 Message Date
Alexander Motin
08826086fe Add initial support for multiple MSI-X vectors.
For 24xx and above use 2 vectors (default and response queue).
For 26xx and above use 3 vectors (default, response and ATIO queues).
Due to global lock interrupt hardlers never run simultaneously now, but
at least this allows to save one regitster read per interrupt.

MFC after:	2 weeks
2017-03-19 19:11:40 +00:00
Ian Lepore
e6f055f6b4 Add a module to build imx5 dtb files. 2017-03-19 19:10:23 +00:00
Ian Lepore
98641b99e3 Delete our local imx53-qsb.dts file; the code now runs fine using the
standard vendor-supplied file in sys/gnu/dts/arm.
2017-03-19 18:50:03 +00:00
Ian Lepore
d32c1ca43c Add INTRNG option to EFIKA_MX config, it is an imx5-based platform. 2017-03-19 18:38:08 +00:00
Ian Lepore
d32f00077b Remove kernel config for DIGI-CCWMX53 devel board. It was just standard
IMX53 with static dtb added, and now that imx53 can use vendor-supplied dts
files and ubldr, there is no need for a static-dtb variant.
2017-03-19 18:35:20 +00:00
Ian Lepore
cde8ef4d96 Convert the imx5 interrupt controller driver to INTRNG. 2017-03-19 18:30:38 +00:00
Ian Lepore
e04a4275b2 Add dtb/imx5 module build to the imx53 kernel config. 2017-03-19 18:28:38 +00:00
Ian Lepore
76fedc062f Remove kernel config for IMX53-QSB (quickstart board). It was just
standard IMX53 with static dtb added, and now that imx53 can use vendor-
supplied dts files and ubldr, there is no need for a static-dtb variant.
2017-03-19 18:26:52 +00:00
Baptiste Daroussin
b61f2477a2 Canada adheres to ISO 8601, let's make the locale reflecting that fact
PR:		200079
MFC after:	1 week
Submitted by:	Dan McGregor <dan.mcgregor@usask.ca>
Reported by:	A.J. Kehoe IV (Nanoman) <freebsd-bugs@nanoman.ca>
Differential Revision:	https://reviews.freebsd.org/D9925
2017-03-19 18:21:35 +00:00
Baptiste Daroussin
b285596f4e Remove empty Big5 directory from share/nls 2017-03-19 18:03:52 +00:00
Baptiste Daroussin
918fecd512 Finish removal of Big5 2017-03-19 17:54:12 +00:00
Baptiste Daroussin
ababdab0ce Remove zh_TW.Big5 locale
After discussion with many Taiwanese, in IT or not. Big5 is not used anymore.
It is not able to represent lots of the characters used in the language.
2017-03-19 17:52:46 +00:00
Baptiste Daroussin
ad0b0cc237 Prepare the removal of the zh_TW.Big5 encoding 2017-03-19 17:48:41 +00:00
Baptiste Daroussin
ed2678e3c0 Garbage collect a map file that is not used anymore to generate locales 2017-03-19 17:46:08 +00:00
Baptiste Daroussin
2c5ddcf8b6 Temporary readd GNU diff
etcupdate requires --change-group-format it is not easy to implement
in bsd diff so for now readd GNU diff
2017-03-19 17:19:59 +00:00
Edward Tomasz Napierala
4bcdaf7651 Improve formatting.
MFC after:	2 weeks
2017-03-19 16:17:42 +00:00
Edward Tomasz Napierala
8a022b97a8 Bring back the "i". The point is to make it easy to find via "apropos
iscsi", along with all the other relevant components.

MFC after:	2 weeks
2017-03-19 15:53:17 +00:00
Edward Tomasz Napierala
2132a4ef05 Document how to use reroot with NFS.
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2017-03-19 15:49:51 +00:00
Konstantin Belousov
bc27810671 Fix off-by-one in the vm_fault_populate() code.
When re-calculating the last inclusive page index after the pager
call, -1 was erronously ommitted.  If the pager extended the run
(unlikely), the result would be insertion of the valid page mapping
outside the current map entry range.

Found by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-03-19 14:42:16 +00:00
Alexander Motin
9c81a61ee1 Remove hackish code delaying ATIOs to unknown virtual port.
Since we support RQSTYPE_RPT_ID_ACQ, that functionality is only useful
in loop mode, which probably doesn't worth having this hack in 2017.

MFC after:	2 weeks
2017-03-19 13:46:11 +00:00
Alexander Motin
e2a658cb0c Move <= 23xx PDB workaround to generic code.
It is chip-specific and has nothing to do with platform.

MFC after:	2 weeks
2017-03-19 10:28:04 +00:00
Alexander Motin
a41dd87f61 Remove some dead stuff.
MFC after:	2 weeks
2017-03-19 09:36:43 +00:00
Alexander Motin
5a5632c2de Move 24xx RQSTYPE_NOTIFY handling to generic code.
This code has nothing to do with specific platform.

MFC after:	2 weeks
2017-03-19 09:30:03 +00:00
Adrian Chadd
15e58d4d26 [ath] prepare for "correct" group (bcast/mcast) address frame handling and software/hardware queue TID mapping.
When I initially did this 11n TX work in days of yonder, my 802.11 standards
clue was ... not as finely tuned.  One of the things in 802.11-2012 (which
I guess technically was after I did this work, but I'm sure it was like this
in the previous rev?) is that among other traffic classes, three things are
important:

* group addressed frames should be default non-QoS, even if they're QoS frames, and
* group addressed frames should have a seqno out of a different space than the
  per-TID QoS one; and because of this
* group addressed frames, being non-QoS, should never be in the Block-ACK window
  for TX.

Now, net80211 and now this code cheats by using the non-QOS TID, but ideally
we'd introduce a separate seqno space just for multicast/group traffic for
TX and RX comparison.

Later extensions (eg reliable multicast / multimedia) express what one should do
when doing multicast traffic in a TID.  Now, technically we /could/ do group traffic
as QoS traffic and throw it into a per-TID seqno space, but this definitely
introduces ordering issues when you take into account things like CABQ behaviour.
(Ie, if some traffic in the TID goes into the CABQ and some doesn't, because
it's doing a split of multicast and non-multicast traffic, then you have
seqno ordering issues.)

So, until someone implements 802.11vv reliable multicast / multimedia extensions,
group traffic is non-QoS.

Next, software/hardware queue TID mapping.  In the past I believed the WME tagging
of frames because well, net80211 had a habit of tagging things like management
traffic with it.  But, then we also map QoS traffic categories to TIDs as well.
So, we should obey the TID!  But! then it put some management traffic into higher
WME categories too, as those frames don't have QoS TIDs.  But! It'd do things like
put things like QoS action frames into higher WME categories, when they should
be kept in-order with the rest of the traffic for that TID.  So! Given all of this,
the ath(4) driver does overrides to not trust the WME category.

I .. am undoing some of this.  Now, the TID has a 1:1 mapping to the hardware
queue.  The TID is the primary source of truth now for all QoS traffic.
The WME is only used for non-QoS traffic.  This now means that any TID traffic
queued should be consistently queued regardless of WME, so things like the
"TX finished, do more TX" that is occuring right now for transmit handling
should be "better".

The consistent {TID, WME} -> hardware queue mapping is important for
transmit completion.  It's used to schedule more traffic for that
particular TID, because that {many TID}:{1 TXQ} mapping in ath_tx_tid_sched()
is used for driving completion.  Ie, when the hardware queue completes,
it'll walk that list of scheduled TIDs attached to that TXQ.

The eventual aim is to get ready for some other features around putting
some data into other hardware queues (eg for better PS-POLL support,
uAPSD, support, correct-er TDMA support, etc) which requires that
I tidy all of this up in preparation for then introducing further
TID scheduling that isn't linked to a hardware TXQ (likely a per-WME, per-TID
driver queue, and a per-node driver queue) to enable that.

Tested:

* AR9380, STA mode
* AR9380, AR9580, AP mode
2017-03-19 05:00:14 +00:00
Ian Lepore
3d9df27601 Remove unreferenced global function imx_gpt_get_timerfreq() and do some
cleanups enabled by that:

 - The only thing left in imx_gptvar.h was the softc, which IMO never
   should have been in there at all.  Move it into the driver, and
   delete the header file.

 - Remove several unneeded #includes from the driver.

 - Change imx_gpt_softc from global to static (it's used by DELAY()), and
   don't redundantly static-initialize it to NULL.
2017-03-19 04:03:39 +00:00
Kristof Provost
08ef4ddb0f pf: Fix rule evaluation after inet6 route-to
In pf_route6() we re-run the ruleset with PF_FWD if the packet goes out
of a different interface. pf_test6() needs to know that the packet was
forwarded (in case it needs to refragment so it knows whether to call
ip6_output() or ip6_forward()).

This lead pf_test6() to try to evaluate rules against the PF_FWD
direction, which isn't supported, so it needs to treat PF_FWD as PF_OUT.
Once fwdir is set correctly the correct output/forward function will be
called.

PR:		217883
Submitted by:	Kajetan Staszkiewicz
MFC after:	1 week
Sponsored by:	InnoGames GmbH
2017-03-19 03:06:09 +00:00
Benjamin Kaduk
2e17a50f83 Tidy up mdoc formatting for "etc.)" at end of line
man(1) has some logic to use two spaces after a full stop, which is
useful for spotting sentence breaks in monospace fonts.  However,
this logic is very simple, treating almost all '.' characters as
end-of-sentence markers, unless followed by certain other
characters.  For example, '.,' is not end-of-sentence, and neither
is ".) ", but ".)" at the end of a line triggers the sentence-end
detection.

Apply a zero-width space to a few instances of this in share/man,
and also supply a missing full stop for an instance that occurred at
the end of a sentence.

Leave untouched several instances that are at the end of a sentence
or list element.

Reported by:	0mp (ieee80211.9)
2017-03-19 01:24:18 +00:00
Eric van Gyzen
26f86ab732 Regenerate syscall files for r315526
Sponsored by:	Dell EMC
2017-03-19 00:54:24 +00:00
Eric van Gyzen
3f8455b090 Add clock_nanosleep()
Add a clock_nanosleep() syscall, as specified by POSIX.
Make nanosleep() a wrapper around it.

Attach the clock_nanosleep test from NetBSD. Adjust it for the
FreeBSD behavior of updating rmtp only when interrupted by a signal.
I believe this to be POSIX-compliant, since POSIX mentions the rmtp
parameter only in the paragraph about EINTR. This is also what
Linux does. (NetBSD updates rmtp unconditionally.)

Copy the whole nanosleep.2 man page from NetBSD because it is complete
and closely resembles the POSIX description. Edit, polish, and reword it
a bit, being sure to keep any relevant text from the FreeBSD page.

Reviewed by:	kib, ngie, jilles
MFC after:	3 weeks
Relnotes:	yes
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D10020
2017-03-19 00:51:12 +00:00
John Baldwin
a776eeafdc Improve decoding of last arguments to ioctl() and sendto().
Decode the last argument to ioctl() as a pointer rather than an int.
Eventually this could use 'int' for the _IOWINT() case and pointers for
all others.

The last argument to sendto() is a socklen_t value, not a pointer.
2017-03-19 00:36:29 +00:00
John Baldwin
98fdbeec47 Decode arguments to madvise(). 2017-03-19 00:31:21 +00:00
John Baldwin
e261fb2a5b Add a Sizet type for 'size_t' values and use it instead of Int.
Various size_t arguments were previously decoded as Int values instead
which would have truncated values above 2^31 on 64-bit systems.
2017-03-19 00:27:07 +00:00
Ed Maste
bd4e40546c use INT3 instead of NOP for x86 binary padding
We should never end up executing the inter-function padding, so we
are better off faulting than silently carrying on to whatever function
happens to be next.

Note that LLD will soon do this by default (although it currently pads
with zeros).

Reviewed by:	dim, kib
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D10047
2017-03-19 00:22:13 +00:00
Alan Cox
c547cbb49c Avoid unnecessary calls to vm_map_protect() in elf_load_section().
Typically, when elf_load_section() unconditionally passed VM_PROT_ALL to
elf_map_insert(), it was needlessly enabling execute access on the
mapping, and it would later have to call vm_map_protect() to correct the
mapping's access rights.  Now, instead, elf_load_section() always passes
its parameter "prot" to elf_map_insert().  So, elf_load_section() must
only call vm_map_protect() if it needs to remove the write access that
was temporarily granted to perform a copyout().

Reviewed by:	kib
MFC after:	1 week
2017-03-18 23:37:00 +00:00
Don Lewis
46c8aadb6f Change several constants used by the PIE algorithm from unsigned to signed.
- PIE_MAX_PROB is compared to variable of int64_t and the type promotion
   rules can cause the value of that variable to be treated as unsigned.
   If the value is actually negative, then the result of the comparsion
   is incorrect, causing the algorithm to perform poorly in some
   situations.  Changing the constant to be signed cause the comparision
   to work correctly.

 - PIE_SCALE is also compared to signed values.  Fortunately they are
   also compared to zero and negative values are discarded so this is
   more of a cosmetic fix.

 - PIE_DQ_THRESHOLD is only compared to unsigned values, but it is small
   enough that the automatic promotion to unsigned is harmless.

Submitted by:	Rasool Al-Saadi <ralsaadi@swin.edu.au>
MFC after:	1 week
2017-03-18 23:00:13 +00:00
Jilles Tjoelker
0620d81993 sh: Remove unused function declaration for arith_lex_reset().
Reported by:	Robert Elz
2017-03-18 20:41:07 +00:00
Eric van Gyzen
4cf66812ea nanosleep: plug a kernel memory disclosure
nanosleep() updates rmtp on EINVAL.  In that case, kern_nanosleep()
has not updated rmt, so sys_nanosleep() updates the user-space rmtp
by copying garbage from its stack frame.  This is not only a kernel
memory disclosure, it's also not POSIX-compliant.  Fix it to update
rmtp only on EINTR.

Reviewed by:	jilles (via D10020), dchagin
MFC after:	3 days
Security:	possibly
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D10044
2017-03-18 20:16:23 +00:00
John Baldwin
94e854c517 Decode arguments passed to kldsym() and kldunloadf().
This does not currently decode the kld_sym_lookup structure passed to
kldsym().
2017-03-18 19:59:21 +00:00
Ian Lepore
6c23d3cf76 Remove hardcoded bootverbose=1; imx53 systems boot using loader(8) and
users can set verbose if they want to.
2017-03-18 19:54:58 +00:00
Alexander Motin
87b04de6cb Reorganize RQSTYPE_NOTIFY handling for chips <= 23xx.
There were two copies of the code: one in generic code was half-broken, and
another in platform code was never called.  Leave only one in generic code
and working.

MFC after:	2 weeks
2017-03-18 19:27:16 +00:00
Dmitry Chagin
039aba0861 Glibc get_nprocs() and get_nprocs_conf() uses the sysfs cpu infrastructure
to get number of processors. Implement /sys/devices/system/cpu/.

MFC after:	1 month
2017-03-18 18:38:12 +00:00
Dmitry Chagin
b1ba0846f1 Implement getrandom() syscall.
Note. GRND_RANDOM option is not supported for now.

MFC after:	1 month
2017-03-18 18:34:29 +00:00
John Baldwin
ab43bedcce Decode arguments passed to getfsstat().
Note that this does not yet decode the statfs structures returned by
getfsstat().
2017-03-18 18:31:45 +00:00
Dmitry Chagin
cd92d27e16 As noted by Roel Bouwman Linux allows a large buffer size than the
struct ucred size. Fix this.

PR:		102956
Reported by:	Roel Bouwman <roel at qsp nl>
MFC after:	1 week
2017-03-18 18:31:04 +00:00
John Baldwin
dd92181f60 Decode flock() operation. 2017-03-18 18:26:56 +00:00
Dmitry Chagin
857129394d To reduce code duplication move socket defines to the MI path.
MFC after:	1 week
2017-03-18 18:23:30 +00:00
John Baldwin
27459358ed Decode file flags passed to *chflags*().
While here, decode arguments passed to fchflags() and chflagsat().
2017-03-18 18:21:41 +00:00
Dmitry Chagin
54ec725bf3 Remove superflous break statment.
MFC after:	1 week
2017-03-18 18:19:31 +00:00
Dmitry Chagin
bd597911b2 Check for negative nanoseconds.
Linux do that in timespec_valid().

Reported by:	vangyzen@
MFC after:	1 week
2017-03-18 18:14:17 +00:00
John Baldwin
d2a9748593 Decode arguments passed to posix_fadvise(). 2017-03-18 18:12:09 +00:00