259264 Commits

Author SHA1 Message Date
jakllsch
aade04f98a fix xputc for big endian 2018-06-11 19:42:22 +00:00
jdolecek
c0cdc2cf1e Factual correction: actually old code also used number of octents, but set
sc_if->sk_tx_ramend to invalid value, and assumed 128k buffer when
SK_EPROM0 read returned zero

(no code change)
2018-06-11 19:40:05 +00:00
reinoud
73230b59c8 Now we use timestamp info, use direct console output instead of kernel
timestamped output for usage() reporting
2018-06-11 19:35:56 +00:00
reinoud
8013e6a301 Prevent nested SIGIOs ruining the system stack 2018-06-11 19:23:21 +00:00
jdolecek
ee32b5a5c7 adopt tx/rx buffer size computation from OpenBSD rev. 1.51 to fix
"random" msk failures

the crucial fix is that the start/end adresses are computed and
written to hw registers in number of octets (i.e. size /
sizeof(u_int64_t)), as that is actually what the hardware expects

fixes PR kern/36454 (which had fix which highlighted the trouble),
and seems likely to also fix kern/35711 and port-i386/42514
2018-06-11 19:13:38 +00:00
maya
a3ebee93c8 Add configure check and fallback definition for u_longlong_t
Should help linux tools compilation of dtrace tools, and not
affect NetBSD.

From Chuck Zmudzinski in current-users, with light modification
by myself.
2018-06-11 18:48:24 +00:00
kamil
5a889623ce Correct Undefined Behavior in libc/citrus
Unportable left shift reported with MKSANITIZER=yes USE_SANITIZER=undefined:

# nm /usr/lib/libc.so|grep sanit
/public/src.git/lib/libc/citrus/modules/citrus_mapper_std.c:173:8: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'

Sponsored by <The NetBSD Foundation>
2018-06-11 18:03:38 +00:00
kamil
5f51a87ea5 Correct Undefined Behavior in ifconfig(8)
Unportable left shift reported with MKSANITIZER=yes USE_SANITIZER=undefined:

# ifconfig
alc0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        ec_capabilities=3<VLAN_MTU,VLAN_HWTAGGING>
        ec_enabled=0
        address: xx:xx:xx:xx:xx:xx
/public/src.git/sbin/ifconfig/af_inet.c:102:34: runtime error: left shift of 16777215 by 8 places cannot be represented in type 'int'
        inet 192.168.0.38/24 broadcast 192.168.0.255 flags 0x0
        inet6 xxxx::xxxx:xxxx:xxxx:xxx%alc0/64 flags 0x0 scopeid 0x1
lo0: flags=0x8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33624
        inet 127.0.0.1/8 flags 0x0
        inet6 ::1/128 flags 0x20<NODAD>
        inet6 fe80::1%lo0/64 flags 0x0 scopeid 0x2

Change shifting left 1 to shifting 1U. This corrects the issue.

        if (cidr < 32) {                /* more than 1 bit in mask */
                /* check for non-contig netmask */
                if ((mask ^ (((1 << cidr) - 1) << (32 - cidr))) != 0) // <- here
                        return -1;      /* noncontig, no pfxlen */
        }

Solution suggested by <uwe>

Sponsored by <The NetBSD Foundation>
2018-06-11 17:45:50 +00:00
christos
9137a68872 use LIBISCXX = yes, instead of hard-coding the c++ library. Suggested by joerg 2018-06-11 15:29:33 +00:00
kamil
1c426e1841 Restore the MKGROFF=bo MKCXX=yes build
Mark the documentation in dc(1), gprof(1), rogue(6) and fsck_ffs(8) with
the .roff flag in SUBDIR.

