FreeBSD/src ca93c98sys/dev/asmc asmc.c

use ASMC_FAN_FUNCS2 to avoid trying to read non-existent keys

Signed-off-by: tslight <tslight at pm.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2051
(cherry picked from commit cecd12ac3b4d98bd52dc0e802a4a38bc72f50e2c)
DeltaFile
+1-1sys/dev/asmc/asmc.c
+1-11 files

FreeBSD/src a2c7643sys/dev/asmc asmc.c

use ASMC_FAN_FUNCS2 to avoid trying to read non-existent keys

Signed-off-by: tslight <tslight at pm.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2051
(cherry picked from commit cecd12ac3b4d98bd52dc0e802a4a38bc72f50e2c)
DeltaFile
+1-1sys/dev/asmc/asmc.c
+1-11 files

FreeBSD/src cac2368sys/dev/asmc asmcvar.h asmc.c

Add ASMC support for Macbook Pro 8,3

Signed-off-by: tslight <tslight at pm.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1992
(cherry picked from commit 16c82e28404ec959a7335ceae1d4f43881a50d9e)
DeltaFile
+33-0sys/dev/asmc/asmcvar.h
+6-0sys/dev/asmc/asmc.c
+39-02 files

FreeBSD/src ae09e4asys/dev/asmc asmcvar.h asmc.c

Add ASMC support for Macbook Pro 8,3

Signed-off-by: tslight <tslight at pm.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1992
(cherry picked from commit 16c82e28404ec959a7335ceae1d4f43881a50d9e)
DeltaFile
+33-0sys/dev/asmc/asmcvar.h
+6-0sys/dev/asmc/asmc.c
+39-02 files

FreeBSD/ports c723bf8comms/gnuradio pkg-plist

comms/gnuradio: Fix pkg-plist error when PYTHON_VER != 3.11

PR:             294766
Approved by:    blanket (fix build)
Sponsored by:   UNIS Labs
MFH:            2026Q2

(cherry picked from commit 23dfa3efd3b862016e7285c4b3b5cd8c8f0f9a0b)
DeltaFile
+1-1comms/gnuradio/pkg-plist
+1-11 files

FreeBSD/ports 23dfa3ecomms/gnuradio pkg-plist

comms/gnuradio: Fix pkg-plist error when PYTHON_VER != 3.11

PR:             294766
Approved by:    blanket (fix build)
Sponsored by:   UNIS Labs
MFH:            2026Q2
DeltaFile
+1-1comms/gnuradio/pkg-plist
+1-11 files

FreeBSD/src c8ad757sys/dev/asmc asmc.c

asmc: use symbolic names with the MacPro3,1 model

Use `ASMC_LIGHT_FUNCS_DISABLED` and `ASMC_SMS_FUNCS_DISABLED` instead of
the unrolled versions of the macros.

This makes it easier to adjust the underlying macros/fields for
`struct asmc_model`.

No functional change intended.

MFC after:      1 week

(cherry picked from commit 90edc16166a6fef03d2384247d07d64656f03309)
DeltaFile
+2-2sys/dev/asmc/asmc.c
+2-21 files

FreeBSD/src 0f79ce7sys/dev/asmc asmc.c

asmc: use symbolic names with the MacPro3,1 model

Use `ASMC_LIGHT_FUNCS_DISABLED` and `ASMC_SMS_FUNCS_DISABLED` instead of
the unrolled versions of the macros.

This makes it easier to adjust the underlying macros/fields for
`struct asmc_model`.

No functional change intended.

MFC after:      1 week

(cherry picked from commit 90edc16166a6fef03d2384247d07d64656f03309)
DeltaFile
+2-2sys/dev/asmc/asmc.c
+2-21 files

FreeBSD/src 0770a76sys/dev/asmc asmc.c

asmc: code style modernization and minor cleanups

- Allow `ASMC_DEBUG` to be treated as a variadic macro.
- Add ellipses around `sizeof(..)` calls.
- Reindent some of the lines to better follow style(9) with line
  wrapping.

A number of other clang-format changes were not taken as they are not
compatible with style(9).

MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D55394

(cherry picked from commit e20e26e4e271ecb74e40d9a95ed3112ceaf9604f)
DeltaFile
+47-59sys/dev/asmc/asmc.c
+47-591 files

FreeBSD/src 732d45esys/dev/asmc asmc.c

