Commit Graph

298783 Commits

Author SHA1 Message Date
andvar 8a36802c94 fix various typos in comments and one output message. 2022-10-31 21:22:05 +00:00
andvar 9265b35916 s/singled/single/ 2022-10-31 20:35:02 +00:00
andvar 81ea19bc4d s/interrut/interrupt/ and s/accelelerator/accelerator/ in comments. 2022-10-31 20:30:22 +00:00
martin f92b574459 Remove declaration of landisk_pci_intr_setattr - macro magic later
creates one from the MI declaration instead.
2022-10-31 15:57:52 +00:00
martin 2531fedbda Fix signature of landisk_pci_intr_setattr 2022-10-31 15:56:40 +00:00
macallan 63ff6ce196 This is X11's 75dpi/term14.bdf, use if you want your console to look like an
xterm. Unlike QVSS this font contains accented characters, umlauts etc.
2022-10-31 13:24:58 +00:00
simonb 2014b543d4 Use PRIx64 in a debug print macro to print a uint64_t. 2022-10-31 13:00:34 +00:00
simonb 9af5ed22d6 In bus_space_write_{1,2,4,8} store the correct register in write to device. 2022-10-31 12:50:49 +00:00
simonb a1923cb127 Fix tyop in END for generic_bs_r_8. 2022-10-31 12:49:18 +00:00
simonb 6abe31b74d Provide an empty ASSERT macro ifdef _STANDALONE. 2022-10-31 10:44:29 +00:00
simonb 424b4ac256 Whitespace nit. 2022-10-31 10:32:28 +00:00
wiz 018c746c3c mdocml: stop building (empty) compat replacement file for reallocarray 2022-10-31 09:37:37 +00:00
wiz 4bcdf1483a remove (AFAIKT) unused _OPENBSD_SOURCE 2022-10-31 09:30:43 +00:00
wiz b4f71e776b dhcpcd: _OPENBSD_SOURCE does not need to be defined any longer
reallocarray() is in the public namespace now
2022-10-31 09:27:23 +00:00
simonb ee1cd1a7f3 Fix (invalid) gcc uninitialised warning with i386 gcc using -Os. 2022-10-31 09:14:18 +00:00
simonb b132f31296 Only need TIMESPEC_OVERFLOW() to check against INT32_{MIN,MAX} on FreeBSD. 2022-10-31 04:50:12 +00:00
ozaki-r 24c607fd3f tcp: fix wrong logic in tcp_drop
Pointed out by mlelstv@
2022-10-31 00:56:33 +00:00
jmcneill 1d006a2a8d Remove dirty fb IOCTL callback introduced in latest drm update.
Not sure how this got here, but the rkdrm driver does not need to do
damage tracking as it uses Normal-NC (uncached) mappings.

PR# port-arm/56596
2022-10-30 23:10:43 +00:00
christos 21a4b1ccc3 improvements in malloc/free handling. 2022-10-30 19:11:31 +00:00
jmcneill 155e7aa0de Silence a warning when machdep.dmi.chassis-asset-tag is not present 2022-10-30 15:08:50 +00:00
riastradh 6b86e6a0dd aarch64/pmap: Fix criterion in previous.
Use the pte bit that says whether this is a PMAP_WIRED page, not the
bit that says whether this is a non-global page.

(Forgot to git commit --amend before exporting to CVS, sorry!)
2022-10-30 14:08:09 +00:00
jmcneill ee5caec1b4 Add GPIO support.
PR# kern/57030
2022-10-30 11:51:19 +00:00
riastradh 96f9bbe345 aarch64/pmap(9): Teach pmap_protect about pmap_kenter_pa mappings.
Pages mapped with pmap_kenter_pa are necessarily unmanaged, so there
are no P->V records, and pmap_kenter_pa leaves pp->pp_pv.pv_va zero
with no modified/referenced state.

However, pmap_protect erroneously examined pp->pp_pv.pv_va to
ascertain the modified/referenced state -- and if the page was not
marked referenced, pmap_protect would clear the LX_BLKPAG_AF bit
(Access Flag), with the effect that subsequent uses of the page fault
and require a detour through pmap_fault_fixup.

This caused problems for the kernel module loader:

- When loading the text section, kobj_load first allocates kva with
  uvm_km_alloc(UVM_KMF_WIRED|UVM_KMF_EXEC), which creates ptes with
  pmap_kenter_pa.  These ptes are writable, so we can copy the text
  section into them, and have LX_BLKPAG_AF set so there will be no
  fault when they are used by the kernel.

- But then kobj_affix makes the text section read/execute-only (and
  nonwritable) with uvm_km_protect(VM_PROT_READ|VM_PROT_EXECUTE),
  which updates the ptes with pmap_protect.  This _should_ leave
  LX_BLKPAG_AF set, but by inadvertently treating the page as managed
  when it should be unmanaged, pmap_protect cleared it instead.

