Commit Graph

300352 Commits

Author SHA1 Message Date
riastradh fcc6bc9f92 xhci(4): Avoid crash in suspend/resume/resume if first resume fails.
Rather than try to recover from this, just make new commands fail so
at least we don't deadlock.

XXX pullup-9
XXX pullup-10
2023-04-09 20:41:28 +00:00
chs 916c1920bc ld.elf_so powerpc: remove bogus ldscript
This ldscript is not needed and actually makes things worse by putting
everything in one LOAD section, which then needs to have rwx permission.
Remove it so that we get two LOAD sections with better permissions.
Fixes PR 57323.
2023-04-09 17:24:48 +00:00
riastradh a812fa9bc4 uvm: Simplify assertion in uvn_get.
No functional change intended.
2023-04-09 12:37:12 +00:00
riastradh bfe8d26204 nfs: Simplify assertion. No functional change intended. 2023-04-09 12:33:58 +00:00
riastradh 0864f7bbd1 dwc2: KASSERT(A && B) -> KASSERT(A); KASSERT(B) 2023-04-09 12:31:10 +00:00
riastradh 9234d94be5 compat_linux32: KASSERT(A && B) -> KASSERT(A); KASSERT(B) 2023-04-09 12:29:26 +00:00
riastradh ab579ad815 genfs: KASSERT(A && B) -> KASSERT(A); KASSERT(B) 2023-04-09 12:26:36 +00:00
riastradh 4049dd6688 pool(9): Tweak branch prediction in pool_cache_get_paddr assertion.
No functional change intended.
2023-04-09 12:21:59 +00:00
riastradh 088c22de34 kpause(9): Simplify assertion. No functional change intended. 2023-04-09 12:16:42 +00:00
riastradh 1c9101f9c5 pool(9): Simplify assertion in pool_update_curpage.
Add message while here.
2023-04-09 12:16:34 +00:00
riastradh 0dec6ba3d5 kern: KASSERT(A && B) -> KASSERT(A); KASSERT(B) 2023-04-09 09:18:09 +00:00
riastradh a83cdbec2d uvm(9): KASSERT(A && B) -> KASSERT(A); KASSERT(B) 2023-04-09 09:00:56 +00:00
riastradh 3729a876f1 kmem(9): Tweak branch predictions in fast paths. 2023-04-09 08:50:20 +00:00
riastradh ba7fde6fa4 pserialize(9): Micro-optimize pserialize_read_exit.
Most of the time we're not cold, so let's convince gcc to make that a
statically predicted-not-taken branch.
2023-04-09 08:28:24 +00:00
riastradh 293a328ef2 i386: Make curlwp and curcpu() flushable.
The only effect of the `volatile' qualifier on an asm block with
outputs is to force the instructions to appear in the generated code,
even if the outputs end up being unused.  Since these instructions
have no (architectural) side effects -- provided %fs is set
correctly, which must be the case here -- there's no need for the
volatile qualifier, so nix it.
2023-04-09 08:18:03 +00:00
riastradh e0aed50401 amd64: Make curlwp and curcpu() flushable.
The only effect of the `volatile' qualifier on an asm block with
outputs is to force the instructions to appear in the generated code,
even if the outputs end up being unused.  Since these instructions
have no (architectural) side effects -- provided %gs is set
correctly, which must be the case here -- there's no need for the
volatile qualifier, so nix it.
2023-04-09 08:17:56 +00:00
riastradh 83045faf04 pserialize(9): Micro-optimize pserialize_not_in_read_section_p.
Load l_ncsw to test whether we have been preempted, rather than
loading and storing l_nopreempt (via function call) to prevent it.
2023-04-09 08:17:45 +00:00
riastradh 35b24c4189 ASSERT_SLEEPABLE(9): Micro-optimize this a little bit.
This convinces gcc to do less -- make a smaller stack frame, compute
fewer conditional moves in favour of predicted-not-taken branches --
in the fast path where we are sleepable as the caller expects.

Wasn't able to convince it to do the ncsw loop with a
predicted-not-taken branch, but let's leave the __predict_false in
there anyway because it's still a good prediction.
2023-04-09 08:17:36 +00:00
lukem 6db0a1447b Simplify includes
Include "ftp_var.h" instead of various system headers and "extern.h".
2023-04-09 06:10:03 +00:00
skrll 643de9dc50 Spaces to TAB 2023-04-07 12:09:13 +00:00
rillig 4a6b523bf5 lint: reduce clutter in parsing preprocessor lines
No functional change.
2023-04-07 11:08:31 +00:00
kre 5409234e44 Remove an end of file trailing blank line that served no purpose.
NFCI
2023-04-07 10:42:28 +00:00
kre 0827e1f954 The great shell trailing whitespace cleanup of 2023...
Inspired by private e-mail comments from mouse@

NFCI.
2023-04-07 10:34:13 +00:00
riastradh 315d854796 xhci(4): Defer root intr xfers while polling.
Root intr xfers require taking adaptive locks, which is forbidden
while polling.

