254483 Commits

Author SHA1 Message Date
rin
e6cc4be609 Change the behavior of join command in accordance with nvi-m17n, as proposed on
tech-userlevel@; when the last and first chars in joined lines are multi-width,
do not insert a white space.
2017-11-10 14:53:00 +00:00
rin
c027196202 - Fix cursor position when a multiwidth char does not fit within a line.
- Put cursor on the leftmost column of a multiwidth char, instead of
  the rightmost one. Otherwise, some terminal emulators do not focus on
  the entire of the char.

Logic taken from nvi-m17n by itojun.
2017-11-10 14:44:13 +00:00
rin
2f18f6f88c PR bin/52716 fix buffer overrun found by libasan 2017-11-10 14:35:25 +00:00
maxv
ef0cca4ccf Implement memcpy, the builtin version does not work with variable sizes. 2017-11-10 08:52:57 +00:00
maxv
f3ab445a9b Add cpuid and rdseed. 2017-11-10 08:05:38 +00:00
ozaki-r
b9e3a5a1e9 Use psref instead of pserialize because that code is sleepable 2017-11-10 07:25:39 +00:00
ozaki-r
1c27f64d6f Fix a deadlock between a route update and lltable
It happens because rtalloc1 is called from lltable with holding
IF_AFDATA_WLOCK.

If a route update is in action, rtalloc1 would wait for its completion with
holding IF_AFDATA_WLOCK. At the same moment, a softint (e.g., arpintr) may try
to take IF_AFDATA_WLOCK and get stuck on it. Unfortunately the stuck softint
prevents the route update from progressing because the route update calls
psref_target_destroy that needs the softint to complete.

A resource allocation graph of the senario looks like this:
    route update =(psref_target_destroy)=> softint => IF_AFDATA_WLOCK
    =(rt_update_wait)=> route update

Fix the deadlock by pulling rtalloc1 out of the lltable codes inside
IF_AFDATA_WLOCK.

Note that the deadlock happens only if NET_MPSAFE is enabled.
2017-11-10 07:24:28 +00:00
ozaki-r
faf7d24046 Remove redundant KASSERTMSG
The function is static, has just one caller and the caller does the same check.
2017-11-10 07:15:32 +00:00
jmcneill
c9a5fdb236 Allwinner NAND Flash Controller driver. Work in progress. 2017-11-10 00:09:23 +00:00
ryoon
70e5c409c3 Do not emit a meaningless message when lid open/close from valz(4) 2017-11-09 23:51:54 +00:00
riastradh
509483453b Assert KM_SLEEP xor KM_NOSLEEP in all kmem allocation. 2017-11-09 23:20:12 +00:00
christos
17c894d283 Add assertions that either PR_WAITOK or PR_NOWAIT are set. 2017-11-09 22:52:26 +00:00
riastradh
62e8934c32 panic ex nihilo -- PR_NOWAITing for zerot 2017-11-09 22:34:07 +00:00
christos
127c64cbda use PR_NOWAIT instead of 0 2017-11-09 22:22:58 +00:00
christos
b3254cd976 Don't use 0 for PR_NOWAIT 2017-11-09 22:21:27 +00:00
christos
0fddc7f03d use PR_NOWAIT. 2017-11-09 22:20:25 +00:00
christos
913317c461 use PR_WAITOK everywhere. 2017-11-09 22:16:38 +00:00
riastradh
5f5353cf83 Guess pool_cache_get(pc, 0) means PR_WAITOK here.
Earlier on in the same context we use kmem_alloc(sz, KM_SLEEP).
2017-11-09 22:16:34 +00:00
christos
b368d720c2 don't pass 0 to the pool flags 2017-11-09 21:57:06 +00:00
jmcneill
a00dc832a3 add NAND module clock 2017-11-09 21:52:32 +00:00
jmcneill
57ab95bfce Add support for decoding legacy Toshiba TC58NVG2S0H NAND chip params. 2017-11-09 21:50:15 +00:00
jmcneill
15f3201dd6 ul is not 64-bit on all platforms, use ull when calculating planesize 2017-11-09 21:45:24 +00:00
skrll
d97cccd167 Trailing whitespcae 2017-11-09 21:39:48 +00:00
skrll
491a8d3fe0 trailing whitespace 2017-11-09 21:38:48 +00:00
skrll
1d977c34f7 Trailing whitespace 2017-11-09 21:36:46 +00:00
christos
9b7a6414b8 Add O_REGULAR to enforce opening of only regular files
(like we have O_DIRECTORY for directories).
This is better than open(, O_NONBLOCK), fstat()+S_ISREG() because opening
devices can have side effects.
2017-11-09 20:30:01 +00:00
christos
4fe1ef32f3 Only open regular files. 2017-11-09 20:27:50 +00:00
christos
948108c143 Handle the ERESTART case from pool_grow() 2017-11-09 19:34:17 +00:00
maxv
16cea84baf Define utility functions as inlines in prekern.h. 2017-11-09 15:56:56 +00:00
christos
a20c95d549 make the KASSERTMSG/panic strings consistent as '%s: [%s], __func__, wchan' 2017-11-09 15:53:40 +00:00
maxv
88360cba1e Use another ld script for kaslr kernels, in which there are no alignment
directives. They don't matter since the bootloader overwrites them.

