Commit Graph

289248 Commits

Author SHA1 Message Date
rillig eda0f67152 lint: clean gcov files for lint2 and xlint as well 2021-08-07 17:38:41 +00:00
thorpej 4b4b2c112f thorpej-cfargs2 merged. 2021-08-07 16:21:02 +00:00
thorpej 2540f5896a Update for thorpej-cfargs2. 2021-08-07 16:20:02 +00:00
thorpej c7fb772b85 Merge thorpej-cfargs2. 2021-08-07 16:18:40 +00:00
riastradh 4d34810834 sun8icrypto(4): Call crypto_unblock when a task completes.
Otherwise under load this would presumably just hang after returning
ERESTART to opencrypto.
2021-08-07 15:41:00 +00:00
thorpej a96c569c89 Document thorpej-futex2. 2021-08-07 14:19:12 +00:00
macallan 2dd217f24a pass sensor locations to i2c devices if we can find them
tested on 2nd gen Mini
2021-08-07 06:04:26 +00:00
rin 4689515669 Make sure that buffers allocated by lua_alloc() are aligned to 8-byte
boundaries as done by kmem_alloc(9).

Fix alignment faults on armv5te; GCC emits ldrd/strd instructions for
memory operands that are guaranteed to be aligned properly.

Drop unnecessary __packed attribute from alloc_header_t at the same time.
2021-08-07 04:19:31 +00:00
isaki 5aeec4b8b4 x68k now uses KAUTH_MACHDEP_UNMANAGEDMEM. 2021-08-07 03:28:42 +00:00
dholland 22cff1a7de typo 2021-08-07 03:17:23 +00:00
jmcneill 81be3b13bd Arm: Add support for SMC Calling Convention
Arm DEN0028 defines a calling mechanism used with Secure Monitor Call (SMC)
and Hypervisor Call (HVC) instructions. To discover SMCCC, we must:

 1) Find the PSCI conduit (either via ACPI FADT, or Device Tree)
 2) Use PSCI_VERSION to determine whether PSCI_FEATURES is supported
 3) Call PSCI_FEATURES with SMCCC_VERSION to determine the implementation
    version.
2021-08-06 19:38:53 +00:00
tnn 89c65183f5 conditionally put back the include of <uvm/uvm_page.h>
This is a kludge to fix the build on some ports. According to pmap(9),
including <uvm/uvm_extern.h> should be sufficient to use
"bool pmap_is_modified(struct vm_page *pg)". However, on several ports,
the function is implemented as a macro and depends on implementation
details of "struct vm_page *", which is normally an incomplete forward
declaration only. XXX revert when all ports are fixed.
2021-08-06 18:15:48 +00:00
rillig ff4ff79c89 tests/lint: add tests for declared but unused variables 2021-08-06 16:21:00 +00:00
rin 0a29e87b23 Simplify i80321_intr_calculate_masks().
G/C unused members of struct intrq.

No functional changes intended.
2021-08-06 09:01:36 +00:00
rin 137b9f5c27 Do *NOT* lower IPL in i80321_splraise().
Fix various strange crashes for DIAGNOSTIC kernel on evbarm/HDL_G,
including one worked around by if_wm.c rev 1.706:

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/pci/if_wm.c#rev1.706
2021-08-06 08:58:42 +00:00
martin fb69eb3d0e Fix copy+pasto (wrong dir for t_lint2) 2021-08-06 08:44:31 +00:00
andvar ba70c588fa fix various typos in comments. 2021-08-06 07:55:13 +00:00
tsutsui f1a61a6198 Fix mm_md_physacc() to allow only accesses to a region of RAMs.
Note on NetBSD/news68k RAMs reserved by the PROM (at the end of the RAM)
are not managed.
2021-08-06 05:53:50 +00:00
tsutsui ec8d06c928 Add comments how mm_md_physacc() for hp300 works.
mm_md_physacc() for all other hp300 pmap based m68k ports that copied
hp300 implemantation should have been fixed properly.

XXX: no mm(9) man pages that describe MD implementation API definitions.
2021-08-06 05:22:21 +00:00
isaki 1c891fbe55 Fix broken mm_md_physacc().
- Fix access to main memory and extended memory.
  This makes /dev/mem work again.
- Introduce kauth(9) to access unmanaged memory area.
  Now you can read/write the internal I/O space via /dev/mem when
  securelevel = -1.
Thanks ryo@, tsutsui@ for advices and reviews.
2021-08-06 04:21:56 +00:00
rillig 2e1c5b53fe tests/lint: add test skeletons for messages from lint2 2021-08-05 22:36:07 +00:00
tnn 2e6662efc3 ssdfb: revert rev 1.14
Can't run the worker thread MPSAFE with spi(4) yet because most controller
drivers still lack MP safety. Cause issues when using multiple displays.
2021-08-05 22:31:20 +00:00
tnn 2fb83002a9 ssdfb(4): note SSD1353 support 2021-08-05 19:23:44 +00:00
tnn 8a6d0e07fd ssdfb: fix some constant names. NFC because the same cmd code is used 2021-08-05 19:17:22 +00:00
tnn 5db0713992 ssdfb: support SSD1353 at spi(4) 2021-08-05 19:08:59 +00:00
tnn 777b2a127e ssdfb: support the SSD1353 controller and the DEP 160128A(1)-RGB display
DEP 160128A is a 160x128 18-bit RGB OLED display module advertised as
having an 8-bit parallel I/O interface. The controller can however attach
serially via spi(4) by moving jumper resistors J1 and J2 to GND position.
2021-08-05 19:07:09 +00:00
kre e1efa60439 Obliterate bogus $@ usage.
While here, fix some quoting, change some style, and attempt
to properly handle wedge names with embedded newlines, and those
that end with a '/' character (not particularly happy with the
solution to that last one, but it is better than it was).

