Commit Graph

228621 Commits

Author SHA1 Message Date
Pedro F. Giffuni
91fb056ed6 SPDX: Fix some License ID tags for libc. 2017-12-27 21:21:03 +00:00
Stephen Hurd
9c58cafaa3 Don't pass rids to taskqgroup_attach()
As everywhere else, we want to pass rman_get_start(irq->ii_res).  This
caused set affinity errors when not using MSI-X vectors (legacy and MSI
interrupts).

Reported by:	sbruno
Sponsored by:	Limelight Networks
2017-12-27 20:42:30 +00:00
Warner Losh
f77a6187eb Use strl* here too.
CID: 1383969
2017-12-27 20:33:37 +00:00
Pedro F. Giffuni
3a7c4a1c83 ccdconfig: Update licensing terms.
The code originate in NetBSD and there are the copyright notes have been
assigned to the NetBSD Foundation. Update the files up to the point where
we started diverging.

Further relaxation of the licensing terms are possible after we
check the NetBSD updates, and contact the local authors.

In the case of ccdconfig.8 this reinstates the 3rd clause but since the
code is not directly from Berkeley, the change was bogus.

Obtained from:	NetBSD
2017-12-27 20:09:50 +00:00
Stephen Hurd
ca03863c85 Remove assertion that's not true for !EARLY_AP_STARTUP
gtask->gt_taskqueue is NULL when EARLY_AP_STARTUP is not enabled.
Remove assertion to allow this config to work.

Reported by:	oleg
Sponsored by:	Limelight Networks
2017-12-27 19:14:15 +00:00
Pedro F. Giffuni
51268c3852 SPDX: Complete License ID tags for UFS. 2017-12-27 19:13:50 +00:00
Stephen Hurd
de13095409 Fix indentation.
Sponsored by:	Limelight Networks
2017-12-27 19:12:32 +00:00
Warner Losh
3888260471 Fix a bunch of issues (and a few non-issues but appeasement is easier
than arguing) Coverity found:

o Use open + fstat rather than stat + open to avoid any races for a
  file that's static for the life of the system. This will prevent any
  problems should someone insert a new device while installing a
  kernel in the future.
o Use strlcpy instead of strcpy as a failsafe to knowing that the
  strings can't possibly be larger than the buffer due to data
  source limits (though in the future these limits might be more
  dynamic).
o If we can't find the hints file, return rather than dereference
  a NULL pointer.
o Check for lastmod before calling strcmp in case a PNP entry
  comes before a module entry. That's not allowed, but within the
  realm of crazy things programmers do.
o Free lastmod before exiting search_hints() to avoid a leak.

CID: 1383971, 1383970, 1383969, 1383965, 1383963, 1383960
2017-12-27 18:30:24 +00:00
Kyle Evans
858f246615 if_awg: Respect rgmii-*id PHY configurations
phy-mode can be one of: rgmii, rgmii-id, rgmii-txid, rgmii-rxid; as this was
written, any of these alternate -id configurations would break as we fail to
configure syscon for rgmii. Instead, simply check that phy-mode is
configured for rgmii and we'll let the PHY driver handle any internal delay
configuration.

The pine64 should eventually specify phy-mode = "rgmii-txid" to address
gigabit issues when rx delay is configured, motivating this change.
2017-12-27 18:22:02 +00:00
Emmanuel Vadot
8e3f1dcf54 ctl: Correct comment in ctl_worker_thread
The incoming queue is handled before the RtR one.
No functional change.

MFC after:	3 days
2017-12-27 15:39:31 +00:00
Xin LI
a9a7c8c0a1 Replace send-mail with the more standarized sendmail, we do not create
links for send-mail in mailwrapper so it did not work anyway.

MFC after:	2 weeks
2017-12-27 06:23:50 +00:00
Xin LI
197d53b7d1 Don't initialize lastlong before assigning it.
MFC after:	2 weeks
2017-12-27 05:59:47 +00:00
Eitan Adler
9914452050 other: Fix several typos and minor errors
- duplicate words
- typos
- references to old versions of FreeBSD

Reviewed by:	imp, benno
2017-12-27 03:23:58 +00:00
Eitan Adler
d52a982ea8 lib: Fix several typos and minor errors
- duplicate words
- typos
- references to old versions of FreeBSD

Reviewed by:	imp, benno
2017-12-27 03:23:41 +00:00
Eitan Adler
caa7e52f3f kernel: Fix several typos and minor errors
- duplicate words
- typos
- references to old versions of FreeBSD

