[TableGen] Declare <TargetName>RegClassByHwModeTables in MC header (#223292)
When a target uses RegClassByHwMode in CompressPat, the generated
functions reference <TargetName>RegClassByHwModeTables.
Declare it under GET_INSTRINFO_MC_HELPER_DECLS (<Target>MCTargetDesc.h)
so it is visible to MC-layer users such as RISCVBaseInfo.cpp.
Fixes: 700d1f029d00 ("[TableGen] Support RegClassByHwMode in
CompressPat")
Convert the zfs.resource services to the typesafe pattern
## Context
`zfs.resource`, `zfs.resource.snapshot` and `zfs.resource.pool` were already half-converted: public methods carried `@api_method(check_annotations=True)` against models in `api/v27_0_0/`, and most in-process consumers already went through `call2`. What was missing was the structural half - the service classes still held the implementation. `resource_crud.py` and `snapshot_crud.py` were 800+ lines each, mixing a 117-line create pipeline, destroy validation, path helpers and per-method exception translation in with the API surface.
## Solution
**Lean shims delegating to module functions.** The three services keep only their `Config`, decorators and docstrings, and hand off to plain functions taking a `ServiceContext` - the same shape `ports`, `hardware` and `boot` already use. The logic lands in `resource_{query,create,destroy,ops}.py`, `snapshot_ops.py` and `prefetch_ops.py`. `create_rules.py`'s three pool-inspecting helpers now take a `ServiceContext` rather than an untyped `service`, and while touching that file it picks up `from __future__ import annotations` so its annotations stop being quoted strings.
**Each service sits in a module named after its namespace** - `resource.py`, `snapshot.py`, `prefetch.py`, `tier.py` - and `plugins/zfs/__init__.py` stays a docstring. That is deliberate and worth keeping: around 30 modules elsewhere import cheap leaves of this package (`exceptions`, `zvol_utils`, `utils`, `encryption`), and `test/integration/assets/pool.py` - which 173 test files pull in, on the client side - is one of them. With the service in `__init__.py`, `from middlewared.plugins.zfs.exceptions import ZFSPathNotFoundException` went from a `typing` import to 1438 modules including `middlewared.service` and the `truenas_pylibzfs` C extension, which `tests/requirements.txt` does not install. It is now 145 and pulls neither. `plugins/zpool/` already splits this way for the same reason.
**`zfs.resource.pool` becomes a sub-service** of `zfs.resource` instead of only being picked up by the plugin loader, which gives it a `self.s` path. That was the last thing forcing untyped string calls into this namespace - `pool.dedup`, the failover event handler and the `pool.post_import` hook all use `call2` now, and no string call to `zfs.resource*` survives outside the over-the-wire tests.
**`special_vdev_thresholds` moves to `utils/zfs/tier.py`.** It is pure arithmetic over two config fields and never belonged behind a plugin; `alert.source.zfs_tier` was importing it from `plugins.zfs.tier`, and alert sources are imported while `middlewared.service` is still initialising, so that pulled a plugin package in before `Service` was bound. Worth knowing that nothing static catches this class of breakage - mypy, lint, ruff and the whole unit suite were green on a tree that could not start.
`GenericCRUDService` is not an option here - its metaclass forces `filters`/`options` onto `query`, and `zfs.resource.query` takes a single request model. The `*_impl` methods also still return dicts, so nothing outside `plugins/zfs/` changes how it reads a result. Public wire shapes are identical, checked by replaying the full API surface on a test VM and diffing against the same run before the change.
Convert the zfs.resource services to the typesafe pattern
## Context
`zfs.resource`, `zfs.resource.snapshot` and `zfs.resource.pool` were already half-converted: public methods carried `@api_method(check_annotations=True)` against models in `api/v27_0_0/`, and most in-process consumers already went through `call2`. What was missing was the structural half - the service classes still held the implementation. `resource_crud.py` and `snapshot_crud.py` were 800+ lines each, mixing a 117-line create pipeline, destroy validation, path helpers and per-method exception translation in with the API surface.
## Solution
**Lean shims delegating to module functions.** The three services keep only their `Config`, decorators and docstrings, and hand off to plain functions taking a `ServiceContext` - the same shape `ports`, `hardware` and `boot` already use. `ZFSResourceService` moves to `plugins/zfs/__init__.py` and the snapshot service to `snapshot.py`; the logic lands in `resource_{query,create,destroy,ops}.py`, `snapshot_ops.py` and `prefetch_ops.py`. `create_rules.py`'s three pool-inspecting helpers now take a `ServiceContext` rather than an untyped `service`, and while touching that file it picks up `from __future__ import annotations` so its annotations stop being quoted strings.
**`zfs.resource.pool` becomes a sub-service** of `zfs.resource` instead of only being picked up by the plugin loader, which gives it a `self.s` path. That was the last thing forcing untyped string calls into this namespace - `pool.dedup`, the failover event handler and the `pool.post_import` hook all use `call2` now, and no string call to `zfs.resource*` survives outside the over-the-wire tests.
**`alert.source.zfs_tier` imports its plugin helper inside the method that uses it.** `middlewared.service` pulls in every alert source while it is still initialising, so a module-level import of a plugin package re-enters it before `Service` is bound and startup dies with an ImportError. Worth knowing that nothing static catches this: mypy, lint, ruff and the whole unit suite were green on the broken tree.
`GenericCRUDService` is not an option here - its metaclass forces `filters`/`options` onto `query`, and `zfs.resource.query` takes a single request model. The `*_impl` methods also still return dicts, so nothing outside `plugins/zfs/` changes how it reads a result. Public wire shapes are identical, checked by replaying the full API surface on a test VM and diffing against the same run before the change.
Enforce canmount=noauto across the whole apps dataset tree
## Problem
We only re-assert canmount=noauto on the five structural ix-apps datasets, never on the per-app volume datasets beneath app_mounts. If one of those ends up canmount=on - a hand-rolled zfs recv migration, or simply the ZFS default when a replication task runs without properties - the boot mount sweep mounts it while correctly skipping its noauto parent, and docker then mounts /mnt/.ix-apps straight over the top. The volume stays mounted but unreachable: zfs reports mounted=yes, stat returns ENOENT, and the container fails with "bind source path does not exist". Nothing recovers from this on its own, because the remount path only mounts datasets reporting mounted=no.
## Solution
Walk the whole apps tree in a single query and set canmount=noauto wherever it drifted. This is hooked into the docker start reconcile and, more importantly, into pool import right after the root dataset properties are normalized. The import hook is what actually prevents the breakage - it runs while the pool is imported but none of it is mounted yet, so the recursive mount that follows never encounters a canmount=on descendant. Pool import cannot fail because of it; a failure only logs a warning.
A box already in the broken state comes up clean on its next boot, but until then it still cannot unset its apps pool.
Convert the zfs.resource services to the typesafe pattern
## Context
`zfs.resource`, `zfs.resource.snapshot` and `zfs.resource.pool` were already half-converted: public methods carried `@api_method(check_annotations=True)` against models in `api/v27_0_0/`, and most in-process consumers already went through `call2`. What was missing was the structural half - the service classes still held the implementation. `resource_crud.py` and `snapshot_crud.py` were 800+ lines each, mixing a 117-line create pipeline, destroy validation, path helpers and per-method exception translation in with the API surface.
## Solution
**Lean shims delegating to module functions.** The three services keep only their `Config`, decorators and docstrings, and hand off to plain functions taking a `ServiceContext` - the same shape `ports`, `hardware` and `boot` already use. `ZFSResourceService` moves to `plugins/zfs/__init__.py` and the snapshot service to `snapshot.py`; the logic lands in `resource_{query,create,destroy,ops}.py`, `snapshot_ops.py` and `prefetch_ops.py`. `create_rules.py`'s three pool-inspecting helpers now take a `ServiceContext` rather than an untyped `service`.
**`zfs.resource.pool` becomes a sub-service** of `zfs.resource` instead of only being picked up by the plugin loader, which gives it a `self.s` path. That was the last thing forcing untyped string calls into this namespace - `pool.dedup`, the failover event handler and the `pool.post_import` hook all use `call2` now, and no string call to `zfs.resource*` survives outside the over-the-wire tests.
**`alert.source.zfs_tier` imports its plugin helper inside the method that uses it.** `middlewared.service` pulls in every alert source while it is still initialising, so a module-level import of a plugin package re-enters it before `Service` is bound and startup dies with an ImportError. Worth knowing that nothing static catches this: mypy, lint, ruff and the whole unit suite were green on the broken tree.
`GenericCRUDService` is not an option here - its metaclass forces `filters`/`options` onto `query`, and `zfs.resource.query` takes a single request model. The `*_impl` methods also still return dicts, so nothing outside `plugins/zfs/` changes how it reads a result. Public wire shapes are identical, checked by replaying the full API surface on a test VM and diffing against the same run before the change.
[libc][math] Fix fast path with small inputs for double precision sin/cos. (#221012)
https://github.com/llvm/llvm-project/pull/201748 added a fast branch for
small inputs to double precision sin/cos,
but the Ziv error bounds were too tight.
Fixes in this PR:
- Updating the Ziv error bounds to accommodate rounding errors.
- Copy binary64 sin/cos hard-to-round cases from the CORE-MATH project.
- Add python tool to convert textual hard to round cases to binary
files, and add those binary files.
- Add hard-to-round tests for double precision sin/cos in the exhaustive
test folder.
Fixes https://github.com/llvm/llvm-project/issues/220934.
Assisted-by: Gemini is used to generate the worst-case text-to-binary
tool.
mux proxy sockets also share in and out fds, so using this as a
heuristic to decide whether the connection is on an inet/inet6
socket is incorrect.
Fixes breakage in t-multiplex after recent pledge(2) changes where
the packet code would attempt to set TCP_NODELAY on a mux proxy
connection (which is AF_UNIX).
asmc.4: clean up/modernize manpage
- sysutils/ataidle is no more: it was superseded by camcontrol(8).
- Sort the models table alphabetically.
- Use the SPDX License ID instead of the longhand licensing tort in the
manpage header.
- Note that the driver has been heavily modified in 15.1 and later to
support additional platforms and functionality.
- Trim down SYNOPSIS.
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D59470
apple_bce.4: add a basic manpage describing the driver
This new manpage describes what the apple_bce driver services, how the
driver is configured, and what Apple models the driver claims to
support.
Reviewed by: seuros
Differential Revision: https://reviews.freebsd.org/D59467
drm/amdkfd: Reject zero-sized AQL queue allocations after size halving
From Sunday Clement
fd3462acf6590687ec1f2e062109723a76a49cbc in linux-6.18.y/6.18.51
40ba09e11188d1b7f79d51fc28aca5ea45e0c138 in mainline linux
drm/amdkfd: guard against NULL restore_mqd in CRIU queue restore
From Vladimir Marioukhine
ebffa44e7a21ead59ac4b4264e8fc2cbb44c4a21 in linux-6.18.y/6.18.51
6aa530642f95d5c48aa336416f94a35e7949b647 in mainline linux
drm/amdkfd: Fix the case that vm range is hole at svm_migrate_copy_to_vram
From Xiaogang Chen
ae806a95b28fcecb913430cfa45a252e91a945d6 in linux-6.18.y/6.18.51
520e345ffe05aabef1db82beda4288afb1757ff2 in mainline linux
drm/amdkfd: Fix error path at svm_migrate_copy_to_ram
From Xiaogang Chen
da87bcad1f781d822e7ced6d1de9dbc6d381c72e in linux-6.18.y/6.18.51
960c4a8069bfd352c48cc88592618f1ebe24c69e in mainline linux
drm/amdkfd: Add TLB flush after MES queue eviction/suspension
From Priya Hosur
e230c546ed93741833ab5babb0b202f9c2052b45 in linux-6.18.y/6.18.51
94e25cb6ab7f4f025bcdcd8ea79fda30f12843a4 in mainline linux
drm/amdgpu: use AMDGPU_GPU_PAGE_SHIFT instead of PAGE_SHIFT
From Sunil Khatri
2e4b909fab96c557e43f661a8944d979db6dada9 in linux-6.18.y/6.18.51
d6e16df7df4d2c39e2b04b355d0434fb90e2d62c in mainline linux
drm/amdgpu: update the fw version for gfx12 userqueues
From Sunil Khatri
65e643703f1509f12395843f264782f1f7e60d7d in linux-6.18.y/6.18.51
49a74a2388528c1a2e96f01114c4513e635605fe in mainline linux
drm/amdgpu: update the fw version for gfx11 userqueues
From Sunil Khatri
b7cb1b66961371bd565d85773d5a679c8428d6f3 in linux-6.18.y/6.18.51
c748dd03df33360549ad60cdccee13570e9c0f90 in mainline linux
drm/amdgpu: Skip accessing psp rum time db for APUs
From Kanala Ramalingeswara Reddy
8de8b4e11ce487bccde37cc23c350f5084a86818 in linux-6.18.y/6.18.51
a26301203a196a991527f7b1ab884d4dd0e7c95e in mainline linux