Is there a reason that characters that need encoding in wedge names
(white space, and more) are encoded as %%XX (XX is the hex value of
the char - but 2 % chars?  Why?).   That remains unchanged, but as
the script already relied upon sh's $'...' quoting, I think we can rely
upon printf as well, so replace the old (very elegant, but slow) encoding
function with a much simpler one (does the same thing).
2021-08-05 12:52:47 +00:00
kre a9596d155d Expunge bogus (implementation defined / unspecified) uses of $@ in
scripts.   $@ is unspecified except when used in a place where
field splitting can occur (which is never in an assignment),
X=$@ (with or without double quotes) is simply wrong.

Use $* instead of $@ in such places, or as here, simply change
the way things are done (very very slightly) and DTRT.
2021-08-05 12:45:33 +00:00
rillig 274819d49d lint: fix type of local variable in inpqstrg
Noted by Clang-Tidy.
2021-08-05 06:54:16 +00:00
rillig a8491acb76 lint: fix handling of __int128_t/__uint128_t in lint2
Previously, lint exited with "bad type: J u".
2021-08-05 06:45:37 +00:00
rillig 827aba3693 tests/lint: test emitting 128-bit integer types for lint2 2021-08-05 06:34:42 +00:00
tnn bc6773dd48 ssdfb: prepare for supporting rgb color displays 2021-08-05 00:16:36 +00:00
tnn 8e00451167 ssdfb: make it work on big-endian 2021-08-05 00:02:51 +00:00
mlelstv 781b58d06f Swap and Dump uses DEV_BSIZE units. Translate from device sectors like
regular I/O (strategy).
2021-08-04 21:44:41 +00:00
nia a3d8d8e3ac doc: more MPSAFE interfaces 2021-08-04 13:50:47 +00:00
andvar 461f07c9e2 fix typos in puffs man pages. 2021-08-04 09:31:25 +00:00
christos 72e6c96f3b Get the value of the right variable (from RVP) 2021-08-04 08:47:10 +00:00
chs 5b182ca27f revert rev 1.45:
"PR/54435: Adjust for new kernel behavior of soreceive(9) clearing MSG_OOB"

That change was trying to make rlogin work again after the SIOCATMARK ioctl
was broken, but that kernel bug has now been fixed, so the original rlogin code
now works again.  Further, the changed rlogin code actually did the wrong thing,
by treating reception of the MSG_OOB byte as meaning that we are now
"at the mark", but that is not true... we are "at the mark" only when
we have reached the point in the stream where the MSG_OOB byte was originally,
as indicated by SIOCATMARK.  So going back to the previous code seems best
all around.  ok'd by christos.
2021-08-03 23:21:07 +00:00
andvar d42188d8bf Fix various typos in comments. Also add missing NetBSD RCS Id in some of these files. 2021-08-03 23:12:14 +00:00
rillig 3c10f94429 lint: in strict enum mode, error out on enum type mismatch in union cast 2021-08-03 21:18:24 +00:00
rillig d1299c8ce2 lint: merge almost duplicate code from 'sametype' into 'eqtype'
In 'sametype', the branch for comparing array types was unreachable
since it requires both tspecs to be the same, but t2 underwent the
array-to-pointer conversion.

Previously, lint warned about enum type mismatches, even without -e for
strict enum mode.  Instead, it got the case for 'char *' wrong, which is
now fixed.  Now lint behaves like GCC 10.3.0 in this regard.  The
warning about enum mismatch is useful though, so it may be re-added in a
future commit.
2021-08-03 21:09:26 +00:00
andvar bfc9dbf5d0 s/pasword/password/ 2021-08-03 20:59:20 +00:00
rillig 0f4668a0cb lint: union casts are only available as a GCC extension, not in C99 2021-08-03 20:57:06 +00:00
rillig f8af5145ec tests/lint: prepare non-GCC test for union casts 2021-08-03 20:46:10 +00:00
rillig a88eea7df9 tests/lint: test GCC extension for casting to union type 2021-08-03 20:34:23 +00:00
chs 3de28f092d in sbsavetimestamp(), initialize struct timeval to 0 with memset() so that
the implicit padding is initialized.  this avoids later copying uninitialized
memory out to user space.  detected by KMSAN.
2021-08-03 20:27:08 +00:00
chs 7d586a0b9c initialize wc_unused to 0, to avoid writing uninitialized memory to disk.
detected by KMSAN.
2021-08-03 20:25:43 +00:00
chs 68e7f4602c do not descend into the man or tests directory.
this avoids a problem where git sets the file timestamps differently
than CVS does and accidentally causes make to try to rebuild
various targets that don't work during the tools build.
this matches the change that was made to Makefile.am in our tree.
2021-08-03 20:22:15 +00:00
rillig 84c976b4ec lint: add quotes around placeholder in message 214
function '%s' expects to return value
2021-08-03 18:44:33 +00:00
rillig 3c6cb8a22e lint: casting to a struct is not allowed in C99, only with GCC 2021-08-03 18:38:02 +00:00