But, normally we still need to make sure .data.read_mostly is aligned.
Unfortunately I couldn't find any way to force sh_addralign to be 64, so
I'm leaving the alignment there as a useless reminder.
2017-11-09 15:46:48 +00:00
christos
56ae922037 Since pr_lock is now used to wait for two things now (PR_GROWING and
PR_WANTED) we need to loop for the condition we wanted.
2017-11-09 15:40:23 +00:00
maxv
2ef67c0514 Fill in the page padding. Only .text is pre-filled by the ld script, but
this will change in the future.
2017-11-09 15:24:39 +00:00
christos
c15dd4940b Don't get stuck reading named pipes; only try to read plain files in
order to send mail.
2017-11-09 15:03:01 +00:00
christos
3284574b5e added booted_method 2017-11-09 12:46:55 +00:00
msaitoh
1564324d5c Wait 1ms first. Existing Intel xHCI requies 1ms delay to prevent system hang
(Errata).

XXX pullup-[78]
2017-11-09 10:03:46 +00:00
msaitoh
5a544f79c2 On device which has SFP(+) cage and a module is inserted, hw->phy.id is not
MII PHY id but SFF 8024 ID. So checking hw->phy.id with 0 doesn't work.
Print PHY ID only for copper PHY.
2017-11-09 09:33:28 +00:00
knakahara
cbf21dcddc fix typo. (does not affect actual operation, but confuses reader...)
The function is called when racoon receives SADB_X_MIGRATE pfkey message,
however the message is not used now. It was compatible code for KAME.
2017-11-09 08:34:50 +00:00
hkenken
c3b2000860 - Add imxusbphy driver for i.MX6.
- Clean up CCM (Clock driver).
  Add imx6_ccm_analog_read/write() functions.
2017-11-09 05:57:23 +00:00
ozaki-r
6676be48c1 Dedup some checks
And the change a bit optimizes checks of SA expirations, which
may shorten testing time.
2017-11-09 04:51:07 +00:00
ozaki-r
eb73cc98c0 "Mark key_timehandler_ch callout as MP-safe" change needs one more sec to make lifetime tests stable 2017-11-09 04:50:37 +00:00
msaitoh
5638c645ad Regen. 2017-11-09 03:08:12 +00:00
msaitoh
aec42c52b5 Add PEX 8605 4port 4lane PCIe Gen 2 switch. 2017-11-09 03:07:10 +00:00
nonaka
c7f80e628d Initialize boot_catalog_entry's entry_type properly.
This had been missing but the type was used in cd9660_setup_boot().

From OpenBSD usr.sbin/makefs/cd9660/cd9660_eltorito.c r1.10.
2017-11-09 01:28:05 +00:00
christos
f890274f96 add a "booted_method" string to aid in debugging double boot matches. 2017-11-09 01:02:55 +00:00
christos
e1c20feeb8 add "prekern" to the string list. 2017-11-09 01:01:33 +00:00
jmcneill
403dcfdf94 add wskbd at gpiokeys 2017-11-08 21:44:29 +00:00
matt
98d0227b5d Add matt-nb8-mediatek branch 2017-11-08 20:24:53 +00:00
skrll
3607547481 Use genassym.cf instead of #include <arch/arm/sunxi/sunxi_platform.h> 2017-11-08 19:49:26 +00:00
maxv
3a6d6ae0ab Add pkboot in "help". 2017-11-08 18:31:00 +00:00