- Most of the time, clearing LX_BLKPAG_AF caused no problem, because
  pmap_fault_fixup would silently resolve it.  But if a hard
  interrupt handler tried to use any page in the module's text (or
  rodata, I suspect) that was not yet fixed up, the CPU would fault
  and enter pmap_fault_fixup -- which would promptly crash (or hang)
  by trying to take the pmap lock in interrupt context, which is
  forbidden.

  I observed this by loading dtrace.kmod early at boot and trying to
  dtrace hard interrupt handlers.

With this change, pmap_protect now recognizes wired mappings (as
created by pmap_kenter_pa) before consulting pp->pp_pv.pv_va, and
preserves then LX_BLKPAG_AF bit in that case.

ok skrll
2022-10-30 10:26:48 +00:00
riastradh 159bf5332b arm/pic: Sprinkle dtrace probes on interrupt handlers like x86. 2022-10-30 10:20:45 +00:00
kre f5579b3a9f Add missing backward compat links that were in the tzdata2022f
release, but didn't make it into the tzdata2022fgtz fork that
we use - and nor did the original zone data come back.

Links seem adequate for these (and were all some of them ever were).
2022-10-30 10:00:16 +00:00
ozaki-r 72e94eff7b tcp: restore NULL check for inp in tcp_ctloutput 2022-10-30 08:45:46 +00:00
gutteridge 954d646f97 makemandb.c: fix grammar in a comment 2022-10-30 01:49:30 +00:00
kre 1c627bdffa PR bin/57053 is related (peripherally) here.
sh has been remembering the process group of a job for a while now, but
using that for almost nothing.

The old way to resume a job, was to try each pid in the job with a
SIGCONT (using it as the process group identifier via killpg()) until
one worked (or none did, in which case resuming would be impossible,
but that never actually happened).   This wasn't as bad as it seems,
as in practice the first process attempted was *always* the correct
one.  Why the loop was considered necessary I am not sure.  Nothing
but the first could possibly work.

This worked until a fix for an obscure possible bug was added a
while ago - now a process which has already finished, and had its
zombie collected via wait*() is no longer ever considered to have
a pid which is a candidate for use in any system call.  That's
because the kernel might have reassigned that pid for some newly
created process (we have no idea how much time might have passed
since the pid was returned to the kernel for reuse, it might have
happened weeks ago).

This is where the example in bin/57053 revealed a problem.

That PR is really about a quite different problem in zsh (from pksrc)
and should be pkg/57053, but as the test case also hit the problem
here, it was assumed (by some) they were the same issue.

The example is (in a small directory)
	ls | less
which is then suspended (^Z), and resumed (fg).   Since the directory
is small, ls will be finished, and reaped by sh - so the code would
now refuse to use its pid for the killpg() call to send the SIGCONT.
The (useless) loop would attempt to use less's pid for this purpose
(it is still alive at this point) but that would fail, as that pid
is not a process group identifier, of anything.   Hence the job
could not be resumed.

Before the PR (or preceding mailing list discussion) the change here
had already been made (part of a much bigger set of changes, some of
which might follow - sometime).   We now actually use the job's
remembered process group identifier when we want the process group
identifier, instead of trying to guess which pid it happens to be
(which actually never took any guessing, it was, and is always the
pid of the first process created for the job).   A couple of minor
fixes to how the pgrp is obtained, and used, accompany the changes
to use it when appropriate.
2022-10-30 01:46:16 +00:00
kre ec520a6a57 Note in the description of "jobs -p" that the process id returned is
also the process group identifier (that's a requirement from POSIX, and
is what we have always done - just not been explicit about in sh.1).
Add a note that this value and $! are not necessarily the same (currently,
and perhaps forever, never the same in a pipeline with 2 or more elements).
2022-10-30 01:19:08 +00:00
kre e14d282f54 Note tzdata 2022f update (via 2022fgtz) 2022-10-30 01:05:47 +00:00
kre 4cd07e03c6 Merge tzdata2022f 2022-10-30 01:03:46 +00:00
kre 4e8678255f Import tzdata2022f from
https://github.com/JodaOrg/global-tz/releases/download/2022fgtz/tzdata2022fgtz.tar.gz

Summary of changes in tzdata2022f (2022-10-28 18:04:57 -0700):
  * Mexico will no longer observe DST after 2022, except for areas
    near the US border that continue to observe US DST rules.
  * Fiji will not observe DST in 2022/3.
  * Simplify four Ontario zones, as most of the post-1970 differences
    seem to have been imaginary.
2022-10-30 01:02:50 +00:00
mrg bb9b328495 add new libXpresent manuals. 2022-10-29 21:06:48 +00:00
mrg 10fd325e6c updates for new libXext, libXmu, libXpresent and libxkbfile. 2022-10-29 21:06:15 +00:00
jmcneill 080a694d36 sun8icodec: Update for binding spec changes.
The allwinner,sun8i-a33-codec binding spec has changed[1] to allow for
#sound-dai-cells to be either 0 or 1, to allow exporting multiple DAIs
from the codec.

This change updates the driver to allow #sound-dai-cells of either 0 or 1
while still only supporting AIF1 for the time being.

