Commit Graph

242263 Commits

Author SHA1 Message Date
Ed Maste
fd0e3f7c98 vtfontcvt: improve .bdf verification
Previously we would crash if the BBX y-offset was outside of the font
bounding box.

Reported by:	afl
MFC with:	r349100
Event:		Berlin Devsummit 2019
Sponsored by:	The FreeBSD Foundation
2019-06-16 13:35:53 +00:00
Ed Maste
c6e475ff5a allow vt(4) fonts to be built from .bdf files
vtfontcvt(8) can convert both .bdf and .hex inputs to binary vt(4) .fnt
files.

Event:		Berlin Devsummit 2019
Sponsored by:	The FreeBSD Foundation
2019-06-16 12:44:49 +00:00
Ed Maste
0f17b429d0 vtfontcvt: initialize another variable to quiet GCC warning
I believe this case could be triggered by a broken .bdf font.

PR:		205707
Reported by:	ci.freebsd.org
MFC with:	349100
Event:		Berlin Devsummit 2019
Sponsored by:	The FreeBSD Foundation
2019-06-16 12:26:46 +00:00
Rene Ladan
0026fec57d Differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases.
Currently APLHA packages are treated as CURRENT or STABLE versions,
resulting in e.g. 13.0.s20190615125609. This version number is indeed
different from the next version number but ALPHA2 would be nicer IMO.

For the BETA, PRERELEASE and RC phases the packages are versioned the
same as for releases, so 11.3-BETA1 is 11.3 and so is 11.3-RC1, meaning
that pkg cannot easiliy upgrade from the former the next. This happened
on my Raspberry Pi which runs pkgbase.

Submitted by:	rene
Approved by:	manu
Event:		Berlin hackathon 2019
Differential Revision:	https://reviews.freebsd.org/D20651
2019-06-16 11:53:22 +00:00
Ed Maste
ff31ddeb11 vtfontcvt: initialize bbwbytes to avoid GCC 4.2.1 uninitialized warning
PR:		205707
MFC with:	349100
Event:		Berlin Devsummit 2019
Sponsored by:	The FreeBSD Foundation
2019-06-16 10:43:18 +00:00
Ed Maste
3bd2e9a54e vtfontcvt: improve BDF and hex font parsing
Support larger font sizes.

PR:		205707
Submitted by:	Dmitry Wagin (original version)
MFC after:	2 weeks
Event:		Berlin Devsummit 2019
Differential Revision:	https://reviews.freebsd.org/D20650
2019-06-16 09:17:26 +00:00
Bryan Drewery
15a04cec78 symlinkat(2) is not covered. 2019-06-16 05:12:17 +00:00
Philip Paeps
5a037b1197 Add macOS-like three finger drag trackpad gesture to psm(4)
Submitted by:	Yan Ka Chiu <nyan@myuji.xyz>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D20648
2019-06-16 03:06:05 +00:00
Ian Lepore
6e14f601aa Build SoC-specific modules with GENERIC for the SoCs that have them. 2019-06-16 01:23:45 +00:00
Ian Lepore
b9f654b163 Add module makefiles for Texas Instruments ARM SoCs.
The natural place to look for them based on how other SoCs are organized
would be sys/modules/ti, but that's already taken.  Drop a clue into
modules/ti/Makefile directing people to modules/arm_ti if they're looking
for ARM modules.
2019-06-16 01:22:44 +00:00
Ian Lepore
5935e64693 Split the dtb MODULES_EXTRA line to a series of += lines, making it easier
to maintain and keep in alphabetical order, and paving the way for adding
some other modules that aren't dtb-related.
2019-06-16 01:05:53 +00:00
Ian Lepore
e108c3df04 Add module makefiles for pwm. 2019-06-16 00:53:09 +00:00
Ian Lepore
e3384e8c44 This code no longer uses fdt/ofw stuff, no need to include ofw headers. 2019-06-16 00:43:05 +00:00
Ian Lepore
09ebe549ae Make channel number unsigned, and spell unsigned int u_int. This should
have been part of r349088.
2019-06-16 00:32:19 +00:00
Ian Lepore
aee0e20139 The pwm interface was replaced with pwmbus, include the right header file. 2019-06-16 00:27:11 +00:00
Ian Lepore
6cdbe2bf20 Make pwm channel numbers unsigned. 2019-06-15 23:02:09 +00:00
Ian Lepore
f8f8d87cd9 Restructure the pwm device hirearchy and interfaces.
The pwm and pwmbus interfaces were nearly identical, this merges them into a
single pwmbus interface.  The pwmbus driver now implements the pwmbus
interface by simply passing all calls through to its parent (the hardware
driver).  The channel_count method moves from pwm to pwmbus, and the
get_bus method is deleted (just no longer needed).

The net effect is that the interface for doing pwm stuff is now the same
regardless of whether you're a child of pwmbus, or some random driver
elsewhere in the hierarchy that is bypassing the pwmbus layer and is talking
directly to the hardware driver via cross-hierarchy connections established
using fdt data.