This is not great -- any USB transfer completion callbacks might try
to take adaptive locks, not just uhub_intr, and that will always
causes trouble.  We get lucky with ukbd_intr because it's not
MP-safe, so it relies only on the kernel lock (a spin lock) anyway.
But this change brings xhci in line with ehci.

PR kern/57326

XXX pullup-8
XXX pullup-9
XXX pullup-10
2023-04-07 09:39:48 +00:00
skrll 8d564c5dcf Rename ARM_PLATFORM to FDT_PLATFORM and make it available outside arm. 2023-04-07 08:55:29 +00:00
mlelstv eafba8f7a7 Select virtual address as sender if backing interface is anonymous.
Use correct scope for IPv6.
2023-04-07 06:44:08 +00:00
rillig ae7d3ae167 tests/make: add cross references to command line tests 2023-04-07 05:54:16 +00:00
simonb 81544015b5 #define<tab> 2023-04-07 03:01:21 +00:00
hannken 7b41b3a3a7 Fix StaticSpinMutex::CheckLocked() on sparc32.
The lock gets set with atomic_exchange() -> __sync_lock_test_and_set()
which sets the value to 255 instead of 1.  Check for a taken lock
with "!= 0" instead of "== 1".  This should work on all architectures.

Ok: Matthew Green
2023-04-06 09:49:12 +00:00
msaitoh 27d8416c68 Regen. 2023-04-06 04:44:08 +00:00
msaitoh 4566a5cf12 The SAATA device ID for Apollo Lake is not 0x5ae0 but 0x5ae3. 2023-04-06 04:43:43 +00:00
andvar e31f1e950f remove some double ee typos in comments. 2023-04-05 21:53:56 +00:00
andvar 69c379a412 s/esssentially/essentially/ in comment. 2023-04-05 21:46:09 +00:00
rillig f92802e558 lint: fix duplicate warning when parsing big float constants 2023-04-05 20:17:30 +00:00
rillig cc35e66604 tests/lint: demonstrate duplicate warning when parsing big floats 2023-04-05 20:13:01 +00:00
andvar 45758f9ad4 s/termintaed/terminated/ in comment. 2023-04-05 19:56:27 +00:00
hannken cdfeb388f7 Fix StaticSpinMutex::CheckLocked() on sparc32.
The lock gets set with atomic_exchange() -> __sync_lock_test_and_set()
which sets the value to 255 instead of 1.  Check for a taken lock
with "!= 0" instead of "== 1".  This should work on all architectures.

Ok: Matthew Green
2023-04-05 07:41:38 +00:00
rillig dd57c37d01 mount_portal: fix lint warnings about extern and empty declarations 2023-04-04 20:39:36 +00:00
rillig ac4858990d mmcformat: KNF
Remove trailing whitespace, sort headers, add RCS ID, unexport global
variable.
2023-04-04 20:28:01 +00:00
rillig 723f5ee174 mmcformat: remove redundant extern declarations
No binary change.
2023-04-04 20:17:01 +00:00
jschauma e3a2734871 +RBL, DNSBL
reputation block list
real-time blackhole list
DNS block list
2023-04-04 20:13:02 +00:00
he ac0941c572 Fix the test for "inf" output, also include newline in printf format... 2023-04-04 19:39:38 +00:00
christos 30cc241785 Add a test for PR/57250 from Havard Eidnes 2023-04-04 19:30:11 +00:00
christos c41e469284 PR/57250: Martin Husemann: dtoa mishandles infinite doubles on 32bit big
endian machines. When long double support was added, the old code was kept
for the regular double code. This code was never used because WIDE_DOUBLE
was always defined in the Makefile. Remove that old code, and conditionalize
the WIDE_DOUBLE code based on if long doubles are different than doubles on
the specific platform.
2023-04-04 19:26:06 +00:00
gutteridge 57f997550b t_magic_symlinks.sh: fix line continuation in realpath head()
This wasn't noticed before because the name of the head() itself was
wrong, and was being ignored.
2023-04-03 21:35:59 +00:00
gutteridge f56d3fb7f1 t_magic_symlinks.sh: fix naming of head() of realpath test case
Addresses part of PR kern/57319 from Jim Spath.
2023-04-03 20:08:38 +00:00
gutteridge 6c0defe27f Fix typos: s/trough/through/ 2023-04-03 18:03:23 +00:00
gutteridge 25cf7d1c7f usermode/syscall.c: s/fall trough/FALLTHROUGH/ (KNF) 2023-04-03 17:58:41 +00:00
riastradh 0efe4bae0c libc atomic: Make previous work a little less accidentally. 2023-04-03 16:45:46 +00:00
gutteridge bc0862c3a1 atf-run_test.sh: fix spelling of "through"
Reported by Jim Spath in PR misc/57318.
2023-04-03 16:26:50 +00:00