<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/mips/include, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2021-12-31T03:57:24Z</updated>
<entry>
<title>mips: Remove sys/mips</title>
<updated>2021-12-31T03:57:24Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2021-12-31T03:56:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c09981f1422ef0d44042dacc5d1265392fba39f1'/>
<id>urn:sha1:c09981f1422ef0d44042dacc5d1265392fba39f1</id>
<content type='text'>
Remove sys/mips as the next step of decomissioning mips from the tree.
Remove mips special cases from the kernel make files. Remove the mips
specific linker scripts.

Sponsored by:		Netflix
</content>
</entry>
<entry>
<title>Simplify swi for bus_dma.</title>
<updated>2021-12-28T21:51:25Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2021-12-28T21:51:25Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=254e4e5b77d7788c46333ae35d5e9f347e22c746'/>
<id>urn:sha1:254e4e5b77d7788c46333ae35d5e9f347e22c746</id>
<content type='text'>
When a DMA request using bounce pages completes, a swi is triggered to
schedule pending DMA requests using the just-freed bounce pages.  For
a long time this bus_dma swi has been tied to a "virtual memory" swi
(swi_vm).  However, all of the swi_vm implementations are the same and
consist of checking a flag (busdma_swi_pending) which is always true
and if set calling busdma_swi.  I suspect this dates back to the
pre-SMPng days and that the intention was for swi_vm to serve as a
mux.  However, in the current scheme there's no need for the mux.

Instead, remove swi_vm and vm_ih.  Each bus_dma implementation that
uses bounce pages is responsible for creating its own swi (busdma_ih)
which it now schedules directly.  This swi invokes busdma_swi directly
removing the need for busdma_swi_pending.

One consequence is that the swi now works on RISC-V which had previously
failed to invoke busdma_swi from swi_vm.

Reviewed by:	imp, kib
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D33447
</content>
</entry>
<entry>
<title>Add &lt;machine/tls.h&gt; header to hold MD constants and helpers for TLS.</title>
<updated>2021-12-09T21:17:13Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2021-12-09T21:17:13Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1a62e9bc0046bfe20f4dd785561e469ff73fd508'/>
<id>urn:sha1:1a62e9bc0046bfe20f4dd785561e469ff73fd508</id>
<content type='text'>
The header exports the following:

- Definition of struct tcb.
- Helpers to get/set the tcb for the current thread.
- TLS_TCB_SIZE (size of TCB)
- TLS_TCB_ALIGN (alignment of TCB)
- TLS_VARIANT_I or TLS_VARIANT_II
- TLS_DTV_OFFSET (bias of pointers in dtv[])
- TLS_TP_OFFSET (bias of "thread pointer" relative to TCB)

Note that TLS_TP_OFFSET does not account for if the unbiased thread
pointer points to the start of the TCB (arm and x86) or the end of the
TCB (MIPS, PowerPC, and RISC-V).

Note also that for amd64, the struct tcb does not include the unused
tcb_spare field included in the current structure in libthr.  libthr
does not use this field, and the existing calls in libc and rtld that
allocate a TCB for amd64 assume it is the size of 3 Elf_Addr's (and
thus do not allocate room for tcb_spare).

A &lt;sys/_tls_variant_i.h&gt; header is used by architectures using
Variant I TLS which uses a common struct tcb.

Reviewed by:	kib (older version of x86/tls.h), jrtc27
Sponsored by:	The University of Cambridge, Google Inc.
Differential Revision:	https://reviews.freebsd.org/D33351
</content>
</entry>
<entry>
<title>mips: Rename TLS_DTP_OFFSET to TLS_DTV_OFFSET.</title>
<updated>2021-12-09T21:16:00Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2021-12-09T21:16:00Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=03f6b141068ee7f1004ebfc76242cf951494b7d2'/>
<id>urn:sha1:03f6b141068ee7f1004ebfc76242cf951494b7d2</id>
<content type='text'>
This is the more standard name for the bias of dtv pointers used on
other platforms.  This also fixes a few other places that were using
the wrong bias previously on MIPS such as dlpi_tls_data in struct
dl_phdr_info and the recently added __libc_tls_get_addr().

Reviewed by:	kib, jrtc27
Sponsored by:	The University of Cambridge, Google Inc.
Differential Revision:	https://reviews.freebsd.org/D33346
</content>
</entry>
<entry>
<title>Make struct syscall_args machine independent</title>
<updated>2021-12-08T18:45:33Z</updated>
<author>
<name>Brooks Davis</name>
<email>brooks@FreeBSD.org</email>
</author>
<published>2021-12-08T18:45:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=547566526f6ebdb7b78b6ab78d396b7ef2ec2a3b'/>
<id>urn:sha1:547566526f6ebdb7b78b6ab78d396b7ef2ec2a3b</id>
<content type='text'>
After a round of cleanups in late 2020, all definitions are
functionally identical.