Reviewed by:	imp, benno
2017-12-27 03:23:21 +00:00
Eitan Adler
dae3a64fb9 userland: Fix several typos and minor errors
- duplicate words
- typos
- references to old versions of FreeBSD

Reviewed by:	imp, benno
2017-12-27 03:23:01 +00:00
Kirk McKusick
6a3fe71314 Missing disk close in libufs. 2017-12-26 23:16:11 +00:00
Ian Lepore
45ab79431b Add a section describing how to tune ARM kernel options to use an MD_ROOT
filesystem larger than about 50-55 MiB.

The description of VM_KMEM_SIZE_SCALE is roughly as hand-wavy as my
understanding of the option, but at least mentioning that it's a factor
and giving an empirical datapoint that works will give folks some idea
of what to tweak if they have problems.
2017-12-26 22:05:55 +00:00
Michael Zhilin
ebff39fb9b [mips] fix compilation of TP-WN1043ND kernel configuration
This compilation issue has been found thanks to freebsd-wifi-build:
 - gpioiic requires "gpio_if.h", so "device gpio" is mandatory
 - rtl8366rb works over MDIO interface, so "device mdio" is mandatory

Compilation is checked on FreeBSD 12-CURRENT machine.
2017-12-26 19:50:23 +00:00
Ian Lepore
513581749b Add a new ARM kernel option, LOCORE_MAP_MB, to control the size of the
kernel VA mapping in the temporary page tables set up by locore-v6.S.

The number used to be hard-coded to 64MB, which is still the default if
the kernel option is not specified.  However, 64MB is insufficient for
using a large mdroot filesystem.  The hard-coded number can't be safely
increased because too large a number may run into memory-mapped IO space
on some SoCs that must not be mapped as ordinary memory.
2017-12-26 19:02:56 +00:00
Ian Lepore
004b0e1ba9 Complete the changing of the old "i2c-address" property to the modern "reg"
property by updating the description text to match the updated example.

This should have been part of r327220
2017-12-26 18:42:29 +00:00
Ian Lepore
685f2b87ab Update the FDT example for the lm75 sensor to match current devicetree
standards and what the existing driver expects.

Also change 'like' to 'such as' where the text is providing an example
rather than a simile.
2017-12-26 18:34:07 +00:00
Ed Maste
7003cfb386 readelf: report byte size for DT_PREINIT_ARRAYSZ
Sponsored by:	The FreeBSD Foundation
2017-12-26 18:10:34 +00:00
Alan Cox
fec296887f Refactor vm_map_find(), creating a separate function, vm_map_alignspace(),
for finding aligned free space in the given map.  With this change, we
always return KERN_NO_SPACE when we fail to find free space.  Whereas,
previously, we might return KERN_INVALID_ADDRESS.  Also, with this change,
we explicitly check for address wrap, rather than relying upon the map's
min and max addresses to establish sentinel-like regions.

This refactoring was inspired by the problem that we addressed in r326098.

Reviewed by:	kib
Tested by:	pho
Discussed with:	markj
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D13346
2017-12-26 17:59:37 +00:00
Emmanuel Vadot
1f33276ab5 man4: Move back allwinner man page to share/man/man4
But only install them for arm or aarch64 since they are used on both arch.
2017-12-26 16:50:49 +00:00
Kyle Evans
198ca831a1 extres/syscon: Commit missing bits from r327106
r327106 introduced kobj to syscon so it can be subclassed and fit in with
the rest of the syscon framework. The diff for syscon.c was misapplied in a
clean tree prior to commit, so bring it back to what was included in the
review and tested. The entire file has basically been rewritten from what
was present prior to the kobj work.

Pointy hat to:	me
2017-12-26 16:38:04 +00:00
Michael Tuexen
fa5867cbd6 White cleanups. 2017-12-26 16:33:55 +00:00
Mark Johnston
65ef323137 Ensure that pass > 0 when starting a scan with vm_pages_needed == 1.
Otherwise the page daemon will not reclaim pages and thus will not
wake threads sleeping in VM_WAIT.

Reported and tested by:	pho
Reviewed by:	alc, kib
X-MFC with:	r327168
Differential Revision:	https://reviews.freebsd.org/D13640
2017-12-26 16:29:39 +00:00
Jilles Tjoelker
c8a5f66527 sh: Don't leak wait* implementation details from jobs.c 2017-12-26 16:23:18 +00:00
Jilles Tjoelker
2fe0ea7324 nandtool: Add missing mode for open() with O_CREAT
If O_CREAT is given, open() needs a mode argument. Follow the umask by
passing 0666.