[1] 880e007f15
2022-10-29 19:07:39 +00:00
ozaki-r 20dda336f5 tcp: restore NULL checks for inp 2022-10-29 15:35:16 +00:00
riastradh 343a1f3d3f arm/pic: Use a local variable to reduce #ifdef scope.
Avoids straddling a conditional this way.
2022-10-29 15:13:27 +00:00
jmcneill 050f5a237b GC unused files. 2022-10-29 14:01:36 +00:00
riastradh b78d5ac757 sys/sdt.h: Predict dtrace probe branches not taken in SDT_PROBE*.
This should help reduce the overhead of KDRACE_HOOKS while you're not
actually tracing anything!  Shoulda done this ages ago...
2022-10-29 14:00:12 +00:00
jmcneill f5917b16bf No need for SOC_VIRT, the default arm platform will take care of things. 2022-10-29 13:59:57 +00:00
riastradh 821ea67ecd x86: Add dtrace probes for interrupt handler entry and return.
Arguments:

0: interrupt handler function
1: interrupt handler's private cookie argument
2: MD struct intrhand pointer
3: return value (true if relevant to this handler, false if not)

The MD struct intrhand pointer makes the first two arguments
redundant, but we might reuse the signature of the first two
arguments for an MI SDT probe to make it easy to write MI dtrace
scripts for monitoring interrupt handlers.  The MD intrhand can be
used for getting more information about the interrupt like ih_level,
ih_pin, ih_slot, &c., which may not make sense as an MI API.
2022-10-29 13:59:04 +00:00
christos fb30c7e6a4 new tzcode 2022f 2022-10-29 13:57:38 +00:00
christos 1e7378f887 Update to tzcode2022f
Changes to code

    zic now supports links to links regardless of input line order.
    For example, if Australia/Sydney is a Zone, the lines
      Link Australia/Canberra Australia/ACT
      Link Australia/Sydney Australia/Canberra
    now work correctly, even though the shell commands
      ln Australia/Canberra Australia/ACT
      ln Australia/Sydney Australia/Canberra
    would fail because the first command attempts to use a link
    Australia/Canberra that does not exist until after the second
    command is executed.  Previously, zic had unspecified behavior if
    a Link line's target was another link, and zic often misbehaved if
    a Link line's target was a later Link line.

    Fix line number in zic's diagnostic for a link to a link.

    Fix a bug that caused localtime to mishandle timestamps starting
    in the year 2438 when reading data generated by 'zic -b fat' when
    distant-future DST transitions occur at times given in standard
    time or in UT, not the usual case of local time.  This occurs when
    the corresponding .zi Rule lines specify DST transitions with TO
    columns of 'max' and AT columns that end in 's' or 'u'.  The
    number 2438 comes from the 32-bit limit in the year 2038, plus the
    400-year Gregorian cycle.  (Problem reported by Bradley White.)

    On glibc 2.34 and later, which optionally supports 64-bit time_t
    on platforms like x86 where time_t was traditionally 32 bits,
    default time_t to 64 instead of 32 bits.  This lets functions like
    localtime support timestamps after the year 2038, and fixes
    year-2038 problems in zic when accessing files dated after 2038.
    To continue to limit time_t to 32 bits on these platforms, use
    "make CFLAGS='-D_TIME_BITS=32'".

    In C code, do not enable large-file support on platforms like AIX
    and macOS that no longer need it now that tzcode does not use
    off_t or related functions like 'stat'.  Large-file support is
    still enabled by default on GNU/Linux, as it is needed for 64-bit
    time_t support.

    In C code, prefer C23 keywords to pre-C23 macros for alignof,
    bool, false, and true.  Also, use the following C23 features if
    available: __has_include, unreachable.

    zic no longer works around Qt bug 53071, as the relevant Qt
    releases have been out of support since 2019.  This change affects
    only fat TZif files, as thin files never had the workaround.

    zdump no longer modifies the environ vector when compiled on
    platforms lacking tm_zone or when compiled with -DUSE_LTZ=0.
    This avoid undefined behavior on POSIX platforms.
2022-10-29 13:55:50 +00:00
christos b74001cc4e don't require gettext 2022-10-29 13:53:35 +00:00
christos 53ca192d6b need gettext now 2022-10-29 13:53:19 +00:00
jmcneill 6779d0949a GC unused file 2022-10-29 13:42:40 +00:00
jmcneill 591d4abd3c Remove old OMAP port.
This code was a mess and full of unmaintainable SoC and board specific
ifdefs. A modern devicetree port for OMAP3530 and AM335x based boards
now lives in arch/arm/ti. If someone is interested in bringing back
support for any boards lost in this transition, feel free, but please
do so using the new devicetree based model.
2022-10-29 13:37:59 +00:00
jmcneill e6aa850730 Build fixes. 2022-10-29 13:29:46 +00:00
jmcneill 539c42c460 Remove support for TI OMAP 2420 and 2430 eval boards.
This is part of the arch/arm/omap removal.
2022-10-29 13:24:35 +00:00
jmcneill d7b735865c Remove support for TI OMAP 5912 OSK board.
This is part of the arch/arm/omap removal.
2022-10-29 13:22:23 +00:00