Commit Graph

272969 Commits

Author SHA1 Message Date
skrll
9ea7908f39 fix new cpu_intr_p 2020-01-06 08:36:08 +00:00
skrll
d8f0d2b319 Fix DEVMAP build losage by reducing diffs between arm and aarch64
*sigh*
2020-01-06 08:29:08 +00:00
nisimura
f93891eb30 correct bogus comparison. pointed by msaitoh@ 2020-01-06 07:57:06 +00:00
skrll
5889b0f479 Use CFLAGS instead of COPTS for -mapcs-frame when using DDB.
Discussed with mrg@
2020-01-06 07:40:45 +00:00
msaitoh
af30e39a49 Protect ec_multicnt. 2020-01-06 07:15:03 +00:00
msaitoh
8d80c0f265 Add ETHER_LOCK() and ETHER_UNLOCK() to protect ec_multiaddrs.
XXX These drivers don't check whether enm_addrlo and enm_addrhi are the same
or not, so it won't work correctly if an multicast address entry has a range.
2020-01-06 06:50:00 +00:00
msaitoh
2d56e9f118 Add aq(4) and ixl(4) to the MPSAFE component list. 2020-01-06 05:38:59 +00:00
oster
77a4186dd1 Build fix. Add back inclusion of <sys/queue.h>, which was previously
included via <sys/evnct.h>.
2020-01-06 01:37:57 +00:00
ad
eeff73a80f Page allocator:
The method for assigning pages to buckets in the non-NUMA case sucks.  It
can defeat memory interleaving in the hardware, and not distribute pages
fairly by colour.  To fix this and make things more deterministic, take the
physical PFN and colour into account.

Then when freeing pages, in the non-NUMA case don't change the page's bucket
either.  Keeping the bucket number stable will also permit partitioning page
replacement state by CPU package / NUMA node.
2020-01-05 22:01:09 +00:00
pgoyette
356bdedfb1 When reading from /dev/ksyms we need to skip over entries that have
been marked as sd_gone.  Otherwise we might try to uiomove() data from
memory that has been unmapped, resulting in EFAULT.

XXX This (along with other pre-existing checks st->sd_gone) is still
racy, but it's an improvement over current code.  Ideally we would
make a complete copy of the symbol table when we open /dev/ksyms so
we could ignore any changes that occur.

ad@ says "good enough for now"

XXX Pullup to -9 and -8
2020-01-05 21:12:34 +00:00
ad
994edfd0de NetBSD 9.99.34 - schedstate_percpu changed. 2020-01-05 20:52:15 +00:00
ad
5090a56b8e mi_cpu_init(): provide fake topology info for early boot. 2020-01-05 20:27:43 +00:00
ad
dc6d146464 - Another tweak for SMT: if a new LWP is starting life, try to make it run
on a different CPU in the same CPU core as the parent, because both parent
  and child share lots of state.  (I want to come back later and do
  something different for _lwp_create() and maybe execve().)

- Remove the runqueue evcnts, which are racy and impose a penalty for very
  little payoff.

- Break out of the loop in sched_takecpu() as soon as we have a CPU that can
  run the LWP.  There's no need to look at all CPUs.

- SPCF_IDLE in sched_enqueue() so we know the CPU is not idle sooner.
2020-01-05 20:26:56 +00:00
ad
be7a89fed2 Give aarch64 a preemption safe cpu_intr_p(). 2020-01-05 20:17:43 +00:00
martin
09fa017877 PR install/54836: fix broken conditional, passing the wrong set name suffix
to groff.
2020-01-05 18:37:54 +00:00
jmcneill
6080e166e9 Make the generic Arm platform available for arm32 as well. 2020-01-05 17:26:31 +00:00
jmcneill
bb20cf2b6c Use arm_fdt_cpu_bootstrap 2020-01-05 17:20:01 +00:00
jmcneill
4417f2e219 Add a generic Arm64 platform definition that is used as a fallback.
The generic platform assumes PSCI, a generic timer, pre-initialized UART
clocks, and adds a 4KB entry to the devmap for the console UART device.
2020-01-05 17:16:07 +00:00
skrll
62f0c78c04 Use make_label_evbarm instead of home grown 2020-01-05 16:41:07 +00:00
para
1682d72797 remove unused predicate function
likely unused since kmem changes
2020-01-05 15:57:15 +00:00
mrg
43ac7a59e5 in rk_vop_dpms() set or unset the VOP_STANDBY_EN bit in VOP_SYS_CTRL
depending on the dpms mode requested.