Sponsored by <The NetBSD Foundation>
2018-06-11 14:18:16 +00:00
christos
b1e04fb08c Add libstdc++ again; needed for:
undefined reference to `typeinfo for __cxxabiv1::__class_type_info'
undefined reference to `typeinfo for __cxxabiv1::__si_class_type_info'
undefined reference to `typeinfo for __cxxabiv1::__vmi_class_type_info'
undefined reference to `typeinfo for std::type_info'
undefined reference to `__dynamic_cast'
2018-06-11 12:47:47 +00:00
msaitoh
6aca29bffd Apply changes of FreeBSD ix-3.2.18.tgz:
- Add IXGBE_DEV_ID_82599_LS(0x154f) support.
 - Increase timeout for newer than ixgbe_mac_X550 (i.e. Xeon-D and Denverton)
   in ixgbe_acquire_swfw_sync_X540().
 - Add some unused macros (IXGBE_FW_LESM_*).
2018-06-11 10:34:18 +00:00
christos
d58777d134 Handle more objdir variations for MKREPRO (untested) 2018-06-11 01:34:03 +00:00
christos
2357fc5dd5 use SUBDIR.roff suggested by uwe@ 2018-06-10 17:55:11 +00:00
jdolecek
3d8c9e20d7 convert the (still disabled) 'direct write' for pipes to use the
experimental PMAP_DIRECT if available; the direct code paths now survive
longer than the pmap_enter() variant, but still triggers panic during
build.sh tools run; remove some obsolete sysctls

add some XXXs to mark places which need attention to make this more stable

Note: the loan case is now actually significantly slower than the
non-loan case on MP systems, due to synchronous IPIs triggered by
marking the page read-only by uvm_loan(); this is being discussed
in the email thread
https://mail-index.netbsd.org/tech-kern/2018/05/21/msg023441.html

that is basically the same issue due to which loaning was disabled
for sosend()
2018-06-10 17:54:51 +00:00
jmcneill
b8cc3839ab If the bus glue does not provide values for fifo reg offset and
fifo depth, try to auto detect based on the chip version and
value already programmed into FIFOTH.
2018-06-10 17:52:20 +00:00
kamil
e153ab384c Fix the MKGROFF=no MKCXX=yes build
Allow to disable building groff. This is a build tool written in C++.

This option is useful with an external toolchain configured for building the
distribution rather than building tools (e.g. C++ lookup paths may differ).

Looks ok by <christos>

Sponsored by <The NetBSD Foundation>
2018-06-10 17:17:46 +00:00
jakllsch
55ebc0875f remove irrelevant pci(9) #includes from virtio child drivers 2018-06-10 14:59:23 +00:00
jakllsch
03046bf097 The virtio block device capacity config item is expressed always in
request protocol sector units of 512 bytes.

Also, add and use a symbolic constant to refer to request protocol
sector units.
2018-06-10 14:43:07 +00:00
jmcneill
9a2e3e05ca Add fdtbus_clock_byname, which can be used by clock backends to
lookup clocks in other domains by "clock-output-names" property.
Not intended for ordinary driver use.
2018-06-10 13:26:29 +00:00
zafer
061f0fcc8a Set default homeperm values before writing usermgmt.conf file and honor values in it instead of ignoring it.
Fixes PR bin/40324 by Guy Yur
2018-06-10 07:52:05 +00:00
christos
aa66956410 But set NOSANITIZER 2018-06-09 23:45:56 +00:00
christos
64715b9aa8 We can't build those three with MKSANITIZER, they are used too early. 2018-06-09 22:41:55 +00:00
christos
1ed1559579 don't depend on libstdc++ 2018-06-09 22:40:00 +00:00
christos
db50de0d5b consistency, define to empty. 2018-06-09 22:39:29 +00:00
oster
362990b68f Fix two mis-spellings in comments. No functional changes. 2018-06-09 21:18:41 +00:00
jdolecek
f894490ecd port basic match support for several more Yukon variants from OpenBSD, together
with some basic conditionals I've found in that driver; only compile-tested, so
very likely needs further work to actually work

adresses also PR kern/43507
2018-06-09 18:53:16 +00:00
zafer
cf3761a94c Add missing b_cflags and b_oflags.
Ok dholland@
Addresses PR kern/42342 by Yoshihiro Nakajima
2018-06-09 18:48:31 +00:00
jdolecek
7bc3817079 regen 2018-06-09 18:39:58 +00:00
jdolecek
459be5248c small sync of Marvell Yukon PCI product ids with OpenBSD - add 8048 variant, rename
YUKON_1 to YUKON_8070

also adjust description for YUKON_8055_2 to have "88E8055-2" just so that it shows
up differently
2018-06-09 18:39:32 +00:00
christos
a3c16b5549 Provide more compatibility with readline headers; now python-3.6.5 works
when changing 'readline' -> 'edit' in setup.py.
Revert previous conditional setting of unbuffered.
2018-06-09 17:41:55 +00:00
macallan
84a5dd583d set options ADBKBD_EMUL_USB by default
With this ADB and USB keyboards can coexist on the same mux, as needed by
built-in Bluetooth modules on some *Books
should fix PR53351
2018-06-09 02:25:52 +00:00
jakllsch
4a4f6b1cdf Avoid unnecessarily touching CNTP_CTL.
We may not have the privilege of accessing CNTP_CTL if running as a
virtualized guest, and we're not using the Physical Timer for interupt
generation anyway.
2018-06-09 01:17:35 +00:00
macallan
939baef385 when switching CPU speed using DFS, only use xcalls on MULTIPROCESSOR kernels 2018-06-08 23:40:44 +00:00
macallan
feb0c177bd fix low CPU speed reporting when using DFS 2018-06-08 23:39:31 +00:00
jmcneill
f062f1775d Provide bs_mmap implementations for bcm283x based boards.
PR:		port-arm/53283
Submitted by:	Nick Hudson
2018-06-08 18:09:43 +00:00
sevan
66fd14939a Prior to ZFSv15, volinit was an undocumented command which could be used to
populate /dev with zvol device nodes.
Following on with the recent ZFS/DTrace update, this is no longer a valid option
and causes the mountall script to barf zfs usage() following from
unrecognized command 'volinit' error.
2018-06-08 14:44:21 +00:00
maya
262c7ccc67 Add more aliases for Hebrew and Arabic ISO-8859-... encodings.
ISO-8859-8 is supposed to be visual order (i.e. legible if displayed ltr)
ISO-8859-8-i is supposed to be implicit logic order
ISO-8859-8-e is supposed to be explicit about order

In practice, ISO-8859-8 implying visual order is rare, and logic
order is used. ISO-8859-8-e is rarely used.

Same for Arabic, which uses ISO-8859-6-...

Mentioned in RFC 1555, RFC 1556.
2018-06-08 12:07:41 +00:00
nonaka
24fc960097 Remove unused include. 2018-06-08 11:52:30 +00:00
knakahara
99baae3101 iwm(4) workaround as ifp->if_hwdl can be set only once. Advised nonaka@n.o and ozaki-r@n.o, thanks.
To avoid for iwm(4) to set if_hwdl before loading firmware, use local address
as dummy. See sys/net/if.c::if_set_sadl().
2018-06-08 11:18:23 +00:00
knakahara
12ebec1af3 Fix "ifconfig iwm0" failures reported by ryoon@n.o. Advised nonaka@n.o and ozaki-r@n.o, thanks. 2018-06-08 11:09:24 +00:00
nonaka
4312665c73 fix usage of `arp -d'. 2018-06-08 04:24:12 +00:00
jakllsch
46214a36bf Make ld_virtio aware of a possible device-side write cache. 2018-06-07 23:32:30 +00:00
rjs
272c99c1b7 Add missing xcb files to build.
Fixes xsrc/53337.
2018-06-07 18:16:55 +00:00
macallan
bc9abb2a74 reduce debug spam, use IPI_VECTOR 2018-06-07 17:02:12 +00:00
riastradh
74179ba271 Disable loading XMSS keys by default too.
Nobody should be using XMSS host keys without an explicit decision,
because they're qualitatively different from all other types of host
keys in that they require keeping state.