This removes a rotted __aligned(8) on arm. It was added in
b7112ead32bc50ef9744099bdbb1cfbd6e906b2a and was intended to align the
args member so that 64-bit types (off_t, etc) could be safely read on
armeb compiled with clang. With the removal of armev, this is no
longer needed (armv7 requires that 32-bit aligned reads of 64-bit
values be supported and we enable such support on armv6).  As further
evidence this is unnecessary, cleanups to struct syscall_args have
resulted in args being 32-bit aligned on 32-bit systems.  The sole
effect is to bloat the struct by 4 bytes.

Reviewed by:	kib, jhb, imp
Differential Revision:	https://reviews.freebsd.org/D33308
</content>
</entry>
<entry>
<title>Implement GET_STACK_USAGE on remaining archs</title>
<updated>2021-11-30T15:15:56Z</updated>
<author>
<name>Mitchell Horne</name>
<email>mhorne@FreeBSD.org</email>
</author>
<published>2021-11-25T16:01:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0d2224733e970aaa67a4e1af7b340044adda92f6'/>
<id>urn:sha1:0d2224733e970aaa67a4e1af7b340044adda92f6</id>
<content type='text'>
This definition enables callers to estimate remaining space on the
kstack, and take action on it. Notably, it enables optimizations in the
GEOM and netgraph subsystems to directly dispatch work items when there
is sufficient stack space, rather than queuing them for a worker thread.

Implement it for riscv, arm, and mips. Remove the #ifdefs, so it will
not go unimplemented elsewhere.

PR:		259157
Reviewed by:	mav, kib, markj (previous version)
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32580
</content>
</entry>
<entry>
<title>netinet: Remove in_cksum_update()</title>
<updated>2021-11-24T18:31:15Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2021-11-24T18:15:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=09100f936be0684aa8caef441b96345960fd9c72'/>
<id>urn:sha1:09100f936be0684aa8caef441b96345960fd9c72</id>
<content type='text'>
It was never implemented on powerpc or riscv and appears to have been
unused since it was added in 1998.  No functional change intended.

Reviewed by:	kp, glebius, cy
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D33093
</content>
</entry>
<entry>
<title>minidump: Parameterize minidumpsys()</title>
<updated>2021-11-19T19:05:52Z</updated>
<author>
<name>Mitchell Horne</name>
<email>mhorne@FreeBSD.org</email>
</author>
<published>2021-11-17T15:26:59Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1adebe3cd6b1eb0973969e2c4c5d41f174caa304'/>
<id>urn:sha1:1adebe3cd6b1eb0973969e2c4c5d41f174caa304</id>
<content type='text'>
The minidump code is written assuming that certain global state will not
change, and rightly so, since it executes from a kernel debugger
context. In order to support taking minidumps of a live system, we
should allow copies of relevant global state that is likely to change to
be passed as parameters to the minidumpsys() function.

This patch does the work of parameterizing this function, by adding a
struct minidumpstate argument. For now, this struct allows for copies of
the kernel message buffer, and the bitset that tracks which pages should
be dumped (vm_page_dump). Follow-up changes will actually make use of
these arguments.

Notably, dump_avail[] does not need a snapshot, since it is not expected
to change after system initialization.

The existing minidumpsys() definitions are renamed, and a thin MI
wrapper is added to kern_dump.c, which handles the construction of
the state struct. Thus, calling minidumpsys() remains as simple as
before.

Reviewed by:	kib, markj, jhb
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D31989
</content>
</entry>
<entry>
<title>minidump: De-duplicate the progress bar</title>
<updated>2021-09-29T19:42:21Z</updated>
<author>
<name>Mitchell Horne</name>
<email>mhorne@FreeBSD.org</email>
</author>
<published>2021-09-29T17:44:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ab4ed843a303ea3e585f8ed3f79873e46d3b3ae3'/>
<id>urn:sha1:ab4ed843a303ea3e585f8ed3f79873e46d3b3ae3</id>
<content type='text'>
The implementation of the progress bar is simple, but duplicated for
most minidump implementations. Extract the common bits to kern_dump.c.
Ensure that the bar is reset with each subsequent dump; this was only
done on some platforms previously.

Reviewed by:	markj
MFC after:	2 weeks
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D31885
</content>
</entry>
<entry>
<title>Create sys/reg.h for the common code previously in machine/reg.h</title>
<updated>2021-08-30T11:50:53Z</updated>
<author>
<name>Andrew Turner</name>
<email>andrew@FreeBSD.org</email>
</author>
<published>2021-08-27T09:38:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b792434150d66b9b2356fb9a7548f4c7f0a0f16c'/>
<id>urn:sha1:b792434150d66b9b2356fb9a7548f4c7f0a0f16c</id>
<content type='text'>
Move the common kernel function signatures from machine/reg.h to a new
sys/reg.h. This is in preperation for adding PT_GETREGSET to ptrace(2).

Reviewed by:	imp, markj
Sponsored by:	DARPA, AFRL (original work)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D19830
</content>
</entry>
</feed>