this makes pinebook pro display actually turn off when dpms asks.
2020-01-05 12:14:35 +00:00
tkusumi
05e54a628c dm: Add "Copyright (c) 2015 The DragonFly Project." to dm-flakey
which I missed in my initial dm-flakey commit.
2020-01-05 08:11:10 +00:00
tkusumi
ea24dc8dcc dm: Add dm-delay target
Ported from DragonFlyBSD, but this target had originally existed in
Linux kernel. See below for details.
https://www.kernel.org/doc/Documentation/device-mapper/delay.txt

Due to "tick" in hz(9) not working (which results in dmdlthread spinning
forever in _submit_queue() without dp extracted from delayed list
and queued into submit list), this hasn't been hooked to dm.kmod yet.

taken-from: DragonFlyBSD
2020-01-05 08:08:26 +00:00
abhinav
2d114b3c14 PR lib/54510 - when user supplied completion function is there,
don't unescape the string to be completed.
2020-01-05 07:12:05 +00:00
tih
52de8937af Summary: Remove over-simplified extraneous test
The file name matching code in libedit tries to adjust to the presence
of explicit " or ' characters in the input line, but tries too hard.
Remove a conditional that goes overboard, and causes the completion
code to fail if a quoted string is seen before the filename to be
expanded, as in

	  grep 'foo' bar<TAB>

Before this change, the above would not expand any possible
completions, even if they existed, because it would choose to look for
files whose names started with " bar".
2020-01-05 00:03:27 +00:00
ad
375fab3091 x86 pmap improvements, reducing system time during a build by about 15% on
my test machine:

- Replace the global pv_hash with a per-pmap record of dynamically allocated
  pv entries.  The data structure used for this can be changed easily, and
  has no special concurrency requirements.  For now go with radixtree.

- Change pmap_pdp_cache back into a pool; cache the page directory with the
  pmap, and avoid contention on pmaps_lock by adjusting the global list in
  the pool_cache ctor & dtor.  Align struct pmap and its lock, and update
  some comments.

- Simplify pv_entry lists slightly.  Allow both PP_EMBEDDED and dynamically
  allocated entries to co-exist on a single page.  This adds a pointer to
  struct vm_page on x86, but shrinks pv_entry to 32 bytes (which also gets
  it nicely aligned).

- More elegantly solve the chicken-and-egg problem introduced into the pmap
  with radixtree lookup for pages, where we need PTEs mapped and page
  allocations to happen under a single hold of the pmap's lock.  While here
  undo some cut-n-paste.

- Don't adjust pmap_kernel's stats with atomics, because its mutex is now
  held in the places the stats are changed.
2020-01-04 22:49:20 +00:00
ad
401aa4758b A couple of scheduler tweaks which benchmark well for me:
- Add some simple SMT awareness.  Try to keep as many different cores loaded
  up with jobs as possible before we start to make use of SMT.  Have SMT
  "secondaries" function more as helpers to their respective primaries.
  This isn't enforced, it's an effort at herding/encouraging things to go in
  the right direction (for one because we support processor sets and those
  can be configured any way that you like).  Seen at work with "top -1".

- Don't allow sched_balance() to run any faster than the clock interrupt,
  because it causes terrible cache contention.  Need to look into this in
  more detail because it's still not ideal.
