Commit Graph

272754 Commits

Author SHA1 Message Date
ad
e573adfef5 Back out the amap allocation changes from earlier today - have seen a panic
with them.  Retain the lock changes.
2020-01-02 02:00:35 +00:00
ad
869ac77939 mi_cpu_init: set ci_smt_primary early. 2020-01-02 01:31:17 +00:00
jmcneill
ec17524941 Add driver for simple-audio-amplifier binding 2020-01-02 00:57:09 +00:00
mlelstv
6ee7d63e9e Add support for single power writes, and enable for Ricoh 5u823. 2020-01-01 23:28:31 +00:00
thorpej
9d1f55b2e2 Now that we know if we're shutting down, enable locking in resettodr().
In the shutting_down case, we acquire the todr_mutex as a trylock.  Under
most circumstances, this lock will be uncontended.  But if we happen to
panic while accessing the TOD clock (via clock_settime() or whatever),
then trylock will prevent us from getting stuck (and a warning will be
displayed on the console).
2020-01-01 23:15:24 +00:00
thorpej
273224623b Pull in <sys/stdbool.h>. 2020-01-01 23:07:38 +00:00
thorpej
599c240526 - Introduce a new global kernel variable "shutting_down" to indicate that
the system is shutting down or rebooting.
- Set this global in a new function called kern_reboot(), which is currently
  just a basic wrapper around cpu_reboot().
- Call kern_reboot() instead of cpu_reboot() almost everywhere; a few
  places remain where it's still called directly, but those are in early
  pre-main() machdep locations.

Eventually, all of the various cpu_reboot() functions should be re-factored
and common functionality moved to kern_reboot(), but that's for another day.
2020-01-01 22:57:16 +00:00
ad
37e07d7a55 - Start trying to reduce the high cache miss rate observed around vm_amap.
On _LP64, pad struct vm_amap to 128 bytes and use the additional space to
  hold the arrays for tiny amaps which are common.  Carefully size the array
  allocations to avoid false sharing, and for smaller amaps try to share
  allocated cache lines.

- Eliminate most contention due to amap_list: maintain the list in the pool
  cache constructor / destructor like we do for struct file.  Cache the
  mutexes we allocate here.

- Don't do PR_WAITOK mutex allocations when NOWAIT has been specified.
2020-01-01 22:01:13 +00:00
ad
8ce608c956 Add some new functions for lock objects:
mutex_obj_refcnt(), mutex_obj_tryalloc()
rw_obj_refcnt(), rw_obj_tryalloc()
2020-01-01 21:34:39 +00:00
thorpej
a1e56ffa5f First steps towards properly serializing access to the TOD clock.
- Add a mutex around the TODR, and provide lock/unlock/lock-owned
  functions to manipulate it.
- Rename inittodr() to todr_set_systime() and resettodr() to
  todr_save_systime() to better reflect what they do.  These functions
  are intended to be called with the TODR lock held, which will allow
  for a pattern like:
	-> todr_lock()
	-> todr_save_systime()
	-> [do machine-dependent stuff to sleep/suspend]
	-> [magically awaken]
	-> todr_set_systime(...)
	-> todr_unlock()
- Provide historically-named wrappers inittodr() and resettodr() that
  do the dance of acquiring / releasing the lock around the actual
  substance.

NOTE: resettodr()'s use of the TODR lock is currently disabled (and
todr_save_systime() does not assert it's held) until such time as
issues around shutdown / reboot under duress can be addressed.
2020-01-01 21:09:11 +00:00
wiz
d21e55a432 Break line after macro ends; add article 2020-01-01 20:13:19 +00:00
wiz
627a9b5419 Try fixing a sentence. 2020-01-01 20:11:44 +00:00
pgoyette
458c343b5c One more vestige. 2020-01-01 19:36:27 +00:00
pgoyette
6865a3028c Emove vestigial remains of the monolithic compat module. 2020-01-01 19:35:21 +00:00
thorpej
7e14229cb0 Fix some issues around todr_wenable():
- As previously defined, it was not possible to return an error from the
  back-end RTC driver.  Make it a real function so that it can do so.
- Only the mc146818 and mk48txx drivers used it (for historical reasons).
  Centralize the logic for how it's used in kern_todr.c (and make it private
  to that file) for consistency.
2020-01-01 19:24:03 +00:00
wiz
2f0ecae22a tmux-3.0a out. 2020-01-01 18:40:12 +00:00
thorpej
3144c91f33 No need to use I2C_F_POLL here. 2020-01-01 18:09:44 +00:00
thorpej
c5d2bbb7ef todr_gettime() and todr_settime() are not referenced outside of kern_todr.c,
so make them private to that file.
2020-01-01 18:08:11 +00:00
thorpej
5474e7a92a Remove superfluous splclock()/splx() pair around tc_setclock(). 2020-01-01 17:28:17 +00:00
martin
3027f95766 Revert previous (include of sys/param.h) - the headers requiring this
have been fixed.
2020-01-01 16:50:41 +00:00
maxv
8822fe6d97 Fix three stack info leaks, found by kMSan when just invoking all syscalls
with a zero page as argument.