asmc: code style modernization and minor cleanups

- Allow `ASMC_DEBUG` to be treated as a variadic macro.
- Add ellipses around `sizeof(..)` calls.
- Reindent some of the lines to better follow style(9) with line
  wrapping.

A number of other clang-format changes were not taken as they are not
compatible with style(9).

MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D55394

(cherry picked from commit e20e26e4e271ecb74e40d9a95ed3112ceaf9604f)
DeltaFile
+47-59sys/dev/asmc/asmc.c
+47-591 files

FreeBSD/src 608749csys/netinet ip_divert.c

divert: unbreak the LINT-NOIP build

Only expose `dcb` when either `INET` or `INET6` is defined.

Reported by:    clang (`-Wunused`)
MFC after:      1 week
Fixes 5547a7bb39 ("divert: Use a better source identifier...")
Differential Revision: https://reviews.freebsd.org/D55548

(cherry picked from commit bd758ebac3272f720c051570e043e4bc653dcd48)
DeltaFile
+3-2sys/netinet/ip_divert.c
+3-21 files

LLVM/project 6855d70clang/lib/CIR/CodeGen CIRGenAtomic.cpp CIRGenExprScalar.cpp, clang/test/CIR/CodeGen atomic.c

[CIR] Add support for atomic-to-non-atomic cast (#193784)

This patch adds support for atomic-to-non-atomic casts in CIR.

Related to #192319 .

Assisted-by: Github Copilot / GPT-5.4
DeltaFile
+94-0clang/lib/CIR/CodeGen/CIRGenAtomic.cpp
+16-0clang/test/CIR/CodeGen/atomic.c
+1-6clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
+6-0clang/lib/CIR/CodeGen/CIRGenFunction.h
+1-1clang/lib/CIR/CodeGen/CIRGenExpr.cpp
+118-75 files

FreeBSD/src 3303090lib/libnetbsd math.h, lib/libnetbsd/sys time.h

libnetbsd: add math.h and sys/time.h

- `math.h`: `isinff(..)`
- `sys/time.h`: `timespec*(x)`

These two headers are used by tests in newer snapshots of
`contrib/netbsd-tests`.

MFC after:      1 week

(cherry picked from commit 2a6c2d9c38dc421025b6c18cac68fe9965c574c0)
DeltaFile
+35-0lib/libnetbsd/sys/time.h
+14-0lib/libnetbsd/math.h
+49-02 files

FreeBSD/src 7be895elib/libnetbsd/sys cdefs.h

libnetbsd: import `__CTASSERT(..)` macros

These compile-time assert macros are similar to `Static_assert` on FreeBSD.

These macros are in use in newer versions of `contrib/netbsd-tests`.

Obtained from:  https://github.com/NetBSD/src (c26cc77b3a0b26b95a2)
MFC after:      1 week

(cherry picked from commit d1f1402dff63dd163d4ba4ac65f7f2ffd00c5e08)
DeltaFile
+16-0lib/libnetbsd/sys/cdefs.h
+16-01 files

FreeBSD/src ee828a4lib/libnetbsd/sys cdefs.h

lib/libnetbsd: bring in `__type_m{ax,in}*` macro family

These macros are used by some of the NetBSD tests which calculate the
size of types, e.g., `__type_max(time_t)`.

This wraps up the set of macros needed in order to update to the a
netbsd-tests snapshot from this past month.

Obtained from:  https://github.com/netbsd/src (55b4b44)
MFC after:      1 week

(cherry picked from commit db5344a7445f1a796bc3cacd32a46e88e3e589a7)
DeltaFile
+30-0lib/libnetbsd/sys/cdefs.h
+30-01 files

FreeBSD/src f816257lib/libnetbsd math.h, lib/libnetbsd/sys time.h

libnetbsd: add math.h and sys/time.h

- `math.h`: `isinff(..)`
- `sys/time.h`: `timespec*(x)`

These two headers are used by tests in newer snapshots of
`contrib/netbsd-tests`.

MFC after:      1 week

(cherry picked from commit 2a6c2d9c38dc421025b6c18cac68fe9965c574c0)
DeltaFile
+35-0lib/libnetbsd/sys/time.h
+14-0lib/libnetbsd/math.h
+49-02 files

FreeBSD/src 0b97abalib/libnetbsd/sys cdefs.h

libnetbsd: import `__CTASSERT(..)` macros

These compile-time assert macros are similar to `Static_assert` on FreeBSD.

These macros are in use in newer versions of `contrib/netbsd-tests`.

Obtained from:  https://github.com/NetBSD/src (c26cc77b3a0b26b95a2)
MFC after:      1 week

(cherry picked from commit d1f1402dff63dd163d4ba4ac65f7f2ffd00c5e08)
DeltaFile
+16-0lib/libnetbsd/sys/cdefs.h
+16-01 files

FreeBSD/src 1f86a86lib/libnetbsd/sys cdefs.h

lib/libnetbsd: bring in `__type_m{ax,in}*` macro family

These macros are used by some of the NetBSD tests which calculate the
size of types, e.g., `__type_max(time_t)`.

This wraps up the set of macros needed in order to update to the a
netbsd-tests snapshot from this past month.

Obtained from:  https://github.com/netbsd/src (55b4b44)
MFC after:      1 week

(cherry picked from commit db5344a7445f1a796bc3cacd32a46e88e3e589a7)
DeltaFile
+30-0lib/libnetbsd/sys/cdefs.h
+30-01 files

FreeBSD/src 68511df. .gitignore

.gitignore: ignore additional unwanted files

Ignore more files generated by toolchains, e.g., `.pico`, etc. Ignore the
`.DS_Store` produced by macOS as well because all they provide is
additional file metadata that shouldn't be committed to `git`.

MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D55096

(cherry picked from commit 4544f34f2d30ee63ab1eec9fa52c31bd92d457ca)
DeltaFile
+10-0.gitignore
+10-01 files

FreeBSD/src 079bfe2. .gitignore

.gitignore: ignore additional unwanted files

Ignore more files generated by toolchains, e.g., `.pico`, etc. Ignore the
`.DS_Store` produced by macOS as well because all they provide is
additional file metadata that shouldn't be committed to `git`.

MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D55096

(cherry picked from commit 4544f34f2d30ee63ab1eec9fa52c31bd92d457ca)
DeltaFile
+10-0.gitignore
+10-01 files

FreeBSD/src 833df8dsys/dev/asmc asmcvar.h asmc.c

asmc: Add MacPro3,1 temperature sensor support

Test and verified with Sonicblue7

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D54952

(cherry picked from commit 90d79dd549461dac053b34d47ae32968afb2834c)
DeltaFile
+69-0sys/dev/asmc/asmcvar.h
+9-0sys/dev/asmc/asmc.c
+78-02 files

FreeBSD/src 4dd7202sys/dev/asmc asmc.c

asmc: Convert driver to CTLFLAG_MPSAFE

Replace CTLFLAG_NEEDGIANT with CTLFLAG_MPSAFE for all sysctls.
The driver already uses spin mutexes (sc->sc_mtx) for hardware
access protection and does not require the Giant lock.

This improves scalability by allowing concurrent sysctl access
without Giant serialization.

Reviewed by:    ngie, adrian
Differential Revision:  https://reviews.freebsd.org/D54613

(cherry picked from commit 1a6bdd6266e3b53c8b6b597a77a100353b7ae13a)
DeltaFile
+14-14sys/dev/asmc/asmc.c
+14-141 files

FreeBSD/src 16c9bcesys/dev/asmc asmc.c

asmc: Convert driver to CTLFLAG_MPSAFE

Replace CTLFLAG_NEEDGIANT with CTLFLAG_MPSAFE for all sysctls.
The driver already uses spin mutexes (sc->sc_mtx) for hardware
access protection and does not require the Giant lock.

This improves scalability by allowing concurrent sysctl access
without Giant serialization.

Reviewed by:    ngie, adrian
Differential Revision:  https://reviews.freebsd.org/D54613

(cherry picked from commit 1a6bdd6266e3b53c8b6b597a77a100353b7ae13a)
DeltaFile
+14-14sys/dev/asmc/asmc.c
+14-141 files

FreeBSD/src 3c4d1f5sys/dev/asmc asmcvar.h asmc.c

asmc: Add MacPro3,1 temperature sensor support

Test and verified with Sonicblue7

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D54952

(cherry picked from commit 90d79dd549461dac053b34d47ae32968afb2834c)
DeltaFile
+69-0sys/dev/asmc/asmcvar.h
+9-0sys/dev/asmc/asmc.c
+78-02 files

FreeBSD/src 4192442sys/dev/asmc asmc.c

asmc: use `ASMC_FAN_FUNCS2` with the Macmini4,1

The Macmini4,1 model does not have "fansafespeed" support. This issue
typically manifests with messages like so:

```
asmc0: asmc_key_read for key F0Sf failed 10 times, giving up
```

Swap out `ASMC_FAN_FUNCS` with `ASMC_FAN_FUNCS2` to explicitly drop
"fansafespeed" checks in the driver for the model as it doesn't support
that hardware feature.

MFC after:      1 week
Reported by:    @probonopd
Closes:         https://github.com/helloSystem/ISO/issues/357

(cherry picked from commit 7b862cf8a252d80ab1fb90fa5371fd8462c7c16f)
DeltaFile
+1-1sys/dev/asmc/asmc.c
+1-11 files

FreeBSD/src c264355sys/dev/asmc asmc.c

asmc: use `ASMC_FAN_FUNCS2` with the Macmini4,1

The Macmini4,1 model does not have "fansafespeed" support. This issue
typically manifests with messages like so:

```
asmc0: asmc_key_read for key F0Sf failed 10 times, giving up
```

Swap out `ASMC_FAN_FUNCS` with `ASMC_FAN_FUNCS2` to explicitly drop
"fansafespeed" checks in the driver for the model as it doesn't support
that hardware feature.

MFC after:      1 week
Reported by:    @probonopd
Closes:         https://github.com/helloSystem/ISO/issues/357

(cherry picked from commit 7b862cf8a252d80ab1fb90fa5371fd8462c7c16f)
DeltaFile
+1-1sys/dev/asmc/asmc.c
+1-11 files

FreeBSD/src 4c91d2esys/dev/asmc asmc.c

asmc: resource cleanup simplifications

This change makes `asmc_detach(..)` reentrant by setting freed resources
to known invalid values when done, and makes `asmc_attach(..)` call
`asmc_detach(..)` instead of attempting to the semi-equivalent way of
cleaning up the driver resources allocated in `asmc_detach(..)`.

MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D55413

(cherry picked from commit eda36ae09dd1fab78bd377739fc5d6c65c61f5d7)
DeltaFile
+19-14sys/dev/asmc/asmc.c
+19-141 files

FreeBSD/src 78e9708sys/dev/asmc asmc.c asmcvar.h

asmc: output the SMC firmware revision on attach

The SMC firmware revision can prove helpful when determining why the
behavior of a given controller varies from the maintainers' expected
behavior.

This should be a sysctl (eventually), but for now dumping out the
information via `device_printf(..)` suffices, given that only one
asmc(4) compatible device can exist in an Apple platform at any
given point in time. This will become a sysctl in the future after
additional improvements are incorporated from OpenBSD and NetBSD.

MFC after:      1 week
Obtained from:  https://github.com/openbsd/src/ (sys/dev/acpi/asmc.c @ 142d064)
Differential Revision: https://reviews.freebsd.org/D55577

(cherry picked from commit e81e724358e43dcf951e244a9df9df3eaa983fe9)
DeltaFile
+9-2sys/dev/asmc/asmc.c
+3-0sys/dev/asmc/asmcvar.h
+12-22 files

FreeBSD/src 9dbe757sys/dev/asmc asmc.c

chore: asmc: use designated initializers in macros

This code cleanup makes it easier for human readers to understand what each
of the fields actually represents, as well as makes it easier to modify
what the macros actually do under the covers, without introducing
potential human errors.

No functional change intended.

MFC after:      1 week

(cherry picked from commit ef1cde51032d395492caae302fedf183c58a482b)
DeltaFile
+33-18sys/dev/asmc/asmc.c
+33-181 files

FreeBSD/src 464afc5sys/dev/asmc asmc.c

asmc: introduce the concept of generic models

Having to enter in each of the models for Apple hardware, recompiling,
etc, is tedious. Provide generic models so end-users can leverage some
of the capabilities provided by the driver, i.e., common features like
minimal fans and lights (if present on the generic model) support.

The generic models are as follows:
- Macmini
- MacBookAir
- MacBookPro
- MacPro

This sort of follows the pattern established by the `applesmc` driver in
Linux.

MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D55395

(cherry picked from commit 3023bb49e115b4149f9fc0683dabde172ecb1336)
DeltaFile
+67-13sys/dev/asmc/asmc.c
+67-131 files