This also eliminates a harmless but confusing warning that began
after we stopped generating XMSS keys by default.
2018-06-07 15:26:09 +00:00
thorpej
8619b1ab43 Revert changes that pinned-down i2c parent specs. The i2c subsystem
has been enhanced to make this unnecessary.
2018-06-07 13:36:28 +00:00
thorpej
685c4e4beb In device_register(), if the device is an "iic" child of "imcsmb",
attach a I2C_PROP_INDIRECT_DEVICE_WHITELIST property that limits
the allowed devices to "spdmem" and "sdtemp".  Also set the
I2C_PROP_INDIRECT_PROBE_STRATEGY property to I2C_PROBE_STRATEGY_NONE,
since that controller can't issue any of the "quick" commands.

XXX It would be nice to be able to do this in the imcsmb driver
itself, but the way autoconfiguration works makes that infeasible.
2018-06-07 13:35:31 +00:00
thorpej
ec79b37bf9 Changes / enhancements to i2c indirect device auto-configuration:
— iic_search() chooses a “probe strategy” based on the
  "i2c-indirect-probe-strategy” property on the “iic” instance.
  Valid values are "smbus-quick-write”, "smbus-receive-byte”, and
  “none”.  If no value is specified, the default is "smbus-quick-write”.

— If the "i2c-indirect-device-whitelist” exists on the “iic” instance,
  iic_search() will first check the driver name in the cfdata_t against
  this list, and only allow the match/probe to move forward if the
  cfdata_t driver name is in the list.  This is primarily to accommodate
  the Intel integrated memory controller neutered-i2c-thing.

— If the cfdata_t specifies a wildcard address, each address of the i2c
  bus will be consulted.  If the cfdata_t contains a nailed-down address,
  then we limit the bus scan to that specific address.

— We explicitly skip reserved / special i2c addresses, such as the
  General-Call address, etc.

— We introduce the notion of a “match quality” for i2c drivers.  From
  lowest-quality to highest-quality: matched by plausible address only,
  matched by plausible address and poking at the bus to see if the
  device looks reasonable, matched by direct-config “compatible” string,
  matched by direct-config “driver name” string.

— If the “match quality” is merely “plausible address only”, then
  iic_search() will use the probe strategy selected above to see if
  a device responds to that address.
2018-06-07 13:30:49 +00:00
kamil
d2d2a14700 Replace HAVE_GCC with ACTIVE_CC == gcc checks
Kernel modules build with GCC and Clang/LLVM.

Requested by <joerg>
2018-06-07 13:21:44 +00:00