MSan: Uninitialized Stack Memory In copyout() At Offset 0, Variable 'sb32' From compat_20_netbsd32_getfsstat()
MSan: Uninitialized Stack Memory In copyout() At Offset 12, Variable 'oss' From compat_43_sys_sigstack()
MSan: Uninitialized Stack Memory In copyout() At Offset 0, Variable 'sb' From compat_50_netbsd32___fhstat40()
2020-01-01 14:52:38 +00:00
ad
8764f42700 Fix a comment. 2020-01-01 14:33:48 +00:00
skrll
b1843f788e upstream_kernel=1 is required with new firmware/kernel. 2020-01-01 14:16:51 +00:00
jmcneill
8f3a886a8e Disable SPI for now (rkspi driver hangs at boot) 2020-01-01 14:15:46 +00:00
skrll
60b724fd8c Provide a single generic bcm283x_platform_uart_freq which checks for
"brcm,bcm2835-aux-uart" and returns the appropriate core clock based
results; otherwise it returns the uart clock from firmware.

Should fix early console output on the rpi0w.

Based on a diff from mlelstv
2020-01-01 13:54:32 +00:00
ad
010110684b PR kern/54821: 9.99.32 assertion in uvm_pageactivate
Looks like I forgot to commit this file yesterday.
2020-01-01 13:11:51 +00:00
jmcneill
d45d7be8b2 No need to print all supported levels at attach, print the range and total number of steps 2020-01-01 12:55:03 +00:00
tkusumi
0f41a17b1c fstyp: Consider '@' syntax in device file path for HAMMER2
though devpath is unsupported in NetBSD atm.
taken-from: DragonFlyBSD
2020-01-01 12:47:19 +00:00
jmcneill
3f26cba0bd Quiet chatty printfs 2020-01-01 12:46:44 +00:00
jmcneill
e734e7f113 Fix performance regression with previous 2020-01-01 12:18:18 +00:00
jmcneill
90d0c6959c Use correct firmware for BCM43456 2020-01-01 12:17:13 +00:00
jmcneill
abec60a52f regen 2020-01-01 12:16:14 +00:00
jmcneill
e7fc21828c Add product ID for Broadcom BCM43455 2020-01-01 12:15:53 +00:00
martin
c309bf7aef Avoid mixing signed/unsigned arguments to the ? operator. 2020-01-01 11:48:36 +00:00
tkusumi
cfa93e9fb4 fstyp: Fix build failure on i386
http://releng.netbsd.org/b5reports/i386/commits-2020.01.html#2020.01.01.10.13.16
Explicitly cast to size_t.
2020-01-01 11:46:43 +00:00
jmcneill
40fd064d65 dwcmmc improvements:
- Use mmcpwrseq resources if available
 - Only set 4- or 8-bit mode if specified in the dt properties
 - Add quirk for implementations with inverted power enable logic
 - Support switching signal voltage between 1.8V and 3.3V
 - Fix a clock divider issue on Rockchip SoCs
2020-01-01 11:21:15 +00:00
jmcneill
6be0a71782 Attach mmcpwrseq resource earlier 2020-01-01 11:18:13 +00:00
jmcneill
a073b221c4 + rk3399-pinebook-pro.dts 2020-01-01 11:17:45 +00:00
jmcneill
42147a3bf5 Add Pinebook Pro dts, from Manjaro Linux.
877ca0e728/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
2020-01-01 11:16:15 +00:00
ryo
5b7e27ecf0 add aq(4) 2020-01-01 10:36:43 +00:00
skrll
514a9e5836 Adjust image size appropriately when using update_image
OK jmcneill
2020-01-01 10:35:10 +00:00
ryo
0422061028 note aq(4) 2020-01-01 10:18:39 +00:00
ryo
5707202b82 Add module build for aq(4) 2020-01-01 10:13:16 +00:00
ryo
6d2cfc2125 add support Aquantia AQC seriese 10G network adapters.
this driver is based on the FreeBSD version https://github.com/Aquantia/aqtion-freebsd ,
but drastically rewritten for NetBSD.
2020-01-01 10:11:21 +00:00
ryo
c8edaeb210 regen 2020-01-01 10:06:40 +00:00
ryo
ebdcf67f53 add Aquantia AQC 10G network adapters 2020-01-01 10:05:55 +00:00
ryo
8c476cf96f Add the ETHERTYPE_QINQ for 802.1ad VLAN stacking 2020-01-01 10:04:37 +00:00
maxv
dd833bd62d Fix small read overflows when parsing HID tables. Noticed by kASan the
other day while I was playing with vHCI.
2020-01-01 09:40:17 +00:00
skrll
cb6990dcf5 The DMA range doesn't cover all of memory on the bcm2711 (rpi4) - it
covers (most of) the first 1GB.
2020-01-01 09:35:50 +00:00
skrll
ff5626e1e9 Fix build for non-__HAVE_UCAS_FULL platforms where the symbol dance for
assembler functions isn't needed.

Suggestion from maxv.  Thanks.
2020-01-01 09:33:19 +00:00