2020-01-04 22:46:01 +00:00
mlelstv
90e85cec6c Avoid race condition. Patch from bouyer@ 2020-01-04 22:30:06 +00:00
mlelstv
e34bd76845 Be less noisy for some commands. 2020-01-04 22:28:26 +00:00
mlelstv
432d3fdb38 check of signal number of was backwards. 2020-01-04 22:22:34 +00:00
mlelstv
6fa7a3b241 validate signal and errno before trying to print. 2020-01-04 22:05:52 +00:00
skrll
d50e4fd9f6 Supported SoC DTS audit 2020-01-04 14:53:11 +00:00
mlelstv
85cc294a62 size check was backwards. 2020-01-04 14:52:52 +00:00
skrll
15a46bd00c sort DTS 2020-01-04 14:24:51 +00:00
skrll
cb8f2561d1 Add DTS files for new boards for the SOCs we support 2020-01-04 14:18:28 +00:00
skrll
993e77df16 Sort DTS 2020-01-04 14:14:35 +00:00
jmcneill
71bb69461c Remove debug printfs 2020-01-04 13:54:04 +00:00
jmcneill
29008b3d58 Add 2000 MHz to available armclkb rates 2020-01-04 13:32:32 +00:00
jmcneill
e19299f098 Attach psci as early as possible. This allows other power controllers to
register their own poweroff / reset callbacks with a higher preference.
2020-01-04 12:21:55 +00:00
jmcneill
bb3a17a5a7 If the backlight node does not have an enable gpio, set the lowest duty
cycle to turn the display off instead.
2020-01-04 12:09:54 +00:00
jmcneill
d63ecae318 Emit PMFE_DISPLAY_{ON,OFF} events in response to DPMS requests. 2020-01-04 12:08:32 +00:00
skrll
869320cd52 Add bcm2711-rpi-4-b.dts 2020-01-04 09:50:20 +00:00
kamil
4677d24ff4 Document PT_LWPSTATUS and PT_LWPNEXT in ptrace(2)
Remove mentions of obsolete PT_LWPINFO.
2020-01-04 04:40:17 +00:00
kamil
71b1583f64 Rename sys_ptrace_lwpstatus.c to sys_process_lwpstatus.c
Keep the names of functions internally as ptrace intact as this code
is shared with core_elf32.c that already reaches ptrace(2) specifc symbols.

No functional change intended.
2020-01-04 03:46:19 +00:00
tkusumi
2564971ebf fstyp: Cleanup hammer2.c (sync with recent DragonFly commit)
taken-from DragonFlyBSD 841ef9e93aea61adab688e9476604e7a03291ef0
2020-01-04 03:43:18 +00:00
mrg
66bc25587b move the time nlist fetches into their own namelist and only
fetch them when necessary.  allow for fallback uses of older
time sources if others are not present.

this stops vmstat from exiting if it can't get the addresses
of these time values it often doesn't need (eg, running kernels
use the sysctl method), which has cropped up recently wit the
removal of boottime variable.


a slighly modified version of this patch (modified to handle
the old boottime variable over the new one) works against a
netbsd-9 vmstat in -current too.

XXX: pullup
2020-01-04 03:09:55 +00:00
pgoyette
4e7fb68a54 Resurrect boottime, but only in the compat_90 module (whether built-in
or separately loaded).  This will enable running of old vmstat(1) images
on newer kernels.
2020-01-04 02:40:22 +00:00
thorpej
47e0e1cb69 No need to use I2C_F_POLL here. 2020-01-04 02:21:15 +00:00
jmcneill
453c4aa9e9 Initialize drm_bridge and drm_panel locks. 2020-01-03 21:01:16 +00:00
thorpej
45caeb7639 boottime in the kernel is no more. Instead, read timebasebin and convert
from bintime to timespec.
2020-01-03 19:13:54 +00:00