openbsd
6 years agoPass a FILE * instead of a file descriptor into load_user() and
millert [Mon, 5 Feb 2018 03:52:37 +0000 (03:52 +0000)]
Pass a FILE * instead of a file descriptor into load_user() and
perform the fclose() in process_crontab().  Previously we were
closing the crontab fd twice--once in load_user() via fclose() and
once in process_crontab().  OK tb@

6 years agoimplement an arp filter
henning [Mon, 5 Feb 2018 03:51:53 +0000 (03:51 +0000)]
implement an arp filter
allows arp (and rarp) requests and replies to be matched, including matching
based on the source and target host and protocol adresses, and thus control
over arp traffic and learning.
written for medical x-ray machines, but useful in many spread out L2 networks
ok claudio benno

6 years agosync
deraadt [Mon, 5 Feb 2018 03:35:09 +0000 (03:35 +0000)]
sync

6 years agoCKSUM_DIGEST_STRING_LENGTH bounding didn't include full range of size_t
deraadt [Mon, 5 Feb 2018 03:16:10 +0000 (03:16 +0000)]
CKSUM_DIGEST_STRING_LENGTH bounding didn't include full range of size_t
and NUL
ok millert krw tb

6 years agoDo not bother NULLing pointers in memory that is freed immediately after.
jsing [Mon, 5 Feb 2018 01:47:03 +0000 (01:47 +0000)]
Do not bother NULLing pointers in memory that is freed immediately after.

6 years agoAdd a comment why it is OK to set the tableid to 0 for Adj-RIB-In/Out.
claudio [Mon, 5 Feb 2018 01:42:40 +0000 (01:42 +0000)]
Add a comment why it is OK to set the tableid to 0 for Adj-RIB-In/Out.
Requested by henning@

6 years agoprefix check must be last because the prefixlen check does an immediate return.
claudio [Mon, 5 Feb 2018 01:36:45 +0000 (01:36 +0000)]
prefix check must be last because the prefixlen check does an immediate return.
This will be rewritten soon so just do the quick fix now.
Found and OK benno@

6 years agoBe consistent with the goto label names used in libtls code.
jsing [Mon, 5 Feb 2018 00:52:24 +0000 (00:52 +0000)]
Be consistent with the goto label names used in libtls code.

No change to generated assembly.

6 years agouse sizeof, rather than the constant. on change in binary.
deraadt [Sun, 4 Feb 2018 22:09:33 +0000 (22:09 +0000)]
use sizeof, rather than the constant.  on change in binary.

6 years agorepair ugly indents
deraadt [Sun, 4 Feb 2018 21:53:54 +0000 (21:53 +0000)]
repair ugly indents

6 years agoDon't assume that we use LLVM's ld(1) if we use clang(1) as main system
patrick [Sun, 4 Feb 2018 21:11:32 +0000 (21:11 +0000)]
Don't assume that we use LLVM's ld(1) if we use clang(1) as main system
compiler.  Only handle this case when LLD was actually installed during
the cross-compiler setup.  Unbreaks armv7 after switching to clang since
it uses binutils' ld(1).

6 years agoExpand Type strings by one space, to fit ld.so, in the same ugly way "exe "
deraadt [Sun, 4 Feb 2018 20:41:58 +0000 (20:41 +0000)]
Expand Type strings by one space, to fit ld.so, in the same ugly way "exe "
was being handled.

6 years agoDocument the compat-mode settings.
bru [Sun, 4 Feb 2018 20:29:59 +0000 (20:29 +0000)]
Document the compat-mode settings.

Thanks to Ingo for his help.

ok schwarze@

6 years agoUpstream ncurses has introduced terminfo capabilities to specify RGB
nicm [Sun, 4 Feb 2018 10:10:39 +0000 (10:10 +0000)]
Upstream ncurses has introduced terminfo capabilities to specify RGB
colour ("true" or "direct" colour). These consist of new entries (such
as "xterm-direct") which have a different setaf/setab implementation,
colors and pairs set to 0x1000000 and 0x10000, and a new RGB flag.