The pwmc driver is now a child of pwmbus, instead of being its sibling
(that's why the get_bus method is no longer needed; pwmc now gets the
device_t of the bus using device_get_parent()).
2019-06-15 22:25:39 +00:00
Ian Lepore
6bb8042535 Destroy the cdev on device detach. Also, make the driver and devclass
static, because nothing outside this file needs them.
2019-06-15 21:51:55 +00:00
Ian Lepore
9878710395 Rename the channel_max method to channel_count, because that's what it's
returning.  (If the channel count is 2, then the max channel number is 1.)
2019-06-15 21:36:14 +00:00
Ian Lepore
47e17a1b1a Give the aw_pwm driver a module version. 2019-06-15 21:31:04 +00:00
Ian Lepore
59d8a61ca7 Spell unsigned int as u_int and channel as chan; eliminates the need to wrap
some long lines.
2019-06-15 21:19:23 +00:00
Ian Lepore
cd6e47c168 Unwrap prototype lines so that return type and function name are on the
same line.  No functional changes.
2019-06-15 20:54:33 +00:00
Ian Lepore
968e5efcca Make pwmbus driver and devclass vars static; they're not mentioned in any
header file, so they can't be used outside this file anyway.
2019-06-15 20:53:26 +00:00
Ian Lepore
2d5913e4f4 Add a missing #include. I suspect this used to get included via some header
pollution that was cleaned up recently, and this file got missed in the
cleanup because it's not attached to the build unless you specifically
request this device in a custom kernel config.
2019-06-15 20:20:36 +00:00
Ian Lepore
1e76aee880 Use device_delete_children() instead of a locally-rolled copy of it that
leaks the device-list memory.
2019-06-15 20:17:00 +00:00
Ian Lepore
3cee44bc88 Remove pwmbus_attach_bus(), it no longer has any callers. Also remove a
couple prototypes for functions that never existed (and never will).
2019-06-15 20:13:42 +00:00
Ian Lepore
71fb373934 Move/rename the sys/pwm.h header file to dev/pwm/pwmc.h. The file contains
ioctl definitions and related datatypes that allow userland control of pwm
hardware via the pwmc device.  The new name and location better reflects its
assocation with a single device driver.
2019-06-15 19:46:59 +00:00
Ian Lepore
f9d8090ea8 Do not include pwm.h here, it is purely a userland interface file containing
ioctl defintions for the pwmc driver. It is not part of the pwmbus interface.
2019-06-15 19:43:33 +00:00
Ian Lepore
e7654ccbd6 Remove pcf8563reg.h, the driver it was associated with was replaced in 2017
with the nxprtc multi-chip driver.
2019-06-15 19:16:02 +00:00
Alan Cox
3b97569c31 Previously, when pmap_remove_pages() destroyed a dirty superpage mapping,
it only called vm_page_dirty() on the first of the superpage's constituent
4KB pages.  This revision corrects that error, calling vm_page_dirty() on
all of superpage's constituent 4KB pages.

MFC after:	3 days
2019-06-15 17:26:42 +00:00
Bryan Drewery
35c12dd688 csu: Add proper .depend tracking for each object.
This doesn't appear to have ever worked. After a .depend is generated
there will be duplicate .c dependencies so only use the first one.

MFC after:	2 weeks
Sponsored by:	DellEMC
2019-06-15 17:08:39 +00:00
Bryan Drewery
ee4eeb3213 Allow DEPENDOBJS/DEPENDSRCS to work with only OBJS set and no SRCS.
Default to tracking .depend.* for OBJS rather than SRCS.

This helps cover some special case builds like gnu/lib/csu which
do more of a PROGS-like thing with bsd.prog.mk.

It is possible this causes out-of-tree Makefiles to have problems if they use
this pattern:
	foo.o: foo.c
		${CC} -o ${.TARGET} ${.ALLSRC}
This may cause multiple source files to be compiled due to finding the
'foo.o: foo.c' dependency both in the Makefile at the .depend file. Or
it may try compiling headers. This can be worked around by either of these:
	foo.o: foo.c
		${CC} -o ${.TARGET} ${.ALLSRC:N*.h:[1]}
Or
	foo.o: foo.c
		${CC} -o ${.TARGET} ${.CURDIR}/foo.c
In the latter case the ${.CURDIR} may need to be a different path. The
first case covers automatically using .PATH.

Sponsored by:	DellEMC
2019-06-15 17:08:35 +00:00
Bryan Drewery
dcf1f83876 Support reading in .depend files.
This is for an upcoming change that fixes .depend handling in here.
It will cause some duplicate sources which need to be trimmed out.

MFC after:	2 weeks
Sponsored by:	DellEMC
2019-06-15 17:08:32 +00:00
Bryan Drewery
9e0a1e78e5 META_MODE: Delete build targets that fail.
If a meta mode change is triggered but then the build fails then the
next build will not retrigger meta mode. This only prevented by
removing the target on rebuild or on the failure to rebuild.