Reviewed by:	imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D13607
2017-12-26 16:20:38 +00:00
Emmanuel Vadot
ce3eafc4a5 Move arm specific man page to man4.arm subfolder
Reported by:	ian
2017-12-26 16:13:20 +00:00
Michael Tuexen
f34a628e7e Clearify CID 1008197.
MFC after:	3 days
2017-12-26 16:12:04 +00:00
Michael Tuexen
0460135495 Clearify issue reported in CID 1008198.
MFC after:	3 days
2017-12-26 16:06:11 +00:00
Emmanuel Vadot
99de54f18a arm64: a10_gpio.c and a10_mmc.c were renamed aw_gpio.c and aw_mmc.c 2017-12-26 15:35:19 +00:00
Michael Tuexen
f6ea123171 Fix CID 1008428.
MFC after:	1 week
2017-12-26 15:29:11 +00:00
Michael Tuexen
4830aee72f Fix CID 1008936. 2017-12-26 15:24:42 +00:00
Michael Tuexen
c9256941d0 Allow the first (and second) argument of sn_calloc() be a sum.
This fixes a bug reported in
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224103
PR:		224103
2017-12-26 14:37:47 +00:00
Emmanuel Vadot
4f96b2503d arm: a10_gpio.c was renamed aw_gpio.c
While here order files in files.allwinner
2017-12-26 14:34:38 +00:00
Michael Tuexen
cd90150413 When adding support for sending SCTP packets containing an ABORT chunk
to ipfw in https://svnweb.freebsd.org/changeset/base/326233,
a dependency on the SCTP stack was added to ipfw by accident.

This was noted by Kevel Bowling in https://reviews.freebsd.org/D13594
where also a solution was suggested. This patch is based on Kevin's
suggestion, but implements the required SCTP checksum computation
without any dependency on other SCTP sources.

While there, do some cleanups and improve comments.

Thanks to Kevin Kevin Browling for reporting the issue and suggesting
a fix.
2017-12-26 12:35:02 +00:00
Emmanuel Vadot
81b5c8ff8d Allwinner: gpio: Rename driver to aw_gpio and add man page for it
Reviewed by:	bcr (manpages)
Differential Revision:	https://reviews.freebsd.org/D13617
2017-12-26 12:11:04 +00:00
Emmanuel Vadot
b5be541f1d Allwinner: mmc: Rename driver to aw_mmc and add a man page for it
Reviewed by:	bcr (manpages)
Differential Revision:	https://reviews.freebsd.org/D13616
2017-12-26 12:06:56 +00:00
Emmanuel Vadot
bc5719c817 aw_rtc.4: Correct some error/style found by mandoc -Tlint 2017-12-26 10:59:54 +00:00
Warner Losh
d383021fa7 Fix typo 2017-12-26 04:07:18 +00:00
Emmanuel Vadot
8bef6873e5 aw_rsb.4: Remove useless .Re 2017-12-25 23:01:09 +00:00
Emmanuel Vadot
b6d40d9394 Change the remaining files using my personnal email address to my freebsd one 2017-12-25 22:09:25 +00:00
Eitan Adler
15e8779b1b .git*: add gitattributes and gitignore
For users of the git mirrors, lets provide useful git configuration
files.
2017-12-25 21:07:54 +00:00
Poul-Henning Kamp
8ba749fbe3 Introduce an architecture-agnostic <sys/_stdarg.h> to reduce
platform divergence.

Only architectures which pass arguments in registers (mips)
and platforms which use really weird compilers (any?) would
need to augment the contents of <sys/_stdarg.h>

Convert x86, arm and arm64 architectures to use <sys/_stdarg.h>
2017-12-25 20:54:00 +00:00
Eitan Adler
2b3b473696 fsync(3): correctly document return values
In r268924 the behavior of fflush was changed to return success
on read only streams. Document this.

Reported by:	zrj@DragonFlyBSD.org
2017-12-25 19:49:05 +00:00
Emmanuel Vadot
96e286a7f8 aw_rtc: Add man page for this driver
Reviewed by:	bcr
Differential Revision:	https://reviews.freebsd.org/D13621
2017-12-25 19:42:04 +00:00
Alan Cox
115423761e Make the vm object bypass and collapse counters per CPU.
Requested by:	mjg
Reviewed by:	kib, markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D13611
2017-12-25 19:36:04 +00:00