The setaf/setab definitions seem to be geared towards what ncurses (or
emacs maybe) needs, in that the new versions do only ANSI and RGB
colours (they can't be used for the 256 colour palette); they rely on
the silly ISO colon-separated version of SGR; and they use a weird
multiplication scheme so they still only need one argument. The higher
values of colors and pairs require a recent ncurses to parse.

tmux can use the RGB flag to detect RGB colour support (keeping the old
Tc extension for backwards compatibility for now). However, as we still
want to send 256 colour information unchanged when possible, the new
setaf/setab are awkward. So when RGB is present, reserve setaf/setab
only for ANSI colours and use the escape sequences directly for 256 and
RGB colours. (To my knowledge no recent terminal uses unusual escape
sequences for these in any case.)

6 years agoDocument 802.11ac media types and fix docs for the 11n ones while here.
stsp [Sun, 4 Feb 2018 10:09:02 +0000 (10:09 +0000)]
Document 802.11ac media types and fix docs for the 11n ones while here.
suggested by and ok jmc@

6 years agoAdd media types for 802.11 AC.
stsp [Sun, 4 Feb 2018 10:06:51 +0000 (10:06 +0000)]
Add media types for 802.11 AC.
The first driver to make use of these will probably be bwfm(4).
typos spotted by and ok phessler kettenis

6 years agoClenaup RIB handling in the RDE. Introduce some defines for Adj-RIB-In and
claudio [Sun, 4 Feb 2018 05:08:16 +0000 (05:08 +0000)]
Clenaup RIB handling in the RDE. Introduce some defines for Adj-RIB-In and
Adj-RIB-Out and use them consistently. Makes code easier to read.
OK benno@

6 years agofprintf(stderr -> warnx
cheloha [Sun, 4 Feb 2018 04:28:41 +0000 (04:28 +0000)]
fprintf(stderr -> warnx

ok jca@ tb@

6 years agoPrint strtonum(3)-style error messages on invalid numeric input.
cheloha [Sun, 4 Feb 2018 02:18:15 +0000 (02:18 +0000)]
Print strtonum(3)-style error messages on invalid numeric input.

More informative than the usage message.

While here, no need to return EINVAL: just return 1 if we overflow.

ok jca@ schwarze@

6 years agoRemove a pointless assignment introduced in previous commit.
stsp [Sat, 3 Feb 2018 17:17:31 +0000 (17:17 +0000)]
Remove a pointless assignment introduced in previous commit.
CID 1464695; pointed out to me by mikeb@

6 years agoSince tcp_attach() has moved to a separate protocol function, the
bluhm [Sat, 3 Feb 2018 16:14:26 +0000 (16:14 +0000)]
Since tcp_attach() has moved to a separate protocol function, the
inp cannot be NULL.  Remove the useless if in tcp_usrreq().
OK mpi@

6 years agoThe recover script should have the same sanity checks as recover.c.
millert [Sat, 3 Feb 2018 15:44:36 +0000 (15:44 +0000)]
The recover script should have the same sanity checks as recover.c.
Specifically, open files with O_NONBLOCK and enforce a mode of 0600.

6 years agoSimple USBPcap parser for tcpdump(8). Raw dumps can be nicely analysed
mpi [Sat, 3 Feb 2018 13:39:48 +0000 (13:39 +0000)]
Simple USBPcap parser for tcpdump(8).  Raw dumps can be nicely analysed
in wireshark.

ok deraadt@, dlg@

6 years agoAdd support for dumping USB transfers via bpf(4) using USBPcap headers.
mpi [Sat, 3 Feb 2018 13:37:37 +0000 (13:37 +0000)]
Add support for dumping USB transfers via bpf(4) using USBPcap headers.

ok deraadt@, dlg@

6 years agoTests were incorrect.
mpi [Sat, 3 Feb 2018 13:09:32 +0000 (13:09 +0000)]
Tests were incorrect.

6 years agoregen
florian [Sat, 3 Feb 2018 11:04:01 +0000 (11:04 +0000)]
regen

6 years agoUpdate nsd to 4.1.19.
florian [Sat, 3 Feb 2018 11:03:51 +0000 (11:03 +0000)]
Update nsd to 4.1.19.

OK sthen@, "so far so good" millert@

Obligatory commit from 33,000 ft.

6 years agoIn ether_input() use goto dropanyway instead of repeating m_freem()
bluhm [Fri, 2 Feb 2018 22:00:39 +0000 (22:00 +0000)]
In ether_input() use goto dropanyway instead of repeating m_freem()
and return.  Change sizeof(etherbroadcastaddr) to ETHER_ADDR_LEN
for consistency.
from Michele Curti

6 years agoExtend range for seconds from 100 million to upper bound of time_t.
cheloha [Fri, 2 Feb 2018 16:46:37 +0000 (16:46 +0000)]
Extend range for seconds from 100 million to upper bound of time_t.

Makes us compliant with POSIX.1-2008, which requires that sleep(1) support
up to 2147483647 seconds.

Bounced off of tb@ and jca@.

ok tb@ millert@ jca@

6 years agoFix 'show ip bgp detail as' error.
job [Fri, 2 Feb 2018 13:46:17 +0000 (13:46 +0000)]
Fix 'show ip bgp detail as' error.

Thanks Pierre Emeriaud <petrus.lt+openbsd@gmail.com>!

6 years agoMake 'ifconfig if0 wpaakms 802.1x' implicitly enable WPA.
stsp [Fri, 2 Feb 2018 13:39:52 +0000 (13:39 +0000)]
Make 'ifconfig if0 wpaakms 802.1x' implicitly enable WPA.
Requring WPA to be enabled separately via 'ifconfig if0 wpa' was confusing.
ok mlarkin phessler mpi

6 years agouse the same bar used to determine memory type when mapping memory
jsg [Fri, 2 Feb 2018 11:24:37 +0000 (11:24 +0000)]
use the same bar used to determine memory type when mapping memory
should resolve mapping error on SAS3508 encountered by claudio@
ok jmatthew@

6 years agoconvert the remaining examples to full sentences;
jmc [Fri, 2 Feb 2018 10:53:44 +0000 (10:53 +0000)]
convert the remaining examples to full sentences;

6 years agotweak grammar in RETURN VALUES;
jmc [Fri, 2 Feb 2018 10:52:44 +0000 (10:52 +0000)]
tweak grammar in RETURN VALUES;

6 years agoEnable interrupts in (synchronous) trap handlers.
kettenis [Fri, 2 Feb 2018 09:33:35 +0000 (09:33 +0000)]
Enable interrupts in (synchronous) trap handlers.

ok patrick@

6 years agoEnable interrupts while running interrupt handlers like we do on agintc(4).
kettenis [Fri, 2 Feb 2018 09:32:11 +0000 (09:32 +0000)]
Enable interrupts while running interrupt handlers like we do on agintc(4).
Spotted by patrick@

ok patrick@

6 years agovmm: add support for send / receive for AMD SVM hosts
pd [Fri, 2 Feb 2018 08:24:28 +0000 (08:24 +0000)]
vmm: add support for send / receive for AMD SVM hosts

ok mlarkin@

6 years agoRemove . from $PATH since it seems there is no strong reason to keep
yasuoka [Fri, 2 Feb 2018 02:29:54 +0000 (02:29 +0000)]
Remove . from $PATH since it seems there is no strong reason to keep
it and many people prefer to remove it.  Pointed out by m-asou at
soum.co.jp.

ok millert espie bluhm

6 years agoDone means to stop processing the protocol loop, but IP proto none
bluhm [Thu, 1 Feb 2018 21:18:12 +0000 (21:18 +0000)]
Done means to stop processing the protocol loop, but IP proto none
is protocol 58.  Fix typo in ip6_etherip_input() to properly discard
EtherIP tunnel IPv6 packets if the feature is disabled.
found by Maxime Villard; with markus@; OK patrick@ deraadt@ millert@ jca@

6 years agoThe function ip6_get_prevhdr() did return a pointer into a mbuf.
bluhm [Thu, 1 Feb 2018 21:11:33 +0000 (21:11 +0000)]
The function ip6_get_prevhdr() did return a pointer into a mbuf.
It was not guaranteed that the mbuf data was not somewhere else in
the chain.  So return an offset and do a proper mbuf pulldown.
found by Maxime Villard; from NetBSD; with markus@; OK deraadt@

6 years agoWhen processing IPsec AH packets with IP options or IPv6 extension
bluhm [Thu, 1 Feb 2018 21:06:31 +0000 (21:06 +0000)]
When processing IPsec AH packets with IP options or IPv6 extension
headers, check all lengths before accessing the values.
found by Maxime Villard; from NetBSD; with and OK markus@; OK patrick@

6 years agovmd: fix vioscsi dump and restore
pd [Thu, 1 Feb 2018 18:33:27 +0000 (18:33 +0000)]
vmd: fix vioscsi dump and restore

This unbreaks send / receive. Also tested send / receive for vms with cdrom
by booting install62.iso on a vm with a small empty disk, send to file,
receive into a new vm and running an install of bsd* and base.

ok ccardenas@

6 years agoAdd an example on how to log messages coming from a given host to a
landry [Thu, 1 Feb 2018 17:13:44 +0000 (17:13 +0000)]
Add an example on how to log messages coming from a given host to a
specific logfile.
ok sthen@ millert@

6 years agodocument bpf_tap_hdr
dlg [Thu, 1 Feb 2018 12:21:24 +0000 (12:21 +0000)]
document bpf_tap_hdr

6 years agoadd bpf_tap_hdr(), for handling a buffer (not an mbuf) with a header.
dlg [Thu, 1 Feb 2018 12:10:27 +0000 (12:10 +0000)]
add bpf_tap_hdr(), for handling a buffer (not an mbuf) with a header.

internally it uses mbufs to handle the chain of buffers, but the
caller doesnt have to deal with that or allocate a temporary buffer
with the header attached.

ok mpi@

6 years agoMake sure iwn(4) firmware and driver stay in sync when a scan is
stsp [Thu, 1 Feb 2018 11:21:34 +0000 (11:21 +0000)]
Make sure iwn(4) firmware and driver stay in sync when a scan is
requested by ifconfig while associated. For completeness, do the same
for RUN->{ASSOC,AUTH} and AUTH->ASSOC transitions. i.e. always keep
the firmware's association state in sync with the driver's state.
The firmware should only be associated in RUN state.

Fixes a problem where the driver remained in SCAN state forever after
running 'ifconfig iwn0 scan' in associated (i.e. RUN) state, presumably
because the firmware didn't like the driver's scan command and never
signaled completion of the scan.

ok kevlo@ phessler@

6 years agodon't forget to increment loop var; infinite loops spotted by sthen@
otto [Thu, 1 Feb 2018 11:14:23 +0000 (11:14 +0000)]
don't forget to increment loop var; infinite loops spotted by sthen@

6 years agohandle ramdisk not containing ddb, so that builds can proceed
deraadt [Thu, 1 Feb 2018 07:41:33 +0000 (07:41 +0000)]
handle ramdisk not containing ddb, so that builds can proceed

6 years agoupdate currency exchange rates;
jmc [Thu, 1 Feb 2018 07:22:11 +0000 (07:22 +0000)]
update currency exchange rates;

6 years agoMake sure each CPU uses its own set of VAs for pmap_zero_page() and
kettenis [Wed, 31 Jan 2018 23:23:16 +0000 (23:23 +0000)]
Make sure each CPU uses its own set of VAs for pmap_zero_page() and
pmap_copy_page().

ok patrick@

6 years agoMention that PATCH_DEBUG is set to true by default. Prompted by a
danj [Wed, 31 Jan 2018 17:43:33 +0000 (17:43 +0000)]
Mention that PATCH_DEBUG is set to true by default. Prompted by a
question about patching from abieber@

ok jmc@ sthen@

6 years agoSync list of non-exported environment variables with at.c.
millert [Wed, 31 Jan 2018 16:46:13 +0000 (16:46 +0000)]
Sync list of non-exported environment variables with at.c.

6 years agoCheck GETTY_SPACING against the monotonic clock.
cheloha [Wed, 31 Jan 2018 15:57:44 +0000 (15:57 +0000)]
Check GETTY_SPACING against the monotonic clock.

Ensures that we can use the check if the system clock is set backwards.

While here, move time retrieval into the child process in start_getty(),
and only get the time if se_started has been set.

ok millert@ tb@

6 years agoConsider integer/float size during base type comparisons.
mpi [Wed, 31 Jan 2018 14:47:13 +0000 (14:47 +0000)]
Consider integer/float size during base type comparisons.

Regression introduced when I added support for merging forward
declarations with their corresponding types because they do not
have a size.

6 years agoUse FREF() instead of rolling our own.
mpi [Wed, 31 Jan 2018 14:41:31 +0000 (14:41 +0000)]
Use FREF() instead of rolling our own.

ok deraadt@, bluhm@

6 years agoAdd support for specifying multiple transforms within a single proposal.
patrick [Wed, 31 Jan 2018 13:25:55 +0000 (13:25 +0000)]
Add support for specifying multiple transforms within a single proposal.
This gives us more flexibilty for negotiating with other IKEv2 setups.

Tested by and ok sthen@

6 years agoSome wifi drivers don't call ieee80211_newstate() during some state
stsp [Wed, 31 Jan 2018 12:36:13 +0000 (12:36 +0000)]
Some wifi drivers don't call ieee80211_newstate() during some state
transitions, which means those state transition won't be shown in dmesg
in interface debug mode. Make drivers print these transitions themselves.
ok patrick@

6 years agoFix 11g ifmedia modes in ath(4) (shown by 'ifconfig ath0 media').
stsp [Wed, 31 Jan 2018 11:27:03 +0000 (11:27 +0000)]
Fix 11g ifmedia modes in ath(4) (shown by 'ifconfig ath0 media').

There was code which set them up but didn't include 11b channels which
are part of 11g. And there was a hack which effectively stripped important
flag bits away and wouldn't work for modes with overlapping channels (b/g).
As a result, some flags were missing from 11g channels the driver reported
to net80211, which skipped over those channels when building the media list.

This gets us one step closer to supporting the AR5424.

ok mpi@

6 years agoAdd MULTIPROCESSOR support to the interrupt controller drivers. This makes
kettenis [Wed, 31 Jan 2018 10:52:12 +0000 (10:52 +0000)]
Add MULTIPROCESSOR support to the interrupt controller drivers.  This makes
the secondary CPUs receive clock interrupts.  Based on diffs from drahn@.

ok patrick@

6 years agoadjust container_of() for const use
jsg [Wed, 31 Jan 2018 10:17:22 +0000 (10:17 +0000)]
adjust container_of() for const use

avoids -Wincompatible-pointer-types-discards-qualifiers build errors
with radeon_ucode.c

6 years agoadd pci_is_root_bus()
jsg [Wed, 31 Jan 2018 05:04:41 +0000 (05:04 +0000)]
add pci_is_root_bus()

6 years agoadd list_prev_entry()
jsg [Wed, 31 Jan 2018 04:35:38 +0000 (04:35 +0000)]
add list_prev_entry()

6 years agoadd dmi_match() and change dmi_found() to use it
jsg [Wed, 31 Jan 2018 03:26:00 +0000 (03:26 +0000)]
add dmi_match() and change dmi_found() to use it

6 years agoNo need to add ffs.c as we use .VPATH to reach over into libc/string.
kettenis [Tue, 30 Jan 2018 21:08:05 +0000 (21:08 +0000)]
No need to add ffs.c as we use .VPATH to reach over into libc/string.

ok otto@

6 years agosync
zhuk [Tue, 30 Jan 2018 20:58:13 +0000 (20:58 +0000)]
sync

6 years agoAdd D-Link DWA-125 rev B2 to list of devices supported by run(4).
zhuk [Tue, 30 Jan 2018 20:56:38 +0000 (20:56 +0000)]
Add D-Link DWA-125 rev B2 to list of devices supported by run(4).
Works for me on amd64.

okay stsp@, who also noted this matches Linux commit
fd7b9270120ca7e53fbf0469febe0c68acf6a0a2

6 years agoregroup some commands in a more logical way;
jmc [Tue, 30 Jan 2018 20:48:35 +0000 (20:48 +0000)]
regroup some commands in a more logical way;
ok sunil gilles

6 years agoFix TFTP reading of zero-size files:
naddy [Tue, 30 Jan 2018 20:19:06 +0000 (20:19 +0000)]
Fix TFTP reading of zero-size files:

The AllocatePages EFI call returns an error when the allocation
size is 0.  Skip allocating memory and actually transferring the
file when it is empty.

Properly return the number of unread bytes so that a read() of n
bytes does not return n if no bytes were read.

While here, disallow lseek() beyond the TFTP file buffer for SEEK_CUR
as we already do for SEEK_SET.

ok patrick@

6 years agoprovide ffs, gcc generates calls to it, even when __builtin_ffs() is used.
otto [Tue, 30 Jan 2018 20:15:25 +0000 (20:15 +0000)]
provide ffs, gcc generates calls to it, even when __builtin_ffs() is used.
ok deraadt@

6 years agokeep in sync with ld.so malloc.c
otto [Tue, 30 Jan 2018 17:46:41 +0000 (17:46 +0000)]
keep in sync with ld.so malloc.c

6 years agokill a gcc warning
otto [Tue, 30 Jan 2018 17:45:53 +0000 (17:45 +0000)]
kill a gcc warning

6 years agoport over the malloc changes from libc. prompted by deraadt@
otto [Tue, 30 Jan 2018 16:40:20 +0000 (16:40 +0000)]
port over the malloc changes from libc. prompted by deraadt@

6 years agoAdd support for switching CPUs in ddb on arm64. Based on a diff from drahn@.
kettenis [Tue, 30 Jan 2018 15:46:12 +0000 (15:46 +0000)]
Add support for switching CPUs in ddb on arm64.  Based on a diff from drahn@.

ok patrick@

6 years agoExpand "bound to ..." message to include the source of the lease,
krw [Tue, 30 Jan 2018 13:22:42 +0000 (13:22 +0000)]
Expand "bound to ..." message to include the source of the lease,
either the server IP/MAC or the name of the leases file.

Prompted by phessler@ and landry@ feedback to another diff.

ok phessler@

6 years agodon't reject smtp responses containing non-printable chars as long
eric [Tue, 30 Jan 2018 12:44:55 +0000 (12:44 +0000)]
don't reject smtp responses containing non-printable chars as long
as the status is valid. use strnvis() for displaying status lines
in "smtpctl show queue".

ok gilles@ sunil@

6 years agoword fix; from edgar pettijohn
jmc [Tue, 30 Jan 2018 11:37:58 +0000 (11:37 +0000)]
word fix; from edgar pettijohn

6 years agoadd more pci defines and pci_pcie_cap()/pcie_capability_read_dword()
jsg [Tue, 30 Jan 2018 09:57:58 +0000 (09:57 +0000)]
add more pci defines and pci_pcie_cap()/pcie_capability_read_dword()

6 years agoadd module_init()/module_exit()/signal_pending()
jsg [Tue, 30 Jan 2018 09:05:23 +0000 (09:05 +0000)]
add module_init()/module_exit()/signal_pending()

6 years agoadd stubs for pci_clear_master()/pci_save_state()/pci_restore_state()/
jsg [Tue, 30 Jan 2018 08:54:10 +0000 (08:54 +0000)]
add stubs for pci_clear_master()/pci_save_state()/pci_restore_state()/
pci_set_power_state()

6 years agoadd mutex_destroy()/down_read_trylock()
jsg [Tue, 30 Jan 2018 08:50:59 +0000 (08:50 +0000)]
add mutex_destroy()/down_read_trylock()

6 years agoadd create_singlethread_workqueue()/system_power_efficient_wq
jsg [Tue, 30 Jan 2018 08:49:38 +0000 (08:49 +0000)]
add create_singlethread_workqueue()/system_power_efficient_wq

6 years agoadd pm_runtime_* stubs
jsg [Tue, 30 Jan 2018 08:46:49 +0000 (08:46 +0000)]
add pm_runtime_* stubs

6 years agoDon't limit vga_switcheroo stubs to amd64/i386 and add
jsg [Tue, 30 Jan 2018 08:44:23 +0000 (08:44 +0000)]
Don't limit vga_switcheroo stubs to amd64/i386 and add
vga_switcheroo_fini_domain_pm_ops() stub.

6 years agoadd iowrite64()/writeq()
jsg [Tue, 30 Jan 2018 08:40:19 +0000 (08:40 +0000)]
add iowrite64()/writeq()

6 years agoadd GFP_USER/__user/vmalloc()
jsg [Tue, 30 Jan 2018 08:37:44 +0000 (08:37 +0000)]
add GFP_USER/__user/vmalloc()

6 years agoadd ilog2()/order_base_2()/gcd()
jsg [Tue, 30 Jan 2018 08:35:21 +0000 (08:35 +0000)]
add ilog2()/order_base_2()/gcd()

6 years agodisable -Wformat-zero-length when building with gcc
jsg [Tue, 30 Jan 2018 08:31:38 +0000 (08:31 +0000)]
disable -Wformat-zero-length when building with gcc

-Wformat includes -Wformat-zero-length with gcc 4.2 which breaks
building unmodified atom.c with the SDEBUG macro

"warning: zero-length kprintf format string"

6 years agoadd i2c_bit_add_bus()
jsg [Tue, 30 Jan 2018 08:27:17 +0000 (08:27 +0000)]
add i2c_bit_add_bus()

6 years agoadd more endian macros
jsg [Tue, 30 Jan 2018 08:25:06 +0000 (08:25 +0000)]
add more endian macros

6 years agoadd drm_invalid_op()
jsg [Tue, 30 Jan 2018 08:17:31 +0000 (08:17 +0000)]
add drm_invalid_op()

6 years agoadd atomic_cmpxchg()/atomic64_add()/atomic64_sub()
jsg [Tue, 30 Jan 2018 08:15:17 +0000 (08:15 +0000)]
add atomic_cmpxchg()/atomic64_add()/atomic64_sub()

6 years agoRepair botched retry loop when generating RTM_PROPOSAL
krw [Mon, 29 Jan 2018 23:16:36 +0000 (23:16 +0000)]
Repair botched retry loop when generating RTM_PROPOSAL
messages at startup. Reproducible situation found on
vnet(4) and fix tested by jca@.

6 years agopms: minor cleanups in the alps code.
bru [Mon, 29 Jan 2018 21:54:11 +0000 (21:54 +0000)]
pms: minor cleanups in the alps code.

1. Update the ALPS_*_BEZEL values, which don't match the actual limits
accurately. The new values are used by Linux for all models with the
protocols "V1" and "V2".

2. Models with the ID 0x7331 are not supported properly, remove it
from the list.

3. Report to wsmouse that multiple contacts aren't recognized.

6 years agoacknowledge that DPB_PROPERTIES exists and is documented in dpb.1
espie [Mon, 29 Jan 2018 18:39:28 +0000 (18:39 +0000)]
acknowledge that DPB_PROPERTIES exists and is documented in dpb.1

6 years agoMissed a couple of log_info()'s in previous commit. Use #ifdef DEBUG
krw [Mon, 29 Jan 2018 15:18:05 +0000 (15:18 +0000)]
Missed a couple of log_info()'s in previous commit. Use #ifdef DEBUG
instead of #if DEBUG.

6 years agoDrop unused field `ci_ipiih'.
visa [Mon, 29 Jan 2018 14:53:01 +0000 (14:53 +0000)]
Drop unused field `ci_ipiih'.

6 years agoLet the interrupt subsystem allocate memory for the IPI handle,
visa [Mon, 29 Jan 2018 14:51:57 +0000 (14:51 +0000)]
Let the interrupt subsystem allocate memory for the IPI handle,
to drop remaining uses of `ci_ipiih'. In addition, mark the IPI
handler MP-safe.

6 years agoUse log_init(), log_setverbose() and log_debug() more
krw [Mon, 29 Jan 2018 13:41:30 +0000 (13:41 +0000)]
Use log_init(), log_setverbose() and log_debug() more
appropriately. Fixes '-q' logging oddities.

Prompted by phessler@ plea for '-v'-like behaviour rather
 than putting everything under DPRINTF()'s.

6 years agoAttach ampintc/ampintcmsi early so pci devices can be attached with
jsg [Mon, 29 Jan 2018 11:46:44 +0000 (11:46 +0000)]
Attach ampintc/ampintcmsi early so pci devices can be attached with
msi when using qemu -M virt.

ok kettenis@

6 years agoRefactor and simplify the logic to select and invoke the
krw [Sun, 28 Jan 2018 23:12:36 +0000 (23:12 +0000)]
Refactor and simplify the logic to select and invoke the
appropriate function to process a packet.