Sponsored by:	DellEMC
2019-06-15 17:08:28 +00:00
Bryan Drewery
48da57b47f Add various CFLAGS/LDADD overrides for the output target file.
Sponsored by:	DellEMC
2019-06-15 17:08:24 +00:00
Bryan Drewery
3d04f5a9c4 Avoid generating DEPENDFILES='.depend.' when there's no DEPENDOBJS.
MFC after:	2 weeks
Sponsored by:	DellEMC
2019-06-15 17:08:21 +00:00
Bryan Drewery
05f8fb1fab Similar to r335710 avoid ccache when linking a .cc file directly.
Sponsored by:	DellEMC
2019-06-15 17:08:18 +00:00
Bryan Drewery
c63c5ab001 Fix .depend files to work for build tools.
This is somewhat of a follow-up to r335746.

MFC after:	2 weeks
Sponsored by:	DellEMC
2019-06-15 17:08:13 +00:00
Bryan Drewery
f39f6a562e Don't force OBJS_DEPEND_GUESS headers onto all objects.
This is in the case of not having any .depend.foo.o yet.  Don't force add *.h
as a dependency for those. They are built in beforebuild already when in
SRCS/DPSRCS.

This change allows custom rules, like in bin/sh/Makefile for mksyntax, to not
have cyclic dependency problems when connected to the .depend.* handling.

This is purposely not copied to sys/conf/kern.post.mk as it handles
generating headers slightly differently.

MFC after:	2 weeks
Sponsored by:	DellEMC
2019-06-15 17:08:02 +00:00
Ian Lepore
4d7ef8a2be Handle failure to enable the clock or obtain its frequency. 2019-06-15 16:59:03 +00:00
Ian Lepore
1bf4afc527 Don't call pwmbus_attach_bus(), because it may not be present if this
driver is compiled into the kernel but pwmbus will be loaded as a module
when needed (and because of that, pwmbus_attach_bus() is going away in
the near future).  Instead, just directly do what that function did:
register the fdt xfef handle, and attach the pwmbus.
2019-06-15 16:56:00 +00:00
Ian Lepore
5ef9c1079e In detach(), check for failure of bus_generic_detach(), only release
resources if they got allocated (because detach() gets called from attach()
to handle various failures), and delete the pwmbus child if it got created.
2019-06-15 16:36:29 +00:00
Ian Lepore
dd47326c82 Allow pwm(9) components to be selected individually, while 'device pwm'
still includes it all.
2019-06-15 16:16:29 +00:00
Mateusz Piotrowski
966b76b496 netmap.4: Fix a typo as FreeBSD Linux is not a thing
Approved by:	src (emaste)
Event:		Berlin Devsummit 2019
2019-06-15 12:09:22 +00:00
Marius Strobl
d49e83eac3 - Replace unused and only ever written to members of public iflib(9)
structs with placeholders (in the latter case, IFLIB_MAX_TX_BYTES
  etc. are also only ever used for these write-only members if at all,
  so both these macros and members can just go). Using these spares
  may render it possible to merge certain iflib(9) fixes to stable/12.
  Otherwise, changes extending struct if_irq or struct if_shared_ctx
  in any way would break KBI as instances of these are allocated by
  the driver front-ends (by contrast, struct if_pkt_info as well as
  struct if_softc_ctx instances are provided by iflib(9) and, thus,
  may grow at least at the end without breaking KBI).
- Make the pvi_name in struct pci_vendor_info const char * as device
  identifiers in hardware lookup tables aren't to be expected to ever
  change at runtime.
- Similarly, make the pci_vendor_info_t of struct if_shared_ctx which
  is used to point to the struct pci_vendor_info arrays provided by
  the driver front-ends const.
- Remove the ETH_ADDR_LEN macro from iflib.h; this was duplicating
  ETHER_ADDR_LEN of <net/ethernet.h> with iflib(9) actually only
  consuming the latter macro.
- Make the name argument of iflib_io_tqg_attach(9) const, matching
  the taskqgroup_attach_cpu(9) this function wraps as well as e. g.
  iflib_config_gtask_init(9).
- Remove the orphaned iflib_qset_lock_get() prototype.
- Remove some extraneous empty lines.
2019-06-15 11:07:41 +00:00
Marius Strobl
c36f427632 Add <sys/dnv.h> required for libnv to SYSINCS, too, apparently missed
in r336335.
2019-06-15 09:45:00 +00:00
Ed Maste
cfe607d5bf vtfontcvt: add comments in add_glyph
During review for PR 205707.

Event:		Berlin Devsummit 2019
2019-06-15 09:15:58 +00:00
Xin LI
0b253f2ba4 In ask(): override default option if any of alwaysyes/alwaysno/rdonly is
set.

MFC after:	2 weeks
2019-06-15 07:23:06 +00:00
Xin LI
1e3ffe6590 Blankspace. No actual code change.
MFC after:	2 weeks
2019-06-15 06:51:46 +00:00
Doug Moore
4766eba1df Critical comments were lost in r349203. This patch seeks to restore
the lost information in new comments.

Reported by: alc
Reviewed by: alc
Approved by: kib (mentor)
Differential Revision: https://reviews.freebsd.org/D20632
2019-06-15 04:30:13 +00:00